Support for AudioVM

This commit is contained in:
Frédéric Pierret (fepitre) 2019-11-17 18:23:15 +01:00
parent a1ddbb054f
commit 6d9e5bbf07
No known key found for this signature in database
GPG Key ID: 484010B5CDC576E2
3 changed files with 9 additions and 8 deletions

View File

@ -36,8 +36,9 @@ class TestVMUsage(qubesadmin.tests.QubesTestCase):
b'sys-firewall class=AppVM state=Running\n'
self.global_properties = ['default_dispvm', 'default_netvm',
'default_guivm', 'default_template',
'clockvm', 'updatevm', 'management_dispvm']
'default_guivm', 'default_audiovm',
'default_template', 'clockvm', 'updatevm',
'management_dispvm']
for prop in self.global_properties:
self.app.expected_calls[
@ -47,8 +48,8 @@ class TestVMUsage(qubesadmin.tests.QubesTestCase):
self.vms = ['vm1', 'vm2', 'sys-net', 'sys-firewall',
'template1', 'template2']
self.vm_properties = ['template', 'netvm', 'guivm', 'default_dispvm',
'management_dispvm']
self.vm_properties = ['template', 'netvm', 'guivm', 'audiovm',
'default_dispvm', 'management_dispvm']
for vm in self.vms:
for prop in self.vm_properties:

View File

@ -118,7 +118,7 @@ def process_actions(parser, args, target):
if args.value is not None:
if str(args.value).lower() == "none":
if args.property in ["default_dispvm", "netvm", "template",
"guivm"]:
"guivm", "audiovm"]:
args.value = ''
try:
setattr(target, args.property, args.value)

View File

@ -128,14 +128,14 @@ def vm_dependencies(app, reference_vm):
result = []
global_properties = ['default_dispvm', 'default_netvm', 'default_guivm',
'default_template', 'clockvm', 'updatevm',
'management_dispvm']
'default_audiovm', 'default_template', 'clockvm',
'updatevm', 'management_dispvm']
for prop in global_properties:
if reference_vm == getattr(app, prop, None):
result.append((None, prop))
vm_properties = ['template', 'netvm', 'guivm',
vm_properties = ['template', 'netvm', 'guivm', 'audiovm',
'default_dispvm', 'management_dispvm']
for vm in app.domains: