diff --git a/CHANGELOG.md b/CHANGELOG.md index bda8c2ac0..80d7cb2b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,9 +28,10 @@ In addition, `kubernetes create` will now, by default, block all access to the c - **Breaking**: In JSON and YAML output of `ip-address list`: return the full API response. This changes `partofplan` key to `part_of_plan` and `ptrrecord` key to `ptr_record`. The top level data-type changes from list to object. - **Breaking**: In JSON and YAML output of `loadbalancer list`: return the full API response. This changes `state` field to `operational_state`. - **Breaking**: In JSON and YAML output of `network list` and `network show`: return the full API response. Servers list will only contain server UUID and name. In `network list` output, the top level data-type changes from list to object. -- **Breaking**: In JSON and YAML output of `storage list` and `storage show`: return the full API response. This changes `servers` field to contain `server` field, which in turn contains the servers. `labels` field will not be outputted if empty. In `storage list` output, the top level data-type changes from list to object. - **Breaking**: In JSON and YAML output of `server list` and `server show`: return the full API response. This changes field `host_id` to `host`. `nics` is replaced with `networking` subfield `interfaces`. `storage` is replaced with `storage_devices`. `labels` contain subfield `label` which in turn contains the labels. In `server list` output, the top level data-type changes from list to object. - **Breaking**: In JSON and YAML output of `server firewall show`: return the full API response. This removes fields `destination` and `source` fields in favor of `[destination|source]_address_start`, `[destination|source]_address_end`, `[destination|source]_port_start` and `[destination|source]_port_end`. +- **Breaking**: In JSON and YAML output of `server plans`: return the full API response. The top level data-type changes from list to object. +- **Breaking**: In JSON and YAML output of `storage list` and `storage show`: return the full API response. This changes `servers` field to contain `server` field, which in turn contains the servers. `labels` field will not be outputted if empty. In `storage list` output, the top level data-type changes from list to object. - **Breaking**: In JSON and YAML output of `zone list`: return the full API response. The top level data-type changes from list to object. - In JSON and YAML output of `kubernetes list`: return the full API response. - In human readable output of `kubernetes show` command, show node-groups as table. Node-group details are available with `kubernetes nodegroup show` command. diff --git a/internal/commands/server/plan_list.go b/internal/commands/server/plan_list.go index 815658b5c..e615605e5 100644 --- a/internal/commands/server/plan_list.go +++ b/internal/commands/server/plan_list.go @@ -35,15 +35,18 @@ func (s *planListCommand) ExecuteWithoutArguments(exec commands.Executor) (outpu }) } - return output.Table{ - Columns: []output.TableColumn{ - {Key: "name", Header: "Name"}, - {Key: "cores", Header: "Cores"}, - {Key: "memory", Header: "Memory"}, - {Key: "storage", Header: "Storage size"}, - {Key: "storage_tier", Header: "Storage tier"}, - {Key: "egress_transfer", Header: "Transfer out (GiB/month)"}, + return output.MarshaledWithHumanOutput{ + Value: plans, + Output: output.Table{ + Columns: []output.TableColumn{ + {Key: "name", Header: "Name"}, + {Key: "cores", Header: "Cores"}, + {Key: "memory", Header: "Memory"}, + {Key: "storage", Header: "Storage size"}, + {Key: "storage_tier", Header: "Storage tier"}, + {Key: "egress_transfer", Header: "Transfer out (GiB/month)"}, + }, + Rows: rows, }, - Rows: rows, }, nil }