<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Feb 26, 2019 at 2:25 AM Ed Leafe <<a href="mailto:ed@leafe.com">ed@leafe.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Feb 25, 2019, at 7:36 AM, Akihiro Motoki <<a href="mailto:amotoki@gmail.com" target="_blank">amotoki@gmail.com</a>> wrote:<br>
> <br>
> It sounds nice to me to support tagging when creating a resource to address the above problem.<br>
> What in my mind is to specify 'tags' attribute in a body of POST request like:<br>
> <br>
> {'port':<br>
> {'name': 'foo',<br>
> 'network_id': <network-id>,<br>
> 'tags': ['red', 'blue']<br>
> }<br>
> }<br>
> <br>
> I don't know the reason why the current API-SIG recommended tagging API does<br>
> not support this model. The current tagging API defines "tags" as a subresource.<br>
> Is there any reason this model was adopted?<br>
<br>
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.<br>
<br>
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.<br></blockquote><div><br></div><div>Thanks Ed and Jay.</div><div>As Miguel mentioned, we the neutron team would like to align the community-wide guideline.</div><div>I agree that we can add some additional notes in the API-SIG docs.</div><div><br></div><div>In addition, we can also use the similar syntax in PUT/PATCH operation to update existing tags of a resource.</div><div>This would simplify the implementation of SDKs (from my experience of implementing the tag support in OpenStackSDK).</div><div><br></div><div>{'port': {'tags': ['red', 'blue'] } }<br></div><div><br></div><div>Best Regards,</div><div>Akihiro Motoki</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
<br>
-- Ed Leafe<br>
<br>
<br>
<br>
<br>
<br>
</blockquote></div></div>