Skip to content

Commit

Permalink
feat: Added support for TLV_CODE_VENDOR_NAME
Browse files Browse the repository at this point in the history
  • Loading branch information
gupurush authored and gupurush committed Feb 13, 2025
1 parent cb5564c commit 007e93b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions sonic_platform_base/sonic_eeprom/eeprom_tlvinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,16 @@ def modelstr(self, e):
return super(TlvInfoDecoder, self).modelstr(e)

return t[2].decode("ascii")


def vendorstr(self, e):
'''
Returns the value field of the Vendor Name TLV as a string
'''
(is_valid, t) = self.get_tlv_field(e, self._TLV_CODE_VENDOR_NAME)
if not is_valid:
return super(TlvInfoDecoder, self).vendorstr(e)
return t[2].decode("ascii")


def serial_number_str(self, e):
Expand Down

0 comments on commit 007e93b

Please sign in to comment.