[openstack-dev] [quantum] about use name as command cli's argument

Salvatore Orlando sorlando at nicira.com
Fri Jul 27 07:29:43 UTC 2012


Hi Yong,

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).

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.

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.

Salvatore

On 27 July 2012 09:23, Yong Sheng Gong <gongysh at cn.ibm.com> wrote:

> Hi,
> I found https://review.openstack.org/#/c/10276/ is just for quantum
> x-show command and where it uses xx_list as the result of show if the
> argument is a name.
> This is binding xx-list and xx-show command.
> I think when we cannot get the resource with the name_or_id, we should:
> 1. use the name_or_id as a name to get the right id
> 2. and then use the id to do the related operation: such as show, delete,
> and update.
>
> Regards,
> Yong Sheng Gong
>
> -----Yong Sheng Gong/China/IBM at IBMCN wrote: -----
> To: dan at nicira.com, "Salvatore Orlando" <sorlando at nicira.com><sorlando at nicira.com>,
> gkotton at redhat.com
> From: Yong Sheng Gong/China/IBM at IBMCN
> Date: 07/27/2012 02:57PM
> Cc: OpenStack Development Mailing List <openstack-dev at lists.openstack.org><openstack-dev at lists.openstack.org>
> Subject: [openstack-dev] [quantum] about use name as command cli's argument
>
>
>
> Hi,
> I want to talk about the name_or_id argument in quantum client commands.
> For example:
> 1. quantum net-create myname
> 2. quantum net-show myname or id
> 3. quantum subnet-create network_id 10.0.1.0/24 --name mysub
> here subnet-create cannot use networkname.
> 4.quanum subnet-show mysub
>
> 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.
> When we reference a resource in another resource, for example, we create a
> subnet under a network, we must reference that network by id.
>
> So, are these implementations acceptable?
>
> Thanks
> Yong Sheng Gong
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20120727/3b750533/attachment.html>


More information about the OpenStack-dev mailing list