Print VM console output upon different exceptions
VM console ouput is printed when tests fail due to some exceptions
This patch extends the list of caught exceptions for which it will be
printed - The added exceptions were recently reproduced
The complete list of expected exceptions follows:
tempest.lib.exceptions.SSHTimeout
paramiko.ssh_exception.AuthenticationException
paramiko.ssh_exception.NoValidConnectionsError
ConnectionResetError
Change-Id: Ie5f58209739aed1a0dd7f4fb3a9b1fb06b27061c
diff --git a/neutron_tempest_plugin/scenario/test_multicast.py b/neutron_tempest_plugin/scenario/test_multicast.py
index acfb75c..4fd41cf 100644
--- a/neutron_tempest_plugin/scenario/test_multicast.py
+++ b/neutron_tempest_plugin/scenario/test_multicast.py
@@ -16,10 +16,8 @@
import netaddr
from neutron_lib import constants
from oslo_log import log
-from paramiko import ssh_exception as ssh_exc
from tempest.lib.common.utils import data_utils
from tempest.lib import decorators
-from tempest.lib import exceptions as lib_exc
from neutron_tempest_plugin.common import ip
from neutron_tempest_plugin.common import ssh
@@ -218,7 +216,7 @@
def _check_cmd_installed_on_server(self, ssh_client, server, cmd):
try:
ssh_client.execute_script('which %s' % cmd)
- except (lib_exc.SSHTimeout, ssh_exc.AuthenticationException) as ssh_e:
+ except base.SSH_EXC_TUPLE as ssh_e:
LOG.debug(ssh_e)
self._log_console_output([server])
self._log_local_network_status()