Commit 75c866c2 authored by Iustin Pop's avatar Iustin Pop
Browse files

Rename OpMigrateInstance and LUMigrateInstance


Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
parent 60472d29
......@@ -843,7 +843,7 @@ def MigrateInstance(opts, args):
else:
mode = opts.migration_mode
op = opcodes.OpMigrateInstance(instance_name=instance_name, mode=mode,
op = opcodes.OpInstanceMigrate(instance_name=instance_name, mode=mode,
cleanup=opts.cleanup)
SubmitOpCode(op, cl=cl, opts=opts)
return 0
......
......@@ -5688,7 +5688,7 @@ class LUInstanceFailover(LogicalUnit):
(instance.name, target_node, msg))
class LUMigrateInstance(LogicalUnit):
class LUInstanceMigrate(LogicalUnit):
"""Migrate an instance.
This is migration without shutting down, compared to the failover,
......
......@@ -886,7 +886,7 @@ class OpInstanceFailover(OpCode):
]
class OpMigrateInstance(OpCode):
class OpInstanceMigrate(OpCode):
"""Migrate an instance.
This migrates (without shutting down an instance) to its secondary
......
......@@ -1207,7 +1207,7 @@ class R_2_instances_name_export(baserlib.R_Generic):
def _ParseMigrateInstanceRequest(name, data):
"""Parses a request for an instance migration.
@rtype: L{opcodes.OpMigrateInstance}
@rtype: L{opcodes.OpInstanceMigrate}
@return: Instance migration opcode
"""
......@@ -1215,7 +1215,7 @@ def _ParseMigrateInstanceRequest(name, data):
cleanup = baserlib.CheckParameter(data, "cleanup", exptype=bool,
default=False)
return opcodes.OpMigrateInstance(instance_name=name, mode=mode,
return opcodes.OpInstanceMigrate(instance_name=name, mode=mode,
cleanup=cleanup)
......
......@@ -239,7 +239,7 @@ class TestParseMigrateInstanceRequest(testutils.GanetiTestCase):
"mode": mode,
}
op = self.Parse(name, data)
self.assert_(isinstance(op, opcodes.OpMigrateInstance))
self.assert_(isinstance(op, opcodes.OpInstanceMigrate))
self.assertEqual(op.instance_name, name)
self.assertEqual(op.mode, mode)
self.assertEqual(op.cleanup, cleanup)
......@@ -248,7 +248,7 @@ class TestParseMigrateInstanceRequest(testutils.GanetiTestCase):
name = "instnohZeex0"
op = self.Parse(name, {})
self.assert_(isinstance(op, opcodes.OpMigrateInstance))
self.assert_(isinstance(op, opcodes.OpInstanceMigrate))
self.assertEqual(op.instance_name, name)
self.assertEqual(op.mode, None)
self.assertFalse(op.cleanup)
......
......@@ -671,10 +671,10 @@ class Burner(object):
Log("Migrating instances")
for instance in self.instances:
Log("instance %s", instance, indent=1)
op1 = opcodes.OpMigrateInstance(instance_name=instance, mode=None,
op1 = opcodes.OpInstanceMigrate(instance_name=instance, mode=None,
cleanup=False)
op2 = opcodes.OpMigrateInstance(instance_name=instance, mode=None,
op2 = opcodes.OpInstanceMigrate(instance_name=instance, mode=None,
cleanup=True)
Log("migration and migration cleanup", indent=2)
self.ExecOrQueue(instance, [op1, op2])
......
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