mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
api/t/ctr: deprecate DefaultNetworkSettings
This struct is only used to report the networking state for the default bridge network when the container is connected to it. It was deprecated in v1.09 (API v1.21), and scheduled for removal in v1.11. Unfortunately, the deprecation warning was wrongly formatted in the Go code. However, deprecation warnings are already present in swagger.yaml, so don't touch it. Signed-off-by: Albin Kerouanton <albinker@gmail.com>
This commit is contained in:
@@ -242,13 +242,13 @@ func (daemon *Daemon) ContainerExecInspect(id string) (*backend.ExecInspect, err
|
||||
|
||||
// getDefaultNetworkSettings creates the deprecated structure that holds the information
|
||||
// about the bridge network for a container.
|
||||
func getDefaultNetworkSettings(networks map[string]*network.EndpointSettings) containertypes.DefaultNetworkSettings {
|
||||
func getDefaultNetworkSettings(networks map[string]*network.EndpointSettings) containertypes.DefaultNetworkSettings { //nolint:staticcheck // ignore SA1019: DefaultNetworkSettings is deprecated in v28.4.
|
||||
nw, ok := networks[networktypes.NetworkBridge]
|
||||
if !ok || nw.EndpointSettings == nil {
|
||||
return containertypes.DefaultNetworkSettings{}
|
||||
return containertypes.DefaultNetworkSettings{} //nolint:staticcheck // ignore SA1019: DefaultNetworkSettings is deprecated in v28.4.
|
||||
}
|
||||
|
||||
return containertypes.DefaultNetworkSettings{
|
||||
return containertypes.DefaultNetworkSettings{ //nolint:staticcheck // ignore SA1019: DefaultNetworkSettings is deprecated in v28.4.
|
||||
EndpointID: nw.EndpointSettings.EndpointID,
|
||||
Gateway: nw.EndpointSettings.Gateway,
|
||||
GlobalIPv6Address: nw.EndpointSettings.GlobalIPv6Address,
|
||||
|
||||
Reference in New Issue
Block a user