dom0: Fix create_xenstore_entries in other classes to not require xid argument

This commit is contained in:
Joanna Rutkowska 2011-09-09 18:49:15 +02:00
parent a21454ba8e
commit f2770e2d03

View File

@ -1422,10 +1422,14 @@ class QubesNetVm(QubesVm):
assert lo >= 1 and lo <= 254, "Wrong IP address for VM"
return self.dispnetprefix + "{0}".format(lo)
def create_xenstore_entries(self, xid):
def create_xenstore_entries(self, xid = None):
if dry_run:
return
if xid is None:
xid = self.xid
super(QubesNetVm, self).create_xenstore_entries(xid)
xs.write('', "/local/domain/{0}/qubes_netvm_external_ip".format(xid), '')
self.update_external_ip_permissions(xid)
@ -1520,10 +1524,14 @@ class QubesProxyVm(QubesNetVm):
self.netvm_vm.remove_external_ip_permission(self.get_xid())
super(QubesProxyVm, self).force_shutdown()
def create_xenstore_entries(self, xid):
def create_xenstore_entries(self, xid = None):
if dry_run:
return
if xid is None:
xid = self.xid
super(QubesProxyVm, self).create_xenstore_entries(xid)
xs.write('', "/local/domain/{0}/qubes_iptables_error".format(xid), '')
xs.set_permissions('', "/local/domain/{0}/qubes_iptables_error".format(xid),