Repository navigation
Conversation
Bxota
added this pull request to stack #294
October 7, 2026 09:33
Bxota
marked this pull request as ready for review
October 7, 2026 09:36
Bxota
force-pushed
the
dev/tleterme/instance-v2
branch
from
October 8, 2026 08:20
db88950 to
dd65018
Compare
- Migrate instance list/get/delete/set-name to API v2 - Rewrite the get template on the v2 envelope - Add --wait to set-name - Switch instance shell completions to the v2 listing - Resync instance routes in cloud_v2.json with the live spec Signed-off-by: Thomas Leterme <thomas.leterme@corp.ovh.com>
amstuta
force-pushed
the
dev/tleterme/instance-v2
branch
from
October 9, 2026 14:40
dd65018 to
0994e19
Compare
This branch has not been deployed
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
First step of the instance migration to API v2:
instance list,get,deleteandset-namenow use/v2/publicCloud/project/{projectId}/compute/instance[/{instanceId}]. The otherinstancesubcommands stay on v1 and will be migrated in follow-up PRs.list: a single v2 call returning full objects, instead of listing IDs then fetching each instance. Columns:id,name,region,powerState,statusget: template rewritten on the v2 envelope (status, power state, region/AZ, SSH key, lock, IP addresses with type and network, flavor, image, volumes, security groups, current tasks)set-name: same command and arguments; fetches the instance, changestargetSpec.nameand sends back the editabletargetSpecwith thechecksum. Adds--waitdelete: asynchronous in v2, the message is now "Instance X is being deleted"cloud_v2.jsonwith the live speccurrentState, an instance without image, theset-namePUT body,--waitand a 404Manually tested on a real v2 instance (create via API v2, then
list/get/set-name --wait/delete).Breaking changes
instance listno longer has aflavor.namecolumn (only available incurrentState, shown byget)--filterexpressions oninstance listapply to the v2 envelope:name=="x"becomestargetSpec.name=="x",regionbecomestargetSpec.location.regionset-namenow requirespublicCloudProject:apiovh:instance/edit, andlist/get/deletethe v2instance/get/instance/deleteactionsType of change
Checklist:
go mod tidy