Subrack API
This module provides a HTTP server that acts as front end to a subrack.
- class SubrackProtocol(*args, **kwargs)
Structural subtyping protocol for a subrack.
That is, specification of the interface that subrack hardware or simulator must fulfil in order that the web server defined here can interact with it.
- __init__(*args, **kwargs)
- execute_command(name, argument)
Execute a command on the subrack hardware/simulator.
- get_attribute(name)
Get an attribute value on the subrack hardware/simulator.
- async get_bad_path(path)
Handle a GET request for any path not handled by one of the above routes.
The above routes handle all valid paths, so any path not already handled must be an invalid path. Therefore this method raises a 404 HTTP exception.
- async get_json(request, type_parameter=Query(None), param=None, value=None)
Handle a GET request for the path “/get/json.htm”.
- Parameters:
- Return type:
- Returns:
a result dictionary