diff --git a/lower-constraints.txt b/lower-constraints.txt index 12618bbbb56e..f1fe816efd15 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -68,7 +68,7 @@ os-brick==2.6.1 os-client-config==1.29.0 os-resource-classes==0.1.0 os-service-types==1.2.0 -os-traits==0.8.0 +os-traits==0.12.0 os-vif==1.14.0 os-win==3.0.0 os-xenapi==0.3.3 diff --git a/nova/virt/driver.py b/nova/virt/driver.py index 97a9fa3aa35e..635a081c18f5 100644 --- a/nova/virt/driver.py +++ b/nova/virt/driver.py @@ -109,7 +109,19 @@ CAPABILITY_TRAITS_MAP = { "supports_extend_volume": os_traits.COMPUTE_VOLUME_EXTEND, "supports_multiattach": os_traits.COMPUTE_VOLUME_MULTI_ATTACH, # Added in os-traits 0.8.0. - "supports_trusted_certs": os_traits.COMPUTE_TRUSTED_CERTS + "supports_trusted_certs": os_traits.COMPUTE_TRUSTED_CERTS, + + # Image type support flags, added in os-traits 0.12.0 + "supports_image_type_aki": os_traits.COMPUTE_IMAGE_TYPE_AKI, + "supports_image_type_ami": os_traits.COMPUTE_IMAGE_TYPE_AMI, + "supports_image_type_ari": os_traits.COMPUTE_IMAGE_TYPE_ARI, + "supports_image_type_iso": os_traits.COMPUTE_IMAGE_TYPE_ISO, + "supports_image_type_qcow2": os_traits.COMPUTE_IMAGE_TYPE_QCOW2, + "supports_image_type_raw": os_traits.COMPUTE_IMAGE_TYPE_RAW, + "supports_image_type_vdi": os_traits.COMPUTE_IMAGE_TYPE_VDI, + "supports_image_type_vhd": os_traits.COMPUTE_IMAGE_TYPE_VHD, + "supports_image_type_vhdx": os_traits.COMPUTE_IMAGE_TYPE_VHDX, + "supports_image_type_vmdk": os_traits.COMPUTE_IMAGE_TYPE_VMDK, } @@ -158,6 +170,18 @@ class ComputeDriver(object): "supports_extend_volume": False, "supports_multiattach": False, "supports_trusted_certs": False, + + # Image type support flags + "supports_image_type_aki": False, + "supports_image_type_ami": False, + "supports_image_type_ari": False, + "supports_image_type_iso": False, + "supports_image_type_qcow2": False, + "supports_image_type_raw": False, + "supports_image_type_vdi": False, + "supports_image_type_vhd": False, + "supports_image_type_vhdx": False, + "supports_image_type_vmdk": False, } # Indicates if this driver will rebalance nodes among compute service diff --git a/nova/virt/powervm/driver.py b/nova/virt/powervm/driver.py index 1400d61fc0ec..9d3e9feb4c08 100644 --- a/nova/virt/powervm/driver.py +++ b/nova/virt/powervm/driver.py @@ -77,6 +77,18 @@ class PowerVMDriver(driver.ComputeDriver): 'supports_extend_volume': True, 'supports_multiattach': False, 'supports_trusted_certs': False, + + # Supported image types + "supports_image_type_aki": False, + "supports_image_type_ami": False, + "supports_image_type_ari": False, + "supports_image_type_iso": False, + "supports_image_type_qcow2": False, + "supports_image_type_raw": True, + "supports_image_type_vdi": False, + "supports_image_type_vhd": False, + "supports_image_type_vhdx": False, + "supports_image_type_vmdk": False, } super(PowerVMDriver, self).__init__(virtapi) diff --git a/requirements.txt b/requirements.txt index 72be6df59dbb..c619669bf27e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -56,7 +56,7 @@ psutil>=3.2.2 # BSD oslo.versionedobjects>=1.35.0 # Apache-2.0 os-brick>=2.6.1 # Apache-2.0 os-resource-classes>=0.1.0 # Apache-2.0 -os-traits>=0.8.0 # Apache-2.0 +os-traits>=0.12.0 # Apache-2.0 os-vif>=1.14.0 # Apache-2.0 os-win>=3.0.0 # Apache-2.0 castellan>=0.16.0 # Apache-2.0