OSDN Git Service

add pool type in storage volume
authorHiroki Takayasu <hiroki@karesansui-project.info>
Tue, 8 Jun 2010 01:13:52 +0000 (10:13 +0900)
committerHiroki Takayasu <hiroki@karesansui-project.info>
Tue, 8 Jun 2010 01:13:52 +0000 (10:13 +0900)
bin/create_storage_volume.py

index d38c0f3..acbbaea 100755 (executable)
@@ -95,11 +95,11 @@ class CreateStorageVolume(KssCommand):
                     storage_volume_allocation_max_size = STORAGE_VOLUME_SIZE_MAX_LENGTH
                 elif opts.unit is None:
                     storage_volume_allocation_max_size = long(pool_info['allocation'])
-                    if pool_info['type'] == 'dir':
+                    if pool_info['type'] == 'dir' or pool_info['type'] == 'fs':
                         storage_volume_allocation_max_size = long(pool_info["available"])
                 else:
                     storage_volume_allocation_max_size = long(pool_info['allocation']) / STORAGE_VOLUME_UNIT.get(opts.unit, 1)
-                    if pool_info['type'] == 'dir':
+                    if pool_info['type'] == 'dir' or pool_info['type'] == 'fs':
                         storage_volume_allocation_max_size = long(pool_info["available"]) / STORAGE_VOLUME_UNIT.get(opts.unit, 1)
                 if not pool_info['capacity'] or pool_info['capacity'] == 0:
                     storage_volume_capacity_max_size = STORAGE_VOLUME_SIZE_MAX_LENGTH