VLANs section and AE interfaces should be sorted alphabetically by name
parent
91110cf203
commit
4b6297e832
|
|
@ -147,7 +147,7 @@ interfaces {
|
|||
{% for interface in device['interfaces'] if interface['name'].startswith('et-') %}
|
||||
{{ interfaceconfig(interface) }}
|
||||
{% endfor %}
|
||||
{% for interface in device['interfaces'] if interface['name'].startswith('ae') %}
|
||||
{% for interface in device['interfaces']|sort(attribute='name') if interface['name'].startswith('ae') %}
|
||||
{{ interfaceconfig(interface,device['rack']['name'][5:]) }}
|
||||
{% endfor %}
|
||||
{% for interface in device['interfaces'] if interface['name']=='em0' %}
|
||||
|
|
@ -303,7 +303,7 @@ routing-options {
|
|||
{% macro vlanssection(vlans,device) %}
|
||||
vlans {
|
||||
{# This next line selects all of the VLANs which are configured on this device #}
|
||||
{% for vlan in vlans|sort(attribute='vid') if (device['interfaces']|selectattr('untagged_vlan.vid','equalto',vlan)|list|count or interfaces|map(attribute='tagged_vlans')|sum(start=[])|selectattr('vid','equalto',vlan)|list|count) or device['interfaces']|selectattr('name', 'equalto', 'irb.'+vlan['vid']|string)|list|count %}
|
||||
{% for vlan in vlans|sort(attribute='name') if (device['interfaces']|selectattr('untagged_vlan.vid','equalto',vlan)|list|count or interfaces|map(attribute='tagged_vlans')|sum(start=[])|selectattr('vid','equalto',vlan)|list|count) or device['interfaces']|selectattr('name', 'equalto', 'irb.'+vlan['vid']|string)|list|count %}
|
||||
vl{{ vlan['vid'] }} {
|
||||
{% if vlan['name'] != '' %}
|
||||
description "{{ vlan['name'] }}";
|
||||
|
|
|
|||
Loading…
Reference in New Issue