Add OVH VPS compute driver support#2127
Open
ciekawy wants to merge 3 commits intoapache:trunkfrom
Open
Conversation
OVH VPS is a separate product line from Public Cloud that uses the proprietary /vps/ API. This adds 7 extension methods to OvhNodeDriver: ex_list_vps, ex_get_vps, ex_reboot_vps, ex_start_vps, ex_stop_vps, ex_rebuild_vps, and ex_list_vps_images. Includes unit tests with mock fixtures and updated documentation.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## trunk #2127 +/- ##
==========================================
+ Coverage 83.36% 83.38% +0.02%
==========================================
Files 353 353
Lines 81910 82020 +110
Branches 9010 9014 +4
==========================================
+ Hits 68279 68386 +107
- Misses 10799 10801 +2
- Partials 2832 2833 +1
🚀 New features to boost your workflow:
|
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
Add OVH VPS (Virtual Private Server) management support to the existing OVH compute driver.
OVH VPS is a separate product line from OVH Public Cloud instances. It uses the proprietary
/vps/REST API instead of the/cloud/project/OpenStack-based endpoints. Currently, no existing infrastructure tool (Terraform, Ansible, Libcloud) provides VPS management — only the raw OVH Python SDK can do it.This PR extends
OvhNodeDriverwith 7ex_-prefixed extension methods (following Libcloud convention for provider-specific functionality):ex_list_vps()GET /vpsex_get_vps(name)GET /vps/{name}Nodeobjectex_reboot_vps(name)POST /vps/{name}/rebootex_start_vps(name)POST /vps/{name}/startex_stop_vps(name)POST /vps/{name}/stopex_rebuild_vps(name, image_id, ssh_key)POST /vps/{name}/rebuildex_list_vps_images(name)GET /vps/{name}/images/availableAdditionally includes
_to_vps_node()and_to_vps_images()internal converters and aVPS_STATE_MAPfor mapping VPS-specific states toNodeState.Changes
libcloud/compute/drivers/ovh.py— 7 new public methods + 2 internal converters + state map (~150 lines)libcloud/test/compute/test_ovh.py— 10 new test cases for all VPS methodslibcloud/test/compute/fixtures/ovh/vps_*.json— 7 JSON mock fixturesdocs/compute/drivers/ovh.rst— VPS usage documentation with code examplesDesign Decisions
OvhConnectionworks as-is for/vps/endpointsex_prefix convention: VPS methods are provider-specific extensions, not standard Libcloud compute interfacevps-12345678.vps.ovh.net) as the primary identifier, which becomes theNode.idex_project_idrequired: VPS endpoints don't need a cloud project ID, but the constructor still requires one for Public Cloud compatibilityTest Plan