Skip to content

Commit

Permalink
Fix(eos_designs): Fix incorrect syntax in EVPN multicast PIM error me…
Browse files Browse the repository at this point in the history
  • Loading branch information
jonxstill authored Dec 21, 2023
1 parent fa42e82 commit f14bde7
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
type: l3leaf
underlay_multicast: true
evpn_multicast: true

l3leaf:
defaults:
# LOOPBACK AND VTEP MANAGEMENT
loopback_ipv4_pool: 10.10.0.0/24
vtep_loopback_ipv4_pool: 10.11.0.0/24
vtep_loopback: Loopback1
nodes:
- name: failure-missing-evpn-multicast-l3-with-pim
id: 3
bgp_as: 65101
filter:
tags: ['evpn-multicast-pegs']

tenants:
- name: FABRIC
mac_vrf_vni_base: 10000
evpn_l3_multicast:
enabled: false
evpn_underlay_l3_multicast_group_ipv4_pool: 232.0.0.0/20
vrfs:
- name: Tenant_A_OP_Zone_MC
description: "Tenant_A_OP_Zone"
vrf_vni: 10
vtep_diagnostic:
loopback: 31
loopback_ip_range: 10.255.1.0/24
svis:
- id: 210
name: Tenant_A_OP_Zone_1
tags: ['evpn-multicast-l3']
l3_interfaces:
- nodes: [ failure-missing-evpn-multicast-l3-with-pim ]
interfaces: [ Ethernet1 ]
ip_addresses: [ 10.254.248.0/31 ]
descriptions: [ "L3 Link to RPs" ]
enabled: true
pim:
enabled: true

expected_error_message: >-
'pim: enabled' set on l3_interface 'Ethernet1' on 'failure-missing-evpn-multicast-l3-with-pim' requires evpn_l3_multicast: enabled: true under VRF 'Tenant_A_OP_Zone_MC' or Tenant 'FABRIC'
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
type: l3leaf
underlay_multicast: true
evpn_multicast: true

l3leaf:
defaults:
# LOOPBACK AND VTEP MANAGEMENT
loopback_ipv4_pool: 10.10.0.0/24
vtep_loopback_ipv4_pool: 10.11.0.0/24
vtep_loopback: Loopback1
nodes:
- name: failure-missing-evpn-multicast-peg-rps
id: 3
bgp_as: 65101
filter:
tags: ['evpn-multicast-pegs']

tenants:
- name: FABRIC
mac_vrf_vni_base: 10000
evpn_l3_multicast:
enabled: true
evpn_underlay_l3_multicast_group_ipv4_pool: 232.0.0.0/20
vrfs:
- name: Tenant_A_OP_Zone_MC
description: "Tenant_A_OP_Zone"
vrf_vni: 10
vtep_diagnostic:
loopback: 31
loopback_ip_range: 10.255.1.0/24
svis:
- id: 210
name: Tenant_A_OP_Zone_1
tags: ['evpn-multicast-l3']
l3_interfaces:
- nodes: [ failure-missing-evpn-multicast-peg-rps ]
interfaces: [ Ethernet1 ]
ip_addresses: [ 10.254.248.0/31 ]
descriptions: [ "L3 Link to RPs" ]
enabled: true
pim:
enabled: true

expected_error_message: >-
'pim: enabled' set on l3_interface 'Ethernet1' on 'failure-missing-evpn-multicast-peg-rps' requires at least one RP defined in pim_rp_addresses under VRF 'Tenant_A_OP_Zone_MC' or Tenant 'FABRIC'
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ all:
failure-missing-evpn-vlan-bundle:
failure-missing-evpn-multicast-l2:
failure-missing-evpn-multicast-l3:
failure-missing-evpn-multicast-l3-with-pim:
failure-missing-evpn-multicast-peg-rps:
failure-duplicate-evpn-vlan-bundle-name:
ntp-settings-server-vrf-missing-mgmt-ip:
ntp-settings-server-vrf-missing-inband-mgmt-interface:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,14 @@ def ethernet_interfaces(self) -> list | None:
if get(l3_interface, "pim.enabled"):
if not vrf.get("_evpn_l3_multicast_enabled"):
raise AristaAvdError(
f"'pim: enabled' set on l3_interface {interface_name} on {self.shared_utils.hostname} requires evpn_l3_multicast:"
f" enabled: true under VRF '{vrf.name}' or Tenant '{tenant.name}'"
f"'pim: enabled' set on l3_interface '{interface_name}' on '{self.shared_utils.hostname}' requires evpn_l3_multicast:"
f" enabled: true under VRF '{vrf['name']}' or Tenant '{tenant['name']}'"
)

if not vrf.get("_pim_rp_addresses"):
raise AristaAvdError(
f"'pim: enabled' set on l3_interface {interface_name} on {self.shared_utils.hostname} requires at least one RP defined"
f" in pim_rp_addresses under VRF '{vrf.name}' or Tenant '{tenant.name}'"
f"'pim: enabled' set on l3_interface '{interface_name}' on '{self.shared_utils.hostname}' requires at least one RP"
f" defined in pim_rp_addresses under VRF '{vrf['name']}' or Tenant '{tenant['name']}'"
)

interface["pim"] = {"ipv4": {"sparse_mode": True}}
Expand Down

0 comments on commit f14bde7

Please sign in to comment.