Applying k8s.io v3 API for ocic and ocid
Signed-off-by: Michał Żyłowski <michal.zylowski@intel.com>
This commit is contained in:
parent
a48336f981
commit
5c81217e09
26 changed files with 247 additions and 289 deletions
|
@ -261,19 +261,14 @@ func (s *Server) generatePodIDandName(name string, namespace string, attempt uin
|
|||
return id, name, err
|
||||
}
|
||||
|
||||
type podSandboxRequest interface {
|
||||
GetPodSandboxId() string
|
||||
}
|
||||
|
||||
func (s *Server) getPodSandboxFromRequest(req podSandboxRequest) (*sandbox, error) {
|
||||
sbID := req.GetPodSandboxId()
|
||||
if sbID == "" {
|
||||
func (s *Server) getPodSandboxFromRequest(podSandboxID string) (*sandbox, error) {
|
||||
if podSandboxID == "" {
|
||||
return nil, errSandboxIDEmpty
|
||||
}
|
||||
|
||||
sandboxID, err := s.podIDIndex.Get(sbID)
|
||||
sandboxID, err := s.podIDIndex.Get(podSandboxID)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("PodSandbox with ID starting with %s not found: %v", sbID, err)
|
||||
return nil, fmt.Errorf("PodSandbox with ID starting with %s not found: %v", podSandboxID, err)
|
||||
}
|
||||
|
||||
sb := s.getSandbox(sandboxID)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue