summaryrefslogtreecommitdiffstats
path: root/test/vpp_papi_provider.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/vpp_papi_provider.py')
-rw-r--r--test/vpp_papi_provider.py24
1 files changed, 14 insertions, 10 deletions
diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py
index f8bca821631..c4b1601eb42 100644
--- a/test/vpp_papi_provider.py
+++ b/test/vpp_papi_provider.py
@@ -2701,24 +2701,28 @@ class VppPapiProvider(object):
def bier_route_add_del(self,
bti,
bp,
- next_hop,
- next_hop_label,
- next_hop_table_id,
- next_hop_is_ip4=1,
+ paths,
is_add=1):
""" BIER Route add/del """
+ br_paths = []
+ for p in paths:
+ br_paths.append({'next_hop': p.nh_addr,
+ 'weight': 1,
+ 'afi': 0,
+ 'preference': 0,
+ 'table_id': p.nh_table_id,
+ 'next_hop_id': p.next_hop_id,
+ 'is_udp_encap': p.is_udp_encap,
+ 'n_labels': len(p.nh_labels),
+ 'label_stack': p.nh_labels})
return self.api(
self.papi.bier_route_add_del,
{'br_tbl_id': {"bt_set": bti.set_id,
"bt_sub_domain": bti.sub_domain_id,
"bt_hdr_len_id": bti.hdr_len_id},
'br_bp': bp,
- 'br_n_paths': 1,
- 'br_paths': [{'next_hop': next_hop,
- 'afi': 0,
- 'n_labels': 1,
- 'table_id': next_hop_table_id,
- 'label_stack': [next_hop_label]}],
+ 'br_n_paths': len(br_paths),
+ 'br_paths': br_paths,
'br_is_add': is_add})
def bier_route_dump(self, bti):