Skip to content

Commit

Permalink
chore(server): add plans section for cloud native plans (#373)
Browse files Browse the repository at this point in the history
  • Loading branch information
kangasta authored Feb 4, 2025
1 parent ad0a391 commit 3f03c6a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added support for Valkey properties
- Add termination_protection to upctl database show output

### Changed

- List cloud native plans in their own section in human readable `server plans` output.

## [3.14.0] - 2025-01-08

### Added
Expand Down
4 changes: 4 additions & 0 deletions internal/commands/server/plan_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ func (s *planListCommand) ExecuteWithoutArguments(exec commands.Executor) (outpu
Value: plans,
Output: output.Combined{
planSection("general_purpose", "General purpose", rows["general_purpose"]),
planSection("cloud_native", "Cloud native", rows["cloud_native"]),
planSection("high_cpu", "High CPU", rows["high_cpu"]),
planSection("high_memory", "High memory", rows["high_memory"]),
planSection("developer", "Developer", rows["developer"]),
Expand All @@ -74,6 +75,9 @@ func planType(p upcloud.Plan) string {
if strings.HasPrefix(p.Name, "HIMEM-") {
return "high_memory"
}
if strings.HasPrefix(p.Name, "CLOUDNATIVE-") {
return "cloud_native"
}
return "general_purpose"
}

Expand Down

0 comments on commit 3f03c6a

Please sign in to comment.