Commit 60472d29 authored by Iustin Pop's avatar Iustin Pop
Browse files

Rename OpGrowDisk and LUGrowDisk


Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
parent 019dbee1
#
#
# 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
......
......@@ -8589,7 +8589,7 @@ class LUNodeEvacuationStrategy(NoHooksLU):
return result
class LUGrowDisk(LogicalUnit):
class LUInstanceGrowDisk(LogicalUnit):
"""Grow a disk of an instance.
"""
......
......@@ -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"
......
......@@ -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]),
})
......
......@@ -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])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment