summaryrefslogtreecommitdiffstats
path: root/test/vpp_bier.py
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2017-12-05 13:24:04 -0800
committerFlorin Coras <florin.coras@gmail.com>2017-12-09 20:55:08 +0000
commit9128637ee8f7b0d903551f165a1447d427e8dd19 (patch)
tree244014dd1064643946d64066e352ee1627bf622c /test/vpp_bier.py
parentcef87f1a5eb4d69cf11ce1cd3c5506edcfba74c4 (diff)
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 <nranns@cisco.com>
Diffstat (limited to 'test/vpp_bier.py')
-rw-r--r--test/vpp_bier.py18
1 files changed, 6 insertions, 12 deletions
diff --git a/test/vpp_bier.py b/test/vpp_bier.py
index 58c4f7248da..328d4f03eb5 100644
--- a/test/vpp_bier.py
+++ b/test/vpp_bier.py
@@ -4,6 +4,7 @@
import socket
from vpp_object import VppObject
+from vpp_ip_route import MPLS_LABEL_INVALID, VppRoutePath
class BIER_HDR_PAYLOAD:
@@ -18,7 +19,7 @@ class BIER_HDR_PAYLOAD:
class VppBierTableID():
- def __init__(self, set_id, sub_domain_id, hdr_len_id):
+ def __init__(self, sub_domain_id, set_id, hdr_len_id):
self.set_id = set_id
self.sub_domain_id = sub_domain_id
self.hdr_len_id = hdr_len_id
@@ -113,22 +114,17 @@ class VppBierRoute(VppObject):
BIER route
"""
- def __init__(self, test, tbl_id, bp, nh, out_label,
- disp_table=0):
+ def __init__(self, test, tbl_id, bp, paths):
self._test = test
self.tbl_id = tbl_id
- self.out_label = out_label
self.bp = bp
- self.disp_table = disp_table
- self.nh = socket.inet_pton(socket.AF_INET, nh)
+ self.paths = paths
def add_vpp_config(self):
self._test.vapi.bier_route_add_del(
self.tbl_id,
self.bp,
- self.nh,
- self.out_label,
- self.disp_table,
+ self.paths,
is_add=1)
self._test.registry.register(self, self._test.logger)
@@ -136,9 +132,7 @@ class VppBierRoute(VppObject):
self._test.vapi.bier_route_add_del(
self.tbl_id,
self.bp,
- self.nh,
- self.out_label,
- self.disp_table,
+ self.paths,
is_add=0)
def __str__(self):