Merge pull request #15406 from donaldsharp/evpn_mh_fix

tests: bgp_evpn_mh timing issue fix
This commit is contained in:
Donatas Abraitis 2024-02-23 10:04:50 +02:00 committed by GitHub
commit 3b8c98916a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -389,13 +389,6 @@ def setup_module(module):
tors.append("torm22")
config_tors(tgen, tors)
hosts = []
hosts.append("hostd11")
hosts.append("hostd12")
hosts.append("hostd21")
hosts.append("hostd22")
config_hosts(tgen, hosts)
# tgen.mininet_cli()
# This is a sample of configuration loading.
router_list = tgen.routers()
@ -410,6 +403,13 @@ def setup_module(module):
TopoRouter.RD_BGP, os.path.join(CWD, "{}/evpn.conf".format(rname))
)
tgen.start_router()
hosts = []
hosts.append("hostd11")
hosts.append("hostd12")
hosts.append("hostd21")
hosts.append("hostd22")
config_hosts(tgen, hosts)
# tgen.mininet_cli()
@ -634,6 +634,7 @@ def check_mac(dut, vni, mac, m_type, esi, intf, ping_gw=False, tgen=None):
out = dut.vtysh_cmd("show evpn mac vni %d mac %s json" % (vni, mac))
tmp_esi = None
mac_js = json.loads(out)
for mac, info in mac_js.items():
tmp_esi = info.get("esi", "")
@ -642,7 +643,15 @@ def check_mac(dut, vni, mac, m_type, esi, intf, ping_gw=False, tgen=None):
if tmp_esi == esi and tmp_m_type == m_type and intf == intf:
return None
return "invalid vni %d mac %s out %s" % (vni, mac, mac_js)
return "invalid vni %d mac %s expected esi %s, %s m_type %s and intf %s out %s" % (
vni,
mac,
tmp_esi,
esi,
m_type,
intf,
mac_js,
)
def test_evpn_mac():