From b5346bc6cedd54615490fc5ce2e77f6380f46c8c Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Sat, 24 Jun 2023 19:15:59 -0500 Subject: smoketest: ssh_send_cmd should be a static method --- smoketest/scripts/cli/base_vyostest_shim.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'smoketest/scripts') diff --git a/smoketest/scripts/cli/base_vyostest_shim.py b/smoketest/scripts/cli/base_vyostest_shim.py index d56a8eb33..9415d6f44 100644 --- a/smoketest/scripts/cli/base_vyostest_shim.py +++ b/smoketest/scripts/cli/base_vyostest_shim.py @@ -88,13 +88,13 @@ class VyOSUnitTestSHIM: pprint.pprint(out) return out + @staticmethod def ssh_send_cmd(command, username, password, hostname='localhost'): """ SSH command execution helper """ # Try to login via SSH ssh_client = paramiko.SSHClient() ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) ssh_client.connect(hostname=hostname, username=username, password=password) - print(host, username, password) _, stdout, stderr = ssh_client.exec_command(command) output = stdout.read().decode().strip() error = stderr.read().decode().strip() -- cgit v1.2.3