ADD: adden function to get PodInfo for a specific pod from podcontroler
This commit is contained in:
@@ -25,6 +25,7 @@ namespace kubecontrol
|
|||||||
void checkPodsHierarchy();
|
void checkPodsHierarchy();
|
||||||
|
|
||||||
std::string getPodsInfoForAll();
|
std::string getPodsInfoForAll();
|
||||||
|
std::shared_ptr<PodInfo> getPodsInfo(std::string uuid);
|
||||||
private:
|
private:
|
||||||
std::vector<KubePod> PodList_;
|
std::vector<KubePod> PodList_;
|
||||||
|
|
||||||
|
|||||||
@@ -227,6 +227,19 @@ namespace kubecontrol
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::shared_ptr<PodInfo> PodController::getPodsInfo(std::string uuid)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < podsInfoList_.size(); i++) {
|
||||||
|
|
||||||
|
if (podsInfoList_[i]->Uuid == uuid)
|
||||||
|
{
|
||||||
|
return podsInfoList_[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// void PodController::addPodInfoToInfoList(std::unique_ptr<PodInfo> podinfo)
|
// void PodController::addPodInfoToInfoList(std::unique_ptr<PodInfo> podinfo)
|
||||||
// {
|
// {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user