diff options
author | Mridula Joshi <mrjoshi@redhat.com> | 2021-08-18 08:21:53 +0000 |
---|---|---|
committer | Mridula Joshi <mrjoshi@redhat.com> | 2022-02-16 05:45:06 +0000 |
commit | 2a9a4c8e0e095f3cd788e2f24b2dce508538e0d5 (patch) | |
tree | c867d5829dff54a47d477158b579dc13da748e45 /api-ref | |
parent | a42fda92dc8fe160bea1dd4d22cb1135fab89022 (diff) | |
download | glance-2a9a4c8e0e095f3cd788e2f24b2dce508538e0d5.tar.gz |
Fix overwriting of existing tags while creating new tags
It was observed that md-tag-create-multiple
(/v2/metadefs/namespaces/{namespace_name}/tags) API overwrites
existing tags for specified namespace rather than creating new one
in addition to the existing tags.
This patch resolves the issue by introducing a header 'X-Openstack-Append'
which on being True will append the new tags to existing ones and
if False will continue to overwrite the tags.
Implements: blueprint append-tags
Closes-Bug: #1939169
Change-Id: I29448746b14c542e5fbf0283011968ae1516642e
Diffstat (limited to 'api-ref')
-rw-r--r-- | api-ref/source/v2/metadefs-namespaces-tags.inc | 1 | ||||
-rw-r--r-- | api-ref/source/v2/metadefs-parameters.yaml | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/api-ref/source/v2/metadefs-namespaces-tags.inc b/api-ref/source/v2/metadefs-namespaces-tags.inc index 6d52fad54..176cbb415 100644 --- a/api-ref/source/v2/metadefs-namespaces-tags.inc +++ b/api-ref/source/v2/metadefs-namespaces-tags.inc @@ -191,6 +191,7 @@ Request .. rest_parameters:: metadefs-parameters.yaml + - X-Openstack-Append: append - namespace_name: namespace_name - tags: tags diff --git a/api-ref/source/v2/metadefs-parameters.yaml b/api-ref/source/v2/metadefs-parameters.yaml index 9a58aa839..5f6b6fdb9 100644 --- a/api-ref/source/v2/metadefs-parameters.yaml +++ b/api-ref/source/v2/metadefs-parameters.yaml @@ -1,4 +1,11 @@ # variables in header +append: + description: | + If present and set to True, new metadefs tags are appended to the existing ones. + Otherwise, existing tags are overwritten. + in: header + required: false + type: string Content-Type-json: description: | The media type descriptor for the request body. Use |