From 10a07c8726d1dc465581e15cab1438c85704395c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Fri, 10 Mar 2017 23:53:21 +0100 Subject: [PATCH] mgmt: allow vm.List call to a particular VM This allow getting info about a single VM. QubesOS/qubes-issues#853 --- qubes/mgmt.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qubes/mgmt.py b/qubes/mgmt.py index b7631a43..a6f345a6 100644 --- a/qubes/mgmt.py +++ b/qubes/mgmt.py @@ -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,