netbox-bgp icon indicating copy to clipboard operation
netbox-bgp copied to clipboard

Allow routing-policy-rules to refer to communities by ID in POST API

Open RedLine89 opened this issue 7 months ago • 0 comments

Problem When creating routing-policy-rules via an API the only way to refer to match_community or match_community_list is via it's ID. This is inconsistent with other POST APIs in BGP plugin like /community-list-rule/ that allows to pass name of community-list the rule is going to be attached to. The same works for /prefix-list-rule POST API. References by name (instead of IDs) would allow for declarative creation of routing policy rules, greatly simplifying managing common policies, especially when hosted in a git repository.

Describe the solution you'd like Update POST API for /api/plugins/bgp/routing-policy-rule/ to accept routing-policy name in addition to existing ID. Similar to how it is implemented for prefix-list rules:

Image

RedLine89 avatar Apr 21 '25 16:04 RedLine89