Image filters should be dict not set

At the moment we generate a set as a filter for image checksums which
lead to AttributeError in SDK:
'set' object has no attribute 'keys'

With that we ensure that supllying checksum does not cause
module crash.

Change-Id: I490f51950592f62c9ad81806593340779bf6dbdb
This commit is contained in:
Dmitriy Rabotyagov
2023-07-25 12:49:28 +02:00
parent 2808d1c155
commit 0a371445eb
2 changed files with 9 additions and 1 deletions

View File

@@ -485,7 +485,7 @@ class ImageModule(OpenStackModule):
if image_name_or_id:
image = self.conn.get_image(
image_name_or_id,
filters={(k, self.params[k])
filters={k: self.params[k]
for k in ['checksum'] if self.params[k] is not None})
changed = False