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

Rename OpStartupInstance and LUStartupInstance


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 ee3e37a7
......@@ -679,7 +679,7 @@ def _StartupInstance(name, opts):
@return: the opcode needed for the operation
"""
op = opcodes.OpStartupInstance(instance_name=name,
op = opcodes.OpInstanceStartup(instance_name=name,
force=opts.force,
ignore_offline_nodes=opts.ignore_offline)
# do not add these parameters to the opcode unless they're defined
......
......@@ -4948,7 +4948,7 @@ def _CheckNodesFreeDiskOnVG(lu, nodenames, vg, requested):
errors.ECODE_NORES)
class LUStartupInstance(LogicalUnit):
class LUInstanceStartup(LogicalUnit):
"""Starts an instance.
"""
......
......@@ -825,7 +825,7 @@ class OpInstanceRename(OpCode):
]
class OpStartupInstance(OpCode):
class OpInstanceStartup(OpCode):
"""Startup an instance."""
OP_ID = "OP_INSTANCE_STARTUP"
OP_DSC_FIELD = "instance_name"
......
......@@ -995,7 +995,7 @@ class R_2_instances_name_startup(baserlib.R_Generic):
"""
instance_name = self.items[0]
force_startup = bool(self._checkIntVariable('force'))
op = opcodes.OpStartupInstance(instance_name=instance_name,
op = opcodes.OpInstanceStartup(instance_name=instance_name,
force=force_startup,
dry_run=bool(self.dryRun()))
......@@ -1038,7 +1038,7 @@ def _ParseInstanceReinstallRequest(name, data):
]
if start:
ops.append(opcodes.OpStartupInstance(instance_name=name, force=False))
ops.append(opcodes.OpInstanceStartup(instance_name=name, force=False))
return ops
......
......@@ -399,7 +399,7 @@ class Instance(object):
"""Encapsulates the start of an instance.
"""
op = opcodes.OpStartupInstance(instance_name=self.name, force=False)
op = opcodes.OpInstanceStartup(instance_name=self.name, force=False)
cli.SubmitOpCode(op, cl=client)
def ActivateDisks(self):
......
......@@ -368,7 +368,7 @@ class TestParseInstanceReinstallRequest(testutils.GanetiTestCase):
expcls = [
opcodes.OpInstanceShutdown,
opcodes.OpInstanceReinstall,
opcodes.OpStartupInstance,
opcodes.OpInstanceStartup,
]
self.assert_(compat.all(isinstance(op, exp)
......
......@@ -757,7 +757,7 @@ class Burner(object):
@staticmethod
def StartInstanceOp(instance):
"""Start given instance."""
return opcodes.OpStartupInstance(instance_name=instance, force=False)
return opcodes.OpInstanceStartup(instance_name=instance, force=False)
@staticmethod
def RenameInstanceOp(instance, instance_new):
......
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