Commit 934704ae authored by Iustin Pop's avatar Iustin Pop
Browse files

Rename OpAssignGroupNodes and LUAssignGroupNodes


Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
parent fabf1731
......@@ -63,7 +63,7 @@ def AssignNodes(opts, args):
group_name = args[0]
node_names = args[1:]
op = opcodes.OpAssignGroupNodes(group_name=group_name, nodes=node_names,
op = opcodes.OpGroupAssignNodes(group_name=group_name, nodes=node_names,
force=opts.force)
SubmitOpCode(op, opts=opts)
......
......@@ -9975,7 +9975,7 @@ class LUGroupAdd(LogicalUnit):
del self.remove_locks[locking.LEVEL_NODEGROUP]
class LUAssignGroupNodes(NoHooksLU):
class LUGroupAssignNodes(NoHooksLU):
"""Logical unit for assigning nodes to groups.
"""
......
......@@ -1027,7 +1027,7 @@ class OpGroupAdd(OpCode):
]
class OpAssignGroupNodes(OpCode):
class OpGroupAssignNodes(OpCode):
"""Assign nodes to a node group."""
OP_ID = "OP_GROUP_ASSIGN_NODES"
OP_DSC_FIELD = "group_name"
......
......@@ -695,7 +695,7 @@ class R_2_groups_name_assign_nodes(baserlib.R_Generic):
@return: a job id
"""
op = baserlib.FillOpcode(opcodes.OpAssignGroupNodes, self.request_body, {
op = baserlib.FillOpcode(opcodes.OpGroupAssignNodes, self.request_body, {
"group_name": self.items[0],
"dry_run": self.dryRun(),
"force": self.useForce(),
......
......@@ -157,7 +157,7 @@ class TestLUQuery(unittest.TestCase):
"xyz")
class TestLUAssignGroupNodes(unittest.TestCase):
class TestLUGroupAssignNodes(unittest.TestCase):
def testCheckAssignmentForSplitInstances(self):
node_data = dict((name, objects.Node(name=name, group=group))
......@@ -190,7 +190,7 @@ class TestLUAssignGroupNodes(unittest.TestCase):
# Test first with the existing state.
(new, prev) = \
cmdlib.LUAssignGroupNodes.CheckAssignmentForSplitInstances([],
cmdlib.LUGroupAssignNodes.CheckAssignmentForSplitInstances([],
node_data,
instance_data)
......@@ -199,7 +199,7 @@ class TestLUAssignGroupNodes(unittest.TestCase):
# And now some changes.
(new, prev) = \
cmdlib.LUAssignGroupNodes.CheckAssignmentForSplitInstances([("n1b",
cmdlib.LUGroupAssignNodes.CheckAssignmentForSplitInstances([("n1b",
"g3")],
node_data,
instance_data)
......
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