diff --git a/api/types/network/ipam.go b/api/types/network/ipam.go new file mode 100644 index 0000000000..3526cebcbb --- /dev/null +++ b/api/types/network/ipam.go @@ -0,0 +1,16 @@ +package network + +// IPAM represents IP Address Management +type IPAM struct { + Driver string + Options map[string]string // Per network IPAM driver options + Config []IPAMConfig +} + +// IPAMConfig represents IPAM configurations +type IPAMConfig struct { + Subnet string `json:",omitempty"` + IPRange string `json:",omitempty"` + Gateway string `json:",omitempty"` + AuxAddress map[string]string `json:"AuxiliaryAddresses,omitempty"` +} diff --git a/api/types/network/network.go b/api/types/network/network.go index 437b184c67..6c5ef9ca40 100644 --- a/api/types/network/network.go +++ b/api/types/network/network.go @@ -9,21 +9,6 @@ type Address struct { PrefixLen int } -// IPAM represents IP Address Management -type IPAM struct { - Driver string - Options map[string]string // Per network IPAM driver options - Config []IPAMConfig -} - -// IPAMConfig represents IPAM configurations -type IPAMConfig struct { - Subnet string `json:",omitempty"` - IPRange string `json:",omitempty"` - Gateway string `json:",omitempty"` - AuxAddress map[string]string `json:"AuxiliaryAddresses,omitempty"` -} - // EndpointIPAMConfig represents IPAM configurations for the endpoint type EndpointIPAMConfig struct { IPv4Address string `json:",omitempty"`