Skip to content

Commit

Permalink
Another example of device support being checked later than expected
Browse files Browse the repository at this point in the history
  • Loading branch information
jbemmel committed Nov 3, 2024
1 parent c7a8e49 commit 5180325
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion netsim/modules/evpn.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def register_static_transit_vni(topology: Box) -> None:
continue

for vrf_name,vrf_data in n.vrfs.items():
if vrf_data.get('evpn.transit_vni',None):
if vrf_data and vrf_data.get('evpn.transit_vni',None):
log.error(
f'evpn.transit_vni can be specified only on global VRFs (found in {vrf_name} on {n.name}',
log.IncorrectValue,
Expand Down
2 changes: 2 additions & 0 deletions tests/errors/node-unsupported-module.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
IncorrectValue in modules: Device type vmx used by node n1 is not supported by module evpn
Fatal error in netlab: Cannot proceed beyond this point due to errors, exiting
12 changes: 12 additions & 0 deletions tests/errors/node-unsupported-module.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
defaults.device: vmx
defaults.provider: clab

module: [evpn,bgp,vrf]

bgp.as: 65000

nodes:
n1:
vrfs:
test:
evpn.bundle: vlan

0 comments on commit 5180325

Please sign in to comment.