From 5aa70d68b386ca43c5495ac503c9e1a7dcce9991 Mon Sep 17 00:00:00 2001 From: Gaetan de Villele Date: Tue, 25 Apr 2017 10:16:42 -0700 Subject: [PATCH] remove service runtime filter from client MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit it’s moving to the server. Signed-off-by: Gaetan de Villele --- cli/command/service/list.go | 4 +--- cli/command/service/ps.go | 4 ---- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/cli/command/service/list.go b/cli/command/service/list.go index 18b357129e..d02c691a9b 100644 --- a/cli/command/service/list.go +++ b/cli/command/service/list.go @@ -45,9 +45,7 @@ func runList(dockerCli *command.DockerCli, opts listOptions) error { ctx := context.Background() client := dockerCli.Client() - serviceFilters := opts.filter.Value() - serviceFilters.Add("runtime", string(swarm.RuntimeContainer)) - services, err := client.ServiceList(ctx, types.ServiceListOptions{Filters: serviceFilters}) + services, err := client.ServiceList(ctx, types.ServiceListOptions{}) if err != nil { return err } diff --git a/cli/command/service/ps.go b/cli/command/service/ps.go index 36ee2eb687..51a00638bc 100644 --- a/cli/command/service/ps.go +++ b/cli/command/service/ps.go @@ -13,7 +13,6 @@ import ( "github.com/docker/cli/cli/command/task" "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/filters" - swarmtypes "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/opts" "github.com/pkg/errors" "github.com/spf13/cobra" @@ -59,11 +58,8 @@ func runPS(dockerCli *command.DockerCli, opts psOptions) error { serviceIDFilter := filters.NewArgs() serviceNameFilter := filters.NewArgs() for _, service := range opts.services { - // default to container runtime serviceIDFilter.Add("id", service) - serviceIDFilter.Add("runtime", string(swarmtypes.RuntimeContainer)) serviceNameFilter.Add("name", service) - serviceNameFilter.Add("runtime", string(swarmtypes.RuntimeContainer)) } serviceByIDList, err := client.ServiceList(ctx, types.ServiceListOptions{Filters: serviceIDFilter}) if err != nil {