{% set device=({'name':name,'device_role':device_role,'primary_ip4':primary_ip4,'rack':rack,'interfaces':interfaces,'peering_interfaces':peering_interfaces,'config_context':config_context}) %} {% import "juniper-macros-gc.j2" as junos %} {{ junos.systemsection(device) }} {% if device_role['name'] == 'Leaf' %} {{ junos.chassissection(device) }} {% endif %} {{ junos.interfacesection(device,tenant['vlans']) }} {% if device_role['name'] == 'Leaf' %} forwarding-options { storm-control-profiles default { all; } } {% endif %} policy-options { policy-statement BGP_LOOPBACK0 { term TERM1 { from { protocol direct; route-filter {{ primary_ip4['address'] }} exact; } then accept; } } policy-statement PFE-ECMP { then { load-balance per-packet; } } } {{ junos.routingoptionssection(primary_ip4, config_context) }} protocols { {{ junos.bgpsection(device,tenant['spines']) }} {% if device_role['name'] == 'Leaf' %} evpn { encapsulation vxlan; extended-vni-list all; } {% endif %} lldp { interface all; } } {% if device_role['name'] == 'Leaf' %} switch-options { vtep-source-interface lo0.0; route-distinguisher {{ primary_ip4['address'][:-3] }}:1; vrf-target { target:64512:1111; auto; } } {{ junos.vlanssection(tenant['vlans'], device) }} {% endif %}