[api][neutron] tagging support when creating a resource

Ed Leafe ed at leafe.com
Mon Feb 25 17:25:14 UTC 2019


On Feb 25, 2019, at 7:36 AM, Akihiro Motoki <amotoki at gmail.com> wrote:
> 
> It sounds nice to me to support tagging when creating a resource to address the above problem.
> What in my mind is to specify 'tags' attribute in a body of POST request 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.


-- Ed Leafe








More information about the openstack-discuss mailing list