---
 lib/cli.py                 |    6 ++++++
 lib/client/gnt_instance.py |    7 ++++---
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/lib/cli.py b/lib/cli.py
index f18e65b..e3ec55d 100644
--- a/lib/cli.py
+++ b/lib/cli.py
@@ -50,6 +50,7 @@ from optparse import (OptionParser, TitledHelpFormatter,
 
 __all__ = [
   # Command line options
+  "ABSOLUTE_OPT",
   "ADD_UIDS_OPT",
   "ALLOCATABLE_OPT",
   "ALLOC_POLICY_OPT",
@@ -1381,6 +1382,11 @@ RUNTIME_MEM_OPT = cli_option("-m", "--runtime-memory", 
dest="runtime_mem",
                              " ballooning it up or down to the new value",
                              default=None, type="unit", metavar="<size>")
 
+ABSOLUTE_OPT = cli_option("--absolute", dest="absolute",
+                          action="store_true", default=False,
+                          help="Marks the grow as absolute instead of the"
+                          " (default) relative mode")
+
 #: Options provided by all commands
 COMMON_OPTS = [DEBUG_OPT]
 
diff --git a/lib/client/gnt_instance.py b/lib/client/gnt_instance.py
index ec709b1..c049caa 100644
--- a/lib/client/gnt_instance.py
+++ b/lib/client/gnt_instance.py
@@ -1,7 +1,7 @@
 #
 #
 
-# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Google Inc.
+# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Google Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -663,7 +663,8 @@ def GrowDisk(opts, args):
   amount = utils.ParseUnit(args[2])
   op = opcodes.OpInstanceGrowDisk(instance_name=instance,
                                   disk=disk, amount=amount,
-                                  wait_for_sync=opts.wait_for_sync)
+                                  wait_for_sync=opts.wait_for_sync,
+                                  absolute=opts.absolute)
   SubmitOrSend(op, opts)
   return 0
 
@@ -1639,7 +1640,7 @@ commands = {
     GrowDisk,
     [ArgInstance(min=1, max=1), ArgUnknown(min=1, max=1),
      ArgUnknown(min=1, max=1)],
-    [SUBMIT_OPT, NWSYNC_OPT, DRY_RUN_OPT, PRIORITY_OPT],
+    [SUBMIT_OPT, NWSYNC_OPT, DRY_RUN_OPT, PRIORITY_OPT, ABSOLUTE_OPT],
     "<instance> <disk> <size>", "Grow an instance's disk"),
   "change-group": (
     ChangeGroup, ARGS_ONE_INSTANCE,
-- 
1.7.7.3

Reply via email to