From 2657a5324c51b205e18b6392fcd48f9f5729cfd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20L=C3=A9one?= Date: Tue, 17 Apr 2018 14:24:31 +0200 Subject: [PATCH] Allow region filtering --- pkg/api/api.go | 2 +- pkg/cli/cmd_ps.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/api/api.go b/pkg/api/api.go index ed060f53dc..217baece9a 100644 --- a/pkg/api/api.go +++ b/pkg/api/api.go @@ -1208,7 +1208,7 @@ func (s *ScalewayAPI) GetServers(all bool, limit int) (*[]ScalewayServer, error) } ) - serverChan := make(chan ScalewayServers, 2) + serverChan := make(chan ScalewayServers, len(apis)) for _, api := range apis { g.Go(s.fetchServers(api, query, serverChan)) } diff --git a/pkg/cli/cmd_ps.go b/pkg/cli/cmd_ps.go index 4c4ef83487..865254d735 100644 --- a/pkg/cli/cmd_ps.go +++ b/pkg/cli/cmd_ps.go @@ -35,6 +35,7 @@ var cmdPs = &Command{ $ scw ps -f arch=ARCH $ scw ps -f server-type=COMMERCIALTYPE $ scw ps -f "state=booted image=docker tags=prod" + $ scw ps -f zone=ams1 `, }