From 6d9e5bbf077a5a2bcaacf2b145427c7773b28921 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret=20=28fepitre=29?= Date: Sun, 17 Nov 2019 18:23:15 +0100 Subject: [PATCH] Support for AudioVM --- qubesadmin/tests/utils.py | 9 +++++---- qubesadmin/tools/qvm_prefs.py | 2 +- qubesadmin/utils.py | 6 +++--- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/qubesadmin/tests/utils.py b/qubesadmin/tests/utils.py index 6f0157d..83a6fe9 100644 --- a/qubesadmin/tests/utils.py +++ b/qubesadmin/tests/utils.py @@ -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: diff --git a/qubesadmin/tools/qvm_prefs.py b/qubesadmin/tools/qvm_prefs.py index bccd459..fc91492 100644 --- a/qubesadmin/tools/qvm_prefs.py +++ b/qubesadmin/tools/qvm_prefs.py @@ -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) diff --git a/qubesadmin/utils.py b/qubesadmin/utils.py index fed1150..2350f46 100644 --- a/qubesadmin/utils.py +++ b/qubesadmin/utils.py @@ -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: