diff options
author | Tatiana Ovchinnikova <t.v.ovtchinnikova@gmail.com> | 2023-02-23 15:00:42 -0600 |
---|---|---|
committer | Tatiana Ovchinnikova <t.v.ovtchinnikova@gmail.com> | 2023-02-23 15:00:47 -0600 |
commit | 557a56c1023a040dbb233cd6300ccf85395e8293 (patch) | |
tree | 41dd55999fceb6e972dcb2cc404ce97c1e40a690 | |
parent | d4b73ed1c415da84db2a67f2d24f465b604e1359 (diff) | |
download | horizon-557a56c1023a040dbb233cd6300ccf85395e8293.tar.gz |
Drop readonly image metadata properties from request
Glance doesn not accept editing specific readonly metadata
properties, so we need to remove them from update request.
Change-Id: Ia9d8381f4add5cf6d82f2568b483d1c0b8d1a8b7
-rw-r--r-- | openstack_dashboard/static/app/core/openstack-service-api/glance.service.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/openstack_dashboard/static/app/core/openstack-service-api/glance.service.js b/openstack_dashboard/static/app/core/openstack-service-api/glance.service.js index db14f3f2f..a0b931982 100644 --- a/openstack_dashboard/static/app/core/openstack-service-api/glance.service.js +++ b/openstack_dashboard/static/app/core/openstack-service-api/glance.service.js @@ -47,6 +47,8 @@ getResourceTypes: getResourceTypes }; + var READONLY_PROPERTIES = ['os_hash_algo', 'os_hash_value']; + return service; /////////////// @@ -278,6 +280,10 @@ * @returns {Object} The result of the API call */ function editImageProps(id, updated, removed) { + angular.forEach(READONLY_PROPERTIES, function(key) { + delete updated[key]; + }); + return apiService.patch( '/api/glance/images/' + id + '/properties/', { |