8000 api/t/ctr: deprecate NetworkSettingsBase · moby/moby@80bb864 · GitHub
[go: up one dir, main page]

Skip to content

Commit 80bb864

Browse files
committed
api/t/ctr: deprecate NetworkSettingsBase
Most fields in NetworkSettingsBase are deprecated, so deprecate the whole struct. The few fields which aren't deprecated will move to the NetworkSettings struct in v29. Signed-off-by: Albin Kerouanton <albinker@gmail.com>
1 parent 16dc391 commit 80bb864

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

api/types/container/network_settings.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ type NetworkSettings struct {
1212
}
1313

1414
// NetworkSettingsBase holds networking state for a container when inspecting it.
15+
//
16+
// Deprecated: Most fields in NetworkSettingsBase are deprecated. Fields which aren't deprecated will move to
17+
// NetworkSettings in v29.0, and this struct will be removed.
1518
type NetworkSettingsBase struct {
1619
Bridge string // Deprecated: This field is only set when the daemon is started with the --bridge flag specified.
1720
SandboxID string // SandboxID uniquely represents a container's network stack

daemon/inspect.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func (daemon *Daemon) ContainerInspect(ctx context.Context, name string, options
4949
}
5050

5151
networkSettings := &containertypes.NetworkSettings{
52-
NetworkSettingsBase: containertypes.NetworkSettingsBase{
52+
NetworkSettingsBase: containertypes.NetworkSettingsBase{ //nolint:staticcheck // ignore SA1019: NetworkSettingsBase is deprecated in v28.4.
5353
Bridge: ctr.NetworkSettings.Bridge,
5454
SandboxID: ctr.NetworkSettings.SandboxID,
5555
SandboxKey: ctr.NetworkSettings.SandboxKey,

vendor/github.com/moby/moby/api/types/container/network_settings.go

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
0