-
Notifications
You must be signed in to change notification settings - Fork 661
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
Configure and show for platform chassis_modules #1145
Conversation
This pull request introduces 2 alerts when merging 7c6d23bc95d83e6b5e2a934a43984eed068ecf63 into c15cdf6 - view on LGTM.com new alerts:
|
can you add unit test for the show and config commands? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as comments
This pull request introduces 2 alerts when merging c9b1143853a9838ca967c38b26a4646787be7a00 into 3a7457c - view on LGTM.com new alerts:
|
This pull request introduces 2 alerts when merging 18b692acd70ebc6cc55246acd6aa82ba93d287f7 into 3a7457c - view on LGTM.com new alerts:
|
No plans to add FT and PSU as part of 'show chassis-modules'. Existing 'show platform fan' and 'show platform psustatus' can be used. |
Done. UT is part of tests/chassis_modules_test.py |
This pull request introduces 1 alert when merging efe7873b3e9fac40a50cbf7caa10a30e2acb1db4 into 13bd06b - view on LGTM.com new alerts:
|
UT coverage as requested
|
Fixed |
retest please |
retest default please |
retest this please |
08889ca
to
02d2038
Compare
retest this please |
@shyam77git, can you approve? |
Adding support for below CLI commands $config plaform chassis_modules admin_down <chassis_module_name> <instance> <module_type> $show platform chassis_modules
Check if tests failed to run due to invalid input in state_db.json
a91b63e
02d2038
to
a91b63e
Compare
Please fix conflicts |
d04338d
Fixed. |
@lguohan could you please approve and merge? Thanks. You already had approved this, I just resolved conflicts and updated. |
-adding new json file to support fixture in platform tests to skip checks for modules not present in DUT new file: tests/platform_tests/cli/test_show_chassis_module.py -adding new two new test cases for verifying show chassis-module status and show chassis-module midplane status introduced as part of PRs sonic-net/sonic-utilities#1145 and sonic-net/sonic-utilities#1267 tests/platform_tests/conftest.py -adding a fixture that skips checking for modules for DUT
…sonic modular chassis (#2794) Description of PR Summary: What is the motivation for this PR? Add test cases to verify show chassis-module status and show chassis-module midplane-status for VOQ chassis. The cli commands were introduced in following PRs: sonic-net/sonic-utilities#1145 sonic-net/sonic-utilities#1267 How did you do it? Added new script tests/platform_tests/cli/test_show_chassis_module.py for verifying show chassis-module status and show chassis-module midplane status. Introduced test cases: test_show_chassis_module_status: verify the output of command show chassis-module status test_show_chassis_module_midplane_status: verify the output of command show chassis-module midplane-status Added new script test_power_budget_info.py for verifying the redis output for power budget policy in supervisor card of chassis Added a fixture that skips checking for modules for DUT. This new fixture is introduced to skips modules for DUT not present based on entries in inventory file, by default the test it is assumed the chassis is fully equipped and all modules are up. Example to skip certain modules add to skip modules in inventory for DUT: DUT1 skip_modules: 'line-cards': - LINE-CARD0 - LINE-CARD2 'fabric-cards': - FABRIC-CARD3 'psus': - PSU4 - PSU5 Based on inventory file the tests will skip above modules for DUT1. For example, show chassis module will allow empty as status for LINE-CARD0 and LINE-CARD2 while all other will be expected to be ONLINE. How did you verify/test it? Ran sample tests against Nokia chassis with t2 topology using the skip fixture Any platform specific information? Supported testbed topology if it's a new test case? t2
sonic-utilities: Changes to support show and config command for chassis_modules
HLD: sonic-net/SONiC#646
- What I did
Introduced a show and config commands for modular chassis
$show chassis_modules
$config chassis_modules shutdown <chassis_module_name>
- How I did it
For the show command added a chassismodulesshow script
For the config command added a chassis_modules command to @platform.group
- How to verify it
Vendor will have to implement card.py for both commands to take effect.
- New command output (if the output of a command-line utility has changed)
An example vendor specific output
Out of Configuration command
Output of CONFIG_DB
Output of show command
Output of STATE_DB