BaseAuthorizeHandler

class lsst.ts.authorize.BaseAuthorizeHandler(domain: Domain, log: logging.Logger | None = None, config: types.SimpleNamespace | None = None, callback: Optional[Callable] = None)

Bases: ABC

Methods Summary

close_client_session()

create_client_session()

handle_authorize_request(data)

Handle an authorize request.

process_approved_and_unprocessed_auth_requests()

Contact the REST server and request approved, unprocessed authorization request.

process_authorize_request(data)

Process an authorize request.

start(sleep_time)

stop()

validate_request(data)

Validate a requestAuthorization command by checking the input integrity.

Methods Documentation

async close_client_session() None
async create_client_session() None
abstract async handle_authorize_request(data: AuthRequestData) None

Handle an authorize request.

Parameters
dataAuthRequestData

The data containing the authorize request as described in the corresponding xml file in ts_xml.

async process_approved_and_unprocessed_auth_requests() None

Contact the REST server and request approved, unprocessed authorization request. Then process those requests by contacting each CSCs and sending the setAuthList command. Finally inform the REST server of the outcome of those commands.

async process_authorize_request(data: AuthRequestData) tuple[dict[str, str], set[str]]

Process an authorize request. Contact each CSC in the request and send the setAuthList command.

Parameters
dataAuthRequestData

The data containing the authorize request as described in the corresponding xml file in ts_xml.

Notes

All CSCs that can be contacted get changed, even if one or more CSCs cannot be contacted.

async start(sleep_time: float) None
async stop() None
async validate_request(data: AuthRequestData) set[str]

Validate a requestAuthorization command by checking the input integrity.

Parameters
dataAuthRequestData

Command data.

Returns
cscs_to_commandset of str

List of strings with name:index of the CSCs to send setAuthList commands to.

Raises
salobj.ExpectedError

If no csc is specified.