Fix some selections which no longer come from GraphQL

netbox
Daniel Ankers 2024-06-28 13:13:22 +01:00
parent 7fa90e6df9
commit 5114a4fcad
1 changed files with 5 additions and 5 deletions

View File

@ -3,7 +3,7 @@
{% if device.role['name'] == 'Leaf' %} {% if device.role['name'] == 'Leaf' %}
{{ junos.chassissection(device,breakout_ports) }} {{ junos.chassissection(device,breakout_ports) }}
{% endif %} {% endif %}
{{ junos.interfacesection(device,tenant['vlans']) }} {{ junos.interfacesection(device,ipam.VLAN.objects.filter(tenant=device.tenant)) }}
{{ junos.snmpsection(rack, snmp) }} {{ junos.snmpsection(rack, snmp) }}
{% if device_role['name'] == 'Leaf' %} {% if device_role['name'] == 'Leaf' %}
forwarding-options { forwarding-options {
@ -30,8 +30,8 @@ policy-options {
} }
{{ junos.routingoptionssection(primary_ip4, overlay_as, gateway) }} {{ junos.routingoptionssection(primary_ip4, overlay_as, gateway) }}
protocols { protocols {
{{ junos.bgpsection(device,tenant['spines']) }} {{ junos.bgpsection(device,dcim.Device.objects.filter(tenant=device.tenant,role__name='Spine')) }}
{% if device_role['name'] == 'Leaf' %} {% if role['name'] == 'Leaf' %}
evpn { evpn {
encapsulation vxlan; encapsulation vxlan;
extended-vni-list all; extended-vni-list all;
@ -44,7 +44,7 @@ protocols {
{{ junos.sflowsection(sflow) }} {{ junos.sflowsection(sflow) }}
{% endif %} {% endif %}
} }
{% if device_role['name'] == 'Leaf' %} {% if role['name'] == 'Leaf' %}
switch-options { switch-options {
vtep-source-interface lo0.0; vtep-source-interface lo0.0;
route-distinguisher {{ primary_ip4['address'][:-3] }}:1; route-distinguisher {{ primary_ip4['address'][:-3] }}:1;
@ -53,5 +53,5 @@ switch-options {
auto; auto;
} }
} }
{{ junos.vlanssection(tenant['vlans'], device) }} {{ junos.vlanssection(ipam.VLAN.objects.filter(tenant=device.tenant), device) }}
{% endif %} {% endif %}