Added tags restrictions to the tagging guidelines
One problem with tag names was found during tag implementation in Nova Ibc44228aeae94c17353af7fccfcfb2c11b2e9190 This problems was connected with URLs. We can't use '/' in names because in this case we will get a incorrect URL for tag 'abc/cba': /servers/<server_id>/tags/abc/cba Even if '/' will be encoded like %2F. Nova will decide that it is '/'. But this is not a problem of Nova. Unfortunately some servers works incorrectly with encoded character '/'. It's a problem of poor implementation of some servers. To escape problems with handling URLs character '/' should be forbidden in tag names. Change-Id: I9832270b3d8210bff9cd2d9732b4d19f757f865a
This commit is contained in:
@@ -18,8 +18,7 @@ Tags Representation
|
|||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
Tags are strings attached to an entity with the purpose of classification into
|
Tags are strings attached to an entity with the purpose of classification into
|
||||||
groups. To simplify requests that specify lists of tags, the comma character
|
groups.
|
||||||
is not allowed to be in a tag name.
|
|
||||||
|
|
||||||
An entity can have zero, one or more tags associated with it, for that
|
An entity can have zero, one or more tags associated with it, for that
|
||||||
reason the recommended representation within the parent entity is a list.
|
reason the recommended representation within the parent entity is a list.
|
||||||
@@ -51,6 +50,25 @@ For resources that have a representation that is not in JSON a separate
|
|||||||
endpoint must be created to expose the tags. See the "Tag Resource URLs"
|
endpoint must be created to expose the tags. See the "Tag Resource URLs"
|
||||||
section below for more information.
|
section below for more information.
|
||||||
|
|
||||||
|
Tags Restrictions
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
Tags are strings with the following basic restrictions:
|
||||||
|
|
||||||
|
* Tags are case sensitive.
|
||||||
|
* '/' is **not** allowed to be in a tag name
|
||||||
|
* Comma is **not** allowed to be in a tag name in order to simplify requests
|
||||||
|
that specify lists of tags
|
||||||
|
* All other characters are allowed to be in a tag name
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
The '/' character is forbidden because some servers have a problem with
|
||||||
|
encoding this character. The problem is that the server will handle '%2F'
|
||||||
|
as '/' even though '/' is encoded. It's a problem of poor server
|
||||||
|
implementation. To avoid problems with handling URLs character '/' is
|
||||||
|
forbidden in tag names.
|
||||||
|
|
||||||
Character Encoding for Tags
|
Character Encoding for Tags
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user