RTC Toolkit  2.0.0
Classes | Public Member Functions | Public Attributes | List of all members
comms.deployment.RtcDeploymentControlNomadImpl Class Reference

Implements the RtcDeploymentControl interface using Nomad as the backend. More...

Inheritance diagram for comms.deployment.RtcDeploymentControlNomadImpl:
comms.deployment.RtcDeploymentControl

Classes

class  _CommandContext
 

Public Member Functions

def __init__ (self, parent=None, List[str] search_paths=["."], float timeout=60.0)
 Constructs a RtcDeploymentControl interface object that integrates with Nomad directly. More...
 
- Public Member Functions inherited from comms.deployment.RtcDeploymentControl
def __init__ (self, parent=None)
 
def start_deployment (self, str deployment_set, Optional[Any] tag=None)
 Qt slot to trigger starting of a Deployment Set. More...
 
def stop_deployment (self, Optional[Any] tag=None)
 Qt slot to trigger stopping of the currently running Deployment Set. More...
 
def start_component (self, str component_name, Optional[Any] tag=None)
 Qt slot to trigger starting of a SRTC component. More...
 
def stop_component (self, str component_name, Optional[Any] tag=None)
 Qt slot to trigger stopping of a SRTC component. More...
 

Public Attributes

 timeout
 Controls the maximum number of seconds to wait for the nomad commands to complete. More...
 

Additional Inherited Members

- Static Public Attributes inherited from comms.deployment.RtcDeploymentControl
 deployment_started = Signal([], [object])
 Signal indicating that the processes for the Deployment Set have been successfully started. More...
 
 deployment_start_failed = Signal([str], [str, object])
 Signal indicating there was an error when trying to start the Deployment Set. More...
 
 deployment_stopped = Signal([], [object])
 Signal indicating that the processes for the currently active Deployment Set have been successfully stopped. More...
 
 deployment_stop_failed = Signal([str], [str, object])
 Signal indicating there was an error when trying to stop the currently active Deployment Set. More...
 
 component_started = Signal([], [object])
 Signal indicating that a component has been successfully started. More...
 
 component_start_failed = Signal([str], [str, object])
 Signal indicating there was an error when trying to start a component. More...
 
 component_stopped = Signal([], [object])
 Signal indicating that a component has been successfully stopped. More...
 
 component_stop_failed = Signal([str], [str, object])
 Signal indicating there was an error when trying to stop a component. More...
 

Detailed Description

Implements the RtcDeploymentControl interface using Nomad as the backend.

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

Constructor & Destructor Documentation

◆ __init__()

def comms.deployment.RtcDeploymentControlNomadImpl.__init__ (   self,
  parent = None,
List[str]   search_paths = ["."],
float   timeout = 60.0 
)

Constructs a RtcDeploymentControl interface object that integrates with Nomad directly.

   Available Nomad jobs are found by recursively searching for .nomad files. By default the
   search is performed in the current working directory.

   @param[in] parent Optional Qt parent object.
   @param[in] search_paths Optional list of search paths to find the .nomad job files.
   @param[in] timeout The maximum number of seconds to wait for the commands to complete.
                      If the timeout is exceeded then the corresponding failure signal is
                      emitted.

Member Data Documentation

◆ timeout

comms.deployment.RtcDeploymentControlNomadImpl.timeout

Controls the maximum number of seconds to wait for the nomad commands to complete.


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