Commit ee3e37a7 authored by Iustin Pop's avatar Iustin Pop
Browse files

Rename OpShutdownInstance and LUShutdownInstance


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 9a3cc7ae
......@@ -718,7 +718,7 @@ def _ShutdownInstance(name, opts):
@return: the opcode needed for the operation
"""
return opcodes.OpShutdownInstance(instance_name=name,
return opcodes.OpInstanceShutdown(instance_name=name,
timeout=opts.timeout,
ignore_offline_nodes=opts.ignore_offline)
......
......@@ -5124,7 +5124,7 @@ class LUInstanceReboot(LogicalUnit):
self.cfg.MarkInstanceUp(instance.name)
class LUShutdownInstance(LogicalUnit):
class LUInstanceShutdown(LogicalUnit):
"""Shutdown an instance.
"""
......
......@@ -838,7 +838,7 @@ class OpStartupInstance(OpCode):
]
class OpShutdownInstance(OpCode):
class OpInstanceShutdown(OpCode):
"""Shutdown an instance."""
OP_ID = "OP_INSTANCE_SHUTDOWN"
OP_DSC_FIELD = "instance_name"
......
......@@ -1013,7 +1013,7 @@ class R_2_instances_name_shutdown(baserlib.R_Generic):
"""
instance_name = self.items[0]
op = opcodes.OpShutdownInstance(instance_name=instance_name,
op = opcodes.OpInstanceShutdown(instance_name=instance_name,
dry_run=bool(self.dryRun()))
return baserlib.SubmitJob([op])
......@@ -1032,7 +1032,7 @@ def _ParseInstanceReinstallRequest(name, data):
osparams = baserlib.CheckParameter(data, "osparams", default=None)
ops = [
opcodes.OpShutdownInstance(instance_name=name),
opcodes.OpInstanceShutdown(instance_name=name),
opcodes.OpInstanceReinstall(instance_name=name, os_type=ostype,
osparams=osparams),
]
......
......@@ -366,7 +366,7 @@ class TestParseInstanceReinstallRequest(testutils.GanetiTestCase):
def _Check(self, ops, name):
expcls = [
opcodes.OpShutdownInstance,
opcodes.OpInstanceShutdown,
opcodes.OpInstanceReinstall,
opcodes.OpStartupInstance,
]
......
......@@ -752,7 +752,7 @@ class Burner(object):
@staticmethod
def StopInstanceOp(instance):
"""Stop given instance."""
return opcodes.OpShutdownInstance(instance_name=instance)
return opcodes.OpInstanceShutdown(instance_name=instance)
@staticmethod
def 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