Using
git grep -l 'client\.DockerCli' cli/command/stack/ | xargs sed -i -e 's/client\.DockerCli/command\.Dockercli/g'
Signed-off-by: Daniel Nephin <dnephin@docker.com>
| ... | ... |
@@ -16,7 +16,7 @@ import ( |
| 16 | 16 |
"github.com/spf13/cobra" |
| 17 | 17 |
) |
| 18 | 18 |
|
| 19 |
-// AddCommands adds all the commands from api/client to the root command |
|
| 19 |
+// AddCommands adds all the commands from cli/command to the root command |
|
| 20 | 20 |
func AddCommands(cmd *cobra.Command, dockerCli *command.DockerCli) {
|
| 21 | 21 |
cmd.AddCommand( |
| 22 | 22 |
node.NewNodeCommand(dockerCli), |
| ... | ... |
@@ -5,13 +5,13 @@ package plugin |
| 5 | 5 |
import ( |
| 6 | 6 |
"fmt" |
| 7 | 7 |
|
| 8 |
- "github.com/docker/docker/api/client" |
|
| 9 | 8 |
"github.com/docker/docker/cli" |
| 9 |
+ "github.com/docker/docker/cli/command" |
|
| 10 | 10 |
"github.com/spf13/cobra" |
| 11 | 11 |
) |
| 12 | 12 |
|
| 13 | 13 |
// NewPluginCommand returns a cobra command for `plugin` subcommands |
| 14 |
-func NewPluginCommand(rootCmd *cobra.Command, dockerCli *client.DockerCli) {
|
|
| 14 |
+func NewPluginCommand(rootCmd *cobra.Command, dockerCli *command.DockerCli) {
|
|
| 15 | 15 |
cmd := &cobra.Command{
|
| 16 | 16 |
Use: "plugin", |
| 17 | 17 |
Short: "Manage Docker plugins", |
| ... | ... |
@@ -5,14 +5,14 @@ package plugin |
| 5 | 5 |
import ( |
| 6 | 6 |
"fmt" |
| 7 | 7 |
|
| 8 |
- "github.com/docker/docker/api/client" |
|
| 9 | 8 |
"github.com/docker/docker/cli" |
| 9 |
+ "github.com/docker/docker/cli/command" |
|
| 10 | 10 |
"github.com/docker/docker/reference" |
| 11 | 11 |
"github.com/spf13/cobra" |
| 12 | 12 |
"golang.org/x/net/context" |
| 13 | 13 |
) |
| 14 | 14 |
|
| 15 |
-func newDisableCommand(dockerCli *client.DockerCli) *cobra.Command {
|
|
| 15 |
+func newDisableCommand(dockerCli *command.DockerCli) *cobra.Command {
|
|
| 16 | 16 |
cmd := &cobra.Command{
|
| 17 | 17 |
Use: "disable PLUGIN", |
| 18 | 18 |
Short: "Disable a plugin", |
| ... | ... |
@@ -25,7 +25,7 @@ func newDisableCommand(dockerCli *client.DockerCli) *cobra.Command {
|
| 25 | 25 |
return cmd |
| 26 | 26 |
} |
| 27 | 27 |
|
| 28 |
-func runDisable(dockerCli *client.DockerCli, name string) error {
|
|
| 28 |
+func runDisable(dockerCli *command.DockerCli, name string) error {
|
|
| 29 | 29 |
named, err := reference.ParseNamed(name) // FIXME: validate |
| 30 | 30 |
if err != nil {
|
| 31 | 31 |
return err |
| ... | ... |
@@ -5,14 +5,14 @@ package plugin |
| 5 | 5 |
import ( |
| 6 | 6 |
"fmt" |
| 7 | 7 |
|
| 8 |
- "github.com/docker/docker/api/client" |
|
| 9 | 8 |
"github.com/docker/docker/cli" |
| 9 |
+ "github.com/docker/docker/cli/command" |
|
| 10 | 10 |
"github.com/docker/docker/reference" |
| 11 | 11 |
"github.com/spf13/cobra" |
| 12 | 12 |
"golang.org/x/net/context" |
| 13 | 13 |
) |
| 14 | 14 |
|
| 15 |
-func newEnableCommand(dockerCli *client.DockerCli) *cobra.Command {
|
|
| 15 |
+func newEnableCommand(dockerCli *command.DockerCli) *cobra.Command {
|
|
| 16 | 16 |
cmd := &cobra.Command{
|
| 17 | 17 |
Use: "enable PLUGIN", |
| 18 | 18 |
Short: "Enable a plugin", |
| ... | ... |
@@ -25,7 +25,7 @@ func newEnableCommand(dockerCli *client.DockerCli) *cobra.Command {
|
| 25 | 25 |
return cmd |
| 26 | 26 |
} |
| 27 | 27 |
|
| 28 |
-func runEnable(dockerCli *client.DockerCli, name string) error {
|
|
| 28 |
+func runEnable(dockerCli *command.DockerCli, name string) error {
|
|
| 29 | 29 |
named, err := reference.ParseNamed(name) // FIXME: validate |
| 30 | 30 |
if err != nil {
|
| 31 | 31 |
return err |
| ... | ... |
@@ -5,9 +5,9 @@ package plugin |
| 5 | 5 |
import ( |
| 6 | 6 |
"fmt" |
| 7 | 7 |
|
| 8 |
- "github.com/docker/docker/api/client" |
|
| 9 |
- "github.com/docker/docker/api/client/inspect" |
|
| 10 | 8 |
"github.com/docker/docker/cli" |
| 9 |
+ "github.com/docker/docker/cli/command" |
|
| 10 |
+ "github.com/docker/docker/cli/command/inspect" |
|
| 11 | 11 |
"github.com/docker/docker/reference" |
| 12 | 12 |
"github.com/spf13/cobra" |
| 13 | 13 |
"golang.org/x/net/context" |
| ... | ... |
@@ -18,7 +18,7 @@ type inspectOptions struct {
|
| 18 | 18 |
format string |
| 19 | 19 |
} |
| 20 | 20 |
|
| 21 |
-func newInspectCommand(dockerCli *client.DockerCli) *cobra.Command {
|
|
| 21 |
+func newInspectCommand(dockerCli *command.DockerCli) *cobra.Command {
|
|
| 22 | 22 |
var opts inspectOptions |
| 23 | 23 |
|
| 24 | 24 |
cmd := &cobra.Command{
|
| ... | ... |
@@ -36,7 +36,7 @@ func newInspectCommand(dockerCli *client.DockerCli) *cobra.Command {
|
| 36 | 36 |
return cmd |
| 37 | 37 |
} |
| 38 | 38 |
|
| 39 |
-func runInspect(dockerCli *client.DockerCli, opts inspectOptions) error {
|
|
| 39 |
+func runInspect(dockerCli *command.DockerCli, opts inspectOptions) error {
|
|
| 40 | 40 |
client := dockerCli.Client() |
| 41 | 41 |
ctx := context.Background() |
| 42 | 42 |
getRef := func(name string) (interface{}, []byte, error) {
|
| ... | ... |
@@ -7,9 +7,9 @@ import ( |
| 7 | 7 |
"fmt" |
| 8 | 8 |
"strings" |
| 9 | 9 |
|
| 10 |
- "github.com/docker/docker/api/client" |
|
| 11 | 10 |
"github.com/docker/docker/api/types" |
| 12 | 11 |
"github.com/docker/docker/cli" |
| 12 |
+ "github.com/docker/docker/cli/command" |
|
| 13 | 13 |
"github.com/docker/docker/reference" |
| 14 | 14 |
"github.com/docker/docker/registry" |
| 15 | 15 |
"github.com/spf13/cobra" |
| ... | ... |
@@ -22,7 +22,7 @@ type pluginOptions struct {
|
| 22 | 22 |
disable bool |
| 23 | 23 |
} |
| 24 | 24 |
|
| 25 |
-func newInstallCommand(dockerCli *client.DockerCli) *cobra.Command {
|
|
| 25 |
+func newInstallCommand(dockerCli *command.DockerCli) *cobra.Command {
|
|
| 26 | 26 |
var options pluginOptions |
| 27 | 27 |
cmd := &cobra.Command{
|
| 28 | 28 |
Use: "install [OPTIONS] PLUGIN", |
| ... | ... |
@@ -41,7 +41,7 @@ func newInstallCommand(dockerCli *client.DockerCli) *cobra.Command {
|
| 41 | 41 |
return cmd |
| 42 | 42 |
} |
| 43 | 43 |
|
| 44 |
-func runInstall(dockerCli *client.DockerCli, opts pluginOptions) error {
|
|
| 44 |
+func runInstall(dockerCli *command.DockerCli, opts pluginOptions) error {
|
|
| 45 | 45 |
named, err := reference.ParseNamed(opts.name) // FIXME: validate |
| 46 | 46 |
if err != nil {
|
| 47 | 47 |
return err |
| ... | ... |
@@ -63,7 +63,7 @@ func runInstall(dockerCli *client.DockerCli, opts pluginOptions) error {
|
| 63 | 63 |
|
| 64 | 64 |
authConfig := dockerCli.ResolveAuthConfig(ctx, repoInfo.Index) |
| 65 | 65 |
|
| 66 |
- encodedAuth, err := client.EncodeAuthToBase64(authConfig) |
|
| 66 |
+ encodedAuth, err := command.EncodeAuthToBase64(authConfig) |
|
| 67 | 67 |
if err != nil {
|
| 68 | 68 |
return err |
| 69 | 69 |
} |
| ... | ... |
@@ -85,7 +85,7 @@ func runInstall(dockerCli *client.DockerCli, opts pluginOptions) error {
|
| 85 | 85 |
return nil |
| 86 | 86 |
} |
| 87 | 87 |
|
| 88 |
-func acceptPrivileges(dockerCli *client.DockerCli, name string) func(privileges types.PluginPrivileges) (bool, error) {
|
|
| 88 |
+func acceptPrivileges(dockerCli *command.DockerCli, name string) func(privileges types.PluginPrivileges) (bool, error) {
|
|
| 89 | 89 |
return func(privileges types.PluginPrivileges) (bool, error) {
|
| 90 | 90 |
fmt.Fprintf(dockerCli.Out(), "Plugin %q is requesting the following privileges:\n", name) |
| 91 | 91 |
for _, privilege := range privileges {
|
| ... | ... |
@@ -7,8 +7,8 @@ import ( |
| 7 | 7 |
"strings" |
| 8 | 8 |
"text/tabwriter" |
| 9 | 9 |
|
| 10 |
- "github.com/docker/docker/api/client" |
|
| 11 | 10 |
"github.com/docker/docker/cli" |
| 11 |
+ "github.com/docker/docker/cli/command" |
|
| 12 | 12 |
"github.com/docker/docker/pkg/stringutils" |
| 13 | 13 |
"github.com/spf13/cobra" |
| 14 | 14 |
"golang.org/x/net/context" |
| ... | ... |
@@ -18,7 +18,7 @@ type listOptions struct {
|
| 18 | 18 |
noTrunc bool |
| 19 | 19 |
} |
| 20 | 20 |
|
| 21 |
-func newListCommand(dockerCli *client.DockerCli) *cobra.Command {
|
|
| 21 |
+func newListCommand(dockerCli *command.DockerCli) *cobra.Command {
|
|
| 22 | 22 |
var opts listOptions |
| 23 | 23 |
|
| 24 | 24 |
cmd := &cobra.Command{
|
| ... | ... |
@@ -38,7 +38,7 @@ func newListCommand(dockerCli *client.DockerCli) *cobra.Command {
|
| 38 | 38 |
return cmd |
| 39 | 39 |
} |
| 40 | 40 |
|
| 41 |
-func runList(dockerCli *client.DockerCli, opts listOptions) error {
|
|
| 41 |
+func runList(dockerCli *command.DockerCli, opts listOptions) error {
|
|
| 42 | 42 |
plugins, err := dockerCli.Client().PluginList(context.Background()) |
| 43 | 43 |
if err != nil {
|
| 44 | 44 |
return err |
| ... | ... |
@@ -7,14 +7,14 @@ import ( |
| 7 | 7 |
|
| 8 | 8 |
"golang.org/x/net/context" |
| 9 | 9 |
|
| 10 |
- "github.com/docker/docker/api/client" |
|
| 11 | 10 |
"github.com/docker/docker/cli" |
| 11 |
+ "github.com/docker/docker/cli/command" |
|
| 12 | 12 |
"github.com/docker/docker/reference" |
| 13 | 13 |
"github.com/docker/docker/registry" |
| 14 | 14 |
"github.com/spf13/cobra" |
| 15 | 15 |
) |
| 16 | 16 |
|
| 17 |
-func newPushCommand(dockerCli *client.DockerCli) *cobra.Command {
|
|
| 17 |
+func newPushCommand(dockerCli *command.DockerCli) *cobra.Command {
|
|
| 18 | 18 |
cmd := &cobra.Command{
|
| 19 | 19 |
Use: "push PLUGIN", |
| 20 | 20 |
Short: "Push a plugin", |
| ... | ... |
@@ -26,7 +26,7 @@ func newPushCommand(dockerCli *client.DockerCli) *cobra.Command {
|
| 26 | 26 |
return cmd |
| 27 | 27 |
} |
| 28 | 28 |
|
| 29 |
-func runPush(dockerCli *client.DockerCli, name string) error {
|
|
| 29 |
+func runPush(dockerCli *command.DockerCli, name string) error {
|
|
| 30 | 30 |
named, err := reference.ParseNamed(name) // FIXME: validate |
| 31 | 31 |
if err != nil {
|
| 32 | 32 |
return err |
| ... | ... |
@@ -47,7 +47,7 @@ func runPush(dockerCli *client.DockerCli, name string) error {
|
| 47 | 47 |
} |
| 48 | 48 |
authConfig := dockerCli.ResolveAuthConfig(ctx, repoInfo.Index) |
| 49 | 49 |
|
| 50 |
- encodedAuth, err := client.EncodeAuthToBase64(authConfig) |
|
| 50 |
+ encodedAuth, err := command.EncodeAuthToBase64(authConfig) |
|
| 51 | 51 |
if err != nil {
|
| 52 | 52 |
return err |
| 53 | 53 |
} |
| ... | ... |
@@ -5,9 +5,9 @@ package plugin |
| 5 | 5 |
import ( |
| 6 | 6 |
"fmt" |
| 7 | 7 |
|
| 8 |
- "github.com/docker/docker/api/client" |
|
| 9 | 8 |
"github.com/docker/docker/api/types" |
| 10 | 9 |
"github.com/docker/docker/cli" |
| 10 |
+ "github.com/docker/docker/cli/command" |
|
| 11 | 11 |
"github.com/docker/docker/reference" |
| 12 | 12 |
"github.com/spf13/cobra" |
| 13 | 13 |
"golang.org/x/net/context" |
| ... | ... |
@@ -19,7 +19,7 @@ type rmOptions struct {
|
| 19 | 19 |
plugins []string |
| 20 | 20 |
} |
| 21 | 21 |
|
| 22 |
-func newRemoveCommand(dockerCli *client.DockerCli) *cobra.Command {
|
|
| 22 |
+func newRemoveCommand(dockerCli *command.DockerCli) *cobra.Command {
|
|
| 23 | 23 |
var opts rmOptions |
| 24 | 24 |
|
| 25 | 25 |
cmd := &cobra.Command{
|
| ... | ... |
@@ -38,7 +38,7 @@ func newRemoveCommand(dockerCli *client.DockerCli) *cobra.Command {
|
| 38 | 38 |
return cmd |
| 39 | 39 |
} |
| 40 | 40 |
|
| 41 |
-func runRemove(dockerCli *client.DockerCli, opts *rmOptions) error {
|
|
| 41 |
+func runRemove(dockerCli *command.DockerCli, opts *rmOptions) error {
|
|
| 42 | 42 |
ctx := context.Background() |
| 43 | 43 |
|
| 44 | 44 |
var errs cli.Errors |
| ... | ... |
@@ -7,13 +7,13 @@ import ( |
| 7 | 7 |
|
| 8 | 8 |
"golang.org/x/net/context" |
| 9 | 9 |
|
| 10 |
- "github.com/docker/docker/api/client" |
|
| 11 | 10 |
"github.com/docker/docker/cli" |
| 11 |
+ "github.com/docker/docker/cli/command" |
|
| 12 | 12 |
"github.com/docker/docker/reference" |
| 13 | 13 |
"github.com/spf13/cobra" |
| 14 | 14 |
) |
| 15 | 15 |
|
| 16 |
-func newSetCommand(dockerCli *client.DockerCli) *cobra.Command {
|
|
| 16 |
+func newSetCommand(dockerCli *command.DockerCli) *cobra.Command {
|
|
| 17 | 17 |
cmd := &cobra.Command{
|
| 18 | 18 |
Use: "set PLUGIN key1=value1 [key2=value2...]", |
| 19 | 19 |
Short: "Change settings for a plugin", |
| ... | ... |
@@ -26,7 +26,7 @@ func newSetCommand(dockerCli *client.DockerCli) *cobra.Command {
|
| 26 | 26 |
return cmd |
| 27 | 27 |
} |
| 28 | 28 |
|
| 29 |
-func runSet(dockerCli *client.DockerCli, name string, args []string) error {
|
|
| 29 |
+func runSet(dockerCli *command.DockerCli, name string, args []string) error {
|
|
| 30 | 30 |
named, err := reference.ParseNamed(name) // FIXME: validate |
| 31 | 31 |
if err != nil {
|
| 32 | 32 |
return err |
| ... | ... |
@@ -5,13 +5,13 @@ package stack |
| 5 | 5 |
import ( |
| 6 | 6 |
"fmt" |
| 7 | 7 |
|
| 8 |
- "github.com/docker/docker/api/client" |
|
| 9 | 8 |
"github.com/docker/docker/cli" |
| 9 |
+ "github.com/docker/docker/cli/command" |
|
| 10 | 10 |
"github.com/spf13/cobra" |
| 11 | 11 |
) |
| 12 | 12 |
|
| 13 | 13 |
// NewStackCommand returns a cobra command for `stack` subcommands |
| 14 |
-func NewStackCommand(dockerCli *client.DockerCli) *cobra.Command {
|
|
| 14 |
+func NewStackCommand(dockerCli *command.DockerCli) *cobra.Command {
|
|
| 15 | 15 |
cmd := &cobra.Command{
|
| 16 | 16 |
Use: "stack", |
| 17 | 17 |
Short: "Manage Docker stacks", |
| ... | ... |
@@ -31,7 +31,7 @@ func NewStackCommand(dockerCli *client.DockerCli) *cobra.Command {
|
| 31 | 31 |
} |
| 32 | 32 |
|
| 33 | 33 |
// NewTopLevelDeployCommand returns a command for `docker deploy` |
| 34 |
-func NewTopLevelDeployCommand(dockerCli *client.DockerCli) *cobra.Command {
|
|
| 34 |
+func NewTopLevelDeployCommand(dockerCli *command.DockerCli) *cobra.Command {
|
|
| 35 | 35 |
cmd := newDeployCommand(dockerCli) |
| 36 | 36 |
// Remove the aliases at the top level |
| 37 | 37 |
cmd.Aliases = []string{}
|
| ... | ... |
@@ -3,9 +3,9 @@ |
| 3 | 3 |
package stack |
| 4 | 4 |
|
| 5 | 5 |
import ( |
| 6 |
- "github.com/docker/docker/api/client" |
|
| 7 |
- "github.com/docker/docker/api/client/bundlefile" |
|
| 8 | 6 |
"github.com/docker/docker/cli" |
| 7 |
+ "github.com/docker/docker/cli/command" |
|
| 8 |
+ "github.com/docker/docker/cli/command/bundlefile" |
|
| 9 | 9 |
"github.com/spf13/cobra" |
| 10 | 10 |
) |
| 11 | 11 |
|
| ... | ... |
@@ -14,7 +14,7 @@ type configOptions struct {
|
| 14 | 14 |
namespace string |
| 15 | 15 |
} |
| 16 | 16 |
|
| 17 |
-func newConfigCommand(dockerCli *client.DockerCli) *cobra.Command {
|
|
| 17 |
+func newConfigCommand(dockerCli *command.DockerCli) *cobra.Command {
|
|
| 18 | 18 |
var opts configOptions |
| 19 | 19 |
|
| 20 | 20 |
cmd := &cobra.Command{
|
| ... | ... |
@@ -32,7 +32,7 @@ func newConfigCommand(dockerCli *client.DockerCli) *cobra.Command {
|
| 32 | 32 |
return cmd |
| 33 | 33 |
} |
| 34 | 34 |
|
| 35 |
-func runConfig(dockerCli *client.DockerCli, opts configOptions) error {
|
|
| 35 |
+func runConfig(dockerCli *command.DockerCli, opts configOptions) error {
|
|
| 36 | 36 |
bundle, err := loadBundlefile(dockerCli.Err(), opts.namespace, opts.bundlefile) |
| 37 | 37 |
if err != nil {
|
| 38 | 38 |
return err |
| ... | ... |
@@ -8,11 +8,11 @@ import ( |
| 8 | 8 |
"github.com/spf13/cobra" |
| 9 | 9 |
"golang.org/x/net/context" |
| 10 | 10 |
|
| 11 |
- "github.com/docker/docker/api/client" |
|
| 12 |
- "github.com/docker/docker/api/client/bundlefile" |
|
| 13 | 11 |
"github.com/docker/docker/api/types" |
| 14 | 12 |
"github.com/docker/docker/api/types/swarm" |
| 15 | 13 |
"github.com/docker/docker/cli" |
| 14 |
+ "github.com/docker/docker/cli/command" |
|
| 15 |
+ "github.com/docker/docker/cli/command/bundlefile" |
|
| 16 | 16 |
) |
| 17 | 17 |
|
| 18 | 18 |
const ( |
| ... | ... |
@@ -25,7 +25,7 @@ type deployOptions struct {
|
| 25 | 25 |
sendRegistryAuth bool |
| 26 | 26 |
} |
| 27 | 27 |
|
| 28 |
-func newDeployCommand(dockerCli *client.DockerCli) *cobra.Command {
|
|
| 28 |
+func newDeployCommand(dockerCli *command.DockerCli) *cobra.Command {
|
|
| 29 | 29 |
var opts deployOptions |
| 30 | 30 |
|
| 31 | 31 |
cmd := &cobra.Command{
|
| ... | ... |
@@ -45,7 +45,7 @@ func newDeployCommand(dockerCli *client.DockerCli) *cobra.Command {
|
| 45 | 45 |
return cmd |
| 46 | 46 |
} |
| 47 | 47 |
|
| 48 |
-func runDeploy(dockerCli *client.DockerCli, opts deployOptions) error {
|
|
| 48 |
+func runDeploy(dockerCli *command.DockerCli, opts deployOptions) error {
|
|
| 49 | 49 |
bundle, err := loadBundlefile(dockerCli.Err(), opts.namespace, opts.bundlefile) |
| 50 | 50 |
if err != nil {
|
| 51 | 51 |
return err |
| ... | ... |
@@ -85,7 +85,7 @@ func getUniqueNetworkNames(services map[string]bundlefile.Service) []string {
|
| 85 | 85 |
|
| 86 | 86 |
func updateNetworks( |
| 87 | 87 |
ctx context.Context, |
| 88 |
- dockerCli *client.DockerCli, |
|
| 88 |
+ dockerCli *command.DockerCli, |
|
| 89 | 89 |
networks []string, |
| 90 | 90 |
namespace string, |
| 91 | 91 |
) error {
|
| ... | ... |
@@ -133,7 +133,7 @@ func convertNetworks(networks []string, namespace string, name string) []swarm.N |
| 133 | 133 |
|
| 134 | 134 |
func deployServices( |
| 135 | 135 |
ctx context.Context, |
| 136 |
- dockerCli *client.DockerCli, |
|
| 136 |
+ dockerCli *command.DockerCli, |
|
| 137 | 137 |
services map[string]bundlefile.Service, |
| 138 | 138 |
namespace string, |
| 139 | 139 |
sendAuth bool, |
| ... | ... |
@@ -7,12 +7,12 @@ import ( |
| 7 | 7 |
|
| 8 | 8 |
"golang.org/x/net/context" |
| 9 | 9 |
|
| 10 |
- "github.com/docker/docker/api/client" |
|
| 11 |
- "github.com/docker/docker/api/client/idresolver" |
|
| 12 |
- "github.com/docker/docker/api/client/task" |
|
| 13 | 10 |
"github.com/docker/docker/api/types" |
| 14 | 11 |
"github.com/docker/docker/api/types/swarm" |
| 15 | 12 |
"github.com/docker/docker/cli" |
| 13 |
+ "github.com/docker/docker/cli/command" |
|
| 14 |
+ "github.com/docker/docker/cli/command/idresolver" |
|
| 15 |
+ "github.com/docker/docker/cli/command/task" |
|
| 16 | 16 |
"github.com/docker/docker/opts" |
| 17 | 17 |
"github.com/spf13/cobra" |
| 18 | 18 |
) |
| ... | ... |
@@ -25,7 +25,7 @@ type psOptions struct {
|
| 25 | 25 |
noResolve bool |
| 26 | 26 |
} |
| 27 | 27 |
|
| 28 |
-func newPsCommand(dockerCli *client.DockerCli) *cobra.Command {
|
|
| 28 |
+func newPsCommand(dockerCli *command.DockerCli) *cobra.Command {
|
|
| 29 | 29 |
opts := psOptions{filter: opts.NewFilterOpt()}
|
| 30 | 30 |
|
| 31 | 31 |
cmd := &cobra.Command{
|
| ... | ... |
@@ -46,7 +46,7 @@ func newPsCommand(dockerCli *client.DockerCli) *cobra.Command {
|
| 46 | 46 |
return cmd |
| 47 | 47 |
} |
| 48 | 48 |
|
| 49 |
-func runPS(dockerCli *client.DockerCli, opts psOptions) error {
|
|
| 49 |
+func runPS(dockerCli *command.DockerCli, opts psOptions) error {
|
|
| 50 | 50 |
namespace := opts.namespace |
| 51 | 51 |
client := dockerCli.Client() |
| 52 | 52 |
ctx := context.Background() |
| ... | ... |
@@ -7,8 +7,8 @@ import ( |
| 7 | 7 |
|
| 8 | 8 |
"golang.org/x/net/context" |
| 9 | 9 |
|
| 10 |
- "github.com/docker/docker/api/client" |
|
| 11 | 10 |
"github.com/docker/docker/cli" |
| 11 |
+ "github.com/docker/docker/cli/command" |
|
| 12 | 12 |
"github.com/spf13/cobra" |
| 13 | 13 |
) |
| 14 | 14 |
|
| ... | ... |
@@ -16,7 +16,7 @@ type removeOptions struct {
|
| 16 | 16 |
namespace string |
| 17 | 17 |
} |
| 18 | 18 |
|
| 19 |
-func newRemoveCommand(dockerCli *client.DockerCli) *cobra.Command {
|
|
| 19 |
+func newRemoveCommand(dockerCli *command.DockerCli) *cobra.Command {
|
|
| 20 | 20 |
var opts removeOptions |
| 21 | 21 |
|
| 22 | 22 |
cmd := &cobra.Command{
|
| ... | ... |
@@ -32,7 +32,7 @@ func newRemoveCommand(dockerCli *client.DockerCli) *cobra.Command {
|
| 32 | 32 |
return cmd |
| 33 | 33 |
} |
| 34 | 34 |
|
| 35 |
-func runRemove(dockerCli *client.DockerCli, opts removeOptions) error {
|
|
| 35 |
+func runRemove(dockerCli *command.DockerCli, opts removeOptions) error {
|
|
| 36 | 36 |
namespace := opts.namespace |
| 37 | 37 |
client := dockerCli.Client() |
| 38 | 38 |
stderr := dockerCli.Err() |
| ... | ... |
@@ -7,11 +7,11 @@ import ( |
| 7 | 7 |
|
| 8 | 8 |
"golang.org/x/net/context" |
| 9 | 9 |
|
| 10 |
- "github.com/docker/docker/api/client" |
|
| 11 |
- "github.com/docker/docker/api/client/service" |
|
| 12 | 10 |
"github.com/docker/docker/api/types" |
| 13 | 11 |
"github.com/docker/docker/api/types/filters" |
| 14 | 12 |
"github.com/docker/docker/cli" |
| 13 |
+ "github.com/docker/docker/cli/command" |
|
| 14 |
+ "github.com/docker/docker/cli/command/service" |
|
| 15 | 15 |
"github.com/docker/docker/opts" |
| 16 | 16 |
"github.com/spf13/cobra" |
| 17 | 17 |
) |
| ... | ... |
@@ -26,7 +26,7 @@ type servicesOptions struct {
|
| 26 | 26 |
namespace string |
| 27 | 27 |
} |
| 28 | 28 |
|
| 29 |
-func newServicesCommand(dockerCli *client.DockerCli) *cobra.Command {
|
|
| 29 |
+func newServicesCommand(dockerCli *command.DockerCli) *cobra.Command {
|
|
| 30 | 30 |
opts := servicesOptions{filter: opts.NewFilterOpt()}
|
| 31 | 31 |
|
| 32 | 32 |
cmd := &cobra.Command{
|
| ... | ... |
@@ -45,7 +45,7 @@ func newServicesCommand(dockerCli *client.DockerCli) *cobra.Command {
|
| 45 | 45 |
return cmd |
| 46 | 46 |
} |
| 47 | 47 |
|
| 48 |
-func runServices(dockerCli *client.DockerCli, opts servicesOptions) error {
|
|
| 48 |
+func runServices(dockerCli *command.DockerCli, opts servicesOptions) error {
|
|
| 49 | 49 |
ctx := context.Background() |
| 50 | 50 |
client := dockerCli.Client() |
| 51 | 51 |
|