RTC Toolkit 6.0.0
Loading...
Searching...
No Matches
comms.deploymentcontroldeploymentdaemonimpl.RtcDeploymentControlDeploymentDaemonImpl Class Reference

Implements the RtcDeploymentControl interface using Deployment Daemon as the backend. More...

Inheritance diagram for comms.deploymentcontroldeploymentdaemonimpl.RtcDeploymentControlDeploymentDaemonImpl:

Public Member Functions

 __init__ (self, parent, deployment_data, cfg)
 Constructs a RtcDeploymentControl interface object that integrates with Deployment Daemon.
 
 connect_facade (self, reconnect=False)
 Connects to the Deployment Daemon Facade if not already done.
 
 check_dd (self)
 Checking the connection to the Deployment Daemon.
 
 connection_changed (self, bool connected)
 Captures Deployment Daemon connection event.
 
 start_polling (self)
 Starts polling from the DeploymentDaemon Interface.
 
 stop_polling (self)
 Stops polling from the DeploymentDaemon Interface.
 

Public Attributes

 check_dd
 

Static Public Attributes

 components = Property(list, _components, notify=RtcDeploymentControl.components_changed)
 
 active_components_changed = Signal(list)
 
 active_components = Property(list, _active_components, notify=active_components_changed)
 
 deployment_sets
 
 get_components_failed = Signal((str,), (str, object))
 

Protected Member Functions

list _components (self)
 Accessor method for component property.
 
list _active_components (self)
 Accessor method for active component property.
 
list _deployment_sets (self)
 Accessor method for deployment sets property.
 
 _exec_start_component (self, str component_name, Any tag)
 Delegate to Deployment Daemon facade to start a component.
 
 _exec_stop_component (self, str component_name, Any tag)
 Delegate to Deployment Daemon facade to stop a component.
 
 _exec_deploy (self, str deployment_set, Any tag)
 Delegate to Deployment Daemon facade to deploy a deployment set.
 
 _exec_undeploy (self, Any tag)
 Delegate to Deployment Daemon facade to undeploy current deployment set.
 
 _exec_get_active_deployment (self, Any tag)
 Delegate to Deployment Daemon facade to get name of active deployment.
 
 _exec_get_active_components (self, Any tag)
 Delegate to Deployment Daemon facade to get active components of current deployment.
 
 _exec_get_components (self, Any tag)
 Delegate to Deployment Daemon facade to get components of current deployment.
 
 _exec_get_deployment_sets (self, Any tag)
 Delegate to Deployment Daemon facade to get deployment sets of current deployment.
 
 _exec_get_state (self)
 Delegate to Deployment Daemon facade to get Deployment Daemon state.
 

Protected Attributes

 _cfg = cfg
 
 _deployment_data = deployment_data
 
 _dd_facade = None
 
str _active_deployment = None
 
list _components_list = []
 
list _active_components_list = []
 
list _deployment_sets_list = []
 
 _poll_deployment_timer = QTimer()
 

Detailed Description

Implements the RtcDeploymentControl interface using Deployment Daemon as the backend.

The command signals are effectively translated to invocations of the "Deployment Daemon". These are executed in the background using subprocess and a Qt timer periodically triggers a handler routine to monitor the "Deployment Daemon" invocations for completion. Once completed, the appropriate success or failure signal is sent depending on the exit code of the "nomad" command.

Constructor & Destructor Documentation

◆ __init__()

comms.deploymentcontroldeploymentdaemonimpl.RtcDeploymentControlDeploymentDaemonImpl.__init__ ( self,
parent,
deployment_data,
cfg )

Constructs a RtcDeploymentControl interface object that integrates with Deployment Daemon.

The deployment_data provides access to deployment information such as the deployment daemon, component list, etc.

Various timeout values are provided in the cfg object. The timeouts specify the maximum number of seconds to wait for the commands to complete. If the timeout is exceeded then the corresponding failure signal is emitted.

