summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
Diffstat (limited to 'libpod')
-rw-r--r--libpod/options.go21
1 files changed, 16 insertions, 5 deletions
diff --git a/libpod/options.go b/libpod/options.go
index 3020ef51a..8720c3639 100644
--- a/libpod/options.go
+++ b/libpod/options.go
@@ -251,16 +251,27 @@ 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 {
+// WithCNIConfigDir sets the CNI configuration directory
+func WithCNIConfigDir(dir string) RuntimeOption {
return func(rt *Runtime) error {
if rt.valid {
return ErrRuntimeFinalized
}
- rt.config.CNIConfigDir = cniConfigDir
- rt.config.CNIPluginDir = cniPluginDir
+ rt.config.CNIConfigDir = dir
+
+ return nil
+ }
+}
+
+// WithCNIPluginDir sets the CNI plugins directory
+func WithCNIPluginDir(dir string) RuntimeOption {
+ return func(rt *Runtime) error {
+ if rt.valid {
+ return ErrRuntimeFinalized
+ }
+
+ rt.config.CNIPluginDir = dir
return nil
}