Skip to content
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

[Platform API]: Updates to make use of additional capabilities in pla… #4521

Merged
merged 2 commits into from
Oct 26, 2021

Conversation

dflynn-Nokia
Copy link
Contributor

…tform.json

The primary objective here is to extend the use of platform.json to allow a platform to
indicate whether or not specific HW features are supported. In addition, test cases not currently supported by Nokia platforms are skipped.

Test cases modified:

 - Component: skip firmware install and update test cases for Nokia platforms
 - Fan Drawer: test_get_maximum_consumed_power
 - PSU: test_power, test_temperature
 - PSU Fans: handle case where no PSU fans are reported
 - SFP: test_tx_disable_channel, test_power_override
 - Thermal: test_get_low_threshold, test_get_high_threshold,
       test_get_low_critical_threshold, test_get_high_critical_threshold,
       test_set_low_threshold, test_set_high_threshold

Description of PR

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 201911

Approach

What is the motivation for this PR?

Provide platform specific way to exclude unsupported HW features

How did you do it?

Enhance tests to consult platform.json file content to determine if feature is supported

How did you verify/test it?

Ran platform test suite

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

…tform.json

The objective here is to extend the use of platform.json to allow a platform to
indicate whether or not specific HW features are supported.

Test cases modified:

     - Component: skip firmware install and update test cases for Nokia platforms
     - Fan Drawer: test_get_maximum_consumed_power
     - PSU: test_power, test_temperature
     - PSU Fans: handle case where no PSU fans are reported
     - SFP: test_tx_disable_channel, test_power_override
     - Thermal: test_get_low_threshold, test_get_high_threshold,
           test_get_low_critical_threshold, test_get_high_critical_threshold,
           test_set_low_threshold, test_set_high_threshold
@Blueve
Copy link
Contributor

Blueve commented Oct 22, 2021

@sujinmkang could you take a look on this PR 😃

@@ -251,7 +251,7 @@ def test_get_fans_target_speed(self, duthosts, enum_rand_one_per_hwsku_hostname,
if fans_skipped == num_fans:
psus_skipped += 1

if psus_skipped == self.num_psus:
if num_fans != 0 and psus_skipped == self.num_psus:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

each psu can have num_fans so shouldn't "num_fans != 0" is needed to move up above condition at line #251 "if fans_skipped == num_fans"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The intent of my change here is to deal with the case where psu.get_num_fans() returns 0 for each PSU. In this case I didn't want to report that all fans were skipped. Alternatively I could not count PSUs with no reported fans as skipped as you suggest. I will make that change.

@Blueve Blueve requested a review from sujinmkang October 25, 2021 02:08
@Blueve Blueve merged commit da09953 into sonic-net:master Oct 26, 2021
@dflynn-Nokia dflynn-Nokia deleted the platform-capabilities branch October 26, 2021 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants