mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-22 04:55:06 +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",
|
||||||
@@ -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,
|
||||||
@@ -261,6 +265,11 @@ 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()
|
||||||
|
|
||||||
@@ -290,5 +299,6 @@ def main():
|
|||||||
# 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