Skip to content
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

Bug fix: #4011 #4012 - "show run acl", "show run interfaces" - traceback when no ACL_RULE/INTERFACE is present. #4226

Merged
merged 3 commits into from
Mar 30, 2020

Conversation

noaOrMlnx
Copy link
Collaborator

Signed-off-by: Noa Or noaor@mellanox.com

- What I did

- How I did it
Change logic in main to take data only if the var given in var_json appears in DB.

- How to verify it

  • Make sure running configuration doesn't contain ACL_RULE:
    show run all | grep -r '"ACL_RULE"'
    should print nothing.

  • run command:
    show run acl
    Nothing should be printed and no error should appear.

  • Make sure running configuration doesn't contain INTERFACE:
    show run all | grep -r '"INTERFACE"'
    should print nothing.

  • run command:
    show run interfaces
    Nothing should be printed and no error should appear.

- Description for the changelog

N/A

- A picture of a cute animal (not mandatory but encouraged)

…LE/INTERFACE is present in configuration

- Change logic in main to take data only if the var_json appears in DB.

Signed-off-by: Noa Or <noaor@mellanox.com>
src/sonic-config-engine/sonic-cfggen Outdated Show resolved Hide resolved
@noaOrMlnx
Copy link
Collaborator Author

retest vsimage please

2 similar comments
@noaOrMlnx
Copy link
Collaborator Author

retest vsimage please

@noaOrMlnx
Copy link
Collaborator Author

retest vsimage please

@liat-grozovik
Copy link
Collaborator

@jleveque can you please review unittest and approve?

@jleveque jleveque merged commit 1a0067e into sonic-net:master Mar 30, 2020
abdosi pushed a commit that referenced this pull request Apr 15, 2020
…ack when no ACL_RULE/INTERFACE is present. (#4226)

* Fix bugs - "show run acl/interfaces" returns traceback when no ACL_RULE/INTERFACE is present in configuration
- Change logic in main to take data only if the var_json appears in DB.
- Add unit testing for bug fix & fix comments

Signed-off-by: Noa Or <noaor@mellanox.com>
tiantianlv pushed a commit to SONIC-DEV/sonic-buildimage that referenced this pull request Apr 24, 2020
…terfaces" - traceback when no ACL_RULE/INTERFACE is present. (sonic-net#4226)

* Fix bugs - "show run acl/interfaces" returns traceback when no ACL_RULE/INTERFACE is present in configuration
- Change logic in main to take data only if the var_json appears in DB.
- Add unit testing for bug fix & fix comments

Signed-off-by: Noa Or <noaor@mellanox.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants