diff options
author | John Estabrook <jestabro@vyos.io> | 2023-06-24 19:15:59 -0500 |
---|---|---|
committer | John Estabrook <jestabro@vyos.io> | 2023-06-24 20:53:01 -0500 |
commit | b5346bc6cedd54615490fc5ce2e77f6380f46c8c (patch) | |
tree | 18642cd2a8c698b177f131c7ba770613fefa00dc /smoketest | |
parent | f932180f70d3c6cbdfd500d7db1d831ac6ad6221 (diff) | |
download | vyos-1x-b5346bc6cedd54615490fc5ce2e77f6380f46c8c.tar.gz vyos-1x-b5346bc6cedd54615490fc5ce2e77f6380f46c8c.zip |
smoketest: ssh_send_cmd should be a static method
Diffstat (limited to 'smoketest')
-rw-r--r-- | smoketest/scripts/cli/base_vyostest_shim.py | 2 |
1 files changed, 1 insertions, 1 deletions
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() |