mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 19:28:00 +00:00
updated mesh test script
Signed-off-by: shivam <shivam.thakur@candelatech.com>
This commit is contained in:
@@ -123,7 +123,6 @@ if sys.version_info[0] != 3:
|
|||||||
print("This script requires Python 3")
|
print("This script requires Python 3")
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
|
|
||||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../")))
|
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../")))
|
||||||
|
|
||||||
cv_test_manager = importlib.import_module("py-json.cv_test_manager")
|
cv_test_manager = importlib.import_module("py-json.cv_test_manager")
|
||||||
@@ -136,6 +135,9 @@ class MeshTest(cvtest):
|
|||||||
def __init__(self,
|
def __init__(self,
|
||||||
lf_host="localhost",
|
lf_host="localhost",
|
||||||
lf_port=8080,
|
lf_port=8080,
|
||||||
|
ssh_port=22,
|
||||||
|
local_lf_report_dir="",
|
||||||
|
graph_groups=None,
|
||||||
lf_user="lanforge",
|
lf_user="lanforge",
|
||||||
lf_password="lanforge",
|
lf_password="lanforge",
|
||||||
instance_name="dpt_instance",
|
instance_name="dpt_instance",
|
||||||
@@ -165,7 +167,7 @@ class MeshTest(cvtest):
|
|||||||
self.lf_host = lf_host
|
self.lf_host = lf_host
|
||||||
self.lf_port = lf_port
|
self.lf_port = lf_port
|
||||||
self.lf_user = lf_user
|
self.lf_user = lf_user
|
||||||
self.lf_password =lf_password
|
self.lf_password = lf_password
|
||||||
self.instance_name = instance_name
|
self.instance_name = instance_name
|
||||||
self.config_name = config_name
|
self.config_name = config_name
|
||||||
self.duration = duration
|
self.duration = duration
|
||||||
@@ -180,12 +182,14 @@ class MeshTest(cvtest):
|
|||||||
self.raw_lines = raw_lines
|
self.raw_lines = raw_lines
|
||||||
self.raw_lines_file = raw_lines_file
|
self.raw_lines_file = raw_lines_file
|
||||||
self.sets = sets
|
self.sets = sets
|
||||||
|
self.ssh_port = ssh_port
|
||||||
|
self.graph_groups = graph_groups
|
||||||
|
self.local_lf_report_dir = local_lf_report_dir
|
||||||
|
|
||||||
def setup(self):
|
def setup(self):
|
||||||
# Nothing to do at this time.
|
# Nothing to do at this time.
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
self.sync_cv()
|
self.sync_cv()
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
@@ -220,12 +224,12 @@ class MeshTest(cvtest):
|
|||||||
self.create_and_run_test(self.load_old_cfg, self.test_name, self.instance_name,
|
self.create_and_run_test(self.load_old_cfg, self.test_name, self.instance_name,
|
||||||
self.config_name, self.sets,
|
self.config_name, self.sets,
|
||||||
self.pull_report, self.lf_host, self.lf_user, self.lf_password,
|
self.pull_report, self.lf_host, self.lf_user, self.lf_password,
|
||||||
cv_cmds)
|
cv_cmds, ssh_port=self.ssh_port, local_lf_report_dir=self.local_lf_report_dir,
|
||||||
|
graph_groups_file=self.graph_groups)
|
||||||
self.rm_text_blob(self.config_name, blob_test) # To delete old config with same name
|
self.rm_text_blob(self.config_name, blob_test) # To delete old config with same name
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
prog="lf_mesh_test.py",
|
prog="lf_mesh_test.py",
|
||||||
formatter_class=argparse.RawTextHelpFormatter,
|
formatter_class=argparse.RawTextHelpFormatter,
|
||||||
@@ -248,7 +252,7 @@ def main():
|
|||||||
the config and paste it into your own cfg.txt file.
|
the config and paste it into your own cfg.txt file.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
||||||
cv_add_base_parser(parser) # see cv_test_manager.py
|
cv_add_base_parser(parser) # see cv_test_manager.py
|
||||||
|
|
||||||
@@ -261,34 +265,40 @@ def main():
|
|||||||
help="Specify requested upload speed. Percentage of theoretical is also supported. Default: 0")
|
help="Specify requested upload speed. Percentage of theoretical is also supported. Default: 0")
|
||||||
parser.add_argument("--duration", default="",
|
parser.add_argument("--duration", default="",
|
||||||
help="Specify duration of each traffic run")
|
help="Specify duration of each traffic run")
|
||||||
|
parser.add_argument("--graph_groups", help="File to save graph_groups to", default=None)
|
||||||
|
parser.add_argument("--report_dir", default="")
|
||||||
|
parser.add_argument("--local_lf_report_dir",
|
||||||
|
help="--local_lf_report_dir <where to pull reports to> default '' put where dataplane script run from",
|
||||||
|
default="")
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
cv_base_adjust_parser(args)
|
cv_base_adjust_parser(args)
|
||||||
|
|
||||||
CV_Test = MeshTest(lf_host = args.mgr,
|
CV_Test = MeshTest(lf_host=args.mgr,
|
||||||
lf_port = args.port,
|
lf_port=args.port,
|
||||||
lf_user = args.lf_user,
|
lf_user=args.lf_user,
|
||||||
lf_password = args.lf_password,
|
lf_password=args.lf_password,
|
||||||
instance_name = args.instance_name,
|
instance_name=args.instance_name,
|
||||||
config_name = args.config_name,
|
config_name=args.config_name,
|
||||||
upstream = args.upstream,
|
upstream=args.upstream,
|
||||||
pull_report = args.pull_report,
|
pull_report=args.pull_report,
|
||||||
load_old_cfg = args.load_old_cfg,
|
load_old_cfg=args.load_old_cfg,
|
||||||
download_speed = args.download_speed,
|
download_speed=args.download_speed,
|
||||||
upload_speed = args.upload_speed,
|
upload_speed=args.upload_speed,
|
||||||
duration = args.duration,
|
duration=args.duration,
|
||||||
enables = args.enable,
|
enables=args.enable,
|
||||||
disables = args.disable,
|
disables=args.disable,
|
||||||
raw_lines = args.raw_line,
|
raw_lines=args.raw_line,
|
||||||
raw_lines_file = args.raw_lines_file,
|
raw_lines_file=args.raw_lines_file,
|
||||||
sets = args.set
|
sets=args.set
|
||||||
)
|
)
|
||||||
CV_Test.setup()
|
CV_Test.setup()
|
||||||
CV_Test.run()
|
CV_Test.run()
|
||||||
|
|
||||||
# Mesh does not do KPI currently.
|
# Mesh does not do KPI currently.
|
||||||
#CV_Test.check_influx_kpi(args)
|
# CV_Test.check_influx_kpi(args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|||||||
Reference in New Issue
Block a user