Re-order interfaces

main
Daniel Ankers 2024-01-19 10:38:31 +00:00
parent e9170ef741
commit ff68cb26ca
1 changed files with 5 additions and 1 deletions

View File

@ -140,7 +140,11 @@ chassis {
{% macro interfacesection(device,vlans) %}
interfaces {
{% for interface in device['interfaces'] if interface['name'].startswith('xe-') or interface['name'].startswith('et-') %}
{# Physical interfaces should be sorted by FPC/PIC/Port value - that's a challenge to do in Jinja so we cheat for now by putting the xe- interfaces first. This won't work for all devices! #}
{% for interface in device['interfaces'] if interface['name'].startswith('xe-') %}
{{ interfaceconfig(interface) }}
{% endfor %}
{% for interface in device['interfaces'] if interface['name'].startswith('et-') %}
{{ interfaceconfig(interface) }}
{% endfor %}
{% for interface in device['interfaces'] if interface['name'].startswith('ae') %}