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()
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()
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", "")
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():