From 1a215e47ab0618e32e51e8ab70566b3261be3a2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Wed, 17 Aug 2016 00:46:43 +0200 Subject: [PATCH] qubes: add 'default_dispvm' property - both Qubes and QubesVM QubesOS/qubes-issues#2253 --- qubes/app.py | 2 ++ qubes/vm/qubesvm.py | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/qubes/app.py b/qubes/app.py index 02e53523..ff6a0a81 100644 --- a/qubes/app.py +++ b/qubes/app.py @@ -583,6 +583,8 @@ class Qubes(qubes.PropertyHolder): doc='Which VM to use as NTP proxy for updating AdminVM') default_kernel = qubes.property('default_kernel', load_stage=3, doc='Which kernel to use when not overriden in VM') + default_dispvm = qubes.VMProperty('default_dispvm', load_stage=3, + doc='Default DispVM base for service calls') # TODO #1637 #892 check_updates_vm = qubes.property('check_updates_vm', diff --git a/qubes/vm/qubesvm.py b/qubes/vm/qubesvm.py index 8e0c1d0f..b25fb9a2 100644 --- a/qubes/vm/qubesvm.py +++ b/qubes/vm/qubesvm.py @@ -294,6 +294,12 @@ class QubesVM(qubes.vm.mix.net.NetVMMixin, qubes.vm.BaseVM): saver=(lambda self, prop, value: value.strftime('%s')), doc='FIXME') + default_dispvm = qubes.VMProperty('default_dispvm', + load_stage=4, + allow_none=True, + default=(lambda self: self.app.default_dispvm), + doc='Default VM to be used as Disposable VM for service calls.') + # # static, class-wide properties #