RTC Toolkit 6.0.0
Loading...
Searching...
No Matches
comms.deployment.RtcDeploymentControl Class Reference

This is an abstract class providing a Qt signal/slot interface for triggering the starting and stopping of Deployment Sets and individual SRTC components. More...

Inheritance diagram for comms.deployment.RtcDeploymentControl:

Public Member Functions

 __init__ (self, parent=None)
 
 connect_facade (self, reconnect=False)
 Connects to the facade (if one exists) for sending deployment commands.
 
 deploy (self, str deployment_set, Optional[Any] tag=None)
 Qt slot to trigger starting of a Deployment Set.
 
 undeploy (self, Optional[Any] tag=None)
 Qt slot to trigger stopping of the currently running Deployment Set.
 
 start_component (self, str component_name, Optional[Any] tag=None)
 Qt slot to trigger starting of a SRTC component.
 
 stop_component (self, str component_name, Optional[Any] tag=None)
 Qt slot to trigger stopping of a SRTC component.
 
 get_components (self, Optional[Any] tag=None)
 Qt slot to trigger get a list of components.
 
 get_active_components (self, Optional[Any] tag=None)
 Qt slot to trigger get a list of components.
 
 get_deployment_sets (self, Optional[Any] tag=None)
 Qt slot to trigger get deployment sets list command.
 
 get_active_deployment (self, Optional[Any] tag=None)
 Qt slot to trigger get active deployment command.
 
 get_state (self)
 Qt slot to trigger get state command.
 

Static Public Attributes

 deploy_succeed = Signal((), (object,))
 Signal indicating that the processes for the Deployment Set have been successfully started.
 
 deploy_failed = Signal((str,), (str, object))
 Signal indicating there was an error when trying to start the Deployment Set.
 
 undeploy_succeed = Signal((), (object,))
 Signal indicating that the processes for the currently active Deployment Set have been successfully stopped.
 
 undeploy_failed = Signal((str,), (str, object))
 Signal indicating there was an error when trying to stop the currently active Deployment Set.
 
 component_started = Signal((), (object,))
 Signal indicating that a component has been successfully started.
 
 component_start_failed = Signal((str,), (str, object))
 Signal indicating there was an error when trying to start a component.
 
 component_stopped = Signal((), (object,))
 Signal indicating that a component has been successfully stopped.
 
 component_stop_failed = Signal((str,), (str, object))
 Signal indicating there was an error when trying to stop a component.
 
 get_active_components_failed = Signal((str,), (str, object))
 Signal indicating there was an error to retrieve active components.
 
 get_components_failed = Signal((str,), (str, object))
 Signal indicating there was an error to retrieve components in active deployment set.
 
 active_deployment_set_changed = Signal(str)
 Signal indicating there is a new active deployment set.
 
 deployment_daemon_disconnected = Signal()
 Signal indicating Deployment daemon disconnected.
 
 deployment_daemon_connected = Signal((), (bool,))
 Signal indicating Deployment daemon connected.
 
 deployment_sets_changed = Signal(list)
 Signal indicating that the deployment set lists has changed.
 
 components_changed = Signal(list)
 Signal indicating that the list of components in the deployment has changed.
 
 state_changed = Signal(str)
 Signal indicating that Deployment Daemon status changed The argument passed with the signal is current status.
 

Protected Member Functions

 _exec_start_deployment (self, str deployment_set, Any tag)
 This method must be implemented in derived child classes with logic to start a Deployment Set.
 
 _exec_stop_deployment (self, Any tag)
 This method must be implemented in derived child classes with logic to stop a running Deployment Set.
 
 _exec_start_component (self, str component_name, Any tag)
 This method must be implemented in derived child classes with logic to start a SRTC component.
 
 _exec_stop_component (self, str component_name, Any tag)
 This method must be implemented in derived child classes with logic to stop a running SRTC component.
 
 _exec_get_components (self, Any tag)
 This method must be implemented in derived child classes with logic to get components in deployment set.
 
 _exec_get_active_components (self, Any tag)
 This method must be implemented in derived child classes with logic to get components in deployment set.
 
 _exec_get_deployment_sets (self, Any tag)
 This method must be implemented in derived child classes with logic to get deployment sets.
 
 _exec_active_deployment (self, Any tag)
 This method must be implemented in derived child classes with logic to get active deployment.
 
 _exec_get_state (self)
 This method must be implemented in derived child classes with logic to get active deployment.
 

Protected Attributes

 _logger = CiiLogManager.get_logger()
 

Detailed Description

This is an abstract class providing a Qt signal/slot interface for triggering the starting and stopping of Deployment Sets and individual SRTC components.

The signal/slot interface is conducive to asynchronous handling. For example, the underlying command to execute is triggered by receiving a Qt command signal on the appropriate slot, e.g. start_component. The completion of the underlying command should then be indicated asynchronously with a success or failure signal, e.g. component_started or component_start_failed.

Derived child class must override the "_exec_*" methods to implement appropriate logic that is non-blocking.

Constructor & Destructor Documentation

