Repository navigation
feat: add OVH as a cloud provider - #1113
Merged
Merged
Conversation
Adds ovh alongside aws/azure/gcp/hetzner, following the existing CloudProviderInterface pattern (internal/providerovh for the client, pkg/cloud/ovh.go for Deploy/Destroy/Pause/Resume/List/CreateSSHKey/ SSHInto/GetByName). Pause/Resume map onto OVH's built-in shelve/ unshelve, which already stops billing server-side -- no manual snapshot dance needed like Hetzner's. OVH's Public Cloud API has no tags on instances, so unlike the other providers this one treats every instance in the configured project (ovh.serviceName) as onctl-managed; documented in onctl.yaml and README. Request/response field names were verified against the live OVH API schema (eu.api.ovh.com/1.0/cloud.json), not guessed. First of three planned providers (OVH, Scaleway, StackIT) from the docs/static/notes/ sovereign-cloud research; see docs/plans/ovh-provider.md. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JhQDPNcYjg8iAJ2HGZYYwm
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
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.
Summary
ovhas a supported cloud provider, following the existingCloudProviderInterfacepattern used by aws/azure/gcp/hetznerinternal/providerovh(client construction via OVH's app-key/app-secret/consumer-key auth) andpkg/cloud/ovh.go(Deploy/Destroy/Pause/Resume/List/ListPaused/CreateSSHKey/SSHInto/GetByName)shelve/unshelveinstance actions, which already stop billing server-side — no manual snapshot juggling needed like Hetzner's Pauseonctltreats every instance in the configuredovh.serviceNameproject as its own forls/destroy. Documented prominently inonctl.yamland README — don't pointonctlat an OVH project with unrelated VMseu.api.ovh.com/1.0/cloud.json), not guesseddocs/static/notes/sovereign-cloud research; plan atdocs/plans/ovh-provider.mdTest plan
go build ./...andgo vet ./...go test ./...— newpkg/cloud/ovh_test.gouses a real*ovh.Clientagainst anhttptestserver (same style ashetzner_images_test.go), covering Deploy (flavor/image name→id resolution, create payload, poll-to-ACTIVE), Pause/Resume (shelve/unshelve), List/ListPaused, GetByName, Destroy, and CreateSSHKey (idempotent match-by-fingerprint)pause_resume_test.go's cross-provider contract test extended to coverProviderOvhonctl init→ fill inovh.serviceName→export OVH_APPLICATION_KEY=... OVH_APPLICATION_SECRET=... OVH_CONSUMER_KEY=...→onctl create -p ovh/onctl ls -p ovh/onctl pause/onctl resume/onctl destroy. A few specifics (exactBUILD→ACTIVEtiming,userDatabase64-vs-plain-text) are documented from the API schema but not yet exercised live — flagged in the plan's Verification section rather than claimed as fully verifiedNote: two pre-existing
cmdtest failures (TestReadConfig_NoConfigDirectory,TestCreateFlagsBindToViper) reproduce identically onmainwithout this branch's changes — they read this machine's real~/.onctl, a pre-existing test-isolation issue unrelated to this PR.🤖 Generated with Claude Code
https://claude.ai/code/session_01JhQDPNcYjg8iAJ2HGZYYwm