Skip to content
Merged
Show file tree
Hide file tree
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
24 changes: 20 additions & 4 deletions py-scripts/lf_ftp.py
Original file line number Diff line number Diff line change
Expand Up @@ -1389,7 +1389,11 @@ def get_port_data(self):
self.port_rx_rate.append('-')
for sta in station_names:
if sta in interfaces_dict:
self.channel_list.append(interfaces_dict[sta]['channel'])
channel_value = str(interfaces_dict[sta].get('channel', ''))
if channel_value in ('', '0', '-1'):
self.channel_list.append('NA')
else:
self.channel_list.append(interfaces_dict[sta]['channel'])
else:
self.channel_list.append('-')
for sta in station_names:
Expand Down Expand Up @@ -1428,7 +1432,11 @@ def my_monitor(self):
for interface in response_port['interfaces']:
for port, port_data in interface.items():
if port in self.station_list:
self.channel_list.append(str(port_data['channel']))
channel_value = str(port_data.get('channel', ''))
if channel_value in ('', '0', '-1'):
self.channel_list.append('NA')
else:
self.channel_list.append(channel_value)
self.mode_list.append(str(port_data['mode']))
self.mac_id_list.append(str(port_data['mac']))
self.ssid_list.append(str(port_data['ssid']))
Expand All @@ -1437,7 +1445,11 @@ def my_monitor(self):
for interface in response_port['interfaces']:
for port, port_data in interface.items():
if port in self.input_devices_list:
self.channel_list.append(str(port_data['channel']))
channel_value = str(port_data.get('channel', ''))
if channel_value in ('', '0', '-1'):
self.channel_list.append('NA')
else:
self.channel_list.append(channel_value)
self.mode_list.append(str(port_data['mode']))
self.ssid_list.append(str(port_data['ssid']))

