CHG: cnahged label to uid

This commit is contained in:
Henry Winkel
2023-10-27 14:11:57 +02:00
parent be81f87154
commit d40cc7a8c0

View File

@@ -144,18 +144,18 @@ namespace kubecontrol
}
std::string PodController::getInfoForPod(std::string Label)
std::string PodController::getInfoForPod(std::string uid)
{
bool found = false;
for (auto item : PodList_)
{
if (Label == item.getUUID())
if (uid == item.getUUID())
{
found = true;
checkPodsHierarchy();
item.InfoPod = *getPodInfo(item.getUUID()).get();
LOG_S(INFO)<<item.InfoPod.getRelatedPods().size();
// LOG_S(INFO)<<item.InfoPod.getRelatedPods().size();
return item.getInfo(ServerAddress_+ApiCall_, BearerToken_);
@@ -164,7 +164,7 @@ namespace kubecontrol
if (found == false)
{
std::string curlURL = ServerAddress_+ApiCall_+Label;
std::string curlURL = ServerAddress_+ApiCall_+uid;
auto response = this->performRequest(curlURL);
return response;
}
@@ -258,7 +258,10 @@ namespace kubecontrol
return podsInfoList_[i];
}
}
return nullptr;
checkPodsHierarchy();
LOG_S(INFO)<< "check Hierarchy";
return getPodsInfo(uuid);;
}