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

Class AbstractStubClient

source code


An abstract Client that connects a generated stub client to a Transport.

Subclasses should inherit from this class (first) as well and a designated stub (second).

Instance Methods [hide private]
 
__init__(self, timeouts=None, transport=t.Transport, allow_non_master=None)
Constructor for the class.
source code
 
_GenericInvoke(self, method, *args) source code
 
_GetAddress(self)
Returns the socket address
source code

Inherited from AbstractClient: CallMethod, Close, close

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, timeouts=None, transport=t.Transport, allow_non_master=None)
(Constructor)

source code 

Constructor for the class.

Arguments are the same as for AbstractClient. Checks that SOCKET_PATH attribute is defined (in the stub class).

Parameters:
  • timeouts (list of ints) - timeouts to be used on connect and read/write
  • transport (Transport or another compatible class) - the underlying transport to use for the RPC calls
  • allow_non_master (bool) - skip checks for the master node on errors
Overrides: object.__init__

_GetAddress(self)

source code 

Returns the socket address

Overrides: AbstractClient._GetAddress
(inherited documentation)