X-Git-Url: https://code.grnet.gr/git/ganeti-local/blobdiff_plain/4abc4f1e35d180cfa97721fc8c39a05c561e6d58..91e0748c38b1b629961564362c90a29b218193b9:/lib/cli.py diff --git a/lib/cli.py b/lib/cli.py index 3841c9b..c81bf54 100644 --- a/lib/cli.py +++ b/lib/cli.py @@ -44,16 +44,30 @@ from optparse import (OptionParser, TitledHelpFormatter, __all__ = [ # Command line options + "BACKEND_OPT", "CONFIRM_OPT", "DEBUG_OPT", + "DEBUG_SIMERR_OPT", + "DISK_TEMPLATE_OPT", "FIELDS_OPT", + "FILESTORE_DIR_OPT", + "FILESTORE_DRIVER_OPT", + "HVLIST_OPT", + "HVOPTS_OPT", + "HYPERVISOR_OPT", + "IALLOCATOR_OPT", "FORCE_OPT", "NOHDR_OPT", + "NOIPCHECK_OPT", + "NONICS_OPT", + "NWSYNC_OPT", + "OS_OPT", "SEP_OPT", "SUBMIT_OPT", "SYNC_OPT", "TAG_SRC_OPT", "USEUNITS_OPT", + "VERBOSE_OPT", # Generic functions for CLI programs "GenericMain", "GetClient", @@ -459,6 +473,73 @@ _DRY_RUN_OPT = cli_option("--dry-run", default=False, " check steps and verify it it could be" " executed")) +VERBOSE_OPT = cli_option("-v", "--verbose", default=False, + action="store_true", + help="Increase the verbosity of the operation") + +DEBUG_SIMERR_OPT = cli_option("--debug-simulate-errors", default=False, + action="store_true", dest="simulate_errors", + help="Debugging option that makes the operation" + " treat most runtime checks as failed") + +NWSYNC_OPT = cli_option("--no-wait-for-sync", dest="wait_for_sync", + default=True, action="store_false", + help="Don't wait for sync (DANGEROUS!)") + +DISK_TEMPLATE_OPT = cli_option("-t", "--disk-template", dest="disk_template", + help="Custom disk setup (diskless, file," + " plain or drbd)", + default=None, metavar="TEMPL", + choices=list(constants.DISK_TEMPLATES)) + +NONICS_OPT = cli_option("--no-nics", default=False, action="store_true", + help="Do not create any network cards for" + " the instance") + +FILESTORE_DIR_OPT = cli_option("--file-storage-dir", dest="file_storage_dir", + help="Relative path under default cluster-wide" + " file storage dir to store file-based disks", + default=None, metavar="