Skip to content
Merged

Ps #314

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions pkg/commands/ps.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down Expand Up @@ -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
Expand Down