vm/adminvm: (re-)add vm.qdb property
Dom0 also expose some information in QubesDB - like list of block devices.
This commit is contained in:
parent
3748eb3e2b
commit
3c4b60fa45
@ -49,6 +49,11 @@ class AdminVM(qubes.vm.BaseVM):
|
|||||||
default='00000000-0000-0000-0000-000000000000',
|
default='00000000-0000-0000-0000-000000000000',
|
||||||
setter=qubes.property.forbidden)
|
setter=qubes.property.forbidden)
|
||||||
|
|
||||||
|
def __init__(self, *args, **kwargs):
|
||||||
|
super().__init__(*args, **kwargs)
|
||||||
|
|
||||||
|
self._qdb_connection = None
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.name
|
return self.name
|
||||||
|
|
||||||
@ -158,6 +163,15 @@ class AdminVM(qubes.vm.BaseVM):
|
|||||||
def icon_path(self):
|
def icon_path(self):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
@property
|
||||||
|
def qdb(self):
|
||||||
|
'''QubesDB handle for this domain.'''
|
||||||
|
if self._qdb_connection is None:
|
||||||
|
import qubesdb # pylint: disable=import-error
|
||||||
|
self._qdb_connection = qubesdb.QubesDB(self.name)
|
||||||
|
return self._qdb_connection
|
||||||
|
|
||||||
|
|
||||||
# def __init__(self, **kwargs):
|
# def __init__(self, **kwargs):
|
||||||
# super(QubesAdminVm, self).__init__(qid=0, name="dom0", netid=0,
|
# super(QubesAdminVm, self).__init__(qid=0, name="dom0", netid=0,
|
||||||
# dir_path=None,
|
# dir_path=None,
|
||||||
|
Loading…
Reference in New Issue
Block a user