mgmt: allow vm.List call to a particular VM
This allow getting info about a single VM. QubesOS/qubes-issues#853
This commit is contained in:
parent
fb7bd6823a
commit
10a07c8726
@ -132,12 +132,14 @@ class QubesMgmt(object):
|
|||||||
|
|
||||||
@asyncio.coroutine
|
@asyncio.coroutine
|
||||||
def vm_list(self, untrusted_payload):
|
def vm_list(self, untrusted_payload):
|
||||||
assert self.dest.name == 'dom0'
|
|
||||||
assert not self.arg
|
assert not self.arg
|
||||||
assert not untrusted_payload
|
assert not untrusted_payload
|
||||||
del untrusted_payload
|
del untrusted_payload
|
||||||
|
|
||||||
domains = self.fire_event_for_filter(self.app.domains)
|
if self.dest.name == 'dom0':
|
||||||
|
domains = self.fire_event_for_filter(self.app.domains)
|
||||||
|
else:
|
||||||
|
domains = self.fire_event_for_filter([self.dest])
|
||||||
|
|
||||||
return ''.join('{} class={} state={}\n'.format(
|
return ''.join('{} class={} state={}\n'.format(
|
||||||
vm.name,
|
vm.name,
|
||||||
|
Loading…
Reference in New Issue
Block a user