Expand Down Expand Up @@ -1524,7 +1536,11 @@ def my_monitor_for_real_devices(self):
for interface in response_port['interfaces']:
for port, port_data in interface.items():
if port in self.input_devices_list:
self.channel_list.append(str(port_data['channel']))
channel_value = str(port_data.get('channel', ''))
if channel_value in ('', '0', '-1'):
self.channel_list.append('NA')
else:
self.channel_list.append(channel_value)
self.mode_list.append(str(port_data['mode']))
self.ssid_list.append(str(port_data['ssid']))
if self.dowebgui:
Expand Down
12 changes: 10 additions & 2 deletions py-scripts/lf_interop_ping_plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,11 @@ def generate_report(self, result_json=None, result_dir='Ping_Plotter_Test_Report
self.packets_dropped.append(int(device_data['ping_stats']['dropped'][-1]))
self.device_names.append(device_data['name'])
self.device_modes.append(device_data['mode'])
self.device_channels.append(device_data['channel'])
channel_value = str(device_data.get('channel', ''))
if channel_value in ('', '0', '-1'):
self.device_channels.append('NA')
else:
self.device_channels.append(device_data['channel'])
self.device_mac.append(device_data['mac'])
self.device_ips.append(device_data['ip'])
self.device_bssid.append(device_data['bssid'])
Expand Down Expand Up @@ -2176,7 +2180,11 @@ def generate_report_robo(self, result_json=None, result_dir='Ping_Plotter_Test_R
self.packets_dropped.append(int(device_data['ping_stats']['dropped'][-1]))
self.device_names.append(device_data['name'])
self.device_modes.append(device_data['mode'])
self.device_channels.append(device_data['channel'])
channel_value = str(device_data.get('channel', ''))
if channel_value in ('', '0', '-1'):
self.device_channels.append('NA')
else:
self.device_channels.append(device_data['channel'])
self.device_mac.append(device_data['mac'])
self.device_ips.append(device_data['ip'])
self.device_bssid.append(device_data['bssid'])
Expand Down
6 changes: 5 additions & 1 deletion py-scripts/lf_interop_throughput.py
Original file line number Diff line number Diff line change
Expand Up @@ -1060,7 +1060,11 @@ def get_signal_and_channel_data(self, station_names):
signal_list.append('-')
for sta in station_names:
if sta in interfaces_dict:
channel_list.append(interfaces_dict[sta]['channel'])
channel_value = str(interfaces_dict[sta].get('channel', ''))
if channel_value in ('', '0', '-1'):
channel_list.append('NA')
else:
channel_list.append(interfaces_dict[sta]['channel'])
else:
channel_list.append('-')
for sta in station_names:
Expand Down
24 changes: 20 additions & 4 deletions py-scripts/lf_interop_video_streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,11 @@ def get_signal_data(self):
tx_rate.append(alias[i]['tx-rate'])
rx_rate.append(alias[i]['rx-rate'])
bssid.append(alias[i]['ap'])
channel.append(alias[i]['channel'])
channel_value = str(alias[i].get('channel', ''))
if channel_value in ('', '0', '-1'):
channel.append('NA')
else:
channel.append(alias[i]['channel'])

rssi = [0 if i.strip() == "" else int(i) for i in rssi]
return rssi, tx_rate, bssid, channel
Expand Down Expand Up @@ -938,7 +942,11 @@ def monitor_for_runtime_csv(self, duration, file_path, individual_df, iteration,
mac.append(alias[i]['mac'])
mode.append(alias[i]['mode'])
rssi.append(alias[i]['signal'])
channel.append(alias[i]['channel'])
channel_value = str(alias[i].get('channel', ''))
if channel_value in ('', '0', '-1'):
channel.append('NA')
else:
channel.append(alias[i]['channel'])
tx_rate.append(alias[i]['tx-rate'])
rx_rate.append(alias[i]['rx-rate'])
bssid.append(alias[i]['ap'])
Expand Down Expand Up @@ -1441,7 +1449,11 @@ def generate_report(self, date, iterations_before_test_stopped_by_user, test_set
mac.append(alias[i]['mac'])
mode.append(alias[i]['mode'])
rssi.append(alias[i]['signal'])
channel.append(alias[i]['channel'])
channel_value = str(alias[i].get('channel', ''))
if channel_value in ('', '0', '-1'):
channel.append('NA')
else:
channel.append(alias[i]['channel'])
tx_rate.append(alias[i]['tx-rate'])
total_urls = self.data["total_urls"]
total_err = self.data["total_err"]
Expand Down Expand Up @@ -2178,7 +2190,11 @@ def generate_report_for_robo(self, test_setup_info, report_path='', passed_coord
mac.append(alias[i]['mac'])
mode.append(alias[i]['mode'])
rssi.append(alias[i]['signal'])
channel.append(alias[i]['channel'])
channel_value = str(alias[i].get('channel', ''))
if channel_value in ('', '0', '-1'):
channel.append('NA')
else:
channel.append(alias[i]['channel'])
tx_rate.append(alias[i]['tx-rate'])

self.add_buffer_and_wait_time_images(report=report)
Expand Down
26 changes: 20 additions & 6 deletions py-scripts/lf_webpage.py
Original file line number Diff line number Diff line change
Expand Up @@ -1329,7 +1329,11 @@ def get_device_port_details(self):
for interface in self.response_port['interfaces']:
for port, port_data in interface.items():
if port in self.port_list:
self.channel_list.append(str(port_data['channel']))
channel_value = str(port_data.get('channel', ''))
if channel_value in ('', '0', '-1'):
self.channel_list.append('NA')
else:
self.channel_list.append(channel_value)
self.mode_list.append(str(port_data['mode']))
self.ssid_list.append(str(port_data['ssid']))

Expand Down Expand Up @@ -1629,15 +1633,23 @@ def generate_report(self, date, num_stations, duration, test_setup_info, dataset
for interface in self.response_port['interfaces']:
for port, port_data in interface.items():
if port in self.port_list:
self.channel_list.append(str(port_data['channel']))
channel_value = str(port_data.get('channel', ''))
if channel_value in ('', '0', '-1'):
self.channel_list.append('NA')
else:
self.channel_list.append(channel_value)
self.mode_list.append(str(port_data['mode']))
self.ssid_list.append(str(port_data['ssid']))
elif self.client_type == "Virtual":
self.devices = self.station_list[0]
for interface in self.response_port['interfaces']:
for port, port_data in interface.items():
if port in self.station_list[0]:
self.channel_list.append(str(port_data['channel']))
channel_value = str(port_data.get('channel', ''))
if channel_value in ('', '0', '-1'):
self.channel_list.append('NA')
else:
self.channel_list.append(channel_value)
self.mode_list.append(str(port_data['mode']))
self.macid_list.append(str(port_data['mac']))
self.ssid_list.append(str(port_data['ssid']))
Expand Down Expand Up @@ -2062,9 +2074,11 @@ def get_signal_and_link_speed_data(self):
bssid_list.append('-')
for sta in station_names:
if sta in interfaces_dict:
channel_list.append(interfaces_dict[sta]['channel'])
else:
channel_list.append('-')
channel_value = str(interfaces_dict[sta].get('channel', ''))
if channel_value in ('', '0', '-1'):
channel_list.append('NA')
else:
channel_list.append(interfaces_dict[sta]['channel'])
return signal_list, link_speed_list, rx_rate_list, bssid_list, channel_list

def monitor_cx(self):
Expand Down
Loading