Merge "Fix case sensitive comparison" into stable/2024.2
This commit is contained in:
@@ -5836,6 +5836,7 @@ class VIFVirtioEnabledTest(test.NoDBTestCase):
|
||||
('yes', True, True),
|
||||
# fail: mismatched image and flavor configuration
|
||||
('no', True, exception.FlavorImageConflict),
|
||||
('yes', 'true', True),
|
||||
)
|
||||
def test_get_vif_virtio_constraint(
|
||||
self, flavor_policy, image_policy, expected,
|
||||
|
@@ -1982,15 +1982,19 @@ def get_packed_virtqueue_constraint(
|
||||
flavor_key = ':'.join(['hw', key_value])
|
||||
image_key = '_'.join(['hw', key_value])
|
||||
flavor_value_str = flavor.get('extra_specs', {}).get(flavor_key, None)
|
||||
image_value = image_meta.get('properties', {}).get(image_key, None)
|
||||
image_value_str = image_meta.get('properties', {}).get(image_key, None)
|
||||
else:
|
||||
flavor_value_str, image_value = _get_flavor_image_meta(
|
||||
flavor_value_str, image_value_str = _get_flavor_image_meta(
|
||||
key_value, flavor, image_meta)
|
||||
|
||||
flavor_value = None
|
||||
if flavor_value_str is not None:
|
||||
flavor_value = strutils.bool_from_string(flavor_value_str)
|
||||
|
||||
image_value = None
|
||||
if image_value_str is not None:
|
||||
image_value = strutils.bool_from_string(image_value_str)
|
||||
|
||||
if (
|
||||
image_value is not None and
|
||||
flavor_value is not None and
|
||||
|
Reference in New Issue
Block a user