Merge pull request #1359 from vieux/update_network_types

update network types
This commit is contained in:
Alexandre Beslic 2015-10-30 14:51:15 -07:00
commit cb7ddd1fcb
2 changed files with 25 additions and 25 deletions

2
Godeps/Godeps.json generated
View File

@ -118,7 +118,7 @@
}, },
{ {
"ImportPath": "github.com/samalba/dockerclient", "ImportPath": "github.com/samalba/dockerclient",
"Rev": "c17bc9a62a1e2f966c05987313e187568e2ca894" "Rev": "9433689e5c6bec5ac2ffa8debf721e88abfb6285"
}, },
{ {
"ImportPath": "github.com/samuel/go-zookeeper/zk", "ImportPath": "github.com/samuel/go-zookeeper/zk",

View File

@ -474,56 +474,56 @@ type VolumeCreateRequest struct {
// IPAM represents IP Address Management // IPAM represents IP Address Management
type IPAM struct { type IPAM struct {
Driver string `json:"driver"` Driver string
Config []IPAMConfig `json:"config"` Config []IPAMConfig
} }
// IPAMConfig represents IPAM configurations // IPAMConfig represents IPAM configurations
type IPAMConfig struct { type IPAMConfig struct {
Subnet string `json:"subnet,omitempty"` Subnet string `json:",omitempty"`
IPRange string `json:"ip_range,omitempty"` IPRange string `json:",omitempty"`
Gateway string `json:"gateway,omitempty"` Gateway string `json:",omitempty"`
AuxAddress map[string]string `json:"auxiliary_address,omitempty"` AuxAddress map[string]string `json:"AuxiliaryAddresses,omitempty"`
} }
// NetworkResource is the body of the "get network" http response message // NetworkResource is the body of the "get network" http response message
type NetworkResource struct { type NetworkResource struct {
Name string `json:"name"` Name string
ID string `json:"id"` ID string `json:"Id"`
Scope string `json:"scope"` Scope string
Driver string `json:"driver"` Driver string
IPAM IPAM `json:"ipam"` IPAM IPAM
Containers map[string]EndpointResource `json:"containers"` Containers map[string]EndpointResource
} }
//EndpointResource contains network resources allocated and usd for a container in a network //EndpointResource contains network resources allocated and usd for a container in a network
type EndpointResource struct { type EndpointResource struct {
EndpointID string `json:"endpoint"` EndpointID string
MacAddress string `json:"mac_address"` MacAddress string
IPv4Address string `json:"ipv4_address"` IPv4Address string
IPv6Address string `json:"ipv6_address"` IPv6Address string
} }
// NetworkCreate is the expected body of the "create network" http request message // NetworkCreate is the expected body of the "create network" http request message
type NetworkCreate struct { type NetworkCreate struct {
Name string `json:"name"` Name string
CheckDuplicate bool `json:"check_duplicate"` CheckDuplicate bool
Driver string `json:"driver"` Driver string
IPAM IPAM `json:"ipam"` IPAM IPAM
} }
// NetworkCreateResponse is the response message sent by the server for network create call // NetworkCreateResponse is the response message sent by the server for network create call
type NetworkCreateResponse struct { type NetworkCreateResponse struct {
ID string `json:"id"` ID string `json:"Id"`
Warning string `json:"warning"` Warning string
} }
// NetworkConnect represents the data to be used to connect a container to the network // NetworkConnect represents the data to be used to connect a container to the network
type NetworkConnect struct { type NetworkConnect struct {
Container string `json:"container"` Container string
} }
// NetworkDisconnect represents the data to be used to disconnect a container from the network // NetworkDisconnect represents the data to be used to disconnect a container from the network
type NetworkDisconnect struct { type NetworkDisconnect struct {
Container string `json:"container"` Container string
} }