<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.hoenzb
{mso-style-name:hoenzb;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Non-unique names – at creation time it would make sense to alert the user saving “name already taken”, please specify another one or provide a few available
options.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">This is how gmail responds when one is tryign to create a new account. This would be more user friendly then expect the user to remember IP address if one is
providing symbolic name and ip access.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Regards<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Malini<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Salvatore Orlando [mailto:sorlando@nicira.com]
<br>
<b>Sent:</b> Friday, July 27, 2012 2:31 PM<br>
<b>To:</b> Dan Wendlandt<br>
<b>Cc:</b> OpenStack Development Mailing List<br>
<b>Subject:</b> Re: [openstack-dev] [quantum] about use name as command cli's argument<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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.<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Salvatore<o:p></o:p></p>
<div>
<p class="MsoNormal">On 27 July 2012 21:21, Dan Wendlandt <<a href="mailto:dan@nicira.com" target="_blank">dan@nicira.com</a>> wrote:<o:p></o:p></p>
<p class="MsoNormal">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). <o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Dan<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Fri, Jul 27, 2012 at 12:29 AM, Salvatore Orlando <<a href="mailto:sorlando@nicira.com" target="_blank">sorlando@nicira.com</a>> wrote:<o:p></o:p></p>
<p class="MsoNormal">Hi Yong,<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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).<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#888888"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#888888">Salvatore</span><o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On 27 July 2012 09:23, Yong Sheng Gong <<a href="mailto:gongysh@cn.ibm.com" target="_blank">gongysh@cn.ibm.com</a>> wrote:<o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:"Verdana","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>
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>
<br>
Regards,<br>
Yong Sheng Gong<br>
<br>
<span style="color:#990099">-----Yong Sheng Gong/China/IBM@IBMCN wrote: -----</span><o:p></o:p></span></p>
<div>
<div style="border:none;border-left:solid black 1.5pt;padding:0in 0in 0in 3.0pt">
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">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<o:p></o:p></span></p>
<div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif""><br>
<br>
<br>
Hi,<br>
I want to talk about the name_or_id argument in quantum client commands.<br>
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<o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Courier New"">_______________________________________________<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></span><span style="font-family:"Verdana","sans-serif""><o:p></o:p></span></p>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
<p class="MsoNormal"><span class="hoenzb"><span style="color:#888888">-- </span></span><span style="color:#888888"><br>
<span class="hoenzb">~~~~~~~~~~~~~~~~~~~~~~~~~~~</span><br>
<span class="hoenzb">Dan Wendlandt <o:p></o:p></span></span></p>
<div>
<p class="MsoNormal"><span style="color:#888888">Nicira, Inc: <a href="http://www.nicira.com" target="_blank">www.nicira.com</a></span><o:p></o:p></p>
<div>
<p class="MsoNormal"><span style="color:#888888">twitter: danwendlandt<br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>