Commit 5073fd8f authored by Iustin Pop's avatar Iustin Pop
Browse files

Rename OpReinstallInstance and LUReinstallInstance


Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 6b273e78
......@@ -504,7 +504,7 @@ def ReinstallInstance(opts, args):
jex = JobExecutor(verbose=multi_on, opts=opts)
for instance_name in inames:
op = opcodes.OpReinstallInstance(instance_name=instance_name,
op = opcodes.OpInstanceReinstall(instance_name=instance_name,
os_type=os_name,
force_variant=opts.force_variant,
osparams=opts.osparams)
......
......@@ -5186,7 +5186,7 @@ class LUShutdownInstance(LogicalUnit):
_ShutdownInstanceDisks(self, instance)
class LUReinstallInstance(LogicalUnit):
class LUInstanceReinstall(LogicalUnit):
"""Reinstall an instance.
"""
......
......@@ -791,7 +791,7 @@ class OpInstanceCreate(OpCode):
]
class OpReinstallInstance(OpCode):
class OpInstanceReinstall(OpCode):
"""Reinstall an instance's OS."""
OP_ID = "OP_INSTANCE_REINSTALL"
OP_DSC_FIELD = "instance_name"
......
......@@ -1033,7 +1033,7 @@ def _ParseInstanceReinstallRequest(name, data):
ops = [
opcodes.OpShutdownInstance(instance_name=name),
opcodes.OpReinstallInstance(instance_name=name, os_type=ostype,
opcodes.OpInstanceReinstall(instance_name=name, os_type=ostype,
osparams=osparams),
]
......
......@@ -367,7 +367,7 @@ class TestParseInstanceReinstallRequest(testutils.GanetiTestCase):
def _Check(self, ops, name):
expcls = [
opcodes.OpShutdownInstance,
opcodes.OpReinstallInstance,
opcodes.OpInstanceReinstall,
opcodes.OpStartupInstance,
]
......
......@@ -815,9 +815,9 @@ class Burner(object):
for instance in self.instances:
Log("instance %s", instance, indent=1)
op1 = self.StopInstanceOp(instance)
op2 = opcodes.OpReinstallInstance(instance_name=instance)
op2 = opcodes.OpInstanceReinstall(instance_name=instance)
Log("reinstall without passing the OS", indent=2)
op3 = opcodes.OpReinstallInstance(instance_name=instance,
op3 = opcodes.OpInstanceReinstall(instance_name=instance,
os_type=self.opts.os)
Log("reinstall specifying the OS", indent=2)
op4 = self.StartInstanceOp(instance)
......
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