BGP Router Manager templates for Voneus core and aggregation infrastructure
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
980 B

{%- macro interface_description(interface, interface_context) %}
description "{% if interface.label %}{{ interface.label|replace('"','\\"') or "-" }}: {% endif %}{{ interface.description|replace('"','\\"') or "-" }}{% if interface.connected_endpoint and interface.connected_endpoint.device %} ({% if interface.connected_endpoint.device %}{{ interface.connected_endpoint.name|replace('"','\\"') }} @ {{ interface.connected_endpoint.device.name|replace('"','\\"') }}{% endif %}){% endif %}"
{%- endmacro %}
{%- macro interface_addresses(interface, interface_context) %}
family inet {
{%- for address in interface|get_addresses %}{% if address|ipv4 %}
address {{ address.address }}
{%- endif %}{%- endfor %}
}
family inet6 {
{%- for address in interface|get_addresses %}{% if address|ipv6 %}
address {{ address.address }}
{%- endif %}{%- endfor %}
}
{%- endmacro %}