[hyper-provider] update hypercli in vendor
This commit is contained in:
2
vendor/github.com/hyperhq/hypercli/runconfig/compare.go
generated
vendored
2
vendor/github.com/hyperhq/hypercli/runconfig/compare.go
generated
vendored
@@ -1,6 +1,6 @@
|
||||
package runconfig
|
||||
|
||||
import "github.com/docker/engine-api/types/container"
|
||||
import "github.com/hyperhq/hyper-api/types/container"
|
||||
|
||||
// Compare two Config struct. Do not compare the "Image" nor "Hostname" fields
|
||||
// If OpenStdin is set, then it differs
|
||||
|
||||
50
vendor/github.com/hyperhq/hypercli/runconfig/compare_test.go
generated
vendored
50
vendor/github.com/hyperhq/hypercli/runconfig/compare_test.go
generated
vendored
@@ -3,9 +3,9 @@ package runconfig
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/docker/engine-api/types/container"
|
||||
"github.com/docker/engine-api/types/strslice"
|
||||
"github.com/docker/go-connections/nat"
|
||||
"github.com/hyperhq/hyper-api/types/container"
|
||||
"github.com/hyperhq/hyper-api/types/strslice"
|
||||
)
|
||||
|
||||
// Just to make life easier
|
||||
@@ -46,9 +46,9 @@ func TestCompare(t *testing.T) {
|
||||
|
||||
sameConfigs := map[*container.Config]*container.Config{
|
||||
// Empty config
|
||||
&container.Config{}: {},
|
||||
{}: {},
|
||||
// Does not compare hostname, domainname & image
|
||||
&container.Config{
|
||||
{
|
||||
Hostname: "host1",
|
||||
Domainname: "domain1",
|
||||
Image: "image1",
|
||||
@@ -60,23 +60,23 @@ func TestCompare(t *testing.T) {
|
||||
User: "user",
|
||||
},
|
||||
// only OpenStdin
|
||||
&container.Config{OpenStdin: false}: {OpenStdin: false},
|
||||
{OpenStdin: false}: {OpenStdin: false},
|
||||
// only env
|
||||
&container.Config{Env: envs1}: {Env: envs1},
|
||||
{Env: envs1}: {Env: envs1},
|
||||
// only cmd
|
||||
&container.Config{Cmd: cmd1}: {Cmd: cmd1},
|
||||
{Cmd: cmd1}: {Cmd: cmd1},
|
||||
// only labels
|
||||
&container.Config{Labels: labels1}: {Labels: labels1},
|
||||
{Labels: labels1}: {Labels: labels1},
|
||||
// only exposedPorts
|
||||
&container.Config{ExposedPorts: ports1}: {ExposedPorts: ports1},
|
||||
{ExposedPorts: ports1}: {ExposedPorts: ports1},
|
||||
// only entrypoints
|
||||
&container.Config{Entrypoint: entrypoint1}: {Entrypoint: entrypoint1},
|
||||
{Entrypoint: entrypoint1}: {Entrypoint: entrypoint1},
|
||||
// only volumes
|
||||
&container.Config{Volumes: volumes1}: {Volumes: volumes1},
|
||||
{Volumes: volumes1}: {Volumes: volumes1},
|
||||
}
|
||||
differentConfigs := map[*container.Config]*container.Config{
|
||||
nil: nil,
|
||||
&container.Config{
|
||||
{
|
||||
Hostname: "host1",
|
||||
Domainname: "domain1",
|
||||
Image: "image1",
|
||||
@@ -88,30 +88,30 @@ func TestCompare(t *testing.T) {
|
||||
User: "user2",
|
||||
},
|
||||
// only OpenStdin
|
||||
&container.Config{OpenStdin: false}: {OpenStdin: true},
|
||||
&container.Config{OpenStdin: true}: {OpenStdin: false},
|
||||
{OpenStdin: false}: {OpenStdin: true},
|
||||
{OpenStdin: true}: {OpenStdin: false},
|
||||
// only env
|
||||
&container.Config{Env: envs1}: {Env: envs2},
|
||||
{Env: envs1}: {Env: envs2},
|
||||
// only cmd
|
||||
&container.Config{Cmd: cmd1}: {Cmd: cmd2},
|
||||
{Cmd: cmd1}: {Cmd: cmd2},
|
||||
// not the same number of parts
|
||||
&container.Config{Cmd: cmd1}: {Cmd: cmd3},
|
||||
{Cmd: cmd1}: {Cmd: cmd3},
|
||||
// only labels
|
||||
&container.Config{Labels: labels1}: {Labels: labels2},
|
||||
{Labels: labels1}: {Labels: labels2},
|
||||
// not the same number of labels
|
||||
&container.Config{Labels: labels1}: {Labels: labels3},
|
||||
{Labels: labels1}: {Labels: labels3},
|
||||
// only exposedPorts
|
||||
&container.Config{ExposedPorts: ports1}: {ExposedPorts: ports2},
|
||||
{ExposedPorts: ports1}: {ExposedPorts: ports2},
|
||||
// not the same number of ports
|
||||
&container.Config{ExposedPorts: ports1}: {ExposedPorts: ports3},
|
||||
{ExposedPorts: ports1}: {ExposedPorts: ports3},
|
||||
// only entrypoints
|
||||
&container.Config{Entrypoint: entrypoint1}: {Entrypoint: entrypoint2},
|
||||
{Entrypoint: entrypoint1}: {Entrypoint: entrypoint2},
|
||||
// not the same number of parts
|
||||
&container.Config{Entrypoint: entrypoint1}: {Entrypoint: entrypoint3},
|
||||
{Entrypoint: entrypoint1}: {Entrypoint: entrypoint3},
|
||||
// only volumes
|
||||
&container.Config{Volumes: volumes1}: {Volumes: volumes2},
|
||||
{Volumes: volumes1}: {Volumes: volumes2},
|
||||
// not the same number of labels
|
||||
&container.Config{Volumes: volumes1}: {Volumes: volumes3},
|
||||
{Volumes: volumes1}: {Volumes: volumes3},
|
||||
}
|
||||
for config1, config2 := range sameConfigs {
|
||||
if !Compare(config1, config2) {
|
||||
|
||||
4
vendor/github.com/hyperhq/hypercli/runconfig/config.go
generated
vendored
4
vendor/github.com/hyperhq/hypercli/runconfig/config.go
generated
vendored
@@ -5,9 +5,9 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/hyperhq/hyper-api/types/container"
|
||||
networktypes "github.com/hyperhq/hyper-api/types/network"
|
||||
"github.com/hyperhq/hypercli/volume"
|
||||
"github.com/docker/engine-api/types/container"
|
||||
networktypes "github.com/docker/engine-api/types/network"
|
||||
)
|
||||
|
||||
// DecodeContainerConfig decodes a json encoded config into a ContainerConfigWrapper
|
||||
|
||||
6
vendor/github.com/hyperhq/hypercli/runconfig/config_test.go
generated
vendored
6
vendor/github.com/hyperhq/hypercli/runconfig/config_test.go
generated
vendored
@@ -9,9 +9,9 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/docker/engine-api/types/container"
|
||||
networktypes "github.com/docker/engine-api/types/network"
|
||||
"github.com/docker/engine-api/types/strslice"
|
||||
"github.com/hyperhq/hyper-api/types/container"
|
||||
networktypes "github.com/hyperhq/hyper-api/types/network"
|
||||
"github.com/hyperhq/hyper-api/types/strslice"
|
||||
)
|
||||
|
||||
type f struct {
|
||||
|
||||
4
vendor/github.com/hyperhq/hypercli/runconfig/config_unix.go
generated
vendored
4
vendor/github.com/hyperhq/hypercli/runconfig/config_unix.go
generated
vendored
@@ -3,8 +3,8 @@
|
||||
package runconfig
|
||||
|
||||
import (
|
||||
"github.com/docker/engine-api/types/container"
|
||||
networktypes "github.com/docker/engine-api/types/network"
|
||||
"github.com/hyperhq/hyper-api/types/container"
|
||||
networktypes "github.com/hyperhq/hyper-api/types/network"
|
||||
)
|
||||
|
||||
// ContainerConfigWrapper is a Config wrapper that hold the container Config (portable)
|
||||
|
||||
4
vendor/github.com/hyperhq/hypercli/runconfig/config_windows.go
generated
vendored
4
vendor/github.com/hyperhq/hypercli/runconfig/config_windows.go
generated
vendored
@@ -1,8 +1,8 @@
|
||||
package runconfig
|
||||
|
||||
import (
|
||||
"github.com/docker/engine-api/types/container"
|
||||
networktypes "github.com/docker/engine-api/types/network"
|
||||
"github.com/hyperhq/hyper-api/types/container"
|
||||
networktypes "github.com/hyperhq/hyper-api/types/network"
|
||||
)
|
||||
|
||||
// ContainerConfigWrapper is a Config wrapper that hold the container Config (portable)
|
||||
|
||||
2
vendor/github.com/hyperhq/hypercli/runconfig/hostconfig.go
generated
vendored
2
vendor/github.com/hyperhq/hypercli/runconfig/hostconfig.go
generated
vendored
@@ -4,7 +4,7 @@ import (
|
||||
"encoding/json"
|
||||
"io"
|
||||
|
||||
"github.com/docker/engine-api/types/container"
|
||||
"github.com/hyperhq/hyper-api/types/container"
|
||||
)
|
||||
|
||||
// DecodeHostConfig creates a HostConfig based on the specified Reader.
|
||||
|
||||
12
vendor/github.com/hyperhq/hypercli/runconfig/hostconfig_test.go
generated
vendored
12
vendor/github.com/hyperhq/hypercli/runconfig/hostconfig_test.go
generated
vendored
@@ -8,7 +8,7 @@ import (
|
||||
"io/ioutil"
|
||||
"testing"
|
||||
|
||||
"github.com/docker/engine-api/types/container"
|
||||
"github.com/hyperhq/hyper-api/types/container"
|
||||
)
|
||||
|
||||
// TODO Windows: This will need addressing for a Windows daemon.
|
||||
@@ -145,11 +145,11 @@ func TestPidModeTest(t *testing.T) {
|
||||
func TestRestartPolicy(t *testing.T) {
|
||||
restartPolicies := map[container.RestartPolicy][]bool{
|
||||
// none, always, failure
|
||||
container.RestartPolicy{}: {false, false, false},
|
||||
container.RestartPolicy{"something", 0}: {false, false, false},
|
||||
container.RestartPolicy{"no", 0}: {true, false, false},
|
||||
container.RestartPolicy{"always", 0}: {false, true, false},
|
||||
container.RestartPolicy{"on-failure", 0}: {false, false, true},
|
||||
{}: {false, false, false},
|
||||
{"something", 0}: {false, false, false},
|
||||
{"no", 0}: {true, false, false},
|
||||
{"always", 0}: {false, true, false},
|
||||
{"on-failure", 0}: {false, false, true},
|
||||
}
|
||||
for restartPolicy, state := range restartPolicies {
|
||||
if restartPolicy.IsNone() != state[0] {
|
||||
|
||||
2
vendor/github.com/hyperhq/hypercli/runconfig/hostconfig_unix.go
generated
vendored
2
vendor/github.com/hyperhq/hypercli/runconfig/hostconfig_unix.go
generated
vendored
@@ -7,7 +7,7 @@ import (
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"github.com/docker/engine-api/types/container"
|
||||
"github.com/hyperhq/hyper-api/types/container"
|
||||
)
|
||||
|
||||
// DefaultDaemonNetworkMode returns the default network stack the daemon should
|
||||
|
||||
2
vendor/github.com/hyperhq/hypercli/runconfig/hostconfig_windows.go
generated
vendored
2
vendor/github.com/hyperhq/hypercli/runconfig/hostconfig_windows.go
generated
vendored
@@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/docker/engine-api/types/container"
|
||||
"github.com/hyperhq/hyper-api/types/container"
|
||||
)
|
||||
|
||||
// DefaultDaemonNetworkMode returns the default network stack the daemon should
|
||||
|
||||
6
vendor/github.com/hyperhq/hypercli/runconfig/opts/parse.go
generated
vendored
6
vendor/github.com/hyperhq/hypercli/runconfig/opts/parse.go
generated
vendored
@@ -9,11 +9,11 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/docker/engine-api/types/container"
|
||||
networktypes "github.com/docker/engine-api/types/network"
|
||||
"github.com/docker/engine-api/types/strslice"
|
||||
"github.com/docker/go-connections/nat"
|
||||
"github.com/docker/go-units"
|
||||
"github.com/hyperhq/hyper-api/types/container"
|
||||
networktypes "github.com/hyperhq/hyper-api/types/network"
|
||||
"github.com/hyperhq/hyper-api/types/strslice"
|
||||
"github.com/hyperhq/hypercli/opts"
|
||||
flag "github.com/hyperhq/hypercli/pkg/mflag"
|
||||
"github.com/hyperhq/hypercli/pkg/mount"
|
||||
|
||||
6
vendor/github.com/hyperhq/hypercli/runconfig/opts/parse_test.go
generated
vendored
6
vendor/github.com/hyperhq/hypercli/runconfig/opts/parse_test.go
generated
vendored
@@ -10,11 +10,11 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/docker/go-connections/nat"
|
||||
"github.com/hyperhq/hyper-api/types/container"
|
||||
networktypes "github.com/hyperhq/hyper-api/types/network"
|
||||
flag "github.com/hyperhq/hypercli/pkg/mflag"
|
||||
"github.com/hyperhq/hypercli/runconfig"
|
||||
"github.com/docker/engine-api/types/container"
|
||||
networktypes "github.com/docker/engine-api/types/network"
|
||||
"github.com/docker/go-connections/nat"
|
||||
)
|
||||
|
||||
func parseRun(args []string) (*container.Config, *container.HostConfig, *networktypes.NetworkingConfig, *flag.FlagSet, error) {
|
||||
|
||||
2
vendor/github.com/hyperhq/hypercli/runconfig/opts/throttledevice.go
generated
vendored
2
vendor/github.com/hyperhq/hypercli/runconfig/opts/throttledevice.go
generated
vendored
@@ -5,8 +5,8 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/docker/engine-api/types/blkiodev"
|
||||
"github.com/docker/go-units"
|
||||
"github.com/hyperhq/hyper-api/types/blkiodev"
|
||||
)
|
||||
|
||||
// ValidatorThrottleFctType defines a validator function that returns a validated struct and/or an error.
|
||||
|
||||
2
vendor/github.com/hyperhq/hypercli/runconfig/opts/weightdevice.go
generated
vendored
2
vendor/github.com/hyperhq/hypercli/runconfig/opts/weightdevice.go
generated
vendored
@@ -5,7 +5,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/docker/engine-api/types/blkiodev"
|
||||
"github.com/hyperhq/hyper-api/types/blkiodev"
|
||||
)
|
||||
|
||||
// ValidatorWeightFctType defines a validator function that returns a validated struct and/or an error.
|
||||
|
||||
Reference in New Issue
Block a user