Browse Source

Merge pull request #16358 from mrjana/mh

Vendoring libnetwork
David Calavera 9 years ago
parent
commit
9ab8c2d92e

+ 1 - 1
hack/vendor.sh

@@ -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
 
 #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/hashicorp/go-msgpack 71c2886f5a673a35f909803f38ece5810165097b
 clone git github.com/hashicorp/memberlist 9a1e242e454d2443df330bdd51a436d5a9058fc4

+ 1 - 1
vendor/src/github.com/docker/libnetwork/Makefile

@@ -31,7 +31,7 @@ build: ${build_image}.created
 	@echo "Done building code"
 
 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
 
 check: ${build_image}.created

+ 2 - 2
vendor/src/github.com/docker/libnetwork/client/service.go

@@ -120,7 +120,7 @@ func lookupSandboxID(cli *NetworkCli, containerID string) (string, error) {
 		return "", err
 	}
 
-	var sandboxList []sandboxResource
+	var sandboxList []SandboxResource
 	err = json.Unmarshal(obj, &sandboxList)
 	if err != nil {
 		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 {
-		var sr sandboxResource
+		var sr SandboxResource
 		if err := json.NewDecoder(bytes.NewReader(obj)).Decode(&sr); err == nil {
 			bk = sr.ContainerID
 		} else {

+ 4 - 3
vendor/src/github.com/docker/libnetwork/client/types.go

@@ -21,8 +21,8 @@ type serviceResource struct {
 	Network string `json:"network"`
 }
 
-// sandboxResource is the body of "get service backend" response message
-type sandboxResource struct {
+// SandboxResource is the body of "get service backend" response message
+type SandboxResource struct {
 	ID          string `json:"id"`
 	Key         string `json:"key"`
 	ContainerID string `json:"container_id"`
@@ -52,7 +52,8 @@ type serviceAttach struct {
 	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"`
 	HostName          string      `json:"host_name"`
 	DomainName        string      `json:"domain_name"`

+ 1 - 1
vendor/src/github.com/docker/libnetwork/endpoint.go

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