From dd25434241cc165f9d28c7761fc1883d7b05f73e Mon Sep 17 00:00:00 2001 From: Dan Ankers Date: Fri, 28 Jun 2024 22:45:01 +0100 Subject: [PATCH] Fix overlay AS --- juniper-macros.j2 | 4 ++-- juniper-vxlan.j2 | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/juniper-macros.j2 b/juniper-macros.j2 index 5b75883..67ef287 100644 --- a/juniper-macros.j2 +++ b/juniper-macros.j2 @@ -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 }}; diff --git a/juniper-vxlan.j2 b/juniper-vxlan.j2 index 1059bee..8fbd760 100644 --- a/juniper-vxlan.j2 +++ b/juniper-vxlan.j2 @@ -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' %}