Bladeren bron

Merged in aznashwan/coriolis/disk-alloc-type (pull request #99)

Add schema options and constants for disk allocation types.

Approved-by: Arin Toaca <atoaca@cloudbasesolutions.com>
Nashwan Azhari 8 jaren geleden
bovenliggende
commit
9839ac685c
2 gewijzigde bestanden met toevoegingen van 10 en 2 verwijderingen
  1. 3 0
      coriolis/constants.py
  2. 7 2
      coriolis/schemas/vm_export_info_schema.json

+ 3 - 0
coriolis/constants.py

@@ -63,6 +63,9 @@ DISK_FORMAT_QCOW2 = 'qcow2'
 DISK_FORMAT_VHD = 'vhd'
 DISK_FORMAT_VHDX = 'vhdx'
 
+DISK_ALLOCATION_TYPE_STATIC = "static"
+DISK_ALLOCATION_TYPE_DYNAMIC = "dynamic"
+
 FIRMWARE_TYPE_BIOS = 'BIOS'
 FIRMWARE_TYPE_EFI = 'EFI'
 

+ 7 - 2
coriolis/schemas/vm_export_info_schema.json

@@ -99,8 +99,13 @@
                 "$ref": "#/definitions/numberOrString"
               },
               "storage_backend_identifier": {
-                  "type": "string",
-                  "help": "A string identifier for the storage system the disk is hosted on."
+                "type": "string",
+                "help": "A string identifier for the storage system the disk is hosted on."
+              },
+              "allocation_type": {
+                "type": "string",
+                "description": "The allocation scheme for the given disk (static = thick; dynamic = thin)",
+                "enum": ["static", "dynamic"]
               }
             },
             "required": [