@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)
self.cfg.MarkInstanceUp(instance.name)
-class LUShutdownInstance(LogicalUnit):
+class LUInstanceShutdown(LogicalUnit):
"""Shutdown an instance.
"""
]
-class OpShutdownInstance(OpCode):
+class OpInstanceShutdown(OpCode):
"""Shutdown an instance."""
OP_ID = "OP_INSTANCE_SHUTDOWN"
OP_DSC_FIELD = "instance_name"
"""
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])
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),
]
def _Check(self, ops, name):
expcls = [
- opcodes.OpShutdownInstance,
+ opcodes.OpInstanceShutdown,
opcodes.OpInstanceReinstall,
opcodes.OpStartupInstance,
]
@staticmethod
def StopInstanceOp(instance):
"""Stop given instance."""
- return opcodes.OpShutdownInstance(instance_name=instance)
+ return opcodes.OpInstanceShutdown(instance_name=instance)
@staticmethod
def StartInstanceOp(instance):