-
Notifications
You must be signed in to change notification settings - Fork 520
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
[dvs_acl] Refactor and document dvs_acl library #1378
Conversation
This pull request fixes 6 alerts when merging d446794 into ea30f2f - view on LGTM.com fixed alerts:
|
This pull request fixes 6 alerts when merging 9956169 into ea30f2f - view on LGTM.com fixed alerts:
|
retest vs please |
1 similar comment
retest vs please |
- Add docstrings to dvs_acl - Revert dvs_acl to a vanilla fixture - Combine redundant dvs_acl methods - Refactor test_acl, test_port_dpb_acl, and test_mirror_port_span to use new interface Signed-off-by: Danny Allen <[email protected]>
This pull request fixes 6 alerts when merging 03d33e7 into 2fe99e0 - view on LGTM.com fixed alerts:
|
test failures are not related to this change |
This pull request fixes 6 alerts when merging 14a9170 into 6da7036 - view on LGTM.com fixed alerts:
|
…sonic-net#1378) - What I did Remove dhcp relay commands from sonic-utilities. dhcp-relay commands will come as a plugin with dhcp-relay docker installation. See sonic-net/SONiC#682 - How I did it Remove dhcp-relay commands from vlan. Make "show vlan brief" command table output extendable. - How to verify it Install dhcp-relay docker as app.ext. Verify that "config vlan dhcp-relay" and "show vlan brief" show dhcp data.
Signed-off-by: Danny Allen [email protected]
What I did/why I did it
I changed
dvs_acl
back into an explicit fixture that is passed in to the test methods. The reason for this is because I figured out that tools likepylint
andflake8
do not handle therequest.cls...
update very well, which is going to be problematic very soon. In addition, this change makes it a little easier for new contributers/newdvslib
adopters to see what is going on by making the inclusion of thedvs_acl
module a little more explicit.I merged a few methods together in
dvs_acl
that were checking the same things (primarily the ACL group and port binding checks). This is for maintainability and to keep the public interface cleaner.I added a bunch of type hints and docstrings to
dvs_acl
to make the usage more clear.I created some fixtures in
test_acl
so that each individual test case can be run standalone, if the user asks for it. This should also make the PR tests more stable as it will be easier forflaky
to re-run test cases in a controlled manner. Fixes [testing] vs tests in TestAcl in test_acl.py have dependency on each other #1154I deleted some dead ACL code from
conftest
as it wasn't being used bytest_acl
ortest_port_dpb_acl
anymore with thedvslib
additions.How I verified it
Ran the test suite locally and it passes w/ the refactor.
Details if related
Once this refactor is merged we can begin converting the rest of
test_acl_*
andtest_mirror_*
to usedvslib
.