Merge "Move the `related_bug` decorator from test.py to tempest/lib"
diff --git a/releasenotes/notes/16.0.0-mitaka-eol-88ff8355fff81b55.yaml b/releasenotes/notes/16.0.0-mitaka-eol-88ff8355fff81b55.yaml
new file mode 100644
index 0000000..24ec512
--- /dev/null
+++ b/releasenotes/notes/16.0.0-mitaka-eol-88ff8355fff81b55.yaml
@@ -0,0 +1,13 @@
+---
+prelude: >
+    This release indicates end of support for Mitaka in Tempest.
+other:
+  - |
+    OpenStack Releases Supported after this release are **Newton**
+    and **Ocata**
+
+    The release under current development as of this tag is Pike,
+    meaning that every Tempest commit is also tested against master branch
+    during the Pike cycle. However, this does not necessarily mean that
+    using Tempest as of this tag will work against Pike (or future
+    releases) cloud.
diff --git a/tempest/api/volume/test_volumes_list.py b/tempest/api/volume/test_volumes_list.py
index b6b5ab4..6b9f131 100644
--- a/tempest/api/volume/test_volumes_list.py
+++ b/tempest/api/volume/test_volumes_list.py
@@ -358,27 +358,24 @@
         self._test_pagination('volumes', ids=self.volume_id_list, detail=False)
 
     @decorators.idempotent_id('46eff077-100b-427f-914e-3db2abcdb7e2')
-    @decorators.skip_because(bug='1572765')
     def test_volume_list_with_detail_param_marker(self):
         # Choosing a random volume from a list of volumes for 'marker'
         # parameter
-        random_volume = random.choice(self.volume_id_list)
+        marker = random.choice(self.volume_id_list)
 
-        params = {'marker': random_volume}
+        # Though Cinder volumes are returned sorted by ID by default
+        # this is implicit. Let make this explicit in case Cinder
+        # folks change their minds.
+        params = {'marker': marker, 'sort': 'id:asc'}
 
         # Running volume list using marker parameter
         vol_with_marker = self.volumes_client.list_volumes(
             detail=True, params=params)['volumes']
 
-        # Fetching the index of the random volume from volume_id_list
-        index_marker = self.volume_id_list.index(random_volume)
+        expected_volumes_id = {
+            id for id in self.volume_id_list if id > marker
+        }
 
-        # The expected list with marker parameter
-        verify_volume_list = self.volume_id_list[:index_marker]
-
-        failed_msg = "Failed to list volume details by marker"
-
-        # Validating the expected list is the same like the observed list
-        self.assertEqual(verify_volume_list,
-                         map(lambda x: x['id'],
-                             vol_with_marker[::-1]), failed_msg)
+        self.assertEqual(
+            expected_volumes_id, {v['id'] for v in vol_with_marker}
+        )
diff --git a/tempest/clients.py b/tempest/clients.py
index d21e6a7..cceb71a 100644
--- a/tempest/clients.py
+++ b/tempest/clients.py
@@ -167,11 +167,10 @@
 
         # NOTE: The following client needs special timeout values because
         # the API is a proxy for the other component.
-        params_volume = {}
-        for _key in ('build_interval', 'build_timeout'):
-            _value = self.parameters['volume'].get(_key)
-            if _value:
-                params_volume[_key] = _value
+        params_volume = {
+            'build_interval': CONF.volume.build_interval,
+            'build_timeout': CONF.volume.build_timeout
+        }
         self.volumes_extensions_client = self.compute.VolumesClient(
             **params_volume)
         self.compute_versions_client = self.compute.VersionsClient(
diff --git a/tempest/lib/services/clients.py b/tempest/lib/services/clients.py
index 0a06c04..1c8f443 100644
--- a/tempest/lib/services/clients.py
+++ b/tempest/lib/services/clients.py
@@ -246,11 +246,17 @@
 
     Examples:
 
-        >>> from tempest.lib.services import clients
-        >>> johndoe = cred_provider.get_creds_by_role(['johndoe'])
-        >>> johndoe_clients = clients.ServiceClients(johndoe,
-        >>>                                                  identity_uri)
-        >>> johndoe_servers = johndoe_clients.servers_client.list_servers()
+        >>> # johndoe is a tempest.lib.auth.Credentials type instance
+        >>> johndoe_clients = clients.ServiceClients(johndoe, identity_uri)
+        >>>
+        >>> # List servers in default region
+        >>> johndoe_servers_client = johndoe_clients.compute.ServersClient()
+        >>> johndoe_servers = johndoe_servers_client.list_servers()
+        >>>
+        >>> # List servers in Region B
+        >>> johndoe_servers_client_B = johndoe_clients.compute.ServersClient(
+        >>>     region='B')
+        >>> johndoe_servers = johndoe_servers_client_B.list_servers()
 
     """
     # NOTE(andreaf) This class does not depend on tempest configuration
diff --git a/tempest/test.py b/tempest/test.py
index f2a8bd6..052033d 100644
--- a/tempest/test.py
+++ b/tempest/test.py
@@ -87,10 +87,10 @@
     exercised by a test case.
     """
     def decorator(f):
-        services = ['compute', 'image', 'baremetal', 'volume',
-                    'network', 'identity', 'object_storage']
+        known_services = get_service_list()
+
         for service in args:
-            if service not in services:
+            if service not in known_services:
                 raise exceptions.InvalidServiceTag('%s is not a valid '
                                                    'service' % service)
         attr(type=list(args))(f)
diff --git a/tempest/tests/fake_config.py b/tempest/tests/fake_config.py
index 71a4c81..4e957a0 100644
--- a/tempest/tests/fake_config.py
+++ b/tempest/tests/fake_config.py
@@ -93,12 +93,6 @@
         self.conf.set_default('ca_certificates_file', '/fake/certificates',
                               group='identity')
         self.conf.set_default('region', 'fake_region', 'identity')
-        # Identity endpoints
-        self.conf.set_default('v3_endpoint_type', 'fake_v3_uri', 'identity')
-        self.conf.set_default('v2_public_endpoint_type', 'fake_v2_public_uri',
-                              'identity')
-        self.conf.set_default('v2_admin_endpoint_type', 'fake_v2_admin_uri',
-                              'identity')
         # Compute default values
         self.conf.set_default('build_interval', 88, group='compute')
         self.conf.set_default('build_timeout', 8, group='compute')