From c6afb1cabc48d2082ad7b19743c5a3243f5c2e97 Mon Sep 17 00:00:00 2001 From: Iustin Pop <iustin@google.com> Date: Sat, 15 Jan 2011 13:06:57 +0100 Subject: [PATCH] Rename OpGetTags and LUGetTags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Iustin Pop <iustin@google.com> Reviewed-by: RenΓ© Nussbaumer <rn@google.com> Reviewed-by: Michael Hanselmann <hansmi@google.com> --- lib/cmdlib.py | 2 +- lib/opcodes.py | 2 +- lib/server/masterd.py | 2 +- test/ganeti.jqueue_unittest.py | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/cmdlib.py b/lib/cmdlib.py index f6728cb3d..e03bf4907 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -10414,7 +10414,7 @@ class TagsLU(NoHooksLU): # pylint: disable-msg=W0223 str(self.op.kind), errors.ECODE_INVAL) -class LUGetTags(TagsLU): +class LUTagsGet(TagsLU): """Returns the tags of a given object. """ diff --git a/lib/opcodes.py b/lib/opcodes.py index 3c7355fe0..505d32074 100644 --- a/lib/opcodes.py +++ b/lib/opcodes.py @@ -1156,7 +1156,7 @@ class OpBackupRemove(OpCode): # Tags opcodes -class OpGetTags(OpCode): +class OpTagsGet(OpCode): """Returns the tags of the given object.""" OP_ID = "OP_TAGS_GET" OP_DSC_FIELD = "name" diff --git a/lib/server/masterd.py b/lib/server/masterd.py index 6be328384..72b1466de 100644 --- a/lib/server/masterd.py +++ b/lib/server/masterd.py @@ -324,7 +324,7 @@ class ClientOps: elif method == luxi.REQ_QUERY_TAGS: kind, name = args logging.info("Received tags query request") - op = opcodes.OpGetTags(kind=kind, name=name) + op = opcodes.OpTagsGet(kind=kind, name=name) return self._Query(op) elif method == luxi.REQ_QUERY_LOCKS: diff --git a/test/ganeti.jqueue_unittest.py b/test/ganeti.jqueue_unittest.py index 1ca15d23b..913792724 100755 --- a/test/ganeti.jqueue_unittest.py +++ b/test/ganeti.jqueue_unittest.py @@ -268,7 +268,7 @@ class TestQueuedOpCode(unittest.TestCase): self.assertEqual(op.priority, constants.OP_PRIO_HIGH) 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) _Check(op1) op2 = jqueue._QueuedOpCode.Restore(op1.Serialize()) @@ -284,7 +284,7 @@ class TestQueuedJob(unittest.TestCase): def testDefaults(self): job_id = 4260 ops = [ - opcodes.OpGetTags(), + opcodes.OpTagsGet(), opcodes.OpTestDelay(), ] @@ -314,7 +314,7 @@ class TestQueuedJob(unittest.TestCase): def testPriority(self): job_id = 4283 ops = [ - opcodes.OpGetTags(priority=constants.OP_PRIO_DEFAULT), + opcodes.OpTagsGet(priority=constants.OP_PRIO_DEFAULT), opcodes.OpTestDelay(), ] -- GitLab