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
Functions
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
ResponseListener()
Source code in drunc/controller/children_interface/rest_api_child.py
Functions
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 |