Rename OpGrowDisk and LUGrowDisk
authorIustin Pop <iustin@google.com>
Sat, 15 Jan 2011 11:57:04 +0000 (12:57 +0100)
committerIustin Pop <iustin@google.com>
Tue, 18 Jan 2011 11:47:12 +0000 (12:47 +0100)
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: RenĂ© Nussbaumer <rn@google.com>

lib/client/gnt_instance.py
lib/cmdlib.py
lib/opcodes.py
lib/rapi/rlib2.py
tools/burnin

index cf6c8a3..0e38e64 100644 (file)
@@ -1,7 +1,7 @@
 #
 #
 
-# Copyright (C) 2006, 2007, 2008, 2009, 2010 Google Inc.
+# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 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
@@ -661,8 +661,9 @@ def GrowDisk(opts, args):
     raise errors.OpPrereqError("Invalid disk index: %s" % str(err),
                                errors.ECODE_INVAL)
   amount = utils.ParseUnit(args[2])
-  op = opcodes.OpGrowDisk(instance_name=instance, disk=disk, amount=amount,
-                          wait_for_sync=opts.wait_for_sync)
+  op = opcodes.OpInstanceGrowDisk(instance_name=instance,
+                                  disk=disk, amount=amount,
+                                  wait_for_sync=opts.wait_for_sync)
   SubmitOrSend(op, opts)
   return 0
 
index 116261f..2cb3374 100644 (file)
@@ -8589,7 +8589,7 @@ class LUNodeEvacuationStrategy(NoHooksLU):
     return result
 
 
-class LUGrowDisk(LogicalUnit):
+class LUInstanceGrowDisk(LogicalUnit):
   """Grow a disk of an instance.
 
   """
index 45f9e2a..1a1c01f 100644 (file)
@@ -1001,7 +1001,7 @@ class OpSetInstanceParams(OpCode):
     ]
 
 
-class OpGrowDisk(OpCode):
+class OpInstanceGrowDisk(OpCode):
   """Grow a disk of an instance."""
   OP_ID = "OP_INSTANCE_GROW_DISK"
   OP_DSC_FIELD = "instance_name"
index 6b215d3..26c31f4 100644 (file)
@@ -1328,7 +1328,7 @@ class R_2_instances_name_disk_grow(baserlib.R_Generic):
     @return: a job id
 
     """
-    op = baserlib.FillOpcode(opcodes.OpGrowDisk, self.request_body, {
+    op = baserlib.FillOpcode(opcodes.OpInstanceGrowDisk, self.request_body, {
       "instance_name": self.items[0],
       "disk": int(self.items[1]),
       })
index 7899de5..60f758d 100755 (executable)
@@ -596,8 +596,8 @@ class Burner(object):
       Log("instance %s", instance, indent=1)
       for idx, growth in enumerate(self.disk_growth):
         if growth > 0:
-          op = opcodes.OpGrowDisk(instance_name=instance, disk=idx,
-                                  amount=growth, wait_for_sync=True)
+          op = opcodes.OpInstanceGrowDisk(instance_name=instance, disk=idx,
+                                          amount=growth, wait_for_sync=True)
           Log("increase disk/%s by %s MB", idx, growth, indent=2)
           self.ExecOrQueue(instance, [op])