Parameters
parentOptional Qt parent object.
deployment_dataOptional deployment data object (Service Discovery).
cfgConfiguration object containing various timeout parameters.

Member Function Documentation

◆ _active_components()

list comms.deploymentcontroldeploymentdaemonimpl.RtcDeploymentControlDeploymentDaemonImpl._active_components ( self)
protected

Accessor method for active component property.


return type of : list[dict]

◆ _components()

list comms.deploymentcontroldeploymentdaemonimpl.RtcDeploymentControlDeploymentDaemonImpl._components ( self)
protected

Accessor method for component property.


return type of : list[dict]

◆ _deployment_sets()

list comms.deploymentcontroldeploymentdaemonimpl.RtcDeploymentControlDeploymentDaemonImpl._deployment_sets ( self)
protected

Accessor method for deployment sets property.


return type of : list[dict]

◆ _exec_deploy()

comms.deploymentcontroldeploymentdaemonimpl.RtcDeploymentControlDeploymentDaemonImpl._exec_deploy ( self,
str deployment_set,
Any tag )
protected

Delegate to Deployment Daemon facade to deploy a deployment set.

Parameters
deployment_setThe deployment set to be deployed.
tagAn optional user provided tag that uniquely identifies the request.

◆ _exec_get_active_components()

comms.deploymentcontroldeploymentdaemonimpl.RtcDeploymentControlDeploymentDaemonImpl._exec_get_active_components ( self,
Any tag )
protected

Delegate to Deployment Daemon facade to get active components of current deployment.

Parameters
tagAn optional user provided tag that uniquely identifies the request.

◆ _exec_get_active_deployment()

comms.deploymentcontroldeploymentdaemonimpl.RtcDeploymentControlDeploymentDaemonImpl._exec_get_active_deployment ( self,
Any tag )
protected

Delegate to Deployment Daemon facade to get name of active deployment.

Parameters
tagAn optional user provided tag that uniquely identifies the request.

◆ _exec_get_components()

comms.deploymentcontroldeploymentdaemonimpl.RtcDeploymentControlDeploymentDaemonImpl._exec_get_components ( self,
Any tag )
protected

Delegate to Deployment Daemon facade to get components of current deployment.

Parameters
tagAn optional user provided tag that uniquely identifies the request.

◆ _exec_get_deployment_sets()

comms.deploymentcontroldeploymentdaemonimpl.RtcDeploymentControlDeploymentDaemonImpl._exec_get_deployment_sets ( self,
Any tag )
protected

Delegate to Deployment Daemon facade to get deployment sets of current deployment.

Parameters
tagAn optional user provided tag that uniquely identifies the request.

◆ _exec_get_state()

comms.deploymentcontroldeploymentdaemonimpl.RtcDeploymentControlDeploymentDaemonImpl._exec_get_state ( self)
protected

Delegate to Deployment Daemon facade to get Deployment Daemon state.

The main usage of this method is to track deployment process so that the UI stays synchronized with it

◆ _exec_start_component()

comms.deploymentcontroldeploymentdaemonimpl.RtcDeploymentControlDeploymentDaemonImpl._exec_start_component ( self,
str component_name,
Any tag )
protected

Delegate to Deployment Daemon facade to start a component.

Parameters
component_nameThe component name needs to be in the deployment set.
tagAn optional user provided tag that uniquely identifies the request.

◆ _exec_stop_component()

comms.deploymentcontroldeploymentdaemonimpl.RtcDeploymentControlDeploymentDaemonImpl._exec_stop_component ( self,
str component_name,
Any tag )
protected

Delegate to Deployment Daemon facade to stop a component.

Parameters
component_nameThe component name needs to be in the deployment set.
tagAn optional user provided tag that uniquely identifies the request.

◆ _exec_undeploy()

comms.deploymentcontroldeploymentdaemonimpl.RtcDeploymentControlDeploymentDaemonImpl._exec_undeploy ( self,
Any tag )
protected

Delegate to Deployment Daemon facade to undeploy current deployment set.

