Skip to content

Few more python3 compatibility changes, PEP8 standard changes and add missing methods in PDDF common base APIs#7021

Merged
jleveque merged 2 commits intosonic-net:masterfrom
FuzailBrcm:pddf_misc_changes
Mar 12, 2021
Merged

Few more python3 compatibility changes, PEP8 standard changes and add missing methods in PDDF common base APIs#7021
jleveque merged 2 commits intosonic-net:masterfrom
FuzailBrcm:pddf_misc_changes

Conversation

@FuzailBrcm
Copy link
Copy Markdown
Contributor

@FuzailBrcm FuzailBrcm commented Mar 11, 2021

Why I did it

  • Python3 compatibility changes for PDDF eeprom class
  • Adding API for temperature in PDDF psu class
  • PEP8 standard changes and adding missing method in PDDF sfp class

How I did it

  • Using python3 to invoke the sonic_platform module in PDDF based platform
  • Running autopep8 tool to comply to PEP8 standards

How to verify it

root@sonic:/home/admin# decode-syseeprom -s
781664X1827043
root@sonic:/home/admin# decode-syseeprom -p
7816-64X-O-AC-F
root@sonic:/home/admin# decode-syseeprom -m
3C:2C:99:F0:C5:80
root@sonic:/home/admin#
root@sonic:/home/admin# python3
Python 3.7.3 (default, Jul 25 2020, 13:03:44)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sonic_platform
>>> ch = sonic_platform.platform.Platform().get_chassis()
>>> ch.get_psu(0).get_temperature()
30.0
>>>

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012

Description for the changelog

A picture of a cute animal (not mandatory but encouraged)

@FuzailBrcm FuzailBrcm requested a review from lguohan as a code owner March 11, 2021 12:08
@lgtm-com
Copy link
Copy Markdown

lgtm-com bot commented Mar 11, 2021

This pull request introduces 1 alert when merging 7b9bd94 into 070b020 - view on LGTM.com

new alerts:

  • 1 for Unused import

@jleveque jleveque changed the title Few more python3 compatibility changes, PEP8 standard changes and add… Few more python3 compatibility changes, PEP8 standard changes and add missing methods in PDDF common base APIs Mar 11, 2021
@jleveque jleveque merged commit 0144258 into sonic-net:master Mar 12, 2021
raphaelt-nvidia pushed a commit to raphaelt-nvidia/sonic-buildimage that referenced this pull request May 23, 2021
… missing methods in PDDF common base APIs (sonic-net#7021)

#### Why I did it
- Python3 compatibility changes for PDDF eeprom class
- Adding API for temperature in PDDF psu class
- PEP8 standard changes and adding missing method in PDDF sfp class

#### How I did it
- Using python3 to invoke the sonic_platform module in PDDF based platform
- Running autopep8 tool to comply to PEP8 standards
carl-nokia pushed a commit to carl-nokia/sonic-buildimage that referenced this pull request Aug 7, 2021
… missing methods in PDDF common base APIs (sonic-net#7021)

#### Why I did it
- Python3 compatibility changes for PDDF eeprom class
- Adding API for temperature in PDDF psu class
- PEP8 standard changes and adding missing method in PDDF sfp class

#### How I did it
- Using python3 to invoke the sonic_platform module in PDDF based platform
- Running autopep8 tool to comply to PEP8 standards
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants