mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 11:18:03 +00:00
Added dual_band_performance test function
Signed-off-by: karthikaeyetea <karthika.subramani@candelatech.com>
This commit is contained in:
@@ -58,6 +58,8 @@ rvr = importlib.import_module("py-scripts.lf_rvr_test")
|
|||||||
rvr_test = rvr.RvrTest
|
rvr_test = rvr.RvrTest
|
||||||
lf_pcap = importlib.import_module("py-scripts.lf_pcap")
|
lf_pcap = importlib.import_module("py-scripts.lf_pcap")
|
||||||
LfPcap = lf_pcap.LfPcap
|
LfPcap = lf_pcap.LfPcap
|
||||||
|
lf_ap_auto_test = importlib.import_module("py-scripts.lf_ap_auto_test")
|
||||||
|
ApAutoTest = lf_ap_auto_test.ApAutoTest
|
||||||
|
|
||||||
|
|
||||||
class lf_tests(lf_libs):
|
class lf_tests(lf_libs):
|
||||||
@@ -1799,6 +1801,70 @@ class lf_tests(lf_libs):
|
|||||||
|
|
||||||
return rvr_obj, report_name
|
return rvr_obj, report_name
|
||||||
|
|
||||||
|
def dualbandperformancetest(self, ssid_5G="[BLANK]", ssid_2G="[BLANK]", mode="BRIDGE", vlan_id=100, dut_name="TIP",
|
||||||
|
instance_name="test_demo", dut_5g="", dut_2g="", influx_tags="", move_to_influx=False,
|
||||||
|
create_vlan=True, dut_data={}):
|
||||||
|
instance_name = ''.join(random.choices(string.ascii_uppercase + string.digits, k=S))
|
||||||
|
|
||||||
|
if mode == "BRIDGE" or mode == "NAT-WAN":
|
||||||
|
upstream_port = list(self.lanforge_data['wan_ports'].keys())[0]
|
||||||
|
if mode == "VLAN":
|
||||||
|
if vlan_id is None:
|
||||||
|
logging.error("VLAN ID is Unspecified in the VLAN Case")
|
||||||
|
pytest.skip("VLAN ID is Unspecified in the VLAN Case")
|
||||||
|
else:
|
||||||
|
if create_vlan:
|
||||||
|
vlan_raw_lines = self.add_vlan(vlan_ids=vlan_id, build=True)
|
||||||
|
upstream_port = list(self.lanforge_data['wan_ports'].keys())[0] + "." + str(vlan_id[0])
|
||||||
|
logging.info("Upstream data: " + str(upstream_port))
|
||||||
|
|
||||||
|
self.update_dut_ssid(dut_data=dut_data)
|
||||||
|
self.dualbandptest_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_0=dut_5g,
|
||||||
|
dut2_0=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=124,
|
||||||
|
radio2=[self.wave2_2g_radios],
|
||||||
|
radio5=[self.wave2_5g_radios],
|
||||||
|
raw_lines=[['modes', 'AUTO']],
|
||||||
|
# test_tag=influx_tags,
|
||||||
|
sets=[['Basic Client Connectivity', '0'], ['Multi Band Performance', '1'],
|
||||||
|
['Throughput vs Pkt Size', '0'], ['Capacity', '0'],
|
||||||
|
['Skip 2.4Ghz Tests', '1'],
|
||||||
|
['Skip 5Ghz Tests', '1'],
|
||||||
|
['Stability', '0'],
|
||||||
|
['Band-Steering', '0'], ['Multi-Station Throughput vs Pkt Size', '0'],
|
||||||
|
['Long-Term', '0']]
|
||||||
|
)
|
||||||
|
self.dualbandptest_obj.setup()
|
||||||
|
self.dualbandptest_obj.run()
|
||||||
|
if move_to_influx:
|
||||||
|
report_name = "../reports/" + self.dualbandptest_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||||
|
try:
|
||||||
|
influx = CSVtoInflux(influx_host=self.influx_params["influx_host"],
|
||||||
|
influx_port=self.influx_params["influx_port"],
|
||||||
|
influx_org=self.influx_params["influx_org"],
|
||||||
|
influx_token=self.influx_params["influx_token"],
|
||||||
|
influx_bucket=self.influx_params["influx_bucket"],
|
||||||
|
path=report_name)
|
||||||
|
|
||||||
|
influx.glob()
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
pass
|
||||||
|
return self.dualbandptest_obj
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
basic = {
|
basic = {
|
||||||
"target": "tip_2x",
|
"target": "tip_2x",
|
||||||
|
|||||||
Reference in New Issue
Block a user