diff --git a/releasenotes/notes/accept-glance-image-id-6e8bf439d93b3fb5.yaml b/releasenotes/notes/accept-glance-image-id-6e8bf439d93b3fb5.yaml new file mode 100644 index 000000000..dd1e18727 --- /dev/null +++ b/releasenotes/notes/accept-glance-image-id-6e8bf439d93b3fb5.yaml @@ -0,0 +1,3 @@ +--- +fixes: + - Accept the glance image ID in addition to the name. diff --git a/tripleo_common/utils/glance.py b/tripleo_common/utils/glance.py index 0f98280a6..b92409b23 100644 --- a/tripleo_common/utils/glance.py +++ b/tripleo_common/utils/glance.py @@ -53,7 +53,8 @@ def _upload_file(glanceclient, name, path, disk_format, type_name, disk_format=disk_format) image = None for img in images: - if img['name'] == name and img['disk_format'] == disk_format: + if ((img['name'] == name or img['id'] == name) and + img['disk_format'] == disk_format): image = img if not image: raise exceptions.NotFound("No image found")