Vendoring libnetwork

To fix an issue with experimental multihost networking.
git hash: 00a92f066e628e4c6d50979c070df377575aad18

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
This commit is contained in:
Jana Radhakrishnan 2015-09-16 14:48:42 -07:00
parent 677a6eaf8f
commit a803148bba
5 changed files with 9 additions and 8 deletions

View File

@ -20,7 +20,7 @@ clone git github.com/tchap/go-patricia v2.1.0
clone git golang.org/x/net 3cffabab72adf04f8e3b01c5baf775361837b5fe https://github.com/golang/net.git clone git golang.org/x/net 3cffabab72adf04f8e3b01c5baf775361837b5fe https://github.com/golang/net.git
#get libnetwork packages #get libnetwork packages
clone git github.com/docker/libnetwork 927d2765909ddc3a5dd49b649ae9ef121c0fbef0 clone git github.com/docker/libnetwork 00a92f066e628e4c6d50979c070df377575aad18
clone git github.com/armon/go-metrics eb0af217e5e9747e41dd5303755356b62d28e3ec clone git github.com/armon/go-metrics eb0af217e5e9747e41dd5303755356b62d28e3ec
clone git github.com/hashicorp/go-msgpack 71c2886f5a673a35f909803f38ece5810165097b clone git github.com/hashicorp/go-msgpack 71c2886f5a673a35f909803f38ece5810165097b
clone git github.com/hashicorp/memberlist 9a1e242e454d2443df330bdd51a436d5a9058fc4 clone git github.com/hashicorp/memberlist 9a1e242e454d2443df330bdd51a436d5a9058fc4

View File

@ -31,7 +31,7 @@ build: ${build_image}.created
@echo "Done building code" @echo "Done building code"
build-local: build-local:
@$(shell which godep) go build -tags libnetwork_discovery ./... @$(shell which godep) go build ./...
@$(shell which godep) go build -o ./cmd/dnet/dnet ./cmd/dnet @$(shell which godep) go build -o ./cmd/dnet/dnet ./cmd/dnet
check: ${build_image}.created check: ${build_image}.created

View File

@ -120,7 +120,7 @@ func lookupSandboxID(cli *NetworkCli, containerID string) (string, error) {
return "", err return "", err
} }
var sandboxList []sandboxResource var sandboxList []SandboxResource
err = json.Unmarshal(obj, &sandboxList) err = json.Unmarshal(obj, &sandboxList)
if err != nil { if err != nil {
return "", err return "", err
@ -268,7 +268,7 @@ func getBackendID(cli *NetworkCli, servID string) (string, error) {
) )
if obj, _, err = readBody(cli.call("GET", "/services/"+servID+"/backend", nil, nil)); err == nil { if obj, _, err = readBody(cli.call("GET", "/services/"+servID+"/backend", nil, nil)); err == nil {
var sr sandboxResource var sr SandboxResource
if err := json.NewDecoder(bytes.NewReader(obj)).Decode(&sr); err == nil { if err := json.NewDecoder(bytes.NewReader(obj)).Decode(&sr); err == nil {
bk = sr.ContainerID bk = sr.ContainerID
} else { } else {

View File

@ -21,8 +21,8 @@ type serviceResource struct {
Network string `json:"network"` Network string `json:"network"`
} }
// sandboxResource is the body of "get service backend" response message // SandboxResource is the body of "get service backend" response message
type sandboxResource struct { type SandboxResource struct {
ID string `json:"id"` ID string `json:"id"`
Key string `json:"key"` Key string `json:"key"`
ContainerID string `json:"container_id"` ContainerID string `json:"container_id"`
@ -52,7 +52,8 @@ type serviceAttach struct {
SandboxID string `json:"sandbox_id"` SandboxID string `json:"sandbox_id"`
} }
type sandboxCreate struct { // SandboxCreate is the body of the "post /sandboxes" http request message
type SandboxCreate struct {
ContainerID string `json:"container_id"` ContainerID string `json:"container_id"`
HostName string `json:"host_name"` HostName string `json:"host_name"`
DomainName string `json:"domain_name"` DomainName string `json:"domain_name"`

View File

@ -87,7 +87,7 @@ func (ep *endpoint) UnmarshalJSON(b []byte) (err error) {
ep.id = epMap["id"].(string) ep.id = epMap["id"].(string)
ib, _ := json.Marshal(epMap["ep_iface"]) ib, _ := json.Marshal(epMap["ep_iface"])
json.Unmarshal(ib, ep.iface) json.Unmarshal(ib, &ep.iface)
tb, _ := json.Marshal(epMap["exposed_ports"]) tb, _ := json.Marshal(epMap["exposed_ports"])
var tPorts []types.TransportPort var tPorts []types.TransportPort