Line data Source code
1 : #ifndef __SRC_OPER_DOCKER_INSTANCE_ADAPTER_H 2 : #define __SRC_OPER_DOCKER_INSTANCE_ADAPTER_H 3 : #include "oper/instance_manager_adapter.h" 4 : #include "oper/service_instance.h" 5 : #include "oper/instance_task.h" 6 : 7 : class DockerInstanceAdapter : public InstanceManagerAdapter { 8 : public: 9 3 : DockerInstanceAdapter(const std::string &docker_cmd,Agent *agent) 10 3 : : docker_cmd_(docker_cmd), agent_(agent) {} 11 : 12 : InstanceTask* CreateStartTask(const ServiceInstance::Properties &props, 13 : bool update); 14 : InstanceTask* CreateStopTask(const ServiceInstance::Properties &props); 15 : bool isApplicable(const ServiceInstance::Properties &props); 16 : 17 : private: 18 : std::string docker_cmd_; 19 : Agent *agent_; 20 : }; 21 : 22 : #endif