From dc1c41d7ef39051672ebfd7a555bfae2c11d7b5e Mon Sep 17 00:00:00 2001 From: Aldo Lacuku Date: Mon, 11 Dec 2023 15:35:50 +0100 Subject: [PATCH] cleanup(libsinsp/container_engine): remove unused method Signed-off-by: Aldo Lacuku --- userspace/libsinsp/cri.h | 7 ------- userspace/libsinsp/cri.hpp | 14 -------------- 2 files changed, 21 deletions(-) diff --git a/userspace/libsinsp/cri.h b/userspace/libsinsp/cri.h index 4f0b2d313b..a7000a9474 100644 --- a/userspace/libsinsp/cri.h +++ b/userspace/libsinsp/cri.h @@ -211,13 +211,6 @@ template class cri_interface */ bool parse_cri_user_info(const Json::Value &info, sinsp_container_info &container); - /** - * @brief check if the passed container ID is a pod sandbox (pause container) - * @param container_id the container ID to check - * @return true if it's a pod sandbox - */ - bool is_pod_sandbox(const std::string &container_id); - /** * @brief get pod IP address * @param resp initialized api::PodSandboxStatusResponse of the pod sandbox diff --git a/userspace/libsinsp/cri.hpp b/userspace/libsinsp/cri.hpp index 597ea57917..831ef98117 100644 --- a/userspace/libsinsp/cri.hpp +++ b/userspace/libsinsp/cri.hpp @@ -465,20 +465,6 @@ bool cri_interface::parse_cri_user_info(const Json::Value &info, sinsp_cont return true; } -template bool cri_interface::is_pod_sandbox(const std::string &container_id) -{ - typename api::PodSandboxStatusRequest req; - typename api::PodSandboxStatusResponse resp; - req.set_pod_sandbox_id(container_id); - req.set_verbose(true); - grpc::ClientContext context; - auto deadline = std::chrono::system_clock::now() + std::chrono::milliseconds(s_cri_timeout); - context.set_deadline(deadline); - grpc::Status status = m_cri->PodSandboxStatus(&context, req, &resp); - - return status.ok(); -} - // TODO: Explore future schema standardizations, https://github.com/falcosecurity/falco/issues/2387 template void cri_interface::get_pod_info_cniresult(typename api::PodSandboxStatusResponse &resp, std::string &cniresult)