Updates glance fixture for create image

glance client takes image_min_disk as string and return as int,
while glance fixture is returning as it is.

Change-Id: I47df4d147d9dd4c901af2c55c97e111e603cd806
This commit is contained in:
Amit Uniyal
2024-01-16 05:55:12 +00:00
parent a72f7eaac7
commit 12ca930e45

View File

@@ -300,6 +300,10 @@ class GlanceFixture(fixtures.Fixture):
image_meta = copy.deepcopy(metadata)
if image_meta.get('min_disk'):
# min_disk should be of int type only.
image_meta['min_disk'] = int(image_meta['min_disk'])
# Glance sets the size value when an image is created, so we
# need to do that here to fake things out if it's not provided
# by the caller. This is needed to avoid a KeyError in the