self.logger.info("ACLP_TEST_START_0001")
# Create a permit-1234 ACL
- r = [AclRule(is_permit=1, proto=17, ports=1234)]
- r[0].sport_to = 1235
+ r = [AclRule(is_permit=1, proto=17, ports=1234, sport_to=1235)]
# Test 1: add a new ACL
first_acl = VppAcl(self, rules=r, tag="permit 1234")
first_acl.add_vpp_config()
encoded_rule[rule_key])
# Create a deny-1234 ACL
- r_deny = [AclRule(is_permit=0, proto=17, ports=1234),
+ r_deny = [AclRule(is_permit=0, proto=17, ports=1234, sport_to=1235),
AclRule(is_permit=1, proto=17, ports=0)]
- r_deny[0].sport_to = 1235
second_acl = VppAcl(self, rules=r_deny, tag="deny 1234;permit all")
second_acl.add_vpp_config()
self.assertTrue(second_acl.query_vpp_config())