Commit e7e09483 authored by Iustin Pop's avatar Iustin Pop

Move the “--allocatable” option to cli.py

Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 771734c9
......@@ -44,6 +44,7 @@ from optparse import (OptionParser, TitledHelpFormatter,
__all__ = [
# Command line options
"ALLOCATABLE_OPT",
"ALL_OPT",
"AUTO_REPLACE_OPT",
"BACKEND_OPT",
......@@ -710,6 +711,10 @@ DRAINED_OPT = cli_option("-D", "--drained", dest="drained", metavar=_YORNO,
choices=_YESNO, default=None,
help="Set the drained flag on the node")
ALLOCATABLE_OPT = cli_option("--allocatable", dest="allocatable",
choices=_YESNO, default=None, metavar=_YORNO,
help="Set the allocatable flag on a volume")
def _ParseArgs(argv, commands, aliases):
"""Parser for the command line arguments.
......
......@@ -676,12 +676,7 @@ commands = {
ArgChoice(min=1, max=1,
choices=_MODIFIABLE_STORAGE_TYPES),
ArgFile(min=1, max=1)],
[DEBUG_OPT,
cli_option("--allocatable", dest="allocatable",
choices=["yes", "no"], default=None,
metavar="yes|no",
help="Set the allocatable flag on a volume"),
],
[DEBUG_OPT, ALLOCATABLE_OPT],
"<node_name> <storage_type> <name>",
"Modify storage volume on a node"),
'repair-volume': (RepairVolume,
......
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