diff options
author | Paul Holzinger <pholzing@redhat.com> | 2021-11-11 16:37:13 +0100 |
---|---|---|
committer | Paul Holzinger <pholzing@redhat.com> | 2021-11-11 17:30:27 +0100 |
commit | fe90a45e0d914723b8c26e4e9497f414312b6af0 (patch) | |
tree | 883c28f2c52c6a2c6e01848efd7ca763216ddf2c /cmd/podman/root.go | |
parent | 8041d44c93ac46d330325cda849716f5ba2c40d9 (diff) | |
download | podman-fe90a45e0d914723b8c26e4e9497f414312b6af0.tar.gz podman-fe90a45e0d914723b8c26e4e9497f414312b6af0.tar.bz2 podman-fe90a45e0d914723b8c26e4e9497f414312b6af0.zip |
Add flag to overwrite network backend from config
To make testing easier we can overwrite the network backend with the
global `--network-backend` option.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'cmd/podman/root.go')
-rw-r--r-- | cmd/podman/root.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/podman/root.go b/cmd/podman/root.go index 6da34050e..418a70e1e 100644 --- a/cmd/podman/root.go +++ b/cmd/podman/root.go @@ -357,6 +357,11 @@ func rootFlags(cmd *cobra.Command, opts *entities.PodmanConfig) { pFlags.StringVar(&cfg.Engine.Namespace, namespaceFlagName, cfg.Engine.Namespace, "Set the libpod namespace, used to create separate views of the containers and pods on the system") _ = cmd.RegisterFlagCompletionFunc(namespaceFlagName, completion.AutocompleteNone) + networkBackendFlagName := "network-backend" + pFlags.StringVar(&cfg.Network.NetworkBackend, networkBackendFlagName, cfg.Network.NetworkBackend, `Network backend to use ("cni"|"netavark")`) + _ = cmd.RegisterFlagCompletionFunc(networkBackendFlagName, common.AutocompleteNetworkBackend) + pFlags.MarkHidden(networkBackendFlagName) + rootFlagName := "root" pFlags.StringVar(&cfg.Engine.StaticDir, rootFlagName, "", "Path to the root directory in which data, including images, is stored") _ = cmd.RegisterFlagCompletionFunc(rootFlagName, completion.AutocompleteDefault) |