mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-10-31 18:58:01 +00:00
Replaced dual band with multiband
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
This commit is contained in:
@@ -2659,11 +2659,12 @@ class lf_tests(lf_libs):
|
|||||||
|
|
||||||
return rvr_obj, report_name
|
return rvr_obj, report_name
|
||||||
|
|
||||||
def dual_band_performance_test(self, ssid_5G="[BLANK]", ssid_2G="[BLANK]", mode="BRIDGE", vlan_id=100,
|
def multi_band_performance_test(self, ssid_5G="[BLANK]", ssid_2G="[BLANK]", ssid_6G="[BLANK]", mode="BRIDGE",
|
||||||
dut_name="TIP",
|
vlan_id=100,
|
||||||
instance_name="test_demo", dut_5g="", dut_2g="", influx_tags="",
|
dut_name="TIP",
|
||||||
move_to_influx=False,
|
instance_name="test_demo", dut_5g="", dut_2g="", dut_6g="", influx_tags="",
|
||||||
create_vlan=True, dut_data={}):
|
move_to_influx=False,
|
||||||
|
create_vlan=True, dut_data={}):
|
||||||
try:
|
try:
|
||||||
instance_name = ''.join(random.choices(string.ascii_uppercase + string.digits, k=12))
|
instance_name = ''.join(random.choices(string.ascii_uppercase + string.digits, k=12))
|
||||||
|
|
||||||
@@ -2680,47 +2681,122 @@ class lf_tests(lf_libs):
|
|||||||
logging.info("Upstream data: " + str(upstream_port))
|
logging.info("Upstream data: " + str(upstream_port))
|
||||||
|
|
||||||
self.update_dut_ssid(dut_data=dut_data)
|
self.update_dut_ssid(dut_data=dut_data)
|
||||||
self.dualbandptest_obj = ApAutoTest(lf_host=self.manager_ip,
|
|
||||||
lf_port=self.manager_http_port,
|
if dut_6g:
|
||||||
lf_user="lanforge",
|
logging.info(f"dut_6g data:{dut_6g}")
|
||||||
lf_password="lanforge",
|
band = "sixg"
|
||||||
ssh_port=self.manager_ssh_port,
|
self.check_band_ap(band=band)
|
||||||
instance_name=instance_name,
|
self.multibandptest_obj = ApAutoTest(lf_host=self.manager_ip,
|
||||||
config_name="dbp_config",
|
lf_port=self.manager_http_port,
|
||||||
upstream=upstream_port,
|
lf_user="lanforge",
|
||||||
pull_report=True,
|
lf_password="lanforge",
|
||||||
dut5_0=dut_5g,
|
ssh_port=self.manager_ssh_port,
|
||||||
dut2_0=dut_2g,
|
instance_name=instance_name,
|
||||||
load_old_cfg=False,
|
config_name="dbp_config",
|
||||||
local_lf_report_dir=self.local_report_path,
|
upstream=upstream_port,
|
||||||
max_stations_2=64,
|
pull_report=True,
|
||||||
max_stations_5=64,
|
dut5_1=dut_5g,
|
||||||
max_stations_dual=64,
|
dut2_1=dut_2g,
|
||||||
radio2=[self.wave2_2g_radios],
|
dut6_1=dut_6g,
|
||||||
radio5=[self.wave2_5g_radios],
|
load_old_cfg=False,
|
||||||
raw_lines=[['modes: AUTO'], ['dur20: 60']],
|
local_lf_report_dir=self.local_report_path,
|
||||||
# test_tag=influx_tags,
|
max_stations_2=64,
|
||||||
sets=[['Basic Client Connectivity', '0'],
|
max_stations_5=64,
|
||||||
['Multi Band Throughput', '1'],
|
max_stations_6=64,
|
||||||
['Capacity', '0'],
|
max_stations_tri=64,
|
||||||
['Skip 2.4Ghz Tests', '0'],
|
max_bandwidth=320,
|
||||||
['Channel Switching', '0'],
|
radio2=[[self.be200_radios[0]]],
|
||||||
['Skip 5Ghz Tests', '0'],
|
radio5=[[self.be200_radios[1]]],
|
||||||
['Skip 6Ghz Tests', '1'],
|
radio6=[[self.be200_radios[2]]],
|
||||||
['Skip 5Ghz-B Tests', '1'],
|
raw_lines=[['modes: AUTO'], ['dur20: 60']],
|
||||||
['Skip Tri-Band Tests', '1'],
|
# test_tag=influx_tags,
|
||||||
['Skip Tri-Band (2.4, 5-low, 5-high) Tests', '1'],
|
sets=[['Basic Client Connectivity', '0'],
|
||||||
['Stability', '0'],
|
['Multi Band Throughput', '1'],
|
||||||
['Band Steering', '0'],
|
['Capacity', '0'],
|
||||||
['Multi STA Throughput vs Pkt Size', '0'],
|
['Skip 2.4Ghz Tests', '0'],
|
||||||
['Single STA Throughput vs Pkt Size', '0'],
|
['Channel Switching', '0'],
|
||||||
['Long Term', '0']]
|
['Skip 5Ghz Tests', '0'],
|
||||||
)
|
['Skip 6Ghz Tests', '0'],
|
||||||
self.dualbandptest_obj.setup()
|
['Skip 5Ghz-B Tests', '1'],
|
||||||
self.dualbandptest_obj.run()
|
['Skip Tri-Band Tests', '0'],
|
||||||
|
['Skip Tri-Band (2.4, 5-low, 5-high) Tests', '1'],
|
||||||
|
['Stability', '0'],
|
||||||
|
['Band Steering', '0'],
|
||||||
|
['Multi STA Throughput vs Pkt Size', '0'],
|
||||||
|
['Single STA Throughput vs Pkt Size', '0'],
|
||||||
|
['Long Term', '0']]
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
dict_all_radios_2g = {"be200_radios": self.be200_radios,
|
||||||
|
"ax210_radios": self.ax210_radios, "ax200_radios": self.ax200_radios,
|
||||||
|
"mtk_radios": self.mtk_radios,
|
||||||
|
"wave2_2g_radios": self.wave2_2g_radios,
|
||||||
|
"wave1_radios": self.wave1_radios
|
||||||
|
}
|
||||||
|
dict_all_radios_5g = {"be200_radios": self.be200_radios,
|
||||||
|
"ax210_radios": self.ax210_radios, "ax200_radios": self.ax200_radios,
|
||||||
|
"mtk_radios": self.mtk_radios,
|
||||||
|
"wave2_5g_radios": self.wave2_5g_radios,
|
||||||
|
"wave1_radios": self.wave1_radios
|
||||||
|
}
|
||||||
|
radio5 = []
|
||||||
|
for radio_list in dict_all_radios_5g.values():
|
||||||
|
if radio_list:
|
||||||
|
radio5.append(radio_list[0])
|
||||||
|
break
|
||||||
|
logging.info(f"Selected Radio for radio5:{radio5}")
|
||||||
|
radio2 = []
|
||||||
|
for radio_list in dict_all_radios_2g.values():
|
||||||
|
for radio in radio_list:
|
||||||
|
if radio not in radio5: # Ensure it's not the same as radio5
|
||||||
|
radio2.append(radio)
|
||||||
|
break
|
||||||
|
if radio2: # Stop checking further lists if a radio is assigned
|
||||||
|
break
|
||||||
|
logging.info(f"Selected Radio for radio2: {radio2}")
|
||||||
|
|
||||||
|
self.multibandptest_obj = ApAutoTest(lf_host=self.manager_ip,
|
||||||
|
lf_port=self.manager_http_port,
|
||||||
|
lf_user="lanforge",
|
||||||
|
lf_password="lanforge",
|
||||||
|
ssh_port=self.manager_ssh_port,
|
||||||
|
instance_name=instance_name,
|
||||||
|
config_name="dbp_config",
|
||||||
|
upstream=upstream_port,
|
||||||
|
pull_report=True,
|
||||||
|
dut5_1=dut_5g,
|
||||||
|
dut2_1=dut_2g,
|
||||||
|
load_old_cfg=False,
|
||||||
|
local_lf_report_dir=self.local_report_path,
|
||||||
|
max_stations_2=64,
|
||||||
|
max_stations_5=64,
|
||||||
|
max_stations_dual=64,
|
||||||
|
max_bandwidth=80,
|
||||||
|
radio2=[radio2],
|
||||||
|
radio5=[radio5],
|
||||||
|
raw_lines=[['modes: AUTO'], ['dur20: 60']],
|
||||||
|
# test_tag=influx_tags,
|
||||||
|
sets=[['Basic Client Connectivity', '0'],
|
||||||
|
['Multi Band Throughput', '1'],
|
||||||
|
['Capacity', '0'],
|
||||||
|
['Skip 2.4Ghz Tests', '0'],
|
||||||
|
['Channel Switching', '0'],
|
||||||
|
['Skip 5Ghz Tests', '0'],
|
||||||
|
['Skip 6Ghz Tests', '1'],
|
||||||
|
['Skip 5Ghz-B Tests', '1'],
|
||||||
|
['Skip Tri-Band Tests', '1'],
|
||||||
|
['Skip Tri-Band (2.4, 5-low, 5-high) Tests', '1'],
|
||||||
|
['Stability', '0'],
|
||||||
|
['Band Steering', '0'],
|
||||||
|
['Multi STA Throughput vs Pkt Size', '0'],
|
||||||
|
['Single STA Throughput vs Pkt Size', '0'],
|
||||||
|
['Long Term', '0']]
|
||||||
|
)
|
||||||
|
self.multibandptest_obj.setup()
|
||||||
|
self.multibandptest_obj.run()
|
||||||
if move_to_influx:
|
if move_to_influx:
|
||||||
report_name = "../reports/" + \
|
report_name = "../reports/" + \
|
||||||
self.dualbandptest_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
self.multibandptest_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||||
try:
|
try:
|
||||||
influx = CSVtoInflux(influx_host=self.influx_params["influx_host"],
|
influx = CSVtoInflux(influx_host=self.influx_params["influx_host"],
|
||||||
influx_port=self.influx_params["influx_port"],
|
influx_port=self.influx_params["influx_port"],
|
||||||
@@ -2733,20 +2809,17 @@ class lf_tests(lf_libs):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
pass
|
pass
|
||||||
report_name = self.dualbandptest_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + "/"
|
report_name = self.multibandptest_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[
|
||||||
self.attach_report_graphs(report_name=report_name, pdf_name="Dual Band Performance Test")
|
-1] + "/"
|
||||||
|
self.attach_report_graphs(report_name=report_name, pdf_name="Multi Band Performance Test")
|
||||||
result = self.read_kpi_file(column_name=["pass/fail"], dir_name=report_name)
|
result = self.read_kpi_file(column_name=["pass/fail"], dir_name=report_name)
|
||||||
allure.attach.file(source="../reports/" + report_name + "/kpi.csv",
|
allure.attach.file(source="../reports/" + report_name + "/kpi.csv",
|
||||||
name=f"dual_band_CSV", attachment_type="CSV")
|
name=f"Multi_band_CSV", attachment_type="CSV")
|
||||||
# if result[0][0] == "PASS":
|
|
||||||
# return True, "Test Passed"
|
|
||||||
# else:
|
|
||||||
# return False, "Test Failed"
|
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.error(f"{e}")
|
logging.error(f"{e}")
|
||||||
return False, f"{e}"
|
return False, f"{e}"
|
||||||
return self.dualbandptest_obj
|
return self.multibandptest_obj
|
||||||
|
|
||||||
def multi_station_performance(self, ssid_name=None, security_key=None, mode="BRIDGE", vlan=1, band="twog",
|
def multi_station_performance(self, ssid_name=None, security_key=None, mode="BRIDGE", vlan=1, band="twog",
|
||||||
antenna=1,
|
antenna=1,
|
||||||
|
|||||||
Reference in New Issue
Block a user