From b73970c62d053ace4923d51ca066d322e3ea38d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Fri, 29 Nov 2013 03:42:56 +0100 Subject: [PATCH] core: rename QubesDom0NetVm to QubesAdminVm This is somehow related to #757, but only first (easier) step. Actual change of QubesAdminVm base class requires somehow more changes, for example qvm-ls needs to know how to display this type of VM (none of template, appvm, netvm). Make this first step change now, because starting with R2Beta3 dom0 will be stored in qubes.xml (for new backups purposes) so this rename would be complicated later. --- core-modules/{006QubesDom0NetVm.py => 006QubesAdminVm.py} | 8 ++++---- core/qubes.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) rename core-modules/{006QubesDom0NetVm.py => 006QubesAdminVm.py} (93%) diff --git a/core-modules/006QubesDom0NetVm.py b/core-modules/006QubesAdminVm.py similarity index 93% rename from core-modules/006QubesDom0NetVm.py rename to core-modules/006QubesAdminVm.py index 43251e48..24274f91 100644 --- a/core-modules/006QubesDom0NetVm.py +++ b/core-modules/006QubesAdminVm.py @@ -25,13 +25,13 @@ from qubes.qubes import QubesNetVm,register_qubes_vm_class,xl_ctx,xc from qubes.qubes import defaults from qubes.qubes import QubesException,dry_run -class QubesDom0NetVm(QubesNetVm): +class QubesAdminVm(QubesNetVm): # In which order load this VM type from qubes.xml load_order = 10 def __init__(self, **kwargs): - super(QubesDom0NetVm, self).__init__(qid=0, name="dom0", netid=0, + super(QubesAdminVm, self).__init__(qid=0, name="dom0", netid=0, dir_path=None, private_img = None, template = None, @@ -41,7 +41,7 @@ class QubesDom0NetVm(QubesNetVm): @property def type(self): - return "Dom0NetVM" + return "AdminVM" def is_running(self): return True @@ -94,4 +94,4 @@ class QubesDom0NetVm(QubesNetVm): def verify_files(self): return True -register_qubes_vm_class(QubesDom0NetVm) +register_qubes_vm_class(QubesAdminVm) diff --git a/core/qubes.py b/core/qubes.py index 0532b1de..743ae15f 100755 --- a/core/qubes.py +++ b/core/qubes.py @@ -660,7 +660,7 @@ class QubesVmCollection(dict): # Add dom0 if wasn't present in qubes.xml if not 0 in self.keys(): - dom0vm = QubesDom0NetVm (collection=self) + dom0vm = QubesAdminVm (collection=self) self[dom0vm.qid] = dom0vm return True