ADD: added central kubernetes api class

This commit is contained in:
Henry Winkel
2023-12-21 17:15:28 +01:00
parent d1024de907
commit 351cf9ec69
12 changed files with 514 additions and 128 deletions

View File

@@ -1,4 +1,5 @@
#pragma once
#include "kubecontrol/KubernetesAPI.hpp"
#include "kubecontrol/PodInfo.hpp"
#include <cstddef>
#include <kubecontrol/KubePod.hpp>
@@ -16,13 +17,13 @@ namespace kubecontrol
std::string getServerAddress();
void startPod(KubePod Pod);
void stopPod(std::string Label);
void startPod(KubePod Pod,bool WaitTillRunning = true );
void stopPod(std::string uuid);
void stopAllPods();
std::string getPodsInfo();
std::string getInfoForOwnPod();
std::string getInfoForPod(std::string Label);
std::string getInfoForAllPods();
// std::string getInfoForOwnPod();
std::string getInfoForPod(std::string uuid);
size_t getListOfChildPods();
void checkPodsHierarchy();
@@ -30,6 +31,7 @@ namespace kubecontrol
std::string getPodsInfoForAll();
std::shared_ptr<PodInfo> getPodsInfo(std::string uuid);
private:
KubernetesAPI APIInterface_;
std::vector<KubePod> PodList_;
std::string performRequest(std::string url);