Fix PR #9312 for KeyError and AttributeError#9523
Fix PR #9312 for KeyError and AttributeError#9523yutongzhang-microsoft merged 6 commits intosonic-net:masterfrom
Conversation
tests/conftest.py
Outdated
There was a problem hiding this comment.
It would be more pythonic to use code like this:
pre_acl_rules = acl_facts.get("DATAACL", {}).get("rules", None)There was a problem hiding this comment.
Thanks, so pythonic
803b6c6 to
8959a7e
Compare
|
@yutongzhang-microsoft Got new merge conflicts. Can you check? |
|
The pre-commit check detected issues in the files touched by this pull request. Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
|
The pre-commit check detected issues in the files touched by this pull request. Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
The pre-commit check detected issues in the files touched by this pull request. Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
|
The pre-commit check detected issues in the files touched by this pull request. Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
|
@yutongzhang-microsoft PR conflicts with 202012 branch |
|
@yutongzhang-microsoft PR conflicts with 202305 branch |
|
@yutongzhang-microsoft PR conflicts with 202205 branch |
Description of PR PR sonic-net#9312 will try to get DATAACL in running config in fixture recover_acl_rule. But if param enable_data_acl is set false when deploying minigraph, DATAACL will not appear in running config. Which may cause key error in fixture recover_acl_rule. In this PR, we fix this issue. What is the motivation for this PR? PR sonic-net#9312 will try to get DATAACL in running config in fixture recover_acl_rule. But if param enable_data_acl is set false when deploying minigraph, DATAACL will not appear in running config. Which may cause key error in fixture recover_acl_rule. In this PR, we fix this issue. How did you do it? Run TC on testbed which enable_data_acl is false when deploying minigraph. Signed-off-by: Yutong Zhang <yutongzhang@microsoft.com>
Description of PR
PR #9312 will try to get DATAACL in running config in fixture
recover_acl_rule. But if paramenable_data_aclis set false when deploying minigraph, DATAACL will not appear in running config. Which may cause key error in fixturerecover_acl_rule. In this PR, we fix this issue.Summary:
Fixes # (issue)
Type of change
Back port request
Approach
What is the motivation for this PR?
PR #9312 will try to get DATAACL in running config in fixture
recover_acl_rule. But if paramenable_data_aclis set false when deploying minigraph, DATAACL will not appear in running config. Which may cause key error in fixturerecover_acl_rule. In this PR, we fix this issue.How did you do it?
Run TC on testbed which
enable_data_aclis false when deploying minigraph.How did you verify/test it?
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation