Browse Source

Revendor engine-api @ ddfd776c

Signed-off-by: John Howard <jhoward@microsoft.com>
John Howard 9 years ago
parent
commit
dfdce6e35c

+ 1 - 1
hack/vendor.sh

@@ -24,7 +24,7 @@ clone git golang.org/x/net 47990a1ba55743e6ef1affd3a14e5bac8553615d https://gith
 clone git golang.org/x/sys eb2c74142fd19a79b3f237334c7384d5167b1b46 https://github.com/golang/sys.git
 clone git golang.org/x/sys eb2c74142fd19a79b3f237334c7384d5167b1b46 https://github.com/golang/sys.git
 clone git github.com/docker/go-units 651fc226e7441360384da338d0fd37f2440ffbe3
 clone git github.com/docker/go-units 651fc226e7441360384da338d0fd37f2440ffbe3
 clone git github.com/docker/go-connections v0.1.3
 clone git github.com/docker/go-connections v0.1.3
-clone git github.com/docker/engine-api 9a940e4ead265e18d4feb9e3c515428966a08278
+clone git github.com/docker/engine-api ddfd776c787a013c39d4eb3fa9c44006347e207a
 clone git github.com/RackSec/srslog 6eb773f331e46fbba8eecb8e794e635e75fc04de
 clone git github.com/RackSec/srslog 6eb773f331e46fbba8eecb8e794e635e75fc04de
 clone git github.com/imdario/mergo 0.2.1
 clone git github.com/imdario/mergo 0.2.1
 
 

+ 0 - 0
vendor/src/github.com/docker/engine-api/client/copy.go → vendor/src/github.com/docker/engine-api/client/container_copy.go


+ 0 - 0
vendor/src/github.com/docker/engine-api/client/diff.go → vendor/src/github.com/docker/engine-api/client/container_diff.go


+ 0 - 0
vendor/src/github.com/docker/engine-api/client/exec.go → vendor/src/github.com/docker/engine-api/client/container_exec.go


+ 0 - 0
vendor/src/github.com/docker/engine-api/client/export.go → vendor/src/github.com/docker/engine-api/client/container_export.go


+ 0 - 0
vendor/src/github.com/docker/engine-api/client/kill.go → vendor/src/github.com/docker/engine-api/client/container_kill.go


+ 0 - 0
vendor/src/github.com/docker/engine-api/client/logs.go → vendor/src/github.com/docker/engine-api/client/container_logs.go


+ 0 - 0
vendor/src/github.com/docker/engine-api/client/pause.go → vendor/src/github.com/docker/engine-api/client/container_pause.go


+ 0 - 0
vendor/src/github.com/docker/engine-api/client/resize.go → vendor/src/github.com/docker/engine-api/client/container_resize.go


+ 0 - 0
vendor/src/github.com/docker/engine-api/client/wait.go → vendor/src/github.com/docker/engine-api/client/container_wait.go


+ 2 - 2
vendor/src/github.com/docker/engine-api/client/image_build.go

@@ -74,8 +74,8 @@ func imageBuildOptionsToQuery(options types.ImageBuildOptions) (url.Values, erro
 		query.Set("pull", "1")
 		query.Set("pull", "1")
 	}
 	}
 
 
-	if !container.IsolationLevel.IsDefault(options.IsolationLevel) {
-		query.Set("isolation", string(options.IsolationLevel))
+	if !container.Isolation.IsDefault(options.Isolation) {
+		query.Set("isolation", string(options.Isolation))
 	}
 	}
 
 
 	query.Set("cpusetcpus", options.CPUSetCPUs)
 	query.Set("cpusetcpus", options.CPUSetCPUs)

+ 0 - 0
vendor/src/github.com/docker/engine-api/client/history.go → vendor/src/github.com/docker/engine-api/client/image_history.go


+ 11 - 0
vendor/src/github.com/docker/engine-api/client/transport/client_mock.go

@@ -3,7 +3,9 @@
 package transport
 package transport
 
 
 import (
 import (
+	"bytes"
 	"crypto/tls"
 	"crypto/tls"
+	"io/ioutil"
 	"net/http"
 	"net/http"
 )
 )
 
 
@@ -24,3 +26,12 @@ func NewMockClient(tlsConfig *tls.Config, doer func(*http.Request) (*http.Respon
 func (m mockClient) Do(req *http.Request) (*http.Response, error) {
 func (m mockClient) Do(req *http.Request) (*http.Response, error) {
 	return m.do(req)
 	return m.do(req)
 }
 }
+
+func ErrorMock(statusCode int, message string) func(req *http.Request) (*http.Response, error) {
+	return func(req *http.Request) (*http.Response, error) {
+		return &http.Response{
+			StatusCode: statusCode,
+			Body:       ioutil.NopCloser(bytes.NewReader([]byte(message))),
+		}, nil
+	}
+}

+ 1 - 1
vendor/src/github.com/docker/engine-api/types/client.go

@@ -127,7 +127,7 @@ type ImageBuildOptions struct {
 	Remove         bool
 	Remove         bool
 	ForceRemove    bool
 	ForceRemove    bool
 	PullParent     bool
 	PullParent     bool
-	IsolationLevel container.IsolationLevel
+	Isolation      container.Isolation
 	CPUSetCPUs     string
 	CPUSetCPUs     string
 	CPUSetMems     string
 	CPUSetMems     string
 	CPUShares      int64
 	CPUShares      int64

+ 6 - 6
vendor/src/github.com/docker/engine-api/types/container/host_config.go

@@ -12,13 +12,13 @@ import (
 // NetworkMode represents the container network stack.
 // NetworkMode represents the container network stack.
 type NetworkMode string
 type NetworkMode string
 
 
-// IsolationLevel represents the isolation level of a container. The supported
+// Isolation represents the isolation technology of a container. The supported
 // values are platform specific
 // values are platform specific
-type IsolationLevel string
+type Isolation string
 
 
-// IsDefault indicates the default isolation level of a container. On Linux this
+// IsDefault indicates the default isolation technology of a container. On Linux this
 // is the native driver. On Windows, this is a Windows Server Container.
 // is the native driver. On Windows, this is a Windows Server Container.
-func (i IsolationLevel) IsDefault() bool {
+func (i Isolation) IsDefault() bool {
 	return strings.ToLower(string(i)) == "default" || string(i) == ""
 	return strings.ToLower(string(i)) == "default" || string(i) == ""
 }
 }
 
 
@@ -233,8 +233,8 @@ type HostConfig struct {
 	ShmSize         int64              // Total shm memory usage
 	ShmSize         int64              // Total shm memory usage
 
 
 	// Applicable to Windows
 	// Applicable to Windows
-	ConsoleSize [2]int         // Initial console size
-	Isolation   IsolationLevel // Isolation level of the container (eg default, hyperv)
+	ConsoleSize [2]int    // Initial console size
+	Isolation   Isolation // Isolation technology of the container (eg default, hyperv)
 
 
 	// Contains container's resources (cgroups, ulimits)
 	// Contains container's resources (cgroups, ulimits)
 	Resources
 	Resources

+ 2 - 2
vendor/src/github.com/docker/engine-api/types/container/hostconfig_unix.go

@@ -4,8 +4,8 @@ package container
 
 
 import "strings"
 import "strings"
 
 
-// IsValid indicates is an isolation level is valid
-func (i IsolationLevel) IsValid() bool {
+// IsValid indicates if an isolation technology is valid
+func (i Isolation) IsValid() bool {
 	return i.IsDefault()
 	return i.IsDefault()
 }
 }
 
 

+ 7 - 7
vendor/src/github.com/docker/engine-api/types/container/hostconfig_windows.go

@@ -21,17 +21,17 @@ func (n NetworkMode) IsUserDefined() bool {
 }
 }
 
 
 // IsHyperV indicates the use of a Hyper-V partition for isolation
 // IsHyperV indicates the use of a Hyper-V partition for isolation
-func (i IsolationLevel) IsHyperV() bool {
+func (i Isolation) IsHyperV() bool {
 	return strings.ToLower(string(i)) == "hyperv"
 	return strings.ToLower(string(i)) == "hyperv"
 }
 }
 
 
 // IsProcess indicates the use of process isolation
 // IsProcess indicates the use of process isolation
-func (i IsolationLevel) IsProcess() bool {
+func (i Isolation) IsProcess() bool {
 	return strings.ToLower(string(i)) == "process"
 	return strings.ToLower(string(i)) == "process"
 }
 }
 
 
-// IsValid indicates is an isolation level is valid
-func (i IsolationLevel) IsValid() bool {
+// IsValid indicates if an isolation technology is valid
+func (i Isolation) IsValid() bool {
 	return i.IsDefault() || i.IsHyperV() || i.IsProcess()
 	return i.IsDefault() || i.IsHyperV() || i.IsProcess()
 }
 }
 
 
@@ -65,10 +65,10 @@ func ValidateNetMode(c *Config, hc *HostConfig) error {
 	return nil
 	return nil
 }
 }
 
 
-// ValidateIsolationLevel performs platform specific validation of the
-// isolation level in the hostconfig structure. Windows supports 'default' (or
+// ValidateIsolationperforms platform specific validation of the
+// isolation technology in the hostconfig structure. Windows supports 'default' (or
 // blank), 'process', or 'hyperv'.
 // blank), 'process', or 'hyperv'.
-func ValidateIsolationLevel(hc *HostConfig) error {
+func ValidateIsolation(hc *HostConfig) error {
 	// We may not be passed a host config, such as in the case of docker commit
 	// We may not be passed a host config, such as in the case of docker commit
 	if hc == nil {
 	if hc == nil {
 		return nil
 		return nil

+ 2 - 2
vendor/src/github.com/docker/engine-api/types/types.go

@@ -238,8 +238,8 @@ type Info struct {
 	ClusterAdvertise   string
 	ClusterAdvertise   string
 }
 }
 
 
-// PluginsInfo is temp struct holds Plugins name
-// registered with docker daemon. It used by Info struct
+// PluginsInfo is a temp struct holding Plugins name
+// registered with docker daemon. It is used by Info struct
 type PluginsInfo struct {
 type PluginsInfo struct {
 	// List of Volume plugins registered
 	// List of Volume plugins registered
 	Volume []string
 	Volume []string