fabric: consolidate interface templates
Mostly to avoid special‐casing bond interfaces, and to support BGP connections over virtual interfaces.
This commit is contained in:
parent
5381fecaa4
commit
ce7c1bd49e
6 changed files with 28 additions and 40 deletions
|
@ -4,7 +4,8 @@
|
|||
| selectattr('role') | selectattr('role.value', '==', 'loopback')
|
||||
| map(attribute='address') %}
|
||||
{% set iface_bgp = interfaces
|
||||
| iface_real | selectattr('enabled')
|
||||
| selectattr('enabled')
|
||||
| rejectattr('type.value', 'in', ('bridge', 'lag'))
|
||||
| rejectattr('mgmt_only') | rejectattr('bridge') | rejectattr('lag') %}
|
||||
{% set iface_server = iface_bgp | selectattr('custom_fields.tenant') %}
|
||||
{% set iface_fabric = iface_bgp | difference(iface_server) | rejectattr('ip_addresses') %}
|
||||
|
@ -65,7 +66,7 @@ router bgp {{ asn.asn }}
|
|||
{% for iface in ifaces_evpn|default([]) %}
|
||||
neighbor {{ iface }} activate
|
||||
{% endfor %}
|
||||
{% if interfaces | selectattr('mode') %}
|
||||
{% if peer is defined and interfaces | selectattr('mode') %}
|
||||
advertise-all-vni
|
||||
{% endif %}
|
||||
exit-address-family
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue