Fix tempest config usage in test_attach_volume
This commit just reworks the config usage for class level variables
that use config values to avoid making uneccesary calls of
TempestConfig().
Change-Id: I48a5f402c9e7a743d65c54ccc0a1df494554676c
diff --git a/tempest/api/compute/volumes/test_attach_volume.py b/tempest/api/compute/volumes/test_attach_volume.py
index 5c1ad0d..ee1ad9e 100644
--- a/tempest/api/compute/volumes/test_attach_volume.py
+++ b/tempest/api/compute/volumes/test_attach_volume.py
@@ -26,7 +26,6 @@
class AttachVolumeTestJSON(base.BaseComputeTest):
_interface = 'json'
run_ssh = tempest.config.TempestConfig().compute.run_ssh
- device = tempest.config.TempestConfig().compute.volume_device_name
def __init__(self, *args, **kwargs):
super(AttachVolumeTestJSON, self).__init__(*args, **kwargs)
@@ -37,7 +36,7 @@
@classmethod
def setUpClass(cls):
super(AttachVolumeTestJSON, cls).setUpClass()
-
+ cls.device = cls.config.compute.volume_device_name
if not cls.config.service_available.cinder:
skip_msg = ("%s skipped as Cinder is not available" % cls.__name__)
raise cls.skipException(skip_msg)