Parameters
tagAn optional user provided tag that uniquely identifies the request.

◆ check_dd()

comms.deploymentcontroldeploymentdaemonimpl.RtcDeploymentControlDeploymentDaemonImpl.check_dd ( self)

Checking the connection to the Deployment Daemon.

◆ connect_facade()

comms.deploymentcontroldeploymentdaemonimpl.RtcDeploymentControlDeploymentDaemonImpl.connect_facade ( self,
reconnect = False )

Connects to the Deployment Daemon Facade if not already done.

Parameters
reconnectForce to re-connect if True.

◆ connection_changed()

comms.deploymentcontroldeploymentdaemonimpl.RtcDeploymentControlDeploymentDaemonImpl.connection_changed ( self,
bool connected )

Captures Deployment Daemon connection event.

Parameters
connectedBoolean that indicates the new state of connection.

◆ start_polling()

comms.deploymentcontroldeploymentdaemonimpl.RtcDeploymentControlDeploymentDaemonImpl.start_polling ( self)

Starts polling from the DeploymentDaemon Interface.

◆ stop_polling()

comms.deploymentcontroldeploymentdaemonimpl.RtcDeploymentControlDeploymentDaemonImpl.stop_polling ( self)

Stops polling from the DeploymentDaemon Interface.

Member Data Documentation

◆ _active_components_list

list comms.deploymentcontroldeploymentdaemonimpl.RtcDeploymentControlDeploymentDaemonImpl._active_components_list = []
protected

◆ _active_deployment

comms.deploymentcontroldeploymentdaemonimpl.RtcDeploymentControlDeploymentDaemonImpl._active_deployment = None
protected

◆ _cfg

comms.deploymentcontroldeploymentdaemonimpl.RtcDeploymentControlDeploymentDaemonImpl._cfg = cfg
protected

◆ _components_list

list comms.deploymentcontroldeploymentdaemonimpl.RtcDeploymentControlDeploymentDaemonImpl._components_list = []
protected

◆ _dd_facade

comms.deploymentcontroldeploymentdaemonimpl.RtcDeploymentControlDeploymentDaemonImpl._dd_facade = None
protected

◆ _deployment_data

comms.deploymentcontroldeploymentdaemonimpl.RtcDeploymentControlDeploymentDaemonImpl._deployment_data = deployment_data
protected

◆ _deployment_sets_list

list comms.deploymentcontroldeploymentdaemonimpl.RtcDeploymentControlDeploymentDaemonImpl._deployment_sets_list = []
protected

◆ _poll_deployment_timer

comms.deploymentcontroldeploymentdaemonimpl.RtcDeploymentControlDeploymentDaemonImpl._poll_deployment_timer = QTimer()
protected

◆ active_components

comms.deploymentcontroldeploymentdaemonimpl.RtcDeploymentControlDeploymentDaemonImpl.active_components = Property(list, _active_components, notify=active_components_changed)
static

◆ active_components_changed

comms.deploymentcontroldeploymentdaemonimpl.RtcDeploymentControlDeploymentDaemonImpl.active_components_changed = Signal(list)
static

◆ check_dd

comms.deploymentcontroldeploymentdaemonimpl.RtcDeploymentControlDeploymentDaemonImpl.check_dd

◆ components

comms.deploymentcontroldeploymentdaemonimpl.RtcDeploymentControlDeploymentDaemonImpl.components = Property(list, _components, notify=RtcDeploymentControl.components_changed)
static

◆ deployment_sets

comms.deploymentcontroldeploymentdaemonimpl.RtcDeploymentControlDeploymentDaemonImpl.deployment_sets
static
Initial value:
= Property(
list, _deployment_sets, notify=RtcDeploymentControl.deployment_sets_changed
)

◆ get_components_failed

comms.deploymentcontroldeploymentdaemonimpl.RtcDeploymentControlDeploymentDaemonImpl.get_components_failed = Signal((str,), (str, object))
static

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