diff --git a/tests/common/devices/onyx.py b/tests/common/devices/onyx.py index b3f467b72dc..3169213d77a 100644 --- a/tests/common/devices/onyx.py +++ b/tests/common/devices/onyx.py @@ -189,19 +189,6 @@ def set_speed(self, interface_name, speed): speed = 'auto' else: speed = speed[:-3] + 'G' - # The speed support list for onyx is like '1G 10G 25G 40G 50Gx1 50Gx2 100Gx2 100Gx4 200Gx4'. - # We need to set the speed according to the speed support list. - # For example, when dut and fanout all support 50G, - # if support speed list of fanout just includes 50Gx1 not 50G, - # we need to set the speed with 50Gx1 instead of 50G, otherwise, the port can not be up. - all_support_speeds = self.get_supported_speeds(interface_name, raw_data=True) - for support_speed in all_support_speeds: - if speed in support_speed: - logger.info("Speed {} find the matched support speed:{} ".format(speed, support_speed)) - speed = support_speed - break - logger.info("set speed is {}".format(speed)) - if autoneg_mode or speed == 'auto': out = self.host.onyx_config( lines=['shutdown', 'speed {}'.format(speed), 'no shutdown'],