|
ifw-sup
3.0.0-pre3
|
Class managing the interface with System Supervisor. More...
Public Member Functions | |
| def | __init__ (self, uri, timeout=60000) |
| def | setaccess (self, subsystem, flag) |
| Enable or disable a subsystem within the supervisor. More... | |
| def | get_config (self) |
| Get the actual configuration from the server. More... | |
| def | set_config (self, config) |
| Merge a new configuration as string using directly YAML format. More... | |
| def | set_obmode (self, mode) |
| Set the observation mode. More... | |
| def | set_opmode (self, mode) |
| Set the operational mode. More... | |
| def | subsystem_status (self, subsystem="") |
| Retrieve the status of a subsystem. More... | |
| def | subsystem_init (self, subsystem) |
| Initialise a subsystem. More... | |
| def | subsystem_enable (self, subsystem) |
| Enable a subsystem. More... | |
| def | subsystem_disable (self, subsystem) |
| Disable a subsystem. More... | |
| def | subsystem_reset (self, subsystem) |
| Reset a subsystem. More... | |
| def | subsystem_names (self) |
| Returns the list of subsystems mananged by the Supervisor. More... | |
| def | is_operational (self) |
| Returns True if the Supervisor is operational. More... | |
| def | help (self, func=None) |
| Provides a text based help of the Command class functions. More... | |
Class managing the interface with System Supervisor.
This class uses a synchronous MAL client because async has some problems. Timeout does not work properly. It is not really asynchronous.
| def clib.syssup_async_commands.SysSupAsyncCommands.__init__ | ( | self, | |
| uri, | |||
timeout = 60000 |
|||
| ) |
| def clib.syssup_async_commands.SysSupAsyncCommands.get_config | ( | self | ) |
Get the actual configuration from the server.
| def clib.syssup_async_commands.SysSupAsyncCommands.help | ( | self, | |
func = None |
|||
| ) |
Provides a text based help of the Command class functions.
func (str, optional): Name of the function from where to get the help
This method is to be used for the implementation of CLIs.
Functions are methods of the class.
If the parameter <func> is not provided then the help provides a list of
functions. Functions started with '_' are skipped.
| def clib.syssup_async_commands.SysSupAsyncCommands.is_operational | ( | self | ) |
Returns True if the Supervisor is operational.
| def clib.syssup_async_commands.SysSupAsyncCommands.set_config | ( | self, | |
| config | |||
| ) |
Merge a new configuration as string using directly YAML format.
| config | YAML document to be merged. Config shall be a valid YAML string, e.g. {fcs1: {access: true}}
|
| def clib.syssup_async_commands.SysSupAsyncCommands.set_obmode | ( | self, | |
| mode | |||
| ) |
Set the observation mode.
| mode | Observation mode. Mode shall be a valid observation mode. |
| def clib.syssup_async_commands.SysSupAsyncCommands.set_opmode | ( | self, | |
| mode | |||
| ) |
Set the operational mode.
| mode | Operational mode. Mode shall be a valid operational mode. |
| def clib.syssup_async_commands.SysSupAsyncCommands.setaccess | ( | self, | |
| subsystem, | |||
| flag | |||
| ) |
Enable or disable a subsystem within the supervisor.
Args subsystem (str): subsystem to be enabled or disabled flag true to enable or false to disable
| def clib.syssup_async_commands.SysSupAsyncCommands.subsystem_disable | ( | self, | |
| subsystem | |||
| ) |
Disable a subsystem.
| subsystem | subsystem to be disabled |
| def clib.syssup_async_commands.SysSupAsyncCommands.subsystem_enable | ( | self, | |
| subsystem | |||
| ) |
Enable a subsystem.
| subsystem | subsystem to be enabled |
| def clib.syssup_async_commands.SysSupAsyncCommands.subsystem_init | ( | self, | |
| subsystem | |||
| ) |
Initialise a subsystem.
| subsystem | subsystem to be initialised |
| def clib.syssup_async_commands.SysSupAsyncCommands.subsystem_names | ( | self | ) |
Returns the list of subsystems mananged by the Supervisor.
| def clib.syssup_async_commands.SysSupAsyncCommands.subsystem_reset | ( | self, | |
| subsystem | |||
| ) |
Reset a subsystem.
| subsystem | subsystem to be reset |
| def clib.syssup_async_commands.SysSupAsyncCommands.subsystem_status | ( | self, | |
subsystem = "" |
|||
| ) |
Retrieve the status of a subsystem.
| subsystem | subsystem to retrieve its status |