Add cni config template support.

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu
2018-04-07 00:50:08 +00:00
parent 68ef2c338e
commit b2099c2061
9 changed files with 242 additions and 9 deletions

View File

@@ -21,7 +21,9 @@ import (
)
// FakeCNIPlugin is a fake plugin used for test.
type FakeCNIPlugin struct{}
type FakeCNIPlugin struct {
StatusErr error
}
// NewFakeCNIPlugin create a FakeCNIPlugin.
func NewFakeCNIPlugin() *FakeCNIPlugin {
@@ -40,7 +42,7 @@ func (f *FakeCNIPlugin) Remove(id, path string, opts ...cni.NamespaceOpts) error
// Status get the status of the plugin.
func (f *FakeCNIPlugin) Status() error {
return nil
return f.StatusErr
}
// Load loads the network config.