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.
This commit is contained in:
parent
c1bab3d094
commit
f52a0f2d41
@ -507,7 +507,6 @@ class Pool(object):
|
|||||||
|
|
||||||
* ``appvms`` for ``QubesAppVm`` or ``QubesHvm``
|
* ``appvms`` for ``QubesAppVm`` or ``QubesHvm``
|
||||||
* ``vm-templates`` for ``QubesTemplateVm`` or ``QubesTemplateHvm``
|
* ``vm-templates`` for ``QubesTemplateVm`` or ``QubesTemplateHvm``
|
||||||
* ``servicevms`` for any subclass of ``QubesNetVm``
|
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
vm: a QubesVM
|
vm: a QubesVM
|
||||||
@ -517,20 +516,13 @@ class Pool(object):
|
|||||||
string (str) absolute path to the directory where the vm files
|
string (str) absolute path to the directory where the vm files
|
||||||
are stored
|
are stored
|
||||||
"""
|
"""
|
||||||
if vm.is_appvm():
|
if vm.is_template():
|
||||||
subdir = 'appvms'
|
|
||||||
elif vm.is_template():
|
|
||||||
subdir = 'vm-templates'
|
subdir = 'vm-templates'
|
||||||
elif vm.is_netvm():
|
|
||||||
subdir = 'servicevms'
|
|
||||||
elif vm.is_disposablevm():
|
elif vm.is_disposablevm():
|
||||||
subdir = 'appvms'
|
subdir = 'appvms'
|
||||||
return os.path.join(pool_dir, subdir, vm.template.name + '-dvm')
|
return os.path.join(pool_dir, subdir, vm.template.name + '-dvm')
|
||||||
elif isinstance(vm, qubes.vm.adminvm.AdminVM):
|
|
||||||
subdir = 'servicevms'
|
|
||||||
else:
|
else:
|
||||||
raise qubes.exc.QubesException(
|
subdir = 'appvms'
|
||||||
'unknown vm type: {!r}'.format(str(vm.__class__)))
|
|
||||||
|
|
||||||
return os.path.join(pool_dir, subdir, vm.name)
|
return os.path.join(pool_dir, subdir, vm.name)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user