Move metadef commands to sub-commands

Bug #1489534 reported by Stuart McLaren
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance Client
Opinion
Wishlist
Niall Bunting

Bug Description

There are a lot of metadef commands shown with the help output:

$ glance |grep md
    md-namespace-create
    md-namespace-delete
    md-namespace-import
    md-namespace-list List metadata definitions namespaces.
    md-namespace-objects-delete
    md-namespace-properties-delete
    md-namespace-resource-type-list
    md-namespace-show Describe a specific metadata definitions namespace.
    md-namespace-tags-delete
    md-namespace-update
    md-object-create Create a new metadata definitions object inside a
    md-object-delete Delete a specific metadata definitions object inside a
    md-object-list List metadata definitions objects inside a specific
    md-object-property-show
    md-object-show Describe a specific metadata definitions object inside
    md-object-update Update metadata definitions object inside a namespace.
    md-property-create Create a new metadata definitions property inside a
    md-property-delete Delete a specific metadata definitions property inside
    md-property-list List metadata definitions properties inside a specific
    md-property-show Describe a specific metadata definitions property
    md-property-update Update metadata definitions property inside a
    md-resource-type-associate
    md-resource-type-deassociate
    md-resource-type-list
    md-tag-create Add a new metadata definitions tag inside a namespace.
    md-tag-create-multiple
    md-tag-delete Delete a specific metadata definitions tag inside a
    md-tag-list List metadata definitions tags inside a specific
    md-tag-show Describe a specific metadata definitions tag inside a
    md-tag-update Rename a metadata definitions tag inside a namespace.

We could reduce the number by creating a 'metadef' command and moving these to sub-commands under that command.

Changed in python-glanceclient:
importance: Undecided → Wishlist
tags: added: 1.0.0-potential
Revision history for this message
Travis Tripp (travis-tripp) wrote :

I’d probably remove the md- prefix on them as well.

metadef namespace-create not metadef md-namespace-create.

That seems more friendly to me.

Actually aligns with openstack client a bit better as well. (although it would probably be metadef namespace create / metadef tag create / etc)

Changed in python-glanceclient:
assignee: nobody → Niall Bunting (niall-bunting)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-glanceclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/218864

Changed in python-glanceclient:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-glanceclient (master)

Change abandoned by Niall Bunting (<email address hidden>) on branch: master
Review: https://review.openstack.org/218864
Reason: -2 from core reviewer.

Revision history for this message
Flavio Percoco (flaper87) wrote :

Why should we treat metadef different that other commands?

Why having a subcommand for metadef and not for other things (say task)?

I think this change would make glanceclient's CLI inconsistent, therefore I'm inclined to -1 the proposal

(tagged as spec-lite)

tags: added: spec-lite
removed: 1.0.0-potential
Revision history for this message
Stuart McLaren (stuart-mclaren) wrote :

> Why should we treat metadef different that other commands?

The thinking here is that the md- commands are really only going to be used by a very small number of users.

The 99% of users who want to do something with images have to trawl through the 25 md-xxx commands to find the (smaller number) of image related commands they are most likely to be looking for. I don't think this can be considered user friendly.

> I think this change would make glanceclient's CLI inconsistent,

This is a fairly common pattern in UX. Eg firefox has the "back" button always visible, but if you want to do some of the less common actions you drill down into a sub menu. Does this make firefox inconsistent? Or more usable?

Revision history for this message
Niall Bunting (niall-bunting) wrote :
Download full text (3.3 KiB)

Glance IRC comments about this spec

http://eavesdrop.openstack.org/meetings/glance/2015/glance.2015-11-26-14.06.log.html

Related Abstracts:
14:44:14 <openstack> Launchpad bug 1489534 in python-glanceclient "Move metadef commands to sub-commands" [Wishlist,In progress] - Assigned to Niall Bunting (niall-bunting)
14:44:37 <bunting> Just bring this spec lite into the light for moving metadefs into a subset of commands
14:45:09 <nikhil_k> flaper87: anyone sourcing the master HEAD for CI/CD will have breaking changes in their repo (if that's something cared for) (imdone)
14:45:20 <Jokke_> question, I think I have raised before, why only metadefs?
14:45:50 <kragniz> Jokke_: because there's a lot of them
14:45:58 <mclaren> Jokke_: because there's so many md commands -- have you looked at the v2 help? They kind of spam everything else
14:46:28 <flaper87> my current feeling about that is that we should either do it for everything or not doing it.
14:46:30 <mclaren> AS Brian said, it makes glance look like a metadata service with some extra image related bits
14:46:43 <flaper87> if you look at `neutron --help` you'll get a huge list of commands
14:46:47 <mclaren> where really most folks think of it the other way around
14:46:57 <mclaren> flaper87: yes, but they're all networking related
14:47:03 <flaper87> mclaren: right
14:47:13 <kragniz> flaper87: I don't think we want to change general usage of the client
14:47:26 <kragniz> otherwise we might as well just tell people to use osc
14:47:28 <flaper87> kragniz: agreed but this change is a breaking change
14:47:37 <flaper87> I mean, we can proxy the old way to the new way
14:47:40 <mclaren> kragniz: it's backwards compatible
14:47:49 <Jokke_> I'm all up for subcommanding stuff, but I do agree that it would make sense to do it once for all then
14:47:51 <flaper87> but it'll require a major release to completely remove the old one
14:48:04 <mclaren> it's fully backwards compatible
14:48:09 <kragniz> flaper87: that's true, but md-* are far less likely to be used by some end user
14:48:19 <Jokke_> flaper87: that's the beauty of it, all the old ones works while they don't show up
14:49:01 <nikhil_k> so are doing some redirect or something?
14:49:14 <nikhil_k> won't the CLI change (backward incompat)?
14:49:17 <flaper87> I'm not opposed to it, I just shout my first thought
14:49:30 <Jokke_> nikhil_k: the old commands are staying there, just suppressed form help
14:49:50 <flaper87> and I guess we need to keep in mind to remove those on the next major
14:49:51 <Jokke_> making it super easy to transform
14:50:01 <Jokke_> flaper87: or not ;)
14:50:13 <flaper87> Jokke_: the old ones
14:50:18 <nikhil_k> ah, nice trick. So suppressed is fine w/o deprecation (clarification needed)?
14:50:21 <Jokke_> the current trend seems to be bloat all so we can just leave them there
14:50:31 <flaper87> mmh, I don't like having 2 ways of doing things
14:50:31 <nikhil_k> flaper87: ok
14:50:46 <nikhil_k> if we can do redirects , that would be ideal
14:50:53 <mclaren> we have two apis, I thought it was a requirement!
14:51:08 <nikhil_k> (or in bash semantics it would be alias)
14:51:33 <Jokke_> remember ... never remove anything
14:5...

Read more...

tags: added: triaged
Ian Cordasco (icordasc)
Changed in python-glanceclient:
status: In Progress → Opinion
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by Sean McGinnis (<email address hidden>) on branch: master
Review: https://review.opendev.org/218864
Reason: Very old patch at this point. Feel free to restore and update if you wish to continue with it.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.