Skip to content

Commit

Permalink
Renamed get_cable_type to get_cable_length_type
Browse files Browse the repository at this point in the history
  • Loading branch information
mihirpat1 authored and prgeor committed Dec 5, 2023
1 parent c9a81b0 commit ecc3db4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions sonic_platform_base/sonic_xcvr/api/public/cmis.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def get_model(self):
'''
return self.xcvr_eeprom.read(consts.VENDOR_PART_NO_FIELD)

def get_cable_type(self):
def get_cable_length_type(self):
'''
This function returns the cable type of the module
'''
Expand Down Expand Up @@ -171,7 +171,7 @@ def get_transceiver_info(self):
xcvr_info['media_lane_count'] = self.get_media_lane_count()
xcvr_info['host_lane_assignment_option'] = self.get_host_lane_assignment_option()
xcvr_info['media_lane_assignment_option'] = self.get_media_lane_assignment_option()
xcvr_info['cable_type'] = self.get_cable_type()
xcvr_info['cable_type'] = self.get_cable_length_type()
apsel_dict = self.get_active_apsel_hostlane()
for lane in range(1, self.NUM_CHANNELS+1):
xcvr_info["%s%d" % ("active_apsel_hostlane", lane)] = \
Expand Down
4 changes: 2 additions & 2 deletions tests/sonic_xcvr/test_cmis.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ def test_get_model(self, mock_response, expected):
result = self.api.get_model()
assert result == expected

def test_get_cable_type(self):
assert self.api.get_cable_type() == "Length Cable Assembly(m)"
def test_get_cable_length_type(self):
assert self.api.get_cable_length_type() == "Length Cable Assembly(m)"

@pytest.mark.parametrize("mock_response, expected", [
("0.0", "0.0"),
Expand Down

0 comments on commit ecc3db4

Please sign in to comment.