Skip to content

[action] [PR:9199] Recover default acl rules if necessary in module crm/test_crm.py. #9225

Merged
mssonicbld merged 1 commit intosonic-net:202305from
mssonicbld:cherry/202305/9199
Aug 2, 2023
Merged

[action] [PR:9199] Recover default acl rules if necessary in module crm/test_crm.py. #9225
mssonicbld merged 1 commit intosonic-net:202305from
mssonicbld:cherry/202305/9199

Conversation

@mssonicbld
Copy link
Copy Markdown
Collaborator

Description of PR

In module crm/test_crm.py, it will delete all acl rules after test running. But of DUT has original data plan acl rules, they are also deleted, and will cause inconsistent between previous running config and current running config. In this PR, we will recover original acl rules if exist.

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 201911
  • 202012
  • 202205

Approach

What is the motivation for this PR?

In module crm/test_crm.py, it will delete all acl rules after test running. But of DUT has original data plan acl rules, they are also deleted, and will cause inconsistent between previous running config and current running config. In this PR, we will recover original acl rules if exist.

How did you do it?

Add a fixture to record the original data plan acl rules and recover them if exist.

How did you verify/test it?

05:46:38 conftest.core_dump_and_config_check L1767 INFO | Collecting running config after test on str2-7050qx-32s-acs-02

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

…onic-net#9199)

Description of PR
In module crm/test_crm.py, it will delete all acl rules after test running. But of DUT has original data plan acl rules, they are also deleted, and will cause inconsistent between previous running config and current running config. In this PR, we will recover original acl rules if exist.

What is the motivation for this PR?
In module crm/test_crm.py, it will delete all acl rules after test running. But of DUT has original data plan acl rules, they are also deleted, and will cause inconsistent between previous running config and current running config. In this PR, we will recover original acl rules if exist.

How did you do it?
Add a fixture to record the original data plan acl rules and recover them if exist.

How did you verify/test it?
05:46:38 conftest.core_dump_and_config_check      L1767 INFO   | Collecting running config after test on str2-7050qx-32s-acs-02

Signed-off-by: Yutong Zhang <[email protected]>
@mssonicbld
Copy link
Copy Markdown
Collaborator Author

Original PR: #9199

@mssonicbld mssonicbld merged commit fd3a488 into sonic-net:202305 Aug 2, 2023
@mssonicbld mssonicbld deleted the cherry/202305/9199 branch February 4, 2024 09:07
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.

2 participants