mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
api/t/container: drop NetworkSettingsBase
Except Bridge, all fields of NetworkSettingsBase were deprecated in v1.44, and are actually never set at all. The Bridge field was deprecated in v1.51 but it's only set when the container is connected to the default bridge, and when the daemon is started with the --bridge option set. So, remove all those fields and do not backfill them for older API versions. Signed-off-by: Albin Kerouanton <albinker@gmail.com>
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user