|
@ -1,16 +0,0 @@ |
|
|
{%- macro interface_description(interface, interface_context) %} |
|
|
|
|
|
description "{% if interface.label %}{{ interface.label|replace('"','\\"') or "-" }}: {% endif %}{{ interface.description|replace('"','\\"') or "-" }}{% if interface.connected_endpoint %} ({{ interface.connected_endpoint.name|replace('"','\\"')|replace('.voneus.net','') }}{% if interface.connected_endpoint.device.name %} @ {{ interface.connected_endpoint.device.name|replace('.voneus.net','')|replace('"','\\"') }}{% endif %}){% endif %}{% if interface.cable %} via [{{ interface.cable.label.split("/")[-1] }}]{% endif %}{% if interface.link_peer %} to [{{ interface.link_peer.label or interface.link_peer.name }}{% if interface.link_peer.device %} @ {{ interface.link_peer.device.name.split("/")[-1]|replace('"','\\"')|replace('.voneus.net','') }}]{% 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 %} |
|
|
|