Skip to content

feat: add IP firewall (Edge Firewall) management commands#159

Open
pablotoledo wants to merge 1 commit intoovh:mainfrom
pablotoledo:main
Open

feat: add IP firewall (Edge Firewall) management commands#159
pablotoledo wants to merge 1 commit intoovh:mainfrom
pablotoledo:main

Conversation

@pablotoledo
Copy link

Summary

  • Implement full lifecycle management for OVHcloud IP Edge Firewall under ovhcloud ip firewall
  • Commands: firewall list/add/get/enable/disable/delete and firewall rule list/get/create/delete
  • Supports --from-file, --init-file, and --editor for rule create (>5 params requirement)

Changes

  • internal/services/ip/firewall.go — service layer (10 functions, FirewallRuleCreateExample, --from-file/pipe support)
  • internal/services/ip/templates/firewall.tmpl — display template for firewall get
  • internal/services/ip/templates/firewall_rule.tmpl — display template for rule get
  • internal/cmd/ip.go — firewall+rule command tree with all required flags
  • internal/cmd/ip_firewall_test.go — 13 unit tests using RFC 5737 documentation IPs
  • README.md — added ip firewall to Available Products table
  • doc/ — 12 generated doc pages via make doc

Checklist

  • Service code isolated in internal/services
  • Command code in internal/cmd
  • rule create (>5 params) supports --editor, --from-file, --init-file
  • --from-file and --editor are mutually exclusive
  • Docs regenerated via make doc
  • Tests added and passing (go test ./...)
  • make build succeeds
  • Signed-off-by trailer present (DCO)
  • Test IPs use RFC 5737 documentation ranges

Signed-off-by: pablotoledo jptgjuanpablo@gmail.com

Implement full lifecycle management for OVHcloud IP firewall (AntiDDoS/
Edge Firewall) under the `ovhcloud ip firewall` command tree:

- ip firewall list/add/get/enable/disable/delete
- ip firewall rule list/get/create/delete

Includes service layer, display templates, command registration,
tests with RFC 5737 documentation IPs, and generated doc pages.

Signed-off-by: pablotoledo <jptgjuanpablo@gmail.com>
@pablotoledo pablotoledo requested a review from a team as a code owner March 4, 2026 09:34
@pablotoledo
Copy link
Author

Hi everyone!

This is a small contribution to solve a use case I need to automate some port firewall rules in VPS I have deployed, it would be nice to avoid the ovh portal or the API scripts for some support activities I have to do.

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