mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-03 04:07:52 +00:00
cv_test_manager.py , cv_test_reports.py : bug fix on report_dir
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
@@ -355,7 +355,7 @@ class cv_test(Realm):
|
|||||||
try:
|
try:
|
||||||
print(lf_host)
|
print(lf_host)
|
||||||
report.pull_reports(hostname=lf_host, username=lf_user, password=lf_password,
|
report.pull_reports(hostname=lf_host, username=lf_user, password=lf_password,
|
||||||
port=ssh_port, local_lf_report_dir=local_lf_report_dir,
|
port=ssh_port, report_dir=local_lf_report_dir,
|
||||||
report_location=location)
|
report_location=location)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print("SCP failed, user %s, password %s, dest %s", (lf_user, lf_password, lf_host))
|
print("SCP failed, user %s, password %s, dest %s", (lf_user, lf_password, lf_host))
|
||||||
|
|||||||
@@ -5,13 +5,13 @@ class lanforge_reports:
|
|||||||
|
|
||||||
def pull_reports(self, hostname="localhost", port=22, username="lanforge", password="lanforge",
|
def pull_reports(self, hostname="localhost", port=22, username="lanforge", password="lanforge",
|
||||||
report_location="/home/lanforge/html-reports/",
|
report_location="/home/lanforge/html-reports/",
|
||||||
local_lf_report_dir="../../../reports/"):
|
report_dir="../../../reports/"):
|
||||||
ssh = paramiko.SSHClient()
|
ssh = paramiko.SSHClient()
|
||||||
ssh.load_system_host_keys()
|
ssh.load_system_host_keys()
|
||||||
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||||
ssh.connect(hostname=hostname, username=username, password=password, port=port, allow_agent=False, look_for_keys=False)
|
ssh.connect(hostname=hostname, username=username, password=password, port=port, allow_agent=False, look_for_keys=False)
|
||||||
|
|
||||||
with SCPClient(ssh.get_transport()) as scp:
|
with SCPClient(ssh.get_transport()) as scp:
|
||||||
scp.get(remote_path=report_location, report_dir=local_lf_report_dir, recursive=True)
|
scp.get(remote_path=report_location, report_dir=report_dir, recursive=True)
|
||||||
scp.close()
|
scp.close()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user