Recover default acl rules if necessary in module crm/test_crm.py. #9199
Conversation
|
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:
|
…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]>
|
@yutongzhang-microsoft PR conflicts with 202012 branch |
…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]>
|
Cherry-pick PR to 202305: #9225 |
|
Cherry-pick PR to 202205: #9226 |
…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]>
…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]>
…crm/test_crm.py in 202012 (#9249) Description of PR Cherry pick conflict #9199 What is the motivation for this PR? Cherry pick conflict #9199 Signed-off-by: Yutong Zhang <[email protected]>
Description of PR PR #9199 modified the template acl.json under folder tests/crm/templates and added a key input_interface in this template. Only backend topo supports this key, so it will generate an error log in non-backend topo. In this PR, I revert the change to this template. And for recovery, we have another template in PR #9312 . What is the motivation for this PR? PR #9199 modified the template acl.json under folder tests/crm/templates and added a key input_interface in this template. Only backend topo supports this key, so it will generate an error log in non-backend topo. In this PR, I revert the change to this template. And for recovery, we have another template in PR #9312 How did you do it? Revert the change to template acl json. Signed-off-by: Yutong Zhang <[email protected]>
Description of PR PR sonic-net#9199 modified the template acl.json under folder tests/crm/templates and added a key input_interface in this template. Only backend topo supports this key, so it will generate an error log in non-backend topo. In this PR, I revert the change to this template. And for recovery, we have another template in PR sonic-net#9312 . What is the motivation for this PR? PR sonic-net#9199 modified the template acl.json under folder tests/crm/templates and added a key input_interface in this template. Only backend topo supports this key, so it will generate an error log in non-backend topo. In this PR, I revert the change to this template. And for recovery, we have another template in PR sonic-net#9312 How did you do it? Revert the change to template acl json. Signed-off-by: Yutong Zhang <[email protected]>
Description of PR PR sonic-net#9199 modified the template acl.json under folder tests/crm/templates and added a key input_interface in this template. Only backend topo supports this key, so it will generate an error log in non-backend topo. In this PR, I revert the change to this template. And for recovery, we have another template in PR sonic-net#9312 . What is the motivation for this PR? PR sonic-net#9199 modified the template acl.json under folder tests/crm/templates and added a key input_interface in this template. Only backend topo supports this key, so it will generate an error log in non-backend topo. In this PR, I revert the change to this template. And for recovery, we have another template in PR sonic-net#9312 How did you do it? Revert the change to template acl json. Signed-off-by: Yutong Zhang <[email protected]>
Description of PR PR sonic-net#9199 modified the template acl.json under folder tests/crm/templates and added a key input_interface in this template. Only backend topo supports this key, so it will generate an error log in non-backend topo. In this PR, I revert the change to this template. And for recovery, we have another template in PR sonic-net#9312 . What is the motivation for this PR? PR sonic-net#9199 modified the template acl.json under folder tests/crm/templates and added a key input_interface in this template. Only backend topo supports this key, so it will generate an error log in non-backend topo. In this PR, I revert the change to this template. And for recovery, we have another template in PR sonic-net#9312 How did you do it? Revert the change to template acl json. Signed-off-by: Yutong Zhang <[email protected]>
…st_cacl_function.py`. (#9312) Description of PR In module cacl/test_cacl_function.py, it will use command acl-loader delete to delete all acl rules, no matter if the testbed has DATAACL rules before test or not. If this testbed has DATAACL rules before, this deletion will cause inconsistent between previous running config and current running config, and will cause unnecessary config reload. In PR #9199 , we have a fixture recover_acl_rule to recovery acl rules. So in this PR, I refactor this fixture and use this fixture to recover acl rules in module cacl/test_cacl_function.py. What is the motivation for this PR? In module cacl/test_cacl_function.py, it will use command acl-loader delete to delete all acl rules, no matter if the testbed has DATAACL rules before test or not. If this testbed has DATAACL rules before, this deletion will cause inconsistent between previous running config and current running config, and will cause unnecessary config reload. In PR #9199 , we have a fixture recover_acl_rule to recovery acl rules. So in this PR, I refactor this fixture and use this fixture to recover acl rules in module cacl/test_cacl_function.py. How did you do it? Move fixture recover_acl_rule to tests/conftest.py and use this fixture to recover acl rules in module cacl/test_cacl_function.py. How did you verify/test it? ``` 07:34:42 conftest.core_dump_and_config_check L1893 INFO | Core dump and config check passed for cacl/test_cacl_function.py ``` Signed-off-by: Yutong Zhang <[email protected]>
Description of PR PR #9199 modified the template acl.json under folder tests/crm/templates and added a key input_interface in this template. Only backend topo supports this key, so it will generate an error log in non-backend topo. In this PR, I revert the change to this template. And for recovery, we have another template in PR #9312 . What is the motivation for this PR? PR #9199 modified the template acl.json under folder tests/crm/templates and added a key input_interface in this template. Only backend topo supports this key, so it will generate an error log in non-backend topo. In this PR, I revert the change to this template. And for recovery, we have another template in PR #9312 How did you do it? Revert the change to template acl json. Signed-off-by: Yutong Zhang <[email protected]>
Description of PR PR #9199 modified the template acl.json under folder tests/crm/templates and added a key input_interface in this template. Only backend topo supports this key, so it will generate an error log in non-backend topo. In this PR, I revert the change to this template. And for recovery, we have another template in PR #9312 . What is the motivation for this PR? PR #9199 modified the template acl.json under folder tests/crm/templates and added a key input_interface in this template. Only backend topo supports this key, so it will generate an error log in non-backend topo. In this PR, I revert the change to this template. And for recovery, we have another template in PR #9312 How did you do it? Revert the change to template acl json. Signed-off-by: Yutong Zhang <[email protected]>
Description of PR PR #9199 modified the template acl.json under folder tests/crm/templates and added a key input_interface in this template. Only backend topo supports this key, so it will generate an error log in non-backend topo. In this PR, I revert the change to this template. And for recovery, we have another template in PR #9312 . What is the motivation for this PR? PR #9199 modified the template acl.json under folder tests/crm/templates and added a key input_interface in this template. Only backend topo supports this key, so it will generate an error log in non-backend topo. In this PR, I revert the change to this template. And for recovery, we have another template in PR #9312 How did you do it? Revert the change to template acl json. Signed-off-by: Yutong Zhang <[email protected]>
…st_cacl_function.py`. (sonic-net#9312) Description of PR In module cacl/test_cacl_function.py, it will use command acl-loader delete to delete all acl rules, no matter if the testbed has DATAACL rules before test or not. If this testbed has DATAACL rules before, this deletion will cause inconsistent between previous running config and current running config, and will cause unnecessary config reload. In PR sonic-net#9199 , we have a fixture recover_acl_rule to recovery acl rules. So in this PR, I refactor this fixture and use this fixture to recover acl rules in module cacl/test_cacl_function.py. What is the motivation for this PR? In module cacl/test_cacl_function.py, it will use command acl-loader delete to delete all acl rules, no matter if the testbed has DATAACL rules before test or not. If this testbed has DATAACL rules before, this deletion will cause inconsistent between previous running config and current running config, and will cause unnecessary config reload. In PR sonic-net#9199 , we have a fixture recover_acl_rule to recovery acl rules. So in this PR, I refactor this fixture and use this fixture to recover acl rules in module cacl/test_cacl_function.py. How did you do it? Move fixture recover_acl_rule to tests/conftest.py and use this fixture to recover acl rules in module cacl/test_cacl_function.py. How did you verify/test it? ``` 07:34:42 conftest.core_dump_and_config_check L1893 INFO | Core dump and config check passed for cacl/test_cacl_function.py ``` Signed-off-by: Yutong Zhang <[email protected]>
…st_cacl_function.py`. (#9312) Description of PR In module cacl/test_cacl_function.py, it will use command acl-loader delete to delete all acl rules, no matter if the testbed has DATAACL rules before test or not. If this testbed has DATAACL rules before, this deletion will cause inconsistent between previous running config and current running config, and will cause unnecessary config reload. In PR #9199 , we have a fixture recover_acl_rule to recovery acl rules. So in this PR, I refactor this fixture and use this fixture to recover acl rules in module cacl/test_cacl_function.py. What is the motivation for this PR? In module cacl/test_cacl_function.py, it will use command acl-loader delete to delete all acl rules, no matter if the testbed has DATAACL rules before test or not. If this testbed has DATAACL rules before, this deletion will cause inconsistent between previous running config and current running config, and will cause unnecessary config reload. In PR #9199 , we have a fixture recover_acl_rule to recovery acl rules. So in this PR, I refactor this fixture and use this fixture to recover acl rules in module cacl/test_cacl_function.py. How did you do it? Move fixture recover_acl_rule to tests/conftest.py and use this fixture to recover acl rules in module cacl/test_cacl_function.py. How did you verify/test it? ``` 07:34:42 conftest.core_dump_and_config_check L1893 INFO | Core dump and config check passed for cacl/test_cacl_function.py ``` Signed-off-by: Yutong Zhang <[email protected]>
…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]>
Description of PR PR sonic-net#9199 modified the template acl.json under folder tests/crm/templates and added a key input_interface in this template. Only backend topo supports this key, so it will generate an error log in non-backend topo. In this PR, I revert the change to this template. And for recovery, we have another template in PR sonic-net#9312 . What is the motivation for this PR? PR sonic-net#9199 modified the template acl.json under folder tests/crm/templates and added a key input_interface in this template. Only backend topo supports this key, so it will generate an error log in non-backend topo. In this PR, I revert the change to this template. And for recovery, we have another template in PR sonic-net#9312 How did you do it? Revert the change to template acl json. Signed-off-by: Yutong Zhang <[email protected]>
…st_cacl_function.py`. (sonic-net#9312) Description of PR In module cacl/test_cacl_function.py, it will use command acl-loader delete to delete all acl rules, no matter if the testbed has DATAACL rules before test or not. If this testbed has DATAACL rules before, this deletion will cause inconsistent between previous running config and current running config, and will cause unnecessary config reload. In PR sonic-net#9199 , we have a fixture recover_acl_rule to recovery acl rules. So in this PR, I refactor this fixture and use this fixture to recover acl rules in module cacl/test_cacl_function.py. What is the motivation for this PR? In module cacl/test_cacl_function.py, it will use command acl-loader delete to delete all acl rules, no matter if the testbed has DATAACL rules before test or not. If this testbed has DATAACL rules before, this deletion will cause inconsistent between previous running config and current running config, and will cause unnecessary config reload. In PR sonic-net#9199 , we have a fixture recover_acl_rule to recovery acl rules. So in this PR, I refactor this fixture and use this fixture to recover acl rules in module cacl/test_cacl_function.py. How did you do it? Move fixture recover_acl_rule to tests/conftest.py and use this fixture to recover acl rules in module cacl/test_cacl_function.py. How did you verify/test it? ``` 07:34:42 conftest.core_dump_and_config_check L1893 INFO | Core dump and config check passed for cacl/test_cacl_function.py ``` Signed-off-by: Yutong Zhang <[email protected]>
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
Back port request
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?
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation