This long series of (trivial for the most part) patches rework the CLI
options framework:
- we move (almost) all options to cli.py, since there are a lot of
duplicate option definitions; only a couple of very custom node and
instance options remain
- some options were changed for more uniformity
- we change the indentation style for options to make the command
definitions more readable
- we add DEBUG_OPT by default and remove it from each command
definition
Note about visible changes: some options went from --hypervisor to
--hypervisor-parameters, which is backwards compatible (optparse allows
shortening of option), so that all scripts offer the same options (this
was differing between scripts).
What would be good but didn't fit in this patch series:
- the daemons have their own option definition, since cli.py is too
heavy to import in daemon.py
- the help is the same for all uses of an option, even though this
lost some help text; however, we don't have a simple way to reuse
options but with changed help text
Overall, is still a cleanup (total lines of codes added < 0), but just
barely.
Iustin Pop (54):
Unify the â--disk-templateâ option
Unify the â--no-nicsâ option
Unify the â--file-storage-dirâ option
Unify the â--file-driverâ option
Unify the â--iallocatorâ option
Unify the â--os-typeâ option
Unify the â--backend-parametersâ option
Unify the â--hypervisorâ (params only) option
Unify the â--hypervisorâ (with name) option
Unify the last â--hypervisorâ (as list) option
Unify the â--no-ip-checkâ option
Unify the â--netâ option
Unify the â--diskâ (identkeyval) option
Unify the â--disksâ (disk indices) option
Unify the â--os-sizeâ option
Unify the â--ignore-consistencyâ option
Unify the â--non-liveâ option
Unify the â--nodeâ (as instance placement) option
Unify the â--nodeâ (as list of nodes) option
Unify the last â--nodeâ (single node) option
Move the â--no-startâ option to cli.py
Move the â--show-cmdâ option to cli.py
Move the â--cleanupâ option to cli.py
Move the â--staticâ option to cli.py
Move the â--allâ option to cli.py
More cookies for me option in cli.py
Move the â--select-osâ option to cli.py
Move the â--ignore-failuresâ option to cli.py
Unify the â--new-secondaryâ option
Move the â--on-primaryâ option to cli.py
Move the â--on-secondaryâ option to cli.py
Move the â--autoâ option to cli.py
Move the â--ignore-sizeâ option to cli.py
Move the â--src-â¦â options to cli.py
Unify the â--secondary-ipâ option
Move the â--readdâ option to cli.py
Move the â--no-ssh-key-checkâ option to cli.py
Move the node flags options to cli.py
Move the â--allocatableâ option to cli.py
Unify the â--no-lvm-storageâ option
Unify the â--enabled-hypervisorsâ option
Unify the â--nic-parametersâ option
Unify the â--candidate-pool-sizeâ option
Unify the â--vg-nameâ option
Move the â--yes-do-itâ option to cli.py
Move the â--no-votingâ option to cli.py
Move the â--mac-prefixâ option to cli.py
Move more cluster init opts to cli.py
Move cluster verify options to cli.py
Move the â--reboot-typeâ option to cli.py
Move the â--ignore-secondariesâ option to cli.py
Move the â--no-shutdownâ option to cli.py
Make ganeti-watcher use the standard debug option
Change indentation style in commands definitions
Remove explicit DEBUG_OPT and add it by default
daemons/ganeti-watcher | 4 +-
lib/cli.py | 337 +++++++++++++++++++++++++++++++++++++-
scripts/gnt-backup | 104 ++++---------
scripts/gnt-cluster | 252 ++++++++++-------------------
scripts/gnt-debug | 106 +++++-------
scripts/gnt-instance | 427 +++++++++++++++---------------------------------
scripts/gnt-job | 52 +++---
scripts/gnt-node | 192 +++++++++-------------
scripts/gnt-os | 8 +-
9 files changed, 733 insertions(+), 749 deletions(-)