Files
KubeControl/include/kubecontrol/PodInfo.hpp

66 lines
1.3 KiB
C++

#pragma once
#include "nlohmann/json_fwd.hpp"
#include <memory>
#include <string>
#include <vector>
#include <nlohmann/json.hpp>
#include <string>
#include <loguru.hpp>
namespace kubecontrol {
class PodInfo
{
public:
PodInfo();
PodInfo(std::string response);
void update(std::string response);
std::string ToString();
nlohmann::json ToJson();
std::vector<std::string> getRelatedPods();
std::string Uuid;
std::string Image;
std::string Ip;
std::string Component;
std::string Status;
std::string PartOf;
void addRelatedPods(std::string uuid);
size_t relatedPodsSize();
private:
std::vector<std::string> relatedPods;
};
// struct PodInfo
// {
// std::string Uuid;
// std::string Image;
// std::string Ip;
// std::string Component;
// std::string Status;
// std::string PartOf;
// std::vector<std::pair<std::string,std::shared_ptr<KubePod>>> relatedPods;
// bool operator==(PodInfo const &rhs )
// {
// if (Uuid == rhs.Uuid) {
// return true;
// }
// return false;
// }
// };
}