Fix typos/thinkos

netbox
Daniel Ankers 2024-06-28 17:19:32 +01:00
parent ddf018c4f9
commit 41be232924
1 changed files with 6 additions and 6 deletions

View File

@ -146,19 +146,19 @@ chassis {
{% macro interfacesection(device,vlans) %}
interfaces {
{# 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.filter(name__startswith=='xe-') %}
{% for interface in device.interfaces.filter(name__startswith='xe-') %}
{{ interfaceconfig(interface) }}
{% endfor %}
{% for interface in device.interfaces.filter(name__startswith=='et-') %}
{% for interface in device.interfaces.filter(name__startswith='et-') %}
{{ interfaceconfig(interface) }}
{% endfor %}
{% for interface in device.interfaces.filter(name__startswith=='ae') %}
{% for interface in device.interfaces.filter(name__startswith='ae') %}
{{ interfaceconfig(interface,device.rack.name[5:]) }}
{% endfor %}
{% for interface in device.interfaces.filter(name__exact=='em0') %}
{% for interface in device.interfaces.filter(name__exact='em0') %}
{{ interfaceconfig(interface) }}
{% endfor %}
{% for interface in device.interfaces.filter(name__startswith=='irb') %}
{% for interface in device.interfaces.filter(name__startswith='irb') %}
{% if loop.first %}
irb {
{% endif %}
@ -172,7 +172,7 @@ interfaces {
}
{% endif %}
{% endfor %}
{% for interface in device.interfaces.filter(name__startswith=='lo') %}
{% for interface in device.interfaces.filter(name__startswith='lo') %}
{{ interfaceconfig(interface) }}
{% endfor %}
}