Skip to content

Commit 3f03c6a

Browse files
authored
chore(server): add plans section for cloud native plans (#373)
1 parent ad0a391 commit 3f03c6a

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
- Added support for Valkey properties
1313
- Add termination_protection to upctl database show output
1414

15+
### Changed
16+
17+
- List cloud native plans in their own section in human readable `server plans` output.
18+
1519
## [3.14.0] - 2025-01-08
1620

1721
### Added

internal/commands/server/plan_list.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ func (s *planListCommand) ExecuteWithoutArguments(exec commands.Executor) (outpu
5757
Value: plans,
5858
Output: output.Combined{
5959
planSection("general_purpose", "General purpose", rows["general_purpose"]),
60+
planSection("cloud_native", "Cloud native", rows["cloud_native"]),
6061
planSection("high_cpu", "High CPU", rows["high_cpu"]),
6162
planSection("high_memory", "High memory", rows["high_memory"]),
6263
planSection("developer", "Developer", rows["developer"]),
@@ -74,6 +75,9 @@ func planType(p upcloud.Plan) string {
7475
if strings.HasPrefix(p.Name, "HIMEM-") {
7576
return "high_memory"
7677
}
78+
if strings.HasPrefix(p.Name, "CLOUDNATIVE-") {
79+
return "cloud_native"
80+
}
7781
return "general_purpose"
7882
}
7983

0 commit comments

Comments
 (0)