Improve logging of vm's console output
specifically for test_subport_connectivity().
Change-Id: I35d4825a8296f5f86d109c6eba11de7d628bdcfe
Partial-Bug: #1897796
Related-Change: https://review.opendev.org/755122
diff --git a/neutron_tempest_plugin/scenario/base.py b/neutron_tempest_plugin/scenario/base.py
index 78b766b..949a1a2 100644
--- a/neutron_tempest_plugin/scenario/base.py
+++ b/neutron_tempest_plugin/scenario/base.py
@@ -258,10 +258,12 @@
'server']['id'])['ports'][0]
self.fip = self.create_floatingip(port=self.port)
- def check_connectivity(self, host, ssh_user, ssh_key,
- servers=None, ssh_timeout=None):
- ssh_client = ssh.Client(host, ssh_user,
- pkey=ssh_key, timeout=ssh_timeout)
+ def check_connectivity(self, host, ssh_user=None, ssh_key=None,
+ servers=None, ssh_timeout=None, ssh_client=None):
+ # Either ssh_client or ssh_user+ssh_key is mandatory.
+ if ssh_client is None:
+ ssh_client = ssh.Client(host, ssh_user,
+ pkey=ssh_key, timeout=ssh_timeout)
try:
ssh_client.test_connection_auth()
except lib_exc.SSHTimeout as ssh_e: