module documentation

Remote API connection map.

Class Mapper Map resource to method.
Class UriPattern Undocumented
Function GetHandlers Returns all supported resources and their handlers.
Constant CONNECTOR Undocumented
Function _CompileHandlerPath Compiles path for RAPI resource into regular expression.
Function _ConvertPattern Converts URI pattern into a regular expression group.
Constant _DISK_PATTERN Undocumented
Constant _NAME_PATTERN Undocumented
def GetHandlers(node_name_pattern, instance_name_pattern, group_name_pattern, network_name_pattern, job_id_pattern, disk_pattern, filter_pattern, query_res_pattern, translate=None):

Returns all supported resources and their handlers.

node_name_pattern and the other *_pattern parameters are wrapped in UriPattern and, if used in a URI, passed to the function specified using translate. translate receives 1..N parameters which are either plain strings or instances of UriPattern and returns a dictionary key suitable for the caller of GetHandlers. The default implementation in _CompileHandlerPath returns a compiled regular expression in which each pattern is a group.

Returns
dictUndocumented
CONNECTOR: dict =

Undocumented

Value
{}
def _CompileHandlerPath(*args):

Compiles path for RAPI resource into regular expression.

Returns
Compiled regular expression object
def _ConvertPattern(value):

Converts URI pattern into a regular expression group.

Used by _CompileHandlerPath.

_DISK_PATTERN: str =

Undocumented

Value
'\\d+'
_NAME_PATTERN: str =

Undocumented

Value
'[\\w\\._-]+'