Commit b58726e8 authored by Iustin Pop's avatar Iustin Pop

Unify the “--vg-name” option

Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent e32df528
......@@ -102,6 +102,7 @@ __all__ = [
"TAG_SRC_OPT",
"USEUNITS_OPT",
"VERBOSE_OPT",
"VG_NAME_OPT",
# Generic functions for CLI programs
"GenericMain",
"GetClient",
......@@ -737,6 +738,12 @@ CP_SIZE_OPT = cli_option("-C", "--candidate-pool-size", default=None,
dest="candidate_pool_size", type="int",
help="Set the candidate pool size")
VG_NAME_OPT = cli_option("-g", "--vg-name", dest="vg_name",
help="Enables LVM and specifies the volume group"
" name (cluster-wide) for disk allocation [xenvg]",
metavar="VG", default=None)
def _ParseArgs(argv, commands, aliases):
"""Parser for the command line arguments.
......
......@@ -600,11 +600,7 @@ commands = {
" addresses, in the format XX:XX:XX",
metavar="PREFIX",
default=constants.DEFAULT_MAC_PREFIX,),
cli_option("-g", "--vg-name", dest="vg_name",
help="Specify the volume group name "
" (cluster-wide) for disk allocation [xenvg]",
metavar="VG",
default=None,),
VG_NAME_OPT,
cli_option("--master-netdev", dest="master_netdev",
help="Specify the node interface (cluster-wide)"
" on which the master IP address will be added "
......@@ -700,19 +696,8 @@ commands = {
[DEBUG_OPT],
"{pause <timespec>|continue|info}", "Change watcher properties"),
'modify': (SetClusterParams, ARGS_NONE,
[DEBUG_OPT,
cli_option("-g", "--vg-name", dest="vg_name",
help="Specify the volume group name "
" (cluster-wide) for disk allocation "
"and enable lvm based storage",
metavar="VG",),
NOLVM_STORAGE_OPT,
ENABLED_HV_OPT,
HVLIST_OPT,
BACKEND_OPT,
NIC_PARAMS_OPT,
CP_SIZE_OPT,
],
[DEBUG_OPT, BACKEND_OPT, CP_SIZE_OPT, ENABLED_HV_OPT, HVLIST_OPT,
NIC_PARAMS_OPT, NOLVM_STORAGE_OPT, VG_NAME_OPT],
"[opts...]",
"Alters the parameters of the cluster"),
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment