Merge "Drop readonly image metadata properties from request"
This commit is contained in:
commit
5663e0865b
@ -47,6 +47,8 @@
|
|||||||
getResourceTypes: getResourceTypes
|
getResourceTypes: getResourceTypes
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var READONLY_PROPERTIES = ['os_hash_algo', 'os_hash_value'];
|
||||||
|
|
||||||
return service;
|
return service;
|
||||||
|
|
||||||
///////////////
|
///////////////
|
||||||
@ -278,6 +280,10 @@
|
|||||||
* @returns {Object} The result of the API call
|
* @returns {Object} The result of the API call
|
||||||
*/
|
*/
|
||||||
function editImageProps(id, updated, removed) {
|
function editImageProps(id, updated, removed) {
|
||||||
|
angular.forEach(READONLY_PROPERTIES, function(key) {
|
||||||
|
delete updated[key];
|
||||||
|
});
|
||||||
|
|
||||||
return apiService.patch(
|
return apiService.patch(
|
||||||
'/api/glance/images/' + id + '/properties/',
|
'/api/glance/images/' + id + '/properties/',
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user