Fix AttributeError with 'SSHExecCommandFailed'
Noticed in a CI failure today, the SSHExecCommandFailed exception is incorrectly accessed from the tempest.exceptions module instead of the tempest.lib.exceptions module where it is actually located: File "/opt/stack/tempest/tempest/api/compute/base.py", line 566, in verify_metadata_from_api if not test_utils.call_until_true(get_and_verify_metadata, File "/opt/stack/tempest/tempest/lib/common/utils/test_utils.py", line 117, in call_until_true if func(*args, **kwargs): File "/opt/stack/tempest/tempest/api/compute/base.py", line 550, in get_and_verify_metadata except exceptions.SSHExecCommandFailed: AttributeError: module 'tempest.exceptions' has no attribute 'SSHExecCommandFailed' This fixes the access. Change-Id: If8b0edf9df24b63e9c98218b1cdee1142efcd3ff
This commit is contained in:
parent
32da46943e
commit
9f6fce1bd4
@ -547,7 +547,7 @@ class BaseV2ComputeTest(api_version_utils.BaseMicroversionTest,
|
|||||||
def get_and_verify_metadata():
|
def get_and_verify_metadata():
|
||||||
try:
|
try:
|
||||||
ssh_client.exec_command('curl -V')
|
ssh_client.exec_command('curl -V')
|
||||||
except exceptions.SSHExecCommandFailed:
|
except lib_exc.SSHExecCommandFailed:
|
||||||
if not CONF.compute_feature_enabled.config_drive:
|
if not CONF.compute_feature_enabled.config_drive:
|
||||||
raise self.skipException('curl not found in guest '
|
raise self.skipException('curl not found in guest '
|
||||||
'and config drive is '
|
'and config drive is '
|
||||||
|
Loading…
Reference in New Issue
Block a user