Add "show" as alias for "info" to gnt commands
authorAlexander Schreiber <als@google.com>
Tue, 17 Apr 2012 14:47:53 +0000 (16:47 +0200)
committerMichael Hanselmann <hansmi@google.com>
Tue, 17 Apr 2012 18:20:23 +0000 (20:20 +0200)
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 <als@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

lib/client/gnt_cluster.py
lib/client/gnt_instance.py
lib/client/gnt_node.py
lib/client/gnt_os.py

index 10d7709..f1bedce 100644 (file)
@@ -1579,6 +1579,7 @@ commands = {
 #: dictionary with aliases for commands
 aliases = {
   "masterfailover": "master-failover",
+  "show": "info",
 }
 
 
index 367c4f8..0f70021 100644 (file)
@@ -1662,6 +1662,7 @@ commands = {
 aliases = {
   "start": "startup",
   "stop": "shutdown",
+  "show": "info",
   }
 
 
index 0750246..888d976 100644 (file)
@@ -987,7 +987,13 @@ commands = {
     "[<node_name>...]", "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)
index 3554524..890becc 100644 (file)
@@ -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)