SUNET / cnaas-nms

Campus Network as-a-Service - Network Management System (Campus network automation software)
Other
71 stars 16 forks source link

dhcpv6_relays for ipv6 dhcpv6 relays in vxlans vlan tree #295

Open makzdot opened 1 year ago

makzdot commented 1 year ago

Is your feature request related to a problem? Please describe. We CNAAS-NMS has an option for configuring dhcp_relays. because (for example) Juniper has a different config tree for dhcpv6 we have to 'detect' in Jinja if a dhcp relay is ipv4 or ipv6. This makes the jinja2 templates hacky and ugly.

Describe the solution you'd like Thats why It would be prettier tot just include an option dhcpv6_relays as a list of ipv6 addresses

Describe alternatives you've considered The alternative is to solve it in jinja2 templates. But that can become hacky and cumbersome....at least for a Juniper

Additional context None

lunkwill42 commented 1 year ago

Alternately, maybe it would be useful to have a generic template filter that can filter any list of IP addresses based on address family?

E.g. (pseudo-code):

{{ for addr in filter_ip_family(dhcp_relays, version=6) }}
makzdot commented 1 year ago

Alternately, maybe it would be useful to have a generic template filter that can filter any list of IP addresses based on address family?

E.g. (pseudo-code):

{{ for addr in filter_ip_family(dhcp_relays, version=6) }}

Ah that could probably work let me play with that for a moment. Thanks