acl: API cleanup
[vpp.git] / src / plugins / acl / test / test_acl_plugin_l2l3.py
index eaddd0f..30b5372 100644 (file)
@@ -267,11 +267,11 @@ class TestACLpluginL2L3(VppTestCase):
                                src_prefix=ip_network(
                                    (p[rule_l3_layer].src, rule_prefix_len)),
                                dst_prefix=ip_network(
-                                   (p[rule_l3_layer].dst, rule_prefix_len)))
-            new_rule.sport_from = rule_l4_sport
-            new_rule.sport_fo = rule_l4_sport
-            new_rule.dport_from = rule_l4_dport
-            new_rule.dport_to = rule_l4_dport
+                                   (p[rule_l3_layer].dst, rule_prefix_len)),
+                               sport_from=rule_l4_sport,
+                               sport_to=rule_l4_sport,
+                               dport_from=rule_l4_dport,
+                               dport_to=rule_l4_dport)
 
             rules.append(new_rule)
             new_rule_permit = copy.copy(new_rule)
@@ -400,16 +400,13 @@ class TestACLpluginL2L3(VppTestCase):
         # change the ACLs a few times
         for i in range(1, 10):
             shuffle(all_rules)
-            acl1.rules = all_rules[::1+(i % 2)]
-            acl1.add_vpp_config()
+            acl1.modify_vpp_config(all_rules[::1+(i % 2)])
 
             shuffle(all_rules)
-            acl2.rules = all_rules[::1+(i % 3)]
-            acl2.add_vpp_config()
+            acl2.modify_vpp_config(all_rules[::1+(i % 3)])
 
             shuffle(all_rules)
-            acl3.rules = all_rules[::1+(i % 5)]
-            acl3.add_vpp_config()
+            acl3.modify_vpp_config(all_rules[::1+(i % 5)])
 
         # restore to how it was before and clean up
         acl_if.n_input = saved_n_input