mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
IPAM API & UX
introduced --subnet, --ip-range and --gateway options in docker network command. Also, user can allocate driver specific ip-address if any using the --aux-address option. Supports multiple subnets per network and also sharing ip range across networks if the network-driver and ipam-driver supports it. Example, Bridge driver doesnt support sharing same ip range across networks. Signed-off-by: Madhu Venugopal <madhu@docker.com>
This commit is contained in:
parent
0f351ce364
commit
cc6aece1fd
9 changed files with 596 additions and 146 deletions
|
|
@ -8,6 +8,20 @@ type Address struct {
|
|||
PrefixLen int
|
||||
}
|
||||
|
||||
// IPAM represents IP Address Management
|
||||
type IPAM struct {
|
||||
Driver string `json:"driver"`
|
||||
Config []IPAMConfig `json:"config"`
|
||||
}
|
||||
|
||||
// IPAMConfig represents IPAM configurations
|
||||
type IPAMConfig struct {
|
||||
Subnet string `json:"subnet,omitempty"`
|
||||
IPRange string `json:"ip_range,omitempty"`
|
||||
Gateway string `json:"gateway,omitempty"`
|
||||
AuxAddress map[string]string `json:"auxiliary_address,omitempty"`
|
||||
}
|
||||
|
||||
// Settings stores configuration details about the daemon network config
|
||||
// TODO Windows. Many of these fields can be factored out.,
|
||||
type Settings struct {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue