diff --git a/README.md b/README.md index a35319eda3..a3874d2efa 100644 --- a/README.md +++ b/README.md @@ -1183,6 +1183,7 @@ $ scw inspect myserver | jq '.[0].public_ip.address' ### master (unreleased) +* `scw ps` add commercial-type column * Use `SCW_SECURE_EXEC` instead of `exec_exec` * Remove `scaleway_api_endpoint` environment variable * `scw login` don't ask to upload ssh key when there is no keys diff --git a/pkg/commands/ps.go b/pkg/commands/ps.go index 2a4b036ff5..d595712da1 100644 --- a/pkg/commands/ps.go +++ b/pkg/commands/ps.go @@ -55,7 +55,7 @@ func RunPs(ctx CommandContext, args PsArgs) error { w := tabwriter.NewWriter(ctx.Stdout, 20, 1, 3, ' ', 0) defer w.Flush() if !args.Quiet { - fmt.Fprintf(w, "SERVER ID\tIMAGE\tCOMMAND\tCREATED\tSTATUS\tPORTS\tNAME\n") + fmt.Fprintf(w, "SERVER ID\tIMAGE\tCOMMAND\tCREATED\tSTATUS\tPORTS\tNAME\tCOMMERCIAL TYPE\n") } for _, server := range *servers { @@ -113,7 +113,7 @@ func RunPs(ctx CommandContext, args PsArgs) error { creationTime, _ := time.Parse("2006-01-02T15:04:05.000000+00:00", server.CreationDate) shortCreationDate := units.HumanDuration(time.Now().UTC().Sub(creationTime)) port := server.PublicAddress.IP - fmt.Fprintf(w, "%s\t%s\t\t%s\t%s\t%s\t%s\n", shortID, shortImage, shortCreationDate, server.State, port, shortName) + fmt.Fprintf(w, "%s\t%s\t\t%s\t%s\t%s\t%s\t%s\n", shortID, shortImage, shortCreationDate, server.State, port, shortName, server.CommercialType) } skipServer: continue