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

Parse 'Extended Specification compliance' as independent field #112

Merged
merged 1 commit into from
Aug 11, 2020
Merged
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
16 changes: 11 additions & 5 deletions sonic_platform_base/sonic_sfp/sff8436.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,11 +373,6 @@ class sff8436InterfaceId(sffbase):
{'offset' : 3,
'type' : 'nested',
'decode' : specification_compliance},
'Extended Specification compliance':
{'offset' : 64,
'size':1,
'type' : 'enum',
'decode' : ext_specification_compliance},
'EncodingCodes':
{'offset':11,
'size':1,
Expand Down Expand Up @@ -456,6 +451,14 @@ class sff8436InterfaceId(sffbase):
'type': 'date'}
}

sfp_ext_specification_compliance = {
'Extended Specification compliance':
{'offset' : 0,
'size':1,
'type' : 'enum',
'decode' : ext_specification_compliance}
}

qsfp_dom_capability = {
'Tx_power_support':
{'offset': 0,
Expand Down Expand Up @@ -509,6 +512,9 @@ def parse_vendor_date(self, sn_raw_data, start_pos):
def parse_vendor_oui(self, sn_raw_data, start_pos):
return sffbase.parse(self, self.vendor_oui, sn_raw_data, start_pos)

def parse_ext_specification_compliance(self, sn_raw_data, start_pos):
return sffbase.parse(self, self.sfp_ext_specification_compliance, sn_raw_data, start_pos)

def parse_qsfp_dom_capability(self, sn_raw_data, start_pos):
return sffbase.parse(self, self.qsfp_dom_capability, sn_raw_data, start_pos)

Expand Down