Skip to content

Commit 433dd1a

Browse files
authored
Parse 'Extended Specification compliance' as independent field (sonic-net#112)
Previously 'Extended Specification compliance' was added as part of "sfp_info_bulk", this will request all the vendors to update the related platform API implementation due to the width change of "sfp_info_bulk". To avoid this, make it parsed separately, it will not impact vendors who haven't update the platform API implementation.
1 parent f3f3573 commit 433dd1a

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

sonic_platform_base/sonic_sfp/sff8436.py

+11-5
Original file line numberDiff line numberDiff line change
@@ -373,11 +373,6 @@ class sff8436InterfaceId(sffbase):
373373
{'offset' : 3,
374374
'type' : 'nested',
375375
'decode' : specification_compliance},
376-
'Extended Specification compliance':
377-
{'offset' : 64,
378-
'size':1,
379-
'type' : 'enum',
380-
'decode' : ext_specification_compliance},
381376
'EncodingCodes':
382377
{'offset':11,
383378
'size':1,
@@ -456,6 +451,14 @@ class sff8436InterfaceId(sffbase):
456451
'type': 'date'}
457452
}
458453

454+
sfp_ext_specification_compliance = {
455+
'Extended Specification compliance':
456+
{'offset' : 0,
457+
'size':1,
458+
'type' : 'enum',
459+
'decode' : ext_specification_compliance}
460+
}
461+
459462
qsfp_dom_capability = {
460463
'Tx_power_support':
461464
{'offset': 0,
@@ -509,6 +512,9 @@ def parse_vendor_date(self, sn_raw_data, start_pos):
509512
def parse_vendor_oui(self, sn_raw_data, start_pos):
510513
return sffbase.parse(self, self.vendor_oui, sn_raw_data, start_pos)
511514

515+
def parse_ext_specification_compliance(self, sn_raw_data, start_pos):
516+
return sffbase.parse(self, self.sfp_ext_specification_compliance, sn_raw_data, start_pos)
517+
512518
def parse_qsfp_dom_capability(self, sn_raw_data, start_pos):
513519
return sffbase.parse(self, self.qsfp_dom_capability, sn_raw_data, start_pos)
514520

0 commit comments

Comments
 (0)