ADD: add a simple working version of a pod controler class
This commit is contained in:
45
include/kubecontrol/KubePod.hpp
Normal file
45
include/kubecontrol/KubePod.hpp
Normal file
@@ -0,0 +1,45 @@
|
||||
#pragma once
|
||||
|
||||
#include "nlohmann/json_fwd.hpp"
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <yaml-cpp/yaml.h>
|
||||
#include <fstream>
|
||||
#include <curlpp/cURLpp.hpp>
|
||||
#include <curlpp/Easy.hpp>
|
||||
#include <curlpp/Options.hpp>
|
||||
#include <kubecontrol/WriterMemoryClass.hpp>
|
||||
#include <loguru.hpp>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
|
||||
namespace kubecontrol
|
||||
{
|
||||
class KubePod
|
||||
{
|
||||
public:
|
||||
KubePod(std::string Label, std::string Uuid, std::string ContainerImage);
|
||||
|
||||
void setEnvironmentVar(std::string key, std::string val);
|
||||
std::map<std::string, std::string> GetEnvironmentVars();
|
||||
std::string* GetEnvironmentVar(std::string key);
|
||||
|
||||
std::string createYAML();
|
||||
nlohmann::json start(std::string apiAddress,std::string token);
|
||||
nlohmann::json stop(std::string apiAddress,std::string token);
|
||||
nlohmann::json getInfo(std::string apiAddress,std::string token);
|
||||
|
||||
|
||||
|
||||
private:
|
||||
std::string Label_;
|
||||
std::string Uuid_;
|
||||
std::string ContainerImage_;
|
||||
std::string ContainerRegistry_;
|
||||
std::string PathToYaml_;
|
||||
|
||||
std::map<std::string, std::string> EnvirmonentVars_;
|
||||
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user