InstanceIpToNodePrimaryIpQuery
This implements CONFD_REQ_NODE_PIP_BY_INSTANCE_IP, and maps instance ipsto primary node ips.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
querylib: abstract a couple of common errors
Rather than composing them every time, we'll keep "ready-made" tuplesfor unknown entries and internal errors (which is, yet, unused)
Add NodeRoleQuery
This implements CONFD_REQ_NODE_ROLE_BYNAME.
Remove unused imports from confd files
confd.server and daemons/ganeti-confd import a few modules they don'tactually use. Clean them up.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
ConfdProcessor fix init docstring
The message is an error deriving from some code moving/refactoringhappening before the initial submission
Implement confd queries
We'll start with a simple ping query, which returns ok if it gets noquery argument, and an error if it gets any. Also non-implemented queryare handled by the base ConfdQuery class, so we don't have tospecial-case them in ConfdProcessor anymore....
ConfdProcessor: move verification to init
During a query execution we currently verify whether we have that querysupported in our dispatch table. Since it's an error not to have itanyway, we move this verification to the class creation, erroring out...
confd.server.ConfdProcessor
A ConfdProcessor is the job processor for a confd query.It's responsible for all the processing, from unpacking it, verifyingit, to calculating the result.
Add empty ganeti.confd module
It will be used for the confd server code, and for a basic clientlibrary.
View revisions
Also available in: Atom