vm/adminvm: add default_dispvm property to AdminVM

This is useful to select default DispVM template for VMs started
directly by the user. This makes sense as long as AdminVM == GUIVM.

QubesOS/qubes-issues#2974
This commit is contained in:
Marek Marczykowski-Górecki 2017-08-06 12:44:08 +02:00
parent 971c7d4ac9
commit 8488d5dc72
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -49,6 +49,12 @@ class AdminVM(qubes.vm.BaseVM):
default='00000000-0000-0000-0000-000000000000',
setter=qubes.property.forbidden)
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.')
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)