summaryrefslogtreecommitdiffstats
path: root/test/test_bier.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_bier.py')
-rw-r--r--test/test_bier.py38
1 files changed, 22 insertions, 16 deletions
diff --git a/test/test_bier.py b/test/test_bier.py
index b8130ce93f2..793c8ca0362 100644
--- a/test/test_bier.py
+++ b/test/test_bier.py
@@ -7,7 +7,7 @@ from vpp_ip import DpoProto
from vpp_ip_route import VppIpRoute, VppRoutePath, \
VppMplsTable, VppIpMRoute, VppMRoutePath, VppIpTable, \
MRouteEntryFlags, MRouteItfFlags, MPLS_LABEL_INVALID, \
- VppMplsLabel
+ VppMplsLabel, FibPathProto, FibPathType
from vpp_bier import BIER_HDR_PAYLOAD, VppBierImp, VppBierDispEntry, \
VppBierDispTable, VppBierTable, VppBierTableID, VppBierRoute
from vpp_udp_encap import VppUdpEncap
@@ -278,6 +278,7 @@ class TestBier(VppTestCase):
labels=[VppMplsLabel(101)])])
rx = self.send_and_expect(self.pg0, pkts, self.pg1)
+
for nh in nhs:
self.assertTrue(sum(p[MPLS].label == nh['label'] for p in rx))
@@ -353,7 +354,8 @@ class TestBier(VppTestCase):
MRouteItfFlags.MFIB_ITF_FLAG_ACCEPT),
VppMRoutePath(0xffffffff,
MRouteItfFlags.MFIB_ITF_FLAG_FORWARD,
- proto=DpoProto.DPO_PROTO_BIER,
+ proto=FibPathProto.FIB_PATH_NH_PROTO_BIER,
+ type=FibPathType.FIB_PATH_TYPE_BIER_IMP,
bier_imp=bi.bi_index)])
route_ing_232_1_1_1.add_vpp_config()
@@ -418,7 +420,7 @@ class TestBier(VppTestCase):
self, bti, 1,
[VppRoutePath("0.0.0.0",
0xffffffff,
- proto=DpoProto.DPO_PROTO_BIER,
+ proto=FibPathProto.FIB_PATH_NH_PROTO_BIER,
nh_table_id=8)])
bier_route_1.add_vpp_config()
@@ -427,7 +429,7 @@ class TestBier(VppTestCase):
#
bier_de_1 = VppBierDispEntry(self, bdt.id, 99,
BIER_HDR_PAYLOAD.BIER_HDR_PROTO_IPV4,
- DpoProto.DPO_PROTO_BIER,
+ FibPathProto.FIB_PATH_NH_PROTO_BIER,
"0.0.0.0", 0, rpf_id=8192)
bier_de_1.add_vpp_config()
@@ -477,7 +479,7 @@ class TestBier(VppTestCase):
#
bier_de_2 = VppBierDispEntry(self, bdt.id, 0,
BIER_HDR_PAYLOAD.BIER_HDR_PROTO_IPV4,
- DpoProto.DPO_PROTO_BIER,
+ FibPathProto.FIB_PATH_NH_PROTO_BIER,
"0.0.0.0", 0, rpf_id=8192)
bier_de_2.add_vpp_config()
@@ -501,6 +503,7 @@ class TestBier(VppTestCase):
paths=[VppMRoutePath(0xffffffff,
MRouteItfFlags.MFIB_ITF_FLAG_FORWARD,
proto=DpoProto.DPO_PROTO_BIER,
+ type=FibPathType.FIB_PATH_TYPE_BIER_IMP,
bier_imp=bi.bi_index),
VppMRoutePath(self.pg1.sw_if_index,
MRouteItfFlags.MFIB_ITF_FLAG_FORWARD)])
@@ -552,7 +555,8 @@ class TestBier(VppTestCase):
MRouteItfFlags.MFIB_ITF_FLAG_ACCEPT),
VppMRoutePath(0xffffffff,
MRouteItfFlags.MFIB_ITF_FLAG_FORWARD,
- proto=DpoProto.DPO_PROTO_BIER,
+ proto=FibPathProto.FIB_PATH_NH_PROTO_BIER,
+ type=FibPathType.FIB_PATH_TYPE_BIER_IMP,
bier_imp=bi_low.bi_index)])
route_ing_232_1_1_1.add_vpp_config()
route_ing_232_1_1_2 = VppIpMRoute(
@@ -564,7 +568,8 @@ class TestBier(VppTestCase):
MRouteItfFlags.MFIB_ITF_FLAG_ACCEPT),
VppMRoutePath(0xffffffff,
MRouteItfFlags.MFIB_ITF_FLAG_FORWARD,
- proto=DpoProto.DPO_PROTO_BIER,
+ proto=FibPathProto.FIB_PATH_NH_PROTO_BIER,
+ type=FibPathType.FIB_PATH_TYPE_BIER_IMP,
bier_imp=bi_high.bi_index)])
route_ing_232_1_1_2.add_vpp_config()
@@ -582,15 +587,15 @@ class TestBier(VppTestCase):
self, bti, 1,
[VppRoutePath("0.0.0.0",
0xffffffff,
- proto=DpoProto.DPO_PROTO_BIER,
+ proto=FibPathProto.FIB_PATH_NH_PROTO_BIER,
nh_table_id=8)])
bier_route_1.add_vpp_config()
bier_route_max = VppBierRoute(
self, bti, max_bp,
[VppRoutePath("0.0.0.0",
0xffffffff,
- nh_table_id=8,
- proto=DpoProto.DPO_PROTO_BIER)])
+ proto=FibPathProto.FIB_PATH_NH_PROTO_BIER,
+ nh_table_id=8)])
bier_route_max.add_vpp_config()
#
@@ -599,12 +604,12 @@ class TestBier(VppTestCase):
#
bier_de_1 = VppBierDispEntry(self, bdt.id, 333,
BIER_HDR_PAYLOAD.BIER_HDR_PROTO_IPV4,
- DpoProto.DPO_PROTO_BIER,
+ FibPathProto.FIB_PATH_NH_PROTO_BIER,
"0.0.0.0", 10, rpf_id=8192)
bier_de_1.add_vpp_config()
bier_de_1 = VppBierDispEntry(self, bdt.id, 334,
BIER_HDR_PAYLOAD.BIER_HDR_PROTO_IPV4,
- DpoProto.DPO_PROTO_BIER,
+ FibPathProto.FIB_PATH_NH_PROTO_BIER,
"0.0.0.0", 10, rpf_id=8193)
bier_de_1.add_vpp_config()
@@ -713,7 +718,7 @@ class TestBier(VppTestCase):
self, bti, 1,
[VppRoutePath("0.0.0.0",
0xFFFFFFFF,
- is_udp_encap=1,
+ type=FibPathType.FIB_PATH_TYPE_UDP_ENCAP,
next_hop_id=udp_encap.id)])
bier_route.add_vpp_config()
@@ -739,7 +744,8 @@ class TestBier(VppTestCase):
MRouteItfFlags.MFIB_ITF_FLAG_ACCEPT),
VppMRoutePath(0xffffffff,
MRouteItfFlags.MFIB_ITF_FLAG_FORWARD,
- proto=DpoProto.DPO_PROTO_BIER,
+ proto=FibPathProto.FIB_PATH_NH_PROTO_BIER,
+ type=FibPathType.FIB_PATH_TYPE_BIER_IMP,
bier_imp=bi2.bi_index)])
route_ing_232_1_1_1.add_vpp_config()
@@ -793,7 +799,7 @@ class TestBier(VppTestCase):
self, bti, 1,
[VppRoutePath("0.0.0.0",
0xffffffff,
- proto=DpoProto.DPO_PROTO_BIER,
+ proto=FibPathProto.FIB_PATH_NH_PROTO_BIER,
nh_table_id=8)])
bier_route_1.add_vpp_config()
@@ -802,7 +808,7 @@ class TestBier(VppTestCase):
#
bier_de_1 = VppBierDispEntry(self, bdt.id, 99,
BIER_HDR_PAYLOAD.BIER_HDR_PROTO_IPV4,
- DpoProto.DPO_PROTO_BIER,
+ FibPathProto.FIB_PATH_NH_PROTO_BIER,
"0.0.0.0", 0, rpf_id=8192)
bier_de_1.add_vpp_config()