Add a new unused confd query
authorIustin Pop <iustin@google.com>
Mon, 16 Jul 2012 13:49:04 +0000 (15:49 +0200)
committerIustin Pop <iustin@google.com>
Thu, 19 Jul 2012 08:02:01 +0000 (10:02 +0200)
This is not implemented currently.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: RenĂ© Nussbaumer <rn@google.com>

lib/confd/querylib.py
lib/confd/server.py
lib/constants.py

index a05a0e8..79467b5 100644 (file)
@@ -1,7 +1,7 @@
 #
 #
 
-# Copyright (C) 2009 Google Inc.
+# Copyright (C) 2009, 2012 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
@@ -292,3 +292,11 @@ class InstancesIpsQuery(ConfdQuery):
     answer = self.reader.GetInstancesIps(link)
 
     return status, answer
+
+
+class NodeDrbdQuery(ConfdQuery):
+  """A query for node drbd minors.
+
+  This is not implemented in the Python confd.
+
+  """
index d0a3461..d96729d 100644 (file)
@@ -1,7 +1,7 @@
 #
 #
 
-# Copyright (C) 2009 Google Inc.
+# Copyright (C) 2009, 2012 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
@@ -55,6 +55,7 @@ class ConfdProcessor(object):
     constants.CONFD_REQ_NODE_PIP_LIST: querylib.NodesPipsQuery,
     constants.CONFD_REQ_MC_PIP_LIST: querylib.MasterCandidatesPipsQuery,
     constants.CONFD_REQ_INSTANCES_IPS_LIST: querylib.InstancesIpsQuery,
+    constants.CONFD_REQ_NODE_DRBD: querylib.NodeDrbdQuery,
     }
 
   def __init__(self):
index b76863e..7f85bad 100644 (file)
@@ -1960,6 +1960,7 @@ CONFD_REQ_CLUSTER_MASTER = 3
 CONFD_REQ_NODE_PIP_LIST = 4
 CONFD_REQ_MC_PIP_LIST = 5
 CONFD_REQ_INSTANCES_IPS_LIST = 6
+CONFD_REQ_NODE_DRBD = 7
 
 # Confd request query fields. These are used to narrow down queries.
 # These must be strings rather than integers, because json-encoding
@@ -1981,6 +1982,7 @@ CONFD_REQS = frozenset([
   CONFD_REQ_NODE_PIP_LIST,
   CONFD_REQ_MC_PIP_LIST,
   CONFD_REQ_INSTANCES_IPS_LIST,
+  CONFD_REQ_NODE_DRBD,
   ])
 
 CONFD_REPL_STATUS_OK = 0