nat: fix ICMP error translation
[vpp.git] / test / test_l3xc.py
index 696e235..2bcb6d5 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 from socket import inet_pton, inet_ntop, AF_INET, AF_INET6
 import unittest
@@ -87,20 +87,9 @@ class TestL3xc(VppTestCase):
         for i in self.pg_interfaces:
             i.unconfig_ip4()
             i.unconfig_ip6()
-            i.ip6_disable()
             i.admin_down()
         super(TestL3xc, self).tearDown()
 
-    def send_and_expect_load_balancing(self, input, pkts, outputs):
-        self.pg_send(input, pkts)
-        rxs = []
-        for oo in outputs:
-            rx = oo._get_capture(1)
-            self.assertNotEqual(0, len(rx))
-            for r in rx:
-                rxs.append(r)
-        return rxs
-
     def test_l3xc4(self):
         """ IPv4 X-Connect """
 
@@ -132,7 +121,7 @@ class TestL3xc(VppTestCase):
                      dst=self.pg0.local_mac) /
                IP(src="1.1.1.1", dst="1.1.1.2") /
                UDP(sport=1234, dport=1234) /
-               Raw('\xa5' * 100))
+               Raw(b'\xa5' * 100))
         # self.send_and_expect(self.pg0, p_1*NUM_PKTS, self.pg1)
 
         p_2 = []
@@ -141,7 +130,7 @@ class TestL3xc(VppTestCase):
                              dst=self.pg0.local_mac) /
                        IP(src="1.1.1.1", dst="1.1.1.2") /
                        UDP(sport=1000 + ii, dport=1234) /
-                       Raw('\xa5' * 100))
+                       Raw(b'\xa5' * 100))
         self.send_and_expect_load_balancing(self.pg2, p_2,
                                             [self.pg3, self.pg4, self.pg5])