Browse code

Update imports for logrus version

Add forks for changes which only make logrus change without functional
change.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>

Derek McGowan authored on 2017/07/27 07:03:47
Showing 167 changed files
... ...
@@ -1,14 +1,14 @@
1 1
 # the following lines are in sorted order, FYI
2
-github.com/Azure/go-ansiterm 388960b655244e76e24c75f48631564eaefade62
3
-github.com/Microsoft/hcsshim v0.5.25
2
+github.com/Azure/go-ansiterm 19f72df4d05d31cbe1c56bfc8045c96babff6c7e
3
+github.com/Microsoft/hcsshim v0.6.1
4 4
 github.com/Microsoft/go-winio v0.4.2
5
-github.com/moby/buildkit fed5c1d9cee6f734f58f3addca6e8d1750df48a6
5
+github.com/moby/buildkit da2b9dc7dab99e824b2b1067ad7d0523e32dd2d9 https://github.com/dmcgowan/buildkit.git
6 6
 github.com/davecgh/go-spew 346938d642f2ec3594ed81d874461961cd0faa76
7 7
 github.com/docker/libtrust 9cbd2a1374f46905c68a4eb3694a130610adc62a
8 8
 github.com/go-check/check 4ed411733c5785b40214c70bce814c3a3a689609 https://github.com/cpuguy83/check.git
9 9
 github.com/gorilla/context v1.1
10 10
 github.com/gorilla/mux v1.1
11
-github.com/jhowardmsft/opengcs v0.0.9
11
+github.com/jhowardmsft/opengcs b9d0120d36f26e981a50bf18bac1bb3f0c2b8fef https://github.com/dmcgowan/opengcs.git
12 12
 github.com/kr/pty 5cf931ef8f
13 13
 github.com/mattn/go-shellwords v1.0.3
14 14
 github.com/sirupsen/logrus v1.0.1
... ...
@@ -27,8 +27,8 @@ github.com/imdario/mergo 0.2.1
27 27
 golang.org/x/sync de49d9dcd27d4f764488181bea099dfe6179bcf0
28 28
 
29 29
 #get libnetwork packages
30
-github.com/docker/libnetwork e23c06b2917c82f6eed18c368f515060af78a09f
31
-github.com/docker/go-events 18b43f1bc85d9cdd42c05a6cd2d444c7a200a894
30
+github.com/docker/libnetwork 248fd5ea6a67f8810da322e6e7441e8de96a9045 https://github.com/dmcgowan/libnetwork.git
31
+github.com/docker/go-events 9461782956ad83b30282bf90e31fa6a70c255ba9
32 32
 github.com/armon/go-radix e39d623f12e8e41c7b5529e9a9dd67a1e2261f80
33 33
 github.com/armon/go-metrics eb0af217e5e9747e41dd5303755356b62d28e3ec
34 34
 github.com/hashicorp/go-msgpack 71c2886f5a673a35f909803f38ece5810165097b
... ...
@@ -51,7 +51,7 @@ github.com/boltdb/bolt fff57c100f4dea1905678da7e90d92429dff2904
51 51
 github.com/miekg/dns 75e6e86cc601825c5dbcd4e0c209eab180997cd7
52 52
 
53 53
 # get graph and distribution packages
54
-github.com/docker/distribution b38e5838b7b2f2ad48e06ec4b500011976080621
54
+github.com/docker/distribution edc3ab29cdff8694dd6feb85cfeb4b5f1b38ed9c
55 55
 github.com/vbatts/tar-split v0.10.1
56 56
 github.com/opencontainers/go-digest a6d0ee40d4207ea02364bd3b9e8e77b9159ba1eb
57 57
 
... ...
@@ -62,7 +62,7 @@ github.com/pborman/uuid v1.0
62 62
 google.golang.org/grpc v1.3.0
63 63
 
64 64
 # When updating, also update RUNC_COMMIT in hack/dockerfile/binaries-commits accordingly
65
-github.com/opencontainers/runc 2d41c047c83e09a6d61d464906feb2a2f3c52aa4 https://github.com/docker/runc
65
+github.com/opencontainers/runc e9325d442f5979c4f79bfa9e09bdf7abb74ba03b https://github.com/dmcgowan/runc.git
66 66
 github.com/opencontainers/image-spec 372ad780f63454fbbbbcc7cf80e5b90245c13e13
67 67
 github.com/opencontainers/runtime-spec d42f1eb741e6361e858d83fc75aa6893b66292c4 # specs
68 68
 
... ...
@@ -101,13 +101,13 @@ github.com/googleapis/gax-go da06d194a00e19ce00d9011a13931c3f6f6887c7
101 101
 google.golang.org/genproto d80a6e20e776b0b17a324d0ba1ab50a39c8e8944
102 102
 
103 103
 # containerd
104
-github.com/containerd/containerd 3addd840653146c90a254301d6c3a663c7fd6429
104
+github.com/containerd/containerd fc10004571bb9b26695ccbf2dd4a83213f60b93e https://github.com/dmcgowan/containerd.git
105 105
 github.com/tonistiigi/fifo 1405643975692217d6720f8b54aeee1bf2cd5cf4
106 106
 github.com/stevvooe/continuity cd7a8e21e2b6f84799f5dd4b65faf49c8d3ee02d
107 107
 github.com/tonistiigi/fsutil 0ac4c11b053b9c5c7c47558f81f96c7100ce50fb
108 108
 
109 109
 # cluster
110
-github.com/docker/swarmkit 3e2dd3c0a76149b1620b42d28dd6ff48270404e5
110
+github.com/docker/swarmkit 8bdecc57887ffc598b63d6433f58e0d2852112c3 https://github.com/dmcgowan/swarmkit.git
111 111
 github.com/gogo/protobuf v0.4
112 112
 github.com/cloudflare/cfssl 7fb22c8cba7ecaf98e4082d22d65800cf45e042a
113 113
 github.com/google/certificate-transparency d90e65c3a07988180c5b1ece71791c0b6506826e
