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

Add cel seastone platform apis #235

Conversation

119064273
Copy link

1: add/fix soni_platform/psu.py apis
2: add/fix sonic_platform/chassis.py apis

 1: add/fix soni_platform/psu.py apis
 2: add/fix sonic_platform/chassis.py apis
@119064273
Copy link
Author

@mudsut4ke help to review, thanks

@119064273
Copy link
Author

test result : http://10.204.112.27:8080/job/seastone_t0_psuchassis/ last two build

time.sleep(5)
model = self.read_fru(self.eeprom_addr, TLV_ATTR_TYPE_MODEL)
if not model:
return NotImplementedError

Choose a reason for hiding this comment

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

Can we set the default return to 'N/A' to prevent errors?

Copy link
Author

Choose a reason for hiding this comment

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

ok

time.sleep(5)
serial = self.read_fru(self.eeprom_addr, TLV_ATTR_TYPE_SERIAL)
if not serial:
return NotImplementedError

Choose a reason for hiding this comment

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

Can we set the default return to 'N/A' to prevent errors?

Copy link
Author

Choose a reason for hiding this comment

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

ok


if(os.path.exists(path)):
with open(path, 'r', encoding='unicode_escape') as f:
content = f.read()

Choose a reason for hiding this comment

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

Can you use the api_helper function to read the files?

Copy link
Author

@119064273 119064273 Feb 8, 2021

Choose a reason for hiding this comment

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

better not, I need add " encoding='unicode_escape' " when use open, but in api_helper functions , it don't have it, if add it , i don't know if it will affect other functions


try:
with open(self.stat_led_path, 'w') as file:
file.write(set_status_str)

Choose a reason for hiding this comment

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

Can you use the api helper function to write the file?

Copy link
Author

Choose a reason for hiding this comment

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

ok, this function we could use api helper

Copy link
Author

Choose a reason for hiding this comment

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

ok

@mudsut4ke
Copy link

@119064273 , http://10.204.112.27:8080/job/seastone_t0_psuchassis/lastCompletedBuild/testReport/platform_tests.api.test_chassis/

It looks like there are test cases that still have problems.
Are they on your known issue list?

@119064273
Copy link
Author

@mudsut4ke "It looks like there are test cases that still have problems.
Are they on your known issue list?" yes, same led test cases or customer not report cases, we will fix it later, test_psu.py test_chassis.py

@mudsut4ke mudsut4ke merged commit b14b60c into SONIC-DEV:master_dx010_fix_failed_test_cases_of_api Feb 8, 2021
mudsut4ke pushed a commit that referenced this pull request Jan 28, 2022
c4127c2 [psud] Fix PSU log issue (#235)
07542cb [pmon][xcvrd]xcvrd process show backtrace on the internal port. (#233)
3e432e7 [Y-Cable] Increased unit test coverage of y_cable_helper.py (#229)
7c363f5 [ledd] prevent led crash on recirc port event (#232)
e9ccd82 [sonic-platform-daemons] fix dependency issue on py2 wheels by correcting the path (#234)
2b0acfb [sfp-refactoring] xcvrd: add initial support for CMIS application initialization (#217)
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.

2 participants