gnt-debug: rename allocator to iallocator
authorIustin Pop <iustin@google.com>
Tue, 24 May 2011 09:34:32 +0000 (11:34 +0200)
committerIustin Pop <iustin@google.com>
Tue, 24 May 2011 15:22:40 +0000 (17:22 +0200)
I'm always confused by this strange difference, so let's rename the
command to match what it tests.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

lib/client/gnt_debug.py
man/gnt-debug.rst

index 3a355ed..a327321 100644 (file)
@@ -553,7 +553,7 @@ commands = {
      ],
     "<op_list_file...>", "Submits jobs built from json files"
     " containing a list of serialized opcodes"),
-  'allocator': (
+  'iallocator': (
     TestAllocator, [ArgUnknown(min=1)],
     [cli_option("--dir", dest="direction", default=constants.IALLOCATOR_DIR_IN,
                 choices=list(constants.VALID_IALLOCATOR_DIRECTIONS),
@@ -595,6 +595,10 @@ commands = {
     "[--interval N]", "Show a list of locks in the master daemon"),
   }
 
+#: dictionary with aliases for commands
+aliases = {
+  "allocator": "iallocator",
+  }
 
 def Main():
-  return GenericMain(commands)
+  return GenericMain(commands, aliases=aliases)
index 639274a..70ddd19 100644 (file)
@@ -19,10 +19,10 @@ The **gnt-debug** is used for debugging the Ganeti system.
 COMMANDS
 --------
 
-ALLOCATOR
-~~~~~~~~~
+IALLOCATOR
+~~~~~~~~~~
 
-**allocator** [--debug] [--dir *DIRECTION*] {--algorithm
+**iallocator** [--debug] [--dir *DIRECTION*] {--algorithm
 *ALLOCATOR* } [--mode *MODE*] [--mem *MEMORY*] [--disks *DISKS*]
 [--disk-template *TEMPLATE*] [--nics *NICS*] [--os-type *OS*]
 [--vcpus *VCPUS*] [--tags *TAGS*] {*instance*}