Skip to content

Commit

Permalink
[acl][L3V4V6] PTF test for ACL table type L3V4V6
Browse files Browse the repository at this point in the history
ACL test-cases based on test plan for L3V4V6 type ACL table
Refer Test Plan: sonic-net#8178

A new script test_acl_l3v4v6.py is added based on existing test_acl.py.
This is to help parallel execution.

Major changes from test_acl.py are:
[1] Skip unsupported platforms based on STATE_DB capability checks
[2] Add templates that have 'ethertype' to distinguish b/w v4 and v6 rules
[3] Remove unsupported matches like L4 port ACL ranges

Signed-off-by: Ravi Marvell [email protected]
  • Loading branch information
rck-innovium committed May 22, 2024
1 parent b5c9c1d commit f1a7f0f
Show file tree
Hide file tree
Showing 8 changed files with 4,052 additions and 0 deletions.
175 changes: 175 additions & 0 deletions tests/acl/templates/acltbv4v6_test_rules_part_1.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
{
"acl": {
"acl-sets": {
"acl-set": {
"{{ acl_table_name }}": {
"acl-entries": {
"acl-entry": {
"1": {
"actions": {
"config": {
"forwarding-action": "DROP"
}
},
"config": {
"sequence-id": 1
},
"l2": {
"config": {
"ethertype": "ETHERTYPE_IPV4"
}
},
"ip": {
"config": {
"source-ip-address": "30.0.0.2/32"
}
}
},
"2": {
"actions": {
"config": {
"forwarding-action": "DROP"
}
},
"config": {
"sequence-id": 2
},
"l2": {
"config": {
"ethertype": "ETHERTYPE_IPV4"
}
},
"ip": {
"config": {
"destination-ip-address": "193.168.0.16/32"
}
}
},
"3": {
"actions": {
"config": {
"forwarding-action": "DROP"
}
},
"config": {
"sequence-id": 3
},
"l2": {
"config": {
"ethertype": "ETHERTYPE_IPV4"
}
},
"ip": {
"config": {
"destination-ip-address": "173.16.2.0/32"
}
}
},
"4": {
"actions": {
"config": {
"forwarding-action": "DROP"
}
},
"config": {
"sequence-id": 4
},
"l2": {
"config": {
"ethertype": "ETHERTYPE_IPV4"
}
},
"transport": {
"config": {
"source-port": "5621"
}
}
},
"13": {
"actions": {
"config": {
"forwarding-action": "DROP"
}
},
"config": {
"sequence-id": 13
},
"l2": {
"config": {
"ethertype": "ETHERTYPE_IPV4"
}
},
"ip": {
"config": {
"protocol":17,
"source-ip-address": "30.0.0.4/32"
}
}
},
"14": {
"actions": {
"config": {
"forwarding-action": "ACCEPT"
}
},
"config": {
"sequence-id": 14
},
"l2": {
"config": {
"ethertype": "ETHERTYPE_IPV4"
}
},
"ip": {
"config": {
"source-ip-address": "30.0.0.6/32"
}
}
},
"27": {
"actions": {
"config": {
"forwarding-action": "ACCEPT"
}
},
"config": {
"sequence-id": 27
},
"l2": {
"config": {
"ethertype": "ETHERTYPE_IPV4"
}
},
"transport": {
"config": {
"source-port": "179"
}
}
},
"28": {
"actions": {
"config": {
"forwarding-action": "ACCEPT"
}
},
"config": {
"sequence-id": 28
},
"l2": {
"config": {
"ethertype": "ETHERTYPE_IPV4"
}
},
"transport": {
"config": {
"destination-port": "179"
}
}
}
}
}
}
}
}
}
}
Loading

0 comments on commit f1a7f0f

Please sign in to comment.