Merge remote-tracking branch 'origin/pr/105'
* origin/pr/105: Fixed error with VM being incorrectly listed as its own dependency
This commit is contained in:
commit
22bc5d880a
@ -76,7 +76,7 @@ class TestVMUsage(qubesadmin.tests.QubesTestCase):
|
|||||||
set(result),
|
set(result),
|
||||||
set([(vm, prop) for vm in self.vms for prop in self.vm_properties
|
set([(vm, prop) for vm in self.vms for prop in self.vm_properties
|
||||||
if (not vm.startswith('template')
|
if (not vm.startswith('template')
|
||||||
or not prop.startswith('template'))]),
|
or not prop.startswith('template')) and vm != 'template1']),
|
||||||
"Incorrect VM properties listed.")
|
"Incorrect VM properties listed.")
|
||||||
|
|
||||||
def test_02_empty(self):
|
def test_02_empty(self):
|
||||||
|
@ -136,6 +136,8 @@ def vm_dependencies(app, reference_vm):
|
|||||||
vm_properties = ['template', 'netvm', 'default_dispvm', 'management_dispvm']
|
vm_properties = ['template', 'netvm', 'default_dispvm', 'management_dispvm']
|
||||||
|
|
||||||
for vm in app.domains:
|
for vm in app.domains:
|
||||||
|
if vm == reference_vm:
|
||||||
|
continue
|
||||||
for prop in vm_properties:
|
for prop in vm_properties:
|
||||||
if reference_vm == getattr(vm, prop, None) and \
|
if reference_vm == getattr(vm, prop, None) and \
|
||||||
not vm.property_is_default(prop):
|
not vm.property_is_default(prop):
|
||||||
|
Loading…
Reference in New Issue
Block a user