bluesky_queueserver_api.zmq.REManagerAPI.devices_allowed¶
- REManagerAPI.devices_allowed(*, reload=False, user_group=None)¶
Returns the list (dictionary) of allowed devices. The function checks
devices_allowed_uid
status parameter and downloads the list of allowed devices from the server if UID changed. Otherwise the copy of cached list of allowed devices is returned.- Parameters:
- reload: boolean
Set the parameter
True
to force reloading of status from the server beforedevices_allowed_uid
is checked. Otherwise cached status is used.- user_group: str or None (optional)
User group name used in API request. Specified user group name overrides the default user group name (accessible using
user_group
property). The default user group name is used if the parameter is not specified orNone
. The parameter is ignored by the HTTP version of the API.
- Returns:
- response: dict
Dictionary keys:
success
: boolean - success of the request.msg
: str - error message in case the request is rejected by RE Manager or operation failed.devices_allowed
: dict - list (dictionary) of allowed devices.devices_allowed_uid
: str - UID of the list of allowed devices.
- Raises:
- RequestTimeoutError, RequestFailedError, HTTPRequestError, HTTPClientError, HTTPServerError
All exceptions raised by
send_request
API.
Examples
# Synchronous code (0MQ, HTTP) response = RM.devices_allowed() devices_allowed = response["devices_allowed"] # Asynchronous code (0MQ, HTTP) response = await RM.devices_allowed() devices_allowed = response["devices_allowed"]