qubes/vm: initialize vm.volumes in one place

Move it to QubesVM, instead of each class separately.
This commit is contained in:
Marek Marczykowski-Górecki 2016-05-21 03:50:09 +02:00 committed by Wojtek Porczyk
parent 28591fa6be
commit 36644f3710
4 changed files with 1 additions and 3 deletions

View File

@ -16,7 +16,6 @@ class AppVM(qubes.vm.qubesvm.QubesVM):
doc='Template, on which this AppVM is based.')
def __init__(self, *args, **kwargs):
self.volumes = {}
self.volume_config = {
'root': {
'name': 'root',

View File

@ -20,7 +20,6 @@ class DispVM(qubes.vm.qubesvm.QubesVM):
doc='''Internal, persistent identifier of particular DispVM.''')
def __init__(self, *args, **kwargs):
self.volumes = {}
self.volume_config = {
'root': {
'name': 'root',

View File

@ -434,6 +434,7 @@ class QubesVM(qubes.vm.mix.net.NetVMMixin, qubes.vm.BaseVM):
def __init__(self, app, xml, volume_config={}, **kwargs):
super(QubesVM, self).__init__(app, xml, **kwargs)
self.volumes = {}
if hasattr(self, 'volume_config'):
if xml is not None:
for node in xml.xpath('volume-config/volume'):

View File

@ -30,7 +30,6 @@ class TemplateVM(QubesVM):
def __init__(self, *args, **kwargs):
assert 'template' not in kwargs, "A TemplateVM can not have a template"
self.volumes = {}
self.volume_config = {
'root': {
'name': 'root',