diff --git a/netsim/modules/evpn.py b/netsim/modules/evpn.py index a0362a1d8c..83949d67a3 100644 --- a/netsim/modules/evpn.py +++ b/netsim/modules/evpn.py @@ -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, diff --git a/tests/errors/node-unsupported-module.log b/tests/errors/node-unsupported-module.log new file mode 100644 index 0000000000..06ed2e2c0c --- /dev/null +++ b/tests/errors/node-unsupported-module.log @@ -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 diff --git a/tests/errors/node-unsupported-module.yml b/tests/errors/node-unsupported-module.yml new file mode 100644 index 0000000000..8e22a792a9 --- /dev/null +++ b/tests/errors/node-unsupported-module.yml @@ -0,0 +1,12 @@ +defaults.device: vmx +defaults.provider: clab + +module: [evpn,bgp,vrf] + +bgp.as: 65000 + +nodes: + n1: + vrfs: + test: + evpn.bundle: vlan \ No newline at end of file