зеркало из https://github.com/docker/engine-api.git
Fix network inspect for default networks.
- Keep old fields in NetworkSetting to respect the deprecation policy. Signed-off-by: David Calavera <david.calavera@gmail.com>
This commit is contained in:
Родитель
6b069255fb
Коммит
77b18ba090
|
@ -286,6 +286,7 @@ type ContainerJSON struct {
|
|||
// NetworkSettings exposes the network settings in the api
|
||||
type NetworkSettings struct {
|
||||
NetworkSettingsBase
|
||||
DefaultNetworkSettings
|
||||
Networks map[string]*network.EndpointSettings
|
||||
}
|
||||
|
||||
|
@ -302,6 +303,20 @@ type NetworkSettingsBase struct {
|
|||
SecondaryIPv6Addresses []network.Address
|
||||
}
|
||||
|
||||
// DefaultNetworkSettings holds network information
|
||||
// during the 2 release deprecation period.
|
||||
// It will be removed in Docker 1.11.
|
||||
type DefaultNetworkSettings struct {
|
||||
EndpointID string
|
||||
Gateway string
|
||||
GlobalIPv6Address string
|
||||
GlobalIPv6PrefixLen int
|
||||
IPAddress string
|
||||
IPPrefixLen int
|
||||
IPv6Gateway string
|
||||
MacAddress string
|
||||
}
|
||||
|
||||
// MountPoint represents a mount point configuration inside the container.
|
||||
type MountPoint struct {
|
||||
Name string `json:",omitempty"`
|
||||
|
|
|
@ -36,12 +36,5 @@ type StatsJSON struct {
|
|||
// NetworkSettings is a backward compatible struct for APIs prior to 1.21
|
||||
type NetworkSettings struct {
|
||||
types.NetworkSettingsBase
|
||||
EndpointID string
|
||||
Gateway string
|
||||
GlobalIPv6Address string
|
||||
GlobalIPv6PrefixLen int
|
||||
IPAddress string
|
||||
IPPrefixLen int
|
||||
IPv6Gateway string
|
||||
MacAddress string
|
||||
types.DefaultNetworkSettings
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче