Skip to content

Add cel seastone platform apis#235

Merged
mudsut4ke merged 2 commits intoSONIC-DEV:master_dx010_fix_failed_test_cases_of_apifrom
119064273:master_dx010_fix_failed_test_cases_of_api
Feb 8, 2021
Merged

Add cel seastone platform apis#235
mudsut4ke merged 2 commits intoSONIC-DEV:master_dx010_fix_failed_test_cases_of_apifrom
119064273:master_dx010_fix_failed_test_cases_of_api

Conversation

@119064273
Copy link
Copy Markdown

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
Copy Markdown
Author

@mudsut4ke help to review, thanks

@119064273
Copy link
Copy Markdown
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
Copy link
Copy Markdown

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
Copy Markdown
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
Copy link
Copy Markdown

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
Copy Markdown
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()
Copy link
Copy Markdown

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
Copy Markdown
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)
Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown

@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
Copy Markdown
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

@119064273 119064273 requested a review from mudsut4ke February 8, 2021 06:19
@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