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(-)

Reply via email to