Add cel seastone platform apis#235
Conversation
1: add/fix soni_platform/psu.py apis 2: add/fix sonic_platform/chassis.py apis
|
@mudsut4ke help to review, thanks |
|
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 |
There was a problem hiding this comment.
Can we set the default return to 'N/A' to prevent errors?
| time.sleep(5) | ||
| serial = self.read_fru(self.eeprom_addr, TLV_ATTR_TYPE_SERIAL) | ||
| if not serial: | ||
| return NotImplementedError |
There was a problem hiding this comment.
Can we set the default return to 'N/A' to prevent errors?
|
|
||
| if(os.path.exists(path)): | ||
| with open(path, 'r', encoding='unicode_escape') as f: | ||
| content = f.read() |
There was a problem hiding this comment.
Can you use the api_helper function to read the files?
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
Can you use the api helper function to write the file?
There was a problem hiding this comment.
ok, this function we could use api helper
|
@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. |
|
@mudsut4ke "It looks like there are test cases that still have problems. |
b14b60c
into
SONIC-DEV:master_dx010_fix_failed_test_cases_of_api
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)
1: add/fix soni_platform/psu.py apis
2: add/fix sonic_platform/chassis.py apis