gnt-instance: Add "--submit" and "--priority" to commands
authorMichael Hanselmann <hansmi@google.com>
Fri, 13 Apr 2012 19:11:21 +0000 (21:11 +0200)
committerMichael Hanselmann <hansmi@google.com>
Wed, 18 Apr 2012 16:07:07 +0000 (18:07 +0200)
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

lib/client/gnt_instance.py
man/gnt-instance.rst

index 0f70021..ec709b1 100644 (file)
@@ -868,7 +868,7 @@ def MigrateInstance(opts, args):
                                  allow_failover=opts.allow_failover,
                                  allow_runtime_changes=opts.allow_runtime_chgs,
                                  ignore_ipolicy=opts.ignore_ipolicy)
-  SubmitOpCode(op, cl=cl, opts=opts)
+  SubmitOrSend(op, cl=cl, opts=opts)
   return 0
 
 
@@ -1439,7 +1439,7 @@ def ChangeGroup(opts, args):
                                      iallocator=opts.iallocator,
                                      target_groups=opts.to,
                                      early_release=opts.early_release)
-  result = SubmitOpCode(op, cl=cl, opts=opts)
+  result = SubmitOrSend(op, opts, cl=cl)
 
   # Keep track of submitted jobs
   jex = JobExecutor(cl=cl, opts=opts)
@@ -1541,7 +1541,7 @@ commands = {
     MigrateInstance, ARGS_ONE_INSTANCE,
     [FORCE_OPT, NONLIVE_OPT, MIGRATION_MODE_OPT, CLEANUP_OPT, DRY_RUN_OPT,
      PRIORITY_OPT, DST_NODE_OPT, IALLOCATOR_OPT, ALLOW_FAILOVER_OPT,
-     IGNORE_IPOLICY_OPT, NORUNTIME_CHGS_OPT],
+     IGNORE_IPOLICY_OPT, NORUNTIME_CHGS_OPT, SUBMIT_OPT],
     "[-f] <instance>", "Migrate instance to its secondary node"
     " (only for mirrored instances)"),
   "move": (
@@ -1643,7 +1643,7 @@ commands = {
     "<instance> <disk> <size>", "Grow an instance's disk"),
   "change-group": (
     ChangeGroup, ARGS_ONE_INSTANCE,
-    [TO_GROUP_OPT, IALLOCATOR_OPT, EARLY_RELEASE_OPT],
+    [TO_GROUP_OPT, IALLOCATOR_OPT, EARLY_RELEASE_OPT, PRIORITY_OPT, SUBMIT_OPT],
     "[-I <iallocator>] [--to <group>]", "Change group of instance"),
   "list-tags": (
     ListTags, ARGS_ONE_INSTANCE, [],
index c38c553..fbfeef3 100644 (file)
@@ -1446,12 +1446,12 @@ Example::
 MIGRATE
 ^^^^^^^
 
-**migrate** [-f] {\--cleanup} {*instance*}
+| **migrate** [-f] [\--allow-failover] [\--non-live]
+| [\--migration-mode=live\|non-live] [\--ignore-ipolicy]
+| [\--no-runtime-changes] [\--submit]
+| [{-n|\--target-node} *node* \| {-I|\--iallocator} *name*] {*instance*}
 
-**migrate** [-f] [\--allow-failover] [\--non-live]
-[\--migration-mode=live\|non-live] [\--ignore-ipolicy]
-[\--no-runtime-changes]
-[{-n|\--target-node} *node* \| {-I|\--iallocator} *name*] {*instance*}
+| **migrate** [-f] \--cleanup [\--submit] {*instance*}
 
 Migrate will move the instance to its secondary node without shutdown.
 As with failover, it only works for instances having the drbd disk
@@ -1501,6 +1501,9 @@ The ``--no-runtime-changes`` option forbids migrate to alter an
 instance's runtime before migrating it (eg. ballooning an instance
 down because the target node doesn't have enough available memory).
 
+See **ganeti(7)** for a description of ``--submit`` and other common
+options.
+
 Example (and expected output)::
 
     # gnt-instance migrate instance1
@@ -1562,7 +1565,8 @@ Example::
 CHANGE-GROUP
 ~~~~~~~~~~~~
 
-**change-group** [\--iallocator *NAME*] [\--to *GROUP*...] {*instance*}
+| **change-group** [\--submit]
+| [\--iallocator *NAME*] [\--to *GROUP*...] {*instance*}
 
 This command moves an instance to another node group. The move is
 calculated by an iallocator, either given on the command line or as a
@@ -1571,6 +1575,9 @@ cluster default.
 If no specific destination groups are specified using ``--to``, all
 groups except the one containing the instance are considered.
 
+See **ganeti(7)** for a description of ``--submit`` and other common
+options.
+
 Example::
 
     # gnt-instance change-group -I hail --to rack2 inst1.example.com