diff --git a/py-json/cv_test_manager.py b/py-json/cv_test_manager.py index be9d228f..394c4ff3 100644 --- a/py-json/cv_test_manager.py +++ b/py-json/cv_test_manager.py @@ -72,6 +72,7 @@ class cv_test(Realm): super().__init__(lfclient_host=lfclient_host, lfclient_port=lfclient_port) self.report_dir = report_dir + self.report_name = None # Add a config line to a text blob. Will create new text blob # if none exists already. @@ -366,7 +367,7 @@ class cv_test(Realm): break time.sleep(1) - + self.report_name = self.get_report_location(instance_name) # Ensure test is closed and cleaned up self.delete_instance(instance_name) diff --git a/py-json/cv_test_reports.py b/py-json/cv_test_reports.py index 4712065e..e385057d 100644 --- a/py-json/cv_test_reports.py +++ b/py-json/cv_test_reports.py @@ -3,12 +3,15 @@ from scp import SCPClient class lanforge_reports: - def pull_reports(self,hostname="localhost", username="lanforge", password="lanforge", report_location="/home/lanforge/html-reports/"): + def pull_reports(self, hostname="localhost", port=22, username="lanforge", password="lanforge", + report_location="/home/lanforge/html-reports/", + local_path="../../../reports/"): ssh = paramiko.SSHClient() ssh.load_system_host_keys() ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) - ssh.connect(hostname=hostname, username=username, password=password, allow_agent=False, look_for_keys=False) + ssh.connect(hostname=hostname, username=username, password=password, port=port) with SCPClient(ssh.get_transport()) as scp: - scp.get(report_location,recursive=True) + scp.get(remote_path=report_location, local_path=local_path, recursive=True) scp.close() + diff --git a/py-scripts/lf_dataplane_test.py b/py-scripts/lf_dataplane_test.py index 88d790a3..f8d32ddf 100755 --- a/py-scripts/lf_dataplane_test.py +++ b/py-scripts/lf_dataplane_test.py @@ -120,6 +120,8 @@ class DataplaneTest(cv_test): lf_port=8080, lf_user="lanforge", lf_password="lanforge", + ssh_port=22, + local_path="", instance_name="dpt_instance", config_name="dpt_config", upstream="1.1.eth2", @@ -205,7 +207,8 @@ class DataplaneTest(cv_test): self.create_and_run_test(self.load_old_cfg, self.test_name, self.instance_name, self.config_name, self.sets, self.pull_report, self.lf_host, self.lf_user, self.lf_password, - cv_cmds, graph_groups_file=self.graph_groups) + cv_cmds, ssh_port=self.ssh_port, local_path=self.local_path, + graph_groups_file=self.graph_groups) self.rm_text_blob(self.config_name, blob_test) # To delete old config with same name