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

Rename OpGetTags and LUGetTags


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 3f0ab95f
...@@ -10414,7 +10414,7 @@ class TagsLU(NoHooksLU): # pylint: disable-msg=W0223 ...@@ -10414,7 +10414,7 @@ class TagsLU(NoHooksLU): # pylint: disable-msg=W0223
str(self.op.kind), errors.ECODE_INVAL) str(self.op.kind), errors.ECODE_INVAL)
class LUGetTags(TagsLU): class LUTagsGet(TagsLU):
"""Returns the tags of a given object. """Returns the tags of a given object.
""" """
......
...@@ -1156,7 +1156,7 @@ class OpBackupRemove(OpCode): ...@@ -1156,7 +1156,7 @@ class OpBackupRemove(OpCode):
# Tags opcodes # Tags opcodes
class OpGetTags(OpCode): class OpTagsGet(OpCode):
"""Returns the tags of the given object.""" """Returns the tags of the given object."""
OP_ID = "OP_TAGS_GET" OP_ID = "OP_TAGS_GET"
OP_DSC_FIELD = "name" OP_DSC_FIELD = "name"
......
...@@ -324,7 +324,7 @@ class ClientOps: ...@@ -324,7 +324,7 @@ class ClientOps:
elif method == luxi.REQ_QUERY_TAGS: elif method == luxi.REQ_QUERY_TAGS:
kind, name = args kind, name = args
logging.info("Received tags query request") logging.info("Received tags query request")
op = opcodes.OpGetTags(kind=kind, name=name) op = opcodes.OpTagsGet(kind=kind, name=name)
return self._Query(op) return self._Query(op)
elif method == luxi.REQ_QUERY_LOCKS: elif method == luxi.REQ_QUERY_LOCKS:
......
...@@ -268,7 +268,7 @@ class TestQueuedOpCode(unittest.TestCase): ...@@ -268,7 +268,7 @@ class TestQueuedOpCode(unittest.TestCase):
self.assertEqual(op.priority, constants.OP_PRIO_HIGH) self.assertEqual(op.priority, constants.OP_PRIO_HIGH)
self.assertEqual(op.status, constants.OP_STATUS_QUEUED) self.assertEqual(op.status, constants.OP_STATUS_QUEUED)
inpop = opcodes.OpGetTags(priority=constants.OP_PRIO_HIGH) inpop = opcodes.OpTagsGet(priority=constants.OP_PRIO_HIGH)
op1 = jqueue._QueuedOpCode(inpop) op1 = jqueue._QueuedOpCode(inpop)
_Check(op1) _Check(op1)
op2 = jqueue._QueuedOpCode.Restore(op1.Serialize()) op2 = jqueue._QueuedOpCode.Restore(op1.Serialize())
...@@ -284,7 +284,7 @@ class TestQueuedJob(unittest.TestCase): ...@@ -284,7 +284,7 @@ class TestQueuedJob(unittest.TestCase):
def testDefaults(self): def testDefaults(self):
job_id = 4260 job_id = 4260
ops = [ ops = [
opcodes.OpGetTags(), opcodes.OpTagsGet(),
opcodes.OpTestDelay(), opcodes.OpTestDelay(),
] ]
...@@ -314,7 +314,7 @@ class TestQueuedJob(unittest.TestCase): ...@@ -314,7 +314,7 @@ class TestQueuedJob(unittest.TestCase):
def testPriority(self): def testPriority(self):
job_id = 4283 job_id = 4283
ops = [ ops = [
opcodes.OpGetTags(priority=constants.OP_PRIO_DEFAULT), opcodes.OpTagsGet(priority=constants.OP_PRIO_DEFAULT),
opcodes.OpTestDelay(), opcodes.OpTestDelay(),
] ]
......
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