◆ __init__()

comms.deployment.RtcDeploymentControl.__init__ ( self,
parent = None )

Member Function Documentation

◆ _exec_active_deployment()

comms.deployment.RtcDeploymentControl._exec_active_deployment ( self,
Any tag )
protected

This method must be implemented in derived child classes with logic to get active deployment.

◆ _exec_get_active_components()

comms.deployment.RtcDeploymentControl._exec_get_active_components ( self,
Any tag )
protected

This method must be implemented in derived child classes with logic to get components in deployment set.

◆ _exec_get_components()

comms.deployment.RtcDeploymentControl._exec_get_components ( self,
Any tag )
protected

This method must be implemented in derived child classes with logic to get components in deployment set.

◆ _exec_get_deployment_sets()

comms.deployment.RtcDeploymentControl._exec_get_deployment_sets ( self,
Any tag )
protected

This method must be implemented in derived child classes with logic to get deployment sets.

◆ _exec_get_state()

comms.deployment.RtcDeploymentControl._exec_get_state ( self)
protected

This method must be implemented in derived child classes with logic to get active deployment.

◆ _exec_start_component()

comms.deployment.RtcDeploymentControl._exec_start_component ( self,
str component_name,
Any tag )
protected

This method must be implemented in derived child classes with logic to start a SRTC component.

◆ _exec_start_deployment()

comms.deployment.RtcDeploymentControl._exec_start_deployment ( self,
str deployment_set,
Any tag )
protected

This method must be implemented in derived child classes with logic to start a Deployment Set.

◆ _exec_stop_component()

comms.deployment.RtcDeploymentControl._exec_stop_component ( self,
str component_name,
Any tag )
protected

This method must be implemented in derived child classes with logic to stop a running SRTC component.

◆ _exec_stop_deployment()

comms.deployment.RtcDeploymentControl._exec_stop_deployment ( self,
Any tag )
protected

This method must be implemented in derived child classes with logic to stop a running Deployment Set.

◆ connect_facade()

comms.deployment.RtcDeploymentControl.connect_facade ( self,
reconnect = False )

Connects to the facade (if one exists) for sending deployment commands.

◆ deploy()

comms.deployment.RtcDeploymentControl.deploy ( self,
str deployment_set,
Optional[Any] tag = None )

Qt slot to trigger starting of a Deployment Set.

Once the Deployment Set has been successfully started the deployment_started signal is emitted. If an error occurs the deployment_start_failed signal is emitted instead.

Parameters
[in]deployment_setThe name of the Deployment Set to start.
[in]tagOptional user object to uniquely identify this call. The tag is returned in the arguments of the deployment_started and deployment_start_failed signals.

◆ get_active_components()

comms.deployment.RtcDeploymentControl.get_active_components ( self,
Optional[Any] tag = None )

Qt slot to trigger get a list of components.

Once the active components are retrieved the signal is emitted. If an error occurs the component_stop_failed signal is emitted instead.

Parameters
[in]tagOptional user object to uniquely identify this call. The tag is returned in the arguments of the component_stopped and component_stop_failed signals.

◆ get_active_deployment()

comms.deployment.RtcDeploymentControl.get_active_deployment ( self,
Optional[Any] tag = None )

Qt slot to trigger get active deployment command.

Once the deployment sets list is retrieved the signal is emitted. If an error occurs the xxxx signal is emitted instead.

Parameters
[in]tagOptional user object to uniquely identify this call. The tag is returned in the arguments of the component_stopped and component_stop_failed signals.

◆ get_components()

comms.deployment.RtcDeploymentControl.get_components ( self,
Optional[Any] tag = None )

Qt slot to trigger get a list of components.

Once the components are retrieved the signal is emitted. If an error occurs the component_stop_failed signal is emitted instead.

Parameters
[in]tagOptional user object to uniquely identify this call. The tag is returned in the arguments of the component_stopped and component_stop_failed signals.

◆ get_deployment_sets()

comms.deployment.RtcDeploymentControl.get_deployment_sets ( self,
Optional[Any] tag = None )

Qt slot to trigger get deployment sets list command.

Once the deployment sets list is retrieved the signal is emitted. If an error occurs the xxxx signal is emitted instead.

Parameters
[in]tagOptional user object to uniquely identify this call. The tag is returned in the arguments of the component_stopped and component_stop_failed signals.

◆ get_state()

comms.deployment.RtcDeploymentControl.get_state ( self)

Qt slot to trigger get state command.

Once the deployment daemon state is retrieved the signal is emitted.

◆ start_component()

comms.deployment.RtcDeploymentControl.start_component ( self,
str component_name,
Optional[Any] tag = None )

Qt slot to trigger starting of a SRTC component.

Once the component has been successfully started the component_started signal is emitted. If an error occurs the component_start_failed signal is emitted instead.

Parameters
[in]component_nameThe name of the component to start.
[in]tagOptional user object to uniquely identify this call. The tag is returned in the arguments of the component_started and component_start_failed signals.

◆ stop_component()

