diff options
author | Matthew Heon <matthew.heon@gmail.com> | 2017-11-30 14:25:00 -0500 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2017-12-14 23:59:21 +0000 |
commit | 2bc20dd4d212ebbf14ee0de8fae7ce115fe00926 (patch) | |
tree | 4bad7a9abf772e03d6993432e553e9db77c7228e /libpod/options.go | |
parent | 90d984ef9a16bea6168542689a98748d00457152 (diff) | |
download | podman-2bc20dd4d212ebbf14ee0de8fae7ce115fe00926.tar.gz podman-2bc20dd4d212ebbf14ee0de8fae7ce115fe00926.tar.bz2 podman-2bc20dd4d212ebbf14ee0de8fae7ce115fe00926.zip |
Wire in net plugin into libpod
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
Closes: #109
Approved by: mheon
Diffstat (limited to 'libpod/options.go')
-rw-r--r-- | libpod/options.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libpod/options.go b/libpod/options.go index 8a12c61e4..1fe472ccc 100644 --- a/libpod/options.go +++ b/libpod/options.go @@ -250,6 +250,21 @@ func WithNoPivotRoot(noPivot bool) RuntimeOption { } } +// WithCNIDirs sets the CNI configuration and network plugin directories used by +// the CNI network plugins +func WithCNIDirs(cniConfigDir, cniPluginDir string) RuntimeOption { + return func(rt *Runtime) error { + if rt.valid { + return ErrRuntimeFinalized + } + + rt.config.CNIConfigDir = cniConfigDir + rt.config.CNIPluginDir = cniPluginDir + + return nil + } +} + // Container Creation Options // WithShmDir sets the directory that should be mounted on /dev/shm |