More fixes

netbox
Dan Ankers 2024-06-28 20:28:24 +01:00
parent 95d2d5caec
commit 81ff852d89
2 changed files with 4 additions and 4 deletions

View File

@ -197,10 +197,10 @@ snmp {
}
{%- endmacro %}
{% macro routingoptionssection(primary_ip4, overlay_as, gateway) %}
{% macro routingoptionssection(device, gateway) %}
routing-options {
router-id {{ primary_ip4.address.ip }};
autonomous-system {{ overlay_as }};
router-id {{ device.primary_ip4.address.ip }};
autonomous-system {{ device.local_context['overlay_as'] }};
{% if gateway %}
static {
route 0.0.0.0/0 next-hop {{ gateway }};

View File

@ -28,7 +28,7 @@ policy-options {
}
}
}
{{ junos.routingoptionssection(primary_ip4, overlay_as, gateway) }}
{{ junos.routingoptionssection(device, gateway) }}
protocols {
{{ junos.bgpsection(device,dcim.Device.objects.filter(tenant=device.tenant,role__name='Spine')) }}
{% if device.role.name == 'Leaf' %}