|
|
|
|
|
|
|
|
|
|
|
_ParseArgs(binary,
argv,
commands,
aliases,
env_override)
Parser for the command line arguments. |
source code
|
|
|
|
|
|
|
SplitNodeOption(value)
Splits the value of a --node option. |
source code
|
|
list
|
|
|
|
|
|
|
|
|
SendJob(ops,
cl=None)
Function to submit an opcode without waiting for the results. |
source code
|
|
|
|
|
FormatLogMessage(log_type,
log_msg)
Formats a job message according to its type. |
source code
|
|
|
PollJob(job_id,
cl=None,
feedback_fn=None,
reporter=None)
Function to poll for the result of a job. |
source code
|
|
|
SubmitOpCode(op,
cl=None,
feedback_fn=None,
opts=None,
reporter=None)
Legacy function to submit an opcode. |
source code
|
|
|
SubmitOpCodeToDrainedQueue(op)
Forcefully insert a job in the queue, even if it is drained. |
source code
|
|
|
|
|
|
|
|
|
|
|
GenericMain(commands,
override=None,
aliases=None,
env_override=frozenset())
Generic main function for all the gnt-* commands. |
source code
|
|
|
ParseNicOption(optvalue)
Parses the value of the --net option(s). |
source code
|
|
|
|
int
|
|
|
|
|
|
|
GenerateTable(headers,
fields,
separator,
data,
numfields=None,
unitfields=None,
units=None)
Prints a table with headers and different fields. |
source code
|
|
|
_FormatBool(value)
Formats a boolean value as a string. |
source code
|
|
tuple; (callable, bool)
|
|
|
|
|
|
|
|
|
|
|
GenericList(resource,
fields,
names,
unit,
separator,
header,
cl=None,
format_override=None,
verbose=False,
force_filter=False,
namefield=None,
qfilter=None,
isnumeric=False)
Generic implementation for listing all items of a resource. |
source code
|
|
list
|
|
|
|
|
_GetColFormatString(width,
align_right)
Returns the format string for a field. |
source code
|
|
|
|
string
|
|
|
|
|
GetOnlineNodes(nodes,
cl=None,
nowarn=False,
secondary_ips=False,
filter_master=False,
nodegroup=None)
Returns the names of online nodes. |
source code
|
|
a list of tuples
|
|
a list of tuples
|
|
|
|
|
|
|
ToStdoutAndLoginfo(txt,
*args)
Write a message to stdout and additionally log it at INFO level |
source code
|
|
|
|
dict
|
|
|
|
list of pairs
|
|
|
|
|
|
boolean
|
|
|
_MaybeParseUnit(elements)
Parses and returns an array of potential values with units. |
source code
|
|
|
_InitISpecsFromSplitOpts(ipolicy,
ispecs_mem_size,
ispecs_cpu_count,
ispecs_disk_count,
ispecs_disk_size,
ispecs_nic_count,
group_ipolicy,
fill_all) |
source code
|
|
|
|
|
|
|
_GetISpecsInAllowedValues(minmax_ispecs,
allowed_values) |
source code
|
|
|
_InitISpecsFromFullOpts(ipolicy_out,
minmax_ispecs,
std_ispecs,
group_ipolicy,
allowed_values) |
source code
|
|
|
CreateIPolicyFromOpts(ispecs_mem_size=None,
ispecs_cpu_count=None,
ispecs_disk_count=None,
ispecs_disk_size=None,
ispecs_nic_count=None,
minmax_ispecs=None,
std_ispecs=None,
ipolicy_disk_templates=None,
ipolicy_vcpu_ratio=None,
ipolicy_spindle_ratio=None,
group_ipolicy=False,
allowed_values=None,
fill_all=False)
Creation of instance policy based on command line options. |
source code
|
|
bool
|
_NotAContainer(data)
Checks whether the input is not a container data type. |
source code
|
|
dict of any to int
|
|
|
|
|
|
|
sys
|
|
textwrap
|
|
time
|
|
logging
|
|
errno
|
|
itertools
|
|
shlex
|
|
StringIO
|
|
utils
|
|
errors
|
|
constants
|
|
opcodes
|
|
rpcerr
|
|
rpc
|
|
ssh
|
|
compat
|
|
netutils
|
|
qlang
|
|
objects
|
|
pathutils
|
|
serializer
|
|
TO_GROUP_OPT
|
|
POWER_DELAY_OPT
|
|
NEW_RAPI_CERT_OPT
|
|
OPT_COMPL_ALL
|
|
OOB_TIMEOUT_OPT
|
|
IPOLICY_SPINDLE_RATIO
|
|
MAC_PREFIX_OPT
|
|
IPOLICY_DISK_TEMPLATES
|
|
ZERO_FREE_SPACE_OPT
|
|
NOSHUTDOWN_OPT
|
|
SHUTDOWN_TIMEOUT_OPT
|
|
ZEROING_TIMEOUT_FIXED_OPT
|
|
UIDPOOL_OPT
|
|
ALLOC_POLICY_OPT
|
|
NEW_NODE_CERT_OPT
|
|
NOVOTING_OPT
|
|
ERROR_CODES_OPT
|
|
SPECS_CPU_COUNT_OPT
|
|
SPECS_DISK_SIZE_OPT
|
|
SECONDARY_IP_OPT
|
|
CLEANUP_OPT
|
|
NETWORK6_OPT
|
|
REMOVE_INSTANCE_OPT
|
|
NWSYNC_OPT
|
|
RQL_OPT
|
|
IPOLICY_STD_SPECS_OPT
|
|
MAX_TRACK_OPT
|
|
DEFAULT_IALLOCATOR_PARAMS_OPT
|
|
IGNORE_SIZE_OPT
|
|
AUTO_PROMOTE_OPT
|
|
READD_OPT
|
|
NO_REMEMBER_OPT
|
|
SUBMIT_OPTS
|
|
BACKEND_OPT
|
|
RAPI_CERT_OPT
|
|
HV_STATE_OPT
|
|
HOTPLUG_IF_POSSIBLE_OPT
|
|
ABSOLUTE_OPT
|
|
FILESTORE_DIR_OPT
|
|
RUNTIME_MEM_OPT
|
|
ROMAN_OPT
|
|
SEP_OPT
|
|
OSPARAMS_PRIVATE_OPT
|
|
USE_EXTERNAL_MIP_SCRIPT
|
|
GLOBAL_SHARED_FILEDIR_OPT
|
|
MAINTAIN_NODE_HEALTH_OPT
|
|
TRANSPORT_COMPRESSION_OPT
|
|
NODE_FORCE_JOIN_OPT
|
|
DRY_RUN_OPT
|
|
CAPAB_VM_OPT
|
|
NODE_POWERED_OPT
|
|
NODE_PLACEMENT_OPT
|
|
RESERVED_LVS_OPT
|
|
SINGLE_NODE_OPT
|
|
INSTALL_IMAGE_OPT
|
|
TAG_ADD_OPT
|
|
FORCE_VARIANT_OPT
|
|
PRIMARY_ONLY_OPT
|
|
NIC_PARAMS_OPT
|
|
SPICE_CACERT_OPT
|
|
IGNORE_ERRORS_OPT
|
|
AUTO_REPLACE_OPT
|
|
OSPARAMS_SECRET_OPT
|
|
cli_option
|
|
ENABLED_DISK_TEMPLATES_OPT
|
|
DISK_STATE_OPT
|
|
HVOPTS_OPT
|
|
EARLY_RELEASE_OPT
|
|
VERBOSE_OPT
|
|
CONFIRM_OPT
|
|
ALL_OPT
|
|
COMMON_CREATE_OPTS
|
|
HOTPLUG_OPT
|
|
OS_OPT
|
|
NONAMECHECK_OPT
|
|
FAILURE_ONLY_OPT
|
|
ALLOW_FAILOVER_OPT
|
|
SELECT_OS_OPT
|
|
INSTANCE_COMMUNICATION_NETWORK_OPT
|
|
SPECS_NIC_COUNT_OPT
|
|
OS_SIZE_OPT
|
|
IGNORE_OFFLINE_OPT
|
|
ON_PRIMARY_OPT
|
|
SRC_NODE_OPT
|
|
ADD_UIDS_OPT
|
|
SUBMIT_OPT
|
|
MASTER_NETMASK_OPT
|
|
SPICE_CERT_OPT
|
|
NEW_CLUSTER_CERT_OPT
|
|
INTERVAL_OPT
|
|
OSPARAMS_OPT
|
|
IPOLICY_STD_SPECS_STR
|
|
VERIFY_CLUTTER_OPT
|
|
NONICS_OPT
|
|
NODE_PARAMS_OPT
|
|
SPLIT_ISPECS_OPTS
|
|
BLK_OS_OPT
|
|
GLOBAL_FILEDIR_OPT
|
|
GATEWAY_OPT
|
|
CAPAB_MASTER_OPT
|
|
MODIFY_ETCHOSTS_OPT
|
|
SPECS_MEM_SIZE_OPT
|
|
TAG_SRC_OPT
|
|
NOSSH_KEYCHECK_OPT
|
|
INSTANCE_POLICY_OPTS
|
|
NET_OPT
|
|
IGNORE_FAILURES_OPT
|
|
IGNORE_HVVERSIONS_OPT
|
|
MASTER_NETDEV_OPT
|
|
USE_REPL_NET_OPT
|
|
NODEGROUP_OPT
|
|
SRC_DIR_OPT
|
|
NOMODIFY_SSH_SETUP_OPT
|
|
SYNC_OPT
|
|
IDENTIFY_DEFAULTS_OPT
|
|
REMOVE_UIDS_OPT
|
|
INSTANCE_COMMUNICATION_OPT
|
|
HYPERVISOR_OPT
|
|
IGNORE_IPOLICY_OPT
|
|
DEBUG_OPT
|
|
MC_OPT
|
|
ONLINE_INST_OPT
|
|
IGNORE_SECONDARIES_OPT
|
|
REBOOT_TYPE_OPT
|
|
NONPLUS1_OPT
|
|
IGNORE_CONSIST_OPT
|
|
NEW_SPICE_CERT_OPT
|
|
NEW_SSH_KEY_OPT
|
|
FORTHCOMING_OPT
|
|
SPECS_DISK_COUNT_OPT
|
|
NONLIVE_OPT
|
|
ENABLED_USER_SHUTDOWN_OPT
|
|
DISK_OPT
|
|
FORCE_FAILOVER_OPT
|
|
DEBUG_SIMERR_OPT
|
|
SECONDARY_ONLY_OPT
|
|
NEW_PRIMARY_OPT
|
|
ADD_RESERVED_IPS_OPT
|
|
NETWORK_OPT
|
|
TIMEOUT_OPT
|
|
NODE_LIST_OPT
|
|
ON_SECONDARY_OPT
|
|
FILESTORE_DRIVER_OPT
|
|
IGNORE_REMOVE_FAILURES_OPT
|
|
MIGRATION_MODE_OPT
|
|
GATEWAY6_OPT
|
|
NOIPCHECK_OPT
|
|
COMMIT_OPT
|
|
IPOLICY_BOUNDS_SPECS_STR
|
|
SEQUENTIAL_OPT
|
|
ZEROING_TIMEOUT_PER_MIB_OPT
|
|
HELPER_SHUTDOWN_TIMEOUT_OPT
|
|
STATIC_OPT
|
|
COMPRESSION_TOOLS_OPT
|
|
DISK_TEMPLATE_OPT
|
|
NOSTART_OPT
|
|
REASON_OPT
|
|
NO_INSTALL_OPT
|
|
YES_DOIT_OPT
|
|
FORCE_OPT
|
|
PRINT_JOBID_OPT
|
|
SHOWCMD_OPT
|
|
DEFAULT_IALLOCATOR_OPT
|
|
OFFLINE_INST_OPT
|
|
NOCONFLICTSCHECK_OPT
|
|
PRIORITY_OPT
|
|
NEW_CLUSTER_DOMAIN_SECRET_OPT
|
|
COMMON_OPTS
|
|
DRAINED_OPT
|
|
HVLIST_OPT
|
|
LONG_SLEEP_OPT
|
|
REMOVE_RESERVED_IPS_OPT
|
|
IGNORE_SOFT_ERRORS_OPT
|
|
WFSYNC_OPT
|
|
NORUNTIME_CHGS_OPT
|
|
PRIMARY_IP_VERSION_OPT
|
|
NODEGROUP_OPT_NAME
|
|
CP_SIZE_OPT
|
|
CLUSTER_DOMAIN_SECRET_OPT
|
|
HID_OS_OPT
|
|
SHOW_MACHINE_OPT
|
|
ALLOCATABLE_OPT
|
|
PREALLOC_WIPE_DISKS_OPT
|
|
FORCE_FILTER_OPT
|
|
ENABLED_DATA_COLLECTORS_OPT
|
|
COMPRESS_OPT
|
|
USEUNITS_OPT
|
|
IPOLICY_VCPU_RATIO
|
|
NOHDR_OPT
|
|
ZEROING_IMAGE_OPT
|
|
OFFLINE_OPT
|
|
EXT_PARAMS_OPT
|
|
NOMODIFY_ETCHOSTS_OPT
|
|
DRBD_HELPER_OPT
|
|
ENABLED_HV_OPT
|
|
NEW_SECONDARY_OPT
|
|
VG_NAME_OPT
|
|
DISK_PARAMS_OPT
|
|
FIELDS_OPT
|
|
GLOBAL_GLUSTER_FILEDIR_OPT
|
|
DST_NODE_OPT
|
|
IALLOCATOR_OPT
|
|
NEW_CONFD_HMAC_KEY_OPT
|
|
HELPER_STARTUP_TIMEOUT_OPT
|
|
INCLUDEDEFAULTS_OPT
|
|
STARTUP_PAUSED_OPT
|
|
DISKIDX_OPT
|
|
GetClient
|
|
OptionParser
|
|
TitledHelpFormatter
|
|
_CHOOSE_BATCH = 25
Maximum batch size for ChooseJob
|
|
TISPECS_GROUP_TYPES = {constants.ISPECS_MIN: constants.VTYPE_I...
|
|
TISPECS_CLUSTER_TYPES = {constants.ISPECS_MIN: constants.VTYPE...
|
|
_QFT_NAMES = {constants.QFT_UNKNOWN: "Unknown", constants.QFT_...
User-friendly names for query2 field types
|
|
ARGS_NONE = []
|
|
ARGS_MANY_INSTANCES = [ArgInstance()]
|
|
ARGS_MANY_NETWORKS = [ArgNetwork()]
|
|
ARGS_MANY_NODES = [ArgNode()]
|
|
ARGS_MANY_GROUPS = [ArgGroup()]
|
|
ARGS_MANY_FILTERS = [ArgFilter()]
|
|
ARGS_ONE_INSTANCE = [ArgInstance(min= 1, max= 1)]
|
|
ARGS_ONE_NETWORK = [ArgNetwork(min= 1, max= 1)]
|
|
ARGS_ONE_NODE = [ArgNode(min= 1, max= 1)]
|
|
ARGS_ONE_GROUP = [ArgGroup(min= 1, max= 1)]
|
|
ARGS_ONE_OS = [ArgOs(min= 1, max= 1)]
|
|
ARGS_ONE_FILTER = [ArgFilter(min= 1, max= 1)]
|
|
_DEFAULT_FORMAT_QUERY = {constants.QFT_TEXT:(str, False), cons...
Default formatting for query results; (callback, align right)
|