class documentation

class AbstractClient(object):

Known subclasses: ganeti.luxi.Client, ganeti.rpc.client.AbstractStubClient

View In Hierarchy

High-level client abstraction.

This uses a backing Transport-like class on top of which it implements data serialization/deserialization.

Method __init__ Constructor for the Client class.
Method CallMethod Send a generic request and return the response.
Method Close Close the underlying connection.
Method close Same as Close, to be used with contextlib.closing(...).
Instance Variable allow_non_master Undocumented
Instance Variable timeouts Undocumented
Instance Variable transport Undocumented
Instance Variable transport_class Undocumented
Instance Variable version Undocumented
Method _CloseTransport Close the transport, ignoring errors.
Method _GetAddress Returns the socket address
Method _InitTransport (Re)initialize the transport if needed.
Method _SendMethodCall Undocumented
def __init__(self, timeouts=None, transport=t.Transport, allow_non_master=False):

Constructor for the Client class.

If timeout is not passed, the default timeouts of the transport class are used.

Parameters
timeouts:list of intstimeouts to be used on connect and read/write
transport:Transport or another compatible classthe underlying transport to use for the RPC calls
allow_non_master:boolskip checks for the master node on errors
def CallMethod(self, method, args):

Send a generic request and return the response.

def Close(self):

Close the underlying connection.

def close(self):

Same as Close, to be used with contextlib.closing(...).

allow_non_master =

Undocumented

timeouts =

Undocumented

transport =
overridden in ganeti.metad.Client

Undocumented

transport_class =

Undocumented

version =
overridden in ganeti.luxi.Client

Undocumented

def _CloseTransport(self):

Close the transport, ignoring errors.

def _GetAddress(self):

Returns the socket address

def _InitTransport(self):
overridden in ganeti.metad.Client

(Re)initialize the transport if needed.

def _SendMethodCall(self, data):

Undocumented