Skip to content
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
5 changes: 5 additions & 0 deletions sonic_platform_base/sonic_xcvr/api/public/cmis.py
Original file line number Diff line number Diff line change
Expand Up @@ -1914,6 +1914,11 @@ def get_application_advertisement(self):
break
buf['host_lane_assignment_options'] = val

key = "{}_{}".format(consts.MEDIA_LANE_ASSIGNMENT_OPTION, app)
val = dic.get(key)
if val is not None:
buf['media_lane_assignment_options'] = val

ret[app] = buf
return ret

Expand Down
4 changes: 3 additions & 1 deletion tests/sonic_xcvr/test_cmis.py
Original file line number Diff line number Diff line change
Expand Up @@ -1991,7 +1991,8 @@ def test_get_application_advertisement(self):
consts.MODULE_MEDIA_INTERFACE_SM + "_1": "400GBASE-DR4 (Cl 124)",
consts.MEDIA_LANE_COUNT + "_1": 4,
consts.HOST_LANE_COUNT + "_1": 8,
consts.HOST_LANE_ASSIGNMENT_OPTION + "_1": 0x01
consts.HOST_LANE_ASSIGNMENT_OPTION + "_1": 0x01,
consts.MEDIA_LANE_ASSIGNMENT_OPTION + "_1": 0x02
},
Sff8024.MODULE_MEDIA_TYPE[2]
]
Expand All @@ -2003,6 +2004,7 @@ def test_get_application_advertisement(self):
assert result[1]['host_lane_count'] == 8
assert result[1]['media_lane_count'] == 4
assert result[1]['host_lane_assignment_options'] == 0x01
assert result[1]['media_lane_assignment_options'] == 0x02

def test_get_application_advertisement_non_support(self):
self.api.xcvr_eeprom.read = MagicMock(return_value = None)
Expand Down