-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[as7312-54x] Support platform API2.0 #6272
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
[as7312-54x] Support platform API2.0 #6272
Conversation
This pull request introduces 11 alerts when merging 6572c6d into 1ebbf66 - view on LGTM.com new alerts:
|
This pull request introduces 4 alerts when merging 8e150be into c146eea - view on LGTM.com new alerts:
|
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.
Please fix LGTM alerts (except "1 for Wrong number of arguments in a class instantiation" which appears to be a false alarm because the tool is referencing a different vendor's API implementation for the definition).
This pull request introduces 4 alerts when merging 32b7faa into 2f1445e - view on LGTM.com new alerts:
|
Retest vs please |
Retest vsimage please |
Retest mellanox please |
Retest vsimage please |
Add platform 2.0 support for Accton as7312-54x platform
- Why I did it
Support platform API2.0.
- How I did it
Implement API2.0.
- How to verify it
Test each API item.
root@sonic:/home/admin# ./test_as7312_api2_py3.py
DEBUG:root:Test Chassis
DEBUG:root:get_name=Accton-AS7312-54X
DEBUG:root:get_base_mac=A8:2B:B5:52:D1:D6
DEBUG:root:get_serial_number=591254XK1727007
DEBUG:root:get_system_eeprom_info={'0x21': '5912-54XK-O-AC-F', '0x22': 'FP3ZZ5654010A', '0x23': '591254XK1727007', '0x24': 'A8:2B:B5:52:D1:D6', '0x25': '07/14/2017', '0x27': 'R01A', '0x2A': '73', '0x2B': 'Accton', '0x2C': 'TW', '0x2D': 'Edgecore', '0x2E': 'r0.1.0.11', '0x28': 'x86_64-accton_as7312_54x-r0', '0x29': '2016.08.00.04', '0xFE': '0x4FB600BC'}
DEBUG:root:get_reboot_cause=('REBOOT_CAUSE_NON_HARDWARE', 'Unknown')
DEBUG:root:
Test Component
DEBUG:root:get_num_components=4
DEBUG:root:get_name=CPLD1
DEBUG:root:get_name=CPLD2
DEBUG:root:get_name=CPLD3
DEBUG:root:get_name=BIOS
DEBUG:root:get_firmware_version0 =5
DEBUG:root:get_firmware_version1 =6
DEBUG:root:get_firmware_version2 =8
DEBUG:root:get_firmware_version3 =AS5912 V36 20180208T
DEBUG:root:get_description=CPLD 1
DEBUG:root:get_description=CPLD 2
DEBUG:root:get_description=CPLD 3
DEBUG:root:get_description=Basic Input/Output System
DEBUG:root:
Fan test
DEBUG:root:fan-1, presence=0
DEBUG:root:fan 1 direction=exhaust
DEBUG:root:fan 1 speed()=0
DEBUG:root:set speed to fan-1
DEBUG:root:fan-1 speed()=0
DEBUG:root:fan-2, presence=0
DEBUG:root:fan 2 direction=exhaust
DEBUG:root:fan 2 speed()=0
DEBUG:root:set speed to fan-1
DEBUG:root:fan-1 speed()=0
DEBUG:root:fan-3, presence=0
DEBUG:root:fan 3 direction=exhaust
DEBUG:root:fan 3 speed()=0
DEBUG:root:set speed to fan-1
DEBUG:root:fan-1 speed()=0
DEBUG:root:fan-4, presence=0
DEBUG:root:fan 4 direction=exhaust
DEBUG:root:fan 4 speed()=0
DEBUG:root:set speed to fan-1
DEBUG:root:fan-1 speed()=0
DEBUG:root:fan-5, presence=0
DEBUG:root:fan 5 direction=exhaust
DEBUG:root:fan 5 speed()=0
DEBUG:root:set speed to fan-1
DEBUG:root:fan-1 speed()=0
DEBUG:root:fan-6, presence=0
DEBUG:root:fan 6 direction=exhaust
DEBUG:root:fan 6 speed()=0
DEBUG:root:set speed to fan-1
DEBUG:root:fan-1 speed()=0
DEBUG:root:fan-7, presence=0
DEBUG:root:fan 7 direction=exhaust
DEBUG:root:fan 7 speed()=0
DEBUG:root:set speed to fan-1
DEBUG:root:fan-1 speed()=0
DEBUG:root:fan-8, presence=0
DEBUG:root:fan 8 direction=exhaust
DEBUG:root:fan 8 speed()=0
DEBUG:root:set speed to fan-1
DEBUG:root:fan-1 speed()=0
DEBUG:root:fan-9, presence=0
DEBUG:root:fan 9 direction=exhaust
DEBUG:root:fan 9 speed()=0
DEBUG:root:set speed to fan-1
DEBUG:root:fan-1 speed()=0
DEBUG:root:fan-10, presence=0
DEBUG:root:fan 10 direction=exhaust
DEBUG:root:fan 10 speed()=0
DEBUG:root:set speed to fan-1
DEBUG:root:fan-1 speed()=0
DEBUG:root:fan-11, presence=0
DEBUG:root:fan 11 direction=exhaust
DEBUG:root:fan 11 speed()=0
DEBUG:root:set speed to fan-1
DEBUG:root:fan-1 speed()=0
DEBUG:root:fan-12, presence=0
DEBUG:root:fan 12 direction=exhaust
DEBUG:root:fan 12 speed()=0
DEBUG:root:set speed to fan-1
DEBUG:root:fan-1 speed()=0
DEBUG:root:
PSU test
DEBUG:root:PSU-1
DEBUG:root:presence=1
DEBUG:root:get_name=PSU-1
DEBUG:root:get_powergood=1
DEBUG:root:get_voltage=0.00
DEBUG:root:get_current=0.00
DEBUG:root:get_power=0.00
DEBUG:root:get_temperature=0.000
DEBUG:root:get_voltage_high_threshold=0.00
DEBUG:root:get_voltage_low_threshold=0.00
DEBUG:root:psu:get_num_fans=1
DEBUG:root:psu:get_fan().get_presence=1
DEBUG:root:psu dir path=/sys/bus/i2c/devices/11-005b/psu_hwmon_path
DEBUG:root:psu:get_fan().get_direction=intake
DEBUG:root:psu:get_fan().get_speed=0
DEBUG:root:psu:get_num_thermals()=0
DEBUG:root:psu:get_temperature=0.000
DEBUG:root:PSU-2
DEBUG:root:presence=1
DEBUG:root:get_name=PSU-2
DEBUG:root:get_powergood=0
DEBUG:root:get_voltage=12.05
DEBUG:root:get_current=8.20
DEBUG:root:get_power=98.00
DEBUG:root:get_temperature=35.000
DEBUG:root:get_voltage_high_threshold=12.36
DEBUG:root:get_voltage_low_threshold=11.62
DEBUG:root:psu:get_num_fans=1
DEBUG:root:psu:get_fan().get_presence=1
DEBUG:root:psu dir path=/sys/bus/i2c/devices/10-0058/psu_hwmon_path
DEBUG:root:psu:get_fan().get_direction=intake
DEBUG:root:psu:get_fan().get_speed=18
DEBUG:root:psu:get_num_thermals()=0
DEBUG:root:psu:get_temperature=35.000
DEBUG:root:
Thermal test
DEBUG:root:Thermal-1
DEBUG:root:get_temperature=53.000
DEBUG:root:high_threshold=85.000
DEBUG:root:get name=Temp sensor 1
DEBUG:root:get_presence=True
DEBUG:root:get_status=True
DEBUG:root:Thermal-2
DEBUG:root:get_temperature=32.000
DEBUG:root:high_threshold=84.000
DEBUG:root:get name=Temp sensor 2
DEBUG:root:get_presence=True
DEBUG:root:get_status=True
DEBUG:root:Thermal-3
DEBUG:root:get_temperature=47.000
DEBUG:root:high_threshold=83.000
DEBUG:root:get name=Temp sensor 3
DEBUG:root:get_presence=True
DEBUG:root:get_status=True
DEBUG:root:Thermal-4
DEBUG:root:get_temperature=40.500
DEBUG:root:high_threshold=82.000
DEBUG:root:get name=Temp sensor 4
DEBUG:root:get_presence=True
DEBUG:root:get_status=True
DEBUG:root:
SFP test
DEBUG:root:Port-48
DEBUG:root:platform_chassis.get_serial=APF14120026BU2
DEBUG:root:get_model()=599940002
DEBUG:root:get_name()=Ethernet48
DEBUG:root:get_rx_los=False
DEBUG:root:get_tx_fault()=False
DEBUG:root:get_tx_disable()=[True, True, True, True]
DEBUG:root:get_lp_mode=0
DEBUG:root:get_tx_disable_channel()=0xf
DEBUG:root:get_temperature=0.0
DEBUG:root:get_voltage=0.0
DEBUG:root:get_tx_bias=[0.0, 0.0, 0.0, 0.0]
DEBUG:root:get_rx_power=['N/A', 'N/A', 'N/A', 'N/A']
DEBUG:root:get_rx_power=['N/A', 'N/A', 'N/A', 'N/A']
DEBUG:root:get_reset_status()=1
- Which release branch to backport (provide reason below if selected)
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)