Typos. A bunch of typos I've been collecting.
[vpp.git] / test / test_l2bd.py
index 50720e6..a921bdf 100644 (file)
@@ -75,7 +75,7 @@ class TestL2bd(VppTestCase):
             for pg_if in cls.pg_interfaces:
                 sw_if_index = pg_if.sub_if.sw_if_index \
                     if hasattr(pg_if, 'sub_if') else pg_if.sw_if_index
-                cls.vapi.sw_interface_set_l2_bridge(sw_if_index,
+                cls.vapi.sw_interface_set_l2_bridge(rx_sw_if_index=sw_if_index,
                                                     bd_id=cls.bd_id)
 
             # setup all interfaces
@@ -99,7 +99,7 @@ class TestL2bd(VppTestCase):
         Clear trace and packet infos before running each test.
         """
         super(TestL2bd, self).setUp()
-        self.packet_infos = {}
+        self.reset_packet_infos()
 
     def tearDown(self):
         """
@@ -158,8 +158,7 @@ class TestL2bd(VppTestCase):
             dst_if = self.flows[src_if][i % 2]
             dst_host = random.choice(self.hosts_by_pg_idx[dst_if.sw_if_index])
             src_host = random.choice(self.hosts_by_pg_idx[src_if.sw_if_index])
-            pkt_info = self.create_packet_info(
-                src_if.sw_if_index, dst_if.sw_if_index)
+            pkt_info = self.create_packet_info(src_if, dst_if)
             payload = self.info_to_payload(pkt_info)
             p = (Ether(dst=dst_host.mac, src=src_host.mac) /
                  IP(src=src_host.ip4, dst=dst_host.ip4) /
@@ -185,7 +184,7 @@ class TestL2bd(VppTestCase):
             last_info[i.sw_if_index] = None
         dst_sw_if_index = pg_if.sw_if_index
         for packet in capture:
-            payload_info = self.payload_to_info(str(packet[Raw]))
+            payload_info = self.payload_to_info(packet[Raw])
             src_sw_if_index = payload_info.src
             src_if = None
             for ifc in self.pg_interfaces:
@@ -253,7 +252,7 @@ class TestL2bd(VppTestCase):
         Test scenario:
             1.config
                 MAC learning enabled
-                learn 100 MAC enries
+                learn 100 MAC entries
                 3 interfaces: untagged, dot1q, dot1ad (dot1q used instead of
                 dot1ad in the first version)
 
@@ -270,7 +269,7 @@ class TestL2bd(VppTestCase):
          Test scenario:
             1.config
                 MAC learning enabled
-                learn 100 MAC enries
+                learn 100 MAC entries
                 3 interfaces: untagged, dot1q, dot1ad (dot1q used instead of
                 dot1ad in the first version)