Rename OpQueryInstances and LUQueryInstances
authorIustin Pop <iustin@google.com>
Sat, 15 Jan 2011 11:57:45 +0000 (12:57 +0100)
committerIustin Pop <iustin@google.com>
Tue, 18 Jan 2011 11:47:13 +0000 (12:47 +0100)
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: RenĂ© Nussbaumer <rn@google.com>

NEWS
doc/design-2.0.rst
lib/client/gnt_instance.py
lib/cmdlib.py
lib/opcodes.py
lib/server/masterd.py
lib/watcher/__init__.py
tools/burnin

diff --git a/NEWS b/NEWS
index b515856..004d101 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -167,7 +167,7 @@ Version 2.3.0 rc0
 - Ignore failures while shutting down instances during failover from
   offline node
 - Exit daemon's bootstrap process only once daemon is ready
-- Export more information via ``LUQueryInstances``/remote API
+- Export more information via ``LUInstanceQuery``/remote API
 - Improved documentation, QA and unittests
 - RAPI daemon now watches ``rapi_users`` all the time and doesn't need a
   restart if the file was created or changed
index 9723c26..fcd6062 100644 (file)
@@ -964,7 +964,7 @@ the following ones:
 - ``OpInstanceCreate``, where the new hv and be parameters will be sent
   as dictionaries; note that all hv and be parameters are now optional,
   as the values can be instead taken from the cluster
-- ``OpQueryInstances``, where we have to be able to query these new
+- ``OpInstanceQuery``, where we have to be able to query these new
   parameters; the syntax for names will be ``hvparam/$NAME`` and
   ``beparam/$NAME`` for querying an individual parameter out of one
   dictionary, and ``hvparams``, respectively ``beparams``, for the whole
index aab49df..839cf13 100644 (file)
@@ -195,7 +195,7 @@ def _EnsureInstancesExist(client, names):
   @raise errors.OpPrereqError: in case any instance is missing
 
   """
-  # TODO: change LUQueryInstances to that it actually returns None
+  # TODO: change LUInstanceQuery to that it actually returns None
   # instead of raising an exception, or devise a better mechanism
   result = client.QueryInstances(names, ["name"], False)
   for orig_name, row in zip(names, result):
index 6317b4a..8569cf3 100644 (file)
@@ -5520,7 +5520,7 @@ def _RemoveInstance(lu, feedback_fn, instance, ignore_failures):
   lu.remove_locks[locking.LEVEL_INSTANCE] = instance.name
 
 
-class LUQueryInstances(NoHooksLU):
+class LUInstanceQuery(NoHooksLU):
   """Logical unit for querying instances.
 
   """
index c965b85..5b993ee 100644 (file)
@@ -963,7 +963,7 @@ class OpRecreateInstanceDisks(OpCode):
     ]
 
 
-class OpQueryInstances(OpCode):
+class OpInstanceQuery(OpCode):
   """Compute the list of instances."""
   OP_ID = "OP_INSTANCE_QUERY"
   OP_PARAMS = [
index 3f2aea1..f87696c 100644 (file)
@@ -1,7 +1,7 @@
 #
 #
 
-# Copyright (C) 2006, 2007, 2010 Google Inc.
+# Copyright (C) 2006, 2007, 2010, 2011 Google Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -278,8 +278,8 @@ class ClientOps:
       if use_locking:
         raise errors.OpPrereqError("Sync queries are not allowed",
                                    errors.ECODE_INVAL)
-      op = opcodes.OpQueryInstances(names=names, output_fields=fields,
-                                    use_locking=use_locking)
+      op = opcodes.OpInstanceQuery(names=names, output_fields=fields,
+                                   use_locking=use_locking)
       return self._Query(op)
 
     elif method == luxi.REQ_QUERY_NODES:
index 1d873d6..21ccba9 100644 (file)
@@ -1,7 +1,7 @@
 #
 #
 
-# Copyright (C) 2006, 2007, 2008, 2009, 2010 Google Inc.
+# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Google Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -415,8 +415,8 @@ def GetClusterData():
 
   """
   op1_fields = ["name", "status", "admin_state", "snodes"]
-  op1 = opcodes.OpQueryInstances(output_fields=op1_fields, names=[],
-                                 use_locking=True)
+  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)
index de726b2..4afef8d 100755 (executable)
@@ -694,8 +694,8 @@ class Burner(object):
     for pnode, snode, enode, instance in mytor:
       Log("instance %s", instance, indent=1)
       # read the full name of the instance
-      nam_op = opcodes.OpQueryInstances(output_fields=["name"],
-                                        names=[instance], use_locking=True)
+      nam_op = opcodes.OpInstanceQuery(output_fields=["name"],
+                                       names=[instance], use_locking=True)
       full_name = self.ExecOp(False, nam_op)[0][0]
 
       if self.opts.iallocator: