---
lib/cli.py | 5 +++++
scripts/gnt-node | 7 +------
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/lib/cli.py b/lib/cli.py
index 74d3795..e95f38a 100644
--- a/lib/cli.py
+++ b/lib/cli.py
@@ -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.
diff --git a/scripts/gnt-node b/scripts/gnt-node
index 941b356..f35bc04 100755
--- a/scripts/gnt-node
+++ b/scripts/gnt-node
@@ -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,
--
1.6.3.3