mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
api/types/network: EndpointSettings: make MacAddress "operational data"
The MacAddress field currently reflects _either_ the user-specified
(DesiredMacAddress) _or_ the actual / assigned MacAddress (when running).
Internal structs already have a separate DesiredMacAddres field, but
this field is not (yet) reflected in the API response. The intent is
to move towards better separation of config ("desired state") and
operational ("actual state") data.
Let's move the MacAddress field under "operational" data; the field's
description still describes its dual-personality, but potentially we
can move towards separate fields in future.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -8,14 +8,10 @@ import (
|
||||
|
||||
// EndpointSettings stores the network endpoint details
|
||||
type EndpointSettings struct {
|
||||
// Configurations
|
||||
// Configuration data
|
||||
IPAMConfig *EndpointIPAMConfig
|
||||
Links []string
|
||||
Aliases []string // Aliases holds the list of extra, user-specified DNS names for this endpoint.
|
||||
// MacAddress may be used to specify a MAC address when the container is created.
|
||||
// Once the container is running, it becomes operational data (it may contain a
|
||||
// generated address).
|
||||
MacAddress string
|
||||
DriverOpts map[string]string
|
||||
|
||||
// GwPriority determines which endpoint will provide the default gateway
|
||||
@@ -23,17 +19,24 @@ type EndpointSettings struct {
|
||||
// If multiple endpoints have the same priority, they are lexicographically
|
||||
// sorted based on their network name, and the one that sorts first is picked.
|
||||
GwPriority int
|
||||
|
||||
// Operational data
|
||||
NetworkID string
|
||||
EndpointID string
|
||||
Gateway netip.Addr
|
||||
IPAddress netip.Addr
|
||||
|
||||
NetworkID string
|
||||
EndpointID string
|
||||
Gateway netip.Addr
|
||||
IPAddress netip.Addr
|
||||
|
||||
// MacAddress may be used to specify a MAC address when the container is created.
|
||||
// Once the container is running, it becomes operational data (it may contain a
|
||||
// generated address).
|
||||
MacAddress string
|
||||
IPPrefixLen int
|
||||
IPv6Gateway netip.Addr
|
||||
GlobalIPv6Address netip.Addr
|
||||
GlobalIPv6PrefixLen int
|
||||
// DNSNames holds all the (non fully qualified) DNS names associated to this endpoint. First entry is used to
|
||||
// generate PTR records.
|
||||
// DNSNames holds all the (non fully qualified) DNS names associated to this
|
||||
// endpoint. The first entry is used to generate PTR records.
|
||||
DNSNames []string
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user