add QubesVM.connected_vms attribute

One more step to core-admin/core-admin-client API compatibility.
This commit is contained in:
Marek Marczykowski-Górecki 2018-01-11 01:55:54 +01:00
parent 51a89a9e77
commit 97724a2e00
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -310,6 +310,18 @@ class QubesVM(qubesadmin.base.PropertyHolder):
except AttributeError:
pass
@property
def connected_vms(self):
''' Return a generator containing all domains connected to the current
NetVM.
'''
for vm in self.app.domains:
try:
if vm.netvm == self:
yield vm
except AttributeError:
pass
@property
def klass(self):
''' Qube class '''