Skip to content

Commit

Permalink
cleanup(libsinsp/container_engine): remove unused method
Browse files Browse the repository at this point in the history
Signed-off-by: Aldo Lacuku <[email protected]>
  • Loading branch information
alacuku authored and poiana committed Dec 12, 2023
1 parent a43ab4a commit dc1c41d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 21 deletions.
7 changes: 0 additions & 7 deletions userspace/libsinsp/cri.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,13 +211,6 @@ template<class api> 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
Expand Down
14 changes: 0 additions & 14 deletions userspace/libsinsp/cri.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -465,20 +465,6 @@ bool cri_interface<api>::parse_cri_user_info(const Json::Value &info, sinsp_cont
return true;
}

template<typename api> bool cri_interface<api>::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<typename api>
void cri_interface<api>::get_pod_info_cniresult(typename api::PodSandboxStatusResponse &resp, std::string &cniresult)
Expand Down

0 comments on commit dc1c41d

Please sign in to comment.