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

Salvatore Orlando sorlando at nicira.com
Fri Jul 27 07:26:14 UTC 2012


I think it's acceptable at the moment, but users will certainly be happy
about being able to use names instead of ids in the cli.
After all, the CLI is meant to be used by humans, and UUID are all but
human!

I did not implement in the previous patch as it was beyond the scope of the
bug fix.
To be completely honest, I think we can however do better than the
<name_or_id> approach. Especially for xxx-create and xxx-update command
which reference another resource, I would probably use { --name <name> |
--id <id> }. We also need to discuss how to fail when multiple occurences
of the name are found.

Salvatore

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

>
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20120727/3af5b087/attachment-0001.html>


More information about the OpenStack-dev mailing list