Existing images update name, visibility etc
Dropped default values of min_disk and min_ram parameters because it interferes with the update mechanism and glance uses those values anyway [1], [2]. If the image is already present and visibility param is defined we should check its visibility and correct it if needed. Added tests to verify that both is_public and visibility can change the image. If both name and id are specified for the image, we might want to update the image name. This rely on fact that id pram is checked first. Added rename tests to verify this. For some reason if image object is used for the image update, 409 error produced and exception trown, but the change is in place. So instead of image object, update query rely on the image.id [1] https://github.com/openstack/glance/blob/75051dd5a2cdeef2919ba2062714bde7502416ba/glance/db/simple/api.py#L226 [2] https://github.com/openstack/glance/blob/75051dd5a2cdeef2919ba2062714bde7502416ba/glance/domain/__init__.py#L125 Change-Id: I9ca6b78bec96b69e6946b65796f12314a1ec6ab4
Loading
Please register or sign in to comment