Skip to content
Merged
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
13 changes: 0 additions & 13 deletions tests/common/devices/onyx.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down