Package ganeti :: Package confd :: Module server :: Class ConfdProcessor
[hide private]
[frames] | no frames]

Class ConfdProcessor

source code


A processor for confd requests.

Instance Methods [hide private]
 
__init__(self)
Constructor for ConfdProcessor
source code
 
Enable(self) source code
 
Disable(self) source code
 
ExecQuery(self, payload_in, ip, port)
Process a single UDP request from a client.
source code
 
ExtractRequest(self, payload)
Extracts a ConfdRequest object from a serialized hmac signed string.
source code
(objects.ConfdReply, string)
ProcessRequest(self, request)
Process one ConfdRequest request, and produce an answer
source code
 
PackReply(self, reply, rsalt)
Serialize and sign the given reply, with salt rsalt
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  DISPATCH_TABLE = {constants.CONFD_REQ_PING: querylib.PingQuery...
Instance Variables [hide private]
  disabled
whether confd serving is disabled
  reader
confd SimpleConfigReader
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

Constructor for ConfdProcessor

Overrides: object.__init__

ExecQuery(self, payload_in, ip, port)

source code 

Process a single UDP request from a client.

Parameters:
  • payload_in (string) - request raw data
  • ip (string) - source ip address
  • port (source port) - integer

ExtractRequest(self, payload)

source code 

Extracts a ConfdRequest object from a serialized hmac signed string.

This functions also performs signature/timestamp validation.

ProcessRequest(self, request)

source code 

Process one ConfdRequest request, and produce an answer

Parameters:
Returns: (objects.ConfdReply, string)
tuple of reply and salt to add to the signature

PackReply(self, reply, rsalt)

source code 

Serialize and sign the given reply, with salt rsalt

Parameters:

Class Variable Details [hide private]

DISPATCH_TABLE

Value:
{constants.CONFD_REQ_PING: querylib.PingQuery, constants.CONFD_REQ_NOD\
E_ROLE_BYNAME: querylib.NodeRoleQuery, constants.CONFD_REQ_NODE_PIP_BY\
_INSTANCE_IP: querylib.InstanceIpToNodePrimaryIpQuery, constants.CONFD\
_REQ_CLUSTER_MASTER: querylib.ClusterMasterQuery, constants.CONFD_REQ_\
NODE_PIP_LIST: querylib.NodesPipsQuery, constants.CONFD_REQ_MC_PIP_LIS\
T: querylib.MasterCandidatesPipsQuery, constants.CONFD_REQ_INSTANCES_I\
PS_LIST: querylib.InstancesIpsQuery,}