Run AP Auto Test from cv_to_grafana.py

Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
This commit is contained in:
Matthew Stidham
2021-05-21 10:33:55 -07:00
parent 3e54b14098
commit f655d0df2e
5 changed files with 88 additions and 52 deletions

View File

@@ -3,11 +3,11 @@ 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", username="lanforge", password="lanforge", report_location="/home/lanforge/html-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)
ssh.connect(hostname=hostname, username=username, password=password, allow_agent=False, look_for_keys=False)
with SCPClient(ssh.get_transport()) as scp:
scp.get(report_location,recursive=True)