Use new ocicni.

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu
2017-09-07 00:14:12 +00:00
parent 1c0385a650
commit f36ef46b35
6 changed files with 18 additions and 9 deletions

View File

@@ -23,7 +23,7 @@ import (
"sync"
"time"
"github.com/cri-o/ocicni"
"github.com/cri-o/ocicni/pkg/ocicni"
)
// CalledDetail is the struct contains called function name and arguments.
@@ -148,14 +148,14 @@ func (f *FakeCNIPlugin) TearDownPod(podNetwork ocicni.PodNetwork) error {
}
// GetPodNetworkStatus get the status of network.
func (f *FakeCNIPlugin) GetPodNetworkStatus(netnsPath string) (string, error) {
func (f *FakeCNIPlugin) GetPodNetworkStatus(podNetwork ocicni.PodNetwork) (string, error) {
f.Lock()
defer f.Unlock()
f.appendCalled("GetPodNetworkStatus", netnsPath)
f.appendCalled("GetPodNetworkStatus", podNetwork)
if err := f.getError("GetPodNetworkStatus"); err != nil {
return "", err
}
ip, ok := f.IPMap[netnsPath]
ip, ok := f.IPMap[podNetwork.NetNS]
if !ok {
return "", fmt.Errorf("failed to find the IP")
}