class documentation

Generic class for resources.

Method __init__ Generic resource constructor.
Method dryRun Check if the request specifies dry-run mode.
Method getBodyParameter Check and return the value for a given parameter.
Method GetClient Wrapper for luxi.Client with HTTP-specific error handling.
Method SubmitJob Generic wrapper for submit job, for better http compatibility.
Method useBulk Check if the request specifies bulk querying.
Method useForce Check if the request specifies a forced operation.
Method useLocking Check if the request specifies locking.
Constant DELETE_ACCESS Undocumented
Constant GET_ACCESS Undocumented
Constant POST_ACCESS Undocumented
Constant PUT_ACCESS Undocumented
Class Variable request_body Undocumented
Instance Variable items Undocumented
Instance Variable queryargs Undocumented
Method _checkIntVariable Return the parsed value of an int argument.
Method _checkStringVariable Return the parsed value of a string argument.
Method _GetRequestBody Returns the body data.
Instance Variable _client_cls Undocumented
Instance Variable _req Undocumented
def __init__(self, items, queryargs, req, _client_cls=None):

Generic resource constructor.

Parameters
itemsa list with variables encoded in the URL
queryargsa dictionary with additional options from URL
reqRequest context
_client_clsluxi client class (unittests only)
def dryRun(self):

Check if the request specifies dry-run mode.

def getBodyParameter(self, name, *args):

Check and return the value for a given parameter.

If a second parameter is not given, an error will be returned, otherwise this parameter specifies the default value.

Parameters
namethe required parameter
*argsUndocumented
def GetClient(self):

Wrapper for luxi.Client with HTTP-specific error handling.

def SubmitJob(self, op, cl=None):

Generic wrapper for submit job, for better http compatibility.

Parameters
op:listthe list of opcodes for the job
cl:None or luxi.Clientoptional luxi client to use
Returns
stringthe job ID
def useBulk(self):

Check if the request specifies bulk querying.

def useForce(self):

Check if the request specifies a forced operation.

def useLocking(self):

Check if the request specifies locking.

DELETE_ACCESS =

Undocumented

Value
[rapi.RAPI_ACCESS_WRITE]
POST_ACCESS =

Undocumented

Value
[rapi.RAPI_ACCESS_WRITE]
PUT_ACCESS =

Undocumented

Value
[rapi.RAPI_ACCESS_WRITE]
request_body =

Undocumented

items =

Undocumented

queryargs =

Undocumented

def _checkIntVariable(self, name, default=0):

Return the parsed value of an int argument.

def _checkStringVariable(self, name, default=None):

Return the parsed value of a string argument.

def _GetRequestBody(self):

Returns the body data.

_client_cls =

Undocumented

_req =

Undocumented