[copp tables] validate copp tables during in/cross-branch upgrades#8446
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:
|
5e30d6e to
e29c23d
Compare
|
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:
|
…upgrades Signed-off-by: AntonHryshchuk <[email protected]>
e29c23d to
c13d6ef
Compare
|
Hi @vaibhavhd , please review the test changes. |
|
@vaibhavhd would you like to review and provide your feedback? |
|
@vaibhavhd kindly reminder to review. |
| def check_copp_config(duthost): | ||
| logging.info("Comparing CoPP configuration from copp_cfg.json to COPP_TABLE") | ||
| copp_tables = json.loads(duthost.shell("sonic-db-dump -n APPL_DB -k COPP_TABLE* -y")["stdout"]) | ||
| copp_cfg = json.loads(duthost.shell("cat /etc/sonic/copp_cfg.json")["stdout"]) |
There was a problem hiding this comment.
Should there be a check for existence of config prior to this step?
| copp_cfg_formatted = get_copp_cfg_formatted_dict(copp_cfg, feature_status) | ||
| pytest_assert(copp_tables_formatted == copp_cfg_formatted, | ||
| "There is a difference between CoPP config and CoPP tables. CoPP config: {}\nCoPP tables:" | ||
| " {}".format(copp_tables_formatted, copp_cfg_formatted)) |
There was a problem hiding this comment.
The print sequence is reverted.
vaibhavhd
left a comment
There was a problem hiding this comment.
Non blocking comments added
|
@AntonHryshchuk PR conflicts with 202205 branch |
…onic-net#8446) - What is the motivation for this PR? Add validation of copp tables after improvement of fast-reboot - How did you do it? Added validation of copp tables after upgrade - How did you verify/test it? executed test test_upgrade_path with base_image=201911, target_image=202205, upgrade_type=fast Signed-off-by: AntonHryshchuk <[email protected]>
Description of PR
Summary: Update the test test_upgrade_path.py to support validation of the copp tables after in/cross-branch upgrades.
Added validation after upgrade, to compare copp tables with copp_cfg.json file.
Fixes #8085
Type of change
Back port request
Approach
What is the motivation for this PR?
Add validation of copp tables after improvement of fast-reboot
How did you do it?
Added validation of copp tables after upgrade
How did you verify/test it?
executed test test_upgrade_path with base_image=201911, target_image=202205, upgrade_type=fast
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation