class ManagementSupport:
Management support class. Provides functions for accessing and managing CSE internal functions. Also provides functions for retrieving and formatting CSE status, statistics, and runtime information.
| Method | do |
Export instances of a container resource to a CSV file in the tmp directory, or return as a string. |
| Method | do |
Export a resource and its children to the tmp directory as a shell script with curl commands. |
| Method | get |
Get the current configuration of the CSE as a JSON string. |
| Method | get |
Get the current status of the CSE. |
| Method | get |
Get the status, statistics, and runtime information of the CSE. |
| Method | get |
Get a generator that yields log entries as strings. |
| Method | get |
Get the current log level of the CSE. |
| Method | get |
Get the current loaded plugins of the CSE. |
| Method | get |
Get the current registration status of the CSE as a JSON string. |
| Method | get |
Create and return an overview about the registrar, registrees, and descendant CSE's. |
| Method | get |
Return the registration status of the CSE, and registrations of CSEs and AEs. |
| Method | get |
Get the current requests of the CSE as a generator of JSON strings. |
| Method | get |
Generate a Rich table with all requests and a PlantUML sequence diagram. |
| Method | get |
This function will generate a Rich tree structure of a CSE's resource structure. |
| Method | get |
This function will generate a Text tree of a CSE's resource structure. |
| Method | get |
Get the current registered services and their endpoints of the CSE. |
| Method | get |
Generate an overview about various resources, event counts, and more. |
| Method | get |
The CSE, Type, http, port |
| Method | refresh |
Force the CSE to immediately check the registrations with the remote registrar(s). |
| Method | reset |
Reset the CSE to its initial state. |
| Method | restart |
Restart the CSE. |
| Method | set |
Set the log level of the CSE. |
| Method | set |
Enable or disable request recording. |
| Method | shutdown |
Shutdown the CSE. |
| Class Variable | cse |
Injected function to shutdown the CSE. |
| Class Variable | cse |
Injected function to reset the CSE. |
| Class Variable | dispatcher |
Injected Dispatcher instance. |
| Class Variable | request |
Injected RequestManager instance. |
| Class Variable | storage |
Injected Storage instance. |
| Class Variable | validator |
Injected Validator instance. |
Export instances of a container resource to a CSV file in the tmp directory, or return as a string.
| Parameters | |
ri:str | Resource ID of the container resource. |
asbool | None | Return the CSV string instead of writing to a file. |
| Returns | |
tuple[ | Tuple with the number of instances exported, and the filename of the exported file or the CSV string. |
Export a resource and its children to the tmp directory as a shell script with curl commands.
| Parameters | |
ri:str | Resource ID of the resource to export. |
withbool | None | If True, also export child resources. |
| Returns | |
tuple[ | Tuple with the number of resources exported, and the filename of the exported file. |
Get the current configuration of the CSE as a JSON string.
| Returns | |
str | The configuration of the CSE in JSON format. |
Get a generator that yields log entries as strings.
| Returns | |
Generator[ | A generator that yields log entries as strings. |
Get the current registration status of the CSE as a JSON string.
| Returns | |
str | The registration status of the CSE in JSON format. |
Style | None = Style(), textStyle: Style | None = None) -> Table:
¶
Create and return an overview about the registrar, registrees, and descendant CSE's.
| Parameters | |
style:Style | None | Style for the general output. |
textStyle | None | Style for the text. |
| Returns | |
Table | Rich formatted string. |
Return the registration status of the CSE, and registrations of CSEs and AEs.
| Returns | |
JSON | A JSON object with the registration status of the CSE, and registrations of CSEs and AEs. |
Get the current requests of the CSE as a generator of JSON strings.
| Returns | |
Generator[ | A generator that yields JSON strings of the request. |
Generate a Rich table with all requests and a PlantUML sequence diagram.
| Parameters | |
id:str | None | If set, then only the requests for this resource ID are returned. |
| Returns | |
tuple[ | A tuple with a Rich Table object and a PlantUML sequence diagram string. |
int = 0, parent: str | None = None, style: Style | None = Style(), withProgress: bool | None = True, treeMode: TreeMode | None = TreeMode.NORMAL) -> Tree:
¶
This function will generate a Rich tree structure of a CSE's resource structure.
| Parameters | |
maxint | The maximum level for the result tree. |
parent:str | None | The resource ID from where to start the tree. The default is the CSEBase. |
style:Style | None | The Rich Style to use. |
withbool | None | Display a progress indicator while gathering the tree. |
treeTreeMode | None | Undocumented |
| Returns | |
Tree | Return a Rich Tree object. |
This function will generate a Text tree of a CSE's resource structure.
Todo
Support the maxLevel parameter.
| Parameters | |
maxint | Maximum tree level to render. Currently not supported. |
| Returns | |
str | Pure text rendering of the resource tree. |
Get the current registered services and their endpoints of the CSE.
| Returns | |
str | The registered services and their endpoints of the CSE in JSON format. |
Style | None = Style(), withProgress: bool | None = True, textStyle: Style | None = None) -> Table:
¶
Generate an overview about various resources, event counts, and more.
| Parameters | |
style:Style | None | Rich style. |
withbool | None | Display with progress indicator. |
textStyle | None | Rich text style. If this is not set then the style is used for the text as well. |
| Returns | |
Table | Rich Table object. |
- This function will generate a PlanUML graph of a CSE's structure, including:
- The CSE, Type, http, port
- The CSE's resource tree
- The Registrar CSE (if any)
- A list of descendant CSE's (if any)
This function calls itself recursively to generate the tree structure.
| Parameters | |
maxint | None | The maximum level of the tree to print. 0 means all levels. |
| Returns | |
str | The PlanUML graph as a string. |
Force the CSE to immediately check the registrations with the remote registrar(s).
This is useful for testing purposes, e.g. when the CSE is started and the registration is not done automatically.
| Returns | |
str | A message indicating the result of the registration. |
Restart the CSE.
This is done by setting the CSE status to SHUTTINGDOWNRESTART and calling the forceShutdown method.
Set the log level of the CSE.
| Parameters | |
level:str | The log level to set. Should be one of the Logging levels. |
| Returns | |
str | A response indicating the result |