On Tue, Feb 26, 2019 at 2:25 AM Ed Leafe <ed@leafe.com> wrote:
On Feb 25, 2019, at 7:36 AM, Akihiro Motoki <amotoki@gmail.com> wrote:
It sounds nice to me to support tagging when creating a resource to
What in my mind is to specify 'tags' attribute in a body of POST request
address the above problem. like:
{'port': {'name': 'foo', 'network_id': <network-id>, 'tags': ['red', 'blue'] } }
I don't know the reason why the current API-SIG recommended tagging API
does
not support this model. The current tagging API defines "tags" as a subresource. Is there any reason this model was adopted?
Tags are strings attached to resources, so there really should be no difference when creating a resource with tags than when creating a resource with a name. The part of the guideline for modifying tags assumes that the resource already exists.
We could certainly add additional wording that clarifies that resources can be created with tags; there certainly isn’t anything in the current guideline that says they can’t.
Thanks Ed and Jay. As Miguel mentioned, we the neutron team would like to align the community-wide guideline. I agree that we can add some additional notes in the API-SIG docs. In addition, we can also use the similar syntax in PUT/PATCH operation to update existing tags of a resource. This would simplify the implementation of SDKs (from my experience of implementing the tag support in OpenStackSDK). {'port': {'tags': ['red', 'blue'] } } Best Regards, Akihiro Motoki
-- Ed Leafe