[openstack-dev] [osc][python-openstackclient] Consistency of option name

Dean Troyer dtroyer at gmail.com
Mon Feb 12 15:24:05 UTC 2018


On Mon, Feb 12, 2018 at 9:13 AM, Graham Hayes <gr at ham.ie> wrote:
> OSC only predates Designate by 5 months ...

My bad, I didn't check dates.

> "Zone" was what we were recommend to use by the OSC devs at the time we
> wrote our OSC plugin, and at the time we were also *not* supposed to
> name space commands inside service parent (e.g. openstack zone create vs
> openstack dns zone create).

Namespacing commands and naming options are totally separate things.
It is likely I suggested --zone at the time, and in the context of DNS
commands it is very clear.  Also, in the context of Compute commands,
--zone meaning availability zone is also clear.

> For command flags --dns-zone seems like a good idea - but having a plain
> --zone is confusing when we have a top level "zone" object in the CLI,
> when the type of object that "--zone" refers to is different to
> "openstack zone <action>"

Again, if there is confusion, things should be more specifically named
to remove the confusion.  Maybe allowing "zone" to be assumed to be a
DNS zone was a mistake, I've made plenty of those in OSC already, so
there is precedent, but it seemed reasonable at the time and we (OSC
team) do not control what external plugins do.

For example, I really resist using abbreviations in OSC, but in some
places to not do so is to buck trends that any semi-experienced user
in the field would expect.  The last discussion of this was last week
regarding "MTU" in Network commands.

These are not hard rules, but strong guidelines that can and should be
interpreted in the context that they will be applied.  And in the end,
the result should be one that is understandable, clear and even
expected by the users.

dt

-- 

Dean Troyer
dtroyer at gmail.com



More information about the OpenStack-dev mailing list