Package ganeti :: Package rpc :: Module client :: Class AbstractClient
[hide private]
[frames] | no frames]

Class AbstractClient

source code


High-level client abstraction.

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

Instance Methods [hide private]
 
__init__(self, address=None, timeouts=None, transport=t.Transport)
Constructor for the Client class.
source code
 
_InitTransport(self)
(Re)initialize the transport if needed.
source code
 
_CloseTransport(self)
Close the transport, ignoring errors.
source code
 
_SendMethodCall(self, data) source code
 
Close(self)
Close the underlying connection.
source code
 
close(self)
Same as Close, to be used with contextlib.closing(...).
source code
 
CallMethod(self, method, args)
Send a generic request and return the response.
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, address=None, timeouts=None, transport=t.Transport)
(Constructor)

source code 

Constructor for the Client class.

Arguments:

  • address: a valid address the the used transport class
  • timeout: a list of timeouts, to be used on connect and read/write
  • transport: a Transport-like class

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

Overrides: object.__init__