From 9128637ee8f7b0d903551f165a1447d427e8dd19 Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Tue, 5 Dec 2017 13:24:04 -0800 Subject: BIER in non-MPLS netowrks as decsribed in section 2.2 ihttps://tools.ietf.org/html/draft-ietf-bier-mpls-encapsulation-10 with BIFT encoding from: https://tools.ietf.org/html/draft-wijnandsxu-bier-non-mpls-bift-encoding-00 changes: 1 - introduce the new BIFT lookup table. BIER tables that have an associated MPLS label are added to the MPLS-FIB. Those that don't are added to the BIER table 2 - BIER routes that have no associated output MPLS label will add a BIFT label. 3 - The BIER FMask has a path-list as a member to resolve via any possible path. Change-Id: I1fd4d9dbd074f0e855c16e9329b81460ebe1efce Signed-off-by: Neale Ranns --- test/vpp_papi_provider.py | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'test/vpp_papi_provider.py') 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): -- cgit 1.2.3-korg