bluesky_queueserver.validate_plan
- bluesky_queueserver.validate_plan(plan, *, allowed_plans, allowed_devices)[source]
Validate the dictionary of plan parameters. The function is called before the plan is added to the queue. The function can also be called by the client application to validate a plan before it is submitted to the queue. The dictionaries
allowed_plans
andallowed_devices
must contain plans and devices that are allowed for the user and can be downloaded from the server.- Parameters:
- plan: dict
The dictionary of plan parameters
- allowed_plans: dict or None
The dictionary with allowed plans: key - plan name. If None, then all plans are allowed (may change in the future). If
{}
then no plans are allowed.- allowed_devices: dict or None
The dictionary with allowed devices: key - device name. If None, then all devices are allowed (may change in the future). If
{}
then no devices are allowed.
- Returns:
- boolean
Indicates if validation was successful (
True
) or failed (False
).- str
Error message that explains the reason for validation failure. Empty string if validation is successful.