diff options
author | Paul Holzinger <pholzing@redhat.com> | 2021-12-08 15:31:49 +0100 |
---|---|---|
committer | Paul Holzinger <pholzing@redhat.com> | 2021-12-14 15:23:39 +0100 |
commit | 4791595b5cb3b2350c66b0d1ba91a6a171652409 (patch) | |
tree | 8b14ea4bdf587b2ace2debd49c51b76977b9bdd6 /pkg/domain/infra | |
parent | 9ce6b64133bc37433efac391bcaf9234c3890fc5 (diff) | |
download | podman-4791595b5cb3b2350c66b0d1ba91a6a171652409.tar.gz podman-4791595b5cb3b2350c66b0d1ba91a6a171652409.tar.bz2 podman-4791595b5cb3b2350c66b0d1ba91a6a171652409.zip |
network connect allow ip, ipv6 and mac address
Network connect now supports setting a static ipv4, ipv6 and mac address
for the container network. The options are added to the cli and api.
Fixes #9883
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'pkg/domain/infra')
-rw-r--r-- | pkg/domain/infra/abi/network.go | 2 | ||||
-rw-r--r-- | pkg/domain/infra/tunnel/network.go | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/pkg/domain/infra/abi/network.go b/pkg/domain/infra/abi/network.go index 49c7dc60d..c7b12663c 100644 --- a/pkg/domain/infra/abi/network.go +++ b/pkg/domain/infra/abi/network.go @@ -124,7 +124,7 @@ func (ic *ContainerEngine) NetworkDisconnect(ctx context.Context, networkname st } func (ic *ContainerEngine) NetworkConnect(ctx context.Context, networkname string, options entities.NetworkConnectOptions) error { - return ic.Libpod.ConnectContainerToNetwork(options.Container, networkname, options.Aliases) + return ic.Libpod.ConnectContainerToNetwork(options.Container, networkname, options.PerNetworkOptions) } // NetworkExists checks if the given network exists diff --git a/pkg/domain/infra/tunnel/network.go b/pkg/domain/infra/tunnel/network.go index 069982d30..b5050345a 100644 --- a/pkg/domain/infra/tunnel/network.go +++ b/pkg/domain/infra/tunnel/network.go @@ -81,8 +81,7 @@ func (ic *ContainerEngine) NetworkDisconnect(ctx context.Context, networkname st // NetworkConnect removes a container from a given network func (ic *ContainerEngine) NetworkConnect(ctx context.Context, networkname string, opts entities.NetworkConnectOptions) error { - options := new(network.ConnectOptions).WithAliases(opts.Aliases) - return network.Connect(ic.ClientCtx, networkname, opts.Container, options) + return network.Connect(ic.ClientCtx, networkname, opts.Container, &opts.PerNetworkOptions) } // NetworkExists checks if the given network exists |