- cls.vapi.ip_add_del_route(dest_ip4n, 32, next_hop_address)
- r = cls.vapi.vxlan_gbp_add_del_tunnel(
- src_addr=cls.pg0.local_ip4n,
- dst_addr=dest_ip4n,
- vni=vni)
- cls.vapi.sw_interface_set_l2_bridge(r.sw_if_index, bd_id=vni)
+ rip = VppIpRoute(cls, dest_ip4, 32,
+ [VppRoutePath(next_hop_address,
+ INVALID_INDEX)],
+ register=False)
+ rip.add_vpp_config()
+ r = cls.vapi.vxlan_gbp_tunnel_add_del(
+ tunnel={
+ 'src': cls.pg0.local_ip4,
+ 'dst': dest_ip4,
+ 'vni': vni,
+ 'instance': INVALID_INDEX,
+ 'mcast_sw_if_index': INVALID_INDEX,
+ 'mode': 1,
+ },
+ is_add=1
+ )
+ cls.vapi.sw_interface_set_l2_bridge(rx_sw_if_index=r.sw_if_index,
+ bd_id=vni)