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

Rename OpRenameGroup and LURenameGroup


Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
parent 4d1baa51
......@@ -176,7 +176,7 @@ def RenameGroup(opts, args):
"""
old_name, new_name = args
op = opcodes.OpRenameGroup(old_name=old_name, new_name=new_name)
op = opcodes.OpGroupRename(old_name=old_name, new_name=new_name)
SubmitOpCode(op, opts=opts)
......
......@@ -10314,7 +10314,7 @@ class LUGroupRemove(LogicalUnit):
self.remove_locks[locking.LEVEL_NODEGROUP] = self.group_uuid
class LURenameGroup(LogicalUnit):
class LUGroupRename(LogicalUnit):
HPATH = "group-rename"
HTYPE = constants.HTYPE_GROUP
REQ_BGL = False
......
......@@ -1068,7 +1068,7 @@ class OpGroupRemove(OpCode):
]
class OpRenameGroup(OpCode):
class OpGroupRename(OpCode):
"""Rename a node group in the cluster."""
OP_ID = "OP_GROUP_RENAME"
OP_DSC_FIELD = "old_name"
......
......@@ -658,14 +658,14 @@ def _ParseRenameGroupRequest(name, data, dry_run):
@type dry_run: bool
@param dry_run: whether to perform a dry run
@rtype: L{opcodes.OpRenameGroup}
@rtype: L{opcodes.OpGroupRename}
@return: Node group rename opcode
"""
old_name = name
new_name = baserlib.CheckParameter(data, "new_name")
return opcodes.OpRenameGroup(old_name=old_name, new_name=new_name,
return opcodes.OpGroupRename(old_name=old_name, new_name=new_name,
dry_run=dry_run)
......
......@@ -423,7 +423,7 @@ class TestParseRenameGroupRequest(testutils.GanetiTestCase):
op = self.Parse(name, data, False)
self.assert_(isinstance(op, opcodes.OpRenameGroup))
self.assert_(isinstance(op, opcodes.OpGroupRename))
self.assertEqual(op.old_name, name)
self.assertEqual(op.new_name, "ua0aiyoo")
self.assertFalse(op.dry_run)
......@@ -436,7 +436,7 @@ class TestParseRenameGroupRequest(testutils.GanetiTestCase):
op = self.Parse(name, data, True)
self.assert_(isinstance(op, opcodes.OpRenameGroup))
self.assert_(isinstance(op, opcodes.OpGroupRename))
self.assertEqual(op.old_name, name)
self.assertEqual(op.new_name, "ua0aiyoo")
self.assert_(op.dry_run)
......
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