Open amitpawar12 opened 5 months ago
Workaround is provided to support breakout ports. Will implement and fix will be available in later snappi versions
keysight team working on this issue.
Workaround:
Replace below fixture in snappi_helpers.py
def get_ports(self, peer_device=None): """This function returns list of ports that are (1) associated with a chassis (selected earlier using get_fanout_device_details() function) and (2) connected to a peer device (SONiC DUT) as a list of dictionary.
Note: If you have not used get_fanout_device_details(), by default 0th
(first) chassis remains selected. If you do not specify peer_device,
this function will return all the ports of the chassis.
Args:
peer_device (str): hostname of the peer device
Returns:
Dictionary of chassis card port information.
"""
retval = []
for port in self.current_snappi_port_list:
info_list = port.split('/')
if 'Card' in port:
dict_element = {
'ip': info_list[0],
'card_id': info_list[1].replace('Card', ''),
'port_id': info_list[2].replace('Port', ''),
'peer_port': info_list[3],
'peer_device': info_list[4],
'speed': info_list[5]
}
if peer_device is None or info_list[4] == peer_device:
retval.append(dict_element)
else:
dict_element = {
'ip': info_list[0],
'port_id': info_list[1].replace('Port', ''),
'peer_port': info_list[2],
'peer_device': info_list[3],
'speed': info_list[4]
}
if peer_device is None or info_list[3] == peer_device:
retval.append(dict_element)
return retval
And change the csv file to
Here under EndPort instead of "Card1/Port53", replace it with Port8.1
DeviceInterfaceLink BandWidth="100000" EndDevice="snapp-sonic" EndPort="Port8.1" StartDevice="sonic-s6100-dut" StartPort="Ethernet0"/
@sdszhang @rraghav-cisco @kenneth-arista @ysmanman for viz.
@kamalsahu0001 Do we need to raise a new PR to change the fixture, or okay to close this one?
Description
We have following configuration in ansible/files/sonic_lab_links.csv:
StartDevice,StartPort,EndDevice,EndPort,BandWidth,VlanID,VlanMode dut-card,dut-port,sonic-API,Card1/Port9.1,100000,,Access
The snappi-API crashes when it reads the file info.
Steps to reproduce the issue:
Describe the results you received: The snappi_api crashes.
Describe the results you expected: The snappi_api should be able to read the breakout link configuration.
@kamalsahu0001
Additional information you deem important: