diff --git a/sonic_platform_base/sonic_xcvr/api/public/cmis.py b/sonic_platform_base/sonic_xcvr/api/public/cmis.py index a0c899b00..a9c4c5b34 100644 --- a/sonic_platform_base/sonic_xcvr/api/public/cmis.py +++ b/sonic_platform_base/sonic_xcvr/api/public/cmis.py @@ -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 ''' @@ -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)] = \ diff --git a/tests/sonic_xcvr/test_cmis.py b/tests/sonic_xcvr/test_cmis.py index 8f6e3b9df..95cf1a994 100644 --- a/tests/sonic_xcvr/test_cmis.py +++ b/tests/sonic_xcvr/test_cmis.py @@ -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"),