From ea1518af299dd65badff08462fe85ca4916ca97d Mon Sep 17 00:00:00 2001
From: Guido Trotter <ultrotter@google.com>
Date: Thu, 6 Aug 2009 18:08:34 +0100
Subject: [PATCH] constants: confd query types

Initially confd will support only two queries:

CONFD_REQ_NODE_ROLE_BYNAME
Given a node name, return its role.

CONFD_REQ_NODE_PIP_BY_INSTANCE_IP
Given an instance ip, return its node primary ip.
This rather weird query is the basis for ganeti nbma lookup.

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
---
 lib/constants.py | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/lib/constants.py b/lib/constants.py
index 91ce86ba9..ffad1aac9 100644
--- a/lib/constants.py
+++ b/lib/constants.py
@@ -617,3 +617,14 @@ NICC_DEFAULTS = {
   }
 
 MASTER_POOL_SIZE_DEFAULT = 10
+
+CONFD_PROTOCOL_VERSION = 1
+
+CONFD_REQ_NODE_ROLE_BYNAME = 1
+CONFD_REQ_NODE_PIP_BY_INSTANCE_IP = 2
+
+CONFD_REQS = frozenset([
+  CONFD_REQ_NODE_ROLE_BYNAME,
+  CONFD_REQ_NODE_PIP_BY_INSTANCE_IP,
+  ])
+
-- 
GitLab