Package ganeti :: Module cli_opts
[hide private]
[frames] | no frames]

Module cli_opts

source code

Module containing Ganeti's command line parsing options

Classes [hide private]
  CliOption
Custom option class for optparse.
  cli_option
Custom option class for optparse.
Functions [hide private]
 
check_unit(option, opt, value)
OptParsers custom converter for units.
source code
dict
_SplitKeyVal(opt, data, parse_prefixes)
Convert a KeyVal string into a dict.
source code
tuple
_SplitIdentKeyVal(opt, value, parse_prefixes)
Helper function to parse "ident:key=val,key=val" options.
source code
 
check_ident_key_val(option, opt, value)
Custom parser for ident:key=val,key=val options.
source code
 
check_key_val(option, opt, value)
Custom parser class for key=val,key=val options.
source code
 
check_key_private_val(option, opt, value)
Custom parser class for private and secret key=val,key=val options.
source code
 
_SplitListKeyVal(opt, value) source code
list of dictionary
check_multilist_ident_key_val(_, opt, value)
Custom parser for "ident:key=val,key=val/ident:key=val//ident:.." options.
source code
 
check_bool(option, opt, value)
Custom parser for yes/no options.
source code
 
check_list(option, opt, value)
Custom parser for comma-separated lists.
source code
 
check_maybefloat(option, opt, value)
Custom parser for float numbers which might be also defaults.
source code
 
check_json(option, opt, value)
Custom parser for JSON arguments.
source code
 
check_filteraction(option, opt, value)
Custom parser for filter rule actions.
source code
 
