[platform] Implement platform phase 1 cases#915
[platform] Implement platform phase 1 cases#915liat-grozovik merged 4 commits intosonic-net:masterfrom wangxin:platform-pytest-pr
Conversation
Signed-off-by: Xin Wang <[email protected]>
|
@jleveque Could you please help review this PR? |
Changes: * Add mellanox_psu_controller.py which has Mellanox implementation of PSU controller. * Increase the delay between reset SFP and checking SFP presence for SFP to be fully recovered. * Improve the checking of PSU status. * Correct spelling errors. Signed-off-by: Xin Wang <[email protected]>
|
@jleveque Any more comments or concerns? |
tests/platform/test_platform_info.py
Outdated
| hostname = testbed['dut'] | ||
| ans_host = ansible_host(ansible_adhoc, hostname) | ||
|
|
||
| logging.info("Check output of 'show platform summary'") |
There was a problem hiding this comment.
In general I suggest that commands name as well as expected error/OK message will be defined once (as a constant) and will be used by both log info as well as he command / message to use.
it is simpler in term changes might be introduced later on and code change will be done only once
There was a problem hiding this comment.
Sure, updated in the new commit.
| return res | ||
|
|
||
|
|
||
| def test_check_sfp_status_and_configure_sfp(localhost, ansible_adhoc, testbed): |
There was a problem hiding this comment.
If i am not mistaken we also have low power mode option under sfputil. Should we add it as well?
There was a problem hiding this comment.
Sure. Added SFP low power mode testing in the new commit.
* Replace inline command strings with predefined variables * Add test case for testing SFP low power mode Signed-off-by: Xin Wang <[email protected]>
|
@lguohan @liat-grozovik Any more comments? |
The order of information output by command "show platform syseeprom" is not guranteed. This commit improve the method of comparing the content output by syseeprom plugin and the show command to avoid the failure caused by inconsistent output order. Signed-off-by: Xin Wang <[email protected]>
|
Added a new commit fixing an issue of comparing syseeprom output from "show platform syseeprom" and platform plugin. |
[201911][thermal control] Backport changes from master branch (sonic-net#929) [201911][config] Support abbreviation (sonic-net#933) Add 'hw-management-generate-dump.sh' to 'show techsupport' command (sonic-net#934) [fwutil]: Update fwutil to v2.0.0.0. (sonic-net#942) Fixes bug for PFCWD feature parameters (sonic-net#838) Fixed fast-reboot for BFN platform (sonic-net#871) [config] Add 'interface transceiver' subgroup with 'lpmode' and 'reset' subcommands (sonic-net#904) [warm-reboot]: added pre-check for ISSU file (sonic-net#915) [config] Don't attempt to restart disabled services (sonic-net#944)
Description of PR
Summary:
Fixes # (issue)
Implement the SONiC platform phase 1 test cases using the pytest-ansible framework.
The SONiC platform test cases are documented here:
https://github.com/Azure/SONiC/blob/master/doc/pmon/sonic_platform_test_plan.md
Test cases implemented in phase 1:
Please note that only the scripts for common test cases were included in this PR.
Type of change
Approach
How did you do it?
Implement the SONiC platform phase 1 test cases using the pytest-ansible framework and follow the design of PR #802
How did you verify/test it?
Tested on the mellanox platform
Any platform specific information?
This PR does not include platform specific test cases.
Supported testbed topology if it's a new test case?
All current test topologies are supported:
[t0, t0-16, t0-56, t0-64, t0-64-32, t0-116, t1, t1-lag, t1-64-lag, ptf32, ptf64]
Documentation
The SONiC platform test plan:
https://github.com/Azure/SONiC/blob/master/doc/pmon/sonic_platform_test_plan.md