From 60472d29c6a1238877501a043501f3915c5b0743 Mon Sep 17 00:00:00 2001 From: Iustin Pop <iustin@google.com> Date: Sat, 15 Jan 2011 12:57:04 +0100 Subject: [PATCH] Rename OpGrowDisk and LUGrowDisk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Iustin Pop <iustin@google.com> Reviewed-by: RenΓ© Nussbaumer <rn@google.com> --- lib/client/gnt_instance.py | 7 ++++--- lib/cmdlib.py | 2 +- lib/opcodes.py | 2 +- lib/rapi/rlib2.py | 2 +- tools/burnin | 4 ++-- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/client/gnt_instance.py b/lib/client/gnt_instance.py index cf6c8a306..0e38e64b4 100644 --- a/lib/client/gnt_instance.py +++ b/lib/client/gnt_instance.py @@ -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 diff --git a/lib/cmdlib.py b/lib/cmdlib.py index 116261f62..2cb3374fc 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -8589,7 +8589,7 @@ class LUNodeEvacuationStrategy(NoHooksLU): return result -class LUGrowDisk(LogicalUnit): +class LUInstanceGrowDisk(LogicalUnit): """Grow a disk of an instance. """ diff --git a/lib/opcodes.py b/lib/opcodes.py index 45f9e2ad3..1a1c01f57 100644 --- a/lib/opcodes.py +++ b/lib/opcodes.py @@ -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" diff --git a/lib/rapi/rlib2.py b/lib/rapi/rlib2.py index 6b215d317..26c31f42e 100644 --- a/lib/rapi/rlib2.py +++ b/lib/rapi/rlib2.py @@ -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]), }) diff --git a/tools/burnin b/tools/burnin index 7899de5b6..60f758d49 100755 --- a/tools/burnin +++ b/tools/burnin @@ -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]) -- GitLab