Dev/olivierdubo/call apiv2 - #201
Open
duboolivier wants to merge 7 commits into
Open
Conversation
duboolivier
force-pushed
the
dev/olivierdubo/call_apiv2
branch
from
June 25, 2026 09:01
7ccd52f to
7bcaca0
Compare
Signed-off-by: olivier dubo <olivier.dubo@ovhcloud.com>
Signed-off-by: olivier dubo <olivier.dubo@ovhcloud.com>
Signed-off-by: olivier dubo <olivier.dubo@ovhcloud.com>
Signed-off-by: olivier dubo <olivier.dubo@ovhcloud.com>
Signed-off-by: olivier dubo <olivier.dubo@ovhcloud.com>
duboolivier
force-pushed
the
dev/olivierdubo/call_apiv2
branch
from
July 6, 2026 09:13
c0adb35 to
d209427
Compare
amstuta
reviewed
Jul 6, 2026
amstuta
reviewed
Jul 6, 2026
Signed-off-by: olivier dubo <olivier.dubo@ovhcloud.com>
…apiv2 # Conflicts: # internal/cmd/cloud_storage_block.go
amstuta
reviewed
Jul 31, 2026
| } | ||
|
|
||
| var response map[string]any | ||
| if err := httpLib.Client.Post(volumeV2Endpoint(projectID), map[string]any{"targetSpec": targetSpec}, &response); err != nil { |
Collaborator
There was a problem hiding this comment.
why did you stop using common.CreateResource ? With what you did, the interactive / from-file creation don't work anymore, and the mandatory parameters are not checked anymore
amstuta
reviewed
Jul 31, 2026
| } | ||
|
|
||
| var updated map[string]any | ||
| if err := httpLib.Client.Put(endpoint, body, &updated); err != nil { |
Collaborator
There was a problem hiding this comment.
same as in create func, you should keep using common.EditResource. In your PR, no parameter is checked, so you can just call update command without parameters and it makes the call
amstuta
requested changes
Jul 31, 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
Migrate block storage API calls (volumes, snapshots, backups) from apiV6 to apiv2 (/v2/publicCloud/project/{id}/storage/block/...), adapting request bodies (targetSpec), display (currentState) and tests.
Checklist:
go mod tidy