From 4fbc93dd273c8d4eccd7504f7eb237aa6a7d879e Mon Sep 17 00:00:00 2001 From: Iustin Pop <iustin@google.com> Date: Thu, 17 Sep 2009 14:17:42 +0200 Subject: [PATCH] =?UTF-8?q?Unify=20the=20=E2=80=9C--nic-parameters?= =?UTF-8?q?=E2=80=9D=20option?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Iustin Pop <iustin@google.com> Reviewed-by: Michael Hanselmann <hansmi@google.com> --- lib/cli.py | 5 +++++ scripts/gnt-cluster | 8 ++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/cli.py b/lib/cli.py index bcf8d8b82..e59422efe 100644 --- a/lib/cli.py +++ b/lib/cli.py @@ -71,6 +71,7 @@ __all__ = [ "MC_OPT", "NET_OPT", "NEW_SECONDARY_OPT", + "NIC_PARAMS_OPT", "NODE_LIST_OPT", "NODE_PLACEMENT_OPT", "NOHDR_OPT", @@ -727,6 +728,10 @@ ENABLED_HV_OPT = cli_option("--enabled-hypervisors", help="Comma-separated list of hypervisors", type="string", default=None) +NIC_PARAMS_OPT = cli_option("-N", "--nic-parameters", dest="nicparams", + type="keyval", default={}, + help="NIC parameters") + def _ParseArgs(argv, commands, aliases): """Parser for the command line arguments. diff --git a/scripts/gnt-cluster b/scripts/gnt-cluster index 173f3ded2..1a71efac1 100755 --- a/scripts/gnt-cluster +++ b/scripts/gnt-cluster @@ -622,9 +622,7 @@ commands = { ENABLED_HV_OPT, HVLIST_OPT, BACKEND_OPT, - cli_option("-N", "--nic-parameters", dest="nicparams", - type="keyval", default={}, - help="NIC parameters"), + NIC_PARAMS_OPT, cli_option("-C", "--candidate-pool-size", default=constants.MASTER_POOL_SIZE_DEFAULT, help="Set the candidate pool size", @@ -712,9 +710,7 @@ commands = { ENABLED_HV_OPT, HVLIST_OPT, BACKEND_OPT, - cli_option("-N", "--nic-parameters", dest="nicparams", - type="keyval", default={}, - help="NIC parameters"), + NIC_PARAMS_OPT, cli_option("-C", "--candidate-pool-size", default=None, help="Set the candidate pool size", dest="candidate_pool_size", type="int"), -- GitLab