I agree on referencing objects by name rather than just by id. This can be definitely done before F-3, and if the name is not unique, then we can return an error message asking the user to specify the id, with the list of possible ids returned by the command. Then the goal for grizzly would be tab completion, I hope.<div>
<br></div><div>I also had the impression Yong felt we should change the approach that we've adopted for the show command as well, so maybe he can provide more information. </div><div><br></div><div>Salvatore<br><br><div class="gmail_quote">
On 27 July 2012 21:21, Dan Wendlandt <span dir="ltr"><<a href="mailto:dan@nicira.com" target="_blank">dan@nicira.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I think its really nice to be able to reference a network by name (rather than just by UUID) when specifying the network in a port-create or subnet-create command.  Otherwise you're basically focusing a cut-and-paste for anyone using the CLI (and forcing awk parsing for anyone using scripting).  <div>


<br></div><div>My understanding is that Salvatore's patch added support for using names in 'show' commands only, but the same logic should probably be used for update + delete commands, as well as for arguments to create commands.  </div>


<div><br></div><div>To be honest, I'm not quite sure whether there's agreement or not on the above thread, so clarifying points we still need to discuss would be useful for me.  </div><div><br></div><div>Dan</div>


<div><br></div><div><div><div class="h5"><br><div class="gmail_quote">On Fri, Jul 27, 2012 at 12:29 AM, Salvatore Orlando <span dir="ltr"><<a href="mailto:sorlando@nicira.com" target="_blank">sorlando@nicira.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi Yong,<div><br></div><div>I am not sure if you're referring to the change that has been merged, or to the use of names in command that reference to other resources (such as port-create with requires a net id).</div>


<div>
<br></div><div>In the former case, if you believe the merged change does something unacceptable, please file a bug so that we can either revert it or replace with something better. </div><div><br></div><div>In the latter case, as stated in my previous email I think that using name as a reference might improve usability even if we have to be careful about non-uniqueness.</div>


<span><font color="#888888">
<div><br></div></font></span><div><span><font color="#888888">Salvatore</font></span><div><div><br><br><div class="gmail_quote">On 27 July 2012 09:23, Yong Sheng Gong <span dir="ltr"><<a href="mailto:gongysh@cn.ibm.com" target="_blank">gongysh@cn.ibm.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<font face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif">Hi,<br>I found <a href="https://review.openstack.org/#/c/10276/" target="_blank">https://review.openstack.org/#/c/10276/</a> is just for quantum x-show command and where it uses xx_list as the result of show if the argument is a name.<br>



This is binding xx-list and xx-show command.<br><span>I think when we cannot get the resource with the name_or_id, we should:<br>1. use the name_or_id as a name to get the right id<br>2. and then use the id to do the related operation: such as show, delete, and update.<br>



</span><br>Regards,<br>Yong Sheng Gong<br><br><font color="#990099">-----Yong Sheng Gong/China/IBM@IBMCN wrote: -----</font><div style="padding-left:5px"><div style="padding-right:0px;padding-left:5px;border-left:2px solid black">



To: <a href="mailto:dan@nicira.com" target="_blank">dan@nicira.com</a>, "Salvatore Orlando" <a href="mailto:sorlando@nicira.com" target="_blank"><sorlando@nicira.com></a>, <a href="mailto:gkotton@redhat.com" target="_blank">gkotton@redhat.com</a><br>



From: Yong Sheng Gong/China/IBM@IBMCN<br>Date: 07/27/2012 02:57PM<br>Cc: OpenStack Development Mailing List <a href="mailto:openstack-dev@lists.openstack.org" target="_blank"><openstack-dev@lists.openstack.org></a><br>



Subject: [openstack-dev] [quantum] about use name as command cli's argument<div><div><br><br><font face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif"> <span><br>Hi,<br>I want to talk about the name_or_id argument in quantum client commands.<br>



</span>For example:<br>1. quantum net-create myname<br>2. quantum net-show myname or id<br>3. quantum subnet-create network_id <a href="http://10.0.1.0/24" target="_blank">10.0.1.0/24</a> --name mysub<br>here subnet-create cannot use networkname.<br>



4.quanum subnet-show mysub<br><br>All in all, If we want to show, delete and update a resource, we can use name or id to specify the resource. When using name,  the number of that resource with the given name must be 1.<br>



When we reference a resource in another resource, for example, we create a subnet under a network, we must reference that network by id.<br><br>So, are these implementations acceptable?<br><br>Thanks<br>Yong Sheng Gong<br>



</font>

</div></div><div><font face="Courier New,Courier,monospace">_______________________________________________<br>OpenStack-dev mailing list<br><a href="mailto:OpenStack-dev@lists.openstack.org" target="_blank">OpenStack-dev@lists.openstack.org</a><br>



<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br></font></div></div></div></font>
</blockquote></div><br></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br>~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>Dan Wendlandt <div>Nicira, Inc: <a href="http://www.nicira.com" target="_blank">www.nicira.com</a><br>
<div>twitter: danwendlandt<br>

~~~~~~~~~~~~~~~~~~~~~~~~~~~<br></div></div><br>
</font></span></div>
</blockquote></div><br></div>