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:
Marek Marczykowski-Górecki 2017-03-10 23:53:21 +01:00
parent fb7bd6823a
commit 10a07c8726
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -132,12 +132,14 @@ class QubesMgmt(object):
@asyncio.coroutine
def vm_list(self, untrusted_payload):
assert self.dest.name == 'dom0'
assert not self.arg
assert not 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(
vm.name,