From afecabdc590e1d13a3207c6d8c949c8017c1f7a3 Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Fri, 2 Mar 2012 01:21:40 +0100 Subject: [PATCH] dom0/qvm-firewall: provide custom vif name by QubesHVM --- dom0/qvm-core/qubes.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dom0/qvm-core/qubes.py b/dom0/qvm-core/qubes.py index b462a676..dc82e43a 100755 --- a/dom0/qvm-core/qubes.py +++ b/dom0/qvm-core/qubes.py @@ -2128,6 +2128,14 @@ class QubesHVm(QubesVm): def reset_volatile_storage(self, **kwargs): pass + @property + def vif(self): + if not self.is_running(): + return None + if self.netvm_vm is None: + return None + return "vif{0}.+".format(self.stubdom_xid) + def run(self, command, **kwargs): raise NotImplementedError("Needs qrexec agent - TODO")