Adapter for the remote resource manager service. More...
Public Member Functions | |
def | __init__ |
def | source |
Returns source component of the remote service. More... | |
def | acquire_resource |
Request resource acquisition. More... | |
def | release_resource |
Release already acquired resource. More... | |
def | __init__ |
def | source |
Returns source component of the remote service. More... | |
def | acquire_resource |
Request resource acquisition. More... | |
def | release_resource |
Release already acquired resource. More... | |
Adapter for the remote resource manager service.
def etr.plugins.resources.RemoteService.__init__ | ( | self, | |
host | |||
) |
def etr.plugins.resources.RemoteService.__init__ | ( | self, | |
host | |||
) |
def etr.plugins.resources.RemoteService.acquire_resource | ( | self, | |
type, | |||
tags | |||
) |
Request resource acquisition.
The service should return a json structure: On failure: {'status': 'failure', 'message': 'failure message'}
Returns tuple of (resource_id, attributes, '') on success or (None, None, 'msg') on failure.
def etr.plugins.resources.RemoteService.acquire_resource | ( | self, | |
type, | |||
tags | |||
) |
Request resource acquisition.
The service should return a json structure: On failure: {'status': 'failure', 'message': 'failure message'}
Returns tuple of (resource_id, attributes, '') on success or (None, None, 'msg') on failure.
def etr.plugins.resources.RemoteService.release_resource | ( | self, | |
resource_id | |||
) |
Release already acquired resource.
The service should return a json structure: On service failure: { 'status': 'failure', 'message': 'failure message' }
Where '<status>' takes on the follow forms 'released', resource released 'n/a', resource was not locked or found 'error' error occurred for this resource (not released). Will raise an exception.
Raises error if resource was not released by remote service.
def etr.plugins.resources.RemoteService.release_resource | ( | self, | |
resource_id | |||
) |
Release already acquired resource.
The service should return a json structure: On service failure: { 'status': 'failure', 'message': 'failure message' }
Where '<status>' takes on the follow forms 'released', resource released 'n/a', resource was not locked or found 'error' error occurred for this resource (not released). Will raise an exception.
Raises error if resource was not released by remote service.
def etr.plugins.resources.RemoteService.source | ( | self | ) |
Returns source component of the remote service.
def etr.plugins.resources.RemoteService.source | ( | self | ) |
Returns source component of the remote service.