Typos. A bunch of typos I've been collecting.
[vpp.git] / test / test_ip6.py
index 2f330c5..77ae63b 100644 (file)
@@ -246,8 +246,10 @@ class TestIPv6(TestIPv6ND):
         for i in self.interfaces:
             next_hop_address = i.local_ip6n
             for j in range(count / n_int):
-                self.vapi.ip_add_del_route(
-                    dest_addr, dest_addr_len, next_hop_address, is_ipv6=1)
+                self.vapi.ip_add_del_route(dst_address=dest_addr,
+                                           dst_address_length=dest_addr_len,
+                                           next_hop_address=next_hop_address,
+                                           is_ipv6=1)
                 counter += 1
                 if counter / count * 100 > percent:
                     self.logger.info("Configure %d FIB entries .. %d%% done" %
@@ -561,7 +563,7 @@ class TestIPv6(TestIPv6ND):
 
         #
         # remove the duplicate on pg1
-        # packet stream shoud generate NSs out of pg1
+        # packet stream should generate NSs out of pg1
         #
         ns_pg1.remove_vpp_config()
 
@@ -624,7 +626,7 @@ class TestIPv6(TestIPv6ND):
             # decipher how to decode. this 1st layer of option always returns
             # nested classes, so a direct obj1=obj2 comparison always fails.
             # however, the getlayer(.., 2) does give one instnace.
-            # so we cheat here and construct a new opt instnace for comparison
+            # so we cheat here and construct a new opt instance for comparison
             rd = ICMPv6NDOptPrefixInfo(
                 prefixlen=raos.prefixlen,
                 prefix=raos.prefix,
@@ -683,7 +685,8 @@ class TestIPv6(TestIPv6ND):
         self.send_and_assert_no_replies(self.pg0, pkts, "RA rate limited")
 
         #
-        # When we reconfiure the IPv6 RA config, we reset the RA rate limiting,
+        # When we reconfigure the IPv6 RA config,
+        # we reset the RA rate limiting,
         # so we need to do this before each test below so as not to drop
         # packets for rate limiting reasons. Test this works here.
         #
@@ -854,7 +857,7 @@ class TestIPv6(TestIPv6ND):
                                 opt=opt)
 
         #
-        # Use the reset to defults option to revert to defaults
+        # Use the reset to defaults option to revert to defaults
         #  L and A flag are clear in the advert
         #
         self.pg0.ip6_ra_prefix(self.pg0.local_ip6,
@@ -903,7 +906,7 @@ class TestIPv6(TestIPv6ND):
                                 opt=opt)
 
         #
-        # Remove the first refix-info - expect the second is still in the
+        # Remove the first prefix-info - expect the second is still in the
         # advert
         #
         self.pg0.ip6_ra_prefix(self.pg0.local_ip6,
@@ -923,7 +926,7 @@ class TestIPv6(TestIPv6ND):
                                 opt=opt)
 
         #
-        # Remove the second prefix-info - expect no prefix-info i nthe adverts
+        # Remove the second prefix-info - expect no prefix-info ithe adverts
         #
         self.pg0.ip6_ra_prefix(self.pg1.local_ip6,
                                self.pg1.local_ip6_prefix_len,
@@ -1164,10 +1167,10 @@ class TestIPv6RDControlPlane(TestIPv6ND):
             if entry.address_length == 0:
                 for path in entry.path:
                     if path.sw_if_index != 0xFFFFFFFF:
-                        defaut_route = {}
-                        defaut_route['sw_if_index'] = path.sw_if_index
-                        defaut_route['next_hop'] = path.next_hop
-                        list.append(defaut_route)
+                        default_route = {}
+                        default_route['sw_if_index'] = path.sw_if_index
+                        default_route['next_hop'] = path.next_hop
+                        list.append(default_route)
         return list
 
     @staticmethod
@@ -1564,7 +1567,7 @@ class TestIPDisabled(VppTestCase):
         # create 2 pg interfaces
         self.create_pg_interfaces(range(2))
 
-        # PG0 is IP enalbed
+        # PG0 is IP enabled
         self.pg0.admin_up()
         self.pg0.config_ip6()
         self.pg0.resolve_ndp()
@@ -1741,7 +1744,7 @@ class TestIP6LoadBalance(VppTestCase):
                                   src_ip_hdr))
 
         #
-        # A route for the IP pacekts
+        # A route for the IP packets
         #
         route_3000_1 = VppIpRoute(self, "3000::1", 128,
                                   [VppRoutePath(self.pg1.remote_ip6,
@@ -1779,7 +1782,7 @@ class TestIP6LoadBalance(VppTestCase):
         #    src,dst
         # We are not going to ensure equal amounts of packets across each link,
         # since the hash algorithm is statistical and therefore this can never
-        # be guaranteed. But wuth 64 different packets we do expect some
+        # be guaranteed. But with 64 different packets we do expect some
         # balancing. So instead just ensure there is traffic on each link.
         #
         self.send_and_expect_load_balancing(self.pg0, port_ip_pkts,
@@ -1795,7 +1798,7 @@ class TestIP6LoadBalance(VppTestCase):
 
         #
         # The packets with Entropy label in should not load-balance,
-        # since the Entorpy value is fixed.
+        # since the Entropy value is fixed.
         #
         self.send_and_expect_one_itf(self.pg0, port_ent_pkts, self.pg1)
 
@@ -1804,7 +1807,8 @@ class TestIP6LoadBalance(VppTestCase):
         #  - now only the stream with differing source address will
         #    load-balance
         #
-        self.vapi.set_ip_flow_hash(0, is_ip6=1, src=1, dst=1, sport=0, dport=0)
+        self.vapi.set_ip_flow_hash(vrf_id=0, src=1, dst=1, sport=0, dport=0,
+                                   is_ipv6=1)
 
         self.send_and_expect_load_balancing(self.pg0, src_ip_pkts,
                                             [self.pg1, self.pg2])
@@ -1815,7 +1819,8 @@ class TestIP6LoadBalance(VppTestCase):
         #
         # change the flow hash config back to defaults
         #
-        self.vapi.set_ip_flow_hash(0, is_ip6=1, src=1, dst=1, sport=1, dport=1)
+        self.vapi.set_ip_flow_hash(vrf_id=0, src=1, dst=1, sport=1, dport=1,
+                                   is_ipv6=1)
 
         #
         # Recursive prefixes
@@ -1961,7 +1966,7 @@ class TestIP6Punt(VppTestCase):
         self.pg_start()
 
         #
-        # the number of packet recieved should be greater than 0,
+        # the number of packet received should be greater than 0,
         # but not equal to the number sent, since some were policed
         #
         rx = self.pg1._get_capture(1)