Skip to content

feat(iploadbalancing): add ssl, pending-changes and refresh commands - #298

Open
elvenarg wants to merge 2 commits into
ovh:mainfrom
elvenarg:feat/iploadbalancing-ssl-pending-changes-refresh
Open

elvenarg wants to merge 2 commits into
ovh:mainfrom
elvenarg:feat/iploadbalancing-ssl-pending-changes-refresh

Conversation

@elvenarg

Copy link
Copy Markdown

Description

Add SSL certificate management and configuration apply commands to ovhcloud iploadbalancing.

Two commits, each building and passing tests on its own:

1. SSL certificates (ovhcloud iploadbalancing ssl ...)

Command API call
ssl list <service_name> GET /ipLoadbalancing/{serviceName}/ssl
ssl get <service_name> <ssl_id> GET /ipLoadbalancing/{serviceName}/ssl/{id}
ssl create <service_name> POST /ipLoadbalancing/{serviceName}/ssl
ssl delete <service_name> <ssl_id> DELETE /ipLoadbalancing/{serviceName}/ssl/{id}

ssl create takes --certificate, --chain, --key and --display-name (PEM content, as in webhosting ssl service-create), and goes through common.CreateResource, so --from-file, --init-file, --editor and stdin are supported. certificate and key are required, as in the API schema.

2. Pending changes (ovhcloud iploadbalancing ...)

Command API call
pending-changes <service_name> GET /ipLoadbalancing/{serviceName}/pendingChanges
refresh <service_name> [--zone] POST /ipLoadbalancing/{serviceName}/refresh

pending-changes supports --filter. refresh applies the pending configuration on all zones, or only on --zone, and returns the created task.

Notes for reviewers:

  • ssl list: the API returns a bare list of IDs; they are rendered as [{"id": 1}, ...] so they go through display.RenderTable like other lists.
  • ssl get / ssl delete reject a non-numeric ssl_id before calling the API.

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code follows the style guidelines of this project
  • I have commented my code
  • I ran go mod tidy
  • I have added tests that prove my fix is effective or that my feature works

make fmt, make build, make wasm, make test and make doc were run; doc/ovhcloud.md is unchanged.

🤖 Generated with Claude Code

elvenarg and others added 2 commits October 14, 2026 15:24
Add SSL certificate management commands to the iploadbalancing
service:

- ssl list <service_name>: list SSL certificate IDs
  (GET /ipLoadbalancing/{serviceName}/ssl)
- ssl get <service_name> <ssl_id>: retrieve a SSL certificate
  (GET /ipLoadbalancing/{serviceName}/ssl/{id})
- ssl create <service_name>: add a custom SSL certificate, with
  --certificate, --chain, --key and --display-name flags, and
  support for --from-file, --init-file, --editor and stdin
  (POST /ipLoadbalancing/{serviceName}/ssl)
- ssl delete <service_name> <ssl_id>: delete a custom SSL certificate
  (DELETE /ipLoadbalancing/{serviceName}/ssl/{id})

Tests cover flag and argument parsing, error paths and successful
execution using mocked API responses. Documentation regenerated
with make doc.

Signed-off-by: Martín Alfano <43454843+elvenarg@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add commands to inspect and apply the pending configuration changes
of an iploadbalancing service:

- pending-changes <service_name>: list pending changes per zone
  (GET /ipLoadbalancing/{serviceName}/pendingChanges)
- refresh <service_name> [--zone]: apply the pending configuration
  changes, on all zones or on the given one
  (POST /ipLoadbalancing/{serviceName}/refresh)

Tests cover argument parsing, filtering, error paths and successful
execution using mocked API responses. Documentation regenerated
with make doc.

Signed-off-by: Martín Alfano <43454843+elvenarg@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@elvenarg
elvenarg requested a review from a team as a code owner October 14, 2026 18:32

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant