diff options
Diffstat (limited to 'tempest/api/compute/base.py')
-rw-r--r-- | tempest/api/compute/base.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tempest/api/compute/base.py b/tempest/api/compute/base.py index ea1cddc5f..260d4e05f 100644 --- a/tempest/api/compute/base.py +++ b/tempest/api/compute/base.py @@ -568,7 +568,8 @@ class BaseV2ComputeTest(api_version_utils.BaseMicroversionTest, # is already detached. pass - def attach_volume(self, server, volume, device=None, tag=None): + def attach_volume(self, server, volume, device=None, tag=None, + wait_for_detach=True): """Attaches volume to server and waits for 'in-use' volume status. The volume will be detached when the test tears down. @@ -605,7 +606,7 @@ class BaseV2ComputeTest(api_version_utils.BaseMicroversionTest, # the contents of the console log. The final check of the volume state # should be a no-op by this point and is just added for completeness # when detaching non-multiattach volumes. - if not volume['multiattach']: + if not volume['multiattach'] and wait_for_detach: self.addCleanup( waiters.wait_for_volume_resource_status, self.volumes_client, volume['id'], 'available') |