_PriorityOptionCb(option, _, value, parser)
Callback for processing --priority option.
source code
Variables [hide private]
  NO_PREFIX = "no_"
  UN_PREFIX = "-"
  _PRIORITY_NAMES = [("low", constants.OP_PRIO_LOW), ("normal", ...
Priorities (sorted)
  _PRIONAME_TO_VALUE = dict(_PRIORITY_NAMES)
Priority dictionary for easier lookup
  OPT_COMPL_ALL = compat.UniqueFrozenset([OPT_COMPL_MANY_NODES, ...
  _YORNO = "yes|no"
  DEBUG_OPT = cli_option("-d", "--debug", default= 0, action= "c...
  NOHDR_OPT = cli_option("--no-headers", default= False, action=...
  SEP_OPT = cli_option("--separator", default= None, action= "st...
  USEUNITS_OPT = cli_option("--units", default= None, dest= "uni...
  FIELDS_OPT = cli_option("-o", "--output", dest= "output", acti...
  FORCE_OPT = cli_option("-f", "--force", dest= "force", action=...
  CONFIRM_OPT = cli_option("--yes", dest= "confirm", action= "st...
  IGNORE_OFFLINE_OPT = cli_option("--ignore-offline", dest= "ign...
  IGNORE_SOFT_ERRORS_OPT = cli_option("--ignore-soft-errors", de...
  TAG_ADD_OPT = cli_option("--tags", dest= "tags", default= None...
  TAG_SRC_OPT = cli_option("--from", dest= "tags_source", defaul...
  SUBMIT_OPT = cli_option("--submit", dest= "submit_only", defau...
  PRINT_JOBID_OPT = cli_option("--print-jobid", dest= "print_job...
  SEQUENTIAL_OPT = cli_option("--sequential", dest= "sequential"...
  SYNC_OPT = cli_option("--sync", dest= "do_locking", default= F...
  DRY_RUN_OPT = cli_option("--dry-run", default= False, action= ...
  VERBOSE_OPT = cli_option("-v", "--verbose", default= False, ac...
  DEBUG_SIMERR_OPT = cli_option("--debug-simulate-errors", defau...
  NWSYNC_OPT = cli_option("--no-wait-for-sync", dest= "wait_for_...
  WFSYNC_OPT = cli_option("--wait-for-sync", dest= "wait_for_syn...
  ONLINE_INST_OPT = cli_option("--online", dest= "online_inst", ...
  OFFLINE_INST_OPT = cli_option("--offline", dest= "offline_inst...
  DISK_TEMPLATE_OPT = cli_option("-t", "--disk-template", dest= ...
  EXT_PARAMS_OPT = cli_option("-e", "--ext-params", dest= "ext_p...
  NONICS_OPT = cli_option("--no-nics", default= False, action= "...
  FILESTORE_DIR_OPT = cli_option("--file-storage-dir", dest= "fi...
  FILESTORE_DRIVER_OPT = cli_option("--file-driver", dest= "file...
  IALLOCATOR_OPT = cli_option("-I", "--iallocator", metavar= "<N...
  DEFAULT_IALLOCATOR_OPT = cli_option("-I", "--default-iallocato...
  DEFAULT_IALLOCATOR_PARAMS_OPT = cli_option("--default-iallocat...
  OS_OPT = cli_option("-o", "--os-type", dest= "os", help= "What...
  OSPARAMS_OPT = cli_option("-O", "--os-parameters", dest= "ospa...
  OSPARAMS_PRIVATE_OPT = cli_option("--os-parameters-private", d...
  OSPARAMS_SECRET_OPT = cli_option("--os-parameters-secret", des...
  FORCE_VARIANT_OPT = cli_option("--force-variant", dest= "force...
  NO_INSTALL_OPT = cli_option("--no-install", dest= "no_install"...
  NORUNTIME_CHGS_OPT = cli_option("--no-runtime-changes", dest= ...
  BACKEND_OPT = cli_option("-B", "--backend-parameters", dest= "...
  HVOPTS_OPT = cli_option("-H", "--hypervisor-parameters", type=...
  DISK_PARAMS_OPT = cli_option("-D", "--disk-parameters", dest= ...
  SPECS_MEM_SIZE_OPT = cli_option("--specs-mem-size", dest= "isp...
  SPECS_CPU_COUNT_OPT = cli_option("--specs-cpu-count", dest= "i...
  SPECS_DISK_COUNT_OPT = cli_option("--specs-disk-count", dest= ...
  SPECS_DISK_SIZE_OPT = cli_option("--specs-disk-size", dest= "i...
  SPECS_NIC_COUNT_OPT = cli_option("--specs-nic-count", dest= "i...
  IPOLICY_BOUNDS_SPECS_STR = "--ipolicy-bounds-specs"
  IPOLICY_BOUNDS_SPECS_OPT = cli_option(IPOLICY_BOUNDS_SPECS_STR...
  IPOLICY_STD_SPECS_STR = "--ipolicy-std-specs"
  IPOLICY_STD_SPECS_OPT = cli_option(IPOLICY_STD_SPECS_STR, dest...
  IPOLICY_DISK_TEMPLATES = cli_option("--ipolicy-disk-templates"...
  IPOLICY_VCPU_RATIO = cli_option("--ipolicy-vcpu-ratio", dest= ...
  IPOLICY_SPINDLE_RATIO = cli_option("--ipolicy-spindle-ratio", ...
  IPOLICY_MEMORY_RATIO = cli_option("--ipolicy-memory-ratio", de...
  HYPERVISOR_OPT = cli_option("-H", "--hypervisor-parameters", d...
  HVLIST_OPT = cli_option("-H", "--hypervisor-parameters", dest=...
  NOIPCHECK_OPT = cli_option("--no-ip-check", dest= "ip_check", ...
  NONAMECHECK_OPT = cli_option("--no-name-check", dest= "name_ch...
  NET_OPT = cli_option("--net", help= "NIC parameters", default=...
  DISK_OPT = cli_option("--disk", help= "Disk parameters", defau...
  DISKIDX_OPT = cli_option("--disks", dest= "disks", default= No...
  OS_SIZE_OPT = cli_option("-s", "--os-size", dest= "sd_size", h...
  IGNORE_CONSIST_OPT = cli_option("--ignore-consistency", dest= ...
  IGNORE_HVVERSIONS_OPT = cli_option("--ignore-hvversions", dest...
  ALLOW_FAILOVER_OPT = cli_option("--allow-failover", dest= "all...
  FORCE_FAILOVER_OPT = cli_option("--force-failover", dest= "for...
  NONLIVE_OPT = cli_option("--non-live", dest= "live", default= ...
  MIGRATION_MODE_OPT = cli_option("--migration-mode", dest= "mig...
  NODE_PLACEMENT_OPT = cli_option("-n", "--node", dest= "node", ...
  NODE_LIST_OPT = cli_option("-n", "--node", dest= "nodes", defa...
  NODEGROUP_OPT_NAME = "--node-group"
  NODEGROUP_OPT = cli_option("-g", NODEGROUP_OPT_NAME, dest= "no...
  SINGLE_NODE_OPT = cli_option("-n", "--node", dest= "node", hel...
  NOSTART_OPT = cli_option("--no-start", dest= "start", default=...
  FORTHCOMING_OPT = cli_option("--forthcoming", dest= "forthcomi...
  COMMIT_OPT = cli_option("--commit", dest= "commit", action= "s...
  SHOWCMD_OPT = cli_option("--show-cmd", dest= "show_command", a...
  CLEANUP_OPT = cli_option("--cleanup", dest= "cleanup", default...
  STATIC_OPT = cli_option("-s", "--static", dest= "static", acti...
  ALL_OPT = cli_option("--all", dest= "show_all", default= False...
  SELECT_OS_OPT = cli_option("--select-os", dest= "select_os", a...
  IGNORE_FAILURES_OPT = cli_option("--ignore-failures", dest= "i...
  IGNORE_REMOVE_FAILURES_OPT = cli_option("--ignore-remove-failu...
  REMOVE_INSTANCE_OPT = cli_option("--remove-instance", dest= "r...
  DST_NODE_OPT = cli_option("-n", "--target-node", dest= "dst_no...
  NEW_SECONDARY_OPT = cli_option("-n", "--new-secondary", dest= ...
  NEW_PRIMARY_OPT = cli_option("--new-primary", dest= "new_prima...
  ON_PRIMARY_OPT = cli_option("-p", "--on-primary", dest= "on_pr...
  ON_SECONDARY_OPT = cli_option("-s", "--on-secondary", dest= "o...
  AUTO_PROMOTE_OPT = cli_option("--auto-promote", dest= "auto_pr...
  AUTO_REPLACE_OPT = cli_option("-a", "--auto", dest= "auto", de...
  IGNORE_SIZE_OPT = cli_option("--ignore-size", dest= "ignore_si...
  SRC_NODE_OPT = cli_option("--src-node", dest= "src_node", help...
  SRC_DIR_OPT = cli_option("--src-dir", dest= "src_dir", help= "...
  SECONDARY_IP_OPT = cli_option("-s", "--secondary-ip", dest= "s...
  READD_OPT = cli_option("--readd", dest= "readd", default= Fals...
  NOSSH_KEYCHECK_OPT = cli_option("--no-ssh-key-check", dest= "s...
  NODE_FORCE_JOIN_OPT = cli_option("--force-join", dest= "force_...
  MC_OPT = cli_option("-C", "--master-candidate", dest= "master_...
  OFFLINE_OPT = cli_option("-O", "--offline", dest= "offline", m...
  DRAINED_OPT = cli_option("-D", "--drained", dest= "drained", m...
  CAPAB_MASTER_OPT = cli_option("--master-capable", dest= "maste...
  CAPAB_VM_OPT = cli_option("--vm-capable", dest= "vm_capable", ...
  ALLOCATABLE_OPT = cli_option("--allocatable", dest= "allocatab...
  ENABLED_HV_OPT = cli_option("--enabled-hypervisors", dest= "en...
  ENABLED_DISK_TEMPLATES_OPT = cli_option("--enabled-disk-templa...
  ENABLED_USER_SHUTDOWN_OPT = cli_option("--user-shutdown", defa...
  NIC_PARAMS_OPT = cli_option("-N", "--nic-parameters", dest= "n...
  CP_SIZE_OPT = cli_option("-C", "--candidate-pool-size", defaul...
  RQL_OPT = cli_option("--max-running-jobs", dest= "max_running_...
  MAX_TRACK_OPT = cli_option("--max-tracked-jobs", dest= "max_tr...
  COMPRESSION_TOOLS_OPT = cli_option("--compression-tools", dest...
  MAINT_INTERVAL_OPT = cli_option("--maintenance-interval", dest...
  MAINT_BALANCE_OPT = cli_option("--auto-balance-cluster", dest=...
  MAINT_BALANCE_THRESHOLD_OPT = cli_option("--auto-balance-thres...
  VG_NAME_OPT = cli_option("--vg-name", dest= "vg_name", help= (...
  YES_DOIT_OPT = cli_option("--yes-do-it", "--ya-rly", dest= "ye...
  NOVOTING_OPT = cli_option("--no-voting", dest= "no_voting", he...
  MAC_PREFIX_OPT = cli_option("-m", "--mac-prefix", dest= "mac_p...
  MASTER_NETDEV_OPT = cli_option("--master-netdev", dest= "maste...
  MASTER_NETMASK_OPT = cli_option("--master-netmask", dest= "mas...
  USE_EXTERNAL_MIP_SCRIPT = cli_option("--use-external-mip-scrip...
  GLOBAL_FILEDIR_OPT = cli_option("--file-storage-dir", dest= "f...
  GLOBAL_SHARED_FILEDIR_OPT = cli_option("--shared-file-storage-...
  GLOBAL_GLUSTER_FILEDIR_OPT = cli_option("--gluster-storage-dir...
  NOMODIFY_ETCHOSTS_OPT = cli_option("--no-etc-hosts", dest= "mo...
  MODIFY_ETCHOSTS_OPT = cli_option("--modify-etc-hosts", dest= "...
  NOMODIFY_SSH_SETUP_OPT = cli_option("--no-ssh-init", dest= "mo...
  ERROR_CODES_OPT = cli_option("--error-codes", dest= "error_cod...
  NONPLUS1_OPT = cli_option("--no-nplus1-mem", dest= "skip_nplus...
  REBOOT_TYPE_OPT = cli_option("-t", "--type", dest= "reboot_typ...
  IGNORE_SECONDARIES_OPT = cli_option("--ignore-secondaries", de...
  NOSHUTDOWN_OPT = cli_option("--noshutdown", dest= "shutdown", ...
  TIMEOUT_OPT = cli_option("--timeout", dest= "timeout", type= "...
  COMPRESS_OPT = cli_option("--compress", dest= "compress", type...
  TRANSPORT_COMPRESSION_OPT = cli_option("--transport-compressio...
  SHUTDOWN_TIMEOUT_OPT = cli_option("--shutdown-timeout", dest= ...
  INTERVAL_OPT = cli_option("--interval", dest= "interval", type...
  EARLY_RELEASE_OPT = cli_option("--early-release", dest= "early...
  NEW_CLUSTER_CERT_OPT = cli_option("--new-cluster-certificate",...
  NEW_NODE_CERT_OPT = cli_option("--new-node-certificates", dest...
  NEW_SSH_KEY_OPT = cli_option("--new-ssh-keys", dest= "new_ssh_...
  RAPI_CERT_OPT = cli_option("--rapi-certificate", dest= "rapi_c...
  NEW_RAPI_CERT_OPT = cli_option("--new-rapi-certificate", dest=...
  SPICE_CERT_OPT = cli_option("--spice-certificate", dest= "spic...
  SPICE_CACERT_OPT = cli_option("--spice-ca-certificate", dest= ...
  NEW_SPICE_CERT_OPT = cli_option("--new-spice-certificate", des...
  NEW_CONFD_HMAC_KEY_OPT = cli_option("--new-confd-hmac-key", de...
  CLUSTER_DOMAIN_SECRET_OPT = cli_option("--cluster-domain-secre...
  NEW_CLUSTER_DOMAIN_SECRET_OPT = cli_option("--new-cluster-doma...
  USE_REPL_NET_OPT = cli_option("--use-replication-network", des...
  MAINTAIN_NODE_HEALTH_OPT = cli_option("--maintain-node-health"...
  IDENTIFY_DEFAULTS_OPT = cli_option("--identify-defaults", dest...
  UIDPOOL_OPT = cli_option("--uid-pool", default= None, action= ...
  ADD_UIDS_OPT = cli_option("--add-uids", default= None, action=...
  REMOVE_UIDS_OPT = cli_option("--remove-uids", default= None, a...
  RESERVED_LVS_OPT = cli_option("--reserved-lvs", default= None,...
  ROMAN_OPT = cli_option("--roman", dest= "roman_integers", defa...
  DRBD_HELPER_OPT = cli_option("--drbd-usermode-helper", dest= "...
  PRIMARY_IP_VERSION_OPT = cli_option("--primary-ip-version", de...
  SHOW_MACHINE_OPT = cli_option("-M", "--show-machine-names", de...
  FAILURE_ONLY_OPT = cli_option("--failure-only", default= False...
  REASON_OPT = cli_option("--reason", default= [], help= "The re...
  PRIORITY_OPT = cli_option("--priority", default= None, dest= "...
  OPPORTUNISTIC_OPT = cli_option("--opportunistic-locking", dest...
  HID_OS_OPT = cli_option("--hidden", dest= "hidden", type= "boo...
  BLK_OS_OPT = cli_option("--blacklisted", dest= "blacklisted", ...
  PREALLOC_WIPE_DISKS_OPT = cli_option("--prealloc-wipe-disks", ...
  NODE_PARAMS_OPT = cli_option("--node-parameters", dest= "ndpar...
  ALLOC_POLICY_OPT = cli_option("--alloc-policy", dest= "alloc_p...
  NODE_POWERED_OPT = cli_option("--node-powered", default= None,...
  OOB_TIMEOUT_OPT = cli_option("--oob-timeout", dest= "oob_timeo...
  POWER_DELAY_OPT = cli_option("--power-delay", dest= "power_del...
  FORCE_FILTER_OPT = cli_option("-F", "--filter", dest= "force_f...
  NO_REMEMBER_OPT = cli_option("--no-remember", dest= "no_rememb...
  PRIMARY_ONLY_OPT = cli_option("-p", "--primary-only", default=...
  SECONDARY_ONLY_OPT = cli_option("-s", "--secondary-only", defa...
  STARTUP_PAUSED_OPT = cli_option("--paused", dest= "startup_pau...
  TO_GROUP_OPT = cli_option("--to", dest= "to", metavar= "<group...
  IGNORE_ERRORS_OPT = cli_option("-I", "--ignore-errors", defaul...
  DISK_STATE_OPT = cli_option("--disk-state", default= [], dest=...
  HV_STATE_OPT = cli_option("--hypervisor-state", default= [], d...
  IGNORE_IPOLICY_OPT = cli_option("--ignore-ipolicy", dest= "ign...
  RUNTIME_MEM_OPT = cli_option("-m", "--runtime-memory", dest= "...
  ABSOLUTE_OPT = cli_option("--absolute", dest= "absolute", acti...
  NETWORK_OPT = cli_option("--network", action= "store", default...
  GATEWAY_OPT = cli_option("--gateway", action= "store", default...
  ADD_RESERVED_IPS_OPT = cli_option("--add-reserved-ips", action...
  REMOVE_RESERVED_IPS_OPT = cli_option("--remove-reserved-ips", ...
  NETWORK6_OPT = cli_option("--network6", action= "store", defau...
  GATEWAY6_OPT = cli_option("--gateway6", action= "store", defau...
  NOCONFLICTSCHECK_OPT = cli_option("--no-conflicts-check", dest...
  INCLUDEDEFAULTS_OPT = cli_option("--include-defaults", dest= "...
  HOTPLUG_OPT = cli_option("--hotplug", dest= "hotplug", action=...
  HOTPLUG_IF_POSSIBLE_OPT = cli_option("--hotplug-if-possible", ...
  INSTALL_IMAGE_OPT = cli_option("--install-image", dest= "insta...
  INSTANCE_COMMUNICATION_OPT = cli_option("-c", "--communication...
  INSTANCE_COMMUNICATION_NETWORK_OPT = cli_option("--instance-co...
  ZEROING_IMAGE_OPT = cli_option("--zeroing-image", dest= "zeroi...
  ZERO_FREE_SPACE_OPT = cli_option("--zero-free-space", dest= "z...
  HELPER_STARTUP_TIMEOUT_OPT = cli_option("--helper-startup-time...
  HELPER_SHUTDOWN_TIMEOUT_OPT = cli_option("--helper-shutdown-ti...
  ZEROING_TIMEOUT_FIXED_OPT = cli_option("--zeroing-timeout-fixe...
  ZEROING_TIMEOUT_PER_MIB_OPT = cli_option("--zeroing-timeout-pe...
  ENABLED_DATA_COLLECTORS_OPT = cli_option("--enabled-data-colle...
  DIAGNOSE_DATA_COLLECTOR_FILENAME_OPT = cli_option("--diagnose-...
  VERIFY_CLUTTER_OPT = cli_option("--verify-ssh-clutter", defaul...
  LONG_SLEEP_OPT = cli_option("--long-sleep", default= False, de...
  INPUT_OPT = cli_option("--input", dest= "input", default= None...
  SSH_KEY_TYPE_OPT = cli_option("--ssh-key-type", default= None,...
  SSH_KEY_BITS_OPT = cli_option("--ssh-key-bits", default= None,...
  COMMON_OPTS = [DEBUG_OPT, REASON_OPT]
Options provided by all commands
  SUBMIT_OPTS = [SUBMIT_OPT, PRINT_JOBID_OPT,]
  COMMON_CREATE_OPTS = [BACKEND_OPT, DISK_OPT, DISK_TEMPLATE_OPT...
  INSTANCE_POLICY_OPTS = [IPOLICY_BOUNDS_SPECS_OPT, IPOLICY_DISK...
  SPLIT_ISPECS_OPTS = [SPECS_CPU_COUNT_OPT, SPECS_DISK_COUNT_OPT...

Imports: re, simplejson, utils, errors, constants, compat, pathutils, serializer, Option, OptionValueError


Function Details [hide private]

_SplitKeyVal(opt, data, parse_prefixes)

source code 

Convert a KeyVal string into a dict.

This function will convert a key=val[,...] string into a dict. Empty values will be converted specially: keys which have the prefix 'no_' will have the value=False and the prefix stripped, keys with the prefix "-" will have value=None and the prefix stripped, and the others will have value=True.

Parameters:
  • opt (string) - a string holding the option name for which we process the data, used in building error messages
  • data (string) - a string of the format key=val,key=val,...
  • parse_prefixes (bool) - whether to handle prefixes specially
Returns: dict
{key=val, key=val}
Raises:

_SplitIdentKeyVal(opt, value, parse_prefixes)

source code 

Helper function to parse "ident:key=val,key=val" options.

Parameters:
  • opt (string) - option name, used in error messages
  • value (string) - expected to be in the format "ident:key=val,key=val,..."
  • parse_prefixes (bool) - whether to handle prefixes specially (see _SplitKeyVal)
Returns: tuple
(ident, {key=val, key=val})
Raises:

check_ident_key_val(option, opt, value)

source code 

Custom parser for ident:key=val,key=val options.

This will store the parsed values as a tuple (ident, {key: val}). As such, multiple uses of this option via action=append is possible.

check_key_val(option, opt, value)

source code 

Custom parser class for key=val,key=val options.

This will store the parsed values as a dict {key: val}.

check_key_private_val(option, opt, value)

source code 

Custom parser class for private and secret key=val,key=val options.

This will store the parsed values as a dict {key: val}.

check_multilist_ident_key_val(_, opt, value)

source code 

Custom parser for "ident:key=val,key=val/ident:key=val//ident:.." options.

Returns: list of dictionary
[{ident: {key: val, key: val}, ident: {key: val}}, {ident:..}]

check_bool(option, opt, value)

source code 

Custom parser for yes/no options.

This will store the parsed value as either True or False.

check_json(option, opt, value)

source code 

Custom parser for JSON arguments.

Takes a string containing JSON, returns a Python object.

check_filteraction(option, opt, value)

source code 

Custom parser for filter rule actions.

Takes a string, returns an action as a Python object (list or string).

The string "RATE_LIMIT n" becomes `["RATE_LIMIT", n]`. All other strings stay as they are.


Variables Details [hide private]

_PRIORITY_NAMES

Priorities (sorted)

Value:
[("low", constants.OP_PRIO_LOW), ("normal", constants.OP_PRIO_NORMAL),\
 ("high", constants.OP_PRIO_HIGH),]

OPT_COMPL_ALL

Value:
compat.UniqueFrozenset([OPT_COMPL_MANY_NODES, OPT_COMPL_ONE_NODE, OPT_\
COMPL_ONE_INSTANCE, OPT_COMPL_ONE_OS, OPT_COMPL_ONE_EXTSTORAGE, OPT_CO\
MPL_ONE_FILTER, OPT_COMPL_ONE_IALLOCATOR, OPT_COMPL_ONE_NETWORK, OPT_C\
OMPL_INST_ADD_NODES, OPT_COMPL_ONE_NODEGROUP,])

DEBUG_OPT

Value:
cli_option("-d", "--debug", default= 0, action= "count", help= "Increa\
se debugging level")

NOHDR_OPT

Value:
cli_option("--no-headers", default= False, action= "store_true", dest=\
 "no_headers", help= "Don't display column headers")

SEP_OPT

Value:
cli_option("--separator", default= None, action= "store", dest= "separ\
ator", help= ("Separator between output fields" " (defaults to one spa\
ce)"))

USEUNITS_OPT

Value:
cli_option("--units", default= None, dest= "units", choices= ("h", "m"\
, "g", "t"), help= "Specify units for output (one of h/m/g/t)")

FIELDS_OPT

Value:
cli_option("-o", "--output", dest= "output", action= "store", type= "s\
tring", metavar= "FIELDS", help= "Comma separated list of output field\
s")

FORCE_OPT

Value:
cli_option("-f", "--force", dest= "force", action= "store_true", defau\
lt= False, help= "Force the operation")

CONFIRM_OPT

Value:
cli_option("--yes", dest= "confirm", action= "store_true", default= Fa\
lse, help= "Do not require confirmation")

IGNORE_OFFLINE_OPT

Value:
cli_option("--ignore-offline", dest= "ignore_offline", action= "store_\
true", default= False, help= ("Ignore offline nodes and do as much" " \
as possible"))

IGNORE_SOFT_ERRORS_OPT

Value:
cli_option("--ignore-soft-errors", dest= "ignore_soft_errors", action=\
 "store_true", default= False, help= ("Tell htools to ignore any soft"\
 " errors like N+1 violations"))

TAG_ADD_OPT

Value:
cli_option("--tags", dest= "tags", default= None, help= "Comma-separat\
ed list of instance" " tags")

TAG_SRC_OPT

Value:
cli_option("--from", dest= "tags_source", default= None, help= "File w\
ith tag names")

SUBMIT_OPT

Value:
cli_option("--submit", dest= "submit_only", default= False, action= "s\
tore_true", help= ("Submit the job and return the job ID, but" " don't\
 wait for the job to finish"))

PRINT_JOBID_OPT

Value:
cli_option("--print-jobid", dest= "print_jobid", default= False, actio\
n= "store_true", help= ("Additionally print the job as first line" " o\
n stdout (for scripting)."))

SEQUENTIAL_OPT

Value:
cli_option("--sequential", dest= "sequential", default= False, action=\
 "store_true", help= ("Execute all resulting jobs sequentially"))

SYNC_OPT

Value:
cli_option("--sync", dest= "do_locking", default= False, action= "stor\
e_true", help= ("Grab locks while doing the queries" " in order to ens\
ure more consistent results"))

DRY_RUN_OPT

Value:
cli_option("--dry-run", default= False, action= "store_true", help= ("\
Do not execute the operation, just run the" " check steps and verify i\
f it could be" " executed"))

VERBOSE_OPT

Value:
cli_option("-v", "--verbose", default= False, action= "store_true", he\
lp= "Increase the verbosity of the operation")

DEBUG_SIMERR_OPT

Value:
cli_option("--debug-simulate-errors", default= False, action= "store_t\
rue", dest= "simulate_errors", help= "Debugging option that makes the \
operation" " treat most runtime checks as failed")

NWSYNC_OPT

Value:
cli_option("--no-wait-for-sync", dest= "wait_for_sync", default= True,\
 action= "store_false", help= "Don't wait for sync (DANGEROUS!)")

WFSYNC_OPT

Value:
cli_option("--wait-for-sync", dest= "wait_for_sync", default= False, a\
ction= "store_true", help= "Wait for disks to sync")

ONLINE_INST_OPT

Value:
cli_option("--online", dest= "online_inst", action= "store_true", defa\
ult= False, help= "Enable offline instance")

OFFLINE_INST_OPT

Value:
cli_option("--offline", dest= "offline_inst", action= "store_true", de\
fault= False, help= "Disable down instance")

DISK_TEMPLATE_OPT

Value:
cli_option("-t", "--disk-template", dest= "disk_template", help= ("Cus\
tom disk setup (%s)" % utils.CommaJoin(constants.DISK_TEMPLATES)), def\
ault= None, metavar= "TEMPL", choices= list(constants.DISK_TEMPLATES))

EXT_PARAMS_OPT

Value:
cli_option("-e", "--ext-params", dest= "ext_params", default= {}, type\
= "keyval", help= "Parameters for ExtStorage template" " conversions i\
n the format:" " provider=prvdr[,param1=val1,param2=val2,...]")

NONICS_OPT

Value:
cli_option("--no-nics", default= False, action= "store_true", help= "D\
o not create any network cards for" " the instance")

FILESTORE_DIR_OPT

Value:
cli_option("--file-storage-dir", dest= "file_storage_dir", help= "Rela\
tive path under default cluster-wide" " file storage dir to store file\
-based disks", default= None, metavar= "<DIR>")

FILESTORE_DRIVER_OPT

Value:
cli_option("--file-driver", dest= "file_driver", help= "Driver to use \
for image files", default= None, metavar= "<DRIVER>", choices= list(co\
nstants.FILE_DRIVER))

IALLOCATOR_OPT

Value:
cli_option("-I", "--iallocator", metavar= "<NAME>", help= "Select node\
s for the instance automatically" " using the <NAME> iallocator plugin\
", default= None, type= "string", completion_suggest= OPT_COMPL_ONE_IA\
LLOCATOR)

DEFAULT_IALLOCATOR_OPT

Value:
cli_option("-I", "--default-iallocator", metavar= "<NAME>", help= "Set\
 the default instance" " allocator plugin", default= None, type= "stri\
ng", completion_suggest= OPT_COMPL_ONE_IALLOCATOR)

DEFAULT_IALLOCATOR_PARAMS_OPT

Value:
cli_option("--default-iallocator-params", dest= "default_iallocator_pa\
rams", help= "iallocator template" " parameters, in the format" " temp\
late:option=value," " option=value,...", type= "keyval", default= None\
)

OS_OPT

Value:
cli_option("-o", "--os-type", dest= "os", help= "What OS to run", meta\
var= "<os>", completion_suggest= OPT_COMPL_ONE_OS)

OSPARAMS_OPT

Value:
cli_option("-O", "--os-parameters", dest= "osparams", type= "keyval", \
default= {}, help= "OS parameters")

OSPARAMS_PRIVATE_OPT

Value:
cli_option("--os-parameters-private", dest= "osparams_private", type= \
"keyprivateval", default= serializer.PrivateDict(), help= "Private OS \
parameters" " (won't be logged)")

OSPARAMS_SECRET_OPT

Value:
cli_option("--os-parameters-secret", dest= "osparams_secret", type= "k\
eyprivateval", default= serializer.PrivateDict(), help= "Secret OS par\
ameters (won't be logged or" " saved; you must supply these for every"\
 " operation.)")

FORCE_VARIANT_OPT

Value:
cli_option("--force-variant", dest= "force_variant", action= "store_tr\
ue", default= False, help= "Force an unknown variant")

NO_INSTALL_OPT

Value:
cli_option("--no-install", dest= "no_install", action= "store_true", d\
efault= False, help= "Do not install the OS (will" " enable no-start)"\
)

NORUNTIME_CHGS_OPT

Value:
cli_option("--no-runtime-changes", dest= "allow_runtime_chgs", default\
= True, action= "store_false", help= "Don't allow runtime changes")

BACKEND_OPT

Value:
cli_option("-B", "--backend-parameters", dest= "beparams", type= "keyv\
al", default= {}, help= "Backend parameters")

HVOPTS_OPT

Value:
cli_option("-H", "--hypervisor-parameters", type= "keyval", default= {\
}, dest= "hvparams", help= "Hypervisor parameters")

DISK_PARAMS_OPT

Value:
cli_option("-D", "--disk-parameters", dest= "diskparams", help= "Disk \
template parameters, in the format" " template:option=value,option=val\
ue,...", type= "identkeyval", action= "append", default= [])

SPECS_MEM_SIZE_OPT

Value:
cli_option("--specs-mem-size", dest= "ispecs_mem_size", type= "keyval"\
, default= {}, help= "Memory size specs: list of key=value," " where k\
ey is one of min, max, std" " (in MB or using a unit)")

SPECS_CPU_COUNT_OPT

Value:
cli_option("--specs-cpu-count", dest= "ispecs_cpu_count", type= "keyva\
l", default= {}, help= "CPU count specs: list of key=value," " where k\
ey is one of min, max, std")

SPECS_DISK_COUNT_OPT

Value:
cli_option("--specs-disk-count", dest= "ispecs_disk_count", type= "key\
val", default= {}, help= "Disk count specs: list of key=value," " wher\
e key is one of min, max, std")

SPECS_DISK_SIZE_OPT

Value:
cli_option("--specs-disk-size", dest= "ispecs_disk_size", type= "keyva\
l", default= {}, help= "Disk size specs: list of key=value," " where k\
ey is one of min, max, std" " (in MB or using a unit)")

SPECS_NIC_COUNT_OPT

Value:
cli_option("--specs-nic-count", dest= "ispecs_nic_count", type= "keyva\
l", default= {}, help= "NIC count specs: list of key=value," " where k\
ey is one of min, max, std")

IPOLICY_BOUNDS_SPECS_OPT

Value:
cli_option(IPOLICY_BOUNDS_SPECS_STR, dest= "ipolicy_bounds_specs", typ\
e= "multilistidentkeyval", default= None, help= "Complete instance spe\
cs limits")

IPOLICY_STD_SPECS_OPT

Value:
cli_option(IPOLICY_STD_SPECS_STR, dest= "ipolicy_std_specs", type= "ke\
yval", default= None, help= "Complete standard instance specs")

IPOLICY_DISK_TEMPLATES

Value:
cli_option("--ipolicy-disk-templates", dest= "ipolicy_disk_templates",\
 type= "list", default= None, help= "Comma-separated list of" " enable\
d disk templates")

IPOLICY_VCPU_RATIO

Value:
cli_option("--ipolicy-vcpu-ratio", dest= "ipolicy_vcpu_ratio", type= "\
maybefloat", default= None, help= "The maximum allowed vcpu-to-cpu rat\
io")

IPOLICY_SPINDLE_RATIO

Value:
cli_option("--ipolicy-spindle-ratio", dest= "ipolicy_spindle_ratio", t\
ype= "maybefloat", default= None, help= ("The maximum allowed instance\
s to" " spindle ratio"))

IPOLICY_MEMORY_RATIO

Value:
cli_option("--ipolicy-memory-ratio", dest= "ipolicy_memory_ratio", typ\
e= "maybefloat", default= None, help= ("The maximum allowed used memor\
y to" " physicall memory ratio (in terms of" " memory overcommitment)"\
))

HYPERVISOR_OPT

Value:
cli_option("-H", "--hypervisor-parameters", dest= "hypervisor", help= \
"Hypervisor and hypervisor options, in the" " format hypervisor:option\
=value,option=value,...", default= None, type= "identkeyval")

HVLIST_OPT

Value:
cli_option("-H", "--hypervisor-parameters", dest= "hvparams", help= "H\
ypervisor and hypervisor options, in the" " format hypervisor:option=v\
alue,option=value,...", default= [], action= "append", type= "identkey\
val")

NOIPCHECK_OPT

Value:
cli_option("--no-ip-check", dest= "ip_check", default= True, action= "\
store_false", help= "Don't check that the instance's IP" " is alive")

NONAMECHECK_OPT

Value:
cli_option("--no-name-check", dest= "name_check", default= True, actio\
n= "store_false", help= "Don't check that the instance's name" " is re\
solvable")

NET_OPT

Value:
cli_option("--net", help= "NIC parameters", default= [], dest= "nics",\
 action= "append", type= "identkeyval")

DISK_OPT

Value:
cli_option("--disk", help= "Disk parameters", default= [], dest= "disk\
s", action= "append", type= "identkeyval")

DISKIDX_OPT

Value:
cli_option("--disks", dest= "disks", default= None, help= "Comma-separ\
ated list of disks" " indices to act on (e.g. 0,2) (optional," " defau\
lts to all disks)")

OS_SIZE_OPT

Value:
cli_option("-s", "--os-size", dest= "sd_size", help= "Enforces a singl\
e-disk configuration using the" " given disk size, in MiB unless a suf\
fix is used", default= None, type= "unit", metavar= "<size>")

IGNORE_CONSIST_OPT

Value:
cli_option("--ignore-consistency", dest= "ignore_consistency", action=\
 "store_true", default= False, help= "Ignore the consistency of the di\
sks on" " the secondary")

IGNORE_HVVERSIONS_OPT

Value:
cli_option("--ignore-hvversions", dest= "ignore_hvversions", action= "\
store_true", default= False, help= "Ignore imcompatible hypervisor" " \
versions between source and target")

ALLOW_FAILOVER_OPT

Value:
cli_option("--allow-failover", dest= "allow_failover", action= "store_\
true", default= False, help= "If migration is not possible fallback to\
" " failover")

FORCE_FAILOVER_OPT

Value:
cli_option("--force-failover", dest= "force_failover", action= "store_\
true", default= False, help= "Do not use migration, always use" " fail\
over")

NONLIVE_OPT

Value:
cli_option("--non-live", dest= "live", default= True, action= "store_f\
alse", help= "Do a non-live migration (this usually means" " freeze th\
e instance, save the state, transfer and" " only then resume running o\
n the secondary node)")

MIGRATION_MODE_OPT

Value:
cli_option("--migration-mode", dest= "migration_mode", default= None, \
choices= list(constants.HT_MIGRATION_MODES), help= "Override default m\
igration mode (choose" " either live or non-live")

NODE_PLACEMENT_OPT

Value:
cli_option("-n", "--node", dest= "node", help= "Target node and option\
al secondary node", metavar= "<pnode>[:<snode>]", completion_suggest= \
OPT_COMPL_INST_ADD_NODES)

NODE_LIST_OPT

Value:
cli_option("-n", "--node", dest= "nodes", default= [], action= "append\
", metavar= "<node>", help= "Use only this node (can be used multiple"\
 " times, if not given defaults to all nodes)", completion_suggest= OP\
T_COMPL_ONE_NODE)

NODEGROUP_OPT

Value:
cli_option("-g", NODEGROUP_OPT_NAME, dest= "nodegroup", help= "Node gr\
oup (name or uuid)", metavar= "<nodegroup>", default= None, type= "str\
ing", completion_suggest= OPT_COMPL_ONE_NODEGROUP)

SINGLE_NODE_OPT

Value:
cli_option("-n", "--node", dest= "node", help= "Target node", metavar=\
 "<node>", completion_suggest= OPT_COMPL_ONE_NODE)

NOSTART_OPT

Value:
cli_option("--no-start", dest= "start", default= True, action= "store_\
false", help= "Don't start the instance after creation")

FORTHCOMING_OPT

Value:
cli_option("--forthcoming", dest= "forthcoming", action= "store_true",\
 default= False, help= "Only reserve resources, but do not" " create t\
he instance yet")

COMMIT_OPT

Value:
cli_option("--commit", dest= "commit", action= "store_true", default= \
False, help= "The instance is already reserved and should" " be commit\
ted now")

SHOWCMD_OPT

Value:
cli_option("--show-cmd", dest= "show_command", action= "store_true", d\
efault= False, help= "Show command instead of executing it")

CLEANUP_OPT

Value:
cli_option("--cleanup", dest= "cleanup", default= False, action= "stor\
e_true", help= "Instead of performing the migration/failover," " try t\
o recover from a failed cleanup. This is safe" " to run even if the in\
stance is healthy, but it" " will create extra replication traffic and\
 " " disrupt briefly the replication (like during the" " migration/fai\
lover")

STATIC_OPT

Value:
cli_option("-s", "--static", dest= "static", action= "store_true", def\
ault= False, help= "Only show configuration data, not runtime data")

ALL_OPT

Value:
cli_option("--all", dest= "show_all", default= False, action= "store_t\
rue", help= "Show info on all instances on the cluster." " This can ta\
ke a long time to run, use wisely")

SELECT_OS_OPT

Value:
cli_option("--select-os", dest= "select_os", action= "store_true", def\
ault= False, help= "Interactive OS reinstall, lists available" " OS te\
mplates for selection")

IGNORE_FAILURES_OPT

Value:
cli_option("--ignore-failures", dest= "ignore_failures", action= "stor\
e_true", default= False, help= "Remove the instance from the cluster" \
" configuration even if there are failures" " during the removal proce\
ss")

IGNORE_REMOVE_FAILURES_OPT

Value:
cli_option("--ignore-remove-failures", dest= "ignore_remove_failures",\
 action= "store_true", default= False, help= "Remove the instance from\
 the" " cluster configuration even if there" " are failures during the\
 removal" " process")

REMOVE_INSTANCE_OPT

Value:
cli_option("--remove-instance", dest= "remove_instance", action= "stor\
e_true", default= False, help= "Remove the instance from the cluster")

DST_NODE_OPT

Value:
cli_option("-n", "--target-node", dest= "dst_node", help= "Specifies t\
he new node for the instance", metavar= "NODE", default= None, complet\
ion_suggest= OPT_COMPL_ONE_NODE)

NEW_SECONDARY_OPT

Value:
cli_option("-n", "--new-secondary", dest= "dst_node", help= "Specifies\
 the new secondary node", metavar= "NODE", default= None, completion_s\
uggest= OPT_COMPL_ONE_NODE)

NEW_PRIMARY_OPT

Value:
cli_option("--new-primary", dest= "new_primary_node", help= "Specifies\
 the new primary node", metavar= "<node>", default= None, completion_s\
uggest= OPT_COMPL_ONE_NODE)

ON_PRIMARY_OPT

Value:
cli_option("-p", "--on-primary", dest= "on_primary", default= False, a\
ction= "store_true", help= "Replace the disk(s) on the primary" " node\
 (applies only to internally mirrored" " disk templates, e.g. %s)" % u\
tils.CommaJoin(constants.DTS_INT_MIRROR))

ON_SECONDARY_OPT

Value:
cli_option("-s", "--on-secondary", dest= "on_secondary", default= Fals\
e, action= "store_true", help= "Replace the disk(s) on the secondary" \
" node (applies only to internally mirrored" " disk templates, e.g. %s\
)" % utils.CommaJoin(constants.DTS_INT_MIRROR))

AUTO_PROMOTE_OPT

Value:
cli_option("--auto-promote", dest= "auto_promote", default= False, act\
ion= "store_true", help= "Lock all nodes and auto-promote as needed" "\
 to MC status")

AUTO_REPLACE_OPT

Value:
cli_option("-a", "--auto", dest= "auto", default= False, action= "stor\
e_true", help= "Automatically replace faulty disks" " (applies only to\
 internally mirrored" " disk templates, e.g. %s)" % utils.CommaJoin(co\
nstants.DTS_INT_MIRROR))

IGNORE_SIZE_OPT

Value:
cli_option("--ignore-size", dest= "ignore_size", default= False, actio\
n= "store_true", help= "Ignore current recorded size" " (useful for fo\
rcing activation when" " the recorded size is wrong)")

SRC_NODE_OPT

Value:
cli_option("--src-node", dest= "src_node", help= "Source node", metava\
r= "<node>", completion_suggest= OPT_COMPL_ONE_NODE)

SRC_DIR_OPT

Value:
cli_option("--src-dir", dest= "src_dir", help= "Source directory", met\
avar= "<dir>")

SECONDARY_IP_OPT

Value:
cli_option("-s", "--secondary-ip", dest= "secondary_ip", help= "Specif\
y the secondary ip for the node", metavar= "ADDRESS", default= None)

READD_OPT

Value:
cli_option("--readd", dest= "readd", default= False, action= "store_tr\
ue", help= "Readd old node after replacing it")

NOSSH_KEYCHECK_OPT

Value:
cli_option("--no-ssh-key-check", dest= "ssh_key_check", default= True,\
 action= "store_false", help= "Disable SSH key fingerprint checking")

NODE_FORCE_JOIN_OPT

Value:
cli_option("--force-join", dest= "force_join", default= False, action=\
 "store_true", help= "Force the joining of a node")

MC_OPT

Value:
cli_option("-C", "--master-candidate", dest= "master_candidate", type=\
 "bool", default= None, metavar= _YORNO, help= "Set the master_candida\
te flag on the node")

OFFLINE_OPT

Value:
cli_option("-O", "--offline", dest= "offline", metavar= _YORNO, type= \
"bool", default= None, help= ("Set the offline flag on the node" " (cl\
uster does not communicate with offline" " nodes)"))

DRAINED_OPT

Value:
cli_option("-D", "--drained", dest= "drained", metavar= _YORNO, type= \
"bool", default= None, help= ("Set the drained flag on the node" " (ex\
cluded from allocation operations)"))

CAPAB_MASTER_OPT

Value:
cli_option("--master-capable", dest= "master_capable", type= "bool", d\
efault= None, metavar= _YORNO, help= "Set the master_capable flag on t\
he node")

CAPAB_VM_OPT

Value:
cli_option("--vm-capable", dest= "vm_capable", type= "bool", default= \
None, metavar= _YORNO, help= "Set the vm_capable flag on the node")

ALLOCATABLE_OPT

Value:
cli_option("--allocatable", dest= "allocatable", type= "bool", default\
= None, metavar= _YORNO, help= "Set the allocatable flag on a volume")

ENABLED_HV_OPT

Value:
cli_option("--enabled-hypervisors", dest= "enabled_hypervisors", help=\
 "Comma-separated list of hypervisors", type= "string", default= None)

ENABLED_DISK_TEMPLATES_OPT

Value:
cli_option("--enabled-disk-templates", dest= "enabled_disk_templates",\
 help= "Comma-separated list of " "disk templates", type= "string", de\
fault= None)

ENABLED_USER_SHUTDOWN_OPT

Value:
cli_option("--user-shutdown", default= None, dest= "enabled_user_shutd\
own", help= "Whether user shutdown is enabled", type= "bool")

NIC_PARAMS_OPT

Value:
cli_option("-N", "--nic-parameters", dest= "nicparams", type= "keyval"\
, default= {}, help= "NIC parameters")

CP_SIZE_OPT

Value:
cli_option("-C", "--candidate-pool-size", default= None, dest= "candid\
ate_pool_size", type= "int", help= "Set the candidate pool size")

RQL_OPT

Value:
cli_option("--max-running-jobs", dest= "max_running_jobs", type= "int"\
, help= "Set the maximal number of jobs to " "run simultaneously")

MAX_TRACK_OPT

Value:
cli_option("--max-tracked-jobs", dest= "max_tracked_jobs", type= "int"\
, help= "Set the maximal number of jobs to " "be tracked simultaneousl\
y for " "scheduling")

COMPRESSION_TOOLS_OPT

Value:
cli_option("--compression-tools", dest= "compression_tools", type= "st\
ring", default= None, help= "Comma-separated list of compression tools\
 which are" " allowed to be used by Ganeti in various operations")

MAINT_INTERVAL_OPT

Value:
cli_option("--maintenance-interval", dest= "maint_round_delay", type= \
"int", default= None, help= "Minimal time in seconds, the maintenance"\
 " daemon waits between rounds")

MAINT_BALANCE_OPT

Value:
cli_option("--auto-balance-cluster", dest= "maint_balance", type= "boo\
l", default= None, metavar= _YORNO, help= "Whether the maintenance" " \
daemon should balance the cluster")

MAINT_BALANCE_THRESHOLD_OPT

Value:
cli_option("--auto-balance-threshold", dest= "maint_balance_threshold"\
, type= "float", default= None, metavar= "CLUSTERSCORE", help= "Minima\
l gain for an auto-balancing step to be taken")

VG_NAME_OPT

Value:
cli_option("--vg-name", dest= "vg_name", help= ("Enables LVM and speci\
fies the volume group" " name (cluster-wide) for disk allocation" " [%\
s]" % constants.DEFAULT_VG), metavar= "VG", default= None)

YES_DOIT_OPT

Value:
cli_option("--yes-do-it", "--ya-rly", dest= "yes_do_it", help= "Destro\
y cluster", action= "store_true")

NOVOTING_OPT

Value:
cli_option("--no-voting", dest= "no_voting", help= "Skip node agreemen\
t check (dangerous)", action= "store_true", default= False)

MAC_PREFIX_OPT

Value:
cli_option("-m", "--mac-prefix", dest= "mac_prefix", help= "Specify th\
e mac prefix for the instance IP" " addresses, in the format XX:XX:XX"\
, metavar= "PREFIX", default= None)

MASTER_NETDEV_OPT

Value:
cli_option("--master-netdev", dest= "master_netdev", help= "Specify th\
e node interface (cluster-wide)" " on which the master IP address will\
 be added" " (cluster init default: %s)" % constants.DEFAULT_BRIDGE, m\
etavar= "NETDEV", default= None)

MASTER_NETMASK_OPT

Value:
cli_option("--master-netmask", dest= "master_netmask", help= "Specify \
the netmask of the master IP", metavar= "NETMASK", default= None)

USE_EXTERNAL_MIP_SCRIPT

Value:
cli_option("--use-external-mip-script", dest= "use_external_mip_script\
", help= "Specify whether to run a" " user-provided script for the mas\
ter" " IP address turnup and" " turndown operations", type= "bool", me\
tavar= _YORNO, default= None)

GLOBAL_FILEDIR_OPT

Value:
cli_option("--file-storage-dir", dest= "file_storage_dir", help= "Spec\
ify the default directory (cluster-" "wide) for storing the file-based\
 disks [%s]" % pathutils.DEFAULT_FILE_STORAGE_DIR, metavar= "DIR", def\
ault= None)

GLOBAL_SHARED_FILEDIR_OPT

Value:
cli_option("--shared-file-storage-dir", dest= "shared_file_storage_dir\
", help= "Specify the default directory (cluster-wide) for storing the\
" " shared file-based disks [%s]" % pathutils.DEFAULT_SHARED_FILE_STOR\
AGE_DIR, metavar= "SHAREDDIR", default= None)

GLOBAL_GLUSTER_FILEDIR_OPT

Value:
cli_option("--gluster-storage-dir", dest= "gluster_storage_dir", help=\
 "Specify the default directory (cluster-wide) for mounting Gluster" "\
 file systems [%s]" % pathutils.DEFAULT_GLUSTER_STORAGE_DIR, metavar= \
"GLUSTERDIR", default= None)

NOMODIFY_ETCHOSTS_OPT

Value:
cli_option("--no-etc-hosts", dest= "modify_etc_hosts", help= "Don't mo\
dify %s" % pathutils.ETC_HOSTS, action= "store_false", default= True)

MODIFY_ETCHOSTS_OPT

Value:
cli_option("--modify-etc-hosts", dest= "modify_etc_hosts", metavar= _Y\
ORNO, default= None, type= "bool", help= "Defines whether the cluster \
should autonomously modify" " and keep in sync the /etc/hosts file of \
the nodes")

NOMODIFY_SSH_SETUP_OPT

Value:
cli_option("--no-ssh-init", dest= "modify_ssh_setup", help= "Don't ini\
tialize SSH keys", action= "store_false", default= True)

ERROR_CODES_OPT

Value:
cli_option("--error-codes", dest= "error_codes", help= "Enable parseab\
le error messages", action= "store_true", default= False)

NONPLUS1_OPT

Value:
cli_option("--no-nplus1-mem", dest= "skip_nplusone_mem", help= "Skip N\
+1 memory redundancy tests", action= "store_true", default= False)

REBOOT_TYPE_OPT

Value:
cli_option("-t", "--type", dest= "reboot_type", help= "Type of reboot:\
 soft/hard/full", default= constants.INSTANCE_REBOOT_HARD, metavar= "<\
REBOOT>", choices= list(constants.REBOOT_TYPES))

IGNORE_SECONDARIES_OPT

Value:
cli_option("--ignore-secondaries", dest= "ignore_secondaries", default\
= False, action= "store_true", help= "Ignore errors from secondaries")

NOSHUTDOWN_OPT

Value:
cli_option("--noshutdown", dest= "shutdown", action= "store_false", de\
fault= True, help= "Don't shutdown the instance (unsafe)")

TIMEOUT_OPT

Value:
cli_option("--timeout", dest= "timeout", type= "int", default= constan\
ts.DEFAULT_SHUTDOWN_TIMEOUT, help= "Maximum time to wait")

COMPRESS_OPT

Value:
cli_option("--compress", dest= "compress", type= "string", default= co\
nstants.IEC_NONE, help= "The compression mode to use")

TRANSPORT_COMPRESSION_OPT

Value:
cli_option("--transport-compression", dest= "transport_compression", t\
ype= "string", default= constants.IEC_NONE, help= "The compression mod\
e to use during transport")

SHUTDOWN_TIMEOUT_OPT

Value:
cli_option("--shutdown-timeout", dest= "shutdown_timeout", type= "int"\
, default= constants.DEFAULT_SHUTDOWN_TIMEOUT, help= "Maximum time to \
wait for instance" " shutdown")

INTERVAL_OPT

Value:
cli_option("--interval", dest= "interval", type= "int", default= None,\
 help= ("Number of seconds between repetions of the" " command"))

EARLY_RELEASE_OPT

Value:
cli_option("--early-release", dest= "early_release", default= False, a\
ction= "store_true", help= "Release the locks on the secondary" " node\
(s) early")

NEW_CLUSTER_CERT_OPT

Value:
cli_option("--new-cluster-certificate", dest= "new_cluster_cert", defa\
ult= False, action= "store_true", help= "Generate a new cluster certif\
icate")

NEW_NODE_CERT_OPT

Value:
cli_option("--new-node-certificates", dest= "new_node_cert", default= \
False, action= "store_true", help= "Generate new node certificates (fo\
r all nodes)")

NEW_SSH_KEY_OPT

Value:
cli_option("--new-ssh-keys", dest= "new_ssh_keys", default= False, act\
ion= "store_true", help= "Generate new node SSH keys (for all nodes)")

RAPI_CERT_OPT

Value:
cli_option("--rapi-certificate", dest= "rapi_cert", default= None, hel\
p= "File containing new RAPI certificate")

NEW_RAPI_CERT_OPT

Value:
cli_option("--new-rapi-certificate", dest= "new_rapi_cert", default= N\
one, action= "store_true", help= ("Generate a new self-signed RAPI" " \
certificate"))

SPICE_CERT_OPT

Value:
cli_option("--spice-certificate", dest= "spice_cert", default= None, h\
elp= "File containing new SPICE certificate")

SPICE_CACERT_OPT

Value:
cli_option("--spice-ca-certificate", dest= "spice_cacert", default= No\
ne, help= "File containing the certificate of the CA" " which signed t\
he SPICE certificate")

NEW_SPICE_CERT_OPT

Value:
cli_option("--new-spice-certificate", dest= "new_spice_cert", default=\
 None, action= "store_true", help= ("Generate a new self-signed SPICE"\
 " certificate"))

NEW_CONFD_HMAC_KEY_OPT

Value:
cli_option("--new-confd-hmac-key", dest= "new_confd_hmac_key", default\
= False, action= "store_true", help= ("Create a new HMAC key for %s" %\
 constants.CONFD))

CLUSTER_DOMAIN_SECRET_OPT

Value:
cli_option("--cluster-domain-secret", dest= "cluster_domain_secret", d\
efault= None, help= ("Load new new cluster domain" " secret from file"\
))

NEW_CLUSTER_DOMAIN_SECRET_OPT

Value:
cli_option("--new-cluster-domain-secret", dest= "new_cluster_domain_se\
cret", default= False, action= "store_true", help= ("Create a new clus\
ter domain" " secret"))

USE_REPL_NET_OPT

Value:
cli_option("--use-replication-network", dest= "use_replication_network\
", help= "Whether to use the replication network" " for talking to the\
 nodes", action= "store_true", default= False)

MAINTAIN_NODE_HEALTH_OPT

Value:
cli_option("--maintain-node-health", dest= "maintain_node_health", met\
avar= _YORNO, default= None, type= "bool", help= "Configure the cluste\
r to automatically maintain node" " health, by shutting down unknown i\
nstances, shutting down" " unknown DRBD devices, etc.")

IDENTIFY_DEFAULTS_OPT

Value:
cli_option("--identify-defaults", dest= "identify_defaults", default= \
False, action= "store_true", help= "Identify which saved instance para\
meters are equal to" " the current cluster defaults and set them as su\
ch, instead" " of marking them as overridden")

UIDPOOL_OPT

Value:
cli_option("--uid-pool", default= None, action= "store", dest= "uid_po\
ol", help= ("A list of user-ids or user-id" " ranges separated by comm\
as"))

ADD_UIDS_OPT

Value:
cli_option("--add-uids", default= None, action= "store", dest= "add_ui\
ds", help= ("A list of user-ids or user-id" " ranges separated by comm\
as, to be" " added to the user-id pool"))

REMOVE_UIDS_OPT

Value:
cli_option("--remove-uids", default= None, action= "store", dest= "rem\
ove_uids", help= ("A list of user-ids or user-id" " ranges separated b\
y commas, to be" " removed from the user-id pool"))

RESERVED_LVS_OPT

Value:
cli_option("--reserved-lvs", default= None, action= "store", dest= "re\
served_lvs", help= ("A comma-separated list of reserved" " logical vol\
umes names, that will be" " ignored by cluster verify"))

ROMAN_OPT

Value:
cli_option("--roman", dest= "roman_integers", default= False, action= \
"store_true", help= "Use roman numbers for positive integers")

DRBD_HELPER_OPT

Value:
cli_option("--drbd-usermode-helper", dest= "drbd_helper", action= "sto\
re", default= None, help= "Specifies usermode helper for DRBD")

PRIMARY_IP_VERSION_OPT

Value:
cli_option("--primary-ip-version", default= constants.IP4_VERSION, act\
ion= "store", dest= "primary_ip_version", metavar= "%d|%d" %(constants\
.IP4_VERSION, constants.IP6_VERSION), help= "Cluster-wide IP version f\
or primary IP")

SHOW_MACHINE_OPT

Value:
cli_option("-M", "--show-machine-names", default= False, action= "stor\
e_true", help= "Show machine name for every line in output")

FAILURE_ONLY_OPT

Value:
cli_option("--failure-only", default= False, action= "store_true", hel\
p= ("Hide successful results and show failures" " only (determined by \
the exit code)"))

REASON_OPT

Value:
cli_option("--reason", default= [], help= "The reason for executing th\
e command")

PRIORITY_OPT

Value:
cli_option("--priority", default= None, dest= "priority", metavar= "|"\
.join(name for name, _ in _PRIORITY_NAMES), choices= _PRIONAME_TO_VALU\
E.keys(), action= "callback", type= "choice", callback= _PriorityOptio\
nCb, help= "Priority for opcode processing")

OPPORTUNISTIC_OPT

Value:
cli_option("--opportunistic-locking", dest= "opportunistic_locking", a\
ction= "store_true", default= False, help= "Opportunistically acquire \
locks")

HID_OS_OPT

Value:
cli_option("--hidden", dest= "hidden", type= "bool", default= None, me\
tavar= _YORNO, help= "Sets the hidden flag on the OS")

BLK_OS_OPT

Value:
cli_option("--blacklisted", dest= "blacklisted", type= "bool", default\
= None, metavar= _YORNO, help= "Sets the blacklisted flag on the OS")

PREALLOC_WIPE_DISKS_OPT

Value:
cli_option("--prealloc-wipe-disks", default= None, type= "bool", metav\
ar= _YORNO, dest= "prealloc_wipe_disks", help= ("Wipe disks prior to i\
nstance" " creation"))

NODE_PARAMS_OPT

Value:
cli_option("--node-parameters", dest= "ndparams", type= "keyval", defa\
ult= None, help= "Node parameters")

ALLOC_POLICY_OPT

Value:
cli_option("--alloc-policy", dest= "alloc_policy", action= "store", me\
tavar= "POLICY", default= None, help= "Allocation policy for the node \
group")

NODE_POWERED_OPT

Value:
cli_option("--node-powered", default= None, type= "bool", metavar= _YO\
RNO, dest= "node_powered", help= "Specify if the SoR for node is power\
ed")

OOB_TIMEOUT_OPT

Value:
cli_option("--oob-timeout", dest= "oob_timeout", type= "int", default=\
 constants.OOB_TIMEOUT, help= "Maximum time to wait for out-of-band he\
lper")

POWER_DELAY_OPT

Value:
cli_option("--power-delay", dest= "power_delay", type= "float", defaul\
t= constants.OOB_POWER_DELAY, help= "Time in seconds to wait between p\
ower-ons")

FORCE_FILTER_OPT

Value:
cli_option("-F", "--filter", dest= "force_filter", action= "store_true\
", default= False, help= ("Whether command argument should be treated"\
 " as filter"))

NO_REMEMBER_OPT

Value:
cli_option("--no-remember", dest= "no_remember", action= "store_true",\
 default= False, help= "Perform but do not record the change" " in the\
 configuration")

PRIMARY_ONLY_OPT

Value:
cli_option("-p", "--primary-only", default= False, action= "store_true\
", help= "Evacuate primary instances only")

SECONDARY_ONLY_OPT

Value:
cli_option("-s", "--secondary-only", default= False, action= "store_tr\
ue", help= "Evacuate secondary instances only" " (applies only to inte\
rnally mirrored" " disk templates, e.g. %s)" % utils.CommaJoin(constan\
ts.DTS_INT_MIRROR))

STARTUP_PAUSED_OPT

Value:
cli_option("--paused", dest= "startup_paused", action= "store_true", d\
efault= False, help= "Pause instance at startup")

TO_GROUP_OPT

Value:
cli_option("--to", dest= "to", metavar= "<group>", help= "Destination \
node group (name or uuid)", default= None, action= "append", completio\
n_suggest= OPT_COMPL_ONE_NODEGROUP)

IGNORE_ERRORS_OPT

Value:
cli_option("-I", "--ignore-errors", default= [], action= "append", des\
t= "ignore_errors", choices= list(constants.CV_ALL_ECODES_STRINGS), he\
lp= "Error code to be ignored")

DISK_STATE_OPT

Value:
cli_option("--disk-state", default= [], dest= "disk_state", action= "a\
ppend", help= ("Specify disk state information in the" " format" " sto\
rage_type/identifier:option=value,...;" " note this is unused for now"\
), type= "identkeyval")

HV_STATE_OPT

Value:
cli_option("--hypervisor-state", default= [], dest= "hv_state", action\
= "append", help= ("Specify hypervisor state information in the" " for\
mat hypervisor:option=value,...;" " note this is unused for now"), typ\
e= "identkeyval")

IGNORE_IPOLICY_OPT

Value:
cli_option("--ignore-ipolicy", dest= "ignore_ipolicy", action= "store_\
true", default= False, help= "Ignore instance policy violations")

RUNTIME_MEM_OPT

Value:
cli_option("-m", "--runtime-memory", dest= "runtime_mem", help= "Sets \
the instance's runtime memory," " ballooning it up or down to the new \
value", default= None, type= "unit", metavar= "<size>")

ABSOLUTE_OPT

Value:
cli_option("--absolute", dest= "absolute", action= "store_true", defau\
lt= False, help= "Marks the grow as absolute instead of the" " (defaul\
t) relative mode")

NETWORK_OPT

Value:
cli_option("--network", action= "store", default= None, dest= "network\
", help= "IP network in CIDR notation")

GATEWAY_OPT

Value:
cli_option("--gateway", action= "store", default= None, dest= "gateway\
", help= "IP address of the router (gateway)")

ADD_RESERVED_IPS_OPT

Value:
cli_option("--add-reserved-ips", action= "store", default= None, dest=\
 "add_reserved_ips", help= "Comma-separated list of" " reserved IPs to\
 add")

REMOVE_RESERVED_IPS_OPT

Value:
cli_option("--remove-reserved-ips", action= "store", default= None, de\
st= "remove_reserved_ips", help= "Comma-delimited list of" " reserved \
IPs to remove")

NETWORK6_OPT

Value:
cli_option("--network6", action= "store", default= None, dest= "networ\
k6", help= "IP network in CIDR notation")

GATEWAY6_OPT

Value:
cli_option("--gateway6", action= "store", default= None, dest= "gatewa\
y6", help= "IP6 address of the router (gateway)")

NOCONFLICTSCHECK_OPT

Value:
cli_option("--no-conflicts-check", dest= "conflicts_check", default= T\
rue, action= "store_false", help= "Don't check for conflicting IPs")

INCLUDEDEFAULTS_OPT

Value:
cli_option("--include-defaults", dest= "include_defaults", default= Fa\
lse, action= "store_true", help= "Include default values")

HOTPLUG_OPT

Value:
cli_option("--hotplug", dest= "hotplug", action= "store_true", default\
= False, help= "Hotplug supported devices (NICs and Disks)")

HOTPLUG_IF_POSSIBLE_OPT

Value:
cli_option("--hotplug-if-possible", dest= "hotplug_if_possible", actio\
n= "store_true", default= False, help= "Hotplug devices in case" " hot\
plug is supported")

INSTALL_IMAGE_OPT

Value:
cli_option("--install-image", dest= "install_image", action= "store", \
type= "string", default= None, help= "The OS image to use for running \
the OS scripts safely")

INSTANCE_COMMUNICATION_OPT

Value:
cli_option("-c", "--communication", dest= "instance_communication", he\
lp= constants.INSTANCE_COMMUNICATION_DOC, type= "bool")

INSTANCE_COMMUNICATION_NETWORK_OPT

Value:
cli_option("--instance-communication-network", dest= "instance_communi\
cation_network", type= "string", help= "Set the network name for insta\
nce communication")

ZEROING_IMAGE_OPT

Value:
cli_option("--zeroing-image", dest= "zeroing_image", action= "store", \
default= None, help= "The OS image to use to zero instance disks")

ZERO_FREE_SPACE_OPT

Value:
cli_option("--zero-free-space", dest= "zero_free_space", action= "stor\
e_true", default= False, help= "Whether to zero the free space on the \
disks of the " "instance prior to the export")

HELPER_STARTUP_TIMEOUT_OPT

Value:
cli_option("--helper-startup-timeout", dest= "helper_startup_timeout",\
 action= "store", type= "int", help= "Startup timeout for the helper V\
M")

HELPER_SHUTDOWN_TIMEOUT_OPT

Value:
cli_option("--helper-shutdown-timeout", dest= "helper_shutdown_timeout\
", action= "store", type= "int", help= "Shutdown timeout for the helpe\
r VM")

ZEROING_TIMEOUT_FIXED_OPT

Value:
cli_option("--zeroing-timeout-fixed", dest= "zeroing_timeout_fixed", a\
ction= "store", type= "int", help= "The fixed amount of time to wait b\
efore assuming that the " "zeroing failed")

ZEROING_TIMEOUT_PER_MIB_OPT

Value:
cli_option("--zeroing-timeout-per-mib", dest= "zeroing_timeout_per_mib\
", action= "store", type= "float", help= "The amount of time to wait p\
er MiB of data to zero, in " "addition to the fixed timeout")

ENABLED_DATA_COLLECTORS_OPT

Value:
cli_option("--enabled-data-collectors", dest= "enabled_data_collectors\
", type= "keyval", default= {}, help= "Deactivate or reactivate a data\
 collector for reporting, " "in the format collector=bool, where colle\
ctor is one of %s." % ", ".join(constants.DATA_COLLECTOR_NAMES))

DIAGNOSE_DATA_COLLECTOR_FILENAME_OPT

Value:
cli_option("--diagnose-data-collector-filename", dest= "diagnose_data_\
collector_filename", help= ("Set's the file name of the script" " diag\
nose data collector should run" " If this value is empty string, the c\
ollector" " will return a success value" " without running anything"),\
 type= "string")

VERIFY_CLUTTER_OPT

Value:
cli_option("--verify-ssh-clutter", default= False, dest= "verify_clutt\
er", help= "Verify that Ganeti did not clutter" " up the 'authorized_k\
eys' file", action= "store_true")

LONG_SLEEP_OPT

Value:
cli_option("--long-sleep", default= False, dest= "long_sleep", help= "\
Allow long shutdowns when backing up instances", action= "store_true")

INPUT_OPT

Value:
cli_option("--input", dest= "input", default= None, help= ("input to b\
e passed as stdin" " to the repair command"), type= "string")

SSH_KEY_TYPE_OPT

Value:
cli_option("--ssh-key-type", default= None, choices= list(constants.SS\
HK_ALL), dest= "ssh_key_type", help= "Type of SSH key deployed by Gane\
ti for cluster actions")

SSH_KEY_BITS_OPT

Value:
cli_option("--ssh-key-bits", default= None, type= "int", dest= "ssh_ke\
y_bits", help= "Length of SSH keys generated by Ganeti, in bits")

COMMON_CREATE_OPTS

Value:
[BACKEND_OPT, DISK_OPT, DISK_TEMPLATE_OPT, FILESTORE_DIR_OPT, FILESTOR\
E_DRIVER_OPT, HYPERVISOR_OPT, IALLOCATOR_OPT, NET_OPT, NODE_PLACEMENT_\
OPT, NODEGROUP_OPT, NOIPCHECK_OPT, NOCONFLICTSCHECK_OPT, NONAMECHECK_O\
PT, NONICS_OPT, NWSYNC_OPT, OSPARAMS_OPT, OSPARAMS_PRIVATE_OPT, OSPARA\
MS_SECRET_OPT, OS_SIZE_OPT, OPPORTUNISTIC_OPT, SUBMIT_OPT, PRINT_JOBID\
_OPT, TAG_ADD_OPT, DRY_RUN_OPT, PRIORITY_OPT,]

INSTANCE_POLICY_OPTS

Value:
[IPOLICY_BOUNDS_SPECS_OPT, IPOLICY_DISK_TEMPLATES, IPOLICY_VCPU_RATIO,\
 IPOLICY_SPINDLE_RATIO, IPOLICY_MEMORY_RATIO,]

SPLIT_ISPECS_OPTS

Value:
[SPECS_CPU_COUNT_OPT, SPECS_DISK_COUNT_OPT, SPECS_DISK_SIZE_OPT, SPECS\
_MEM_SIZE_OPT, SPECS_NIC_COUNT_OPT,]