-
Notifications
You must be signed in to change notification settings - Fork 15
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
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.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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() |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
@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