feat(ovhcloud-cli): refactor all storage commands#171
Merged
Conversation
9894316 to
6342126
Compare
added 2 commits
April 8, 2026 10:02
Signed-off-by: Mathis Rocher <mathis.rocher@corp.ovh.com>
Signed-off-by: Mathis Rocher <mathis.rocher@corp.ovh.com>
168581c to
643c4f7
Compare
Signed-off-by: Mathis Rocher <mathis.rocher@corp.ovh.com>
amstuta
approved these changes
Apr 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Restructure all storage CLI commands, add volume edit capabilities (retype + resize), and harmonize naming with Manager/API.
Command hierarchy restructure — Created a parent
storagecommand undercloudthat groups all storage subcommands:cloud storage-block→cloud storage blockcloud storage-file→cloud storage filecloud storage-s3→cloud storage objectcloud storage-swift→cloud storage swiftVolume retype — Added
--typeflag tocloud storage block editallowing volume type changes via the region-scoped PUT endpoint.Volume resize via edit — Added
--sizeflag tocloud storage block edit, replacing the dedicatedupsizecommand. The region-scoped PUT endpoint (/v1/cloud/project/{id}/region/{region}/volume/{volumeId}) handles both retype and resize.Removed
upsizecommand — Resize is now handled byedit --size, aligning with the API which uses a single PUT endpoint for all volume updates.Edit command only sends changed fields — The
editcommand builds its PUT body from explicitly provided flags only, avoiding unintended side effects (e.g., sending an unchangedsizewould trigger a resize validation error from the API).Type of change
Checklist:
go mod tidy