From 2a46abbefd6c8c9fc66d2bd23f8339e46ae5877a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Wed, 20 Apr 2016 02:28:11 +0200 Subject: [PATCH] qubes.vm: implement TemplateVM.appvms property --- qubes/vm/templatevm.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/qubes/vm/templatevm.py b/qubes/vm/templatevm.py index f2cd0a29..52ee5dea 100644 --- a/qubes/vm/templatevm.py +++ b/qubes/vm/templatevm.py @@ -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)