Remove deprecated “QueryLocks” LUXI request
authorMichael Hanselmann <hansmi@google.com>
Wed, 22 Feb 2012 11:58:05 +0000 (12:58 +0100)
committerMichael Hanselmann <hansmi@google.com>
Wed, 22 Feb 2012 12:03:36 +0000 (13:03 +0100)
This has been deprecated since Ganeti 2.4 and hasn't been used by
Ganeti's code since. I'm not aware of any external users.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

NEWS
lib/luxi.py
lib/server/masterd.py

diff --git a/NEWS b/NEWS
index 7a48763..10980fc 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,8 @@ Version 2.6.0 beta1
 - Replaced ``--disks`` option of ``gnt-instance replace-disks`` with a
   more flexible ``--disk`` option. Now disk size and mode can be changed
   upon recreation.
+- Removed deprecated ``QueryLocks`` LUXI request. Use
+  ``Query(what=QR_LOCK, ...)`` instead.
 
 
 Version 2.5.0 rc5
index bfebbc1..4ea89de 100644 (file)
@@ -34,7 +34,6 @@ import collections
 import time
 import errno
 import logging
-import warnings
 
 from ganeti import serializer
 from ganeti import constants
@@ -65,7 +64,6 @@ REQ_QUERY_EXPORTS = "QueryExports"
 REQ_QUERY_CONFIG_VALUES = "QueryConfigValues"
 REQ_QUERY_CLUSTER_INFO = "QueryClusterInfo"
 REQ_QUERY_TAGS = "QueryTags"
-REQ_QUERY_LOCKS = "QueryLocks"
 REQ_QUEUE_SET_DRAIN_FLAG = "SetDrainFlag"
 REQ_SET_WATCHER_PAUSE = "SetWatcherPause"
 
@@ -551,8 +549,3 @@ class Client(object):
 
   def QueryTags(self, kind, name):
     return self.CallMethod(REQ_QUERY_TAGS, (kind, name))
-
-  def QueryLocks(self, fields, sync):
-    warnings.warn("This LUXI call is deprecated and will be removed, use"
-                  " Query(\"%s\", ...) instead" % constants.QR_LOCK)
-    return self.CallMethod(REQ_QUERY_LOCKS, (fields, sync))
index 41df24e..23dff68 100644 (file)
@@ -393,13 +393,6 @@ class ClientOps:
       op = opcodes.OpTagsGet(kind=kind, name=name)
       return self._Query(op)
 
-    elif method == luxi.REQ_QUERY_LOCKS:
-      (fields, sync) = args
-      logging.info("Received locks query request")
-      if sync:
-        raise NotImplementedError("Synchronous queries are not implemented")
-      return self.server.context.glm.OldStyleQueryLocks(fields)
-
     elif method == luxi.REQ_QUEUE_SET_DRAIN_FLAG:
       (drain_flag, ) = args
       logging.info("Received queue drain flag change request to %s",