... ...
@@ -7,3 +7,6 @@ For example the parser might receive "ESC, [, A" as a stream of three characters
7 7
 The parser (parser.go) is a partial implementation of this state machine (http://vt100.net/emu/vt500_parser.png).  There are also two event handler implementations, one for tests (test_event_handler.go) to validate that the expected events are being produced and called, the other is a Windows implementation (winterm/win_event_handler.go).
8 8
 
9 9
 See parser_test.go for examples exercising the state machine and generating appropriate function calls.
10
+
11
+-----
12
+This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
... ...
@@ -5,7 +5,7 @@ import (
5 5
 	"io/ioutil"
6 6
 	"os"
7 7
 
8
-	"github.com/Sirupsen/logrus"
8
+	"github.com/sirupsen/logrus"
9 9
 )
10 10
 
11 11
 var logger *logrus.Logger
... ...
@@ -9,7 +9,7 @@ import (
9 9
 	"strconv"
10 10
 
11 11
 	"github.com/Azure/go-ansiterm"
12
-	"github.com/Sirupsen/logrus"
12
+	"github.com/sirupsen/logrus"
13 13
 )
14 14
 
15 15
 var logger *logrus.Logger
... ...
@@ -1,6 +1,6 @@
1 1
 package hcsshim
2 2
 
3
-import "github.com/Sirupsen/logrus"
3
+import "github.com/sirupsen/logrus"
4 4
 
5 5
 // ActivateLayer will find the layer with the given id and mount it's filesystem.
6 6
 // For a read/write layer, the mounted filesystem will appear as a volume on the
... ...
@@ -8,7 +8,7 @@ import (
8 8
 	"syscall"
9 9
 	"time"
10 10
 
11
-	"github.com/Sirupsen/logrus"
11
+	"github.com/sirupsen/logrus"
12 12
 )
13 13
 
14 14
 var (
... ...
@@ -16,9 +16,10 @@ var (
16 16
 )
17 17
 
18 18
 const (
19
-	pendingUpdatesQuery = `{ "PropertyTypes" : ["PendingUpdates"]}`
20
-	statisticsQuery     = `{ "PropertyTypes" : ["Statistics"]}`
21
-	processListQuery    = `{ "PropertyTypes" : ["ProcessList"]}`
19
+	pendingUpdatesQuery    = `{ "PropertyTypes" : ["PendingUpdates"]}`
20
+	statisticsQuery        = `{ "PropertyTypes" : ["Statistics"]}`
21
+	processListQuery       = `{ "PropertyTypes" : ["ProcessList"]}`
22
+	mappedVirtualDiskQuery = `{ "PropertyTypes" : ["MappedVirtualDisk"]}`
22 23
 )
23 24
 
24 25
 type container struct {
... ...
@@ -30,20 +31,21 @@ type container struct {
30 30
 
31 31
 // ContainerProperties holds the properties for a container and the processes running in that container
32 32
 type ContainerProperties struct {
33
-	ID                string `json:"Id"`
34
-	Name              string
35
-	SystemType        string
36
-	Owner             string
37
-	SiloGUID          string            `json:"SiloGuid,omitempty"`
38
-	RuntimeID         string            `json:"RuntimeId,omitempty"`
39
-	IsRuntimeTemplate bool              `json:",omitempty"`
40
-	RuntimeImagePath  string            `json:",omitempty"`
41
-	Stopped           bool              `json:",omitempty"`
42
-	ExitType          string            `json:",omitempty"`
43
-	AreUpdatesPending bool              `json:",omitempty"`
44
-	ObRoot            string            `json:",omitempty"`
45
-	Statistics        Statistics        `json:",omitempty"`
46
-	ProcessList       []ProcessListItem `json:",omitempty"`
33
+	ID                           string `json:"Id"`
34
+	Name                         string
35
+	SystemType                   string
36
+	Owner                        string
37
+	SiloGUID                     string                              `json:"SiloGuid,omitempty"`
38
+	RuntimeID                    string                              `json:"RuntimeId,omitempty"`
39
+	IsRuntimeTemplate            bool                                `json:",omitempty"`
40
+	RuntimeImagePath             string                              `json:",omitempty"`
41
+	Stopped                      bool                                `json:",omitempty"`
42
+	ExitType                     string                              `json:",omitempty"`
43
+	AreUpdatesPending            bool                                `json:",omitempty"`
44
+	ObRoot                       string                              `json:",omitempty"`
45
+	Statistics                   Statistics                          `json:",omitempty"`
46
+	ProcessList                  []ProcessListItem                   `json:",omitempty"`
47
+	MappedVirtualDiskControllers map[int]MappedVirtualDiskController `json:",omitempty"`
47 48
 }
48 49
 
49 50
 // MemoryStats holds the memory statistics for a container
... ...
@@ -103,6 +105,11 @@ type ProcessListItem struct {
103 103
 	UserTime100ns                uint64    `json:",omitempty"`
104 104
 }
105 105
 
106
+// MappedVirtualDiskController is the structure of an item returned by a MappedVirtualDiskList call on a container
107
+type MappedVirtualDiskController struct {
108
+	MappedVirtualDisks map[int]MappedVirtualDisk `json:",omitempty"`
109
+}
110
+
106 111
 // Type of Request Support in ModifySystem
107 112
 type RequestType string
108 113
 
... ...
@@ -487,6 +494,55 @@ func (container *container) ProcessList() ([]ProcessListItem, error) {
487 487
 	return properties.ProcessList, nil
488 488
 }
489 489
 
490
+// MappedVirtualDisks returns a map of the controllers and the disks mapped
491
+// to a container.
492
+//
493
+// Example of JSON returned by the query.
494
+//{
495
+//   "Id":"1126e8d7d279c707a666972a15976371d365eaf622c02cea2c442b84f6f550a3_svm",
496
+//   "SystemType":"Container",
497
+//   "RuntimeOsType":"Linux",
498
+//   "RuntimeId":"00000000-0000-0000-0000-000000000000",
499
+//   "State":"Running",
500
+//   "MappedVirtualDiskControllers":{
501
+//      "0":{
502
+//         "MappedVirtualDisks":{
503
+//            "2":{
504
+//               "HostPath":"C:\\lcow\\lcow\\scratch\\1126e8d7d279c707a666972a15976371d365eaf622c02cea2c442b84f6f550a3.vhdx",
505
+//               "ContainerPath":"/mnt/gcs/LinuxServiceVM/scratch",
506
+//               "Lun":2,
507
+//               "CreateInUtilityVM":true
508
+//            },
509
+//            "3":{
510
+//               "HostPath":"C:\\lcow\\lcow\\1126e8d7d279c707a666972a15976371d365eaf622c02cea2c442b84f6f550a3\\sandbox.vhdx",
511
+//               "Lun":3,
512
+//               "CreateInUtilityVM":true,
513
+//               "AttachOnly":true
514
+//            }
515
+//         }
516
+//      }
517
+//   }
518
+//}
519
+func (container *container) MappedVirtualDisks() (map[int]MappedVirtualDiskController, error) {
520
+	container.handleLock.RLock()
521
+	defer container.handleLock.RUnlock()
522
+	operation := "MappedVirtualDiskList"
523
+	title := "HCSShim::Container::" + operation
524
+	logrus.Debugf(title+" id=%s", container.id)
525
+
526
+	if container.handle == 0 {
527
+		return nil, makeContainerError(container, operation, "", ErrAlreadyClosed)
528
+	}
529
+
530
+	properties, err := container.properties(mappedVirtualDiskQuery)
531
+	if err != nil {
532
+		return nil, makeContainerError(container, operation, "", err)
533
+	}
534
+
535
+	logrus.Debugf(title+" succeeded id=%s", container.id)
536
+	return properties.MappedVirtualDiskControllers, nil
537
+}
538
+
490 539
 // Pause pauses the execution of the container. This feature is not enabled in TP5.
491 540
 func (container *container) Pause() error {
492 541
 	container.handleLock.RLock()
... ...
@@ -1,6 +1,6 @@
1 1
 package hcsshim
2 2
 
3
-import "github.com/Sirupsen/logrus"
3
+import "github.com/sirupsen/logrus"
4 4
 
5 5
 // CreateLayer creates a new, empty, read-only layer on the filesystem based on
6 6
 // the parent layer provided.
... ...
@@ -1,6 +1,6 @@
1 1
 package hcsshim
2 2
 
3
-import "github.com/Sirupsen/logrus"
3
+import "github.com/sirupsen/logrus"
4 4
 
5 5
 // CreateSandboxLayer creates and populates new read-write layer for use by a container.
6 6
 // This requires both the id of the direct parent layer, as well as the full list
... ...
@@ -1,6 +1,6 @@
1 1
 package hcsshim
2 2
 
3
-import "github.com/Sirupsen/logrus"
3
+import "github.com/sirupsen/logrus"
4 4
 
5 5
 // DeactivateLayer will dismount a layer that was mounted via ActivateLayer.
6 6
 func DeactivateLayer(info DriverInfo, id string) error {
... ...
@@ -1,6 +1,6 @@
1 1
 package hcsshim
2 2
 
3
-import "github.com/Sirupsen/logrus"
3
+import "github.com/sirupsen/logrus"
4 4
 
5 5
 // DestroyLayer will remove the on-disk files representing the layer with the given
6 6
 // id, including that layer's containing folder, if any.
... ...
@@ -1,6 +1,6 @@
1 1
 package hcsshim
2 2
 
3
-import "github.com/Sirupsen/logrus"
3
+import "github.com/sirupsen/logrus"
4 4
 
5 5
 // ExpandSandboxSize expands the size of a layer to at least size bytes.
6 6
 func ExpandSandboxSize(info DriverInfo, layerId string, size uint64) error {
... ...
@@ -7,7 +7,7 @@ import (
7 7
 	"syscall"
8 8
 
9 9
 	"github.com/Microsoft/go-winio"
10
-	"github.com/Sirupsen/logrus"
10
+	"github.com/sirupsen/logrus"
11 11
 )
12 12
 
13 13
 // ExportLayer will create a folder at exportFolderPath and fill that folder with
... ...
@@ -3,7 +3,7 @@ package hcsshim
3 3
 import (
4 4
 	"syscall"
5 5
 
6
-	"github.com/Sirupsen/logrus"
6
+	"github.com/sirupsen/logrus"
7 7
 )
8 8
 
9 9
 // GetLayerMountPath will look for a mounted layer with the given id and return
... ...
@@ -1,6 +1,6 @@
1 1
 package hcsshim
2 2
 
3
-import "github.com/Sirupsen/logrus"
3
+import "github.com/sirupsen/logrus"
4 4
 
5 5
 // GetSharedBaseImages will enumerate the images stored in the common central
6 6
 // image store and return descriptive info about those images for the purpose
... ...
@@ -8,7 +8,7 @@ import (
8 8
 	"syscall"
9 9
 	"unsafe"
10 10
 
11
-	"github.com/Sirupsen/logrus"
11
+	"github.com/sirupsen/logrus"
12 12
 )
13 13
 
14 14
 //go:generate go run mksyscall_windows.go -output zhcsshim.go hcsshim.go
15 15
new file mode 100644
... ...
@@ -0,0 +1,183 @@
0
+package hcsshim
1
+
2
+import (
3
+	"encoding/json"
4
+	"fmt"
5
+	"net"
6
+
7
+	"github.com/sirupsen/logrus"
8
+)
9
+
10
+// HNSEndpoint represents a network endpoint in HNS
11
+type HNSEndpoint struct {
12
+	Id                 string            `json:"ID,omitempty"`
13
+	Name               string            `json:",omitempty"`
14
+	VirtualNetwork     string            `json:",omitempty"`
15
+	VirtualNetworkName string            `json:",omitempty"`
16
+	Policies           []json.RawMessage `json:",omitempty"`
17
+	MacAddress         string            `json:",omitempty"`
18
+	IPAddress          net.IP            `json:",omitempty"`
19
+	DNSSuffix          string            `json:",omitempty"`
20
+	DNSServerList      string            `json:",omitempty"`
21
+	GatewayAddress     string            `json:",omitempty"`
22
+	EnableInternalDNS  bool              `json:",omitempty"`
23
+	DisableICC         bool              `json:",omitempty"`
24
+	PrefixLength       uint8             `json:",omitempty"`
25
+	IsRemoteEndpoint   bool              `json:",omitempty"`
26
+}
27
+
28
+// HNSEndpointRequest makes a HNS call to modify/query a network endpoint
29
+func HNSEndpointRequest(method, path, request string) (*HNSEndpoint, error) {
30
+	endpoint := &HNSEndpoint{}
31
+	err := hnsCall(method, "/endpoints/"+path, request, &endpoint)
32
+	if err != nil {
33
+		return nil, err
34
+	}
35
+
36
+	return endpoint, nil
37
+}
38
+
39
+// HNSListEndpointRequest makes a HNS call to query the list of available endpoints
40
+func HNSListEndpointRequest() ([]HNSEndpoint, error) {
41
+	var endpoint []HNSEndpoint
42
+	err := hnsCall("GET", "/endpoints/", "", &endpoint)
43
+	if err != nil {
44
+		return nil, err
45
+	}
46
+
47
+	return endpoint, nil
48
+}
49
+
50
+// HotAttachEndpoint makes a HCS Call to attach the endpoint to the container
51
+func HotAttachEndpoint(containerID string, endpointID string) error {
52
+	return modifyNetworkEndpoint(containerID, endpointID, Add)
53
+}
54
+
55
+// HotDetachEndpoint makes a HCS Call to detach the endpoint from the container
56
+func HotDetachEndpoint(containerID string, endpointID string) error {
57
+	return modifyNetworkEndpoint(containerID, endpointID, Remove)
58
+}
59
+
60
+// ModifyContainer corresponding to the container id, by sending a request
61
+func modifyContainer(id string, request *ResourceModificationRequestResponse) error {
62
+	container, err := OpenContainer(id)
63
+	if err != nil {
64
+		if IsNotExist(err) {
65
+			return ErrComputeSystemDoesNotExist
66
+		}
67
+		return getInnerError(err)
68
+	}
69
+	defer container.Close()
70
+	err = container.Modify(request)
71
+	if err != nil {
72
+		if IsNotSupported(err) {
73
+			return ErrPlatformNotSupported
74
+		}
75
+		return getInnerError(err)
76
+	}
77
+
78
+	return nil
79
+}
80
+
81
+func modifyNetworkEndpoint(containerID string, endpointID string, request RequestType) error {
82
+	requestMessage := &ResourceModificationRequestResponse{
83
+		Resource: Network,
84
+		Request:  request,
85
+		Data:     endpointID,
86
+	}
87
+	err := modifyContainer(containerID, requestMessage)
88
+
89
+	if err != nil {
90
+		return err
91
+	}
92
+
93
+	return nil
94
+}
95
+
96
+// GetHNSEndpointByID
97
+func GetHNSEndpointByID(endpointID string) (*HNSEndpoint, error) {
98
+	return HNSEndpointRequest("GET", endpointID, "")
99
+}
100
+
101
+// GetHNSNetworkName filtered by Name
102
+func GetHNSEndpointByName(endpointName string) (*HNSEndpoint, error) {
103
+	hnsResponse, err := HNSListEndpointRequest()
104
+	if err != nil {
105
+		return nil, err
106
+	}
107
+	for _, hnsEndpoint := range hnsResponse {
108
+		if hnsEndpoint.Name == endpointName {
109
+			return &hnsEndpoint, nil
110
+		}
111
+	}
112
+	return nil, fmt.Errorf("Endpoint %v not found", endpointName)
113
+}
114
+
115
+// Create Endpoint by sending EndpointRequest to HNS. TODO: Create a separate HNS interface to place all these methods
116
+func (endpoint *HNSEndpoint) Create() (*HNSEndpoint, error) {
117
+	operation := "Create"
118
+	title := "HCSShim::HNSEndpoint::" + operation
119
+	logrus.Debugf(title+" id=%s", endpoint.Id)
120
+
121
+	jsonString, err := json.Marshal(endpoint)
122
+	if err != nil {
123
+		return nil, err
124
+	}
125
+	return HNSEndpointRequest("POST", "", string(jsonString))
126
+}
127
+
128
+// Delete Endpoint by sending EndpointRequest to HNS
129
+func (endpoint *HNSEndpoint) Delete() (*HNSEndpoint, error) {
130
+	operation := "Delete"
131
+	title := "HCSShim::HNSEndpoint::" + operation
132
+	logrus.Debugf(title+" id=%s", endpoint.Id)
133
+
134
+	return HNSEndpointRequest("DELETE", endpoint.Id, "")
135
+}
136
+
137
+// Delete Endpoint by sending EndpointRequest to HNS
138
+func (endpoint *HNSEndpoint) Update() (*HNSEndpoint, error) {
139
+	operation := "Update"
140
+	title := "HCSShim::HNSEndpoint::" + operation
141
+	logrus.Debugf(title+" id=%s", endpoint.Id)
142
+	jsonString, err := json.Marshal(endpoint)
143
+	if err != nil {
144
+		return nil, err
145
+	}
146
+	err = hnsCall("POST", "/endpoints/"+endpoint.Id+"/update", string(jsonString), &endpoint)
147
+
148
+	return endpoint, err
149
+}
150
+
151
+// Hot Attach an endpoint to a container
152
+func (endpoint *HNSEndpoint) HotAttach(containerID string) error {
153
+	operation := "HotAttach"
154
+	title := "HCSShim::HNSEndpoint::" + operation
155
+	logrus.Debugf(title+" id=%s, containerId=%s", endpoint.Id, containerID)
156
+
157
+	return modifyNetworkEndpoint(containerID, endpoint.Id, Add)
158
+}
159
+
160
+// Hot Detach an endpoint from a container
161
+func (endpoint *HNSEndpoint) HotDetach(containerID string) error {
162
+	operation := "HotDetach"
163
+	title := "HCSShim::HNSEndpoint::" + operation
164
+	logrus.Debugf(title+" id=%s, containerId=%s", endpoint.Id, containerID)
165
+
166
+	return modifyNetworkEndpoint(containerID, endpoint.Id, Remove)
167
+}
168
+
169
+// Apply Acl Policy on the Endpoint
170
+func (endpoint *HNSEndpoint) ApplyACLPolicy(policy *ACLPolicy) error {
171
+	operation := "ApplyACLPolicy"
172
+	title := "HCSShim::HNSEndpoint::" + operation
173
+	logrus.Debugf(title+" id=%s", endpoint.Id)
174
+
175
+	jsonString, err := json.Marshal(policy)
176
+	if err != nil {
177
+		return err
178
+	}
179
+	endpoint.Policies[0] = jsonString
180
+	_, err = endpoint.Update()
181
+	return err
182
+}
... ...
@@ -3,99 +3,10 @@ package hcsshim
3 3
 import (
4 4
 	"encoding/json"
5 5
 	"fmt"
6
-	"net"
7 6
 
8
-	"github.com/Sirupsen/logrus"
7
+	"github.com/sirupsen/logrus"
9 8
 )
10 9
 
11
-type NatPolicy struct {
12
-	Type         string
13
-	Protocol     string
14
-	InternalPort uint16
15
-	ExternalPort uint16
16
-}
17
-
18
-type QosPolicy struct {
19
-	Type                            string
20
-	MaximumOutgoingBandwidthInBytes uint64
21
-}
22
-
23
-type VlanPolicy struct {
24
-	Type string
25
-	VLAN uint
26
-}
27
-
28
-type VsidPolicy struct {
29
-	Type string
30
-	VSID uint
31
-}
32
-
33
-type PaPolicy struct {
34
-	Type string
35
-	PA   string
36
-}
37
-
38
-// Subnet is assoicated with a network and represents a list
39
-// of subnets available to the network
40
-type Subnet struct {
41
-	AddressPrefix  string            `json:",omitempty"`
42
-	GatewayAddress string            `json:",omitempty"`
43
-	Policies       []json.RawMessage `json:",omitempty"`
44
-}
45
-
46
-// MacPool is assoicated with a network and represents a list
47
-// of macaddresses available to the network
48
-type MacPool struct {
49
-	StartMacAddress string `json:",omitempty"`
50
-	EndMacAddress   string `json:",omitempty"`
51
-}
52
-
53
-// HNSNetwork represents a network in HNS
54
-type HNSNetwork struct {
55
-	Id                   string            `json:"ID,omitempty"`
56
-	Name                 string            `json:",omitempty"`
57
-	Type                 string            `json:",omitempty"`
58
-	NetworkAdapterName   string            `json:",omitempty"`
59
-	SourceMac            string            `json:",omitempty"`
60
-	Policies             []json.RawMessage `json:",omitempty"`
61
-	MacPools             []MacPool         `json:",omitempty"`
62
-	Subnets              []Subnet          `json:",omitempty"`
63
-	DNSSuffix            string            `json:",omitempty"`
64
-	DNSServerList        string            `json:",omitempty"`
65
-	DNSServerCompartment uint32            `json:",omitempty"`
66
-	ManagementIP         string            `json:",omitempty"`
67
-}
68
-
69
-// HNSEndpoint represents a network endpoint in HNS
70
-type HNSEndpoint struct {
71
-	Id                 string            `json:"ID,omitempty"`
72
-	Name               string            `json:",omitempty"`
73
-	VirtualNetwork     string            `json:",omitempty"`
74
-	VirtualNetworkName string            `json:",omitempty"`
75
-	Policies           []json.RawMessage `json:",omitempty"`
76
-	MacAddress         string            `json:",omitempty"`
77
-	IPAddress          net.IP            `json:",omitempty"`
78
-	DNSSuffix          string            `json:",omitempty"`
79
-	DNSServerList      string            `json:",omitempty"`
80
-	GatewayAddress     string            `json:",omitempty"`
81
-	EnableInternalDNS  bool              `json:",omitempty"`
82
-	DisableICC         bool              `json:",omitempty"`
83
-	PrefixLength       uint8             `json:",omitempty"`
84
-	IsRemoteEndpoint   bool              `json:",omitempty"`
85
-}
86
-
87
-type hnsNetworkResponse struct {
88
-	Success bool
89
-	Error   string
90
-	Output  HNSNetwork
91
-}
92
-
93
-type hnsResponse struct {
94
-	Success bool
95
-	Error   string
96
-	Output  json.RawMessage
97
-}
98
-
99 10
 func hnsCall(method, path, request string, returnResponse interface{}) error {
100 11
 	var responseBuffer *uint16
101 12
 	logrus.Debugf("[%s]=>[%s] Request : %s", method, path, request)
... ...
@@ -127,145 +38,3 @@ func hnsCall(method, path, request string, returnResponse interface{}) error {
127 127
 
128 128
 	return nil
129 129
 }
130
-
131
-// HNSNetworkRequest makes a call into HNS to update/query a single network
132
-func HNSNetworkRequest(method, path, request string) (*HNSNetwork, error) {
133
-	var network HNSNetwork
134
-	err := hnsCall(method, "/networks/"+path, request, &network)
135
-	if err != nil {
136
-		return nil, err
137
-	}
138
-
139
-	return &network, nil
140
-}
141
-
142
-// HNSListNetworkRequest makes a HNS call to query the list of available networks
143
-func HNSListNetworkRequest(method, path, request string) ([]HNSNetwork, error) {
144
-	var network []HNSNetwork
145
-	err := hnsCall(method, "/networks/"+path, request, &network)
146
-	if err != nil {
147
-		return nil, err
148
-	}
149
-
150
-	return network, nil
151
-}
152
-
153
-// HNSEndpointRequest makes a HNS call to modify/query a network endpoint
154
-func HNSEndpointRequest(method, path, request string) (*HNSEndpoint, error) {
155
-	endpoint := &HNSEndpoint{}
156
-	err := hnsCall(method, "/endpoints/"+path, request, &endpoint)
157
-	if err != nil {
158
-		return nil, err
159
-	}
160
-
161
-	return endpoint, nil
162
-}
163
-
164
-// HNSListEndpointRequest makes a HNS call to query the list of available endpoints
165
-func HNSListEndpointRequest() ([]HNSEndpoint, error) {
166
-	var endpoint []HNSEndpoint
167
-	err := hnsCall("GET", "/endpoints/", "", &endpoint)
168
-	if err != nil {
169
-		return nil, err
170
-	}
171
-
172
-	return endpoint, nil
173
-}
174
-
175
-// HotAttachEndpoint makes a HCS Call to attach the endpoint to the container
176
-func HotAttachEndpoint(containerID string, endpointID string) error {
177
-	return modifyNetworkEndpoint(containerID, endpointID, Add)
178
-}
179
-
180
-// HotDetachEndpoint makes a HCS Call to detach the endpoint from the container
181
-func HotDetachEndpoint(containerID string, endpointID string) error {
182
-	return modifyNetworkEndpoint(containerID, endpointID, Remove)
183
-}
184
-
185
-// ModifyContainer corresponding to the container id, by sending a request
186
-func modifyContainer(id string, request *ResourceModificationRequestResponse) error {
187
-	container, err := OpenContainer(id)
188
-	if err != nil {
189
-		if IsNotExist(err) {
190
-			return ErrComputeSystemDoesNotExist
191
-		}
192
-		return getInnerError(err)
193
-	}
194
-	defer container.Close()
195
-	err = container.Modify(request)
196
-	if err != nil {
197
-		if IsNotSupported(err) {
198
-			return ErrPlatformNotSupported
199
-		}
200
-		return getInnerError(err)
201
-	}
202
-
203
-	return nil
204
-}
205
-
206
-func modifyNetworkEndpoint(containerID string, endpointID string, request RequestType) error {
207
-	requestMessage := &ResourceModificationRequestResponse{
208
-		Resource: Network,
209
-		Request:  request,
210
-		Data:     endpointID,
211
-	}
212
-	err := modifyContainer(containerID, requestMessage)
213
-
214
-	if err != nil {
215
-		return err
216
-	}
217
-
218
-	return nil
219
-}
220
-
221
-// GetHNSNetworkByID
222
-func GetHNSNetworkByID(networkID string) (*HNSNetwork, error) {
223
-	return HNSNetworkRequest("GET", networkID, "")
224
-}
225
-
226
-// GetHNSNetworkName filtered by Name
227
-func GetHNSNetworkByName(networkName string) (*HNSNetwork, error) {
228
-	hsnnetworks, err := HNSListNetworkRequest("GET", "", "")
229
-	if err != nil {
230
-		return nil, err
231
-	}
232
-	for _, hnsnetwork := range hsnnetworks {
233
-		if hnsnetwork.Name == networkName {
234
-			return &hnsnetwork, nil
235
-		}
236
-	}
237
-	return nil, fmt.Errorf("Network %v not found", networkName)
238
-}
239
-
240
-// Create Endpoint by sending EndpointRequest to HNS. TODO: Create a separate HNS interface to place all these methods
241
-func (endpoint *HNSEndpoint) Create() (*HNSEndpoint, error) {
242
-	jsonString, err := json.Marshal(endpoint)
243
-	if err != nil {
244
-		return nil, err
245
-	}
246
-	return HNSEndpointRequest("POST", "", string(jsonString))
247
-}
248
-
249
-// Create Endpoint by sending EndpointRequest to HNS
250
-func (endpoint *HNSEndpoint) Delete() (*HNSEndpoint, error) {
251
-	return HNSEndpointRequest("DELETE", endpoint.Id, "")
252
-}
253
-
254
-// GetHNSEndpointByID
255
-func GetHNSEndpointByID(endpointID string) (*HNSEndpoint, error) {
256
-	return HNSEndpointRequest("GET", endpointID, "")
257
-}
258
-
259
-// GetHNSNetworkName filtered by Name
260
-func GetHNSEndpointByName(endpointName string) (*HNSEndpoint, error) {
261
-	hnsResponse, err := HNSListEndpointRequest()
262
-	if err != nil {
263
-		return nil, err
264
-	}
265
-	for _, hnsEndpoint := range hnsResponse {
266
-		if hnsEndpoint.Name == endpointName {
267
-			return &hnsEndpoint, nil
268
-		}
269
-	}
270
-	return nil, fmt.Errorf("Endpoint %v not found", endpointName)
271
-}
272 130
new file mode 100644
... ...
@@ -0,0 +1,142 @@
0
+package hcsshim
1
+
2
+import (
3
+	"encoding/json"
4
+	"fmt"
5
+	"net"
6
+
7
+	"github.com/sirupsen/logrus"
8
+)
9
+
10
+// Subnet is assoicated with a network and represents a list
11
+// of subnets available to the network
12
+type Subnet struct {
13
+	AddressPrefix  string            `json:",omitempty"`
14
+	GatewayAddress string            `json:",omitempty"`
15
+	Policies       []json.RawMessage `json:",omitempty"`
16
+}
17
+
18
+// MacPool is assoicated with a network and represents a list
19
+// of macaddresses available to the network
20
+type MacPool struct {
21
+	StartMacAddress string `json:",omitempty"`
22
+	EndMacAddress   string `json:",omitempty"`
23
+}
24
+
25
+// HNSNetwork represents a network in HNS
26
+type HNSNetwork struct {
27
+	Id                   string            `json:"ID,omitempty"`
28
+	Name                 string            `json:",omitempty"`
29
+	Type                 string            `json:",omitempty"`
30
+	NetworkAdapterName   string            `json:",omitempty"`
31
+	SourceMac            string            `json:",omitempty"`
32
+	Policies             []json.RawMessage `json:",omitempty"`
33
+	MacPools             []MacPool         `json:",omitempty"`
34
+	Subnets              []Subnet          `json:",omitempty"`
35
+	DNSSuffix            string            `json:",omitempty"`
36
+	DNSServerList        string            `json:",omitempty"`
37
+	DNSServerCompartment uint32            `json:",omitempty"`
38
+	ManagementIP         string            `json:",omitempty"`
39
+	AutomaticDNS         bool              `json:",omitempty"`
40
+}
41
+
42
+type hnsNetworkResponse struct {
43
+	Success bool
44
+	Error   string
45
+	Output  HNSNetwork
46
+}
47
+
48
+type hnsResponse struct {
49
+	Success bool
50
+	Error   string
51
+	Output  json.RawMessage
52
+}
53
+
54
+// HNSNetworkRequest makes a call into HNS to update/query a single network
55
+func HNSNetworkRequest(method, path, request string) (*HNSNetwork, error) {
56
+	var network HNSNetwork
57
+	err := hnsCall(method, "/networks/"+path, request, &network)
58
+	if err != nil {
59
+		return nil, err
60
+	}
61
+
62
+	return &network, nil
63
+}
64
+
65
+// HNSListNetworkRequest makes a HNS call to query the list of available networks
66
+func HNSListNetworkRequest(method, path, request string) ([]HNSNetwork, error) {
67
+	var network []HNSNetwork
68
+	err := hnsCall(method, "/networks/"+path, request, &network)
69
+	if err != nil {
70
+		return nil, err
71
+	}
72
+
73
+	return network, nil
74
+}
75
+
76
+// GetHNSNetworkByID
77
+func GetHNSNetworkByID(networkID string) (*HNSNetwork, error) {
78
+	return HNSNetworkRequest("GET", networkID, "")
79
+}
80
+
81
+// GetHNSNetworkName filtered by Name
82
+func GetHNSNetworkByName(networkName string) (*HNSNetwork, error) {
83
+	hsnnetworks, err := HNSListNetworkRequest("GET", "", "")
84
+	if err != nil {
85
+		return nil, err
86
+	}
87
+	for _, hnsnetwork := range hsnnetworks {
88
+		if hnsnetwork.Name == networkName {
89
+			return &hnsnetwork, nil
90
+		}
91
+	}
92
+	return nil, fmt.Errorf("Network %v not found", networkName)
93
+}
94
+
95
+// Create Network by sending NetworkRequest to HNS.
96
+func (network *HNSNetwork) Create() (*HNSNetwork, error) {
97
+	operation := "Create"
98
+	title := "HCSShim::HNSNetwork::" + operation
99
+	logrus.Debugf(title+" id=%s", network.Id)
100
+
101
+	jsonString, err := json.Marshal(network)
102
+	if err != nil {
103
+		return nil, err
104
+	}
105
+	return HNSNetworkRequest("POST", "", string(jsonString))
106
+}
107
+
108
+// Delete Network by sending NetworkRequest to HNS
109
+func (network *HNSNetwork) Delete() (*HNSNetwork, error) {
110
+	operation := "Delete"
111
+	title := "HCSShim::HNSNetwork::" + operation
112
+	logrus.Debugf(title+" id=%s", network.Id)
113
+
114
+	return HNSNetworkRequest("DELETE", network.Id, "")
115
+}
116
+
117
+// Creates an endpoint on the Network.
118
+func (network *HNSNetwork) NewEndpoint(ipAddress net.IP, macAddress net.HardwareAddr) *HNSEndpoint {
119
+	return &HNSEndpoint{
120
+		VirtualNetwork: network.Id,
121
+		IPAddress:      ipAddress,
122
+		MacAddress:     string(macAddress),
123
+	}
124
+}
125
+
126
+func (network *HNSNetwork) CreateEndpoint(endpoint *HNSEndpoint) (*HNSEndpoint, error) {
127
+	operation := "CreateEndpoint"
128
+	title := "HCSShim::HNSNetwork::" + operation
129
+	logrus.Debugf(title+" id=%s, endpointId=%s", network.Id, endpoint.Id)
130
+
131
+	endpoint.VirtualNetwork = network.Id
132
+	return endpoint.Create()
133
+}
134
+
135
+func (network *HNSNetwork) CreateRemoteEndpoint(endpoint *HNSEndpoint) (*HNSEndpoint, error) {
136
+	operation := "CreateRemoteEndpoint"
137
+	title := "HCSShim::HNSNetwork::" + operation
138
+	logrus.Debugf(title+" id=%s", network.Id)
139
+	endpoint.IsRemoteEndpoint = true
140
+	return network.CreateEndpoint(endpoint)
141
+}
0 142
new file mode 100644
... ...
@@ -0,0 +1,95 @@
0
+package hcsshim
1
+
2
+// Type of Request Support in ModifySystem
3
+type PolicyType string
4
+
5
+// RequestType const
6
+const (
7
+	Nat                  PolicyType = "NAT"
8
+	ACL                  PolicyType = "ACL"
9
+	PA                   PolicyType = "PA"
10
+	VLAN                 PolicyType = "VLAN"
11
+	VSID                 PolicyType = "VSID"
12
+	VNet                 PolicyType = "VNET"
13
+	L2Driver             PolicyType = "L2Driver"
14
+	Isolation            PolicyType = "Isolation"
15
+	QOS                  PolicyType = "QOS"
16
+	OutboundNat          PolicyType = "OutBoundNAT"
17
+	ExternalLoadBalancer PolicyType = "ELB"
18
+	Route                PolicyType = "ROUTE"
19
+)
20
+
21
+type NatPolicy struct {
22
+	Type         PolicyType `json:"Type"`
23
+	Protocol     string
24
+	InternalPort uint16
25
+	ExternalPort uint16
26
+}
27
+
28
+type QosPolicy struct {
29
+	Type                            PolicyType `json:"Type"`
30
+	MaximumOutgoingBandwidthInBytes uint64
31
+}
32
+
33
+type IsolationPolicy struct {
34
+	Type               PolicyType `json:"Type"`
35
+	VLAN               uint
36
+	VSID               uint
37
+	InDefaultIsolation bool
38
+}
39
+
40
+type VlanPolicy struct {
41
+	Type PolicyType `json:"Type"`
42
+	VLAN uint
43
+}
44
+
45
+type VsidPolicy struct {
46
+	Type PolicyType `json:"Type"`
47
+	VSID uint
48
+}
49
+
50
+type PaPolicy struct {
51
+	Type PolicyType `json:"Type"`
52
+	PA   string     `json:"PA"`
53
+}
54
+
55
+type OutboundNatPolicy struct {
56
+	Policy
57
+	VIP        string   `json:"VIP,omitempty"`
58
+	Exceptions []string `json:"ExceptionList,omitempty"`
59
+}
60
+
61
+type ActionType string
62
+type DirectionType string
63
+type RuleType string
64
+
65
+const (
66
+	Allow ActionType = "Allow"
67
+	Block ActionType = "Block"
68
+
69
+	In  DirectionType = "In"
70
+	Out DirectionType = "Out"
71
+
72
+	Host   RuleType = "Host"
73
+	Switch RuleType = "Switch"
74
+)
75
+
76
+type ACLPolicy struct {
77
+	Type          PolicyType `json:"Type"`
78
+	Protocol      uint16
79
+	InternalPort  uint16
80
+	Action        ActionType
81
+	Direction     DirectionType
82
+	LocalAddress  string
83
+	RemoteAddress string
84
+	LocalPort     uint16
85
+	RemotePort    uint16
86
+	RuleType      RuleType `json:"RuleType,omitempty"`
87
+
88
+	Priority    uint16
89
+	ServiceName string
90
+}
91
+
92
+type Policy struct {
93
+	Type PolicyType `json:"Type"`
94
+}
0 95
new file mode 100644
... ...
@@ -0,0 +1,187 @@
0
+package hcsshim
1
+
2
+import (
3
+	"encoding/json"
4
+
5
+	"github.com/sirupsen/logrus"
6
+)
7
+
8
+type RoutePolicy struct {
9
+	Policy
10
+	DestinationPrefix string `json:"DestinationPrefix,omitempty"`
11
+	NextHop           string `json:"NextHop,omitempty"`
12
+	EncapEnabled      bool   `json:"NeedEncap,omitempty"`
13
+}
14
+
15
+type ELBPolicy struct {
16
+	LBPolicy
17
+	SourceVIP string   `json:"SourceVIP,omitempty"`
18
+	VIPs      []string `json:"VIPs,omitempty"`
19
+	ILB       bool     `json:"ILB,omitempty"`
20
+}
21
+
22
+type LBPolicy struct {
23
+	Policy
24
+	Protocol     uint16 `json:"Protocol,omitempty"`
25
+	InternalPort uint16
26
+	ExternalPort uint16
27
+}
28
+
29
+type PolicyList struct {
30
+	Id                 string   `json:"ID,omitempty"`
31
+	EndpointReferences []string `json:"References,omitempty"`
32
+	Policies           []string `json:"Policies,omitempty"`
33
+}
34
+
35
+// HNSPolicyListRequest makes a call into HNS to update/query a single network
36
+func HNSPolicyListRequest(method, path, request string) (*PolicyList, error) {
37
+	var policy PolicyList
38
+	err := hnsCall(method, "/policylists/"+path, request, &policy)
39
+	if err != nil {
40
+		return nil, err
41
+	}
42
+
43
+	return &policy, nil
44
+}
45
+
46
+func HNSListPolicyListRequest() ([]PolicyList, error) {
47
+	var plist []PolicyList
48
+	err := hnsCall("GET", "/policylists/", "", &plist)
49
+	if err != nil {
50
+		return nil, err
51
+	}
52
+
53
+	return plist, nil
54
+}
55
+
56
+// PolicyListRequest makes a HNS call to modify/query a network endpoint
57
+func PolicyListRequest(method, path, request string) (*PolicyList, error) {
58
+	policylist := &PolicyList{}
59
+	err := hnsCall(method, "/policylists/"+path, request, &policylist)
60
+	if err != nil {
61
+		return nil, err
62
+	}
63
+
64
+	return policylist, nil
65
+}
66
+
67
+// Create PolicyList by sending PolicyListRequest to HNS.
68
+func (policylist *PolicyList) Create() (*PolicyList, error) {
69
+	operation := "Create"
70
+	title := "HCSShim::PolicyList::" + operation
71
+	logrus.Debugf(title+" id=%s", policylist.Id)
72
+	jsonString, err := json.Marshal(policylist)
73
+	if err != nil {
74
+		return nil, err
75
+	}
76
+	return PolicyListRequest("POST", "", string(jsonString))
77
+}
78
+
79
+// Create PolicyList by sending PolicyListRequest to HNS
80
+func (policylist *PolicyList) Delete() (*PolicyList, error) {
81
+	operation := "Delete"
82
+	title := "HCSShim::PolicyList::" + operation
83
+	logrus.Debugf(title+" id=%s", policylist.Id)
84
+
85
+	return PolicyListRequest("DELETE", policylist.Id, "")
86
+}
87
+
88
+// Add an endpoint to a Policy List
89
+func (policylist *PolicyList) AddEndpoint(endpoint *HNSEndpoint) (*PolicyList, error) {
90
+	operation := "AddEndpoint"
91
+	title := "HCSShim::PolicyList::" + operation
92
+	logrus.Debugf(title+" id=%s, endpointId:%s", policylist.Id, endpoint.Id)
93
+
94
+	_, err := policylist.Delete()
95
+	if err != nil {
96
+		return nil, err
97
+	}
98
+
99
+	// Add Endpoint to the Existing List
100
+	policylist.EndpointReferences = append(policylist.EndpointReferences, "/endpoints/"+endpoint.Id)
101
+
102
+	return policylist.Create()
103
+}
104
+
105
+// Remove an endpoint from the Policy List
106
+func (policylist *PolicyList) RemoveEndpoint(endpoint *HNSEndpoint) (*PolicyList, error) {
107
+	operation := "RemoveEndpoint"
108
+	title := "HCSShim::PolicyList::" + operation
109
+	logrus.Debugf(title+" id=%s, endpointId:%s", policylist.Id, endpoint.Id)
110
+
111
+	_, err := policylist.Delete()
112
+	if err != nil {
113
+		return nil, err
114
+	}
115
+
116
+	elementToRemove := "/endpoints/" + endpoint.Id
117
+
118
+	var references []string
119
+
120
+	for _, endpointReference := range policylist.EndpointReferences {
121
+		if endpointReference == elementToRemove {
122
+			continue
123
+		}
124
+		references = append(references, endpointReference)
125
+	}
126
+	policylist.EndpointReferences = references
127
+	return policylist.Create()
128
+}
129
+
130
+// AddLoadBalancer policy list for the specified endpoints
131
+func AddLoadBalancer(endpoints []HNSEndpoint, isILB bool, vip string, protocol uint16, internalPort uint16, externalPort uint16) (*PolicyList, error) {
132
+	operation := "AddLoadBalancer"
133
+	title := "HCSShim::PolicyList::" + operation
134
+	logrus.Debugf(title+" Vip:%s", vip)
135
+
136
+	policylist := &PolicyList{}
137
+
138
+	elbPolicy := &ELBPolicy{
139
+		VIPs: []string{vip},
140
+		ILB:  isILB,
141
+	}
142
+	elbPolicy.Type = ExternalLoadBalancer
143
+	elbPolicy.Protocol = protocol
144
+	elbPolicy.InternalPort = internalPort
145
+	elbPolicy.ExternalPort = externalPort
146
+
147
+	for _, endpoint := range endpoints {
148
+		policylist.EndpointReferences = append(policylist.EndpointReferences, "/endpoints/"+endpoint.Id)
149
+	}
150
+
151
+	jsonString, err := json.Marshal(elbPolicy)
152
+	if err != nil {
153
+		return nil, err
154
+	}
155
+
156
+	policylist.Policies[0] = string(jsonString)
157
+	return policylist.Create()
158
+}
159
+
160
+// AddLoadBalancer policy list for the specified endpoints
161
+func AddRoute(endpoints []HNSEndpoint, destinationPrefix string, nextHop string, encapEnabled bool) (*PolicyList, error) {
162
+	operation := "AddRoute"
163
+	title := "HCSShim::PolicyList::" + operation
164
+	logrus.Debugf(title+" destinationPrefix:%s", destinationPrefix)
165
+
166
+	policylist := &PolicyList{}
167
+
168
+	rPolicy := &RoutePolicy{
169
+		DestinationPrefix: destinationPrefix,
170
+		NextHop:           nextHop,
171
+		EncapEnabled:      encapEnabled,
172
+	}
173
+	rPolicy.Type = Route
174
+
175
+	for _, endpoint := range endpoints {
176
+		policylist.EndpointReferences = append(policylist.EndpointReferences, "/endpoints/"+endpoint.Id)
177
+	}
178
+
179
+	jsonString, err := json.Marshal(rPolicy)
180
+	if err != nil {
181
+		return nil, err
182
+	}
183
+
184
+	policylist.Policies[0] = string(jsonString)
185
+	return policylist.Create()
186
+}
... ...
@@ -7,7 +7,7 @@ import (
7 7
 	"path/filepath"
8 8
 
9 9
 	"github.com/Microsoft/go-winio"
10
-	"github.com/Sirupsen/logrus"
10
+	"github.com/sirupsen/logrus"
11 11
 )
12 12
 
13 13
 // ImportLayer will take the contents of the folder at importFolderPath and import
... ...
@@ -37,11 +37,17 @@ type MappedDir struct {
37 37
 	IOPSMaximum      uint64
38 38
 }
39 39
 
40
+type MappedPipe struct {
41
+	HostPath          string
42
+	ContainerPipeName string
43
+}
44
+
40 45
 type HvRuntime struct {
41
-	ImagePath       string `json:",omitempty"`
42
-	SkipTemplate    bool   `json:",omitempty"`
43
-	LinuxInitrdFile string `json:",omitempty"` // File under ImagePath on host containing an initrd image for starting a Linux utility VM
44
-	LinuxKernelFile string `json:",omitempty"` // File under ImagePath on host containing a kernel for starting a Linux utility VM
46
+	ImagePath           string `json:",omitempty"`
47
+	SkipTemplate        bool   `json:",omitempty"`
48
+	LinuxInitrdFile     string `json:",omitempty"` // File under ImagePath on host containing an initrd image for starting a Linux utility VM
49
+	LinuxKernelFile     string `json:",omitempty"` // File under ImagePath on host containing a kernel for starting a Linux utility VM
50
+	LinuxBootParameters string `json:",omitempty"` // Additional boot parameters for starting a Linux Utility VM in initrd mode
45 51
 }
46 52
 
47 53
 type MappedVirtualDisk struct {
... ...
@@ -50,6 +56,7 @@ type MappedVirtualDisk struct {
50 50
 	CreateInUtilityVM bool   `json:",omitempty"`
51 51
 	ReadOnly          bool   `json:",omitempty"`
52 52
 	Cache             string `json:",omitempty"` // "" (Unspecified); "Disabled"; "Enabled"; "Private"; "PrivateAllowSharing"
53
+	AttachOnly        bool   `json:",omitempty:`
53 54
 }
54 55
 
55 56
 // ContainerConfig is used as both the input of CreateContainer
... ...
@@ -64,14 +71,15 @@ type ContainerConfig struct {
64 64
 	Layers                      []Layer             // List of storage layers. Required for Windows Server and Hyper-V Containers. Format ID=GUID;Path=%root%\windowsfilter\layerID
65 65
 	Credentials                 string              `json:",omitempty"` // Credentials information
66 66
 	ProcessorCount              uint32              `json:",omitempty"` // Number of processors to assign to the container.
67
-	ProcessorWeight             uint64              `json:",omitempty"` // CPU Shares 0..10000 on Windows; where 0 will be omitted and HCS will default.
68
-	ProcessorMaximum            int64               `json:",omitempty"` // CPU maximum usage percent 1..100
67
+	ProcessorWeight             uint64              `json:",omitempty"` // CPU shares (relative weight to other containers with cpu shares). Range is from 1 to 10000. A value of 0 results in default shares.
68
+	ProcessorMaximum            int64               `json:",omitempty"` // Specifies the portion of processor cycles that this container can use as a percentage times 100. Range is from 1 to 10000. A value of 0 results in no limit.
69 69
 	StorageIOPSMaximum          uint64              `json:",omitempty"` // Maximum Storage IOPS
70 70
 	StorageBandwidthMaximum     uint64              `json:",omitempty"` // Maximum Storage Bandwidth in bytes per second
71 71
 	StorageSandboxSize          uint64              `json:",omitempty"` // Size in bytes that the container system drive should be expanded to if smaller
72 72
 	MemoryMaximumInMB           int64               `json:",omitempty"` // Maximum memory available to the container in Megabytes
73 73
 	HostName                    string              `json:",omitempty"` // Hostname
74 74
 	MappedDirectories           []MappedDir         `json:",omitempty"` // List of mapped directories (volumes/mounts)
75
+	MappedPipes                 []MappedPipe        `json:",omitempty"` // List of mapped Windows named pipes
75 76
 	HvPartition                 bool                // True if it a Hyper-V Container
76 77
 	NetworkSharedContainerName  string              `json:",omitempty"` // Name (ID) of the container that we will share the network stack with.
77 78
 	EndpointList                []string            `json:",omitempty"` // List of networking endpoints to be attached to container
... ...
@@ -124,6 +132,9 @@ type Container interface {
124 124
 	// ProcessList returns details for the processes in a container.
125 125
 	ProcessList() ([]ProcessListItem, error)
126 126
 
127
+	// MappedVirtualDisks returns virtual disks mapped to a utility VM, indexed by controller
128
+	MappedVirtualDisks() (map[int]MappedVirtualDiskController, error)
129
+
127 130
 	// CreateProcess launches a new process within the container.
128 131
 	CreateProcess(c *ProcessConfig) (Process, error)
129 132
 
... ...
@@ -1,6 +1,6 @@
1 1
 package hcsshim
2 2
 
3
-import "github.com/Sirupsen/logrus"
3
+import "github.com/sirupsen/logrus"
4 4
 
5 5
 // LayerExists will return true if a layer with the given id exists and is known
6 6
 // to the system.
... ...
@@ -7,7 +7,7 @@ import (
7 7
 	"path/filepath"
8 8
 	"syscall"
9 9
 
10
-	"github.com/Sirupsen/logrus"
10
+	"github.com/sirupsen/logrus"
11 11
 )
12 12
 
13 13
 /* To pass into syscall, we need a struct matching the following:
... ...
@@ -1,6 +1,6 @@
1 1
 package hcsshim
2 2
 
3
-import "github.com/Sirupsen/logrus"
3
+import "github.com/sirupsen/logrus"
4 4
 
5 5
 // NameToGuid converts the given string into a GUID using the algorithm in the
6 6
 // Host Compute Service, ensuring GUIDs generated with the same string are common
... ...
@@ -3,7 +3,7 @@ package hcsshim
3 3
 import (
4 4
 	"sync"
5 5
 
6
-	"github.com/Sirupsen/logrus"
6
+	"github.com/sirupsen/logrus"
7 7
 )
8 8
 
9 9
 var prepareLayerLock sync.Mutex
... ...
@@ -7,7 +7,7 @@ import (
7 7
 	"syscall"
8 8
 	"time"
9 9
 
10
-	"github.com/Sirupsen/logrus"
10
+	"github.com/sirupsen/logrus"
11 11
 )
12 12
 
13 13
 // ContainerError is an error encountered in HCS
... ...
@@ -1,6 +1,6 @@
1 1
 package hcsshim
2 2
 
3
-import "github.com/Sirupsen/logrus"
3
+import "github.com/sirupsen/logrus"
4 4
 
5 5
 // UnprepareLayer disables the filesystem filter for the read-write layer with
6 6
 // the given id.
... ...
@@ -3,7 +3,7 @@ package hcsshim
3 3
 import (
4 4
 	"time"
5 5
 
6
-	"github.com/Sirupsen/logrus"
6
+	"github.com/sirupsen/logrus"
7 7
 )
8 8
 
9 9
 func processAsyncHcsResult(err error, resultp *uint16, callbackNumber uintptr, expectedNotification hcsNotification, timeout *time.Duration) error {
... ...
@@ -12,9 +12,9 @@ import (
12 12
 	"syscall"
13 13
 	"time"
14 14
 
15
-	"github.com/Sirupsen/logrus"
16 15
 	"github.com/containerd/containerd/specs"
17 16
 	ocs "github.com/opencontainers/runtime-spec/specs-go"
17
+	"github.com/sirupsen/logrus"
18 18
 	"golang.org/x/net/context"
19 19
 	"golang.org/x/sys/unix"
20 20
 )
... ...
@@ -14,9 +14,9 @@ import (
14 14
 	"syscall"
15 15
 	"time"
16 16
 
17
-	"github.com/Sirupsen/logrus"
18 17
 	"github.com/containerd/containerd/osutils"
19 18
 	"github.com/containerd/containerd/specs"
19
+	"github.com/sirupsen/logrus"
20 20
 	"golang.org/x/sys/unix"
21 21
 )
22 22
 
... ...
@@ -76,8 +76,7 @@ may be the better choice.
76 76
 For those who have previously deployed their own registry based on the Registry
77 77
 1.0 implementation and wish to deploy a Registry 2.0 while retaining images,
78 78
 data migration is required. A tool to assist with migration efforts has been
79
-created. For more information see [docker/migrator]
80
-(https://github.com/docker/migrator).
79
+created. For more information see [docker/migrator](https://github.com/docker/migrator).
81 80
 
82 81
 ## Contribute
83 82
 
... ...
@@ -152,7 +152,7 @@ type BlobProvider interface {
152 152
 
153 153
 // BlobServer can serve blobs via http.
154 154
 type BlobServer interface {
155
-	// ServeBlob attempts to serve the blob, identifed by dgst, via http. The
155
+	// ServeBlob attempts to serve the blob, identified by dgst, via http. The
156 156
 	// service may decide to redirect the client elsewhere or serve the data
157 157
 	// directly.
158 158
 	//
... ...
@@ -64,7 +64,7 @@
64 64
 // Note that this only affects the new context, the previous context, with the
65 65
 // version field, can be used independently. Put another way, the new logger,
66 66
 // added to the request context, is unique to that context and can have
67
-// request scoped varaibles.
67
+// request scoped variables.
68 68
 //
69 69
 // HTTP Requests
70 70
 //
... ...
@@ -8,9 +8,9 @@ import (
8 8
 	"sync"
9 9
 	"time"
10 10
 
11
-	log "github.com/Sirupsen/logrus"
12 11
 	"github.com/docker/distribution/uuid"
13 12
 	"github.com/gorilla/mux"
13
+	log "github.com/sirupsen/logrus"
14 14
 )
15 15
 
16 16
 // Common errors used with this package.
... ...
@@ -3,7 +3,7 @@ package context
3 3
 import (
4 4
 	"fmt"
5 5
 
6
-	"github.com/Sirupsen/logrus"
6
+	"github.com/sirupsen/logrus"
7 7
 	"runtime"
8 8
 )
9 9
 
... ...
@@ -77,7 +77,7 @@ func (err ErrManifestUnknownRevision) Error() string {
77 77
 type ErrManifestUnverified struct{}
78 78
 
79 79
 func (ErrManifestUnverified) Error() string {
80
-	return fmt.Sprintf("unverified manifest")
80
+	return "unverified manifest"
81 81
 }
82 82
 
83 83
 // ErrManifestVerification provides a type to collect errors encountered
... ...
@@ -81,7 +81,7 @@ type ManifestList struct {
81 81
 	Manifests []ManifestDescriptor `json:"manifests"`
82 82
 }
83 83
 
84
-// References returnes the distribution descriptors for the referenced image
84
+// References returns the distribution descriptors for the referenced image
85 85
 // manifests.
86 86
 func (m ManifestList) References() []distribution.Descriptor {
87 87
 	dependencies := make([]distribution.Descriptor, len(m.Manifests))
... ...
@@ -3,8 +3,8 @@ package schema1
3 3
 import (
4 4
 	"crypto/x509"
5 5
 
6
-	"github.com/Sirupsen/logrus"
7 6
 	"github.com/docker/libtrust"
7
+	"github.com/sirupsen/logrus"
8 8
 )
9 9
 
10 10
 // Verify verifies the signature of the signed manifest returning the public
... ...
@@ -15,7 +15,7 @@
15 15
 //	tag                             := /[\w][\w.-]{0,127}/
16 16
 //
17 17
 //	digest                          := digest-algorithm ":" digest-hex
18
-//	digest-algorithm                := digest-algorithm-component [ digest-algorithm-separator digest-algorithm-component ]
18
+//	digest-algorithm                := digest-algorithm-component [ digest-algorithm-separator digest-algorithm-component ]*
19 19
 //	digest-algorithm-separator      := /[+.-_]/
20 20
 //	digest-algorithm-component      := /[A-Za-z][A-Za-z0-9]*/
21 21
 //	digest-hex                      := /[0-9a-fA-F]{32,}/ ; At least 128 bit digest value
... ...
@@ -1,10 +1,9 @@
1 1
 package v2
2 2
 
3 3
 import (
4
-	"net"
4
+	"fmt"
5 5
 	"net/http"
6 6
 	"net/url"
7
-	"strconv"
8 7
 	"strings"
9 8
 
10 9
 	"github.com/docker/distribution/reference"
... ...
@@ -48,66 +47,42 @@ func NewURLBuilderFromString(root string, relative bool) (*URLBuilder, error) {
48 48
 // NewURLBuilderFromRequest uses information from an *http.Request to
49 49
 // construct the root url.
50 50
 func NewURLBuilderFromRequest(r *http.Request, relative bool) *URLBuilder {
51
-	var scheme string
52
-
53
-	forwardedProto := r.Header.Get("X-Forwarded-Proto")
54
-	// TODO: log the error
55
-	forwardedHeader, _, _ := parseForwardedHeader(r.Header.Get("Forwarded"))
56
-
57
-	switch {
58
-	case len(forwardedProto) > 0:
59
-		scheme = forwardedProto
60
-	case len(forwardedHeader["proto"]) > 0:
61
-		scheme = forwardedHeader["proto"]
62
-	case r.TLS != nil:
63
-		scheme = "https"
64
-	case len(r.URL.Scheme) > 0:
65
-		scheme = r.URL.Scheme
66
-	default:
51
+	var (
67 52
 		scheme = "http"
68
-	}
53
+		host   = r.Host
54
+	)
69 55
 
70
-	host := r.Host
71
-
72
-	if forwardedHost := r.Header.Get("X-Forwarded-Host"); len(forwardedHost) > 0 {
73
-		// According to the Apache mod_proxy docs, X-Forwarded-Host can be a
74
-		// comma-separated list of hosts, to which each proxy appends the
75
-		// requested host. We want to grab the first from this comma-separated
76
-		// list.
77
-		hosts := strings.SplitN(forwardedHost, ",", 2)
78
-		host = strings.TrimSpace(hosts[0])
79
-	} else if addr, exists := forwardedHeader["for"]; exists {
80
-		host = addr
81
-	} else if h, exists := forwardedHeader["host"]; exists {
82
-		host = h
56
+	if r.TLS != nil {
57
+		scheme = "https"
58
+	} else if len(r.URL.Scheme) > 0 {
59
+		scheme = r.URL.Scheme
83 60
 	}
84 61
 
85
-	portLessHost, port := host, ""
86
-	if !isIPv6Address(portLessHost) {
87
-		// with go 1.6, this would treat the last part of IPv6 address as a port
88
-		portLessHost, port, _ = net.SplitHostPort(host)
89
-	}
90
-	if forwardedPort := r.Header.Get("X-Forwarded-Port"); len(port) == 0 && len(forwardedPort) > 0 {
91
-		ports := strings.SplitN(forwardedPort, ",", 2)
92
-		forwardedPort = strings.TrimSpace(ports[0])
93
-		if _, err := strconv.ParseInt(forwardedPort, 10, 32); err == nil {
94
-			port = forwardedPort
62
+	// Handle fowarded headers
63
+	// Prefer "Forwarded" header as defined by rfc7239 if given
64
+	// see https://tools.ietf.org/html/rfc7239
65
+	if forwarded := r.Header.Get("Forwarded"); len(forwarded) > 0 {
66
+		forwardedHeader, _, err := parseForwardedHeader(forwarded)
67
+		if err == nil {
68
+			if fproto := forwardedHeader["proto"]; len(fproto) > 0 {
69
+				scheme = fproto
70
+			}
71
+			if fhost := forwardedHeader["host"]; len(fhost) > 0 {
72
+				host = fhost
73
+			}
95 74
 		}
96
-	}
97
-
98
-	if len(portLessHost) > 0 {
99
-		host = portLessHost
100
-	}
101
-	if len(port) > 0 {
102
-		// remove enclosing brackets of ipv6 address otherwise they will be duplicated
103
-		if len(host) > 1 && host[0] == '[' && host[len(host)-1] == ']' {
104
-			host = host[1 : len(host)-1]
75
+	} else {
76
+		if forwardedProto := r.Header.Get("X-Forwarded-Proto"); len(forwardedProto) > 0 {
77
+			scheme = forwardedProto
78
+		}
79
+		if forwardedHost := r.Header.Get("X-Forwarded-Host"); len(forwardedHost) > 0 {
80
+			// According to the Apache mod_proxy docs, X-Forwarded-Host can be a
81
+			// comma-separated list of hosts, to which each proxy appends the
82
+			// requested host. We want to grab the first from this comma-separated
83
+			// list.
84
+			hosts := strings.SplitN(forwardedHost, ",", 2)
85
+			host = strings.TrimSpace(hosts[0])
105 86
 		}
106
-		// JoinHostPort properly encloses ipv6 addresses in square brackets
107
-		host = net.JoinHostPort(host, port)
108
-	} else if isIPv6Address(host) && host[0] != '[' {
109
-		// ipv6 needs to be enclosed in square brackets in urls
110
-		host = "[" + host + "]"
111 87
 	}
112 88
 
113 89
 	basePath := routeDescriptorsMap[RouteNameBase].Path
... ...
@@ -175,6 +150,8 @@ func (ub *URLBuilder) BuildManifestURL(ref reference.Named) (string, error) {
175 175
 		tagOrDigest = v.Tag()
176 176
 	case reference.Digested:
177 177
 		tagOrDigest = v.Digest().String()
178
+	default:
179
+		return "", fmt.Errorf("reference must have a tag or digest")
178 180
 	}
179 181
 
180 182
 	manifestURL, err := route.URL("name", ref.Name(), "reference", tagOrDigest)
... ...
@@ -287,28 +264,3 @@ func appendValues(u string, values ...url.Values) string {
287 287
 
288 288
 	return appendValuesURL(up, values...).String()
289 289
 }
290
-
291
-// isIPv6Address returns true if given string is a valid IPv6 address. No port is allowed. The address may be
292
-// enclosed in square brackets.
293
-func isIPv6Address(host string) bool {
294
-	if len(host) > 1 && host[0] == '[' && host[len(host)-1] == ']' {
295
-		host = host[1 : len(host)-1]
296
-	}
297
-	// The IPv6 scoped addressing zone identifier starts after the last percent sign.
298
-	if i := strings.LastIndexByte(host, '%'); i > 0 {
299
-		host = host[:i]
300
-	}
301
-	ip := net.ParseIP(host)
302
-	if ip == nil {
303
-		return false
304
-	}
305
-	if ip.To16() == nil {
306
-		return false
307
-	}
308
-	if ip.To4() == nil {
309
-		return true
310
-	}
311
-	// dot can be present in ipv4-mapped address, it needs to come after a colon though
312
-	i := strings.IndexAny(host, ":.")
313
-	return i >= 0 && host[i] == ':'
314
-}
... ...
@@ -10,10 +10,10 @@ import (
10 10
 	"sync"
11 11
 	"time"
12 12
 
13
-	"github.com/Sirupsen/logrus"
14 13
 	"github.com/docker/distribution/registry/client"
15 14
 	"github.com/docker/distribution/registry/client/auth/challenge"
16 15
 	"github.com/docker/distribution/registry/client/transport"
16
+	"github.com/sirupsen/logrus"
17 17
 )
18 18
 
19 19
 var (
... ...
@@ -1,19 +1,21 @@
1
-github.com/Azure/azure-sdk-for-go c6f0533defaaaa26ea4dff3c9774e36033088112
2
-github.com/Sirupsen/logrus d26492970760ca5d33129d2d799e34be5c4782eb
1
+github.com/Azure/azure-sdk-for-go 088007b3b08cc02b27f2eadfdcd870958460ce7e
2
+github.com/Azure/go-autorest ec5f4903f77ed9927ac95b19ab8e44ada64c1356
3
+github.com/sirupsen/logrus 3d4380f53a34dcdc95f0c1db702615992b38d9a4
3 4
 github.com/aws/aws-sdk-go c6fc52983ea2375810aa38ddb5370e9cdf611716
4
-github.com/bshuster-repo/logrus-logstash-hook 5f729f2fb50a301153cae84ff5c58981d51c095a
5
+github.com/bshuster-repo/logrus-logstash-hook d2c0ecc1836d91814e15e23bb5dc309c3ef51f4a
5 6
 github.com/bugsnag/bugsnag-go b1d153021fcd90ca3f080db36bec96dc690fb274
6 7
 github.com/bugsnag/osext 0dd3f918b21bec95ace9dc86c7e70266cfc5c702
7 8
 github.com/bugsnag/panicwrap e2c28503fcd0675329da73bf48b33404db873782
8 9
 github.com/denverdino/aliyungo afedced274aa9a7fcdd47ac97018f0f8db4e5de2
10
+github.com/dgrijalva/jwt-go a601269ab70c205d26370c16f7c81e9017c14e04
9 11
 github.com/docker/goamz f0a21f5b2e12f83a505ecf79b633bb2035cf6f85
10 12
 github.com/docker/libtrust fa567046d9b14f6aa788882a950d69651d230b21
11 13
 github.com/garyburd/redigo 535138d7bcd717d6531c701ef5933d98b1866257
12 14
 github.com/go-ini/ini 2ba15ac2dc9cdf88c110ec2dc0ced7fa45f5678c
13
-github.com/golang/protobuf/proto 8d92cf5fc15a4382f8964b08e1f42a75c0591aa3
15
+github.com/golang/protobuf 8d92cf5fc15a4382f8964b08e1f42a75c0591aa3
14 16
 github.com/gorilla/context 14f550f51af52180c2eefed15e5fd18d63c0a64a
15 17
 github.com/gorilla/handlers 60c7bfde3e33c201519a200a4507a158cc03a17b
16
-github.com/gorilla/mux e444e69cbd2e2e3e0749a2f3c717cec491552bbf
18
+github.com/gorilla/mux 599cba5e7b6137d46ddf58fb1765f5d928e69604
17 19
 github.com/inconshreveable/mousetrap 76626ae9c91c4f2a10f34cad8ce83ea42c93bb75
18 20
 github.com/jmespath/go-jmespath bd40a432e4c76585ef6b72d3fd96fb9b6dc7b68d
19 21
 github.com/miekg/dns 271c58e0c14f552178ea321a545ff9af38930f39
... ...
@@ -21,15 +23,15 @@ github.com/mitchellh/mapstructure 482a9fd5fa83e8c4e7817413b80f3eb8feec03ef
21 21
 github.com/ncw/swift b964f2ca856aac39885e258ad25aec08d5f64ee6
22 22
 github.com/spf13/cobra 312092086bed4968099259622145a0c9ae280064
23 23
 github.com/spf13/pflag 5644820622454e71517561946e3d94b9f9db6842
24
-github.com/stevvooe/resumable 51ad44105773cafcbe91927f70ac68e1bf78f8b4
25
-github.com/xenolf/lego/acme a9d8cec0e6563575e5868a005359ac97911b5985
24
+github.com/stevvooe/resumable 2aaf90b2ceea5072cb503ef2a620b08ff3119870
25
+github.com/xenolf/lego a9d8cec0e6563575e5868a005359ac97911b5985
26 26
 github.com/yvasiyarov/go-metrics 57bccd1ccd43f94bb17fdd8bf3007059b802f85e
27 27
 github.com/yvasiyarov/gorelic a9bba5b9ab508a086f9a12b8c51fab68478e2128
28 28
 github.com/yvasiyarov/newrelic_platform_go b21fdbd4370f3717f3bbd2bf41c223bc273068e6
29 29
 golang.org/x/crypto c10c31b5e94b6f7a0283272dc2bb27163dcea24b
30 30
 golang.org/x/net 4876518f9e71663000c348837735820161a42df7
31 31
 golang.org/x/oauth2 045497edb6234273d67dbc25da3f2ddbc4c4cacf
32
-golang.org/x/time/rate a4bde12657593d5e90d0533a3e4fd95e635124cb
32
+golang.org/x/time a4bde12657593d5e90d0533a3e4fd95e635124cb
33 33
 google.golang.org/api 9bf6e6e569ff057f75d9604a46c52928f17d2b54
34 34
 google.golang.org/appengine 12d5545dc1cfa6047a286d5e853841b6471f4c19
35 35
 google.golang.org/cloud 975617b05ea8a58727e6c1a06b6161ff4185a9f2
... ...
@@ -4,7 +4,7 @@ import (
4 4
 	"fmt"
5 5
 	"sync"
6 6
 
7
-	"github.com/Sirupsen/logrus"
7
+	"github.com/sirupsen/logrus"
8 8
 )
9 9
 
10 10
 // Broadcaster sends events to multiple, reliable Sinks. The goal of this
... ...
@@ -160,7 +160,7 @@ func (b *Broadcaster) run() {
160 160
 	}
161 161
 }
162 162
 
163
-func (b Broadcaster) String() string {
163
+func (b *Broadcaster) String() string {
164 164
 	// Serialize copy of this broadcaster without the sync.Once, to avoid
165 165
 	// a data race.
166 166
 
... ...
@@ -50,7 +50,7 @@ func (ch *Channel) Close() error {
50 50
 	return nil
51 51
 }
52 52
 
53
-func (ch Channel) String() string {
53
+func (ch *Channel) String() string {
54 54
 	// Serialize a copy of the Channel that doesn't contain the sync.Once,
55 55
 	// to avoid a data race.
56 56
 	ch2 := map[string]interface{}{
... ...
@@ -4,7 +4,7 @@ import (
4 4
 	"container/list"
5 5
 	"sync"
6 6
 
7
-	"github.com/Sirupsen/logrus"
7
+	"github.com/sirupsen/logrus"
8 8
 )
9 9
 
10 10
 // Queue accepts all messages into a queue for asynchronous consumption
... ...
@@ -31,7 +31,7 @@ func NewQueue(dst Sink) *Queue {
31 31
 }
32 32
 
33 33
 // Write accepts the events into the queue, only failing if the queue has
34
-// beend closed.
34
+// been closed.
35 35
 func (eq *Queue) Write(event Event) error {
36 36
 	eq.mu.Lock()
37 37
 	defer eq.mu.Unlock()
... ...
@@ -7,7 +7,7 @@ import (
7 7
 	"sync/atomic"
8 8
 	"time"
9 9
 
10
-	"github.com/Sirupsen/logrus"
10
+	"github.com/sirupsen/logrus"
11 11
 )
12 12
 
13 13
 // RetryingSink retries the write until success or an ErrSinkClosed is
... ...
@@ -90,7 +90,7 @@ func (rs *RetryingSink) Close() error {
90 90
 	return nil
91 91
 }
92 92
 
93
-func (rs RetryingSink) String() string {
93
+func (rs *RetryingSink) String() string {
94 94
 	// Serialize a copy of the RetryingSink without the sync.Once, to avoid
95 95
 	// a data race.
96 96
 	rs2 := map[string]interface{}{
... ...
@@ -10,7 +10,6 @@ import (
10 10
 	"sort"
11 11
 	"sync"
12 12
 
13
-	"github.com/Sirupsen/logrus"
14 13
 	"github.com/docker/docker/pkg/stringid"
15 14
 	"github.com/docker/go-events"
16 15
 	"github.com/docker/libnetwork/cluster"
... ...
@@ -20,6 +19,7 @@ import (
20 20
 	"github.com/docker/libnetwork/networkdb"
21 21
 	"github.com/docker/libnetwork/types"
22 22
 	"github.com/gogo/protobuf/proto"
23
+	"github.com/sirupsen/logrus"
23 24
 )
24 25
 
25 26
 const (
... ...
@@ -10,9 +10,9 @@ import (
10 10
 	"fmt"
11 11
 	"sync"
12 12
 
13
-	"github.com/Sirupsen/logrus"
14 13
 	"github.com/docker/libnetwork/datastore"
15 14
 	"github.com/docker/libnetwork/types"
15
+	"github.com/sirupsen/logrus"
16 16
 )
17 17
 
18 18
 // block sequence constants
... ...
@@ -4,7 +4,6 @@ import (
4 4
 	"strings"
5 5
 
6 6
 	"github.com/BurntSushi/toml"
7
-	"github.com/Sirupsen/logrus"
8 7
 	"github.com/docker/docker/pkg/discovery"
9 8
 	"github.com/docker/docker/pkg/plugingetter"
10 9
 	"github.com/docker/go-connections/tlsconfig"
... ...
@@ -13,6 +12,7 @@ import (
13 13
 	"github.com/docker/libnetwork/datastore"
14 14
 	"github.com/docker/libnetwork/netlabel"
15 15
 	"github.com/docker/libnetwork/osl"
16
+	"github.com/sirupsen/logrus"
16 17
 )
17 18
 
18 19
 // Config encapsulates configurations of various Libnetwork components
... ...
@@ -52,7 +52,6 @@ import (
52 52
 	"sync"
53 53
 	"time"
54 54
 
55
-	"github.com/Sirupsen/logrus"
56 55
 	"github.com/docker/docker/pkg/discovery"
57 56
 	"github.com/docker/docker/pkg/locker"
58 57
 	"github.com/docker/docker/pkg/plugingetter"
... ...
@@ -69,6 +68,7 @@ import (
69 69
 	"github.com/docker/libnetwork/netlabel"
70 70
 	"github.com/docker/libnetwork/osl"
71 71
 	"github.com/docker/libnetwork/types"
72
+	"github.com/sirupsen/logrus"
72 73
 )
73 74
 
74 75
 // NetworkController provides the interface for controller instance which manages
... ...
@@ -4,9 +4,9 @@ import (
4 4
 	"fmt"
5 5
 	"strings"
6 6
 
7
-	"github.com/Sirupsen/logrus"
8 7
 	"github.com/docker/libnetwork/netlabel"
9 8
 	"github.com/docker/libnetwork/types"
9
+	"github.com/sirupsen/logrus"
10 10
 )
11 11
 
12 12
 const (
... ...
@@ -12,7 +12,6 @@ import (
12 12
 	"sync"
13 13
 	"syscall"
14 14
 
15
-	"github.com/Sirupsen/logrus"
16 15
 	"github.com/docker/libnetwork/datastore"
17 16
 	"github.com/docker/libnetwork/discoverapi"
18 17
 	"github.com/docker/libnetwork/driverapi"
... ...
@@ -24,6 +23,7 @@ import (
24 24
 	"github.com/docker/libnetwork/osl"
25 25
 	"github.com/docker/libnetwork/portmapper"
26 26
 	"github.com/docker/libnetwork/types"
27
+	"github.com/sirupsen/logrus"
27 28
 	"github.com/vishvananda/netlink"
28 29
 )
29 30
 
... ...
@@ -5,11 +5,11 @@ import (
5 5
 	"fmt"
6 6
 	"net"
7 7
 
8
-	"github.com/Sirupsen/logrus"
9 8
 	"github.com/docker/libnetwork/datastore"
10 9
 	"github.com/docker/libnetwork/discoverapi"
11 10
 	"github.com/docker/libnetwork/netlabel"
12 11
 	"github.com/docker/libnetwork/types"
12
+	"github.com/sirupsen/logrus"
13 13
 )
14 14
 
15 15
 const (
... ...
@@ -4,7 +4,7 @@ import (
4 4
 	"fmt"
5 5
 	"net"
6 6
 
7
-	"github.com/Sirupsen/logrus"
7
+	"github.com/sirupsen/logrus"
8 8
 	"github.com/vishvananda/netlink"
9 9
 )
10 10
 
... ...
@@ -4,9 +4,9 @@ import (
4 4
 	"fmt"
5 5
 	"net"
6 6
 
7
-	"github.com/Sirupsen/logrus"
8 7
 	"github.com/docker/libnetwork/iptables"
9 8
 	"github.com/docker/libnetwork/types"
9
+	"github.com/sirupsen/logrus"
10 10
 )
11 11
 
12 12
 type link struct {
... ...
@@ -6,8 +6,8 @@ import (
6 6
 	"fmt"
7 7
 	"net"
8 8
 
9
-	"github.com/Sirupsen/logrus"
10 9
 	"github.com/docker/libnetwork/types"
10
+	"github.com/sirupsen/logrus"
11 11
 )
12 12
 
13 13
 var (
... ...
@@ -7,7 +7,7 @@ import (
7 7
 	"os"
8 8
 	"syscall"
9 9
 
10
-	"github.com/Sirupsen/logrus"
10
+	"github.com/sirupsen/logrus"
11 11
 )
12 12
 
13 13
 // Enumeration type saying which versions of IP protocol to process.
... ...
@@ -3,9 +3,9 @@ package bridge
3 3
 import (
4 4
 	"fmt"
5 5
 
6
-	"github.com/Sirupsen/logrus"
7 6
 	"github.com/docker/docker/pkg/parsers/kernel"
8 7
 	"github.com/docker/libnetwork/netutils"
8
+	"github.com/sirupsen/logrus"
9 9
 	"github.com/vishvananda/netlink"
10 10
 )
11 11
 
... ...
@@ -4,8 +4,8 @@ import (
4 4
 	"fmt"
5 5
 	"io/ioutil"
6 6
 
7
-	"github.com/Sirupsen/logrus"
8 7
 	"github.com/docker/libnetwork/iptables"
8
+	"github.com/sirupsen/logrus"
9 9
 )
10 10
 
11 11
 const (
... ...
@@ -5,8 +5,8 @@ import (
5 5
 	"fmt"
6 6
 	"net"
7 7
 
8
-	"github.com/Sirupsen/logrus"
9 8
 	"github.com/docker/libnetwork/iptables"
9
+	"github.com/sirupsen/logrus"
10 10
 	"github.com/vishvananda/netlink"
11 11
 )
12 12
 
... ...
@@ -7,8 +7,8 @@ import (
7 7
 	"net"
8 8
 	"path/filepath"
9 9
 
10
-	"github.com/Sirupsen/logrus"
11 10
 	"github.com/docker/libnetwork/types"
11
+	"github.com/sirupsen/logrus"
12 12
 	"github.com/vishvananda/netlink"
13 13
 )
14 14
 
... ...
@@ -6,8 +6,8 @@ import (
6 6
 	"net"
7 7
 	"os"
8 8
 
9
-	"github.com/Sirupsen/logrus"
10 9
 	"github.com/docker/libnetwork/types"
10
+	"github.com/sirupsen/logrus"
11 11
 	"github.com/vishvananda/netlink"
12 12
 )
13 13
 
... ...
@@ -4,9 +4,9 @@ import (
4 4
 	"fmt"
5 5
 	"strings"
6 6
 
7
-	"github.com/Sirupsen/logrus"
8 7
 	"github.com/docker/libnetwork/ns"
9 8
 	"github.com/docker/libnetwork/types"
9
+	"github.com/sirupsen/logrus"
10 10
 	"github.com/vishvananda/netlink"
11 11
 )
12 12
 
... ...
@@ -3,12 +3,12 @@ package ipvlan
3 3
 import (
4 4
 	"fmt"
5 5
 
6
-	"github.com/Sirupsen/logrus"
7 6
 	"github.com/docker/libnetwork/driverapi"
8 7
 	"github.com/docker/libnetwork/netlabel"
9 8
 	"github.com/docker/libnetwork/ns"
10 9
 	"github.com/docker/libnetwork/osl"
11 10
 	"github.com/docker/libnetwork/types"
11
+	"github.com/sirupsen/logrus"
12 12
 )
13 13
 
14 14
 // CreateEndpoint assigns the mac, ip and endpoint id for the new container
... ...
@@ -4,12 +4,12 @@ import (
4 4
 	"fmt"
5 5
 	"net"
6 6
 
7
-	"github.com/Sirupsen/logrus"
8 7
 	"github.com/docker/libnetwork/driverapi"
9 8
 	"github.com/docker/libnetwork/netutils"
10 9
 	"github.com/docker/libnetwork/ns"
11 10
 	"github.com/docker/libnetwork/osl"
12 11
 	"github.com/docker/libnetwork/types"
12
+	"github.com/sirupsen/logrus"
13 13
 )
14 14
 
15 15
 type staticRoute struct {
... ...
@@ -3,7 +3,6 @@ package ipvlan
3 3
 import (
4 4
 	"fmt"
5 5
 
6
-	"github.com/Sirupsen/logrus"
7 6
 	"github.com/docker/docker/pkg/parsers/kernel"
8 7
 	"github.com/docker/docker/pkg/stringid"
9 8
 	"github.com/docker/libnetwork/driverapi"
... ...
@@ -12,6 +11,7 @@ import (
12 12
 	"github.com/docker/libnetwork/options"
13 13
 	"github.com/docker/libnetwork/osl"
14 14
 	"github.com/docker/libnetwork/types"
15
+	"github.com/sirupsen/logrus"
15 16
 )
16 17
 
17 18
 // CreateNetwork the network for the specified driver type
... ...
@@ -5,8 +5,8 @@ import (
5 5
 	"strconv"
6 6
 	"strings"
7 7
 
8
-	"github.com/Sirupsen/logrus"
9 8
 	"github.com/docker/libnetwork/ns"
9
+	"github.com/sirupsen/logrus"
10 10
 	"github.com/vishvananda/netlink"
11 11
 )
12 12
 
... ...
@@ -3,9 +3,9 @@ package ipvlan
3 3
 import (
4 4
 	"fmt"
5 5
 
6
-	"github.com/Sirupsen/logrus"
7 6
 	"github.com/docker/libnetwork/osl"
8 7
 	"github.com/docker/libnetwork/types"
8
+	"github.com/sirupsen/logrus"
9 9
 )
10 10
 
11 11
 func (d *driver) network(nid string) *network {
... ...
@@ -5,11 +5,11 @@ import (
5 5
 	"fmt"
6 6
 	"net"
7 7
 
8
-	"github.com/Sirupsen/logrus"
9 8
 	"github.com/docker/libnetwork/datastore"
10 9
 	"github.com/docker/libnetwork/discoverapi"
11 10
 	"github.com/docker/libnetwork/netlabel"
12 11
 	"github.com/docker/libnetwork/types"
12
+	"github.com/sirupsen/logrus"
13 13
 )
14 14
 
15 15
 const (
... ...
@@ -3,13 +3,13 @@ package macvlan
3 3
 import (
4 4
 	"fmt"
5 5
 
6
-	"github.com/Sirupsen/logrus"
7 6
 	"github.com/docker/libnetwork/driverapi"
8 7
 	"github.com/docker/libnetwork/netlabel"
9 8
 	"github.com/docker/libnetwork/netutils"
10 9
 	"github.com/docker/libnetwork/ns"
11 10
 	"github.com/docker/libnetwork/osl"
12 11
 	"github.com/docker/libnetwork/types"
12
+	"github.com/sirupsen/logrus"
13 13
 )
14 14
 
15 15
 // CreateEndpoint assigns the mac, ip and endpoint id for the new container
... ...
@@ -4,11 +4,11 @@ import (
4 4
 	"fmt"
5 5
 	"net"
6 6
 
7
-	"github.com/Sirupsen/logrus"
8 7
 	"github.com/docker/libnetwork/driverapi"
9 8
 	"github.com/docker/libnetwork/netutils"
10 9
 	"github.com/docker/libnetwork/ns"
11 10
 	"github.com/docker/libnetwork/osl"
11
+	"github.com/sirupsen/logrus"
12 12
 )
13 13
 
14 14
 // Join method is invoked when a Sandbox is attached to an endpoint.
... ...
@@ -3,7 +3,6 @@ package macvlan
3 3
 import (
4 4
 	"fmt"
5 5
 
6
-	"github.com/Sirupsen/logrus"
7 6
 	"github.com/docker/docker/pkg/parsers/kernel"
8 7
 	"github.com/docker/docker/pkg/stringid"
9 8
 	"github.com/docker/libnetwork/driverapi"
... ...
@@ -12,6 +11,7 @@ import (
12 12
 	"github.com/docker/libnetwork/options"
13 13
 	"github.com/docker/libnetwork/osl"
14 14
 	"github.com/docker/libnetwork/types"
15
+	"github.com/sirupsen/logrus"
15 16
 )
16 17
 
17 18
 // CreateNetwork the network for the specified driver type
... ...
@@ -5,8 +5,8 @@ import (
5 5
 	"strconv"
6 6
 	"strings"
7 7
 
8
-	"github.com/Sirupsen/logrus"
9 8
 	"github.com/docker/libnetwork/ns"
9
+	"github.com/sirupsen/logrus"
10 10
 	"github.com/vishvananda/netlink"
11 11
 )
12 12
 
... ...
@@ -3,9 +3,9 @@ package macvlan
3 3
 import (
4 4
 	"fmt"
5 5
 
6
-	"github.com/Sirupsen/logrus"
7 6
 	"github.com/docker/libnetwork/osl"
8 7
 	"github.com/docker/libnetwork/types"
8
+	"github.com/sirupsen/logrus"
9 9
 )
10 10
 
11 11
 func (d *driver) network(nid string) *network {
... ...
@@ -5,11 +5,11 @@ import (
5 5
 	"fmt"
6 6
 	"net"
7 7
 
8
-	"github.com/Sirupsen/logrus"
9 8
 	"github.com/docker/libnetwork/datastore"
10 9
 	"github.com/docker/libnetwork/discoverapi"
11 10
 	"github.com/docker/libnetwork/netlabel"
12 11
 	"github.com/docker/libnetwork/types"
12
+	"github.com/sirupsen/logrus"
13 13
 )
14 14
 
15 15
 const (
... ...
@@ -12,10 +12,10 @@ import (
12 12
 
13 13
 	"strconv"
14 14
 
15
-	"github.com/Sirupsen/logrus"
16 15
 	"github.com/docker/libnetwork/iptables"
17 16
 	"github.com/docker/libnetwork/ns"
18 17
 	"github.com/docker/libnetwork/types"
18
+	"github.com/sirupsen/logrus"
19 19
 	"github.com/vishvananda/netlink"
20 20
 )
21 21
 
... ...
@@ -4,8 +4,8 @@ import (
4 4
 	"fmt"
5 5
 	"sync"
6 6
 
7
-	"github.com/Sirupsen/logrus"
8 7
 	"github.com/docker/libnetwork/iptables"
8
+	"github.com/sirupsen/logrus"
9 9
 )
10 10
 
11 11
 const globalChain = "DOCKER-OVERLAY"
... ...
@@ -5,11 +5,11 @@ import (
5 5
 	"net"
6 6
 	"syscall"
7 7
 
8
-	"github.com/Sirupsen/logrus"
9 8
 	"github.com/docker/libnetwork/driverapi"
10 9
 	"github.com/docker/libnetwork/ns"
11 10
 	"github.com/docker/libnetwork/types"
12 11
 	"github.com/gogo/protobuf/proto"
12
+	"github.com/sirupsen/logrus"
13 13
 )
14 14
 
15 15
 // Join method is invoked when a Sandbox is attached to an endpoint.
... ...
@@ -5,7 +5,7 @@ import (
5 5
 	"path"
6 6
 	"strings"
7 7
 
8
-	"github.com/Sirupsen/logrus"
8
+	"github.com/sirupsen/logrus"
9 9
 )
10 10
 
11 11
 var sysctlConf = map[string]string{
... ...
@@ -5,12 +5,12 @@ import (
5 5
 	"fmt"
6 6
 	"net"
7 7
 
8
-	"github.com/Sirupsen/logrus"
9 8
 	"github.com/docker/libnetwork/datastore"
10 9
 	"github.com/docker/libnetwork/driverapi"
11 10
 	"github.com/docker/libnetwork/netutils"
12 11
 	"github.com/docker/libnetwork/ns"
13 12
 	"github.com/docker/libnetwork/types"
13
+	"github.com/sirupsen/logrus"
14 14
 )
15 15
 
16 16
 type endpointTable map[string]*endpoint
... ...
@@ -14,7 +14,6 @@ import (
14 14
 	"syscall"
15 15
 	"time"
16 16
 
17
-	"github.com/Sirupsen/logrus"
18 17
 	"github.com/docker/docker/pkg/reexec"
19 18
 	"github.com/docker/libnetwork/datastore"
20 19
 	"github.com/docker/libnetwork/driverapi"
... ...
@@ -24,6 +23,7 @@ import (
24 24
 	"github.com/docker/libnetwork/osl"
25 25
 	"github.com/docker/libnetwork/resolvconf"
26 26
 	"github.com/docker/libnetwork/types"
27
+	"github.com/sirupsen/logrus"
27 28
 	"github.com/vishvananda/netlink"
28 29
 	"github.com/vishvananda/netlink/nl"
29 30
 	"github.com/vishvananda/netns"
... ...
@@ -6,8 +6,8 @@ import (
6 6
 	"strings"
7 7
 	"time"
8 8
 
9
-	"github.com/Sirupsen/logrus"
10 9
 	"github.com/hashicorp/serf/serf"
10
+	"github.com/sirupsen/logrus"
11 11
 )
12 12
 
13 13
 type ovNotify struct {
... ...
@@ -5,10 +5,10 @@ import (
5 5
 	"strings"
6 6
 	"syscall"
7 7
 
8
-	"github.com/Sirupsen/logrus"
9 8
 	"github.com/docker/libnetwork/netutils"
10 9
 	"github.com/docker/libnetwork/ns"
11 10
 	"github.com/docker/libnetwork/osl"
11
+	"github.com/sirupsen/logrus"
12 12
 	"github.com/vishvananda/netlink"
13 13
 	"github.com/vishvananda/netns"
14 14
 )
... ...
@@ -7,7 +7,6 @@ import (
7 7
 	"net"
8 8
 	"sync"
9 9
 
10
-	"github.com/Sirupsen/logrus"
11 10
 	"github.com/docker/libnetwork/datastore"
12 11
 	"github.com/docker/libnetwork/discoverapi"
13 12
 	"github.com/docker/libnetwork/driverapi"
... ...
@@ -16,6 +15,7 @@ import (
16 16
 	"github.com/docker/libnetwork/osl"
17 17
 	"github.com/docker/libnetwork/types"
18 18
 	"github.com/hashicorp/serf/serf"
19
+	"github.com/sirupsen/logrus"
19 20
 )
20 21
 
21 22
 const (
... ...
@@ -7,13 +7,13 @@ import (
7 7
 	"strings"
8 8
 	"sync"
9 9
 
10
-	"github.com/Sirupsen/logrus"
11 10
 	"github.com/docker/libnetwork/datastore"
12 11
 	"github.com/docker/libnetwork/discoverapi"
13 12
 	"github.com/docker/libnetwork/driverapi"
14 13
 	"github.com/docker/libnetwork/idm"
15 14
 	"github.com/docker/libnetwork/netlabel"
16 15
 	"github.com/docker/libnetwork/types"
16
+	"github.com/sirupsen/logrus"
17 17
 )
18 18
 
19 19
 const (
... ...
@@ -6,7 +6,7 @@ import (
6 6
 	"sync"
7 7
 	"syscall"
8 8
 
9
-	"github.com/Sirupsen/logrus"
9
+	"github.com/sirupsen/logrus"
10 10
 )
11 11
 
12 12
 const ovPeerTable = "overlay_peer_table"
... ...
@@ -5,13 +5,13 @@ import (
5 5
 	"fmt"
6 6
 	"net"
7 7
 
8
-	"github.com/Sirupsen/logrus"
9 8
 	"github.com/docker/docker/pkg/plugins"
10 9
 	"github.com/docker/libnetwork/datastore"
11 10
 	"github.com/docker/libnetwork/discoverapi"
12 11
 	"github.com/docker/libnetwork/driverapi"
13 12
 	"github.com/docker/libnetwork/drivers/remote/api"
14 13
 	"github.com/docker/libnetwork/types"
14
+	"github.com/sirupsen/logrus"
15 15
 )
16 16
 
17 17
 type driver struct {
... ...
@@ -13,7 +13,6 @@ import (
13 13
 	"strings"
14 14
 	"sync"
15 15
 
16
-	"github.com/Sirupsen/logrus"
17 16
 	"github.com/docker/libnetwork/datastore"
18 17
 	"github.com/docker/libnetwork/discoverapi"
19 18
 	"github.com/docker/libnetwork/driverapi"
... ...
@@ -23,6 +22,7 @@ import (
23 23
 	"github.com/docker/libnetwork/options"
24 24
 	"github.com/docker/libnetwork/portmapper"
25 25
 	"github.com/docker/libnetwork/types"
26
+	"github.com/sirupsen/logrus"
26 27
 )
27 28
 
28 29
 const (
... ...
@@ -7,11 +7,11 @@ import (
7 7
 	"fmt"
8 8
 	"net"
9 9
 
10
-	"github.com/Sirupsen/logrus"
11 10
 	"github.com/docker/libnetwork/datastore"
12 11
 	"github.com/docker/libnetwork/discoverapi"
13 12
 	"github.com/docker/libnetwork/netlabel"
14 13
 	"github.com/docker/libnetwork/types"
14
+	"github.com/sirupsen/logrus"
15 15
 )
16 16
 
17 17
 const (
... ...
@@ -10,8 +10,8 @@ import (
10 10
 	"os"
11 11
 	"os/exec"
12 12
 
13
-	"github.com/Sirupsen/logrus"
14 13
 	"github.com/docker/libnetwork/types"
14
+	"github.com/sirupsen/logrus"
15 15
 )
16 16
 
17 17
 var (
... ...
@@ -9,8 +9,8 @@ import (
9 9
 	"net"
10 10
 	"sync"
11 11
 
12
-	"github.com/Sirupsen/logrus"
13 12
 	"github.com/docker/libnetwork/types"
13
+	"github.com/sirupsen/logrus"
14 14
 )
15 15
 
16 16
 const (
... ...
@@ -4,10 +4,10 @@ import (
4 4
 	"fmt"
5 5
 	"net"
6 6
 
7
-	"github.com/Sirupsen/logrus"
8 7
 	"github.com/docker/libnetwork/driverapi"
9 8
 	"github.com/docker/libnetwork/types"
10 9
 	"github.com/gogo/protobuf/proto"
10
+	"github.com/sirupsen/logrus"
11 11
 )
12 12
 
13 13
 // Join method is invoked when a Sandbox is attached to an endpoint.
... ...
@@ -5,11 +5,11 @@ import (
5 5
 	"fmt"
6 6
 	"net"
7 7
 
8
-	"github.com/Sirupsen/logrus"
9 8
 	"github.com/docker/libnetwork/datastore"
10 9
 	"github.com/docker/libnetwork/driverapi"
11 10
 	"github.com/docker/libnetwork/netutils"
12 11
 	"github.com/docker/libnetwork/types"
12
+	"github.com/sirupsen/logrus"
13 13
 )
14 14
 
15 15
 type endpointTable map[string]*endpoint
... ...
@@ -10,7 +10,6 @@ import (
10 10
 	"strings"
11 11
 	"sync"
12 12
 
13
-	"github.com/Sirupsen/logrus"
14 13
 	"github.com/docker/libnetwork/datastore"
15 14
 	"github.com/docker/libnetwork/driverapi"
16 15
 	"github.com/docker/libnetwork/netlabel"
... ...
@@ -18,6 +17,7 @@ import (
18 18
 	"github.com/docker/libnetwork/osl"
19 19
 	"github.com/docker/libnetwork/resolvconf"
20 20
 	"github.com/docker/libnetwork/types"
21
+	"github.com/sirupsen/logrus"
21 22
 )
22 23
 
23 24
 var (
... ...
@@ -6,8 +6,8 @@ import (
6 6
 	"strings"
7 7
 	"time"
8 8
 
9
-	"github.com/Sirupsen/logrus"
10 9
 	"github.com/hashicorp/serf/serf"
10
+	"github.com/sirupsen/logrus"
11 11
 )
12 12
 
13 13
 type ovNotify struct {
... ...
@@ -7,7 +7,6 @@ import (
7 7
 	"net"
8 8
 	"sync"
9 9
 
10
-	"github.com/Sirupsen/logrus"
11 10
 	"github.com/docker/libnetwork/datastore"
12 11
 	"github.com/docker/libnetwork/discoverapi"
13 12
 	"github.com/docker/libnetwork/driverapi"
... ...
@@ -16,6 +15,7 @@ import (
16 16
 	"github.com/docker/libnetwork/osl"
17 17
 	"github.com/docker/libnetwork/types"
18 18
 	"github.com/hashicorp/serf/serf"
19
+	"github.com/sirupsen/logrus"
19 20
 )
20 21
 
21 22
 // XXX OVERLAY_SOLARIS
... ...
@@ -5,7 +5,7 @@ import (
5 5
 	"net"
6 6
 	"sync"
7 7
 
8
-	"github.com/Sirupsen/logrus"
8
+	"github.com/sirupsen/logrus"
9 9
 )
10 10
 
11 11
 const ovPeerTable = "overlay_peer_table"
... ...
@@ -4,10 +4,10 @@ import (
4 4
 	"fmt"
5 5
 	"net"
6 6
 
7
-	"github.com/Sirupsen/logrus"
8 7
 	"github.com/docker/libnetwork/driverapi"
9 8
 	"github.com/docker/libnetwork/types"
10 9
 	"github.com/gogo/protobuf/proto"
10
+	"github.com/sirupsen/logrus"
11 11
 )
12 12
 
13 13
 // Join method is invoked when a Sandbox is attached to an endpoint.
... ...
@@ -6,8 +6,8 @@ import (
6 6
 	"net"
7 7
 
8 8
 	"github.com/Microsoft/hcsshim"
9
-	"github.com/Sirupsen/logrus"
10 9
 	"github.com/docker/libnetwork/driverapi"
10
+	"github.com/sirupsen/logrus"
11 11
 )
12 12
 
13 13
 type endpointTable map[string]*endpoint
... ...
@@ -9,10 +9,10 @@ import (
9 9
 	"sync"
10 10
 
11 11
 	"github.com/Microsoft/hcsshim"
12
-	"github.com/Sirupsen/logrus"
13 12
 	"github.com/docker/libnetwork/driverapi"
14 13
 	"github.com/docker/libnetwork/netlabel"
15 14
 	"github.com/docker/libnetwork/types"
15
+	"github.com/sirupsen/logrus"
16 16
 )
17 17
 
18 18
 var (
... ...
@@ -8,12 +8,12 @@ import (
8 8
 	"sync"
9 9
 
10 10
 	"github.com/Microsoft/hcsshim"
11
-	"github.com/Sirupsen/logrus"
12 11
 	"github.com/docker/libnetwork/datastore"
13 12
 	"github.com/docker/libnetwork/discoverapi"
14 13
 	"github.com/docker/libnetwork/driverapi"
15 14
 	"github.com/docker/libnetwork/netlabel"
16 15
 	"github.com/docker/libnetwork/types"
16
+	"github.com/sirupsen/logrus"
17 17
 )
18 18
 
19 19
 const (
... ...
@@ -6,8 +6,8 @@ import (
6 6
 
7 7
 	"encoding/json"
8 8
 
9
-	"github.com/Sirupsen/logrus"
10 9
 	"github.com/docker/libnetwork/types"
10
+	"github.com/sirupsen/logrus"
11 11
 
12 12
 	"github.com/Microsoft/hcsshim"
13 13
 )
... ...
@@ -20,12 +20,12 @@ import (
20 20
 	"sync"
21 21
 
22 22
 	"github.com/Microsoft/hcsshim"
23
-	"github.com/Sirupsen/logrus"
24 23
 	"github.com/docker/libnetwork/datastore"
25 24
 	"github.com/docker/libnetwork/discoverapi"
26 25
 	"github.com/docker/libnetwork/driverapi"
27 26
 	"github.com/docker/libnetwork/netlabel"
28 27
 	"github.com/docker/libnetwork/types"
28
+	"github.com/sirupsen/logrus"
29 29
 )
30 30
 
31 31
 // networkConfiguration for network specific configuration
... ...
@@ -7,11 +7,11 @@ import (
7 7
 	"fmt"
8 8
 	"net"
9 9
 
10
-	"github.com/Sirupsen/logrus"
11 10
 	"github.com/docker/libnetwork/datastore"
12 11
 	"github.com/docker/libnetwork/discoverapi"
13 12
 	"github.com/docker/libnetwork/netlabel"
14 13
 	"github.com/docker/libnetwork/types"
14
+	"github.com/sirupsen/logrus"
15 15
 )
16 16
 
17 17
 const (
... ...
@@ -8,12 +8,12 @@ import (
8 8
 	"strings"
9 9
 	"sync"
10 10
 
11
-	"github.com/Sirupsen/logrus"
12 11
 	"github.com/docker/libnetwork/datastore"
13 12
 	"github.com/docker/libnetwork/ipamapi"
14 13
 	"github.com/docker/libnetwork/netlabel"
15 14
 	"github.com/docker/libnetwork/options"
16 15
 	"github.com/docker/libnetwork/types"
16
+	"github.com/sirupsen/logrus"
17 17
 )
18 18
 
19 19
 // Endpoint represents a logical connection between a network and a sandbox.
... ...
@@ -1,8 +1,8 @@
1 1
 package libnetwork
2 2
 
3 3
 import (
4
-	"github.com/Sirupsen/logrus"
5 4
 	"github.com/docker/libnetwork/iptables"
5
+	"github.com/sirupsen/logrus"
6 6
 )
7 7
 
8 8
 const userChain = "DOCKER-USER"
... ...
@@ -4,7 +4,7 @@ import (
4 4
 	"net"
5 5
 	"sync"
6 6
 
7
-	"github.com/Sirupsen/logrus"
7
+	"github.com/sirupsen/logrus"
8 8
 
9 9
 	mapset "github.com/deckarep/golang-set"
10 10
 	"github.com/docker/docker/pkg/discovery"
... ...
@@ -6,13 +6,13 @@ import (
6 6
 	"sort"
7 7
 	"sync"
8 8
 
9
-	"github.com/Sirupsen/logrus"
10 9
 	"github.com/docker/libnetwork/bitseq"
11 10
 	"github.com/docker/libnetwork/datastore"
12 11
 	"github.com/docker/libnetwork/discoverapi"
13 12
 	"github.com/docker/libnetwork/ipamapi"
14 13
 	"github.com/docker/libnetwork/ipamutils"
15 14
 	"github.com/docker/libnetwork/types"
15
+	"github.com/sirupsen/logrus"
16 16
 )
17 17
 
18 18
 const (
... ...
@@ -3,9 +3,9 @@ package ipam
3 3
 import (
4 4
 	"encoding/json"
5 5
 
6
-	"github.com/Sirupsen/logrus"
7 6
 	"github.com/docker/libnetwork/datastore"
8 7
 	"github.com/docker/libnetwork/types"
8
+	"github.com/sirupsen/logrus"
9 9
 )
10 10
 
11 11
 // Key provides the Key to be used in KV Store
... ...
@@ -4,12 +4,12 @@ import (
4 4
 	"fmt"
5 5
 	"net"
6 6
 
7
-	"github.com/Sirupsen/logrus"
8 7
 	"github.com/docker/docker/pkg/plugins"
9 8
 	"github.com/docker/libnetwork/discoverapi"
10 9
 	"github.com/docker/libnetwork/ipamapi"
11 10
 	"github.com/docker/libnetwork/ipams/remote/api"
12 11
 	"github.com/docker/libnetwork/types"
12
+	"github.com/sirupsen/logrus"
13 13
 )
14 14
 
15 15
 type allocator struct {
... ...
@@ -3,11 +3,11 @@ package windowsipam
3 3
 import (
4 4
 	"net"
5 5
 
6
-	"github.com/Sirupsen/logrus"
7 6
 	"github.com/docker/libnetwork/discoverapi"
8 7
 	"github.com/docker/libnetwork/ipamapi"
9 8
 	"github.com/docker/libnetwork/netlabel"
10 9
 	"github.com/docker/libnetwork/types"
10
+	"github.com/sirupsen/logrus"
11 11
 )
12 12
 
13 13
 const (
... ...
@@ -5,7 +5,7 @@ import (
5 5
 	"net"
6 6
 	"syscall"
7 7
 
8
-	"github.com/Sirupsen/logrus"
8
+	"github.com/sirupsen/logrus"
9 9
 	"github.com/vishvananda/netlink"
10 10
 )
11 11
 
... ...
@@ -4,8 +4,8 @@ import (
4 4
 	"fmt"
5 5
 	"strings"
6 6
 
7
-	"github.com/Sirupsen/logrus"
8 7
 	"github.com/godbus/dbus"
8
+	"github.com/sirupsen/logrus"
9 9
 )
10 10
 
11 11
 // IPV defines the table string
... ...
@@ -10,7 +10,7 @@ import (
10 10
 	"strings"
11 11
 	"sync"
12 12
 
13
-	"github.com/Sirupsen/logrus"
13
+	"github.com/sirupsen/logrus"
14 14
 )
15 15
 
16 16
 // Action signifies the iptable action.
... ...
@@ -14,7 +14,7 @@ import (
14 14
 	"syscall"
15 15
 	"unsafe"
16 16
 
17
-	"github.com/Sirupsen/logrus"
17
+	"github.com/sirupsen/logrus"
18 18
 	"github.com/vishvananda/netlink/nl"
19 19
 	"github.com/vishvananda/netns"
20 20
 )
... ...
@@ -8,7 +8,6 @@ import (
8 8
 	"sync"
9 9
 	"time"
10 10
 
11
-	"github.com/Sirupsen/logrus"
12 11
 	"github.com/docker/docker/pkg/stringid"
13 12
 	"github.com/docker/libnetwork/common"
14 13
 	"github.com/docker/libnetwork/config"
... ...
@@ -21,6 +20,7 @@ import (
21 21
 	"github.com/docker/libnetwork/networkdb"
22 22
 	"github.com/docker/libnetwork/options"
23 23
 	"github.com/docker/libnetwork/types"
24
+	"github.com/sirupsen/logrus"
24 25
 )
25 26
 
26 27
 // A Network represents a logical connectivity zone that containers may
... ...
@@ -7,10 +7,10 @@ import (
7 7
 	"time"
8 8
 
9 9
 	"github.com/Microsoft/hcsshim"
10
-	"github.com/Sirupsen/logrus"
11 10
 	"github.com/docker/libnetwork/drivers/windows"
12 11
 	"github.com/docker/libnetwork/ipamapi"
13 12
 	"github.com/docker/libnetwork/ipams/windowsipam"
13
+	"github.com/sirupsen/logrus"
14 14
 )
15 15
 
16 16
 func executeInCompartment(compartmentID uint32, x func()) {
... ...
@@ -12,8 +12,8 @@ import (
12 12
 	"strings"
13 13
 	"time"
14 14
 
15
-	"github.com/Sirupsen/logrus"
16 15
 	"github.com/hashicorp/memberlist"
16
+	"github.com/sirupsen/logrus"
17 17
 )
18 18
 
19 19
 const (
... ...
@@ -5,8 +5,8 @@ import (
5 5
 	"net"
6 6
 	"strings"
7 7
 
8
-	"github.com/Sirupsen/logrus"
9 8
 	"github.com/gogo/protobuf/proto"
9
+	"github.com/sirupsen/logrus"
10 10
 )
11 11
 
12 12
 type delegate struct {
... ...
@@ -4,8 +4,8 @@ import (
4 4
 	"encoding/json"
5 5
 	"net"
6 6
 
7
-	"github.com/Sirupsen/logrus"
8 7
 	"github.com/hashicorp/memberlist"
8
+	"github.com/sirupsen/logrus"
9 9
 )
10 10
 
11 11
 type eventDelegate struct {
... ...
@@ -10,12 +10,12 @@ import (
10 10
 	"sync"
11 11
 	"time"
12 12
 
13
-	"github.com/Sirupsen/logrus"
14 13
 	"github.com/armon/go-radix"
15 14
 	"github.com/docker/go-events"
16 15
 	"github.com/docker/libnetwork/types"
17 16
 	"github.com/hashicorp/memberlist"
18 17
 	"github.com/hashicorp/serf/serf"
18
+	"github.com/sirupsen/logrus"
19 19
 )
20 20
 
21 21
 const (
... ...
@@ -9,7 +9,7 @@ import (
9 9
 	"syscall"
10 10
 	"time"
11 11
 
12
-	"github.com/Sirupsen/logrus"
12
+	"github.com/sirupsen/logrus"
13 13
 	"github.com/vishvananda/netlink"
14 14
 	"github.com/vishvananda/netns"
15 15
 )
... ...
@@ -8,9 +8,9 @@ import (
8 8
 	"syscall"
9 9
 	"time"
10 10
 
11
-	"github.com/Sirupsen/logrus"
12 11
 	"github.com/docker/libnetwork/ns"
13 12
 	"github.com/docker/libnetwork/types"
13
+	"github.com/sirupsen/logrus"
14 14
 	"github.com/vishvananda/netlink"
15 15
 	"github.com/vishvananda/netns"
16 16
 )
... ...
@@ -14,10 +14,10 @@ import (
14 14
 	"syscall"
15 15
 	"time"
16 16
 
17
-	"github.com/Sirupsen/logrus"
18 17
 	"github.com/docker/docker/pkg/reexec"
19 18
 	"github.com/docker/libnetwork/ns"
20 19
 	"github.com/docker/libnetwork/types"
20
+	"github.com/sirupsen/logrus"
21 21
 	"github.com/vishvananda/netlink"
22 22
 	"github.com/vishvananda/netns"
23 23
 )
... ...
@@ -5,7 +5,7 @@ import (
5 5
 	"fmt"
6 6
 	"net"
7 7
 
8
-	"github.com/Sirupsen/logrus"
8
+	"github.com/sirupsen/logrus"
9 9
 	"github.com/vishvananda/netlink"
10 10
 )
11 11
 
... ...
@@ -6,9 +6,9 @@ import (
6 6
 	"net"
7 7
 	"sync"
8 8
 
9
-	"github.com/Sirupsen/logrus"
10 9
 	"github.com/docker/libnetwork/iptables"
11 10
 	"github.com/docker/libnetwork/portallocator"
11
+	"github.com/sirupsen/logrus"
12 12
 )
13 13
 
14 14
 type mapping struct {
... ...
@@ -8,10 +8,10 @@ import (
8 8
 	"strings"
9 9
 	"sync"
10 10
 
11
-	"github.com/Sirupsen/logrus"
12 11
 	"github.com/docker/docker/pkg/ioutils"
13 12
 	"github.com/docker/libnetwork/resolvconf/dns"
14 13
 	"github.com/docker/libnetwork/types"
14
+	"github.com/sirupsen/logrus"
15 15
 )
16 16
 
17 17
 var (
... ...
@@ -8,9 +8,9 @@ import (
8 8
 	"sync"
9 9
 	"time"
10 10
 
11
-	"github.com/Sirupsen/logrus"
12 11
 	"github.com/docker/libnetwork/types"
13 12
 	"github.com/miekg/dns"
13
+	"github.com/sirupsen/logrus"
14 14
 )
15 15
 
16 16
 // Resolver represents the embedded DNS server in Docker. It operates
... ...
@@ -9,9 +9,9 @@ import (
9 9
 	"os/exec"
10 10
 	"runtime"
11 11
 
12
-	"github.com/Sirupsen/logrus"
13 12
 	"github.com/docker/docker/pkg/reexec"
14 13
 	"github.com/docker/libnetwork/iptables"
14
+	"github.com/sirupsen/logrus"
15 15
 	"github.com/vishvananda/netns"
16 16
 )
17 17
 
... ...
@@ -9,11 +9,11 @@ import (
9 9
 	"sync"
10 10
 	"time"
11 11
 
12
-	"github.com/Sirupsen/logrus"
13 12
 	"github.com/docker/libnetwork/etchosts"
14 13
 	"github.com/docker/libnetwork/netlabel"
15 14
 	"github.com/docker/libnetwork/osl"
16 15
 	"github.com/docker/libnetwork/types"
16
+	"github.com/sirupsen/logrus"
17 17
 )
18 18
 
19 19
 // Sandbox provides the control over the network container entity. It is a one to one mapping with the container.
... ...
@@ -11,11 +11,11 @@ import (
11 11
 	"strconv"
12 12
 	"strings"
13 13
 
14
-	"github.com/Sirupsen/logrus"
15 14
 	"github.com/docker/libnetwork/etchosts"
16 15
 	"github.com/docker/libnetwork/resolvconf"
17 16
 	"github.com/docker/libnetwork/resolvconf/dns"
18 17
 	"github.com/docker/libnetwork/types"
18
+	"github.com/sirupsen/logrus"
19 19
 )
20 20
 
21 21
 const (
... ...
@@ -10,9 +10,9 @@ import (
10 10
 	"net"
11 11
 	"os"
12 12
 
13
-	"github.com/Sirupsen/logrus"
14 13
 	"github.com/docker/libnetwork/types"
15 14
 	"github.com/opencontainers/runc/libcontainer/configs"
15
+	"github.com/sirupsen/logrus"
16 16
 )
17 17
 
18 18
 const udsBase = "/run/docker/libnetwork/"
... ...
@@ -5,9 +5,9 @@ import (
5 5
 	"encoding/json"
6 6
 	"sync"
7 7
 
8
-	"github.com/Sirupsen/logrus"
9 8
 	"github.com/docker/libnetwork/datastore"
10 9
 	"github.com/docker/libnetwork/osl"
10
+	"github.com/sirupsen/logrus"
11 11
 )
12 12
 
13 13
 const (
... ...
@@ -5,8 +5,8 @@ package libnetwork
5 5
 import (
6 6
 	"net"
7 7
 
8
-	"github.com/Sirupsen/logrus"
9 8
 	"github.com/docker/libnetwork/common"
9
+	"github.com/sirupsen/logrus"
10 10
 )
11 11
 
12 12
 func (c *controller) addEndpointNameResolution(svcName, svcID, nID, eID, containerName string, vip net.IP, serviceAliases, taskAliases []string, ip net.IP, addService bool, method string) error {
... ...
@@ -14,12 +14,12 @@ import (
14 14
 	"sync"
15 15
 	"syscall"
16 16
 
17
-	"github.com/Sirupsen/logrus"
18 17
 	"github.com/docker/docker/pkg/reexec"
19 18
 	"github.com/docker/libnetwork/iptables"
20 19
 	"github.com/docker/libnetwork/ipvs"
21 20
 	"github.com/docker/libnetwork/ns"
22 21
 	"github.com/gogo/protobuf/proto"
22
+	"github.com/sirupsen/logrus"
23 23
 	"github.com/vishvananda/netlink/nl"
24 24
 	"github.com/vishvananda/netns"
25 25
 )
... ...
@@ -4,12 +4,12 @@ import (
4 4
 	"fmt"
5 5
 	"strings"
6 6
 
7
-	"github.com/Sirupsen/logrus"
8 7
 	"github.com/docker/libkv/store/boltdb"
9 8
 	"github.com/docker/libkv/store/consul"
10 9
 	"github.com/docker/libkv/store/etcd"
11 10
 	"github.com/docker/libkv/store/zookeeper"
12 11
 	"github.com/docker/libnetwork/datastore"
12
+	"github.com/sirupsen/logrus"
13 13
 )
14 14
 
15 15
 func registerKVStores() {
... ...
@@ -4,12 +4,12 @@ import (
4 4
 	"fmt"
5 5
 	"time"
6 6
 
7
-	"github.com/Sirupsen/logrus"
8 7
 	"github.com/docker/swarmkit/api"
9 8
 	"github.com/docker/swarmkit/api/equality"
10 9
 	"github.com/docker/swarmkit/log"
11 10
 	"github.com/docker/swarmkit/protobuf/ptypes"
12 11
 	"github.com/pkg/errors"
12
+	"github.com/sirupsen/logrus"
13 13
 	"golang.org/x/net/context"
14 14
 )
15 15
 
... ...
@@ -5,10 +5,10 @@ import (
5 5
 	"sync"
6 6
 	"time"
7 7
 
8
-	"github.com/Sirupsen/logrus"
9 8
 	"github.com/docker/swarmkit/api"
10 9
 	"github.com/docker/swarmkit/connectionbroker"
11 10
 	"github.com/docker/swarmkit/log"
11
+	"github.com/sirupsen/logrus"
12 12
 	"golang.org/x/net/context"
13 13
 	"google.golang.org/grpc"
14 14
 	"google.golang.org/grpc/codes"
... ...
@@ -3,12 +3,12 @@ package agent
3 3
 import (
4 4
 	"sync"
5 5
 
6
-	"github.com/Sirupsen/logrus"
7 6
 	"github.com/boltdb/bolt"
8 7
 	"github.com/docker/swarmkit/agent/exec"
9 8
 	"github.com/docker/swarmkit/api"
10 9
 	"github.com/docker/swarmkit/log"
11 10
 	"github.com/docker/swarmkit/watch"
11
+	"github.com/sirupsen/logrus"
12 12
 	"golang.org/x/net/context"
13 13
 )
14 14
 
... ...
@@ -5,7 +5,7 @@ import (
5 5
 	"crypto/x509/pkix"
6 6
 	"strings"
7 7
 
8
-	"github.com/Sirupsen/logrus"
8
+	"github.com/sirupsen/logrus"
9 9
 
10 10
 	"github.com/docker/swarmkit/api"
11 11
 	"github.com/docker/swarmkit/log"
... ...
@@ -12,7 +12,6 @@ import (
12 12
 	"sync"
13 13
 	"time"
14 14
 
15
-	"github.com/Sirupsen/logrus"
16 15
 	cfconfig "github.com/cloudflare/cfssl/config"
17 16
 	events "github.com/docker/go-events"
18 17
 	"github.com/docker/swarmkit/api"
... ...
@@ -22,6 +21,7 @@ import (
22 22
 	"github.com/docker/swarmkit/watch"
23 23
 	"github.com/opencontainers/go-digest"
24 24
 	"github.com/pkg/errors"
25
+	"github.com/sirupsen/logrus"
25 26
 	"google.golang.org/grpc/credentials"
26 27
 
27 28
 	"golang.org/x/net/context"
... ...
@@ -14,13 +14,13 @@ import (
14 14
 	"sync"
15 15
 	"time"
16 16
 
17
-	"github.com/Sirupsen/logrus"
18 17
 	"github.com/cloudflare/cfssl/api"
19 18
 	"github.com/cloudflare/cfssl/config"
20 19
 	"github.com/cloudflare/cfssl/csr"
21 20
 	"github.com/cloudflare/cfssl/signer"
22 21
 	"github.com/docker/swarmkit/log"
23 22
 	"github.com/pkg/errors"
23
+	"github.com/sirupsen/logrus"
24 24
 	"golang.org/x/net/context"
25 25
 	"golang.org/x/net/context/ctxhttp"
26 26
 )
... ...
@@ -4,11 +4,11 @@ import (
4 4
 	"sync"
5 5
 	"time"
6 6
 
7
-	"github.com/Sirupsen/logrus"
8 7
 	"github.com/docker/go-events"
9 8
 	"github.com/docker/swarmkit/connectionbroker"
10 9
 	"github.com/docker/swarmkit/log"
11 10
 	"github.com/pkg/errors"
11
+	"github.com/sirupsen/logrus"
12 12
 	"golang.org/x/net/context"
13 13
 )
14 14
 
... ...
@@ -7,7 +7,6 @@ import (
7 7
 	"sync"
8 8
 	"time"
9 9
 
10
-	"github.com/Sirupsen/logrus"
11 10
 	"github.com/docker/swarmkit/api"
12 11
 	"github.com/docker/swarmkit/api/equality"
13 12
 	"github.com/docker/swarmkit/identity"
... ...
@@ -15,6 +14,7 @@ import (
15 15
 	"github.com/docker/swarmkit/manager/state/store"
16 16
 	gogotypes "github.com/gogo/protobuf/types"
17 17
 	"github.com/pkg/errors"
18
+	"github.com/sirupsen/logrus"
18 19
 	"golang.org/x/net/context"
19 20
 	"google.golang.org/grpc"
20 21
 	"google.golang.org/grpc/codes"
... ...
@@ -3,7 +3,7 @@ package log
3 3
 import (
4 4
 	"path"
5 5
 
6
-	"github.com/Sirupsen/logrus"
6
+	"github.com/sirupsen/logrus"
7 7
 	"golang.org/x/net/context"
8 8
 )
9 9
 
... ...
@@ -4,11 +4,11 @@ import (
4 4
 	"bytes"
5 5
 	"strings"
6 6
 
7
-	"github.com/Sirupsen/logrus"
8 7
 	"github.com/docker/swarmkit/api"
9 8
 	"github.com/docker/swarmkit/identity"
10 9
 	"github.com/docker/swarmkit/log"
11 10
 	"github.com/docker/swarmkit/manager/state/store"
11
+	"github.com/sirupsen/logrus"
12 12
 	"golang.org/x/net/context"
13 13
 	"google.golang.org/grpc"
14 14
 	"google.golang.org/grpc/codes"
... ...
@@ -4,12 +4,12 @@ import (
4 4
 	"crypto/subtle"
5 5
 	"strings"
6 6
 
7
-	"github.com/Sirupsen/logrus"
8 7
 	"github.com/docker/swarmkit/api"
9 8
 	"github.com/docker/swarmkit/api/validation"
10 9
 	"github.com/docker/swarmkit/identity"
11 10
 	"github.com/docker/swarmkit/log"
12 11
 	"github.com/docker/swarmkit/manager/state/store"
12
+	"github.com/sirupsen/logrus"
13 13
 	"golang.org/x/net/context"
14 14
 	"google.golang.org/grpc"
15 15
 	"google.golang.org/grpc/codes"
... ...
@@ -3,12 +3,12 @@ package dispatcher
3 3
 import (
4 4
 	"fmt"
5 5
 
6
-	"github.com/Sirupsen/logrus"
7 6
 	"github.com/docker/swarmkit/api"
8 7
 	"github.com/docker/swarmkit/api/equality"
9 8
 	"github.com/docker/swarmkit/api/validation"
10 9
 	"github.com/docker/swarmkit/manager/drivers"
11 10
 	"github.com/docker/swarmkit/manager/state/store"
11
+	"github.com/sirupsen/logrus"
12 12
 )
13 13
 
14 14
 // Used as a key in tasksUsingDependency and changes. Only using the
... ...
@@ -11,7 +11,6 @@ import (
11 11
 	"google.golang.org/grpc/codes"
12 12
 	"google.golang.org/grpc/transport"
13 13
 
14
-	"github.com/Sirupsen/logrus"
15 14
 	"github.com/docker/go-events"
16 15
 	"github.com/docker/swarmkit/api"
17 16
 	"github.com/docker/swarmkit/api/equality"
... ...
@@ -23,6 +22,7 @@ import (
23 23
 	"github.com/docker/swarmkit/watch"
24 24
 	gogotypes "github.com/gogo/protobuf/types"
25 25
 	"github.com/pkg/errors"
26
+	"github.com/sirupsen/logrus"
26 27
 	"golang.org/x/net/context"
27 28
 )
28 29
 
... ...
@@ -9,7 +9,6 @@ import (
9 9
 	"google.golang.org/grpc"
10 10
 	"google.golang.org/grpc/codes"
11 11
 
12
-	"github.com/Sirupsen/logrus"
13 12
 	"github.com/docker/go-events"
14 13
 	"github.com/docker/swarmkit/api"
15 14
 	"github.com/docker/swarmkit/ca"
... ...
@@ -17,6 +16,7 @@ import (
17 17
 	"github.com/docker/swarmkit/log"
18 18
 	"github.com/docker/swarmkit/manager/state/store"
19 19
 	"github.com/docker/swarmkit/watch"
20
+	"github.com/sirupsen/logrus"
20 21
 	"golang.org/x/net/context"
21 22
 )
22 23
 
... ...
@@ -13,7 +13,6 @@ import (
13 13
 	"syscall"
14 14
 	"time"
15 15
 
16
-	"github.com/Sirupsen/logrus"
17 16
 	"github.com/cloudflare/cfssl/helpers"
18 17
 	"github.com/docker/docker/pkg/plugingetter"
19 18
 	"github.com/docker/go-events"
... ...
@@ -45,6 +44,7 @@ import (
45 45
 	gogotypes "github.com/gogo/protobuf/types"
46 46
 	grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
47 47
 	"github.com/pkg/errors"
48
+	"github.com/sirupsen/logrus"
48 49
 	"golang.org/x/net/context"
49 50
 	"google.golang.org/grpc"
50 51
 	"google.golang.org/grpc/credentials"
... ...
@@ -9,7 +9,6 @@ import (
9 9
 	"sync/atomic"
10 10
 	"time"
11 11
 
12
-	"github.com/Sirupsen/logrus"
13 12
 	"github.com/coreos/etcd/pkg/idutil"
14 13
 	"github.com/coreos/etcd/raft"
15 14
 	"github.com/coreos/etcd/raft/raftpb"
... ...
@@ -28,6 +27,7 @@ import (
28 28
 	"github.com/gogo/protobuf/proto"
29 29
 	"github.com/pivotal-golang/clock"
30 30
 	"github.com/pkg/errors"
31
+	"github.com/sirupsen/logrus"
31 32
 	"golang.org/x/net/context"
32 33
 	"golang.org/x/time/rate"
33 34
 	"google.golang.org/grpc"
... ...
@@ -14,7 +14,6 @@ import (
14 14
 	"sync"
15 15
 	"time"
16 16
 
17
-	"github.com/Sirupsen/logrus"
18 17
 	"github.com/boltdb/bolt"
19 18
 	"github.com/docker/docker/pkg/plugingetter"
20 19
 	metrics "github.com/docker/go-metrics"
... ...
@@ -31,6 +30,7 @@ import (
31 31
 	"github.com/docker/swarmkit/xnet"
32 32
 	grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
33 33
 	"github.com/pkg/errors"
34
+	"github.com/sirupsen/logrus"
34 35
 	"golang.org/x/net/context"
35 36
 	"google.golang.org/grpc"
36 37
 	"google.golang.org/grpc/codes"
... ...
@@ -5,8 +5,8 @@ import (
5 5
 	"fmt"
6 6
 	"sync"
7 7
 
8
-	"github.com/Sirupsen/logrus"
9 8
 	"github.com/docker/go-events"
9
+	"github.com/sirupsen/logrus"
10 10
 )
11 11
 
12 12
 // ErrQueueFull is returned by a Write operation when that Write causes the
... ...
@@ -11,7 +11,7 @@ import (
11 11
 	"strings"
12 12
 
13 13
 	"github.com/Microsoft/hcsshim"
14
-	"github.com/Sirupsen/logrus"
14
+	"github.com/sirupsen/logrus"
15 15
 )
16 16
 
17 17
 // Mode is the operational mode, both requested, and actual after verification
... ...
@@ -6,7 +6,7 @@ import (
6 6
 	"fmt"
7 7
 	"os"
8 8
 
9
-	"github.com/Sirupsen/logrus"
9
+	"github.com/sirupsen/logrus"
10 10
 )
11 11
 
12 12
 // CreateSandbox does what it says on the tin. This is done by copying a prebuilt-sandbox from the ServiceVM.
... ...
@@ -6,7 +6,7 @@ import (
6 6
 	"fmt"
7 7
 
8 8
 	"github.com/Microsoft/hcsshim"
9
-	"github.com/Sirupsen/logrus"
9
+	"github.com/sirupsen/logrus"
10 10
 )
11 11
 
12 12
 // HotAddVhd hot-adds a VHD to a utility VM. This is used in the global one-utility-VM-
... ...
@@ -6,7 +6,7 @@ import (
6 6
 	"fmt"
7 7
 
8 8
 	"github.com/Microsoft/hcsshim"
9
-	"github.com/Sirupsen/logrus"
9
+	"github.com/sirupsen/logrus"
10 10
 )
11 11
 
12 12
 // HotRemoveVhd hot-removes a VHD from a utility VM. This is used in the global one-utility-VM-
... ...
@@ -7,7 +7,7 @@ import (
7 7
 	"io"
8 8
 
9 9
 	"github.com/Microsoft/hcsshim"
10
-	"github.com/Sirupsen/logrus"
10
+	"github.com/sirupsen/logrus"
11 11
 )
12 12
 
13 13
 // Process is the structure pertaining to a process running in a utility VM.
... ...
@@ -6,7 +6,7 @@ import (
6 6
 	"fmt"
7 7
 	"io"
8 8
 
9
-	"github.com/Sirupsen/logrus"
9
+	"github.com/sirupsen/logrus"
10 10
 )
11 11
 
12 12
 // TarToVhd streams a tarstream contained in an io.Reader to a fixed vhd file
... ...
@@ -10,7 +10,7 @@ import (
10 10
 	"time"
11 11
 	"unsafe"
12 12
 
13
-	"github.com/Sirupsen/logrus"
13
+	"github.com/sirupsen/logrus"
14 14
 )
15 15
 
16 16
 var (
... ...
@@ -7,7 +7,7 @@ import (
7 7
 	"io"
8 8
 	"os"
9 9
 
10
-	"github.com/Sirupsen/logrus"
10
+	"github.com/sirupsen/logrus"
11 11
 )
12 12
 
13 13
 // VhdToTar does what is says - it exports a VHD in a specified
... ...
@@ -5,7 +5,7 @@ import (
5 5
 
6 6
 	"google.golang.org/grpc"
7 7
 
8
-	"github.com/Sirupsen/logrus"
8
+	"github.com/sirupsen/logrus"
9 9
 	"github.com/tonistiigi/fsutil"
10 10
 )
11 11
 
... ...
@@ -3,10 +3,10 @@ package filesync
3 3
 import (
4 4
 	"io"
5 5
 
6
-	"github.com/Sirupsen/logrus"
7 6
 	"github.com/docker/docker/pkg/archive"
8 7
 	"github.com/docker/docker/pkg/chrootarchive"
9 8
 	"github.com/pkg/errors"
9
+	"github.com/sirupsen/logrus"
10 10
 	"google.golang.org/grpc"
11 11
 )
12 12
 
... ...
@@ -4,8 +4,8 @@ import (
4 4
 	"net"
5 5
 	"time"
6 6
 
7
-	"github.com/Sirupsen/logrus"
8 7
 	"github.com/pkg/errors"
8
+	"github.com/sirupsen/logrus"
9 9
 	"golang.org/x/net/context"
10 10
 	"golang.org/x/net/http2"
11 11
 	"google.golang.org/grpc"
... ...
@@ -7,8 +7,8 @@ import (
7 7
 	"os/exec"
8 8
 	"time"
9 9
 
10
-	"github.com/Sirupsen/logrus"
11 10
 	"github.com/opencontainers/runtime-spec/specs-go"
11
+	"github.com/sirupsen/logrus"
12 12
 )
13 13
 
14 14
 type Rlimit struct {