From 784a13f57752caee545e2e22a8f35665befbd8bd Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Tue, 29 Mar 2022 19:10:01 +0200 Subject: network create: add support for ipam-driver none Add a new flag to set the ipam-driver. Also adds a new ipam driver none mode which only creates interfaces but does not assign addresses. Fixes #13521 Signed-off-by: Paul Holzinger --- cmd/podman/common/completion.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'cmd/podman/common') diff --git a/cmd/podman/common/completion.go b/cmd/podman/common/completion.go index 9ebdcda2b..1c0065006 100644 --- a/cmd/podman/common/completion.go +++ b/cmd/podman/common/completion.go @@ -1115,6 +1115,13 @@ func AutocompleteNetworkDriver(cmd *cobra.Command, args []string, toComplete str return drivers, cobra.ShellCompDirectiveNoFileComp } +// AutocompleteNetworkIPAMDriver - Autocomplete network ipam driver option. +// -> "bridge", "macvlan" +func AutocompleteNetworkIPAMDriver(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { + drivers := []string{types.HostLocalIPAMDriver, types.DHCPIPAMDriver, types.NoneIPAMDriver} + return drivers, cobra.ShellCompDirectiveNoFileComp +} + // AutocompletePodShareNamespace - Autocomplete pod create --share flag option. // -> "ipc", "net", "pid", "user", "uts", "cgroup", "none" func AutocompletePodShareNamespace(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { -- cgit v1.2.3-54-g00ecf