dom0: Fix create_xenstore_entries in other classes to not require xid argument
This commit is contained in:
parent
a21454ba8e
commit
f2770e2d03
@ -1422,10 +1422,14 @@ class QubesNetVm(QubesVm):
|
|||||||
assert lo >= 1 and lo <= 254, "Wrong IP address for VM"
|
assert lo >= 1 and lo <= 254, "Wrong IP address for VM"
|
||||||
return self.dispnetprefix + "{0}".format(lo)
|
return self.dispnetprefix + "{0}".format(lo)
|
||||||
|
|
||||||
def create_xenstore_entries(self, xid):
|
def create_xenstore_entries(self, xid = None):
|
||||||
if dry_run:
|
if dry_run:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if xid is None:
|
||||||
|
xid = self.xid
|
||||||
|
|
||||||
|
|
||||||
super(QubesNetVm, self).create_xenstore_entries(xid)
|
super(QubesNetVm, self).create_xenstore_entries(xid)
|
||||||
xs.write('', "/local/domain/{0}/qubes_netvm_external_ip".format(xid), '')
|
xs.write('', "/local/domain/{0}/qubes_netvm_external_ip".format(xid), '')
|
||||||
self.update_external_ip_permissions(xid)
|
self.update_external_ip_permissions(xid)
|
||||||
@ -1520,10 +1524,14 @@ class QubesProxyVm(QubesNetVm):
|
|||||||
self.netvm_vm.remove_external_ip_permission(self.get_xid())
|
self.netvm_vm.remove_external_ip_permission(self.get_xid())
|
||||||
super(QubesProxyVm, self).force_shutdown()
|
super(QubesProxyVm, self).force_shutdown()
|
||||||
|
|
||||||
def create_xenstore_entries(self, xid):
|
def create_xenstore_entries(self, xid = None):
|
||||||
if dry_run:
|
if dry_run:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if xid is None:
|
||||||
|
xid = self.xid
|
||||||
|
|
||||||
|
|
||||||
super(QubesProxyVm, self).create_xenstore_entries(xid)
|
super(QubesProxyVm, self).create_xenstore_entries(xid)
|
||||||
xs.write('', "/local/domain/{0}/qubes_iptables_error".format(xid), '')
|
xs.write('', "/local/domain/{0}/qubes_iptables_error".format(xid), '')
|
||||||
xs.set_permissions('', "/local/domain/{0}/qubes_iptables_error".format(xid),
|
xs.set_permissions('', "/local/domain/{0}/qubes_iptables_error".format(xid),
|
||||||
|
Loading…
Reference in New Issue
Block a user