feat: add IP firewall (Edge Firewall) management commands#159
Open
pablotoledo wants to merge 1 commit intoovh:mainfrom
Open
feat: add IP firewall (Edge Firewall) management commands#159pablotoledo wants to merge 1 commit intoovh:mainfrom
pablotoledo wants to merge 1 commit intoovh:mainfrom
Conversation
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>
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. |
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
ovhcloud ip firewallfirewall list/add/get/enable/disable/deleteandfirewall rule list/get/create/delete--from-file,--init-file, and--editorforrule 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 forfirewall getinternal/services/ip/templates/firewall_rule.tmpl— display template forrule getinternal/cmd/ip.go— firewall+rule command tree with all required flagsinternal/cmd/ip_firewall_test.go— 13 unit tests using RFC 5737 documentation IPsREADME.md— addedip firewallto Available Products tabledoc/— 12 generated doc pages viamake docChecklist
internal/servicesinternal/cmdrule create(>5 params) supports--editor,--from-file,--init-file--from-fileand--editorare mutually exclusivemake docgo test ./...)make buildsucceedsSigned-off-bytrailer present (DCO)Signed-off-by: pablotoledo jptgjuanpablo@gmail.com