Skip to content

Commit

Permalink
Block Storage: Fix volume show with snapshot (#589)
Browse files Browse the repository at this point in the history
# Description
<!--
* Prefix: the title with the component name being changed. Add a short
and self describing sentence to ease the review
* Please add a few lines providing context and describing the change
* Please self comment changes whenever applicable to help with the
review process
* Please keep the checklist as part of the PR. Tick what applies to this
change.
-->

```
$ exo compute block-storage show test
┼─────────────────────────┼──────────────────────────────────────┼
│  BLOCK STORAGE VOLUME   │                                      │
┼─────────────────────────┼──────────────────────────────────────┼
│ Block Storage Snapshots │ a24132b7-300f-45b4-8912-f66bbd80231b │
│                         │ 6a3ece44-0932-4bb2-b298-9c5944cbfce8 │
│ Blocksize               │ 4096                                 │
│ Created AT              │ 2024-04-12 15:25:48 +0000 UTC        │
│ ID                      │ a8602290-2df5-4313-9c7f-30d66d8d293f │
│ Instance                │ n/a                                  │
│ Name                    │ test                                 │
│ Size                    │ 10 GiB                               │
│ State                   │ detached                             │
┼─────────────────────────┼──────────────────────────────────────┼
```

## Checklist
(For exoscale contributors)

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

## Testing

<!--
Describe the tests you did
-->

---------

Signed-off-by: Pierre-Emmanuel Jacquier <[email protected]>
  • Loading branch information
pierre-emmanuelJ authored Apr 15, 2024
1 parent 82e2e7a commit 032b0d2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Unrelease

- Block Storage: Fix volume show with snapshot #589

## 1.77.1

### Features
Expand Down
6 changes: 5 additions & 1 deletion cmd/blockstorage_show.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ func (c *blockStorageShowCmd) cmdRun(cmd *cobra.Command, _ []string) error {
if err != nil {
return err
}
volume, err := volumes.FindBlockStorageVolume(c.Name)
v, err := volumes.FindBlockStorageVolume(c.Name)
if err != nil {
return err
}
volume, err := client.GetBlockStorageVolume(ctx, v.ID)
if err != nil {
return err
}
Expand Down

0 comments on commit 032b0d2

Please sign in to comment.