1 parent dc25797 commit 5ce23e1Copy full SHA for 5ce23e1
1 file changed
openstack_image_manager/main.py
@@ -1262,6 +1262,14 @@ def rename_images(
1262
logger.info(f"Renaming old latest '{name}' to '{previous_latest}'")
1263
self.image_proxy.update_image(previous_image.id, name=previous_latest)
1264
1265
+ if previous_image["properties"].get("os_purpose") == "generic":
1266
+ # you can't have more than one image of the same architecture, distro, and version
1267
+ # with os_purpose=generic, so change this to oldgeneric for the previous image
1268
+ self.image_proxy.update_image(
1269
+ previous_image.id,
1270
+ os_purpose="oldgeneric",
1271
+ )
1272
+
1273
logger.info(f"Renaming imported image '{imported_image.name}' to '{name}'")
1274
self.image_proxy.update_image(imported_image.id, name=name)
1275
0 commit comments