Skip to content

Commit 9195910

Browse files
authored
fix(lb): show full API response in marshaled outputs (#247)
1 parent 34d798e commit 9195910

2 files changed

Lines changed: 12 additions & 8 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1717
- Add `database session cancel` for cancelling an active database session
1818

1919
### Changed
20+
- **Breaking**: In JSON and YAML output of `loadbalancer list`: display full API response. This changes `state` field to `operational_state`.
2021
- In human readable output of `kubernetes show` command, show node-groups as table. Node-group datails are available with `kubernetes nodegroup show` command.
2122

2223
## Removed

internal/commands/loadbalancer/list.go

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,17 @@ func (s *listCommand) ExecuteWithoutArguments(exec commands.Executor) (output.Ou
3838
})
3939
}
4040

41-
return output.Table{
42-
Columns: []output.TableColumn{
43-
{Key: "uuid", Header: "UUID", Colour: ui.DefaultUUUIDColours},
44-
{Key: "name", Header: "Name"},
45-
{Key: "plan", Header: "Plan"},
46-
{Key: "zone", Header: "Zone"},
47-
{Key: "state", Header: "State", Format: format.LoadBalancerState},
41+
return output.MarshaledWithHumanOutput{
42+
Value: loadbalancers,
43+
Output: output.Table{
44+
Columns: []output.TableColumn{
45+
{Key: "uuid", Header: "UUID", Colour: ui.DefaultUUUIDColours},
46+
{Key: "name", Header: "Name"},
47+
{Key: "plan", Header: "Plan"},
48+
{Key: "zone", Header: "Zone"},
49+
{Key: "operational_state", Header: "State", Format: format.LoadBalancerState},
50+
},
51+
Rows: rows,
4852
},
49-
Rows: rows,
5053
}, nil
5154
}

0 commit comments

Comments
 (0)