ADD: added name to KubePod and added the possibility to pass a shared pointer to start a pod

This commit is contained in:
Henry Winkel
2024-02-12 18:05:32 +01:00
parent 4045f21786
commit 2377948049
6 changed files with 48 additions and 1 deletions

View File

@@ -45,12 +45,30 @@ namespace kubecontrol
void setComponent(std::string component);
std::string getComponent();
/**
* @brief sets the name of the pod
* @param string - term to be displayed
*/
void setName(std::string name);
/**
* @brief return the name of the pod
* @return std::string
*/
std::string getName();
int start(KubernetesAPI APIInterface,bool WaitTillRunning = true);
int stop(KubernetesAPI APIInterface);
int stopChilds(KubernetesAPI APIInterface);
/**
*@brief updates the infos for a pod from the give Kubernetes API
*@param KubernetesAPI - object of KubernetesAPI wich holds all necessary to perfom requests
*@return returns 1 on failure
*/
int updateInfoForThisPod(KubernetesAPI APIInterface);
std::vector<std::string> getUUIDsForChildPods(KubernetesAPI APIInterface);
@@ -62,6 +80,7 @@ namespace kubecontrol
std::string Owner_;
std::string Uuid_;
std::string Name_;
std::string Component_;
std::string ContainerImage_;
std::string ContainerRegistry_;

View File

@@ -27,6 +27,8 @@ namespace kubecontrol
std::string getServerAddress();
void startPod(KubePod Pod,bool WaitTillRunning = true );
void startPod(std::shared_ptr<KubePod> Pod,bool WaitTillRunning = true );
void stopPod(std::string uuid);
void stopAllPods();