]> git.puffer.fish Git - mirror/frr.git/commitdiff
Merge pull request #18677 from chdxD1/fix-rmac-nhlist
authorPhilippe Guibert <philippe.guibert@6wind.com>
Wed, 23 Apr 2025 13:07:01 +0000 (15:07 +0200)
committerGitHub <noreply@github.com>
Wed, 23 Apr 2025 13:07:01 +0000 (15:07 +0200)
zebra: add vtep_ip to rmac nh_list in all cases

1  2 
tests/topotests/bgp_evpn_rt5/test_bgp_evpn.py

index cbec2a3706e92c2b470cfec88f82ef7b1479dff3,f4af54358bed64739e5bc63ab043d5f6fab2a6fb..3550d4de04a6bcca954a7dd238c978a4c0584d29
@@@ -273,45 -284,9 +284,40 @@@ def test_protocols_dump_info()
      output = tgen.gears["r1"].vtysh_cmd("show evpn vni detail", isjson=False)
      logger.info("==== result from show evpn vni detail")
      logger.info(output)
-     output = tgen.gears["r1"].vtysh_cmd("show evpn next-hops vni all", isjson=False)
-     logger.info("==== result from show evpn next-hops vni all")
-     logger.info(output)
-     output = tgen.gears["r1"].vtysh_cmd("show evpn rmac vni all", isjson=False)
-     logger.info("==== result from show evpn rmac vni all")
-     logger.info(output)
+     _print_evpn_nexthop_rmac("r1")
  
  
 +def test_bgp_vrf_routes():
 +    """
 +    Check routes are correctly imported to VRF
 +    """
 +    tgen = get_topogen()
 +    if tgen.routers_have_failure():
 +        pytest.skip(tgen.errors)
 +
 +    for rname in ("r1", "r2"):
 +        router = tgen.gears[rname]
 +        for af in ("ipv4", "ipv6"):
 +            json_file = "{}/{}/bgp_vrf_{}_routes_detail.json".format(
 +                CWD, router.name, af
 +            )
 +            if not os.path.isfile(json_file):
 +                assert 0, "bgp vrf routes file not found"
 +
 +            expected = json.loads(open(json_file).read())
 +            test_func = partial(
 +                topotest.router_json_cmp,
 +                router,
 +                "show bgp vrf {}-vrf-101 {} unicast detail json".format(
 +                    router.name, af
 +                ),
 +                expected,
 +            )
 +            _, result = topotest.run_and_expect(test_func, None, count=20, wait=1)
 +            assertmsg = '"{}" JSON output mismatches'.format(router.name)
 +            assert result is None, assertmsg
 +
 +
  def test_router_check_ip():
      """
      Check routes are correctly installed