mirror of
https://github.com/containers/podman.git
synced 2025-05-21 00:56:36 +08:00
libpod: pass down network options
do not pass network specific options through the network namespace. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
@ -1003,6 +1003,19 @@ func WithStaticIP(ip net.IP) CtrCreateOption {
|
||||
}
|
||||
}
|
||||
|
||||
// WithNetworkOptions sets additional options for the networks.
|
||||
func WithNetworkOptions(options map[string][]string) CtrCreateOption {
|
||||
return func(ctr *Container) error {
|
||||
if ctr.valid {
|
||||
return define.ErrCtrFinalized
|
||||
}
|
||||
|
||||
ctr.config.NetworkOptions = options
|
||||
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// WithStaticMAC indicates that the container should request a static MAC from
|
||||
// the CNI plugins.
|
||||
// It cannot be set unless WithNetNS has already been passed.
|
||||
|
Reference in New Issue
Block a user