Interface of "quota set" and "quota show" is missleading
Bug #1744349 reported by
David Rabel
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
To post a comment you must log in.
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.