ifw-sup  3.0.0-pre3
Public Member Functions | List of all members
clib.syssup_async_commands.SysSupAsyncCommands Class Reference

Class managing the interface with System Supervisor. More...

Inheritance diagram for clib.syssup_async_commands.SysSupAsyncCommands:

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ __init__()

def clib.syssup_async_commands.SysSupAsyncCommands.__init__ (   self,
  uri,
  timeout = 60000 
)

Member Function Documentation

◆ get_config()

def clib.syssup_async_commands.SysSupAsyncCommands.get_config (   self)

Get the actual configuration from the server.

◆ help()

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.

◆ is_operational()

def clib.syssup_async_commands.SysSupAsyncCommands.is_operational (   self)

Returns True if the Supervisor is operational.

◆ set_config()

def clib.syssup_async_commands.SysSupAsyncCommands.set_config (   self,
  config 
)

Merge a new configuration as string using directly YAML format.

Parameters
configYAML document to be merged.
   Config shall be a valid YAML string, e.g.
{fcs1: {access: true}}

◆ set_obmode()

def clib.syssup_async_commands.SysSupAsyncCommands.set_obmode (   self,
  mode 
)

Set the observation mode.

Parameters
modeObservation mode.
   Mode shall be a valid observation mode.

◆ set_opmode()

def clib.syssup_async_commands.SysSupAsyncCommands.set_opmode (   self,
  mode 
)

Set the operational mode.

Parameters
modeOperational mode.
   Mode shall be a valid operational mode.

◆ setaccess()

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

◆ subsystem_disable()

def clib.syssup_async_commands.SysSupAsyncCommands.subsystem_disable (   self,
  subsystem 
)

Disable a subsystem.

Parameters
subsystemsubsystem to be disabled

◆ subsystem_enable()

def clib.syssup_async_commands.SysSupAsyncCommands.subsystem_enable (   self,
  subsystem 
)

Enable a subsystem.

Parameters
subsystemsubsystem to be enabled

◆ subsystem_init()

def clib.syssup_async_commands.SysSupAsyncCommands.subsystem_init (   self,
  subsystem 
)

Initialise a subsystem.

Parameters
subsystemsubsystem to be initialised

◆ subsystem_names()

def clib.syssup_async_commands.SysSupAsyncCommands.subsystem_names (   self)

Returns the list of subsystems mananged by the Supervisor.

◆ subsystem_reset()

def clib.syssup_async_commands.SysSupAsyncCommands.subsystem_reset (   self,
  subsystem 
)

Reset a subsystem.

Parameters
subsystemsubsystem to be reset

◆ subsystem_status()

def clib.syssup_async_commands.SysSupAsyncCommands.subsystem_status (   self,
  subsystem = "" 
)

Retrieve the status of a subsystem.

Parameters
subsystemsubsystem to retrieve its status

The documentation for this class was generated from the following file: