|
RTC Toolkit 5.1.0
|
Deployment Daemon business logic. More...
#include <deploymentDaemonBusinessLogic.hpp>
Classes | |
| struct | PythonObjects |
Public Types | |
| using | ComponentType = LifeCycle |
Public Member Functions | |
| DeploymentDaemonBusinessLogic (const std::string &name, ServiceContainer &services, const elt::mal::Uri &sde) | |
| virtual | ~DeploymentDaemonBusinessLogic () |
| void | ActivityDeploying (StopToken st, std::string args) override |
| void | ActivityUndeploying (StopToken st) override |
| std::string | ActionGetActiveDeployment () override |
| std::string | ActionGetDescription () override |
| std::vector< std::string > | ActionGetDeploymentSets () override |
| std::vector< std::string > | ActionGetComponents () override |
| std::vector< std::string > | ActionGetActiveComponents () override |
| Returns active components from the active deployment set. | |
| void | ActionStartComponent (std::string component_name) override |
| void | ActionStopComponent (std::string component_name) override |
| void | ActivityStarting (cfw::StopToken st) override |
| std::vector< std::string > | ActionGetServices () override |
| std::vector< std::string > | ActionGetActiveServices () override |
Protected Member Functions | |
| void | DeployServices (const DataPointPath &depl_set_path) |
| Deploys all services if any. | |
| void | DeployComponents (const DataPointPath &depl_set_path) |
| Deploys all components. | |
| void | UndeployProcesses (std::vector< std::string > &proceses) |
| Undeploys all components. | |
| void | StartProcess (const std::string &name, const std::string &type, const DataPointPath &depl_set_path) |
| Implements the StartProcess command: starts Nomad job process for give component or service. | |
| void | StopProces (const std::string &component_name, const bool check_error=true) |
| Implements the StopProces command. | |
| void | GetDeploymentSets () |
| Fetches the available Deployment Sets from the Persistent Configuration Repository and caches the value. | |
| void | InitPythonObjects () |
| Initialize Python object for py bind calls. | |
| void | CleanupPythonObjects () noexcept |
| Clean up Python objects. | |
Protected Attributes | |
| log4cplus::Logger & | m_logger |
| const std::string | m_name |
| component name | |
| rtctk::componentFramework::ServiceContainer & | m_service_container |
| Reference to container services needed to access run-time repository for configuration, and other services. | |
| rtctk::componentFramework::ServiceDiscovery & | m_service_discovery |
| std::unique_ptr< rtctk::componentFramework::PersistentRepoIf > | m_persistent_repo |
| References to the persistent repository. | |
| std::vector< std::string > | m_deployment_sets |
| List of deployment sets. | |
| std::string | m_active_deployment_set |
| Name of active deployment set. | |
| std::string | m_description |
| Deployment set description. | |
| std::vector< std::string > | m_services |
| List of deployed services. | |
| std::vector< std::string > | m_components |
| List of deployed components. | |
| elt::mal::Uri | m_sde |
| Service Discovery EndPoint URI. | |
| std::mutex | m_mutex |
| Mutex as a temporary workaround to protect python jobfile generation. | |
| std::unique_ptr< PythonObjects > | m_pyobjects |
Deployment Daemon business logic.
| rtctk::deploymentDaemon::DeploymentDaemonBusinessLogic::DeploymentDaemonBusinessLogic | ( | const std::string & | name, |
| ServiceContainer & | services, | ||
| const elt::mal::Uri & | sde ) |
|
virtual |
|
overridevirtual |
Returns active components from the active deployment set.
Should be the subset of ActionGetComponents, or the same.
Implements rtctk::deploymentDaemon::DeploymentDaemonLifeCycle::BizLogicIf.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
protectednoexcept |
Clean up Python objects.
|
protected |
Deploys all components.
| [in] | depl_set_path | path to the deployment cfg |
go one by one through the component list
|
protected |
Deploys all services if any.
| [in] | depl_set_path | path to the deployment cfg |
go one by one through the service list
|
protected |
Fetches the available Deployment Sets from the Persistent Configuration Repository and caches the value.
If the Deployment Sets have not been retrieved yet, this method fetches the value and stores it in m_deployment_sets.
|
protected |
Initialize Python object for py bind calls.
|
protected |
Implements the StartProcess command: starts Nomad job process for give component or service.
| [in] | name | Name of the component/service to be started. |
| [in] | type | Type of the service to be started. |
| [in] | depl_set_path | path to the deployment cfg |
|
protected |
Implements the StopProces command.
| [in] | component_name | Name of the component to be stopped. |
| [in] | check_error | if should be check for error, and throw exception |
|
protected |
Undeploys all components.
| proceses | List of processes (components or services) to undeploy/stop. the list is cleared at the end. |
|
protected |
Name of active deployment set.
|
protected |
List of deployed components.
|
protected |
List of deployment sets.
|
protected |
Deployment set description.
|
protected |
|
protected |
Mutex as a temporary workaround to protect python jobfile generation.
|
protected |
component name
|
protected |
References to the persistent repository.
|
protected |
|
protected |
Service Discovery EndPoint URI.
|
protected |
Reference to container services needed to access run-time repository for configuration, and other services.
|
protected |
|
protected |
List of deployed services.