comms.deployment.RtcDeploymentControl.stop_component ( self,
str component_name,
Optional[Any] tag = None )

Qt slot to trigger stopping of a SRTC component.

Once the component has been successfully stopped the component_stopped signal is emitted. If an error occurs the component_stop_failed signal is emitted instead.

Parameters
[in]component_nameThe name of the component to stop.
[in]tagOptional user object to uniquely identify this call. The tag is returned in the arguments of the component_stopped and component_stop_failed signals.

◆ undeploy()

comms.deployment.RtcDeploymentControl.undeploy ( self,
Optional[Any] tag = None )

Qt slot to trigger stopping of the currently running Deployment Set.

Once the Deployment Set has been successfully stopped the deployment_stopped signal is emitted. If an error occurs the deployment_stop_failed signal is emitted instead. For example, if there is no Deployment Set currently running then the deployment_stop_failed signal is emitted.

Parameters
[in]tagOptional user object that is returned in the arguments of the deployment_stopped and deployment_stop_failed signals.

Member Data Documentation

◆ _logger

comms.deployment.RtcDeploymentControl._logger = CiiLogManager.get_logger()
protected

◆ active_deployment_set_changed

comms.deployment.RtcDeploymentControl.active_deployment_set_changed = Signal(str)
static

Signal indicating there is a new active deployment set.

The arguments passed with the signal is active deployment set name.

◆ component_start_failed

comms.deployment.RtcDeploymentControl.component_start_failed = Signal((str,), (str, object))
static

Signal indicating there was an error when trying to start a component.

The arguments passed with the signal are the underlying command's output and an optional argument with the tag object provided by the user. The tag object is only passed to the signal if such a tag was given in start_component().

◆ component_started

comms.deployment.RtcDeploymentControl.component_started = Signal((), (object,))
static

Signal indicating that a component has been successfully started.

An optional argument with the tag object provided by the user is passed to the signal if such a tag was given in start_component().

◆ component_stop_failed

comms.deployment.RtcDeploymentControl.component_stop_failed = Signal((str,), (str, object))
static

Signal indicating there was an error when trying to stop a component.

The arguments passed with the signal are the underlying command's output and an optional argument with the tag object provided by the user. The tag object is only passed to the signal if such a tag was given in stop_component().

◆ component_stopped

comms.deployment.RtcDeploymentControl.component_stopped = Signal((), (object,))
static

Signal indicating that a component has been successfully stopped.

An optional argument with the tag object provided by the user is passed to the signal if such a tag was given in stop_component().

◆ components_changed

comms.deployment.RtcDeploymentControl.components_changed = Signal(list)
static

Signal indicating that the list of components in the deployment has changed.

◆ deploy_failed

comms.deployment.RtcDeploymentControl.deploy_failed = Signal((str,), (str, object))
static

Signal indicating there was an error when trying to start the Deployment Set.

The arguments passed with the signal are the underlying command's output and an optional argument with the tag object provided by the user. The tag object is only passed to the signal if such a tag was given in start_deployment().

◆ deploy_succeed

comms.deployment.RtcDeploymentControl.deploy_succeed = Signal((), (object,))
static

Signal indicating that the processes for the Deployment Set have been successfully started.

An optional argument with the tag object provided by the user is passed to the signal if such a tag was given in start_deployment().

◆ deployment_daemon_connected

comms.deployment.RtcDeploymentControl.deployment_daemon_connected = Signal((), (bool,))
static

Signal indicating Deployment daemon connected.

The bool version should be preferred

◆ deployment_daemon_disconnected

comms.deployment.RtcDeploymentControl.deployment_daemon_disconnected = Signal()
static

Signal indicating Deployment daemon disconnected.

Deprecated.

◆ deployment_sets_changed

comms.deployment.RtcDeploymentControl.deployment_sets_changed = Signal(list)
static

Signal indicating that the deployment set lists has changed.

◆ get_active_components_failed

comms.deployment.RtcDeploymentControl.get_active_components_failed = Signal((str,), (str, object))
static

Signal indicating there was an error to retrieve active components.

◆ get_components_failed

comms.deployment.RtcDeploymentControl.get_components_failed = Signal((str,), (str, object))
static

Signal indicating there was an error to retrieve components in active deployment set.

◆ state_changed

comms.deployment.RtcDeploymentControl.state_changed = Signal(str)
static

Signal indicating that Deployment Daemon status changed The argument passed with the signal is current status.

◆ undeploy_failed

comms.deployment.RtcDeploymentControl.undeploy_failed = Signal((str,), (str, object))
static

Signal indicating there was an error when trying to stop the currently active Deployment Set.

The arguments passed with the signal are the underlying command's output and an optional argument with the tag object provided by the user. The tag object is only passed to the signal if such a tag was given in stop_deployment().

◆ undeploy_succeed

comms.deployment.RtcDeploymentControl.undeploy_succeed = Signal((), (object,))
static

Signal indicating that the processes for the currently active Deployment Set have been successfully stopped.

An optional argument with the tag object provided by the user is passed to the signal if such a tag was given in stop_deployment().


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