From 2237687b2d71036c0bbfb230347e435ac3f436ad Mon Sep 17 00:00:00 2001 From: Iustin Pop <iustin@google.com> Date: Sat, 15 Jan 2011 13:06:51 +0100 Subject: [PATCH] Rename OpQueryNodes and LUQueryNodes 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> --- doc/design-2.1.rst | 2 +- lib/cmdlib.py | 2 +- lib/opcodes.py | 2 +- lib/server/masterd.py | 4 ++-- lib/watcher/__init__.py | 4 ++-- tools/burnin | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/doc/design-2.1.rst b/doc/design-2.1.rst index 1b1f3c84c..a48f4fdbb 100644 --- a/doc/design-2.1.rst +++ b/doc/design-2.1.rst @@ -780,7 +780,7 @@ We will change Ganeti to use UUIDs for entity tracking, but in a staggered way. In 2.1, we will simply add an βuuidβ attribute to each of the instances, nodes and cluster itself. This will be reported on instance creation for nodes, and on node adds for the nodes. It will -be of course avaiblable for querying via the OpQueryNodes/Instance and +be of course avaiblable for querying via the OpNodeQuery/Instance and cluster information, and via RAPI as well. Note that Ganeti will not provide any way to change this attribute. diff --git a/lib/cmdlib.py b/lib/cmdlib.py index ed893ffbd..c2614cd7b 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -3598,7 +3598,7 @@ class _NodeQuery(_QueryBase): oob_support, lu.cfg.GetClusterInfo()) -class LUQueryNodes(NoHooksLU): +class LUNodeQuery(NoHooksLU): """Logical unit for querying nodes. """ diff --git a/lib/opcodes.py b/lib/opcodes.py index f44afb05c..62c23c294 100644 --- a/lib/opcodes.py +++ b/lib/opcodes.py @@ -638,7 +638,7 @@ class OpNodeAdd(OpCode): ] -class OpQueryNodes(OpCode): +class OpNodeQuery(OpCode): """Compute the list of nodes.""" OP_ID = "OP_NODE_QUERY" OP_PARAMS = [ diff --git a/lib/server/masterd.py b/lib/server/masterd.py index f87696cc4..6be328384 100644 --- a/lib/server/masterd.py +++ b/lib/server/masterd.py @@ -288,8 +288,8 @@ class ClientOps: if use_locking: raise errors.OpPrereqError("Sync queries are not allowed", errors.ECODE_INVAL) - op = opcodes.OpQueryNodes(names=names, output_fields=fields, - use_locking=use_locking) + op = opcodes.OpNodeQuery(names=names, output_fields=fields, + use_locking=use_locking) return self._Query(op) elif method == luxi.REQ_QUERY_GROUPS: diff --git a/lib/watcher/__init__.py b/lib/watcher/__init__.py index ca896ae16..fda20a175 100644 --- a/lib/watcher/__init__.py +++ b/lib/watcher/__init__.py @@ -418,8 +418,8 @@ def GetClusterData(): op1 = opcodes.OpInstanceQuery(output_fields=op1_fields, names=[], use_locking=True) op2_fields = ["name", "bootid", "offline"] - op2 = opcodes.OpQueryNodes(output_fields=op2_fields, names=[], - use_locking=True) + op2 = opcodes.OpNodeQuery(output_fields=op2_fields, names=[], + use_locking=True) job_id = client.SubmitJob([op1, op2]) diff --git a/tools/burnin b/tools/burnin index 7b2c4b7a4..c55a5699c 100755 --- a/tools/burnin +++ b/tools/burnin @@ -502,8 +502,8 @@ class Burner(object): else: names = [] try: - op = opcodes.OpQueryNodes(output_fields=["name", "offline", "drained"], - names=names, use_locking=True) + op = opcodes.OpNodeQuery(output_fields=["name", "offline", "drained"], + names=names, use_locking=True) result = self.ExecOp(True, op) except errors.GenericError, err: err_code, msg = cli.FormatError(err) -- GitLab