Skip to content

Commit

Permalink
Display the two new blockstorage quotas (#591)
Browse files Browse the repository at this point in the history
# Description
We introduced two new quotas for block storage:
- One for the cumulative size of all block storage volumes of an org
- One for the maximum size of a block storage volume 

Before
```
❯ go run . limits    
┼────────────────────────────┼──────┼──────┼
│          RESOURCE          │ USED │ MAX  │
┼────────────────────────────┼──────┼──────┼
│ Elastic IP addresses       │ 0    │ 10   │
│ IAM API keys               │ 4    │ 100  │
│ Compute instance GPUs      │ 0    │ 1    │
│ Private networks           │ 0    │ 32   │
│ Compute instances          │ 33   │ 50   │
│ Compute instance templates │ 0    │ 30   │
│ Network Load Balancers     │ 0    │ 5    │
│ Compute instance snapshots │ 0    │ 30   │
│ SKS clusters               │ 0    │ 3    │
│ SOS buckets                │ 1    │ 100  │
│ Block Storage Volumes      │ 33   │ 2000 │
┼────────────────────────────┼──────┼──────┼
```

After:
```
❯ go run . limits 
┼───────────────────────────────────┼──────┼───────┼
│             RESOURCE              │ USED │  MAX  │
┼───────────────────────────────────┼──────┼───────┼
│ Max Size of Block Storage Volumes │ 0    │ 10240 │
│ Elastic IP addresses              │ 0    │ 10    │
│ IAM API keys                      │ 4    │ 100   │
│ Compute instance GPUs             │ 0    │ 1     │
│ Private networks                  │ 0    │ 32    │
│ Compute instances                 │ 33   │ 50    │
│ Compute instance templates        │ 0    │ 30    │
│ Network Load Balancers            │ 0    │ 5     │
│ Compute instance snapshots        │ 0    │ 30    │
│ Block Storage cummulative size    │ 900  │ 20480 │
│ SKS clusters                      │ 0    │ 3     │
│ SOS buckets                       │ 1    │ 100   │
│ Block Storage Volumes             │ 33   │ 2000  │
┼───────────────────────────────────┼──────┼───────┼
```
## Checklist
(For exoscale contributors)

* [x] Changelog updated (under *Unreleased* block)
* [x] Testing

## Testing

<!--
Describe the tests you did
-->
  • Loading branch information
aureliar8 authored Apr 16, 2024
1 parent 07481ec commit 3b73a9d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Unreleased

- Block Storage: Show all quotas #591
- Block Storage: Fix volume show with snapshot #589
- storage presign: fix panic when parsing arg[0] #590

Expand Down
4 changes: 4 additions & 0 deletions cmd/limits.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ const (
limitSKSClusters = "sks-cluster"
limitSOSBuckets = "bucket"
limitBlockStorageVolumes = "block-storage-volume"
limitBlockStorage = "block-storage"
limitBlockStorageMaxSize = "block-storage-max-size"
)

type LimitsItemOutput struct {
Expand Down Expand Up @@ -60,6 +62,8 @@ Supported output template annotations: %s`,
limitSKSClusters: "SKS clusters",
limitSOSBuckets: "SOS buckets",
limitBlockStorageVolumes: "Block Storage Volumes",
limitBlockStorage: "Block Storage cumulative size",
limitBlockStorageMaxSize: "Max Size of Block Storage Volumes",
}

out := LimitsOutput{}
Expand Down

0 comments on commit 3b73a9d

Please sign in to comment.