yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #10272
[Bug 1282185] Re: Unable to edit metadata with key that contains forward slash (/)
Hi Justin,
This is not a bug. According to the JSON-pointer RFC (rfc6901):
Because the characters '~' (%x7E) and '/' (%x2F) have special
meanings in JSON Pointer, '~' needs to be encoded as '~0' and '/'
needs to be encoded as '~1' when these characters appear in a
reference token.
** Changed in: glance
Status: New => Invalid
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1282185
Title:
Unable to edit metadata with key that contains forward slash (/)
Status in OpenStack Image Registry and Delivery Service (Glance):
Invalid
Bug description:
When creating a new image I can add a metadata key that contains a
forward slash, such as "some/key=value". However, if I then try to
update the value for that key I get a 400 error.
curl -i -X PATCH -H "X-Auth-Token: <auth-token>" -H "Content-Type:
application/openstack-images-v2.1-json-patch" -d '[{"op": "replace",
"path": "/some/key", "value": "newvalue"}]' <glance-
endpoint>/v2/images/<image-id>
Maybe there is some way to escape the forward slash? If not then maybe
glance should not allow metadata keys to be created that contain a
forward slash. I think a similar problem occurs for keys containing
the tilde (~).
To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1282185/+subscriptions
References