Remove redundant attach/detach volume methods from test_minimum_basic
The nova_volume_attach() and nova_volume_detach() methods in
test_minimum_basic are also in the parent ScenarioTest class so just use
those rather than the local copies.
There is a similar duplicate code problem in test_stamp_pattern but that
test doesn't store all of it's variables as member variables so (1) it's
a bigger change and (2) test_stamp_pattern is currently skipped so there
is not a great way to test the changes without unskippping the test.
This is part of some work leading up to deprecating the
CONF.compute.volume_device_name option given nova change:
I76a7cfd995db6c04f7af48ff8c9acdd55750ed76
Change-Id: Ic8cfeb8358be480afb4f9d7aca879bd3abb5e775
diff --git a/tempest/scenario/test_minimum_basic.py b/tempest/scenario/test_minimum_basic.py
index 6057cd3..9c3c25d 100644
--- a/tempest/scenario/test_minimum_basic.py
+++ b/tempest/scenario/test_minimum_basic.py
@@ -76,15 +76,6 @@
volume = self.volumes_client.show_volume(self.volume['id'])
self.assertEqual(self.volume, volume)
- def nova_volume_attach(self):
- volume_device_path = '/dev/' + CONF.compute.volume_device_name
- volume = self.servers_client.attach_volume(
- self.server['id'], self.volume['id'], volume_device_path)
- self.assertEqual(self.volume['id'], volume['id'])
- self.volumes_client.wait_for_volume_status(volume['id'], 'in-use')
- # Refresh the volume after the attachment
- self.volume = self.volumes_client.show_volume(volume['id'])
-
def nova_reboot(self):
self.servers_client.reboot(self.server['id'], 'SOFT')
self._wait_for_server_status('ACTIVE')
@@ -94,14 +85,6 @@
partitions = self.linux_client.get_partitions()
self.assertEqual(1, partitions.count(CONF.compute.volume_device_name))
- def nova_volume_detach(self):
- self.servers_client.detach_volume(self.server['id'], self.volume['id'])
- self.volumes_client.wait_for_volume_status(self.volume['id'],
- 'available')
-
- volume = self.volumes_client.show_volume(self.volume['id'])
- self.assertEqual('available', volume['status'])
-
def create_and_add_security_group(self):
secgroup = self._create_security_group()
self.servers_client.add_security_group(self.server['id'],