mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 19:28:00 +00:00
Added 6g band and DUTs to personal security columns as per the recent changes in GUI
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
This commit is contained in:
@@ -13,8 +13,8 @@ the options and how best to input data.
|
||||
|
||||
./lf_ap_auto_test.py --mgr localhost --port 8080 --lf_user lanforge --lf_password lanforge \
|
||||
--instance_name ap-auto-instance --config_name test_con --upstream 1.1.eth2 \
|
||||
--dut5_0 'linksys-8450 Default-SSID-5gl c4:41:1e:f5:3f:25 (2)' \
|
||||
--dut2_0 'linksys-8450 Default-SSID-2g c4:41:1e:f5:3f:24 (1)' \
|
||||
--dut5_1 'linksys-8450 Default-SSID-5gl c4:41:1e:f5:3f:25 (2)' \
|
||||
--dut2_1 'linksys-8450 Default-SSID-2g c4:41:1e:f5:3f:24 (1)' \
|
||||
--max_stations_2 100 --max_stations_5 100 --max_stations_dual 200 \
|
||||
--radio2 1.1.wiphy0 --radio2 1.1.wiphy2 \
|
||||
--radio5 1.1.wiphy1 --radio5 1.1.wiphy3 --radio5 1.1.wiphy4 \
|
||||
@@ -184,6 +184,7 @@ cv_base_adjust_parser = cv_test_manager.cv_base_adjust_parser
|
||||
LFUtils = importlib.import_module("py-json.LANforge.LFUtils")
|
||||
lf_logger_config = importlib.import_module("py-scripts.lf_logger_config")
|
||||
|
||||
|
||||
class ApAutoTest(cvtest):
|
||||
def __init__(self,
|
||||
lf_host="localhost",
|
||||
@@ -197,14 +198,19 @@ class ApAutoTest(cvtest):
|
||||
config_name="ap_auto_config",
|
||||
upstream=None,
|
||||
pull_report=False,
|
||||
dut5_0="NA",
|
||||
dut2_0="NA",
|
||||
dut5_1="NA",
|
||||
dut2_1="NA",
|
||||
dut6_1="NA",
|
||||
load_old_cfg=False,
|
||||
max_stations_2=100,
|
||||
max_stations_5=100,
|
||||
max_stations_6=100,
|
||||
max_bandwidth=80,
|
||||
max_stations_dual=200,
|
||||
max_stations_tri=200,
|
||||
radio2=None,
|
||||
radio5=None,
|
||||
radio6=None,
|
||||
enables=None,
|
||||
disables=None,
|
||||
raw_lines=None,
|
||||
@@ -219,6 +225,8 @@ class ApAutoTest(cvtest):
|
||||
radio2 = []
|
||||
if radio5 is None:
|
||||
radio5 = []
|
||||
if radio6 is None:
|
||||
radio6 = []
|
||||
if enables is None:
|
||||
enables = []
|
||||
if disables is None:
|
||||
@@ -237,13 +245,18 @@ class ApAutoTest(cvtest):
|
||||
self.pull_report = pull_report
|
||||
self.load_old_cfg = load_old_cfg
|
||||
self.test_name = "AP-Auto"
|
||||
self.dut5_0 = dut5_0
|
||||
self.dut2_0 = dut2_0
|
||||
self.dut5_1 = dut5_1
|
||||
self.dut2_1 = dut2_1
|
||||
self.dut6_1 = dut6_1
|
||||
self.max_stations_2 = max_stations_2
|
||||
self.max_stations_5 = max_stations_5
|
||||
self.max_stations_6 = max_stations_6
|
||||
self.max_bandwidth = max_bandwidth
|
||||
self.max_stations_dual = max_stations_dual
|
||||
self.max_stations_tri = max_stations_tri
|
||||
self.radio2 = radio2
|
||||
self.radio5 = radio5
|
||||
self.radio6 = radio6
|
||||
self.enables = enables
|
||||
self.disables = disables
|
||||
self.raw_lines = raw_lines
|
||||
@@ -281,21 +294,36 @@ class ApAutoTest(cvtest):
|
||||
cfg_options.append("radio5-%i: %s" % (ridx, r[0]))
|
||||
ridx += 1
|
||||
|
||||
ridx = 0
|
||||
for r in self.radio6:
|
||||
cfg_options.append("radio6-%i: %s" % (ridx, r[0]))
|
||||
ridx += 1
|
||||
|
||||
self.apply_cfg_options(cfg_options, self.enables, self.disables, self.raw_lines, self.raw_lines_file)
|
||||
|
||||
# Command line args take precedence.
|
||||
if self.upstream:
|
||||
cfg_options.append("upstream_port: %s" % self.upstream)
|
||||
if self.dut5_0 != "":
|
||||
cfg_options.append("dut5-0: " + self.dut5_0)
|
||||
if self.dut2_0 != "":
|
||||
cfg_options.append("dut2-0: " + self.dut2_0)
|
||||
if self.dut5_1 != "":
|
||||
cfg_options.append("dut5-1: " + self.dut5_1)
|
||||
if self.dut2_1 != "":
|
||||
cfg_options.append("dut2-1: " + self.dut2_1)
|
||||
if self.dut6_1 != "":
|
||||
cfg_options.append("dut6-1: " + self.dut6_1)
|
||||
if self.max_stations_2 != -1:
|
||||
cfg_options.append("max_stations_2: " + str(self.max_stations_2))
|
||||
if self.max_stations_5 != -1:
|
||||
cfg_options.append("max_stations_5: " + str(self.max_stations_5))
|
||||
if self.max_stations_dual != -1:
|
||||
if self.max_stations_6 != -1:
|
||||
cfg_options.append("max_stations_6: " + str(self.max_stations_6))
|
||||
if self.max_bandwidth != -1:
|
||||
cfg_options.append("max_bandwidth: " + str(self.max_bandwidth))
|
||||
if self.max_stations_dual != -1 and self.dut6_1 == "NA":
|
||||
logging.info("it is dualband")
|
||||
cfg_options.append("max_stations_dual: " + str(self.max_stations_dual))
|
||||
if self.max_stations_tri != -1 and self.dut6_1 != "NA":
|
||||
logging.info("it is triband")
|
||||
cfg_options.append("max_stations_tri: " + str(self.max_stations_tri))
|
||||
|
||||
# We deleted the scenario earlier, now re-build new one line at a time.
|
||||
self.build_cfg(self.config_name, blob_test, cfg_options)
|
||||
@@ -320,8 +348,8 @@ def main():
|
||||
Example:
|
||||
./lf_ap_auto_test.py --mgr localhost --port 8080 --lf_user lanforge --lf_password lanforge \\
|
||||
--instance_name ap-auto-instance --config_name test_con --upstream 1.1.eth2 \\
|
||||
--dut5_0 'linksys-8450 Default-SSID-5gl c4:41:1e:f5:3f:25 (2)' \\
|
||||
--dut2_0 'linksys-8450 Default-SSID-2g c4:41:1e:f5:3f:24 (1)' \\
|
||||
--dut5_1 'linksys-8450 Default-SSID-5gl c4:41:1e:f5:3f:25 (2)' \\
|
||||
--dut2_1 'linksys-8450 Default-SSID-2g c4:41:1e:f5:3f:24 (1)' \\
|
||||
--max_stations_2 100 --max_stations_5 100 --max_stations_dual 200 \\
|
||||
--radio2 1.1.wiphy0 --radio2 1.1.wiphy2 \\
|
||||
--radio5 1.1.wiphy1 --radio5 1.1.wiphy3 --radio5 1.1.wiphy4 \\
|
||||
@@ -348,9 +376,9 @@ def main():
|
||||
help="Specify maximum 5Ghz stations")
|
||||
parser.add_argument("--max_stations_dual", type=int, default=-1,
|
||||
help="Specify maximum stations for dual-band tests")
|
||||
parser.add_argument("--dut5_0", type=str, default="",
|
||||
parser.add_argument("--dut5_1", type=str, default="",
|
||||
help="Specify 5Ghz DUT entry. Syntax is somewhat tricky: DUT-name SSID BSID (bssid-idx), example: linksys-8450 Default-SSID-5gl c4:41:1e:f5:3f:25 (2)")
|
||||
parser.add_argument("--dut2_0", type=str, default="",
|
||||
parser.add_argument("--dut2_1", type=str, default="",
|
||||
help="Specify 5Ghz DUT entry. Syntax is somewhat tricky: DUT-name SSID BSID (bssid-idx), example: linksys-8450 Default-SSID-2g c4:41:1e:f5:3f:24 (1)")
|
||||
|
||||
parser.add_argument("--radio2", action='append', nargs=1, default=[],
|
||||
@@ -379,7 +407,6 @@ def main():
|
||||
logger_config.set_level(level=args.log_level)
|
||||
logger_config.set_json(json_file=args.lf_logger_config_json)
|
||||
|
||||
|
||||
cv_base_adjust_parser(args)
|
||||
|
||||
CV_Test = ApAutoTest(lf_host=args.mgr,
|
||||
@@ -392,8 +419,8 @@ def main():
|
||||
pull_report=args.pull_report,
|
||||
local_lf_report_dir=args.local_lf_report_dir,
|
||||
lf_report_dir=args.lf_report_dir,
|
||||
dut5_0=args.dut5_0,
|
||||
dut2_0=args.dut2_0,
|
||||
dut5_1=args.dut5_1,
|
||||
dut2_1=args.dut2_1,
|
||||
load_old_cfg=args.load_old_cfg,
|
||||
max_stations_2=args.max_stations_2,
|
||||
max_stations_5=args.max_stations_5,
|
||||
@@ -417,5 +444,6 @@ def main():
|
||||
else:
|
||||
CV_Test.exit_fail()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user