Commit 5659e2e2 authored by Iustin Pop's avatar Iustin Pop
Browse files

Rename OpRenameInstance and LURenameInstance


Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
parent 3cd2d4b1
......@@ -561,7 +561,7 @@ def RenameInstance(opts, args):
" that '%s' is a FQDN. Continue?" % args[1]):
return 1
op = opcodes.OpRenameInstance(instance_name=args[0],
op = opcodes.OpInstanceRename(instance_name=args[0],
new_name=args[1],
ip_check=opts.ip_check,
name_check=opts.name_check)
......
......@@ -5332,7 +5332,7 @@ class LUInstanceRecreateDisks(LogicalUnit):
_CreateDisks(self, self.instance, to_skip=to_skip)
class LURenameInstance(LogicalUnit):
class LUInstanceRename(LogicalUnit):
"""Rename an instance.
"""
......
......@@ -814,7 +814,7 @@ class OpInstanceRemove(OpCode):
]
class OpRenameInstance(OpCode):
class OpInstanceRename(OpCode):
"""Rename an instance."""
OP_ID = "OP_INSTANCE_RENAME"
OP_PARAMS = [
......
......@@ -1239,7 +1239,7 @@ class R_2_instances_name_migrate(baserlib.R_Generic):
def _ParseRenameInstanceRequest(name, data):
"""Parses a request for renaming an instance.
@rtype: L{opcodes.OpRenameInstance}
@rtype: L{opcodes.OpInstanceRename}
@return: Instance rename opcode
"""
......@@ -1247,7 +1247,7 @@ def _ParseRenameInstanceRequest(name, data):
ip_check = baserlib.CheckParameter(data, "ip_check", default=True)
name_check = baserlib.CheckParameter(data, "name_check", default=True)
return opcodes.OpRenameInstance(instance_name=name, new_name=new_name,
return opcodes.OpInstanceRename(instance_name=name, new_name=new_name,
name_check=name_check, ip_check=ip_check)
......
......@@ -273,7 +273,7 @@ class TestParseRenameInstanceRequest(testutils.GanetiTestCase):
}
op = self.Parse(name, data)
self.assert_(isinstance(op, opcodes.OpRenameInstance))
self.assert_(isinstance(op, opcodes.OpInstanceRename))
self.assertEqual(op.instance_name, name)
self.assertEqual(op.new_name, new_name)
self.assertEqual(op.ip_check, ip_check)
......@@ -288,7 +288,7 @@ class TestParseRenameInstanceRequest(testutils.GanetiTestCase):
}
op = self.Parse(name, data)
self.assert_(isinstance(op, opcodes.OpRenameInstance))
self.assert_(isinstance(op, opcodes.OpInstanceRename))
self.assertEqual(op.instance_name, name)
self.assertEqual(op.new_name, new_name)
self.assert_(op.ip_check)
......
......@@ -761,7 +761,7 @@ class Burner(object):
@staticmethod
def RenameInstanceOp(instance, instance_new):
"""Rename instance."""
return opcodes.OpRenameInstance(instance_name=instance,
return opcodes.OpInstanceRename(instance_name=instance,
new_name=instance_new)
@_DoCheckInstances
......
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