-
Notifications
You must be signed in to change notification settings - Fork 750
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support 2 vlans test in test_acl dynamically #16551
support 2 vlans test in test_acl dynamically #16551
Conversation
Signed-off-by: Zhaohui Sun <[email protected]>
Signed-off-by: Zhaohui Sun <[email protected]>
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@ZhaohuiS PR conflicts with 202405 branch |
@ZhaohuiS PR conflicts with 202311 branch |
@ZhaohuiS PR conflicts with 202411 branch |
@ZhaohuiS PR conflicts with 202305 branch |
@ZhaohuiS all cherry pick conflicted, could you help to take a look? |
Description of PR
Summary:
Fixes # (issue)
#16322 can only run test for the first vlan even t0 has 2 vlan config by default, which is not expected.
We expects to run 2 vlans seperately for all acl cases.
Type of change
Back port request
Approach
What is the motivation for this PR?
In
pytest_generate_tests
hook, depends on how many vlan interfaces in topo file, it parametrizesvlan_name
dynamically before testing.It doesn't need to use hardcode to check the topo name then set vlan_name. It's not flexible.
How did you do it?
In this PR, Add t0-118 topo which has 2 vlan config by default.
In test_acl, will choose vlan ip range and rule id separately.
If default_vlan_config == two_vlan_a, the IP range should choose DOWNSTREAM_DST_IP_VLAN and DOWNSTREAM_DST_IP_VLAN2000 separately for each vlan.
And also chooses different rule id in case test_dest_ip_match_forwarded and test_dest_ip_match_dropped for 2 vlan config.
How did you verify/test it?
verified on two vlan testbed on 202405 image, 384 all passed
Also verified on one vlan testbed on 202405 image, 192 all passed
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation