Interface of "quota set" and "quota show" is missleading

Bug #1744349 reported by David Rabel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
New
Undecided
Unassigned

Bug Description

At the moment there is

quota set [--class] <project/class>

and

quota show [--class | --default] [<project/class>]

To reflect the API better, we should have

quota set [--class <class> | --default | <project>]

and

quota show [--class <class> | --default | <project>]

or even

quota set [--default | <project>]

and

quota show [--default | <project>]

because as far as I understood, quota classes are dropped except default class.

Yours
  David

Revision history for this message
David Rabel (rabel-b1) wrote :

This is really twisting my brain.

So for the quota set:
I want to add --default as a shortcut for --class default, so we can deprecate --class. The best intermediary step would be
quota set --class <class> | --default | <project>
This is also compatible with old syntax.
Since we also could use the project from the environment (as in quota show), it could be made optional:
quota set [--class <class> | --default | <project>]
So in the long term we would end up with
quota set --default | <project>
or
quota set [--default | <project>]

For the quota show:
This is more complicated, because nova and cinder API provide two ways to query default quotas while Neutron doesn't (since it has no quota classes at all).
To not break anything, something like this would be nice:
quota show [--class <class> | [--default] <project>]
Is that technically possible? In the long term we also want
quota show [--default] [<project>]

Anyways it will be confusing (less than now, but still confusing), because we don't want to query /os-quota-class-sets/default when using --default in quota show, but we put /os-quota-class-sets/default when using --default in quota set.

Still thinking about this. Please let me know what you think. I might just add a patch set to have somthing concrete to talk about.

Revision history for this message
David Rabel (rabel-b1) wrote :

OK, maybe we should just ignore this issue until we have a quotas-in-keystone implementation. :D

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.