If the last location of the image is removed, image transitions back to queued.
This allows user to upload new data into the existing image record. By
preventing removal of the last location we prevent the image transition back to
queued.
This change also prevents doing the same operation via replacing the locations
with empty list.
Reviewed: https:/ /review. openstack. org/275735 /git.openstack. org/cgit/ openstack/ glance/ commit/ ?id=c5c731c7153 d6d46c27260474d 2811d504dfac5c
Committed: https:/
Submitter: Jenkins
Branch: stable/kilo
commit c5c731c7153d6d4 6c27260474d2811 d504dfac5c
Author: Erno Kuvaja <email address hidden>
Date: Tue Jan 19 13:37:05 2016 +0000
Prevent user to remove last location of the image
If the last location of the image is removed, image transitions back to queued.
This allows user to upload new data into the existing image record. By
preventing removal of the last location we prevent the image transition back to
queued.
This change also prevents doing the same operation via replacing the locations
with empty list.
SecurityImpact
DocImpact
APIImpact
Conflicts: tests/unit/ v2/test_ images_ resource. py
glance/
Conflicts: api/v2/ images. py
glance/
Change-Id: Ieb03aaba887492 819f9c58aa67f7a cfcea81720e 69964419b6b4fb2 048d115a0c)
Closes-Bug: #1525915
(cherry picked from commit e9e45baa9aaf58e