Browse Source

Pool configuration include the pool name

Bahtiar `kalkin-` Gadimov 8 years ago
parent
commit
3c798bc825
2 changed files with 6 additions and 2 deletions
  1. 3 1
      qubes/config.py
  2. 3 1
      qubes/storage/__init__.py

+ 3 - 1
qubes/config.py

@@ -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),

+ 3 - 1
qubes/storage/__init__.py

@@ -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)