Skip to content

Commit 464aa3d

Browse files
authored
chore(server): add premium and starter sections to plans output, v3.32.0 (#741)
1 parent bc872bc commit 464aa3d

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [3.32.0] - 2026-04-17
11+
1012
### Added
1113

1214
- Add paging parameters to `object-storage bucket list` command.
15+
- Add _Premium_ and _Starter_ sections to human readable output of `server plans` command.
1316

1417
## [3.31.0] - 2026-03-17
1518

@@ -699,7 +702,8 @@ Initial public beta release :tada:
699702
### Added
700703
- Current feature set added! First internal release
701704
702-
[Unreleased]: https://github.com/UpCloudLtd/upcloud-cli/compare/v3.31.0...HEAD
705+
[Unreleased]: https://github.com/UpCloudLtd/upcloud-cli/compare/v3.32.0...HEAD
706+
[3.32.0]: https://github.com/UpCloudLtd/upcloud-cli/compare/v3.31.0...v3.32.0
703707
[3.31.0]: https://github.com/UpCloudLtd/upcloud-cli/compare/v3.30.0...v3.31.0
704708
[3.30.0]: https://github.com/UpCloudLtd/upcloud-cli/compare/v3.29.0...v3.30.0
705709
[3.29.0]: https://github.com/UpCloudLtd/upcloud-cli/compare/v3.28.0...v3.29.0

internal/commands/server/plan_list.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ func (s *planListCommand) ExecuteWithoutArguments(exec commands.Executor) (outpu
132132
return output.MarshaledWithHumanOutput{
133133
Value: plans,
134134
Output: output.Combined{
135+
planSection("premium", "Premium", rows["premium"], showPrices, s.pricesDuration),
136+
planSection("starter", "Starter", rows["starter"], showPrices, s.pricesDuration),
135137
planSection("general_purpose", "General purpose", rows["general_purpose"], showPrices, s.pricesDuration),
136138
planSection("gpu", "GPU", rows["gpu"], showPrices, s.pricesDuration),
137139
planSection("cloud_native", "Cloud native", rows["cloud_native"], showPrices, s.pricesDuration),
@@ -143,6 +145,12 @@ func (s *planListCommand) ExecuteWithoutArguments(exec commands.Executor) (outpu
143145
}
144146

145147
func planType(p upcloud.Plan) string {
148+
if strings.HasPrefix(p.Name, "PREMIUM-") {
149+
return "premium"
150+
}
151+
if strings.HasPrefix(p.Name, "STARTER-") {
152+
return "starter"
153+
}
146154
if strings.HasPrefix(p.Name, "DEV-") {
147155
return "developer"
148156
}

0 commit comments

Comments
 (0)