Pool configuration include the pool name

This commit is contained in:
Bahtiar `kalkin-` Gadimov 2016-03-23 12:11:58 +01:00
parent bd4674b658
commit 3c798bc825
2 changed files with 6 additions and 2 deletions

View File

@ -83,7 +83,9 @@ defaults = {
'private_img_size': 2*1024*1024*1024,
'root_img_size': 10*1024*1024*1024,
'pool_config': {'dir_path': '/var/lib/qubes/', 'driver': 'xen'},
'pool_config': {'dir_path': '/var/lib/qubes/',
'driver': 'xen',
'name': 'default'},
# how long (in sec) to wait for VMs to shutdown,
# before killing them (when used qvm-run with --wait option),

View File

@ -352,11 +352,13 @@ def get_disk_usage(path):
return ret
class Pool(object):
def __init__(self, vm, dir_path):
def __init__(self, vm, dir_path, name):
assert vm is not None
assert dir_path is not None
assert name
self.vm = vm
self.name = name
self.dir_path = os.path.normpath(dir_path)
self.create_dir_if_not_exists(self.dir_path)