Remove unused 'source_template' parameter from some QubesVm internal functions
This commit is contained in:
parent
fc7d200452
commit
062c3afcf5
@ -1037,8 +1037,7 @@ class QubesVm(object):
|
||||
slot=dev_match.group(2),
|
||||
fun=dev_match.group(3))
|
||||
|
||||
# FIXME: source_template unused
|
||||
def get_rootdev(self, source_template=None):
|
||||
def get_rootdev(self):
|
||||
if self.template:
|
||||
return self._format_disk_dev(
|
||||
"{dir}/root.img:{dir}/root-cow.img".format(
|
||||
@ -1049,8 +1048,7 @@ class QubesVm(object):
|
||||
"{dir}/root.img".format(dir=self.dir_path),
|
||||
None, "xvda", True)
|
||||
|
||||
# FIXME: source_template unused
|
||||
def get_config_params(self, source_template=None):
|
||||
def get_config_params(self):
|
||||
args = {}
|
||||
args['name'] = self.name
|
||||
if hasattr(self, 'kernels_dir'):
|
||||
@ -1113,8 +1111,7 @@ class QubesVm(object):
|
||||
def uses_custom_config(self):
|
||||
return self.conf_file != self.absolute_path(self.name + ".conf", None)
|
||||
|
||||
# FIXME: source_template unused
|
||||
def create_config_file(self, file_path = None, source_template = None, prepare_dvm = False):
|
||||
def create_config_file(self, file_path = None, prepare_dvm = False):
|
||||
if file_path is None:
|
||||
file_path = self.conf_file
|
||||
if self.uses_custom_config:
|
||||
@ -1122,14 +1119,12 @@ class QubesVm(object):
|
||||
domain_config = conf_appvm.read()
|
||||
conf_appvm.close()
|
||||
return domain_config
|
||||
if source_template is None:
|
||||
source_template = self.template
|
||||
|
||||
f_conf_template = open(self.config_file_template, 'r')
|
||||
conf_template = f_conf_template.read()
|
||||
f_conf_template.close()
|
||||
|
||||
template_params = self.get_config_params(source_template)
|
||||
template_params = self.get_config_params()
|
||||
if prepare_dvm:
|
||||
template_params['name'] = '%NAME%'
|
||||
template_params['privatedev'] = ''
|
||||
|
@ -76,8 +76,7 @@ class QubesTemplateVm(QubesVm):
|
||||
def get_firewall_defaults(self):
|
||||
return { "rules": list(), "allow": False, "allowDns": False, "allowIcmp": False, "allowYumProxy": True }
|
||||
|
||||
# FIXME: source_template unused
|
||||
def get_rootdev(self, source_template=None):
|
||||
def get_rootdev(self):
|
||||
return self._format_disk_dev(
|
||||
"{dir}/root.img:{dir}/root-cow.img".format(
|
||||
dir=self.dir_path),
|
||||
|
@ -107,8 +107,15 @@ class QubesDisposableVm(QubesVm):
|
||||
def verify_files(self):
|
||||
return True
|
||||
|
||||
# FIXME: source_template unused
|
||||
def get_config_params(self, source_template=None):
|
||||
def create_xenstore_entries(self, xid):
|
||||
super(QubesDisposableVm, self).create_xenstore_entries(xid)
|
||||
|
||||
domain_path = vmm.xs.get_domain_path(xid)
|
||||
|
||||
vmm.xs.write('', "{0}/qubes-restore-complete".format(domain_path),
|
||||
'True')
|
||||
|
||||
def get_config_params(self):
|
||||
attrs = super(QubesDisposableVm, self).get_config_params()
|
||||
attrs['privatedev'] = ''
|
||||
return attrs
|
||||
|
@ -280,9 +280,9 @@ class QubesHVm(QubesVm):
|
||||
else:
|
||||
return "'script:file:{root_img},xvda,w',".format(root_img=self.root_img)
|
||||
|
||||
def get_config_params(self, source_template=None):
|
||||
def get_config_params(self):
|
||||
|
||||
params = super(QubesHVm, self).get_config_params(source_template=source_template)
|
||||
params = super(QubesHVm, self).get_config_params()
|
||||
|
||||
params['volatiledev'] = ''
|
||||
if self.drive:
|
||||
|
Loading…
Reference in New Issue
Block a user