Merge "Don't ignore invalid export location ip version"
diff --git a/manila_tempest_tests/tests/scenario/manager_share.py b/manila_tempest_tests/tests/scenario/manager_share.py
index 7067e6b..64e5715 100644
--- a/manila_tempest_tests/tests/scenario/manager_share.py
+++ b/manila_tempest_tests/tests/scenario/manager_share.py
@@ -659,14 +659,7 @@
LOG.info('Creating Glance image using the downloaded image file')
return self._image_create('centos', 'bare', imagepath, 'qcow2')
- def get_share_export_location_for_mount(self, share):
- exports = self.get_user_export_locations(
- share=share,
- error_on_invalid_ip_version=True)
- return exports[0]
-
- def get_user_export_locations(self, share=None, snapshot=None,
- error_on_invalid_ip_version=False):
+ def get_user_export_locations(self, share=None, snapshot=None):
locations = None
if share:
locations = self.get_share_export_locations(share)
@@ -676,19 +669,18 @@
self.assertNotEmpty(locations)
if self.protocol != 'cephfs':
locations = self._get_export_locations_according_to_ip_version(
- locations, error_on_invalid_ip_version)
+ locations)
self.assertNotEmpty(locations)
return locations
- def _get_export_locations_according_to_ip_version(
- self, all_locations, error_on_invalid_ip_version):
+ def _get_export_locations_according_to_ip_version(self, all_locations):
locations = [
x for x in all_locations
if self.get_ip_and_version_from_export_location(
x)[1] == self.ip_version]
- if len(locations) == 0 and not error_on_invalid_ip_version:
+ if len(locations) == 0:
message = ("Configured backend does not support "
"ip_version %s" % self.ip_version)
raise self.skipException(message)
diff --git a/manila_tempest_tests/tests/scenario/test_share_basic_ops.py b/manila_tempest_tests/tests/scenario/test_share_basic_ops.py
index aebc231..2ade001 100644
--- a/manila_tempest_tests/tests/scenario/test_share_basic_ops.py
+++ b/manila_tempest_tests/tests/scenario/test_share_basic_ops.py
@@ -220,8 +220,7 @@
self.share = self.migration_complete(self.share['id'], dest_pool)
- new_exports = self.get_user_export_locations(
- self.share, error_on_invalid_ip_version=True)
+ new_exports = self.get_user_export_locations(self.share)
self.assertEqual(dest_pool, self.share['host'])
self.assertEqual(constants.TASK_STATE_MIGRATION_SUCCESS,
diff --git a/manila_tempest_tests/tests/scenario/test_share_extend.py b/manila_tempest_tests/tests/scenario/test_share_extend.py
index a813112..df77990 100644
--- a/manila_tempest_tests/tests/scenario/test_share_extend.py
+++ b/manila_tempest_tests/tests/scenario/test_share_extend.py
@@ -63,7 +63,7 @@
remote_client = self.init_remote_client(instance)
LOG.debug('Step 4 - grant access')
- location = self.get_share_export_location_for_mount(share)
+ location = self.get_user_export_locations(share)[0]
self.allow_access(instance=instance, remote_client=remote_client,
locations=location)
diff --git a/manila_tempest_tests/tests/scenario/test_share_shrink.py b/manila_tempest_tests/tests/scenario/test_share_shrink.py
index b6a8cda..3e498f8 100644
--- a/manila_tempest_tests/tests/scenario/test_share_shrink.py
+++ b/manila_tempest_tests/tests/scenario/test_share_shrink.py
@@ -67,7 +67,7 @@
remote_client = self.init_remote_client(instance)
LOG.debug('Step 4 - grant access')
- location = self.get_share_export_location_for_mount(share)
+ location = self.get_user_export_locations(share)[0]
self.allow_access(instance=instance, remote_client=remote_client,
locations=location)