class TestMPLS(VppTestCase):
""" MPLS Test Case """
+ @classmethod
+ def setUpClass(cls):
+ super(TestMPLS, cls).setUpClass()
+
+ @classmethod
+ def tearDownClass(cls):
+ super(TestMPLS, cls).tearDownClass()
+
def setUp(self):
super(TestMPLS, self).setUp()
self.verify_capture_ip4(self.pg0, rx, tx)
#
- # disposed packets have an invalid IPv4 checkusm
+ # disposed packets have an invalid IPv4 checksum
#
tx = self.create_stream_labelled_ip4(self.pg0, [VppMplsLabel(33)],
dst_ip=self.pg0.remote_ip4,
self.send_and_assert_no_replies(self.pg0, tx, "RPF-ID drop none")
#
- # set the RPF-ID of the enrtry to match the input packet's
+ # set the RPF-ID of the entry to match the input packet's
#
route_232_1_1_1.update_rpf_id(55)
self.verify_capture_ip4(self.pg1, rx, tx)
#
- # disposed packets have an invalid IPv4 checkusm
+ # disposed packets have an invalid IPv4 checksum
#
tx = self.create_stream_labelled_ip4(self.pg0, [VppMplsLabel(34)],
dst_ip="232.1.1.1", n=65,
self.send_and_assert_no_replies(self.pg0, tx, "RPF Miss")
#
- # set the RPF-ID of the enrtry to match the input packet's
+ # set the RPF-ID of the entry to match the input packet's
#
route_ff.update_rpf_id(55)
self.verify_capture_ip6_icmp(self.pg0, rx, tx)
#
- # set the RPF-ID of the enrtry to not match the input packet's
+ # set the RPF-ID of the entry to not match the input packet's
#
route_ff.update_rpf_id(56)
tx = self.create_stream_labelled_ip6(self.pg0,
class TestMPLSDisabled(VppTestCase):
""" MPLS disabled """
+ @classmethod
+ def setUpClass(cls):
+ super(TestMPLSDisabled, cls).setUpClass()
+
+ @classmethod
+ def tearDownClass(cls):
+ super(TestMPLSDisabled, cls).tearDownClass()
+
def setUp(self):
super(TestMPLSDisabled, self).setUp()
self.tbl = VppMplsTable(self, 0)
self.tbl.add_vpp_config()
- # PG0 is MPLS enalbed
+ # PG0 is MPLS enabled
self.pg0.admin_up()
self.pg0.config_ip4()
self.pg0.resolve_arp()
class TestMPLSPIC(VppTestCase):
""" MPLS PIC edge convergence """
+ @classmethod
+ def setUpClass(cls):
+ super(TestMPLSPIC, cls).setUpClass()
+
+ @classmethod
+ def tearDownClass(cls):
+ super(TestMPLSPIC, cls).tearDownClass()
+
def setUp(self):
super(TestMPLSPIC, self).setUp()
rx0 = self.pg0._get_capture(1)
rx1 = self.pg1._get_capture(1)
- # not testig the LB hashing algorithm so we're not concerned
+ # not testing the LB hashing algorithm so we're not concerned
# with the split ratio, just as long as neither is 0
self.assertNotEqual(0, len(rx0))
self.assertNotEqual(0, len(rx1))
#
# use a test CLI command to stop the FIB walk process, this
# will prevent the FIB converging the VPN routes and thus allow
- # us to probe the interim (psot-fail, pre-converge) state
+ # us to probe the interim (post-fail, pre-converge) state
#
self.vapi.ppcli("test fib-walk-process disable")
#
# use a test CLI command to stop the FIB walk process, this
# will prevent the FIB converging the VPN routes and thus allow
- # us to probe the interim (psot-fail, pre-converge) state
+ # us to probe the interim (post-fail, pre-converge) state
#
self.vapi.ppcli("test fib-walk-process disable")
#
# use a test CLI command to stop the FIB walk process, this
# will prevent the FIB converging the VPN routes and thus allow
- # us to probe the interim (psot-fail, pre-converge) state
+ # us to probe the interim (post-fail, pre-converge) state
#
self.vapi.ppcli("test fib-walk-process disable")
class TestMPLSL2(VppTestCase):
""" MPLS-L2 """
+ @classmethod
+ def setUpClass(cls):
+ super(TestMPLSL2, cls).setUpClass()
+
+ @classmethod
+ def tearDownClass(cls):
+ super(TestMPLSL2, cls).tearDownClass()
+
def setUp(self):
super(TestMPLSL2, self).setUp()
self.assertEqual(rx0[0][Ether].src, payload[Ether].src)
#
- # Inject a packet from the custoer/L2 side
+ # Inject a packet from the customer/L2 side
#
tx1 = pcore[MPLS].payload * 65
rx1 = self.send_and_expect(self.pg1, tx1, self.pg0)
#
# add to tunnel to the customers bridge-domain
#
- self.vapi.sw_interface_set_l2_bridge(mpls_tun.sw_if_index,
- bd_id=1)
- self.vapi.sw_interface_set_l2_bridge(self.pg1.sw_if_index,
- bd_id=1)
+ self.vapi.sw_interface_set_l2_bridge(
+ rx_sw_if_index=mpls_tun.sw_if_index, bd_id=1)
+ self.vapi.sw_interface_set_l2_bridge(
+ rx_sw_if_index=self.pg1.sw_if_index, bd_id=1)
#
# Packet from the customer interface and from the core
#
# remove interfaces from customers bridge-domain
#
- self.vapi.sw_interface_set_l2_bridge(mpls_tun.sw_if_index,
- bd_id=1,
- enable=0)
- self.vapi.sw_interface_set_l2_bridge(self.pg1.sw_if_index,
- bd_id=1,
- enable=0)
+ self.vapi.sw_interface_set_l2_bridge(
+ rx_sw_if_index=mpls_tun.sw_if_index, bd_id=1, enable=0)
+ self.vapi.sw_interface_set_l2_bridge(
+ rx_sw_if_index=self.pg1.sw_if_index, bd_id=1, enable=0)
if __name__ == '__main__':
unittest.main(testRunner=VppTestRunner)