#pragma once #include "kubecontrol/PodInfo.hpp" #include "nlohmann/json_fwd.hpp" #include "yaml-cpp/node/node.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace kubecontrol { class KubePod { public: KubePod(std::string Owner, std::string Uuid, std::string ContainerImage); KubePod(std::string Owner, std::string Uuid, std::string Component, std::string ContainerImage); std::string getUUID(); std::string getOwner(); void setEnvironmentVar(std::string key, std::string val); std::map GetEnvironmentVars(); std::string GetEnvironmentVar(std::string key); void setArgs(std::string args); std::vector GetArgs(); void setCommand(std::string command); std::string getCommand(); void setComponent(std::string component); std::string getComponent(); std::string createYAML(); std::string start(std::string apiAddress,std::string token); std::string stop(std::string apiAddress,std::string token); std::string getInfo(std::string apiAddress,std::string token); PodInfo PodInfo; private: std::string Owner_; std::string Uuid_; std::string Component_; std::string ContainerImage_; std::string ContainerRegistry_; std::string PathToYaml_; std::string PodCommand_; YAML::Node YAMLNode_; std::map EnvirmonentVars_; std::vector Args_; std::string StopChilds(std::string apiAddress,std::string token,std::string uuid); }; }