Fix overlay AS

netbox
Dan Ankers 2024-06-28 22:45:01 +01:00
parent bbd8b63f31
commit dd25434241
2 changed files with 3 additions and 3 deletions

View File

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

View File

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