From f52a0f2d41508f570a7033dac6f487da86555fc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Wed, 10 Feb 2016 17:03:46 +0100 Subject: [PATCH] storage: get rid of 'servicevms' subdir Keep all the non-template VMs in 'appvms'. Having it split makes no sense since any VM can be "converted" to NetVM by simply changing its provides_network attribute and probably assigning some PCI device. On the other hand, it may be useful to set this manually, for example by management stack - based on VM function, not type. But don't care about it for now. --- qubes/storage/__init__.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/qubes/storage/__init__.py b/qubes/storage/__init__.py index 5fa98721..89db20f6 100644 --- a/qubes/storage/__init__.py +++ b/qubes/storage/__init__.py @@ -507,7 +507,6 @@ class Pool(object): * ``appvms`` for ``QubesAppVm`` or ``QubesHvm`` * ``vm-templates`` for ``QubesTemplateVm`` or ``QubesTemplateHvm`` - * ``servicevms`` for any subclass of ``QubesNetVm`` Args: vm: a QubesVM @@ -517,20 +516,13 @@ class Pool(object): string (str) absolute path to the directory where the vm files are stored """ - if vm.is_appvm(): - subdir = 'appvms' - elif vm.is_template(): + if vm.is_template(): subdir = 'vm-templates' - elif vm.is_netvm(): - subdir = 'servicevms' elif vm.is_disposablevm(): subdir = 'appvms' return os.path.join(pool_dir, subdir, vm.template.name + '-dvm') - elif isinstance(vm, qubes.vm.adminvm.AdminVM): - subdir = 'servicevms' else: - raise qubes.exc.QubesException( - 'unknown vm type: {!r}'.format(str(vm.__class__))) + subdir = 'appvms' return os.path.join(pool_dir, subdir, vm.name)