82 lines
2.0 KiB
C++
82 lines
2.0 KiB
C++
#pragma once
|
|
#include <map>
|
|
#include <string>
|
|
#include <utility>
|
|
#include <kubecontrol/Utils.hpp>
|
|
#include <yaml-cpp/yaml.h>
|
|
|
|
|
|
namespace kubecontrol
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
class Container
|
|
{
|
|
public:
|
|
/**
|
|
* @brief Construct a new Container object
|
|
*
|
|
* @param Owner
|
|
* @param Uuid
|
|
* @param ContainerImage
|
|
*/
|
|
Container(const std::string &Owner, const std::string &Uuid,const std::string &Image, const PullPolicy &policy, const std::string ®istry = "kmaster.ti.unibw-hamburg.de:30808");
|
|
|
|
/**
|
|
* @brief adds env to container
|
|
*
|
|
* @param env
|
|
*/
|
|
void addEnv(const std::pair<std::string, std::string> &env);
|
|
|
|
/**
|
|
* @brief add map of envs
|
|
*
|
|
* @param envs
|
|
*/
|
|
void addEnv(const std::map<std::string, std::string> &envs);
|
|
|
|
/**
|
|
* @brief Get the Owner
|
|
*
|
|
* @return
|
|
*/
|
|
std::string getOwner() { return owner_;};
|
|
|
|
/**
|
|
* @brief get the uuid
|
|
*
|
|
* @return
|
|
*/
|
|
std::string getUUID() { return uuid_;};
|
|
|
|
/**
|
|
* @brief Get the Image
|
|
*
|
|
* @return
|
|
*/
|
|
std::string getImage() { return image_;};
|
|
|
|
|
|
YAML::Node toYAML();
|
|
private:
|
|
/// @brief uuid of the container owner
|
|
std::string owner_;
|
|
/// @brief uuid of the container
|
|
std::string uuid_;
|
|
/// @brief image of the container
|
|
std::string image_;
|
|
/// @brief registry of the container
|
|
std::string registry_;
|
|
/// @brief pull Policy is a enum
|
|
PullPolicy pullPolicy_;
|
|
/// @brief environment variables
|
|
std::map<std::string, std::string> envs_;
|
|
|
|
};
|
|
|
|
}
|