From: Alexander Schreiber Date: Tue, 17 Apr 2012 14:47:53 +0000 (+0200) Subject: Add "show" as alias for "info" to gnt commands X-Git-Tag: v2.6.0beta1~110 X-Git-Url: https://code.grnet.gr/git/ganeti-local/commitdiff_plain/96897af726596e8ee49ecdb19aac7b4e83c1585f Add "show" as alias for "info" to gnt commands This patch adds support for "show" as an alias for "info" to gnt-(cluster|instance|node|os). It already exists in gnt-job. Signed-off-by: Alexander Schreiber Reviewed-by: Michael Hanselmann --- diff --git a/lib/client/gnt_cluster.py b/lib/client/gnt_cluster.py index 10d7709..f1bedce 100644 --- a/lib/client/gnt_cluster.py +++ b/lib/client/gnt_cluster.py @@ -1579,6 +1579,7 @@ commands = { #: dictionary with aliases for commands aliases = { "masterfailover": "master-failover", + "show": "info", } diff --git a/lib/client/gnt_instance.py b/lib/client/gnt_instance.py index 367c4f8..0f70021 100644 --- a/lib/client/gnt_instance.py +++ b/lib/client/gnt_instance.py @@ -1662,6 +1662,7 @@ commands = { aliases = { "start": "startup", "stop": "shutdown", + "show": "info", } diff --git a/lib/client/gnt_node.py b/lib/client/gnt_node.py index 0750246..888d976 100644 --- a/lib/client/gnt_node.py +++ b/lib/client/gnt_node.py @@ -987,7 +987,13 @@ commands = { "[...]", "List health of node(s) using out-of-band"), } +#: dictionary with aliases for commands +aliases = { + "show": "info", + } + def Main(): - return GenericMain(commands, override={"tag_type": constants.TAG_NODE}, + return GenericMain(commands, aliases=aliases, + override={"tag_type": constants.TAG_NODE}, env_override=_ENV_OVERRIDE) diff --git a/lib/client/gnt_os.py b/lib/client/gnt_os.py index 3554524..890becc 100644 --- a/lib/client/gnt_os.py +++ b/lib/client/gnt_os.py @@ -297,6 +297,11 @@ commands = { "", "Modify the OS parameters"), } +#: dictionary with aliases for commands +aliases = { + "show": "info", + } + def Main(): - return GenericMain(commands) + return GenericMain(commands, aliases=aliases)