rest_api_child
drunc.controller.children_interface.rest_api_child
Classes
AppCommander(app_name, app_host, app_port, response_host, response_port, proxy_host=None, proxy_port=None)
Source code in drunc/controller/children_interface/rest_api_child.py
Methods:
check_response(timeout=0)
Check if a response is present in the queue
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
timeout
|
int
|
Timeout in seconds |
0
|
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
Command response is json |
Raises:
| Type | Description |
|---|---|
NoResponse
|
Description |
ResponseTimeout
|
Description |
Source code in drunc/controller/children_interface/rest_api_child.py
RESTAPIChildNode(name, configuration, uri, fsm_configuration, connectivity_service=None)
Bases: ChildNode
Source code in drunc/controller/children_interface/rest_api_child.py
Methods:
log_on_server(text, severity='INFO', target='', execute_along_path=False, execute_on_all_subsequent_children_in_path=True)
Log a message on the server with the specified severity.
Right now, this is not implemented in the daq_applications. It is unlikely that this will be implemented, thus this simply returns the correctly formatted message with a NOT_EXECUTED_NOT_IMPLEMENTED flag.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
The message to log. |
required |
severity
|
str
|
The severity level of the log message (default: "INFO"). |
'INFO'
|
target
|
str
|
The target for the log message (default: ""). |
''
|
execute_along_path
|
bool
|
Whether to execute along the path (default: False). |
False
|
execute_on_all_subsequent_children_in_path
|
bool
|
Whether to execute on all subsequent children in the path (default: True). |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
LogOnServerResponse |
LogOnServerResponse
|
The response from the server after logging the message. |
Source code in drunc/controller/children_interface/rest_api_child.py
RESTAPIChildNodeConfHandler
ResponseListener()
Source code in drunc/controller/children_interface/rest_api_child.py
Methods:
register(app, handler)
classmethod
Register a new notification handler
:param app: The application :type app: str :param handler: The handler :type handler: { type_description }
:rtype: None
:raises RuntimeError: { exception_description }
Source code in drunc/controller/children_interface/rest_api_child.py
unregister(app)
classmethod
De-register a notification handler
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
app
|
str
|
application name |
required |