Skip to content

Commit

Permalink
SFP-Refactor: Vendor revision is not displayed properly (#1950)
Browse files Browse the repository at this point in the history
* SFP: Vendor revision is not displayed properly
  • Loading branch information
aravindmani-1 authored Dec 6, 2021
1 parent 67466cb commit 656ade1
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 41 deletions.
2 changes: 1 addition & 1 deletion scripts/sfpshow
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ QSFP_DATA_MAP = {
'vendor_oui': 'Vendor OUI',
'vendor_date': 'Vendor Date Code(YYYY-MM-DD Lot)',
'manufacturer': 'Vendor Name',
'hardware_rev': 'Vendor Rev',
'vendor_rev': 'Vendor Rev',
'serial': 'Vendor SN',
'type': 'Identifier',
'ext_identifier': 'Extended Identifier',
Expand Down
2 changes: 1 addition & 1 deletion sfputil/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
'vendor_oui': 'Vendor OUI',
'vendor_date': 'Vendor Date Code(YYYY-MM-DD Lot)',
'manufacturer': 'Vendor Name',
'hardware_rev': 'Vendor Rev',
'vendor_rev': 'Vendor Rev',
'serial': 'Vendor SN',
'type': 'Identifier',
'ext_identifier': 'Extended Identifier',
Expand Down
2 changes: 1 addition & 1 deletion tests/mock_tables/asic0/state_db.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"TRANSCEIVER_INFO|Ethernet0": {
"type": "QSFP28 or later",
"hardware_rev": "AC",
"vendor_rev": "AC",
"serial": "MT1706FT02064",
"manufacturer": "Mellanox",
"model": "MFA1A00-C003",
Expand Down
2 changes: 1 addition & 1 deletion tests/mock_tables/asic1/state_db.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"TRANSCEIVER_INFO|Ethernet64": {
"type": "QSFP28 or later",
"hardware_rev": "AC",
"vendor_rev": "AC",
"serial": "MT1706FT02064",
"manufacturer": "Mellanox",
"model": "MFA1A00-C003",
Expand Down
2 changes: 1 addition & 1 deletion tests/mock_tables/asic2/state_db.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"TRANSCEIVER_INFO|Ethernet20": {
"type": "QSFP28 or later",
"hardware_rev": "AC",
"vendor_rev": "AC",
"serial": "MT1706FT02064",
"manufacturer": "Mellanox",
"model": "MFA1A00-C003",
Expand Down
6 changes: 3 additions & 3 deletions tests/mock_tables/state_db.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"TRANSCEIVER_INFO|Ethernet0": {
"type": "QSFP28 or later",
"hardware_rev": "AC",
"vendor_rev": "AC",
"serial": "MT1706FT02064",
"manufacturer": "Mellanox",
"model": "MFA1A00-C003",
Expand All @@ -19,7 +19,7 @@
},
"TRANSCEIVER_INFO|Ethernet12": {
"type": "QSFP28 or later",
"hardware_rev": "AC",
"vendor_rev": "AC",
"serial": "MT1706FT02064",
"manufacturer": "Credo",
"model": "CACL1X321P2PA1MS",
Expand Down Expand Up @@ -69,7 +69,7 @@
},
"TRANSCEIVER_INFO|Ethernet8": {
"type": "QSFP-DD Double Density 8X Pluggable Transceiver",
"hardware_rev": "2A",
"vendor_rev": "2A",
"serial": "INKAO2900002A",
"manufacturer": "INNOLIGHT",
"model": "C-DQ8FNM010-N00",
Expand Down
64 changes: 32 additions & 32 deletions tests/mock_tables/t1/state_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -6823,7 +6823,7 @@
"encoding": "Unspecified",
"ext_identifier": "Power Class 1(1.5W max)",
"ext_rateselect_compliance": "QSFP+ Rate Select Version 1",
"hardware_rev": "",
"vendor_rev": "",
"manufacturer": "Molex",
"model": "1002979026",
"nominal_bit_rate": "0",
Expand All @@ -6846,7 +6846,7 @@
"encoding": "Unspecified",
"ext_identifier": "Power Class 1(1.5W max)",
"ext_rateselect_compliance": "QSFP+ Rate Select Version 1",
"hardware_rev": "",
"vendor_rev": "",
"manufacturer": "Molex",
"model": "1002971101",
"nominal_bit_rate": "255",
Expand All @@ -6869,7 +6869,7 @@
"encoding": "Unspecified",
"ext_identifier": "Power Class 1(1.5W max)",
"ext_rateselect_compliance": "QSFP+ Rate Select Version 1",
"hardware_rev": "",
"vendor_rev": "",
"manufacturer": "Molex",
"model": "1002971101",
"nominal_bit_rate": "255",
Expand All @@ -6892,7 +6892,7 @@
"encoding": "Unspecified",
"ext_identifier": "Power Class 1(1.5W max)",
"ext_rateselect_compliance": "QSFP+ Rate Select Version 1",
"hardware_rev": "",
"vendor_rev": "",
"manufacturer": "Molex",
"model": "1002971101",
"nominal_bit_rate": "255",
Expand All @@ -6915,7 +6915,7 @@
"encoding": "64B66B",
"ext_identifier": "Power Class 1(1.5W max)",
"ext_rateselect_compliance": "QSFP+ Rate Select Version 1",
"hardware_rev": "P",
"vendor_rev": "P",
"manufacturer": "Amphenol",
"model": "NDAAFF-0006",
"nominal_bit_rate": "255",
Expand All @@ -6938,7 +6938,7 @@
"encoding": "Unspecified",
"ext_identifier": "Power Class 1(1.5W max)",
"ext_rateselect_compliance": "QSFP+ Rate Select Version 1",
"hardware_rev": "",
"vendor_rev": "",
"manufacturer": "Molex",
"model": "1002971101",
"nominal_bit_rate": "255",
Expand All @@ -6961,7 +6961,7 @@
"encoding": "Unspecified",
"ext_identifier": "Power Class 1(1.5W max)",
"ext_rateselect_compliance": "QSFP+ Rate Select Version 1",
"hardware_rev": "",
"vendor_rev": "",
"manufacturer": "Molex",
"model": "1002979026",
"nominal_bit_rate": "0",
Expand All @@ -6984,7 +6984,7 @@
"encoding": "Unspecified",
"ext_identifier": "Power Class 1(1.5W max)",
"ext_rateselect_compliance": "QSFP+ Rate Select Version 1",
"hardware_rev": "",
"vendor_rev": "",
"manufacturer": "Molex",
"model": "1002971101",
"nominal_bit_rate": "255",
Expand All @@ -7007,7 +7007,7 @@
"encoding": "Unspecified",
"ext_identifier": "Power Class 1(1.5W max)",
"ext_rateselect_compliance": "QSFP+ Rate Select Version 1",
"hardware_rev": "",
"vendor_rev": "",
"manufacturer": "Molex",
"model": "1002979026",
"nominal_bit_rate": "0",
Expand All @@ -7030,7 +7030,7 @@
"encoding": "Unspecified",
"ext_identifier": "Power Class 1(1.5W max)",
"ext_rateselect_compliance": "QSFP+ Rate Select Version 1",
"hardware_rev": "",
"vendor_rev": "",
"manufacturer": "Molex",
"model": "1002979026",
"nominal_bit_rate": "0",
Expand All @@ -7053,7 +7053,7 @@
"encoding": "Unspecified",
"ext_identifier": "Power Class 1(1.5W max)",
"ext_rateselect_compliance": "QSFP+ Rate Select Version 1",
"hardware_rev": "",
"vendor_rev": "",
"manufacturer": "Molex",
"model": "1002979026",
"nominal_bit_rate": "0",
Expand All @@ -7076,7 +7076,7 @@
"encoding": "Unspecified",
"ext_identifier": "Power Class 1(1.5W max)",
"ext_rateselect_compliance": "QSFP+ Rate Select Version 1",
"hardware_rev": "",
"vendor_rev": "",
"manufacturer": "Molex",
"model": "1002979026",
"nominal_bit_rate": "0",
Expand All @@ -7099,7 +7099,7 @@
"encoding": "Unspecified",
"ext_identifier": "Power Class 1(1.5W max)",
"ext_rateselect_compliance": "QSFP+ Rate Select Version 1",
"hardware_rev": "",
"vendor_rev": "",
"manufacturer": "Molex",
"model": "1002979026",
"nominal_bit_rate": "0",
Expand All @@ -7122,7 +7122,7 @@
"encoding": "64B66B",
"ext_identifier": "Power Class 1(1.5W max)",
"ext_rateselect_compliance": "QSFP+ Rate Select Version 1",
"hardware_rev": "C",
"vendor_rev": "C",
"manufacturer": "Amphenol",
"model": "NDAAFF-M202",
"nominal_bit_rate": "255",
Expand All @@ -7145,7 +7145,7 @@
"encoding": "Unspecified",
"ext_identifier": "Power Class 1(1.5W max)",
"ext_rateselect_compliance": "QSFP+ Rate Select Version 1",
"hardware_rev": "",
"vendor_rev": "",
"manufacturer": "Molex",
"model": "1002979026",
"nominal_bit_rate": "0",
Expand All @@ -7168,7 +7168,7 @@
"encoding": "Unspecified",
"ext_identifier": "Power Class 1(1.5W max)",
"ext_rateselect_compliance": "QSFP+ Rate Select Version 1",
"hardware_rev": "",
"vendor_rev": "",
"manufacturer": "Molex",
"model": "1002979026",
"nominal_bit_rate": "0",
Expand All @@ -7191,7 +7191,7 @@
"encoding": "Unspecified",
"ext_identifier": "Power Class 1(1.5W max)",
"ext_rateselect_compliance": "QSFP+ Rate Select Version 1",
"hardware_rev": "",
"vendor_rev": "",
"manufacturer": "Molex",
"model": "1002971101",
"nominal_bit_rate": "255",
Expand All @@ -7214,7 +7214,7 @@
"encoding": "Unspecified",
"ext_identifier": "Power Class 1(1.5W max)",
"ext_rateselect_compliance": "QSFP+ Rate Select Version 1",
"hardware_rev": "",
"vendor_rev": "",
"manufacturer": "Molex",
"model": "1002971101",
"nominal_bit_rate": "255",
Expand All @@ -7237,7 +7237,7 @@
"encoding": "Unspecified",
"ext_identifier": "Power Class 1(1.5W max)",
"ext_rateselect_compliance": "QSFP+ Rate Select Version 1",
"hardware_rev": "",
"vendor_rev": "",
"manufacturer": "Molex",
"model": "1002971101",
"nominal_bit_rate": "255",
Expand All @@ -7260,7 +7260,7 @@
"encoding": "Unspecified",
"ext_identifier": "Power Class 1(1.5W max)",
"ext_rateselect_compliance": "QSFP+ Rate Select Version 1",
"hardware_rev": "",
"vendor_rev": "",
"manufacturer": "Molex",
"model": "1002971101",
"nominal_bit_rate": "255",
Expand All @@ -7283,7 +7283,7 @@
"encoding": "Unspecified",
"ext_identifier": "Power Class 1(1.5W max)",
"ext_rateselect_compliance": "QSFP+ Rate Select Version 1",
"hardware_rev": "",
"vendor_rev": "",
"manufacturer": "Molex",
"model": "1002971101",
"nominal_bit_rate": "255",
Expand All @@ -7306,7 +7306,7 @@
"encoding": "Unspecified",
"ext_identifier": "Power Class 1(1.5W max)",
"ext_rateselect_compliance": "QSFP+ Rate Select Version 1",
"hardware_rev": "",
"vendor_rev": "",
"manufacturer": "Molex",
"model": "1002971101",
"nominal_bit_rate": "255",
Expand All @@ -7329,7 +7329,7 @@
"encoding": "Unspecified",
"ext_identifier": "Power Class 1(1.5W max)",
"ext_rateselect_compliance": "QSFP+ Rate Select Version 1",
"hardware_rev": "",
"vendor_rev": "",
"manufacturer": "Molex",
"model": "1002971101",
"nominal_bit_rate": "255",
Expand All @@ -7352,7 +7352,7 @@
"encoding": "Unspecified",
"ext_identifier": "Power Class 1(1.5W max)",
"ext_rateselect_compliance": "QSFP+ Rate Select Version 1",
"hardware_rev": "",
"vendor_rev": "",
"manufacturer": "Molex",
"model": "1002971101",
"nominal_bit_rate": "255",
Expand All @@ -7375,7 +7375,7 @@
"encoding": "Unspecified",
"ext_identifier": "Power Class 1(1.5W max)",
"ext_rateselect_compliance": "QSFP+ Rate Select Version 1",
"hardware_rev": "",
"vendor_rev": "",
"manufacturer": "Molex",
"model": "1002971101",
"nominal_bit_rate": "255",
Expand All @@ -7398,7 +7398,7 @@
"encoding": "Unspecified",
"ext_identifier": "Power Class 1(1.5W max)",
"ext_rateselect_compliance": "QSFP+ Rate Select Version 1",
"hardware_rev": "",
"vendor_rev": "",
"manufacturer": "Molex",
"model": "1002971101",
"nominal_bit_rate": "255",
Expand All @@ -7421,7 +7421,7 @@
"encoding": "Unspecified",
"ext_identifier": "Power Class 1(1.5W max)",
"ext_rateselect_compliance": "QSFP+ Rate Select Version 1",
"hardware_rev": "",
"vendor_rev": "",
"manufacturer": "Molex",
"model": "1002979026",
"nominal_bit_rate": "0",
Expand All @@ -7444,7 +7444,7 @@
"encoding": "Unspecified",
"ext_identifier": "Power Class 1(1.5W max)",
"ext_rateselect_compliance": "QSFP+ Rate Select Version 1",
"hardware_rev": "",
"vendor_rev": "",
"manufacturer": "Molex",
"model": "1002971101",
"nominal_bit_rate": "255",
Expand All @@ -7467,7 +7467,7 @@
"encoding": "Unspecified",
"ext_identifier": "Power Class 1(1.5W max)",
"ext_rateselect_compliance": "QSFP+ Rate Select Version 1",
"hardware_rev": "",
"vendor_rev": "",
"manufacturer": "Molex",
"model": "1002971101",
"nominal_bit_rate": "255",
Expand All @@ -7490,7 +7490,7 @@
"encoding": "Unspecified",
"ext_identifier": "Power Class 1(1.5W max)",
"ext_rateselect_compliance": "QSFP+ Rate Select Version 1",
"hardware_rev": "",
"vendor_rev": "",
"manufacturer": "Molex",
"model": "1002971101",
"nominal_bit_rate": "255",
Expand All @@ -7513,7 +7513,7 @@
"encoding": "Unspecified",
"ext_identifier": "Power Class 1(1.5W max)",
"ext_rateselect_compliance": "QSFP+ Rate Select Version 1",
"hardware_rev": "",
"vendor_rev": "",
"manufacturer": "Molex",
"model": "1002971101",
"nominal_bit_rate": "255",
Expand All @@ -7536,7 +7536,7 @@
"encoding": "Unspecified",
"ext_identifier": "Power Class 1(1.5W max)",
"ext_rateselect_compliance": "QSFP+ Rate Select Version 1",
"hardware_rev": "",
"vendor_rev": "",
"manufacturer": "Molex",
"model": "1002971101",
"nominal_bit_rate": "255",
Expand Down
2 changes: 1 addition & 1 deletion tests/sfputil_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def test_convert_sfp_info_to_output_string(self):
'type_abbrv_name': 'QSFP28',
'manufacturer': 'Mellanox',
'model': 'MCP1600-C003',
'hardware_rev': 'A2',
'vendor_rev': 'A2',
'serial': 'MT1636VS10561',
'vendor_oui': '00-02-c9',
'vendor_date': '2016-07-18',
Expand Down

0 comments on commit 656ade1

Please sign in to comment.