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

[action] [PR:13595] [DX010 platform] fix dx010 platform testcase issues #13778

Merged
merged 1 commit into from
Feb 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 74 additions & 11 deletions device/celestica/x86_64-cel_seastone-r0/platform.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"chassis": {
"name": "Celestica-DX010-C32",
"name": "DX010",
"status_led": {
"controllable": true,
"colors": ["green", "off"]
Expand All @@ -18,6 +18,9 @@
{
"name": "CPLD4"
},
{
"name": "CPLD5"
},
{
"name": "BIOS"
}
Expand Down Expand Up @@ -123,10 +126,22 @@
},
"fans": [
{
"name": "FAN-1F"
"name": "FAN-1F",
"status_led": {
"controllable": false
},
"speed": {
"controllable": false
}
},
{
"name": "FAN-1R"
"name": "FAN-1R",
"status_led": {
"controllable": false
},
"speed": {
"controllable": false
}
}
]
},
Expand All @@ -138,10 +153,22 @@
},
"fans": [
{
"name": "FAN-2F"
"name": "FAN-2F",
"status_led": {
"controllable": false
},
"speed": {
"controllable": false
}
},
{
"name": "FAN-2R"
"name": "FAN-2R",
"status_led": {
"controllable": false
},
"speed": {
"controllable": false
}
}
]
},
Expand All @@ -153,10 +180,22 @@
},
"fans": [
{
"name": "FAN-3F"
"name": "FAN-3F",
"status_led": {
"controllable": false
},
"speed": {
"controllable": false
}
},
{
"name": "FAN-3R"
"name": "FAN-3R",
"status_led": {
"controllable": false
},
"speed": {
"controllable": false
}
}
]
},
Expand All @@ -168,10 +207,22 @@
},
"fans": [
{
"name": "FAN-4F"
"name": "FAN-4F",
"status_led": {
"controllable": false
},
"speed": {
"controllable": false
}
},
{
"name": "FAN-4R"
"name": "FAN-4R",
"status_led": {
"controllable": false
},
"speed": {
"controllable": false
}
}
]
},
Expand All @@ -183,10 +234,22 @@
},
"fans": [
{
"name": "FAN-5F"
"name": "FAN-5F",
"status_led": {
"controllable": false
},
"speed": {
"controllable": false
}
},
{
"name": "FAN-5R"
"name": "FAN-5R",
"status_led": {
"controllable": false
},
"speed": {
"controllable": false
}
}
]
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"chassis": {
"Seastone-DX010": {
"DX010": {
"component": {
"CPLD1": {},
"CPLD2": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def get_name(self):
Returns:
string: The name of the device
"""
return self._api_helper.hwsku
return self._eeprom.get_product_name()

def get_presence(self):
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ def _valid_tlv(self, eeprom_data):
def get_eeprom(self):
return self._valid_tlv(self._eeprom)

def get_product_name(self):
return self._eeprom.get('0x21', NULL)

def get_pn(self):
return self._eeprom.get('0x22', NULL)

Expand Down
13 changes: 13 additions & 0 deletions device/celestica/x86_64-cel_seastone-r0/sonic_platform/sfp.py
Original file line number Diff line number Diff line change
Expand Up @@ -2202,3 +2202,16 @@ def is_replaceable(self):
A boolean value, True if replaceable
"""
return True

def get_error_description(self):
"""
Retrives the error descriptions of the SFP module
Returns:
String that represents the current error descriptions of vendor specific errors
In case there are multiple errors, they should be joined by '|',
like: "Bad EEPROM|Unsupported cable"
"""
if not self.get_presence():
return self.SFP_STATUS_UNPLUGGED

return self.SFP_STATUS_OK