qubes.vm: implement TemplateVM.appvms property

This commit is contained in:
Marek Marczykowski-Górecki 2016-04-20 02:28:11 +02:00
parent 7117847816
commit 2a46abbefd
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -15,6 +15,11 @@ class TemplateVM(qubes.vm.qubesvm.QubesVM):
'''COW image'''
return self.storage.rootcow_img
@property
def appvms(self):
for vm in self.app.domains:
if hasattr(vm, 'template') and vm.template is self:
yield vm
def __init__(self, *args, **kwargs):
super(TemplateVM, self).__init__(*args, **kwargs)