diff --git a/api/swagger.yaml b/api/swagger.yaml index 4a0c874ced..1c23971209 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -1586,58 +1586,16 @@ definitions: description: "NetworkSettings exposes the network settings in the API" type: "object" properties: - Bridge: - description: | - Name of the default bridge interface when dockerd's --bridge flag is set. - - Deprecated: This field is only set when the daemon is started with the --bridge flag specified. - type: "string" - example: "docker0" SandboxID: description: SandboxID uniquely represents a container's network stack. type: "string" example: "9d12daf2c33f5959c8bf90aa513e4f65b561738661003029ec84830cd503a0c3" - HairpinMode: - description: | - Indicates if hairpin NAT should be enabled on the virtual interface. - - Deprecated: This field is never set and will be removed in a future release. - type: "boolean" - example: false - LinkLocalIPv6Address: - description: | - IPv6 unicast address using the link-local prefix. - - Deprecated: This field is never set and will be removed in a future release. - type: "string" - example: "" - LinkLocalIPv6PrefixLen: - description: | - Prefix length of the IPv6 unicast address. - - Deprecated: This field is never set and will be removed in a future release. - type: "integer" - example: "" - Ports: - $ref: "#/definitions/PortMap" SandboxKey: description: SandboxKey is the full path of the netns handle type: "string" example: "/var/run/docker/netns/8ab54b426c38" - - SecondaryIPAddresses: - description: "Deprecated: This field is never set and will be removed in a future release." - type: "array" - items: - $ref: "#/definitions/Address" - x-nullable: true - - SecondaryIPv6Addresses: - description: "Deprecated: This field is never set and will be removed in a future release." - type: "array" - items: - $ref: "#/definitions/Address" - x-nullable: true + Ports: + $ref: "#/definitions/PortMap" Networks: description: | Information about all networks that the container is connected to. diff --git a/api/types/container/network_settings.go b/api/types/container/network_settings.go index a386081bdf..fb7f59df08 100644 --- a/api/types/container/network_settings.go +++ b/api/types/container/network_settings.go @@ -6,34 +6,10 @@ import ( // NetworkSettings exposes the network settings in the api type NetworkSettings struct { - NetworkSettingsBase - Networks map[string]*network.EndpointSettings -} - -// NetworkSettingsBase holds networking state for a container when inspecting it. -// -// Deprecated: Most fields in NetworkSettingsBase are deprecated. Fields which aren't deprecated will move to -// NetworkSettings in v29.0, and this struct will be removed. -type NetworkSettingsBase struct { - Bridge string // Deprecated: This field is only set when the daemon is started with the --bridge flag specified. SandboxID string // SandboxID uniquely represents a container's network stack SandboxKey string // SandboxKey identifies the sandbox Ports PortMap // Ports is a collection of PortBinding indexed by Port - - // HairpinMode specifies if hairpin NAT should be enabled on the virtual interface - // - // Deprecated: This field is never set and will be removed in a future release. - HairpinMode bool - // LinkLocalIPv6Address is an IPv6 unicast address using the link-local prefix - // - // Deprecated: This field is never set and will be removed in a future release. - LinkLocalIPv6Address string - // LinkLocalIPv6PrefixLen is the prefix length of an IPv6 unicast address - // - // Deprecated: This field is never set and will be removed in a future release. - LinkLocalIPv6PrefixLen int - SecondaryIPAddresses []network.Address // Deprecated: This field is never set and will be removed in a future release. - SecondaryIPv6Addresses []network.Address // Deprecated: This field is never set and will be removed in a future release. + Networks map[string]*network.EndpointSettings } // NetworkSettingsSummary provides a summary of container's networks diff --git a/api/types/network/network_types.go b/api/types/network/network_types.go index 69a6099894..c82cabc77f 100644 --- a/api/types/network/network_types.go +++ b/api/types/network/network_types.go @@ -34,12 +34,6 @@ type CreateRequest struct { CheckDuplicate *bool `json:",omitempty"` } -// Address represents an IP address -type Address struct { - Addr string - PrefixLen int -} - // ServiceInfo represents service parameters with the list of service's tasks type ServiceInfo struct { VIP string