ciekawy opened a new pull request, #2127:
URL: https://github.com/apache/libcloud/pull/2127

   ## 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 `OvhNodeDriver` with 7 `ex_`-prefixed extension methods 
(following Libcloud convention for provider-specific functionality):
   
   | Method | API Endpoint | Purpose |
   |--------|-------------|---------|
   | `ex_list_vps()` | `GET /vps` | List all VPS names on the account |
   | `ex_get_vps(name)` | `GET /vps/{name}` | Get VPS details as a `Node` 
object |
   | `ex_reboot_vps(name)` | `POST /vps/{name}/reboot` | Reboot a VPS |
   | `ex_start_vps(name)` | `POST /vps/{name}/start` | Start a stopped VPS |
   | `ex_stop_vps(name)` | `POST /vps/{name}/stop` | Stop a running VPS |
   | `ex_rebuild_vps(name, image_id, ssh_key)` | `POST /vps/{name}/rebuild` | 
Reinstall OS |
   | `ex_list_vps_images(name)` | `GET /vps/{name}/images/available` | List 
available OS images |
   
   Additionally includes `_to_vps_node()` and `_to_vps_images()` internal 
converters and a `VPS_STATE_MAP` for mapping VPS-specific states to `NodeState`.
   
   ## 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 methods
   - `libcloud/test/compute/fixtures/ovh/vps_*.json` — 7 JSON mock fixtures
   - `docs/compute/drivers/ovh.rst` — VPS usage documentation with code examples
   
   ## Design Decisions
   
   - **Reuses existing auth infrastructure**: OVH HMAC-SHA1 signing via 
`OvhConnection` works as-is for `/vps/` endpoints
   - **`ex_` prefix convention**: VPS methods are provider-specific extensions, 
not standard Libcloud compute interface
   - **VPS name as ID**: OVH VPS uses the service name (e.g., 
`vps-12345678.vps.ovh.net`) as the primary identifier, which becomes the 
`Node.id`
   - **No `ex_project_id` required**: VPS endpoints don't need a cloud project 
ID, but the constructor still requires one for Public Cloud compatibility
   
   ## Test Plan
   
   - [x] All 10 new VPS test cases pass
   - [x] All 27 existing OVH tests still pass (37 total)
   - [x] Mock HTTP fixtures cover all 7 API endpoints
   - [x] State mapping tests verify VPS state → NodeState conversion


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to