Update ocicni to my fork.

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu
2018-02-02 19:45:26 +00:00
parent 34dd28ab32
commit d113c16802
6 changed files with 63 additions and 76 deletions

View File

@@ -23,6 +23,7 @@ import (
"sync"
"time"
"github.com/containernetworking/cni/pkg/types"
"github.com/cri-o/ocicni/pkg/ocicni"
)
@@ -120,15 +121,16 @@ func (f *FakeCNIPlugin) Name() string {
}
// SetUpPod setup the network of PodSandbox.
func (f *FakeCNIPlugin) SetUpPod(podNetwork ocicni.PodNetwork) error {
func (f *FakeCNIPlugin) SetUpPod(podNetwork ocicni.PodNetwork) (types.Result, error) {
f.Lock()
defer f.Unlock()
f.appendCalled("SetUpPod", podNetwork)
if err := f.getError("SetUpPod"); err != nil {
return err
return nil, err
}
f.IPMap[podNetwork.NetNS] = generateIP()
return nil
// types.Result is unused.
return nil, nil
}
// TearDownPod teardown the network of PodSandbox.