From f2770e2d0358712bf21fde6caea6861ecad8d402 Mon Sep 17 00:00:00 2001 From: Joanna Rutkowska Date: Fri, 9 Sep 2011 18:49:15 +0200 Subject: [PATCH] dom0: Fix create_xenstore_entries in other classes to not require xid argument --- dom0/qvm-core/qubes.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/dom0/qvm-core/qubes.py b/dom0/qvm-core/qubes.py index 17f25a3b..402724b8 100755 --- a/dom0/qvm-core/qubes.py +++ b/dom0/qvm-core/qubes.py @@ -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),