sandbox_network: pass sandbox to newPodNetwork
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
parent
6c871769b4
commit
3dd043c581
2 changed files with 8 additions and 7 deletions
|
@ -7,6 +7,7 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/cri-o/ocicni/pkg/ocicni"
|
||||
"github.com/kubernetes-incubator/cri-o/libkpod/sandbox"
|
||||
"github.com/opencontainers/runtime-tools/validate"
|
||||
"github.com/syndtr/gocapability/capability"
|
||||
)
|
||||
|
@ -149,12 +150,12 @@ func SysctlsFromPodAnnotation(annotation string) ([]Sysctl, error) {
|
|||
return sysctls, nil
|
||||
}
|
||||
|
||||
func newPodNetwork(namespace, name, id, netns string) ocicni.PodNetwork {
|
||||
func newPodNetwork(sb *sandbox.Sandbox) ocicni.PodNetwork {
|
||||
return ocicni.PodNetwork{
|
||||
Name: name,
|
||||
Namespace: namespace,
|
||||
ID: id,
|
||||
NetNS: netns,
|
||||
Name: sb.KubeName(),
|
||||
Namespace: sb.Namespace(),
|
||||
ID: sb.ID(),
|
||||
NetNS: sb.NetNsPath(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue