-
Notifications
You must be signed in to change notification settings - Fork 718
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Mellanox] Support PSU power threshold checking (#6288)
What is the motivation for this PR? Implement the regression test case of PSU power threshold exceeding check. 1. It can be done on a per vendor/platform basis only because the way to trigger PSU power threshold exceeding varies among vendors and platforms. 2. Support parsing WARNING state in the output of show platform psustatus How did you do it? We implement the test as a mock test because * It's not able to meet the conditions to trigger the PSU power to exceed its threshold in any regression test bed, (which requires 100% utilization of throughput and high power-consumption xSFP modules * PSU power threshold exceeding checking is not supported on all testbeds. If we would like to run the test on a test bed which does not physically support it, we also need to mock it. How did you verify/test it? Manually test and run regression test. Any platform specific information? Mellanox platforms only. Signed-off-by: Stephen Sun <stephens@nvidia.com>
- Loading branch information
Showing
4 changed files
with
409 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
def pytest_addoption(parser): | ||
''' | ||
Adds option to Mellanox specific pytest | ||
Args: | ||
parser: pytest parser object | ||
Returns: | ||
None | ||
''' | ||
mellanox_group = parser.getgroup("Mellanox test suite options") | ||
|
||
mellanox_group.addoption( | ||
"--mock_any_testbed", | ||
action="store_true", | ||
help="Mock on testbeds which do not support PSU power thresholds", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.