Fix volume type test extra_specs
The test_create_from_image_with_volume_type_image_property test was
creating a volume type with extra_specs (storage_protocol and
vendor_name) that don't match the backend capabilities in many
deployments. This caused the Cinder scheduler to fail finding a
suitable host, resulting in volumes going into ERROR status.
The purpose of this test is to verify that the cinder_img_volume_type
image property correctly selects a volume type when creating a volume
from an image. The test doesn't need to validate volume type
extra_specs, so these have been removed.
This allows the test to work on any Cinder backend without requiring
specific capability matching.
Closes-Bug: #2130017
Change-Id: I0ab4e1478255c5dc4a8e4cb9ab2dc4f73b447924
Signed-off-by: Jason Paroly <jparoly@redhat.com>
Jason Paroly authored 3 months ago
Eric Harney committed 3 months ago
| 40 | 40 | volume_type_name = 'vol-type-for-6e9266ff-a917-4dd5-aa4a-c36e59e7a2a6' |
| 41 | 41 | description = ('Generic volume_type for test ' |
| 42 | 42 | '6e9266ff-a917-4dd5-aa4a-c36e59e7a2a6') |
| 43 | proto = CONF.volume.storage_protocol | |
| 44 | vendor = CONF.volume.vendor_name | |
| 45 | extra_specs = {"storage_protocol": proto, | |
| 46 | "vendor_name": vendor} | |
| 47 | 43 | kwargs = {'description': description, |
| 48 | 'extra_specs': extra_specs, | |
| 49 | 44 | 'os-volume-type-access:is_public': True} |
| 50 | 45 | volume_type = self.create_volume_type(name=volume_type_name, |
| 51 | 46 | **kwargs) |