diff --git a/HACKING.rst b/HACKING.rst
index e15e213..3799046 100644
--- a/HACKING.rst
+++ b/HACKING.rst
@@ -136,7 +136,7 @@
 Tear-down is also split in a series of steps (teardown stages), which are
 stacked for execution only if the corresponding setup stage had been
 reached during the setup phase. Tear-down stages are:
-- `clear_isolated_creds` (defined in the base test class)
+- `clear_credentials` (defined in the base test class)
 - `resource_cleanup`
 
 Skipping Tests
@@ -206,9 +206,10 @@
 -----------------------
 Tempest by default runs its tests in parallel this creates the possibility for
 interesting interactions between tests which can cause unexpected failures.
-Tenant isolation provides protection from most of the potential race conditions
-between tests outside the same class. But there are still a few of things to
-watch out for to try to avoid issues when running your tests in parallel.
+Dynamic credentials provides protection from most of the potential race
+conditions between tests outside the same class. But there are still a few of
+things to watch out for to try to avoid issues when running your tests in
+parallel.
 
 - Resources outside of a tenant scope still have the potential to conflict. This
   is a larger concern for the admin tests since most resources and actions that
diff --git a/README.rst b/README.rst
index 7108eaf..bf513bd 100644
--- a/README.rst
+++ b/README.rst
@@ -168,7 +168,7 @@
 
     $> cd $TEMPEST_ROOT_DIR
     $> oslo-config-generator --config-file \
-        tools/config/config-generator.tempest.conf \
+        etc/config-generator.tempest.conf \
         --output-file etc/tempest.conf
 
 After that, open up the ``etc/tempest.conf`` file and edit the
diff --git a/doc/source/conf.py b/doc/source/conf.py
index f85899b..12d1d40 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -34,7 +34,7 @@
               'oslo_config.sphinxconfiggen',
              ]
 
-config_generator_config_file = '../../tools/config/config-generator.tempest.conf'
+config_generator_config_file = '../../etc/config-generator.tempest.conf'
 sample_config_basename = '_static/tempest'
 
 todo_include_todos = True
diff --git a/doc/source/configuration.rst b/doc/source/configuration.rst
index ec430b7..f228040 100644
--- a/doc/source/configuration.rst
+++ b/doc/source/configuration.rst
@@ -63,38 +63,41 @@
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 Tempest currently also has 3 different internal methods for providing
-authentication to tests. Tenant isolation, locking test accounts, and
+authentication to tests. Dynamic credentials, locking test accounts, and
 non-locking test accounts. Depending on which one is in use the configuration
 of tempest is slightly different.
 
-Tenant Isolation
-""""""""""""""""
-Tenant isolation was originally create to enable running tempest in parallel.
+Dynamic Credentials
+"""""""""""""""""""
+Dynamic Credentials (formerly known as Tenant isolation) was originally created
+to enable running tempest in parallel.
 For each test class it creates a unique set of user credentials to use for the
 tests in the class. It can create up to 3 sets of username, password, and
 tenant/project names for a primary user, an admin user, and an alternate user.
-To enable and use tenant isolation you only need to configure 2 things:
+To enable and use dynamic credentials you only need to configure 2 things:
 
  #. A set of admin credentials with permissions to create users and
-    tenants/projects. This is specified in the identity section with the
-    admin_username, admin_tenant_name, and admin_password options
- #. To enable tenant_isolation in the auth section with the
-    allow_tenant_isolation option.
+    tenants/projects. This is specified in the auth section with the
+    admin_username, admin_tenant_name, admin_domain_name and admin_password
+    options
+ #. To enable dynamic_creds in the auth section with the
+    use_dynamic_credentials option.
 
 This is also the currently the default credential provider enabled by tempest,
 due to it's common use and ease of configuration.
 
 It is worth pointing out that depending on your cloud configuration you might
-need to assign a role to each of the users created Tempest's tenant isolation.
+need to assign a role to each of the users created by Tempest's dynamic
+credentials.
 This can be set using the *tempest_roles* option. It takes in a list of role
-names each of which will be assigned to each of the users created by tenant
-isolation. This option will not have any effect when set and tempest is not
-configured to use tenant isolation.
+names each of which will be assigned to each of the users created by dynamic
+credentials. This option will not have any effect when set and tempest is not
+configured to use dynamic credentials.
 
 
 Locking Test Accounts (aka accounts.yaml or accounts file)
 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""
-For a long time using tenant isolation was the only method available if you
+For a long time using dynamic credentials was the only method available if you
 wanted to enable parallel execution of tempest tests. However this was
 insufficient for certain use cases because of the admin credentials requirement
 to create the credential sets on demand. To get around that the accounts.yaml
@@ -102,7 +105,7 @@
 using the list of credentials instead of creating them on demand. With locking
 test accounts each test class will reserve a set of credentials from the
 accounts.yaml before executing any of its tests so that each class is isolated
-like in tenant isolation.
+like with dynamic credentials.
 
 To enable and use locking test accounts you need do a few things:
 
@@ -116,7 +119,7 @@
  #. Provide tempest with the location of your accounts.yaml file with the
     test_accounts_file option in the auth section
 
- #. Set allow_tenant_isolation = False in the auth group
+ #. Set use_dynamic_credentials = False in the auth group
 
 It is worth pointing out that each set of credentials in the accounts.yaml
 should have a unique tenant. This is required to provide proper isolation
@@ -126,6 +129,9 @@
 
 Non-locking test accounts (aka credentials config options)
 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""
+**Starting in the Liberty release this mechanism was deprecated and will be
+removed in a future release**
+
 When Tempest was refactored to allow for locking test accounts, the original
 non-tenant isolated case was converted to internally work similarly to the
 accounts.yaml file. This mechanism was then called the non-locking test accounts
@@ -145,7 +151,7 @@
 
 And in the auth section:
 
- #. allow_tenant_isolation = False
+ #. use_dynamic_credentials = False
  #. comment out 'test_accounts_file' or keep it as empty
 
 It only makes sense to use it if parallel execution isn't needed, since tempest
@@ -291,28 +297,28 @@
 misconfiguration or a missing network in the accounts file.
 
 
-With Tenant Isolation
-"""""""""""""""""""""
-With tenant isolation enabled and using nova-network then nothing changes. Your
-only option for configuration is to either set a fixed network name or not.
+With Dynamic Credentials
+""""""""""""""""""""""""
+With dynamic credentials enabled and using nova-network then nothing changes.
+Your only option for configuration is to either set a fixed network name or not.
 However, in most cases it shouldn't matter because nova-network should have no
 problem booting a server with multiple networks. If this is not the case for
 your cloud then using an accounts file is recommended because it provides the
-necessary flexibility to describe your configuration. Tenant isolation is not
+necessary flexibility to describe your configuration. Dynamic credentials is not
 able to dynamically allocate things as necessary if neutron is not enabled.
 
-With neutron and tenant isolation enabled there should not be any additional
+With neutron and dynamic credentials enabled there should not be any additional
 configuration necessary to enable Tempest to create servers with working
 networking, assuming you have properly configured the network section to work
 for your cloud. Tempest will dynamically create the neutron resources necessary
 to enable using servers with that network. Also, just as with the accounts
-file, if you specify a fixed network name while using neutron and tenant
-isolation it will enable running tests which require a static network and it
+file, if you specify a fixed network name while using neutron and dynamic
+credentials it will enable running tests which require a static network and it
 will additionally be used as a fallback for server creation. However, unlike
 accounts.yaml this should never be triggered.
 
-However, there is an option *create_isolated_networks* to disable tenant
-isolation's automatic provisioning of network resources. If this option is
+However, there is an option *create_isolated_networks* to disable dynamic
+credentials's automatic provisioning of network resources. If this option is
 used you will have to either rely on there only being a single/default network
 available for the server creation, or use *fixed_network_name* to inform
 Tempest which network to use.
diff --git a/tools/config/config-generator.tempest.conf b/etc/config-generator.tempest.conf
similarity index 100%
rename from tools/config/config-generator.tempest.conf
rename to etc/config-generator.tempest.conf
diff --git a/requirements.txt b/requirements.txt
index 811580a..c0a9254 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -22,6 +22,6 @@
 iso8601>=0.1.9
 fixtures>=1.3.1
 testscenarios>=0.4
-tempest-lib>=0.8.0
+tempest-lib>=0.10.0
 PyYAML>=3.1.0
 stevedore>=1.5.0 # Apache-2.0
diff --git a/tempest/api/baremetal/admin/test_ports.py b/tempest/api/baremetal/admin/test_ports.py
index 5eaf641..180b848 100644
--- a/tempest/api/baremetal/admin/test_ports.py
+++ b/tempest/api/baremetal/admin/test_ports.py
@@ -11,7 +11,6 @@
 #    under the License.
 
 import six
-from tempest_lib import decorators
 from tempest_lib import exceptions as lib_exc
 
 from tempest.api.baremetal.admin import base
@@ -60,7 +59,6 @@
         _, body = self.client.show_port(uuid)
         self._assertExpected(port, body)
 
-    @decorators.skip_because(bug='1398350')
     @test.idempotent_id('4a02c4b0-6573-42a4-a513-2e36ad485b62')
     def test_create_port_with_extra(self):
         node_id = self.node['uuid']
@@ -237,7 +235,6 @@
         _, body = self.client.show_port(port['uuid'])
         self.assertEqual(extra, body['extra'])
 
-    @decorators.skip_because(bug='1398350')
     @test.idempotent_id('5309e897-0799-4649-a982-0179b04c3876')
     def test_update_port_mixed_ops(self):
         node_id = self.node['uuid']
diff --git a/tempest/api/compute/admin/test_simple_tenant_usage.py b/tempest/api/compute/admin/test_simple_tenant_usage.py
index 7333acb..e5c17ca 100644
--- a/tempest/api/compute/admin/test_simple_tenant_usage.py
+++ b/tempest/api/compute/admin/test_simple_tenant_usage.py
@@ -14,10 +14,14 @@
 #    under the License.
 
 import datetime
-import time
 
 from tempest.api.compute import base
 from tempest import test
+from tempest_lib import exceptions as e
+
+# Time that waits for until returning valid response
+# TODO(takmatsu): Ideally this value would come from configuration.
+VALID_WAIT = 30
 
 
 class TenantUsagesTestJSON(base.BaseV2ComputeAdminTest):
@@ -35,7 +39,6 @@
 
         # Create a server in the demo tenant
         cls.create_test_server(wait_until='ACTIVE')
-        time.sleep(2)
 
         now = datetime.datetime.now()
         cls.start = cls._parse_strtime(now - datetime.timedelta(days=1))
@@ -46,17 +49,32 @@
         # Returns formatted datetime
         return at.strftime('%Y-%m-%dT%H:%M:%S.%f')
 
+    def call_until_valid(self, func, duration, *args, **kwargs):
+        # Call until get valid response for "duration"
+        # because tenant usage doesn't become available immediately
+        # after create VM.
+        def is_valid():
+            try:
+                self.resp = func(*args, **kwargs)
+                return True
+            except e.InvalidHTTPResponseBody:
+                return False
+        test.call_until_true(is_valid, duration, 1)
+        return self.resp
+
     @test.idempotent_id('062c8ae9-9912-4249-8b51-e38d664e926e')
     def test_list_usage_all_tenants(self):
         # Get usage for all tenants
-        tenant_usage = self.adm_client.list_tenant_usages(
+        tenant_usage = self.call_until_valid(
+            self.adm_client.list_tenant_usages, VALID_WAIT,
             start=self.start, end=self.end, detailed="1")['tenant_usages'][0]
         self.assertEqual(len(tenant_usage), 8)
 
     @test.idempotent_id('94135049-a4c5-4934-ad39-08fa7da4f22e')
     def test_get_usage_tenant(self):
         # Get usage for a specific tenant
-        tenant_usage = self.adm_client.show_tenant_usage(
+        tenant_usage = self.call_until_valid(
+            self.adm_client.show_tenant_usage, VALID_WAIT,
             self.tenant_id, start=self.start, end=self.end)['tenant_usage']
 
         self.assertEqual(len(tenant_usage), 8)
@@ -64,7 +82,7 @@
     @test.idempotent_id('9d00a412-b40e-4fd9-8eba-97b496316116')
     def test_get_usage_tenant_with_non_admin_user(self):
         # Get usage for a specific tenant with non admin user
-        tenant_usage = self.client.show_tenant_usage(
+        tenant_usage = self.call_until_valid(
+            self.client.show_tenant_usage, VALID_WAIT,
             self.tenant_id, start=self.start, end=self.end)['tenant_usage']
-
         self.assertEqual(len(tenant_usage), 8)
diff --git a/tempest/api/compute/base.py b/tempest/api/compute/base.py
index b0fdbac..ec2192f 100644
--- a/tempest/api/compute/base.py
+++ b/tempest/api/compute/base.py
@@ -246,8 +246,8 @@
             name = data_utils.rand_name(cls.__name__ + "-Server-Group")
         if policy is None:
             policy = ['affinity']
-        body = (cls.server_groups_client.create_server_group(name, policy)
-                ['server_group'])
+        body = cls.server_groups_client.create_server_group(
+            name=name, policies=policy)['server_group']
         cls.server_groups.append(body['id'])
         return body
 
diff --git a/tempest/api/compute/certificates/test_certificates.py b/tempest/api/compute/certificates/test_certificates.py
index 78a0a93..0096fc2 100644
--- a/tempest/api/compute/certificates/test_certificates.py
+++ b/tempest/api/compute/certificates/test_certificates.py
@@ -14,13 +14,22 @@
 #    under the License.
 
 from tempest.api.compute import base
+from tempest import config
 from tempest import test
 
+CONF = config.CONF
+
 
 class CertificatesV2TestJSON(base.BaseComputeTest):
 
     _api_version = 2
 
+    @classmethod
+    def skip_checks(cls):
+        super(CertificatesV2TestJSON, cls).skip_checks()
+        if not CONF.compute_feature_enabled.nova_cert:
+            raise cls.skipException("Nova cert is not available")
+
     @test.idempotent_id('c070a441-b08e-447e-a733-905909535b1b')
     def test_create_root_certificate(self):
         # create certificates
diff --git a/tempest/api/compute/images/test_images.py b/tempest/api/compute/images/test_images.py
index 0324df2..dc62620 100644
--- a/tempest/api/compute/images/test_images.py
+++ b/tempest/api/compute/images/test_images.py
@@ -14,6 +14,7 @@
 
 from tempest.api.compute import base
 from tempest.common.utils import data_utils
+from tempest.common import waiters
 from tempest import config
 from tempest import test
 
@@ -48,3 +49,18 @@
                                               name=snapshot_name,
                                               wait_until='SAVING')
         self.client.delete_image(image['id'])
+
+    @test.idempotent_id('aaacd1d0-55a2-4ce8-818a-b5439df8adc9')
+    def test_create_image_from_stopped_server(self):
+        server = self.create_test_server(wait_until='ACTIVE')
+        self.servers_client.stop_server(server['id'])
+        waiters.wait_for_server_status(self.servers_client,
+                                       server['id'], 'SHUTOFF')
+        self.addCleanup(self.servers_client.delete_server, server['id'])
+        snapshot_name = data_utils.rand_name('test-snap')
+        image = self.create_image_from_server(server['id'],
+                                              name=snapshot_name,
+                                              wait_until='ACTIVE',
+                                              wait_for_server=False)
+        self.addCleanup(self.client.delete_image, image['id'])
+        self.assertEqual(snapshot_name, image['name'])
diff --git a/tempest/api/compute/images/test_images_negative.py b/tempest/api/compute/images/test_images_negative.py
index 126d092..9197adf 100644
--- a/tempest/api/compute/images/test_images_negative.py
+++ b/tempest/api/compute/images/test_images_negative.py
@@ -71,22 +71,6 @@
                           '!@#$%^&*()', name=name, meta=meta)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('aaacd1d0-55a2-4ce8-818a-b5439df8adc9')
-    def test_create_image_from_stopped_server(self):
-        server = self.create_test_server(wait_until='ACTIVE')
-        self.servers_client.stop_server(server['id'])
-        waiters.wait_for_server_status(self.servers_client,
-                                       server['id'], 'SHUTOFF')
-        self.addCleanup(self.servers_client.delete_server, server['id'])
-        snapshot_name = data_utils.rand_name('test-snap')
-        image = self.create_image_from_server(server['id'],
-                                              name=snapshot_name,
-                                              wait_until='ACTIVE',
-                                              wait_for_server=False)
-        self.addCleanup(self.client.delete_image, image['id'])
-        self.assertEqual(snapshot_name, image['name'])
-
-    @test.attr(type=['negative'])
     @test.idempotent_id('ec176029-73dc-4037-8d72-2e4ff60cf538')
     def test_create_image_specify_uuid_35_characters_or_less(self):
         # Return an error if Image ID passed is 35 characters or less
diff --git a/tempest/api/image/v2/test_images.py b/tempest/api/image/v2/test_images.py
index a336507..bacf211 100644
--- a/tempest/api/image/v2/test_images.py
+++ b/tempest/api/image/v2/test_images.py
@@ -18,10 +18,15 @@
 
 from six import moves
 
+from oslo_log import log as logging
 from tempest.api.image import base
 from tempest.common.utils import data_utils
+from tempest import config
 from tempest import test
 
+CONF = config.CONF
+LOG = logging.getLogger(__name__)
+
 
 class BasicOperationsImagesTest(base.BaseV2ImageTest):
     """
@@ -39,9 +44,11 @@
 
         uuid = '00000000-1111-2222-3333-444455556666'
         image_name = data_utils.rand_name('image')
+        container_format = CONF.image.container_formats[0]
+        disk_format = CONF.image.disk_formats[0]
         body = self.create_image(name=image_name,
-                                 container_format='bare',
-                                 disk_format='raw',
+                                 container_format=container_format,
+                                 disk_format=disk_format,
                                  visibility='private',
                                  ramdisk_id=uuid)
         self.assertIn('id', body)
@@ -77,9 +84,11 @@
 
         # Create image
         image_name = data_utils.rand_name('image')
+        container_format = CONF.image.container_formats[0]
+        disk_format = CONF.image.disk_formats[0]
         body = self.client.create_image(name=image_name,
-                                        container_format='bare',
-                                        disk_format='raw',
+                                        container_format=container_format,
+                                        disk_format=disk_format,
                                         visibility='private')
         image_id = body['id']
 
@@ -99,9 +108,11 @@
 
         # Create image
         image_name = data_utils.rand_name('image')
+        container_format = CONF.image.container_formats[0]
+        disk_format = CONF.image.disk_formats[0]
         body = self.client.create_image(name=image_name,
-                                        container_format='bare',
-                                        disk_format='iso',
+                                        container_format=container_format,
+                                        disk_format=disk_format,
                                         visibility='private')
         self.addCleanup(self.client.delete_image, body['id'])
         self.assertEqual('queued', body['status'])
@@ -133,13 +144,17 @@
         super(ListImagesTest, cls).resource_setup()
         # We add a few images here to test the listing functionality of
         # the images API
-        cls._create_standard_image('bare', 'raw')
-        cls._create_standard_image('bare', 'raw')
-        cls._create_standard_image('ami', 'raw')
-        # Add some more for listing
-        cls._create_standard_image('ami', 'ami')
-        cls._create_standard_image('ari', 'ari')
-        cls._create_standard_image('aki', 'aki')
+        container_fmts = CONF.image.container_formats
+        disk_fmts = CONF.image.disk_formats
+        all_pairs = [(container_fmt, disk_fmt)
+                     for container_fmt in container_fmts
+                     for disk_fmt in disk_fmts]
+
+        for (container_fmt, disk_fmt) in all_pairs[:6]:
+            LOG.debug("Creating a image"
+                      "(Container format: %s, Disk format: %s).",
+                      container_fmt, disk_fmt)
+            cls._create_standard_image(container_fmt, disk_fmt)
 
     @classmethod
     def _create_standard_image(cls, container_format, disk_format):
@@ -201,7 +216,7 @@
     @test.idempotent_id('cf1b9a48-8340-480e-af7b-fe7e17690876')
     def test_list_images_param_size(self):
         # Test to get all images by size
-        image_id = self.created_images[1]
+        image_id = self.created_images[0]
         # Get image metadata
         image = self.client.show_image(image_id)
 
@@ -211,7 +226,7 @@
     @test.idempotent_id('4ad8c157-971a-4ba8-aa84-ed61154b1e7f')
     def test_list_images_param_min_max_size(self):
         # Test to get all images with size between 2000 to 3000
-        image_id = self.created_images[1]
+        image_id = self.created_images[0]
         # Get image metadata
         image = self.client.show_image(image_id)
 
@@ -234,7 +249,7 @@
     @test.idempotent_id('e914a891-3cc8-4b40-ad32-e0a39ffbddbb')
     def test_list_images_param_limit(self):
         # Test to get images by limit
-        params = {"limit": 2}
+        params = {"limit": 1}
         images_list = self.client.list_images(params=params)['images']
 
         self.assertEqual(len(images_list), params['limit'],
diff --git a/tempest/api/image/v2/test_images_metadefs_namespaces.py b/tempest/api/image/v2/test_images_metadefs_namespaces.py
new file mode 100644
index 0000000..21247b1
--- /dev/null
+++ b/tempest/api/image/v2/test_images_metadefs_namespaces.py
@@ -0,0 +1,71 @@
+# Copyright 2015 Red Hat, Inc.
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+from tempest.api.image import base
+from tempest.common.utils import data_utils
+from tempest import test
+from tempest_lib import exceptions as lib_exc
+
+
+class MetadataNamespacesTest(base.BaseV2ImageTest):
+    """
+    Here we will test the Metadata definition Namespaces basic functionality.
+    """
+    @test.idempotent_id('319b765e-7f3d-4b3d-8b37-3ca3876ee768')
+    def test_basic_metadata_definition_namespaces(self):
+        # get the available resource types and use one resource_type
+        body = self.client.list_resource_types()
+        resource_name = body['resource_types'][0]['name']
+        name = [{'name': resource_name}]
+        namespace_name = data_utils.rand_name('namespace')
+        # create the metadef namespaces
+        body = self.client.create_namespaces(namespace=namespace_name,
+                                             visibility='public',
+                                             description='Tempest',
+                                             display_name=namespace_name,
+                                             resource_type_associations=name,
+                                             protected=True)
+        self.addCleanup(self._cleanup_namespace, namespace_name)
+        # get namespaces details
+        body = self.client.show_namespaces(namespace_name)
+        self.assertEqual(namespace_name, body['namespace'])
+        self.assertEqual('public', body['visibility'])
+        # unable to delete protected namespace
+        self.assertRaises(lib_exc.Forbidden, self.client.delete_namespaces,
+                          namespace_name)
+        # update the visibility to private and protected to False
+        body = self.client.update_namespaces(namespace=namespace_name,
+                                             description='Tempest',
+                                             visibility='private',
+                                             display_name=namespace_name,
+                                             protected=False)
+        self.assertEqual('private', body['visibility'])
+        self.assertEqual(False, body['protected'])
+        # now able to delete the non-protected namespace
+        self.client.delete_namespaces(namespace_name)
+
+    def _cleanup_namespace(self, namespace_name):
+        # this is used to cleanup the resources
+        try:
+            body = self.client.show_namespaces(namespace_name)
+            self.assertEqual(namespace_name, body['namespace'])
+            body = self.client.update_namespaces(namespace=namespace_name,
+                                                 description='Tempest',
+                                                 visibility='private',
+                                                 display_name=namespace_name,
+                                                 protected=False)
+            self.client.delete_namespaces(namespace_name)
+        except lib_exc.NotFound:
+            pass
diff --git a/tempest/api/network/test_subnetpools_extensions.py b/tempest/api/network/test_subnetpools_extensions.py
new file mode 100644
index 0000000..09478ca
--- /dev/null
+++ b/tempest/api/network/test_subnetpools_extensions.py
@@ -0,0 +1,78 @@
+# Copyright 2015 GlobalLogic.  All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+from tempest.api.network import base
+from tempest.common.utils import data_utils
+from tempest import config
+from tempest import test
+from tempest_lib import exceptions as lib_exc
+
+CONF = config.CONF
+
+
+class SubnetPoolsTestJSON(base.BaseNetworkTest):
+    """
+    Tests the following operations in the subnetpools API using the REST client
+    for Neutron:
+
+        Create a subnet pool.
+        Update a subnet pool.
+        Delete a subnet pool.
+        Lists subnet pool.
+        Show subnet pool details.
+
+    v2.0 of the Neutron API is assumed. It is assumed that subnetpools
+    options mentioned in the [network-feature-enabled] section and
+    default_network option mentioned in the [network] section of
+    etc/tempest.conf:
+
+    """
+
+    @classmethod
+    def skip_checks(cls):
+        super(SubnetPoolsTestJSON, cls).skip_checks()
+        if not test.is_extension_enabled('subnetpools', 'network'):
+            msg = "subnet pools extension not enabled."
+            raise cls.skipException(msg)
+
+    @test.attr(type='smoke')
+    @test.idempotent_id('62595970-ab1c-4b7f-8fcc-fddfe55e9811')
+    def test_create_list_show_update_delete_subnetpools(self):
+        subnetpool_name = data_utils.rand_name('subnetpools')
+        # create subnet pool
+        prefix = CONF.network.default_network
+        body = self.client.create_subnetpools(name=subnetpool_name,
+                                              prefixes=prefix)
+        subnetpool_id = body["subnetpool"]["id"]
+        self.addCleanup(self._cleanup_subnetpools, subnetpool_id)
+        self.assertEqual(subnetpool_name, body["subnetpool"]["name"])
+        # get detail about subnet pool
+        body = self.client.show_subnetpools(subnetpool_id)
+        self.assertEqual(subnetpool_name, body["subnetpool"]["name"])
+        # update the subnet pool
+        subnetpool_name = data_utils.rand_name('subnetpools_update')
+        body = self.client.update_subnetpools(subnetpool_id,
+                                              name=subnetpool_name)
+        self.assertEqual(subnetpool_name, body["subnetpool"]["name"])
+        # delete subnet pool
+        body = self.client.delete_subnetpools(subnetpool_id)
+        self.assertRaises(lib_exc.NotFound, self.client.show_subnetpools,
+                          subnetpool_id)
+
+    def _cleanup_subnetpools(self, subnetpool_id):
+        # this is used to cleanup the resources
+        try:
+            self.client.delete_subnetpools(subnetpool_id)
+        except lib_exc.NotFound:
+            pass
diff --git a/tempest/api/volume/admin/test_volume_quotas_negative.py b/tempest/api/volume/admin/test_volume_quotas_negative.py
index d1a6db0..9185553 100644
--- a/tempest/api/volume/admin/test_volume_quotas_negative.py
+++ b/tempest/api/volume/admin/test_volume_quotas_negative.py
@@ -16,8 +16,11 @@
 from tempest_lib import exceptions as lib_exc
 
 from tempest.api.volume import base
+from tempest import config
 from tempest import test
 
+CONF = config.CONF
+
 
 class BaseVolumeQuotasNegativeV2TestJSON(base.BaseVolumeAdminTest):
     force_tenant_isolation = True
@@ -31,11 +34,11 @@
     def resource_setup(cls):
         super(BaseVolumeQuotasNegativeV2TestJSON, cls).resource_setup()
         cls.default_volume_size = cls.volumes_client.default_volume_size
-        cls.shared_quota_set = {'gigabytes': 3 * cls.default_volume_size,
-                                'volumes': 1, 'snapshots': 1}
+        cls.shared_quota_set = {'gigabytes': 2 * cls.default_volume_size,
+                                'volumes': 1}
 
         # NOTE(gfidente): no need to restore original quota set
-        # after the tests as they only work with tenant isolation.
+        # after the tests as they only work with dynamic credentials.
         cls.quotas_client.update_quota_set(
             cls.demo_tenant_id,
             **cls.shared_quota_set)
@@ -43,7 +46,6 @@
         # NOTE(gfidente): no need to delete in tearDown as
         # they are created using utility wrapper methods.
         cls.volume = cls.create_volume()
-        cls.snapshot = cls.create_snapshot(cls.volume['id'])
 
     @test.attr(type='negative')
     @test.idempotent_id('bf544854-d62a-47f2-a681-90f7a47d86b6')
@@ -52,13 +54,6 @@
                           self.volumes_client.create_volume)
 
     @test.attr(type='negative')
-    @test.idempotent_id('02bbf63f-6c05-4357-9d98-2926a94064ff')
-    def test_quota_volume_snapshots(self):
-        self.assertRaises(lib_exc.OverLimit,
-                          self.snapshots_client.create_snapshot,
-                          self.volume['id'])
-
-    @test.attr(type='negative')
     @test.idempotent_id('2dc27eee-8659-4298-b900-169d71a91374')
     def test_quota_volume_gigabytes(self):
         # NOTE(gfidente): quota set needs to be changed for this test
@@ -67,8 +62,7 @@
         self.addCleanup(self.quotas_client.update_quota_set,
                         self.demo_tenant_id,
                         **self.shared_quota_set)
-
-        new_quota_set = {'gigabytes': 2 * self.default_volume_size,
+        new_quota_set = {'gigabytes': self.default_volume_size,
                          'volumes': 2, 'snapshots': 1}
         self.quotas_client.update_quota_set(
             self.demo_tenant_id,
@@ -76,15 +70,6 @@
         self.assertRaises(lib_exc.OverLimit,
                           self.volumes_client.create_volume)
 
-        new_quota_set = {'gigabytes': 2 * self.default_volume_size,
-                         'volumes': 1, 'snapshots': 2}
-        self.quotas_client.update_quota_set(
-            self.demo_tenant_id,
-            **self.shared_quota_set)
-        self.assertRaises(lib_exc.OverLimit,
-                          self.snapshots_client.create_snapshot,
-                          self.volume['id'])
-
 
 class VolumeQuotasNegativeV1TestJSON(BaseVolumeQuotasNegativeV2TestJSON):
     _api_version = 1
diff --git a/tempest/api/volume/admin/test_volume_snapshot_quotas_negative.py b/tempest/api/volume/admin/test_volume_snapshot_quotas_negative.py
new file mode 100644
index 0000000..ce0b618
--- /dev/null
+++ b/tempest/api/volume/admin/test_volume_snapshot_quotas_negative.py
@@ -0,0 +1,81 @@
+# Copyright 2014 OpenStack Foundation
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+from tempest_lib import exceptions as lib_exc
+
+from tempest.api.volume import base
+from tempest import config
+from tempest import test
+
+CONF = config.CONF
+
+
+class VolumeSnapshotQuotasNegativeV2TestJSON(base.BaseVolumeAdminTest):
+    force_tenant_isolation = True
+
+    @classmethod
+    def skip_checks(cls):
+        super(VolumeSnapshotQuotasNegativeV2TestJSON, cls).skip_checks()
+        if not CONF.volume_feature_enabled.snapshot:
+            raise cls.skipException('Cinder volume snapshots are disabled')
+
+    @classmethod
+    def setup_credentials(cls):
+        super(VolumeSnapshotQuotasNegativeV2TestJSON, cls).setup_credentials()
+        cls.demo_tenant_id = cls.os.credentials.tenant_id
+
+    @classmethod
+    def resource_setup(cls):
+        super(VolumeSnapshotQuotasNegativeV2TestJSON, cls).resource_setup()
+        cls.default_volume_size = cls.volumes_client.default_volume_size
+        cls.shared_quota_set = {'gigabytes': 3 * cls.default_volume_size,
+                                'volumes': 1, 'snapshots': 1}
+
+        # NOTE(gfidente): no need to restore original quota set
+        # after the tests as they only work with tenant isolation.
+        cls.quotas_client.update_quota_set(
+            cls.demo_tenant_id,
+            **cls.shared_quota_set)
+
+        # NOTE(gfidente): no need to delete in tearDown as
+        # they are created using utility wrapper methods.
+        cls.volume = cls.create_volume()
+        cls.snapshot = cls.create_snapshot(cls.volume['id'])
+
+    @test.attr(type='negative')
+    @test.idempotent_id('02bbf63f-6c05-4357-9d98-2926a94064ff')
+    def test_quota_volume_snapshots(self):
+        self.assertRaises(lib_exc.OverLimit,
+                          self.snapshots_client.create_snapshot,
+                          self.volume['id'])
+
+    @test.attr(type='negative')
+    @test.idempotent_id('c99a1ca9-6cdf-498d-9fdf-25832babef27')
+    def test_quota_volume_gigabytes_snapshots(self):
+        self.addCleanup(self.quotas_client.update_quota_set,
+                        self.demo_tenant_id,
+                        **self.shared_quota_set)
+        new_quota_set = {'gigabytes': 2 * self.default_volume_size,
+                         'volumes': 1, 'snapshots': 2}
+        self.quotas_client.update_quota_set(
+            self.demo_tenant_id,
+            **new_quota_set)
+        self.assertRaises(lib_exc.OverLimit,
+                          self.snapshots_client.create_snapshot,
+                          self.volume['id'])
+
+
+class VolumeSnapshotNegativeV1TestJSON(VolumeSnapshotQuotasNegativeV2TestJSON):
+    _api_version = 1
diff --git a/tempest/api_schema/response/compute/v2_1/aggregates.py b/tempest/api_schema/response/compute/v2_1/aggregates.py
deleted file mode 100644
index 1a9fe41..0000000
--- a/tempest/api_schema/response/compute/v2_1/aggregates.py
+++ /dev/null
@@ -1,92 +0,0 @@
-# Copyright 2014 NEC Corporation.  All rights reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-import copy
-
-# create-aggregate api doesn't have 'hosts' and 'metadata' attributes.
-aggregate_for_create = {
-    'type': 'object',
-    'properties': {
-        'availability_zone': {'type': ['string', 'null']},
-        'created_at': {'type': 'string'},
-        'deleted': {'type': 'boolean'},
-        'deleted_at': {'type': ['string', 'null']},
-        'id': {'type': 'integer'},
-        'name': {'type': 'string'},
-        'updated_at': {'type': ['string', 'null']}
-    },
-    'additionalProperties': False,
-    'required': ['availability_zone', 'created_at', 'deleted',
-                 'deleted_at', 'id', 'name', 'updated_at'],
-}
-
-common_aggregate_info = copy.deepcopy(aggregate_for_create)
-common_aggregate_info['properties'].update({
-    'hosts': {'type': 'array'},
-    'metadata': {'type': 'object'}
-})
-common_aggregate_info['required'].extend(['hosts', 'metadata'])
-
-list_aggregates = {
-    'status_code': [200],
-    'response_body': {
-        'type': 'object',
-        'properties': {
-            'aggregates': {
-                'type': 'array',
-                'items': common_aggregate_info
-            }
-        },
-        'additionalProperties': False,
-        'required': ['aggregates'],
-    }
-}
-
-get_aggregate = {
-    'status_code': [200],
-    'response_body': {
-        'type': 'object',
-        'properties': {
-            'aggregate': common_aggregate_info
-        },
-        'additionalProperties': False,
-        'required': ['aggregate'],
-    }
-}
-
-aggregate_set_metadata = get_aggregate
-# The 'updated_at' attribute of 'update_aggregate' can't be null.
-update_aggregate = copy.deepcopy(get_aggregate)
-update_aggregate['response_body']['properties']['aggregate']['properties'][
-    'updated_at'] = {
-        'type': 'string'
-    }
-
-delete_aggregate = {
-    'status_code': [200]
-}
-
-create_aggregate = {
-    'status_code': [200],
-    'response_body': {
-        'type': 'object',
-        'properties': {
-            'aggregate': aggregate_for_create
-        },
-        'additionalProperties': False,
-        'required': ['aggregate'],
-    }
-}
-
-aggregate_add_remove_host = get_aggregate
diff --git a/tempest/api_schema/response/compute/v2_1/availability_zone.py b/tempest/api_schema/response/compute/v2_1/availability_zone.py
deleted file mode 100644
index d9aebce..0000000
--- a/tempest/api_schema/response/compute/v2_1/availability_zone.py
+++ /dev/null
@@ -1,78 +0,0 @@
-# Copyright 2014 NEC Corporation.  All rights reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-import copy
-
-
-base = {
-    'status_code': [200],
-    'response_body': {
-        'type': 'object',
-        'properties': {
-            'availabilityZoneInfo': {
-                'type': 'array',
-                'items': {
-                    'type': 'object',
-                    'properties': {
-                        'zoneName': {'type': 'string'},
-                        'zoneState': {
-                            'type': 'object',
-                            'properties': {
-                                'available': {'type': 'boolean'}
-                            },
-                            'additionalProperties': False,
-                            'required': ['available']
-                        },
-                        # NOTE: Here is the difference between detail and
-                        # non-detail.
-                        'hosts': {'type': 'null'}
-                    },
-                    'additionalProperties': False,
-                    'required': ['zoneName', 'zoneState', 'hosts']
-                }
-            }
-        },
-        'additionalProperties': False,
-        'required': ['availabilityZoneInfo']
-    }
-}
-
-detail = {
-    'type': 'object',
-    'patternProperties': {
-        # NOTE: Here is for a hostname
-        '^[a-zA-Z0-9-_.]+$': {
-            'type': 'object',
-            'patternProperties': {
-                # NOTE: Here is for a service name
-                '^.*$': {
-                    'type': 'object',
-                    'properties': {
-                        'available': {'type': 'boolean'},
-                        'active': {'type': 'boolean'},
-                        'updated_at': {'type': ['string', 'null']}
-                    },
-                    'additionalProperties': False,
-                    'required': ['available', 'active', 'updated_at']
-                }
-            }
-        }
-    }
-}
-
-list_availability_zone_list = copy.deepcopy(base)
-
-list_availability_zone_list_detail = copy.deepcopy(base)
-list_availability_zone_list_detail['response_body']['properties'][
-    'availabilityZoneInfo']['items']['properties']['hosts'] = detail
diff --git a/tempest/api_schema/response/compute/v2_1/baremetal_nodes.py b/tempest/api_schema/response/compute/v2_1/baremetal_nodes.py
deleted file mode 100644
index d1ee877..0000000
--- a/tempest/api_schema/response/compute/v2_1/baremetal_nodes.py
+++ /dev/null
@@ -1,63 +0,0 @@
-# Copyright 2015 NEC Corporation.  All rights reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-import copy
-
-node = {
-    'type': 'object',
-    'properties': {
-        'id': {'type': 'string'},
-        'interfaces': {'type': 'array'},
-        'host': {'type': 'string'},
-        'task_state': {'type': ['string', 'null']},
-        'cpus': {'type': ['integer', 'string']},
-        'memory_mb': {'type': ['integer', 'string']},
-        'disk_gb': {'type': ['integer', 'string']},
-    },
-    'additionalProperties': False,
-    'required': ['id', 'interfaces', 'host', 'task_state', 'cpus', 'memory_mb',
-                 'disk_gb']
-}
-
-list_baremetal_nodes = {
-    'status_code': [200],
-    'response_body': {
-        'type': 'object',
-        'properties': {
-            'nodes': {
-                'type': 'array',
-                'items': node
-            }
-        },
-        'additionalProperties': False,
-        'required': ['nodes']
-    }
-}
-
-baremetal_node = {
-    'status_code': [200],
-    'response_body': {
-        'type': 'object',
-        'properties': {
-            'node': node
-        },
-        'additionalProperties': False,
-        'required': ['node']
-    }
-}
-get_baremetal_node = copy.deepcopy(baremetal_node)
-get_baremetal_node['response_body']['properties']['node'][
-    'properties'].update({'instance_uuid': {'type': ['string', 'null']}})
-get_baremetal_node['response_body']['properties']['node'][
-    'required'].append('instance_uuid')
diff --git a/tempest/api_schema/response/compute/v2_1/certificates.py b/tempest/api_schema/response/compute/v2_1/certificates.py
deleted file mode 100644
index 4e7cbe4..0000000
--- a/tempest/api_schema/response/compute/v2_1/certificates.py
+++ /dev/null
@@ -1,41 +0,0 @@
-# Copyright 2014 NEC Corporation.  All rights reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-import copy
-
-_common_schema = {
-    'status_code': [200],
-    'response_body': {
-        'type': 'object',
-        'properties': {
-            'certificate': {
-                'type': 'object',
-                'properties': {
-                    'data': {'type': 'string'},
-                    'private_key': {'type': 'string'},
-                },
-                'additionalProperties': False,
-                'required': ['data', 'private_key']
-            }
-        },
-        'additionalProperties': False,
-        'required': ['certificate']
-    }
-}
-
-get_certificate = copy.deepcopy(_common_schema)
-get_certificate['response_body']['properties']['certificate'][
-    'properties']['private_key'].update({'type': 'null'})
-
-create_certificate = copy.deepcopy(_common_schema)
diff --git a/tempest/api_schema/response/compute/v2_1/extensions.py b/tempest/api_schema/response/compute/v2_1/extensions.py
deleted file mode 100644
index a6a455c..0000000
--- a/tempest/api_schema/response/compute/v2_1/extensions.py
+++ /dev/null
@@ -1,47 +0,0 @@
-# Copyright 2014 NEC Corporation.  All rights reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-list_extensions = {
-    'status_code': [200],
-    'response_body': {
-        'type': 'object',
-        'properties': {
-            'extensions': {
-                'type': 'array',
-                'items': {
-                    'type': 'object',
-                    'properties': {
-                        'updated': {
-                            'type': 'string',
-                            'format': 'data-time'
-                        },
-                        'name': {'type': 'string'},
-                        'links': {'type': 'array'},
-                        'namespace': {
-                            'type': 'string',
-                            'format': 'uri'
-                        },
-                        'alias': {'type': 'string'},
-                        'description': {'type': 'string'}
-                    },
-                    'additionalProperties': False,
-                    'required': ['updated', 'name', 'links', 'namespace',
-                                 'alias', 'description']
-                }
-            }
-        },
-        'additionalProperties': False,
-        'required': ['extensions']
-    }
-}
diff --git a/tempest/api_schema/response/compute/v2_1/fixed_ips.py b/tempest/api_schema/response/compute/v2_1/fixed_ips.py
index 3586b70..229860e 100644
--- a/tempest/api_schema/response/compute/v2_1/fixed_ips.py
+++ b/tempest/api_schema/response/compute/v2_1/fixed_ips.py
@@ -36,7 +36,6 @@
     }
 }
 
-reserve_fixed_ip = {
-    'status_code': [202],
-    'response_body': {'type': 'string'}
+reserve_unreserve_fixed_ip = {
+    'status_code': [202]
 }
diff --git a/tempest/api_schema/response/compute/v2_1/services.py b/tempest/api_schema/response/compute/v2_1/services.py
index c2c7a51..ddef7b2 100644
--- a/tempest/api_schema/response/compute/v2_1/services.py
+++ b/tempest/api_schema/response/compute/v2_1/services.py
@@ -43,7 +43,7 @@
     }
 }
 
-enable_service = {
+enable_disable_service = {
     'status_code': [200],
     'response_body': {
         'type': 'object',
diff --git a/tempest/clients.py b/tempest/clients.py
index dd0d145..b593089 100644
--- a/tempest/clients.py
+++ b/tempest/clients.py
@@ -16,6 +16,16 @@
 import copy
 
 from oslo_log import log as logging
+from tempest_lib.services.compute.agents_client import AgentsClient
+from tempest_lib.services.compute.aggregates_client import AggregatesClient
+from tempest_lib.services.compute.availability_zone_client import \
+    AvailabilityZoneClient
+from tempest_lib.services.compute.baremetal_nodes_client import \
+    BaremetalNodesClient
+from tempest_lib.services.compute.certificates_client import \
+    CertificatesClient
+from tempest_lib.services.compute.extensions_client import \
+    ExtensionsClient
 from tempest_lib.services.identity.v2.token_client import TokenClient
 from tempest_lib.services.identity.v3.token_client import V3TokenClient
 
@@ -27,18 +37,6 @@
 from tempest.services.baremetal.v1.json.baremetal_client import \
     BaremetalClient
 from tempest.services import botoclients
-from tempest.services.compute.json.agents_client import \
-    AgentsClient
-from tempest.services.compute.json.aggregates_client import \
-    AggregatesClient
-from tempest.services.compute.json.availability_zone_client import \
-    AvailabilityZoneClient
-from tempest.services.compute.json.baremetal_nodes_client import \
-    BaremetalNodesClient
-from tempest.services.compute.json.certificates_client import \
-    CertificatesClient
-from tempest.services.compute.json.extensions_client import \
-    ExtensionsClient
 from tempest.services.compute.json.fixed_ips_client import FixedIPsClient
 from tempest.services.compute.json.flavors_client import FlavorsClient
 from tempest.services.compute.json.floating_ip_pools_client import \
@@ -81,8 +79,8 @@
 from tempest.services.compute.json.tenant_usages_client import \
     TenantUsagesClient
 from tempest.services.compute.json.versions_client import VersionsClient
-from tempest.services.compute.json.volumes_extensions_client import \
-    VolumesExtensionsClient
+from tempest.services.compute.json.volumes_client import \
+    VolumesClient as ComputeVolumesClient
 from tempest.services.data_processing.v1_1.data_processing_client import \
     DataProcessingClient
 from tempest.services.database.json.flavors_client import \
@@ -334,7 +332,7 @@
             'build_interval': CONF.volume.build_interval,
             'build_timeout': CONF.volume.build_timeout
         })
-        self.volumes_extensions_client = VolumesExtensionsClient(
+        self.volumes_extensions_client = ComputeVolumesClient(
             self.auth_provider, **params_volume)
         self.compute_versions_client = VersionsClient(self.auth_provider,
                                                       **params_volume)
diff --git a/tempest/cmd/account_generator.py b/tempest/cmd/account_generator.py
index c26df96..02c6e7f 100755
--- a/tempest/cmd/account_generator.py
+++ b/tempest/cmd/account_generator.py
@@ -160,7 +160,7 @@
 def create_resources(opts, resources):
     (identity_admin, neutron_iso_networks,
      network_admin, networks_admin) = get_admin_clients(opts)
-    roles = identity_admin.list_roles()
+    roles = identity_admin.list_roles()['roles']
     for u in resources['users']:
         u['role_ids'] = []
         for r in u.get('roles', ()):
diff --git a/tempest/cmd/init.py b/tempest/cmd/init.py
index 289b978..af8f270 100644
--- a/tempest/cmd/init.py
+++ b/tempest/cmd/init.py
@@ -52,17 +52,21 @@
     real_prefix = getattr(sys, 'real_prefix', None)
     base_prefix = getattr(sys, 'base_prefix', None)
     prefix = sys.prefix
-    if real_prefix is None and base_prefix is None:
-        # Not running in a virtual environnment of any kind
-        return '/etc/tempest'
-    elif (real_prefix is None and base_prefix is not None and
-            base_prefix == prefix):
-        # Probably not running in a virtual environment
+    if (real_prefix is None and
+            (base_prefix is None or base_prefix == prefix)):
+        # Probably not running in a virtual environment.
         # NOTE(andreaf) we cannot distinguish this case from the case of
         # a virtual environment created with virtualenv, and running python3.
-        return '/etc/tempest'
+        # Also if it appears we are not in virtual env and fail to find
+        # global config: '/etc/tempest', fall back to
+        # '[sys.prefix]/etc/tempest'
+        global_conf_dir = '/etc/tempest'
+        if os.path.isdir(global_conf_dir):
+            return global_conf_dir
+        else:
+            return os.path.join(prefix, 'etc/tempest')
     else:
-        return os.path.join(sys.prefix, 'etc/tempest')
+        return os.path.join(prefix, 'etc/tempest')
 
 
 class TempestInit(command.Command):
@@ -99,9 +103,12 @@
     def copy_config(self, etc_dir, config_dir):
         shutil.copytree(config_dir, etc_dir)
 
-    def generate_sample_config(self, local_dir):
+    def generate_sample_config(self, local_dir, config_dir):
+        conf_generator = os.path.join(config_dir,
+                                      'config-generator.tempest.conf')
+
         subprocess.call(['oslo-config-generator', '--config-file',
-                         'tools/config/config-generator.tempest.conf'],
+                         conf_generator],
                         cwd=local_dir)
 
     def create_working_dir(self, local_dir, config_dir):
@@ -109,6 +116,10 @@
         if not os.path.isdir(local_dir):
             LOG.debug('Creating local working dir: %s' % local_dir)
             os.mkdir(local_dir)
+        else:
+            raise OSError("Directory you are trying to initialize already "
+                          "exists: %s" % local_dir)
+
         lock_dir = os.path.join(local_dir, 'tempest_lock')
         etc_dir = os.path.join(local_dir, 'etc')
         config_path = os.path.join(etc_dir, 'tempest.conf')
@@ -125,7 +136,7 @@
         # Create and copy local etc dir
         self.copy_config(etc_dir, config_dir)
         # Generate the sample config file
-        self.generate_sample_config(local_dir)
+        self.generate_sample_config(local_dir, config_dir)
         # Update local confs to reflect local paths
         self.update_local_conf(config_path, lock_dir, log_dir)
         # Generate a testr conf file
diff --git a/tempest/cmd/verify_tempest_config.py b/tempest/cmd/verify_tempest_config.py
index 4fcdf8b..2811070 100755
--- a/tempest/cmd/verify_tempest_config.py
+++ b/tempest/cmd/verify_tempest_config.py
@@ -348,7 +348,7 @@
         CONF_PARSER = moves.configparser.SafeConfigParser()
         CONF_PARSER.optionxform = str
         CONF_PARSER.readfp(conf_file)
-    icreds = credentials.get_isolated_credentials('verify_tempest_config')
+    icreds = credentials.get_credentials_provider('verify_tempest_config')
     try:
         os = clients.Manager(icreds.get_primary_creds())
         services = check_service_availability(os, update)
@@ -370,7 +370,7 @@
             CONF_PARSER.write(outfile)
         outfile.close()
     finally:
-        icreds.clear_isolated_creds()
+        icreds.clear_creds()
 
 
 if __name__ == "__main__":
diff --git a/tempest/common/cred_provider.py b/tempest/common/cred_provider.py
index 783a5fc..1221fc7 100644
--- a/tempest/common/cred_provider.py
+++ b/tempest/common/cred_provider.py
@@ -26,7 +26,7 @@
 
 # Type of credentials available from configuration
 CREDENTIAL_TYPES = {
-    'identity_admin': ('identity', 'admin'),
+    'identity_admin': ('auth', 'admin'),
     'user': ('identity', None),
     'alt_user': ('identity', 'alt')
 }
@@ -128,7 +128,7 @@
         return
 
     @abc.abstractmethod
-    def clear_isolated_creds(self):
+    def clear_creds(self):
         return
 
     @abc.abstractmethod
diff --git a/tempest/common/credentials.py b/tempest/common/credentials.py
index 71d905f..28e95e9 100644
--- a/tempest/common/credentials.py
+++ b/tempest/common/credentials.py
@@ -13,9 +13,9 @@
 
 import os
 
-from tempest.common import accounts
 from tempest.common import cred_provider
-from tempest.common import isolated_creds
+from tempest.common import dynamic_creds
+from tempest.common import preprov_creds
 from tempest import config
 from tempest import exceptions
 
@@ -25,15 +25,15 @@
 # Return the right implementation of CredentialProvider based on config
 # Dropping interface and password, as they are never used anyways
 # TODO(andreaf) Drop them from the CredentialsProvider interface completely
-def get_isolated_credentials(name, network_resources=None,
+def get_credentials_provider(name, network_resources=None,
                              force_tenant_isolation=False,
                              identity_version=None):
     # If a test requires a new account to work, it can have it via forcing
-    # tenant isolation. A new account will be produced only for that test.
+    # dynamic credentials. A new account will be produced only for that test.
     # In case admin credentials are not available for the account creation,
     # the test should be skipped else it would fail.
-    if CONF.auth.allow_tenant_isolation or force_tenant_isolation:
-        return isolated_creds.IsolatedCreds(
+    if CONF.auth.use_dynamic_credentials or force_tenant_isolation:
+        return dynamic_creds.DynamicCredentialProvider(
             name=name,
             network_resources=network_resources,
             identity_version=identity_version)
@@ -41,10 +41,10 @@
         if (CONF.auth.test_accounts_file and
                 os.path.isfile(CONF.auth.test_accounts_file)):
             # Most params are not relevant for pre-created accounts
-            return accounts.Accounts(name=name,
-                                     identity_version=identity_version)
+            return preprov_creds.PreProvisionedCredentialProvider(
+                name=name, identity_version=identity_version)
         else:
-            return accounts.NotLockingAccounts(
+            return preprov_creds.NonLockingCredentialProvider(
                 name=name, identity_version=identity_version)
 
 
@@ -53,13 +53,14 @@
 # creds area vailable.
 def is_admin_available():
     is_admin = True
-    # If tenant isolation is enabled admin will be available
-    if CONF.auth.allow_tenant_isolation:
+    # If dynamic credentials is enabled admin will be available
+    if CONF.auth.use_dynamic_credentials:
         return is_admin
     # Check whether test accounts file has the admin specified or not
     elif (CONF.auth.test_accounts_file and
             os.path.isfile(CONF.auth.test_accounts_file)):
-        check_accounts = accounts.Accounts(name='check_admin')
+        check_accounts = preprov_creds.PreProvisionedCredentialProvider(
+            name='check_admin')
         if not check_accounts.admin_available():
             is_admin = False
     else:
@@ -75,15 +76,17 @@
 # are available so we can do a single call from skip_checks if alt
 # creds area vailable.
 def is_alt_available():
-    # If tenant isolation is enabled admin will be available
-    if CONF.auth.allow_tenant_isolation:
+    # If dynamic credentials is enabled admin will be available
+    if CONF.auth.use_dynamic_credentials:
         return True
     # Check whether test accounts file has the admin specified or not
     if (CONF.auth.test_accounts_file and
             os.path.isfile(CONF.auth.test_accounts_file)):
-        check_accounts = accounts.Accounts(name='check_alt')
+        check_accounts = preprov_creds.PreProvisionedCredentialProvider(
+            name='check_alt')
     else:
-        check_accounts = accounts.NotLockingAccounts(name='check_alt')
+        check_accounts = preprov_creds.NonLockingCredentialProvider(
+            name='check_alt')
     try:
         if not check_accounts.is_multi_user():
             return False
diff --git a/tempest/common/isolated_creds.py b/tempest/common/dynamic_creds.py
similarity index 92%
rename from tempest/common/isolated_creds.py
rename to tempest/common/dynamic_creds.py
index 3850e0e..f0b6625 100644
--- a/tempest/common/isolated_creds.py
+++ b/tempest/common/dynamic_creds.py
@@ -28,21 +28,21 @@
 LOG = logging.getLogger(__name__)
 
 
-class IsolatedCreds(cred_provider.CredentialProvider):
+class DynamicCredentialProvider(cred_provider.CredentialProvider):
 
     def __init__(self, identity_version=None, name=None,
                  network_resources=None):
-        super(IsolatedCreds, self).__init__(identity_version, name,
-                                            network_resources)
+        super(DynamicCredentialProvider, self).__init__(
+            identity_version, name, network_resources)
         self.network_resources = network_resources
-        self.isolated_creds = {}
+        self._creds = {}
         self.ports = []
         self.default_admin_creds = cred_provider.get_configured_credentials(
             'identity_admin', fill_in=True,
             identity_version=self.identity_version)
         (self.identity_admin_client, self.network_admin_client,
          self.networks_admin_client) = self._get_admin_clients()
-        # Domain where isolated credentials are provisioned (v3 only).
+        # Domain where dynamic credentials are provisioned (v3 only).
         # Use that of the admin account is None is configured.
         self.creds_domain_name = None
         if self.identity_version == 'v3':
@@ -205,17 +205,17 @@
             router_id, subnet_id)
 
     def get_credentials(self, credential_type):
-        if self.isolated_creds.get(str(credential_type)):
-            credentials = self.isolated_creds[str(credential_type)]
+        if self._creds.get(str(credential_type)):
+            credentials = self._creds[str(credential_type)]
         else:
             if credential_type in ['primary', 'alt', 'admin']:
                 is_admin = (credential_type == 'admin')
                 credentials = self._create_creds(admin=is_admin)
             else:
                 credentials = self._create_creds(roles=credential_type)
-            self.isolated_creds[str(credential_type)] = credentials
+            self._creds[str(credential_type)] = credentials
             # Maintained until tests are ported
-            LOG.info("Acquired isolated creds:\n credentials: %s"
+            LOG.info("Acquired dynamic creds:\n credentials: %s"
                      % credentials)
             if (CONF.service_available.neutron and
                 not CONF.baremetal.driver_enabled and
@@ -240,15 +240,15 @@
     def get_creds_by_roles(self, roles, force_new=False):
         roles = list(set(roles))
         # The roles list as a str will become the index as the dict key for
-        # the created credentials set in the isolated_creds dict.
-        exist_creds = self.isolated_creds.get(str(roles))
+        # the created credentials set in the dynamic_creds dict.
+        exist_creds = self._creds.get(str(roles))
         # If force_new flag is True 2 cred sets with the same roles are needed
         # handle this by creating a separate index for old one to store it
         # separately for cleanup
         if exist_creds and force_new:
-            new_index = str(roles) + '-' + str(len(self.isolated_creds))
-            self.isolated_creds[new_index] = exist_creds
-            del self.isolated_creds[str(roles)]
+            new_index = str(roles) + '-' + str(len(self._creds))
+            self._creds[new_index] = exist_creds
+            del self._creds[str(roles)]
         return self.get_credentials(roles)
 
     def _clear_isolated_router(self, router_id, router_name):
@@ -289,8 +289,8 @@
 
     def _clear_isolated_net_resources(self):
         net_client = self.network_admin_client
-        for cred in self.isolated_creds:
-            creds = self.isolated_creds.get(cred)
+        for cred in self._creds:
+            creds = self._creds.get(cred)
             if (not creds or not any([creds.router, creds.network,
                                       creds.subnet])):
                 continue
@@ -317,11 +317,11 @@
                 self._clear_isolated_network(creds.network['id'],
                                              creds.network['name'])
 
-    def clear_isolated_creds(self):
-        if not self.isolated_creds:
+    def clear_creds(self):
+        if not self._creds:
             return
         self._clear_isolated_net_resources()
-        for creds in six.itervalues(self.isolated_creds):
+        for creds in six.itervalues(self._creds):
             try:
                 self.creds_client.delete_user(creds.user_id)
             except lib_exc.NotFound:
@@ -334,7 +334,7 @@
             except lib_exc.NotFound:
                 LOG.warn("tenant with name: %s not found for delete" %
                          creds.tenant_name)
-        self.isolated_creds = {}
+        self._creds = {}
 
     def is_multi_user(self):
         return True
diff --git a/tempest/common/accounts.py b/tempest/common/preprov_creds.py
similarity index 88%
rename from tempest/common/accounts.py
rename to tempest/common/preprov_creds.py
index 5fab85b..eac7f4e 100644
--- a/tempest/common/accounts.py
+++ b/tempest/common/preprov_creds.py
@@ -36,11 +36,11 @@
     return accounts
 
 
-class Accounts(cred_provider.CredentialProvider):
+class PreProvisionedCredentialProvider(cred_provider.CredentialProvider):
 
     def __init__(self, identity_version=None, name=None):
-        super(Accounts, self).__init__(identity_version=identity_version,
-                                       name=name)
+        super(PreProvisionedCredentialProvider, self).__init__(
+            identity_version=identity_version, name=name)
         if (CONF.auth.test_accounts_file and
                 os.path.isfile(CONF.auth.test_accounts_file)):
             accounts = read_accounts_yaml(CONF.auth.test_accounts_file)
@@ -51,7 +51,7 @@
         self.hash_dict = self.get_hash_dict(accounts)
         self.accounts_dir = os.path.join(lockutils.get_lock_path(CONF),
                                          'test_accounts')
-        self.isolated_creds = {}
+        self._creds = {}
 
     @classmethod
     def _append_role(cls, role, account_hash, hash_dict):
@@ -230,38 +230,38 @@
         LOG.info("%s returned allocated creds:\n%s" % (self.name, clean_creds))
 
     def get_primary_creds(self):
-        if self.isolated_creds.get('primary'):
-            return self.isolated_creds.get('primary')
+        if self._creds.get('primary'):
+            return self._creds.get('primary')
         net_creds = self._get_creds()
-        self.isolated_creds['primary'] = net_creds
+        self._creds['primary'] = net_creds
         return net_creds
 
     def get_alt_creds(self):
-        if self.isolated_creds.get('alt'):
-            return self.isolated_creds.get('alt')
+        if self._creds.get('alt'):
+            return self._creds.get('alt')
         net_creds = self._get_creds()
-        self.isolated_creds['alt'] = net_creds
+        self._creds['alt'] = net_creds
         return net_creds
 
     def get_creds_by_roles(self, roles, force_new=False):
         roles = list(set(roles))
-        exist_creds = self.isolated_creds.get(six.text_type(roles).encode(
+        exist_creds = self._creds.get(six.text_type(roles).encode(
             'utf-8'), None)
         # The force kwarg is used to allocate an additional set of creds with
         # the same role list. The index used for the previously allocation
-        # in the isolated_creds dict will be moved.
+        # in the _creds dict will be moved.
         if exist_creds and not force_new:
             return exist_creds
         elif exist_creds and force_new:
             new_index = six.text_type(roles).encode('utf-8') + '-' + \
-                six.text_type(len(self.isolated_creds)).encode('utf-8')
-            self.isolated_creds[new_index] = exist_creds
+                six.text_type(len(self._creds)).encode('utf-8')
+            self._creds[new_index] = exist_creds
         net_creds = self._get_creds(roles=roles)
-        self.isolated_creds[six.text_type(roles).encode('utf-8')] = net_creds
+        self._creds[six.text_type(roles).encode('utf-8')] = net_creds
         return net_creds
 
-    def clear_isolated_creds(self):
-        for creds in self.isolated_creds.values():
+    def clear_creds(self):
+        for creds in self._creds.values():
             self.remove_credentials(creds)
 
     def get_admin_creds(self):
@@ -295,7 +295,7 @@
         return net_creds
 
 
-class NotLockingAccounts(Accounts):
+class NonLockingCredentialProvider(PreProvisionedCredentialProvider):
     """Credentials provider which always returns the first and second
     configured accounts as primary and alt users.
     This credential provider can be used in case of serial test execution
@@ -320,36 +320,36 @@
         return self._unique_creds('tenant_id')
 
     def get_primary_creds(self):
-        if self.isolated_creds.get('primary'):
-            return self.isolated_creds.get('primary')
+        if self._creds.get('primary'):
+            return self._creds.get('primary')
         primary_credential = cred_provider.get_configured_credentials(
             credential_type='user', identity_version=self.identity_version)
-        self.isolated_creds['primary'] = cred_provider.TestResources(
+        self._creds['primary'] = cred_provider.TestResources(
             primary_credential)
-        return self.isolated_creds['primary']
+        return self._creds['primary']
 
     def get_alt_creds(self):
-        if self.isolated_creds.get('alt'):
-            return self.isolated_creds.get('alt')
+        if self._creds.get('alt'):
+            return self._creds.get('alt')
         alt_credential = cred_provider.get_configured_credentials(
             credential_type='alt_user',
             identity_version=self.identity_version)
-        self.isolated_creds['alt'] = cred_provider.TestResources(
+        self._creds['alt'] = cred_provider.TestResources(
             alt_credential)
-        return self.isolated_creds['alt']
+        return self._creds['alt']
 
-    def clear_isolated_creds(self):
-        self.isolated_creds = {}
+    def clear_creds(self):
+        self._creds = {}
 
     def get_admin_creds(self):
         creds = cred_provider.get_configured_credentials(
             "identity_admin", fill_in=False)
-        self.isolated_creds['admin'] = cred_provider.TestResources(creds)
-        return self.isolated_creds['admin']
+        self._creds['admin'] = cred_provider.TestResources(creds)
+        return self._creds['admin']
 
     def get_creds_by_roles(self, roles, force_new=False):
         msg = "Credentials being specified through the config file can not be"\
               " used with tests that specify using credentials by roles. "\
               "Either exclude/skip the tests doing this or use either an "\
-              "test_accounts_file or tenant isolation."
+              "test_accounts_file or dynamic credentials."
         raise exceptions.InvalidConfiguration(msg)
diff --git a/tempest/config.py b/tempest/config.py
index eb49fed..b2bc931 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -53,7 +53,7 @@
                     "at least `2 * CONC` distinct accounts configured in "
                     " the `test_accounts_file`, with CONC == the "
                     "number of concurrent test processes."),
-    cfg.BoolOpt('allow_tenant_isolation',
+    cfg.BoolOpt('use_dynamic_credentials',
                 default=True,
                 help="Allows test cases to create/destroy tenants and "
                      "users. This option requires that OpenStack Identity "
@@ -61,6 +61,8 @@
                      "test cases and parallel execution, can still be "
                      "achieved configuring a list of test accounts",
                 deprecated_opts=[cfg.DeprecatedOpt('allow_tenant_isolation',
+                                                   group='auth'),
+                                 cfg.DeprecatedOpt('allow_tenant_isolation',
                                                    group='compute'),
                                  cfg.DeprecatedOpt('allow_tenant_isolation',
                                                    group='orchestration')]),
@@ -76,12 +78,32 @@
                                 group='auth')]),
     cfg.BoolOpt('create_isolated_networks',
                 default=True,
-                help="If allow_tenant_isolation is set to True and Neutron is "
-                     "enabled Tempest will try to create a usable network, "
-                     "subnet, and router when needed for each tenant it  "
+                help="If use_dynamic_credentials is set to True and Neutron "
+                     "is enabled Tempest will try to create a usable network, "
+                     "subnet, and router when needed for each tenant it "
                      "creates. However in some neutron configurations, like "
                      "with VLAN provider networks, this doesn't work. So if "
                      "set to False the isolated networks will not be created"),
+    cfg.StrOpt('admin_username',
+               help="Username for an administrative user. This is needed for "
+                    "authenticating requests made by tenant isolation to "
+                    "create users and projects",
+               deprecated_group='identity'),
+    cfg.StrOpt('admin_tenant_name',
+               help="Tenant name to use for an  administrative user. This is "
+                    "needed for authenticating requests made by tenant "
+                    "isolation to create users and projects",
+               deprecated_group='identity'),
+    cfg.StrOpt('admin_password',
+               help="Password to use for an  administrative user. This is "
+                    "needed for authenticating requests made by tenant "
+                    "isolation to create users and projects",
+               secret=True,
+               deprecated_group='identity'),
+    cfg.StrOpt('admin_domain_name',
+               help="Admin domain name for authentication (Keystone V3)."
+                    "The same domain applies to user and project",
+               deprecated_group='identity'),
 ]
 
 identity_group = cfg.OptGroup(name='identity',
@@ -133,42 +155,38 @@
                help="The endpoint type to use for OpenStack Identity "
                     "(Keystone) API v3"),
     cfg.StrOpt('username',
-               help="Username to use for Nova API requests."),
+               help="Username to use for Nova API requests.",
+               deprecated_for_removal=True),
     cfg.StrOpt('tenant_name',
-               help="Tenant name to use for Nova API requests."),
+               help="Tenant name to use for Nova API requests.",
+               deprecated_for_removal=True),
     cfg.StrOpt('admin_role',
                default='admin',
                help="Role required to administrate keystone."),
     cfg.StrOpt('password',
                help="API key to use when authenticating.",
-               secret=True),
+               secret=True,
+               deprecated_for_removal=True),
     cfg.StrOpt('domain_name',
                help="Domain name for authentication (Keystone V3)."
-                    "The same domain applies to user and project"),
+                    "The same domain applies to user and project",
+               deprecated_for_removal=True),
     cfg.StrOpt('alt_username',
                help="Username of alternate user to use for Nova API "
-                    "requests."),
+                    "requests.",
+               deprecated_for_removal=True),
     cfg.StrOpt('alt_tenant_name',
                help="Alternate user's Tenant name to use for Nova API "
-                    "requests."),
+                    "requests.",
+               deprecated_for_removal=True),
     cfg.StrOpt('alt_password',
                help="API key to use when authenticating as alternate user.",
-               secret=True),
+               secret=True,
+               deprecated_for_removal=True),
     cfg.StrOpt('alt_domain_name',
                help="Alternate domain name for authentication (Keystone V3)."
-                    "The same domain applies to user and project"),
-    cfg.StrOpt('admin_username',
-               help="Administrative Username to use for "
-                    "Keystone API requests."),
-    cfg.StrOpt('admin_tenant_name',
-               help="Administrative Tenant name to use for Keystone API "
-                    "requests."),
-    cfg.StrOpt('admin_password',
-               help="API key to use when authenticating as admin.",
-               secret=True),
-    cfg.StrOpt('admin_domain_name',
-               help="Admin domain name for authentication (Keystone V3)."
-                    "The same domain applies to user and project"),
+                    "The same domain applies to user and project",
+               deprecated_for_removal=True),
     cfg.StrOpt('default_domain_id',
                default='default',
                help="ID of the default domain"),
@@ -404,6 +422,9 @@
     cfg.BoolOpt('ec2_api',
                 default=True,
                 help='Does the test environment have the ec2 api running?'),
+    cfg.BoolOpt('nova_cert',
+                default=True,
+                help='Does the test environment have the nova cert running?'),
     # TODO(mriedem): Remove preserve_ports once juno-eol happens.
     cfg.BoolOpt('preserve_ports',
                 default=False,
@@ -459,7 +480,16 @@
     cfg.IntOpt('build_interval',
                default=1,
                help="Time in seconds between image operation status "
-                    "checks.")
+                    "checks."),
+    cfg.ListOpt('container_formats',
+                default=['ami', 'ari', 'aki', 'bare', 'ovf', 'ova'],
+                help="A list of image's container formats "
+                     "users can specify."),
+    cfg.ListOpt('disk_formats',
+                default=['ami', 'ari', 'aki', 'vhd', 'vmdk', 'raw', 'qcow2',
+                         'vdi', 'iso'],
+                help="A list of image's disk formats "
+                     "users can specify.")
 ]
 
 image_feature_group = cfg.OptGroup(name='image-feature-enabled',
@@ -544,6 +574,10 @@
                     " with pre-configured ports."
                     " Supported ports are:"
                     " ['normal','direct','macvtap']"),
+    cfg.ListOpt('default_network',
+                default=["1.0.0.0/16", "2.0.0.0/16"],
+                help="List of ip pools"
+                     " for subnetpools creation"),
 ]
 
 network_feature_group = cfg.OptGroup(name='network-feature-enabled',
@@ -901,29 +935,32 @@
 ]
 
 
-data_processing_group = cfg.OptGroup(name="data_processing",
+data_processing_group = cfg.OptGroup(name="data-processing",
                                      title="Data Processing options")
 
 DataProcessingGroup = [
     cfg.StrOpt('catalog_type',
-               default='data_processing',
+               default='data-processing',
+               deprecated_group="data_processing",
                help="Catalog type of the data processing service."),
     cfg.StrOpt('endpoint_type',
                default='publicURL',
                choices=['public', 'admin', 'internal',
                         'publicURL', 'adminURL', 'internalURL'],
+               deprecated_group="data_processing",
                help="The endpoint type to use for the data processing "
                     "service."),
 ]
 
 
 data_processing_feature_group = cfg.OptGroup(
-    name="data_processing-feature-enabled",
+    name="data-processing-feature-enabled",
     title="Enabled Data Processing features")
 
 DataProcessingFeaturesGroup = [
     cfg.ListOpt('plugins',
                 default=["vanilla", "hdp"],
+                deprecated_group="data_processing-feature-enabled",
                 help="List of enabled data processing plugins")
 ]
 
@@ -1301,9 +1338,9 @@
         self.telemetry = _CONF.telemetry
         self.telemetry_feature_enabled = _CONF['telemetry-feature-enabled']
         self.dashboard = _CONF.dashboard
-        self.data_processing = _CONF.data_processing
+        self.data_processing = _CONF['data-processing']
         self.data_processing_feature_enabled = _CONF[
-            'data_processing-feature-enabled']
+            'data-processing-feature-enabled']
         self.boto = _CONF.boto
         self.stress = _CONF.stress
         self.scenario = _CONF.scenario
diff --git a/tempest/manager.py b/tempest/manager.py
index c39d3e5..6a003bc 100644
--- a/tempest/manager.py
+++ b/tempest/manager.py
@@ -47,8 +47,8 @@
         # Check if passed or default credentials are valid
         if not self.credentials.is_valid():
             raise exceptions.InvalidCredentials()
-        # Tenant isolation creates TestResources, but Accounts and some tests
-        # creates Credentials
+        # Tenant isolation creates TestResources, but
+        # PreProvisionedCredentialProvider and some tests create Credentials
         if isinstance(credentials, cred_provider.TestResources):
             creds = self.credentials.credentials
         else:
diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py
index fd84570..738282f 100644
--- a/tempest/scenario/manager.py
+++ b/tempest/scenario/manager.py
@@ -494,9 +494,23 @@
                                     stdout=subprocess.PIPE,
                                     stderr=subprocess.PIPE)
             proc.communicate()
+
             return (proc.returncode == 0) == should_succeed
 
-        return tempest.test.call_until_true(ping, timeout, 1)
+        caller = misc_utils.find_test_caller()
+        LOG.debug('%(caller)s begins to ping %(ip)s in %(timeout)s sec and the'
+                  ' expected result is %(should_succeed)s' % {
+                      'caller': caller, 'ip': ip_address, 'timeout': timeout,
+                      'should_succeed':
+                      'reachable' if should_succeed else 'unreachable'
+                  })
+        result = tempest.test.call_until_true(ping, timeout, 1)
+        LOG.debug('%(caller)s finishes ping %(ip)s in %(timeout)s sec and the '
+                  'ping result is %(result)s' % {
+                      'caller': caller, 'ip': ip_address, 'timeout': timeout,
+                      'result': 'expected' if result else 'unexpected'
+                  })
+        return result
 
     def check_vm_connectivity(self, ip_address,
                               username=None,
@@ -726,7 +740,7 @@
         return port
 
     def _get_server_port_id_and_ip4(self, server, ip_addr=None):
-        ports = self._list_ports(device_id=server['id'],
+        ports = self._list_ports(device_id=server['id'], status='ACTIVE',
                                  fixed_ip=ip_addr)
         # it might happen here that this port has more then one ip address
         # as in case of dual stack- when this port is created on 2 subnets
diff --git a/tempest/scenario/test_network_v6.py b/tempest/scenario/test_network_v6.py
index a9394cb..3df92cf 100644
--- a/tempest/scenario/test_network_v6.py
+++ b/tempest/scenario/test_network_v6.py
@@ -143,8 +143,9 @@
                  self._list_ports(device_id=sid,
                                   network_id=self.network_v6.id)]
         self.assertEqual(1, len(ports),
-                         message="Multiple IPv6 ports found on network %s"
-                         % self.network_v6)
+                         message=("Multiple IPv6 ports found on network %s. "
+                                  "ports: %s")
+                         % (self.network_v6, ports))
         mac6 = ports[0]
         ssh.turn_nic_on(ssh.get_nic_name(mac6))
 
diff --git a/tempest/scenario/test_volume_boot_pattern.py b/tempest/scenario/test_volume_boot_pattern.py
index ba419a6..d4bddc0 100644
--- a/tempest/scenario/test_volume_boot_pattern.py
+++ b/tempest/scenario/test_volume_boot_pattern.py
@@ -96,14 +96,6 @@
         vol_name = data_utils.rand_name('volume')
         return self.create_volume(name=vol_name, snapshot_id=snap_id)
 
-    def _stop_instances(self, instances):
-        # NOTE(gfidente): two loops so we do not wait for the status twice
-        for i in instances:
-            self.servers_client.stop_server(i['id'])
-        for i in instances:
-            waiters.wait_for_server_status(self.servers_client,
-                                           i['id'], 'SHUTOFF')
-
     def _ssh_to_server(self, server, keypair):
         if CONF.compute.use_floatingip_for_ssh:
             ip = self.create_floating_ip(server)['ip']
@@ -172,10 +164,6 @@
         ssh_client = self._ssh_to_server(instance_from_snapshot, keypair)
         self._check_content_of_written_file(ssh_client, text)
 
-        # NOTE(gfidente): ensure resources are in clean state for
-        # deletion operations to succeed
-        self._stop_instances([instance_2nd, instance_from_snapshot])
-
     @decorators.skip_because(bug='1489581')
     @test.idempotent_id('36c34c67-7b54-4b59-b188-02a2f458a63b')
     @test.services('compute', 'volume', 'image')
diff --git a/tempest/scenario/utils.py b/tempest/scenario/utils.py
index 2841060..63847c3 100644
--- a/tempest/scenario/utils.py
+++ b/tempest/scenario/utils.py
@@ -104,11 +104,11 @@
             'subnet': False,
             'dhcp': False,
         }
-        self.isolated_creds = credentials.get_isolated_credentials(
+        self.cred_provider = credentials.get_credentials_provider(
             name='InputScenarioUtils',
             identity_version=CONF.identity.auth_version,
             network_resources=network_resources)
-        os = clients.Manager(self.isolated_creds.get_primary_creds())
+        os = clients.Manager(self.cred_provider.get_primary_creds())
         self.images_client = os.images_client
         self.flavors_client = os.flavors_client
         self.image_pattern = CONF.input_scenario.image_regex
@@ -120,7 +120,7 @@
         return nname
 
     def clear_creds(self):
-        self.isolated_creds.clear_isolated_creds()
+        self.cred_provider.clear_creds()
 
     @property
     def scenario_images(self):
diff --git a/tempest/services/compute/json/agents_client.py b/tempest/services/compute/json/agents_client.py
deleted file mode 100644
index d38c8cd..0000000
--- a/tempest/services/compute/json/agents_client.py
+++ /dev/null
@@ -1,56 +0,0 @@
-# Copyright 2014 NEC Corporation.  All rights reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-from oslo_serialization import jsonutils as json
-from six.moves.urllib import parse as urllib
-
-from tempest.api_schema.response.compute.v2_1 import agents as schema
-from tempest.common import service_client
-
-
-class AgentsClient(service_client.ServiceClient):
-    """
-    Tests Agents API
-    """
-
-    def list_agents(self, **params):
-        """List all agent builds."""
-        url = 'os-agents'
-        if params:
-            url += '?%s' % urllib.urlencode(params)
-        resp, body = self.get(url)
-        body = json.loads(body)
-        self.validate_response(schema.list_agents, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def create_agent(self, **kwargs):
-        """Create an agent build."""
-        post_body = json.dumps({'agent': kwargs})
-        resp, body = self.post('os-agents', post_body)
-        body = json.loads(body)
-        self.validate_response(schema.create_agent, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def delete_agent(self, agent_id):
-        """Delete an existing agent build."""
-        resp, body = self.delete("os-agents/%s" % agent_id)
-        self.validate_response(schema.delete_agent, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def update_agent(self, agent_id, **kwargs):
-        """Update an agent build."""
-        put_body = json.dumps({'para': kwargs})
-        resp, body = self.put('os-agents/%s' % agent_id, put_body)
-        body = json.loads(body)
-        return service_client.ResponseBody(resp, body)
diff --git a/tempest/services/compute/json/aggregates_client.py b/tempest/services/compute/json/aggregates_client.py
deleted file mode 100644
index c9895db..0000000
--- a/tempest/services/compute/json/aggregates_client.py
+++ /dev/null
@@ -1,100 +0,0 @@
-# Copyright 2013 NEC Corporation.
-# All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-from oslo_serialization import jsonutils as json
-from tempest_lib import exceptions as lib_exc
-
-from tempest.api_schema.response.compute.v2_1 import aggregates as schema
-from tempest.common import service_client
-
-
-class AggregatesClient(service_client.ServiceClient):
-
-    def list_aggregates(self):
-        """Get aggregate list."""
-        resp, body = self.get("os-aggregates")
-        body = json.loads(body)
-        self.validate_response(schema.list_aggregates, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def show_aggregate(self, aggregate_id):
-        """Get details of the given aggregate."""
-        resp, body = self.get("os-aggregates/%s" % aggregate_id)
-        body = json.loads(body)
-        self.validate_response(schema.get_aggregate, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def create_aggregate(self, **kwargs):
-        """Creates a new aggregate."""
-        post_body = json.dumps({'aggregate': kwargs})
-        resp, body = self.post('os-aggregates', post_body)
-
-        body = json.loads(body)
-        self.validate_response(schema.create_aggregate, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def update_aggregate(self, aggregate_id, **kwargs):
-        """Update a aggregate."""
-        put_body = json.dumps({'aggregate': kwargs})
-        resp, body = self.put('os-aggregates/%s' % aggregate_id, put_body)
-
-        body = json.loads(body)
-        self.validate_response(schema.update_aggregate, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def delete_aggregate(self, aggregate_id):
-        """Deletes the given aggregate."""
-        resp, body = self.delete("os-aggregates/%s" % aggregate_id)
-        self.validate_response(schema.delete_aggregate, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def is_resource_deleted(self, id):
-        try:
-            self.show_aggregate(id)
-        except lib_exc.NotFound:
-            return True
-        return False
-
-    @property
-    def resource_type(self):
-        """Returns the primary type of resource this client works with."""
-        return 'aggregate'
-
-    def add_host(self, aggregate_id, **kwargs):
-        """Adds a host to the given aggregate."""
-        post_body = json.dumps({'add_host': kwargs})
-        resp, body = self.post('os-aggregates/%s/action' % aggregate_id,
-                               post_body)
-        body = json.loads(body)
-        self.validate_response(schema.aggregate_add_remove_host, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def remove_host(self, aggregate_id, **kwargs):
-        """Removes a host from the given aggregate."""
-        post_body = json.dumps({'remove_host': kwargs})
-        resp, body = self.post('os-aggregates/%s/action' % aggregate_id,
-                               post_body)
-        body = json.loads(body)
-        self.validate_response(schema.aggregate_add_remove_host, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def set_metadata(self, aggregate_id, **kwargs):
-        """Replaces the aggregate's existing metadata with new metadata."""
-        post_body = json.dumps({'set_metadata': kwargs})
-        resp, body = self.post('os-aggregates/%s/action' % aggregate_id,
-                               post_body)
-        body = json.loads(body)
-        self.validate_response(schema.aggregate_set_metadata, resp, body)
-        return service_client.ResponseBody(resp, body)
diff --git a/tempest/services/compute/json/availability_zone_client.py b/tempest/services/compute/json/availability_zone_client.py
deleted file mode 100644
index 0012637..0000000
--- a/tempest/services/compute/json/availability_zone_client.py
+++ /dev/null
@@ -1,35 +0,0 @@
-# Copyright 2013 NEC Corporation.
-# All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-from oslo_serialization import jsonutils as json
-
-from tempest.api_schema.response.compute.v2_1 import availability_zone \
-    as schema
-from tempest.common import service_client
-
-
-class AvailabilityZoneClient(service_client.ServiceClient):
-
-    def list_availability_zones(self, detail=False):
-        url = 'os-availability-zone'
-        schema_list = schema.list_availability_zone_list
-        if detail:
-            url += '/detail'
-            schema_list = schema.list_availability_zone_list_detail
-
-        resp, body = self.get(url)
-        body = json.loads(body)
-        self.validate_response(schema_list, resp, body)
-        return service_client.ResponseBody(resp, body)
diff --git a/tempest/services/compute/json/baremetal_nodes_client.py b/tempest/services/compute/json/baremetal_nodes_client.py
deleted file mode 100644
index 15f883a..0000000
--- a/tempest/services/compute/json/baremetal_nodes_client.py
+++ /dev/null
@@ -1,44 +0,0 @@
-# Copyright 2015 NEC Corporation.  All rights reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-from oslo_serialization import jsonutils as json
-from six.moves.urllib import parse as urllib
-
-from tempest.api_schema.response.compute.v2_1 import baremetal_nodes \
-    as schema
-from tempest.common import service_client
-
-
-class BaremetalNodesClient(service_client.ServiceClient):
-    """
-    Tests Baremetal API
-    """
-
-    def list_baremetal_nodes(self, **params):
-        """List all baremetal nodes."""
-        url = 'os-baremetal-nodes'
-        if params:
-            url += '?%s' % urllib.urlencode(params)
-        resp, body = self.get(url)
-        body = json.loads(body)
-        self.validate_response(schema.list_baremetal_nodes, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def show_baremetal_node(self, baremetal_node_id):
-        """Returns the details of a single baremetal node."""
-        url = 'os-baremetal-nodes/%s' % baremetal_node_id
-        resp, body = self.get(url)
-        body = json.loads(body)
-        self.validate_response(schema.get_baremetal_node, resp, body)
-        return service_client.ResponseBody(resp, body)
diff --git a/tempest/services/compute/json/certificates_client.py b/tempest/services/compute/json/certificates_client.py
deleted file mode 100644
index d6c72f4..0000000
--- a/tempest/services/compute/json/certificates_client.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright 2013 IBM Corp
-# All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-from oslo_serialization import jsonutils as json
-
-from tempest.api_schema.response.compute.v2_1 import certificates as schema
-from tempest.common import service_client
-
-
-class CertificatesClient(service_client.ServiceClient):
-
-    def show_certificate(self, certificate_id):
-        url = "os-certificates/%s" % certificate_id
-        resp, body = self.get(url)
-        body = json.loads(body)
-        self.validate_response(schema.get_certificate, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def create_certificate(self):
-        """create certificates."""
-        url = "os-certificates"
-        resp, body = self.post(url, None)
-        body = json.loads(body)
-        self.validate_response(schema.create_certificate, resp, body)
-        return service_client.ResponseBody(resp, body)
diff --git a/tempest/services/compute/json/extensions_client.py b/tempest/services/compute/json/extensions_client.py
deleted file mode 100644
index 4741812..0000000
--- a/tempest/services/compute/json/extensions_client.py
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright 2012 OpenStack Foundation
-# All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-from oslo_serialization import jsonutils as json
-
-from tempest.api_schema.response.compute.v2_1 import extensions as schema
-from tempest.common import service_client
-
-
-class ExtensionsClient(service_client.ServiceClient):
-
-    def list_extensions(self):
-        url = 'extensions'
-        resp, body = self.get(url)
-        body = json.loads(body)
-        self.validate_response(schema.list_extensions, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def show_extension(self, extension_alias):
-        resp, body = self.get('extensions/%s' % extension_alias)
-        body = json.loads(body)
-        return service_client.ResponseBody(resp, body)
diff --git a/tempest/services/compute/json/fixed_ips_client.py b/tempest/services/compute/json/fixed_ips_client.py
index 23401c3..7b374aa 100644
--- a/tempest/services/compute/json/fixed_ips_client.py
+++ b/tempest/services/compute/json/fixed_ips_client.py
@@ -32,5 +32,5 @@
         """This reserves and unreserves fixed ips."""
         url = "os-fixed-ips/%s/action" % fixed_ip
         resp, body = self.post(url, json.dumps(kwargs))
-        self.validate_response(schema.reserve_fixed_ip, resp, body)
-        return service_client.ResponseBody(resp)
+        self.validate_response(schema.reserve_unreserve_fixed_ip, resp, body)
+        return service_client.ResponseBody(resp, body)
diff --git a/tempest/services/compute/json/server_groups_client.py b/tempest/services/compute/json/server_groups_client.py
index 33501fb..62258d3 100644
--- a/tempest/services/compute/json/server_groups_client.py
+++ b/tempest/services/compute/json/server_groups_client.py
@@ -22,18 +22,13 @@
 
 class ServerGroupsClient(service_client.ServiceClient):
 
-    def create_server_group(self, name, policies):
+    def create_server_group(self, **kwargs):
         """
         Create the server group
         name : Name of the server-group
         policies : List of the policies - affinity/anti-affinity)
         """
-        post_body = {
-            'name': name,
-            'policies': policies,
-        }
-
-        post_body = json.dumps({'server_group': post_body})
+        post_body = json.dumps({'server_group': kwargs})
         resp, body = self.post('os-server-groups', post_body)
 
         body = json.loads(body)
diff --git a/tempest/services/compute/json/services_client.py b/tempest/services/compute/json/services_client.py
index 232b301..6e2f320 100644
--- a/tempest/services/compute/json/services_client.py
+++ b/tempest/services/compute/json/services_client.py
@@ -33,25 +33,26 @@
         self.validate_response(schema.list_services, resp, body)
         return service_client.ResponseBody(resp, body)
 
-    def enable_service(self, host_name, binary):
+    def enable_service(self, **kwargs):
         """
         Enable service on a host
         host_name: Name of host
         binary: Service binary
         """
-        post_body = json.dumps({'binary': binary, 'host': host_name})
+        post_body = json.dumps(kwargs)
         resp, body = self.put('os-services/enable', post_body)
         body = json.loads(body)
-        self.validate_response(schema.enable_service, resp, body)
+        self.validate_response(schema.enable_disable_service, resp, body)
         return service_client.ResponseBody(resp, body)
 
-    def disable_service(self, host_name, binary):
+    def disable_service(self, **kwargs):
         """
         Disable service on a host
         host_name: Name of host
         binary: Service binary
         """
-        post_body = json.dumps({'binary': binary, 'host': host_name})
+        post_body = json.dumps(kwargs)
         resp, body = self.put('os-services/disable', post_body)
         body = json.loads(body)
+        self.validate_response(schema.enable_disable_service, resp, body)
         return service_client.ResponseBody(resp, body)
diff --git a/tempest/services/compute/json/volumes_extensions_client.py b/tempest/services/compute/json/volumes_client.py
similarity index 97%
rename from tempest/services/compute/json/volumes_extensions_client.py
rename to tempest/services/compute/json/volumes_client.py
index db92351..e799c29 100644
--- a/tempest/services/compute/json/volumes_extensions_client.py
+++ b/tempest/services/compute/json/volumes_client.py
@@ -21,7 +21,7 @@
 from tempest.common import service_client
 
 
-class VolumesExtensionsClient(service_client.ServiceClient):
+class VolumesClient(service_client.ServiceClient):
 
     def list_volumes(self, detail=False, **params):
         """List all the volumes created."""
diff --git a/tempest/services/image/v2/json/image_client.py b/tempest/services/image/v2/json/image_client.py
index 6cad746..eea179d 100644
--- a/tempest/services/image/v2/json/image_client.py
+++ b/tempest/services/image/v2/json/image_client.py
@@ -212,3 +212,63 @@
         self.expected_success(200, resp.status)
         body = json.loads(body)
         return service_client.ResponseBody(resp, body)
+
+    def list_resource_types(self):
+        url = '/v2/metadefs/resource_types'
+        resp, body = self.get(url)
+        self.expected_success(200, resp.status)
+        body = json.loads(body)
+        return service_client.ResponseBody(resp, body)
+
+    def create_namespaces(self, namespace, **kwargs):
+        params = {
+            "namespace": namespace,
+        }
+
+        for option in kwargs:
+            value = kwargs.get(option)
+            if isinstance(value, dict) or isinstance(value, tuple):
+                params.update(value)
+            else:
+                params[option] = value
+
+        data = json.dumps(params)
+        self._validate_schema(data)
+
+        resp, body = self.post('/v2/metadefs/namespaces', data)
+        self.expected_success(201, resp.status)
+        body = json.loads(body)
+        return service_client.ResponseBody(resp, body)
+
+    def show_namespaces(self, namespace):
+        url = '/v2/metadefs/namespaces/%s' % namespace
+        resp, body = self.get(url)
+        self.expected_success(200, resp.status)
+        body = json.loads(body)
+        return service_client.ResponseBody(resp, body)
+
+    def update_namespaces(self, namespace, visibility, **kwargs):
+        params = {
+            "namespace": namespace,
+            "visibility": visibility
+        }
+        for option in kwargs:
+            value = kwargs.get(option)
+            if isinstance(value, dict) or isinstance(value, tuple):
+                params.update(value)
+            else:
+                params[option] = value
+
+        data = json.dumps(params)
+        self._validate_schema(data)
+        url = '/v2/metadefs/namespaces/%s' % namespace
+        resp, body = self.put(url, body=data)
+        self.expected_success(200, resp.status)
+        body = json.loads(body)
+        return service_client.ResponseBody(resp, body)
+
+    def delete_namespaces(self, namespace):
+        url = '/v2/metadefs/namespaces/%s' % namespace
+        resp, _ = self.delete(url)
+        self.expected_success(204, resp.status)
+        return service_client.ResponseBody(resp)
diff --git a/tempest/services/network/json/network_client.py b/tempest/services/network/json/network_client.py
index 10bd23e..d766aa5 100644
--- a/tempest/services/network/json/network_client.py
+++ b/tempest/services/network/json/network_client.py
@@ -423,3 +423,25 @@
         post_body = {'network_id': network_id}
         uri = '/agents/%s/dhcp-networks' % agent_id
         return self.create_resource(uri, post_body)
+
+    def list_subnetpools(self, **filters):
+        uri = '/subnetpools'
+        return self.list_resources(uri, **filters)
+
+    def create_subnetpools(self, **kwargs):
+        uri = '/subnetpools'
+        post_data = {'subnetpool': kwargs}
+        return self.create_resource(uri, post_data)
+
+    def show_subnetpools(self, subnetpool_id, **fields):
+        uri = '/subnetpools/%s' % subnetpool_id
+        return self.show_resource(uri, **fields)
+
+    def update_subnetpools(self, subnetpool_id, **kwargs):
+        uri = '/subnetpools/%s' % subnetpool_id
+        post_data = {'subnetpool': kwargs}
+        return self.update_resource(uri, post_data)
+
+    def delete_subnetpools(self, subnetpool_id):
+        uri = '/subnetpools/%s' % subnetpool_id
+        return self.delete_resource(uri)
diff --git a/tempest/test.py b/tempest/test.py
index 142488c..490ee82 100644
--- a/tempest/test.py
+++ b/tempest/test.py
@@ -224,7 +224,7 @@
     Tear-down is also split in a series of steps (teardown stages), which are
     stacked for execution only if the corresponding setup stage had been
     reached during the setup phase. Tear-down stages are:
-    - clear_isolated_creds (defined in the base test class)
+    - clear_credentials (defined in the base test class)
     - resource_cleanup
     """
 
@@ -258,7 +258,7 @@
         cls.skip_checks()
         try:
             # Allocation of all required credentials and client managers
-            cls.teardowns.append(('credentials', cls.clear_isolated_creds))
+            cls.teardowns.append(('credentials', cls.clear_credentials))
             cls.setup_credentials()
             # Shortcuts to clients
             cls.setup_clients()
@@ -467,7 +467,7 @@
             identity_version = getattr(cls, 'identity_version', None)
             identity_version = identity_version or CONF.identity.auth_version
 
-            cls._creds_provider = credentials.get_isolated_credentials(
+            cls._creds_provider = credentials.get_credentials_provider(
                 name=cls.__name__, network_resources=cls.network_resources,
                 force_tenant_isolation=force_tenant_isolation,
                 identity_version=identity_version)
@@ -515,12 +515,12 @@
         return clients.Manager(credentials=creds, service=cls._service)
 
     @classmethod
-    def clear_isolated_creds(cls):
+    def clear_credentials(cls):
         """
-        Clears isolated creds if set
+        Clears creds if set
         """
         if hasattr(cls, '_creds_provider'):
-            cls._creds_provider.clear_isolated_creds()
+            cls._creds_provider.clear_creds()
 
     @classmethod
     def set_validation_resources(cls, keypair=None, floating_ip=None,
@@ -589,7 +589,7 @@
 
         :return: network dict including 'id' and 'name'
         """
-        # Make sure isolated_creds exists and get a network client
+        # Make sure cred_provider exists and get a network client
         networks_client = cls.get_client_manager().compute_networks_client
         cred_provider = cls._get_credentials_provider()
         # In case of nova network, isolated tenants are not able to list the
diff --git a/tempest/test_discover/plugins.py b/tempest/test_discover/plugins.py
index 640b004..58a9905 100644
--- a/tempest/test_discover/plugins.py
+++ b/tempest/test_discover/plugins.py
@@ -88,7 +88,11 @@
 
     def register_plugin_opts(self, conf):
         for plug in self.ext_plugins:
-            plug.obj.register_opts(conf)
+            try:
+                plug.obj.register_opts(conf)
+            except Exception:
+                LOG.exception('Plugin %s raised an exception trying to run '
+                              'register_opts' % plug.name)
 
     def get_plugin_options_list(self):
         plugin_options = []
diff --git a/tempest/tests/cmd/test_tempest_init.py b/tempest/tests/cmd/test_tempest_init.py
index 6b5af7e..2b868be 100644
--- a/tempest/tests/cmd/test_tempest_init.py
+++ b/tempest/tests/cmd/test_tempest_init.py
@@ -12,6 +12,7 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
+# import mock
 import os
 
 import fixtures
@@ -39,9 +40,19 @@
         self.addCleanup(conf_file.close)
         self.assertEqual(conf_file.read(), testr_conf_file)
 
+    def test_create_working_dir_with_existing_local_dir(self):
+        fake_local_dir = self.useFixture(fixtures.TempDir())
+        fake_local_conf_dir = self.useFixture(fixtures.TempDir())
+        _init = init.TempestInit(None, None)
+        self.assertRaises(OSError,
+                          _init.create_working_dir,
+                          fake_local_dir.path,
+                          fake_local_conf_dir.path)
+
     def test_create_working_dir(self):
         fake_local_dir = self.useFixture(fixtures.TempDir())
         fake_local_conf_dir = self.useFixture(fixtures.TempDir())
+        os.rmdir(fake_local_dir.path)
         # Create a fake conf file
         fake_file = fake_local_conf_dir.join('conf_file.conf')
         open(fake_file, 'w').close()
diff --git a/tempest/tests/common/test_admin_available.py b/tempest/tests/common/test_admin_available.py
index 5c69c5e..8490c4d 100644
--- a/tempest/tests/common/test_admin_available.py
+++ b/tempest/tests/common/test_admin_available.py
@@ -30,7 +30,7 @@
 
     def run_test(self, tenant_isolation, use_accounts_file, admin_creds):
 
-        cfg.CONF.set_default('allow_tenant_isolation',
+        cfg.CONF.set_default('use_dynamic_credentials',
                              tenant_isolation, group='auth')
         if use_accounts_file:
             accounts = [{'username': 'u1',
@@ -50,7 +50,7 @@
                                  'password': 'p',
                                  'types': ['admin']})
             self.useFixture(mockpatch.Patch(
-                'tempest.common.accounts.read_accounts_yaml',
+                'tempest.common.preprov_creds.read_accounts_yaml',
                 return_value=accounts))
             cfg.CONF.set_default('test_accounts_file',
                                  use_accounts_file, group='auth')
@@ -64,9 +64,9 @@
             else:
                 (u, t, p) = (None, None, None)
 
-            cfg.CONF.set_default('admin_username', u, group='identity')
-            cfg.CONF.set_default('admin_tenant_name', t, group='identity')
-            cfg.CONF.set_default('admin_password', p, group='identity')
+            cfg.CONF.set_default('admin_username', u, group='auth')
+            cfg.CONF.set_default('admin_tenant_name', t, group='auth')
+            cfg.CONF.set_default('admin_password', p, group='auth')
 
         expected = admin_creds is not None or tenant_isolation
         observed = credentials.is_admin_available()
diff --git a/tempest/tests/common/test_cred_provider.py b/tempest/tests/common/test_cred_provider.py
index 1bc7147..d404660 100644
--- a/tempest/tests/common/test_cred_provider.py
+++ b/tempest/tests/common/test_cred_provider.py
@@ -123,5 +123,9 @@
         cfg.CONF.set_default('auth_version', 'v3', group='identity')
         # Identity group items
         for prefix in ['', 'alt_', 'admin_']:
+            if prefix == 'admin_':
+                group = 'auth'
+            else:
+                group = 'identity'
             cfg.CONF.set_default(prefix + 'domain_name', 'fake_domain_name',
-                                 group='identity')
+                                 group=group)
diff --git a/tempest/tests/common/test_accounts.py b/tempest/tests/common/test_preprov_creds.py
similarity index 82%
rename from tempest/tests/common/test_accounts.py
rename to tempest/tests/common/test_preprov_creds.py
index 9bf8059..cb7240b 100644
--- a/tempest/tests/common/test_accounts.py
+++ b/tempest/tests/common/test_preprov_creds.py
@@ -24,8 +24,8 @@
 from tempest_lib import auth
 from tempest_lib.services.identity.v2 import token_client
 
-from tempest.common import accounts
 from tempest.common import cred_provider
+from tempest.common import preprov_creds
 from tempest import config
 from tempest import exceptions
 from tempest.tests import base
@@ -34,10 +34,10 @@
 from tempest.tests import fake_identity
 
 
-class TestAccount(base.TestCase):
+class TestPreProvisionedCredentials(base.TestCase):
 
     def setUp(self):
-        super(TestAccount, self).setUp()
+        super(TestPreProvisionedCredentials, self).setUp()
         self.useFixture(fake_config.ConfigFixture())
         self.stubs.Set(config, 'TempestConfigPrivate', fake_config.FakePrivate)
         self.fake_http = fake_http.fake_httplib2(return_type=200)
@@ -71,7 +71,7 @@
              'password': 'p', 'roles': [cfg.CONF.identity.admin_role]},
         ]
         self.accounts_mock = self.useFixture(mockpatch.Patch(
-            'tempest.common.accounts.read_accounts_yaml',
+            'tempest.common.preprov_creds.read_accounts_yaml',
             return_value=self.test_accounts))
         cfg.CONF.set_default('test_accounts_file', 'fake_path', group='auth')
         self.useFixture(mockpatch.Patch('os.path.isfile', return_value=True))
@@ -88,7 +88,8 @@
     def test_get_hash(self):
         self.stubs.Set(token_client.TokenClient, 'raw_request',
                        fake_identity._fake_v2_response)
-        test_account_class = accounts.Accounts('v2', 'test_name')
+        test_account_class = preprov_creds.PreProvisionedCredentialProvider(
+            'v2', 'test_name')
         hash_list = self._get_hash_list(self.test_accounts)
         test_cred_dict = self.test_accounts[3]
         test_creds = auth.get_credentials(fake_identity.FAKE_AUTH_URL,
@@ -97,7 +98,8 @@
         self.assertEqual(hash_list[3], results)
 
     def test_get_hash_dict(self):
-        test_account_class = accounts.Accounts('v2', 'test_name')
+        test_account_class = preprov_creds.PreProvisionedCredentialProvider(
+            'v2', 'test_name')
         hash_dict = test_account_class.get_hash_dict(self.test_accounts)
         hash_list = self._get_hash_list(self.test_accounts)
         for hash in hash_list:
@@ -109,7 +111,9 @@
         self.useFixture(mockpatch.Patch('os.path.isfile', return_value=True))
         with mock.patch('six.moves.builtins.open', mock.mock_open(),
                         create=True):
-            test_account_class = accounts.Accounts('v2', 'test_name')
+            test_account_class = (
+                preprov_creds.PreProvisionedCredentialProvider(
+                    'v2', 'test_name'))
             res = test_account_class._create_hash_file('12345')
         self.assertFalse(res, "_create_hash_file should return False if the "
                          "pseudo-lock file already exists")
@@ -119,7 +123,9 @@
         self.useFixture(mockpatch.Patch('os.path.isfile', return_value=False))
         with mock.patch('six.moves.builtins.open', mock.mock_open(),
                         create=True):
-            test_account_class = accounts.Accounts('v2', 'test_name')
+            test_account_class = (
+                preprov_creds.PreProvisionedCredentialProvider(
+                    'v2', 'test_name'))
             res = test_account_class._create_hash_file('12345')
         self.assertTrue(res, "_create_hash_file should return True if the "
                         "pseudo-lock doesn't already exist")
@@ -131,16 +137,16 @@
         hash_list = self._get_hash_list(self.test_accounts)
         mkdir_mock = self.useFixture(mockpatch.Patch('os.mkdir'))
         self.useFixture(mockpatch.Patch('os.path.isfile', return_value=False))
-        test_account_class = accounts.Accounts('v2', 'test_name')
+        test_account_class = preprov_creds.PreProvisionedCredentialProvider(
+            'v2', 'test_name')
         with mock.patch('six.moves.builtins.open', mock.mock_open(),
                         create=True) as open_mock:
             test_account_class._get_free_hash(hash_list)
-            lock_path = os.path.join(lockutils.get_lock_path(accounts.CONF),
-                                     'test_accounts',
-                                     hash_list[0])
+            lock_path = os.path.join(lockutils.get_lock_path(
+                preprov_creds.CONF), 'test_accounts', hash_list[0])
             open_mock.assert_called_once_with(lock_path, 'w')
-        mkdir_path = os.path.join(accounts.CONF.oslo_concurrency.lock_path,
-                                  'test_accounts')
+        mkdir_path = os.path.join(
+            preprov_creds.CONF.oslo_concurrency.lock_path, 'test_accounts')
         mkdir_mock.mock.assert_called_once_with(mkdir_path)
 
     @mock.patch('oslo_concurrency.lockutils.lock')
@@ -150,7 +156,8 @@
         self.useFixture(mockpatch.Patch('os.path.isdir', return_value=True))
         # Emulate all lcoks in list are in use
         self.useFixture(mockpatch.Patch('os.path.isfile', return_value=True))
-        test_account_class = accounts.Accounts('v2', 'test_name')
+        test_account_class = preprov_creds.PreProvisionedCredentialProvider(
+            'v2', 'test_name')
         with mock.patch('six.moves.builtins.open', mock.mock_open(),
                         create=True):
             self.assertRaises(exceptions.InvalidConfiguration,
@@ -161,7 +168,8 @@
         # Emulate no pre-existing lock
         self.useFixture(mockpatch.Patch('os.path.isdir', return_value=True))
         hash_list = self._get_hash_list(self.test_accounts)
-        test_account_class = accounts.Accounts('v2', 'test_name')
+        test_account_class = preprov_creds.PreProvisionedCredentialProvider(
+            'v2', 'test_name')
 
         def _fake_is_file(path):
             # Fake isfile() to return that the path exists unless a specific
@@ -174,9 +182,9 @@
         with mock.patch('six.moves.builtins.open', mock.mock_open(),
                         create=True) as open_mock:
             test_account_class._get_free_hash(hash_list)
-            lock_path = os.path.join(lockutils.get_lock_path(accounts.CONF),
-                                     'test_accounts',
-                                     hash_list[3])
+            lock_path = os.path.join(
+                lockutils.get_lock_path(preprov_creds.CONF),
+                'test_accounts', hash_list[3])
             open_mock.assert_has_calls([mock.call(lock_path, 'w')])
 
     @mock.patch('oslo_concurrency.lockutils.lock')
@@ -186,14 +194,15 @@
         self.useFixture(mockpatch.Patch('os.path.isfile', return_value=True))
         # Pretend the lock dir is empty
         self.useFixture(mockpatch.Patch('os.listdir', return_value=[]))
-        test_account_class = accounts.Accounts('v2', 'test_name')
+        test_account_class = preprov_creds.PreProvisionedCredentialProvider(
+            'v2', 'test_name')
         remove_mock = self.useFixture(mockpatch.Patch('os.remove'))
         rmdir_mock = self.useFixture(mockpatch.Patch('os.rmdir'))
         test_account_class.remove_hash(hash_list[2])
-        hash_path = os.path.join(lockutils.get_lock_path(accounts.CONF),
+        hash_path = os.path.join(lockutils.get_lock_path(preprov_creds.CONF),
                                  'test_accounts',
                                  hash_list[2])
-        lock_path = os.path.join(accounts.CONF.oslo_concurrency.lock_path,
+        lock_path = os.path.join(preprov_creds.CONF.oslo_concurrency.lock_path,
                                  'test_accounts')
         remove_mock.mock.assert_called_once_with(hash_path)
         rmdir_mock.mock.assert_called_once_with(lock_path)
@@ -206,33 +215,37 @@
         # Pretend the lock dir is empty
         self.useFixture(mockpatch.Patch('os.listdir', return_value=[
             hash_list[1], hash_list[4]]))
-        test_account_class = accounts.Accounts('v2', 'test_name')
+        test_account_class = preprov_creds.PreProvisionedCredentialProvider(
+            'v2', 'test_name')
         remove_mock = self.useFixture(mockpatch.Patch('os.remove'))
         rmdir_mock = self.useFixture(mockpatch.Patch('os.rmdir'))
         test_account_class.remove_hash(hash_list[2])
-        hash_path = os.path.join(lockutils.get_lock_path(accounts.CONF),
+        hash_path = os.path.join(lockutils.get_lock_path(preprov_creds.CONF),
                                  'test_accounts',
                                  hash_list[2])
         remove_mock.mock.assert_called_once_with(hash_path)
         rmdir_mock.mock.assert_not_called()
 
     def test_is_multi_user(self):
-        test_accounts_class = accounts.Accounts('v2', 'test_name')
+        test_accounts_class = preprov_creds.PreProvisionedCredentialProvider(
+            'v2', 'test_name')
         self.assertTrue(test_accounts_class.is_multi_user())
 
     def test_is_not_multi_user(self):
         self.test_accounts = [self.test_accounts[0]]
         self.useFixture(mockpatch.Patch(
-            'tempest.common.accounts.read_accounts_yaml',
+            'tempest.common.preprov_creds.read_accounts_yaml',
             return_value=self.test_accounts))
-        test_accounts_class = accounts.Accounts('v2', 'test_name')
+        test_accounts_class = preprov_creds.PreProvisionedCredentialProvider(
+            'v2', 'test_name')
         self.assertFalse(test_accounts_class.is_multi_user())
 
     def test__get_creds_by_roles_one_role(self):
         self.useFixture(mockpatch.Patch(
-            'tempest.common.accounts.read_accounts_yaml',
+            'tempest.common.preprov_creds.read_accounts_yaml',
             return_value=self.test_accounts))
-        test_accounts_class = accounts.Accounts('v2', 'test_name')
+        test_accounts_class = preprov_creds.PreProvisionedCredentialProvider(
+            'v2', 'test_name')
         hashes = test_accounts_class.hash_dict['roles']['role4']
         temp_hash = hashes[0]
         get_free_hash_mock = self.useFixture(mockpatch.PatchObject(
@@ -247,9 +260,10 @@
 
     def test__get_creds_by_roles_list_role(self):
         self.useFixture(mockpatch.Patch(
-            'tempest.common.accounts.read_accounts_yaml',
+            'tempest.common.preprov_creds.read_accounts_yaml',
             return_value=self.test_accounts))
-        test_accounts_class = accounts.Accounts('v2', 'test_name')
+        test_accounts_class = preprov_creds.PreProvisionedCredentialProvider(
+            'v2', 'test_name')
         hashes = test_accounts_class.hash_dict['roles']['role4']
         hashes2 = test_accounts_class.hash_dict['roles']['role2']
         hashes = list(set(hashes) & set(hashes2))
@@ -266,9 +280,10 @@
 
     def test__get_creds_by_roles_no_admin(self):
         self.useFixture(mockpatch.Patch(
-            'tempest.common.accounts.read_accounts_yaml',
+            'tempest.common.preprov_creds.read_accounts_yaml',
             return_value=self.test_accounts))
-        test_accounts_class = accounts.Accounts('v2', 'test_name')
+        test_accounts_class = preprov_creds.PreProvisionedCredentialProvider(
+            'v2', 'test_name')
         hashes = list(test_accounts_class.hash_dict['creds'].keys())
         admin_hashes = test_accounts_class.hash_dict['roles'][
             cfg.CONF.identity.admin_role]
@@ -292,9 +307,10 @@
              'password': 'p', 'roles': ['role-7', 'role-11'],
              'resources': {'network': 'network-2'}}]
         self.useFixture(mockpatch.Patch(
-            'tempest.common.accounts.read_accounts_yaml',
+            'tempest.common.preprov_creds.read_accounts_yaml',
             return_value=test_accounts))
-        test_accounts_class = accounts.Accounts('v2', 'test_name')
+        test_accounts_class = preprov_creds.PreProvisionedCredentialProvider(
+            'v2', 'test_name')
         with mock.patch('tempest.services.compute.json.networks_client.'
                         'NetworksClient.list_networks',
                         return_value={'networks': [{'name': 'network-2',
@@ -326,13 +342,14 @@
              'password': 'p'},
         ]
         self.useFixture(mockpatch.Patch(
-            'tempest.common.accounts.read_accounts_yaml',
+            'tempest.common.preprov_creds.read_accounts_yaml',
             return_value=self.test_accounts))
         cfg.CONF.set_default('test_accounts_file', '', group='auth')
         self.useFixture(mockpatch.Patch('os.path.isfile', return_value=True))
 
     def test_get_creds_roles_nonlocking_invalid(self):
-        test_accounts_class = accounts.NotLockingAccounts('v2', 'test_name')
+        test_accounts_class = preprov_creds.NonLockingCredentialProvider(
+            'v2', 'test_name')
         self.assertRaises(exceptions.InvalidConfiguration,
                           test_accounts_class.get_creds_by_roles,
                           ['fake_role'])
diff --git a/tempest/tests/common/test_service_clients.py b/tempest/tests/common/test_service_clients.py
index 00b8470..4225da8 100644
--- a/tempest/tests/common/test_service_clients.py
+++ b/tempest/tests/common/test_service_clients.py
@@ -17,37 +17,15 @@
 import six
 
 from tempest.services.baremetal.v1.json import baremetal_client
-from tempest.services.compute.json import agents_client
-from tempest.services.compute.json import aggregates_client
-from tempest.services.compute.json import availability_zone_client
-from tempest.services.compute.json import certificates_client
-from tempest.services.compute.json import extensions_client
-from tempest.services.compute.json import fixed_ips_client
-from tempest.services.compute.json import flavors_client
-from tempest.services.compute.json import floating_ip_pools_client
-from tempest.services.compute.json import floating_ips_bulk_client
 from tempest.services.compute.json import floating_ips_client
-from tempest.services.compute.json import hosts_client
-from tempest.services.compute.json import hypervisor_client
-from tempest.services.compute.json import images_client
-from tempest.services.compute.json import instance_usage_audit_log_client
 from tempest.services.compute.json import interfaces_client
-from tempest.services.compute.json import keypairs_client
-from tempest.services.compute.json import limits_client
-from tempest.services.compute.json import migrations_client
-from tempest.services.compute.json import networks_client as nova_net_client
 from tempest.services.compute.json import quota_classes_client
-from tempest.services.compute.json import quotas_client
-from tempest.services.compute.json import security_group_default_rules_client \
-    as nova_secgrop_default_client
 from tempest.services.compute.json import security_group_rules_client
-from tempest.services.compute.json import security_groups_client
 from tempest.services.compute.json import server_groups_client
 from tempest.services.compute.json import servers_client
 from tempest.services.compute.json import services_client
-from tempest.services.compute.json import tenant_usages_client
-from tempest.services.compute.json import volumes_extensions_client \
-    as compute_volumes_extensions_client
+from tempest.services.compute.json import volumes_client \
+    as compute_volumes_client
 from tempest.services.data_processing.v1_1 import data_processing_client
 from tempest.services.database.json import flavors_client as db_flavor_client
 from tempest.services.database.json import versions_client as db_version_client
@@ -109,35 +87,14 @@
     def test_service_client_creations_with_specified_args(self, mock_init):
         test_clients = [
             baremetal_client.BaremetalClient,
-            agents_client.AgentsClient,
-            aggregates_client.AggregatesClient,
-            availability_zone_client.AvailabilityZoneClient,
-            certificates_client.CertificatesClient,
-            extensions_client.ExtensionsClient,
-            fixed_ips_client.FixedIPsClient,
-            flavors_client.FlavorsClient,
-            floating_ip_pools_client.FloatingIPPoolsClient,
-            floating_ips_bulk_client.FloatingIPsBulkClient,
             floating_ips_client.FloatingIPsClient,
-            hosts_client.HostsClient,
-            hypervisor_client.HypervisorClient,
-            images_client.ImagesClient,
-            instance_usage_audit_log_client.InstanceUsagesAuditLogClient,
             interfaces_client.InterfacesClient,
-            keypairs_client.KeyPairsClient,
-            limits_client.LimitsClient,
-            migrations_client.MigrationsClient,
-            nova_net_client.NetworksClient,
-            quotas_client.QuotasClient,
             quota_classes_client.QuotaClassesClient,
-            nova_secgrop_default_client.SecurityGroupDefaultRulesClient,
             security_group_rules_client.SecurityGroupRulesClient,
-            security_groups_client.SecurityGroupsClient,
             server_groups_client.ServerGroupsClient,
             servers_client.ServersClient,
             services_client.ServicesClient,
-            tenant_usages_client.TenantUsagesClient,
-            compute_volumes_extensions_client.VolumesExtensionsClient,
+            compute_volumes_client.VolumesClient,
             data_processing_client.DataProcessingClient,
             db_flavor_client.DatabaseFlavorsClient,
             db_version_client.DatabaseVersionsClient,
diff --git a/tempest/tests/fake_config.py b/tempest/tests/fake_config.py
index 4898c9c..ca8bc3e 100644
--- a/tempest/tests/fake_config.py
+++ b/tempest/tests/fake_config.py
@@ -48,9 +48,13 @@
         for config_option in ['username', 'password', 'tenant_name']:
             # Identity group items
             for prefix in ['', 'alt_', 'admin_']:
+                if prefix == 'admin_':
+                    group = 'auth'
+                else:
+                    group = 'identity'
                 self.conf.set_default(prefix + config_option,
                                       'fake_' + config_option,
-                                      group='identity')
+                                      group=group)
 
 
 class FakePrivate(config.TempestConfigPrivate):
diff --git a/tempest/tests/services/compute/test_agents_client.py b/tempest/tests/services/compute/test_agents_client.py
deleted file mode 100644
index 31e576e..0000000
--- a/tempest/tests/services/compute/test_agents_client.py
+++ /dev/null
@@ -1,109 +0,0 @@
-# Copyright 2015 NEC Corporation.  All rights reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-from tempest_lib.tests import fake_auth_provider
-
-from tempest.services.compute.json import agents_client
-from tempest.tests.services.compute import base
-
-
-class TestAgentsClient(base.BaseComputeServiceTest):
-    FAKE_CREATE_AGENT = {
-        "agent":
-        {
-            "url": "http://foo.com",
-            "hypervisor": "kvm",
-            "md5hash": "md5",
-            "version": "2",
-            "architecture": "x86_64",
-            "os": "linux",
-            "agent_id": 1
-        }
-    }
-
-    FAKE_UPDATE_AGENT = {
-        "agent":
-        {
-            "url": "http://foo.com",
-            "hypervisor": "kvm",
-            "md5hash": "md5",
-            "version": "2",
-            "architecture": "x86_64",
-            "os": "linux",
-            "agent_id": 1
-        }
-    }
-
-    def setUp(self):
-        super(TestAgentsClient, self).setUp()
-        fake_auth = fake_auth_provider.FakeAuthProvider()
-        self.client = agents_client.AgentsClient(fake_auth,
-                                                 'compute', 'regionOne')
-
-    def _test_list_agents(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.list_agents,
-            'tempest.common.service_client.ServiceClient.get',
-            {"agents": []},
-            bytes_body)
-        self.check_service_client_function(
-            self.client.list_agents,
-            'tempest.common.service_client.ServiceClient.get',
-            {"agents": []},
-            bytes_body,
-            hypervisor="kvm")
-
-    def _test_create_agent(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.create_agent,
-            'tempest.common.service_client.ServiceClient.post',
-            self.FAKE_CREATE_AGENT,
-            bytes_body,
-            url="http://foo.com", hypervisor="kvm", md5hash="md5",
-            version="2", architecture="x86_64", os="linux")
-
-    def _test_delete_agent(self):
-        self.check_service_client_function(
-            self.client.delete_agent,
-            'tempest.common.service_client.ServiceClient.delete',
-            {}, agent_id="1")
-
-    def _test_update_agent(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.update_agent,
-            'tempest.common.service_client.ServiceClient.put',
-            self.FAKE_UPDATE_AGENT,
-            bytes_body,
-            agent_id="1", url="http://foo.com", md5hash="md5", version="2")
-
-    def test_list_agents_with_str_body(self):
-        self._test_list_agents()
-
-    def test_list_agents_with_bytes_body(self):
-        self._test_list_agents(bytes_body=True)
-
-    def test_create_agent_with_str_body(self):
-        self._test_create_agent()
-
-    def test_create_agent_with_bytes_body(self):
-        self._test_create_agent(bytes_body=True)
-
-    def test_delete_agent(self):
-        self._test_delete_agent()
-
-    def test_update_agent_with_str_body(self):
-        self._test_update_agent()
-
-    def test_update_agent_with_bytes_body(self):
-        self._test_update_agent(bytes_body=True)
diff --git a/tempest/tests/services/compute/test_aggregates_client.py b/tempest/tests/services/compute/test_aggregates_client.py
deleted file mode 100644
index e92b76b..0000000
--- a/tempest/tests/services/compute/test_aggregates_client.py
+++ /dev/null
@@ -1,131 +0,0 @@
-# Copyright 2015 NEC Corporation.  All rights reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-from tempest_lib.tests import fake_auth_provider
-
-from tempest.services.compute.json import aggregates_client
-from tempest.tests.services.compute import base
-
-
-class TestAggregatesClient(base.BaseComputeServiceTest):
-    FAKE_SHOW_AGGREGATE = {
-        "aggregate":
-        {
-            "name": "hoge",
-            "availability_zone": None,
-            "deleted": False,
-            "created_at":
-            "2015-07-16T03:07:32.000000",
-            "updated_at": None,
-            "hosts": [],
-            "deleted_at": None,
-            "id": 1,
-            "metadata": {}
-        }
-    }
-
-    FAKE_CREATE_AGGREGATE = {
-        "aggregate":
-        {
-            "name": u'\xf4',
-            "availability_zone": None,
-            "deleted": False,
-            "created_at": "2015-07-21T04:11:18.000000",
-            "updated_at": None,
-            "deleted_at": None,
-            "id": 1
-        }
-    }
-
-    FAKE_UPDATE_AGGREGATE = {
-        "aggregate":
-        {
-            "name": u'\xe9',
-            "availability_zone": None,
-            "deleted": False,
-            "created_at": "2015-07-16T03:07:32.000000",
-            "updated_at": "2015-07-23T05:16:29.000000",
-            "hosts": [],
-            "deleted_at": None,
-            "id": 1,
-            "metadata": {}
-        }
-    }
-
-    def setUp(self):
-        super(TestAggregatesClient, self).setUp()
-        fake_auth = fake_auth_provider.FakeAuthProvider()
-        self.client = aggregates_client.AggregatesClient(
-            fake_auth, 'compute', 'regionOne')
-
-    def _test_list_aggregates(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.list_aggregates,
-            'tempest.common.service_client.ServiceClient.get',
-            {"aggregates": []},
-            bytes_body)
-
-    def test_list_aggregates_with_str_body(self):
-        self._test_list_aggregates()
-
-    def test_list_aggregates_with_bytes_body(self):
-        self._test_list_aggregates(bytes_body=True)
-
-    def _test_show_aggregate(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.show_aggregate,
-            'tempest.common.service_client.ServiceClient.get',
-            self.FAKE_SHOW_AGGREGATE,
-            bytes_body,
-            aggregate_id=1)
-
-    def test_show_aggregate_with_str_body(self):
-        self._test_show_aggregate()
-
-    def test_show_aggregate_with_bytes_body(self):
-        self._test_show_aggregate(bytes_body=True)
-
-    def _test_create_aggregate(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.create_aggregate,
-            'tempest.common.service_client.ServiceClient.post',
-            self.FAKE_CREATE_AGGREGATE,
-            bytes_body,
-            name='hoge')
-
-    def test_create_aggregate_with_str_body(self):
-        self._test_create_aggregate()
-
-    def test_create_aggregate_with_bytes_body(self):
-        self._test_create_aggregate(bytes_body=True)
-
-    def test_delete_aggregate(self):
-        self.check_service_client_function(
-            self.client.delete_aggregate,
-            'tempest.common.service_client.ServiceClient.delete',
-            {}, aggregate_id="1")
-
-    def _test_update_aggregate(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.update_aggregate,
-            'tempest.common.service_client.ServiceClient.put',
-            self.FAKE_UPDATE_AGGREGATE,
-            bytes_body,
-            aggregate_id=1)
-
-    def test_update_aggregate_with_str_body(self):
-        self._test_update_aggregate()
-
-    def test_update_aggregate_with_bytes_body(self):
-        self._test_update_aggregate(bytes_body=True)
diff --git a/tempest/tests/services/compute/test_availability_zone_client.py b/tempest/tests/services/compute/test_availability_zone_client.py
deleted file mode 100644
index e1d94bc..0000000
--- a/tempest/tests/services/compute/test_availability_zone_client.py
+++ /dev/null
@@ -1,82 +0,0 @@
-# Copyright 2015 NEC Corporation.  All rights reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-import copy
-
-from tempest_lib.tests import fake_auth_provider
-
-from tempest.services.compute.json import availability_zone_client
-from tempest.tests.services.compute import base
-
-
-class TestAvailabilityZoneClient(base.BaseComputeServiceTest):
-
-    FAKE_AZ_INFO = {
-        "availabilityZoneInfo":
-        [
-            {
-                "zoneState": {
-                    "available": True
-                },
-                "hosts": None,
-                "zoneName": u'\xf4'
-            }
-        ]
-    }
-
-    FAKE_AZ_DETAILS = {
-        "testhost": {
-            "nova-compute": {
-                "available": True,
-                "active": True,
-                "updated_at": "2015-09-10T07:16:46.000000"
-            }
-        }
-    }
-
-    def setUp(self):
-        super(TestAvailabilityZoneClient, self).setUp()
-        fake_auth = fake_auth_provider.FakeAuthProvider()
-        self.client = availability_zone_client.AvailabilityZoneClient(
-            fake_auth, 'compute', 'regionOne')
-
-    def _test_availability_zones(self, to_utf=False):
-        self.check_service_client_function(
-            self.client.list_availability_zones,
-            'tempest.common.service_client.ServiceClient.get',
-            self.FAKE_AZ_INFO,
-            to_utf)
-
-    def _test_availability_zones_with_details(self, to_utf=False):
-        fake_az_details = copy.deepcopy(self.FAKE_AZ_INFO)
-        fake_az_details['availabilityZoneInfo'][0]['hosts'] = \
-            self.FAKE_AZ_DETAILS
-        self.check_service_client_function(
-            self.client.list_availability_zones,
-            'tempest.common.service_client.ServiceClient.get',
-            fake_az_details,
-            to_utf,
-            detail=True)
-
-    def test_list_availability_zones_with_str_body(self):
-        self._test_availability_zones()
-
-    def test_list_availability_zones_with_bytes_body(self):
-        self._test_availability_zones(True)
-
-    def test_list_availability_zones_with_str_body_and_details(self):
-        self._test_availability_zones_with_details()
-
-    def test_list_availability_zones_with_bytes_body_and_details(self):
-        self._test_availability_zones_with_details(True)
diff --git a/tempest/tests/services/compute/test_baremetal_nodes_client.py b/tempest/tests/services/compute/test_baremetal_nodes_client.py
deleted file mode 100644
index 86c035c..0000000
--- a/tempest/tests/services/compute/test_baremetal_nodes_client.py
+++ /dev/null
@@ -1,75 +0,0 @@
-# Copyright 2015 NEC Corporation.  All rights reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-import copy
-
-from tempest_lib.tests import fake_auth_provider
-
-from tempest.services.compute.json import baremetal_nodes_client
-from tempest.tests.services.compute import base
-
-
-class TestBareMetalNodesClient(base.BaseComputeServiceTest):
-
-    FAKE_NODE_INFO = {'cpus': '8',
-                      'disk_gb': '64',
-                      'host': '10.0.2.15',
-                      'id': 'Identifier',
-                      'instance_uuid': "null",
-                      'interfaces': [
-                          {
-                              "address": "20::01",
-                              "datapath_id": "null",
-                              "id": 1,
-                              "port_no": None
-                          }
-                      ],
-                      'memory_mb': '8192',
-                      'task_state': None}
-
-    def setUp(self):
-        super(TestBareMetalNodesClient, self).setUp()
-        fake_auth = fake_auth_provider.FakeAuthProvider()
-        self.baremetal_nodes_client = (baremetal_nodes_client.
-                                       BaremetalNodesClient
-                                       (fake_auth, 'compute',
-                                        'regionOne'))
-
-    def _test_bareMetal_nodes(self, operation='list', bytes_body=False):
-        if operation != 'list':
-            expected = {"node": self.FAKE_NODE_INFO}
-            function = self.baremetal_nodes_client.show_baremetal_node
-        else:
-            node_info = copy.deepcopy(self.FAKE_NODE_INFO)
-            del node_info['instance_uuid']
-            expected = {"nodes": [node_info]}
-            function = self.baremetal_nodes_client.list_baremetal_nodes
-
-        self.check_service_client_function(
-            function,
-            'tempest.common.service_client.ServiceClient.get',
-            expected, bytes_body, 200,
-            baremetal_node_id='Identifier')
-
-    def test_list_bareMetal_nodes_with_str_body(self):
-        self._test_bareMetal_nodes()
-
-    def test_list_bareMetal_nodes_with_bytes_body(self):
-        self._test_bareMetal_nodes(bytes_body=True)
-
-    def test_show_bareMetal_node_with_str_body(self):
-        self._test_bareMetal_nodes('show')
-
-    def test_show_bareMetal_node_with_bytes_body(self):
-        self._test_bareMetal_nodes('show', True)
diff --git a/tempest/tests/services/compute/test_certificates_client.py b/tempest/tests/services/compute/test_certificates_client.py
deleted file mode 100644
index 2ba90d0..0000000
--- a/tempest/tests/services/compute/test_certificates_client.py
+++ /dev/null
@@ -1,65 +0,0 @@
-# Copyright 2015 NEC Corporation.  All rights reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-import copy
-
-from tempest_lib.tests import fake_auth_provider
-
-from tempest.services.compute.json import certificates_client
-from tempest.tests.services.compute import base
-
-
-class TestCertificatesClient(base.BaseComputeServiceTest):
-
-    FAKE_CERTIFICATE = {
-        "certificate": {
-            "data": "-----BEGIN----MIICyzCCAjSgAwI----END CERTIFICATE-----\n",
-            "private_key": None
-        }
-    }
-
-    def setUp(self):
-        super(TestCertificatesClient, self).setUp()
-        fake_auth = fake_auth_provider.FakeAuthProvider()
-        self.client = certificates_client.CertificatesClient(
-            fake_auth, 'compute', 'regionOne')
-
-    def _test_show_certificate(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.show_certificate,
-            'tempest.common.service_client.ServiceClient.get',
-            self.FAKE_CERTIFICATE,
-            bytes_body,
-            certificate_id="fake-id")
-
-    def test_show_certificate_with_str_body(self):
-        self._test_show_certificate()
-
-    def test_show_certificate_with_bytes_body(self):
-        self._test_show_certificate(bytes_body=True)
-
-    def _test_create_certificate(self, bytes_body=False):
-        cert = copy.deepcopy(self.FAKE_CERTIFICATE)
-        cert['certificate']['private_key'] = "my_private_key"
-        self.check_service_client_function(
-            self.client.create_certificate,
-            'tempest.common.service_client.ServiceClient.post',
-            cert,
-            bytes_body)
-
-    def test_create_certificate_with_str_body(self):
-        self._test_create_certificate()
-
-    def test_create_certificate_with_bytes_body(self):
-        self._test_create_certificate(bytes_body=True)
diff --git a/tempest/tests/services/compute/test_extensions_client.py b/tempest/tests/services/compute/test_extensions_client.py
deleted file mode 100644
index 21efc52..0000000
--- a/tempest/tests/services/compute/test_extensions_client.py
+++ /dev/null
@@ -1,66 +0,0 @@
-# Copyright 2015 NEC Corporation.  All rights reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-from tempest_lib.tests import fake_auth_provider
-
-from tempest.services.compute.json import extensions_client
-from tempest.tests.services.compute import base
-
-
-class TestExtensionsClient(base.BaseComputeServiceTest):
-
-    FAKE_SHOW_EXTENSION = {
-        "extension": {
-            "updated": "2011-06-09T00:00:00Z",
-            "name": "Multinic",
-            "links": [],
-            "namespace":
-            "http://docs.openstack.org/compute/ext/multinic/api/v1.1",
-            "alias": "NMN",
-            "description": u'\u2740(*\xb4\u25e1`*)\u2740'
-        }
-    }
-
-    def setUp(self):
-        super(TestExtensionsClient, self).setUp()
-        fake_auth = fake_auth_provider.FakeAuthProvider()
-        self.client = extensions_client.ExtensionsClient(
-            fake_auth, 'compute', 'regionOne')
-
-    def _test_list_extensions(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.list_extensions,
-            'tempest.common.service_client.ServiceClient.get',
-            {"extensions": []},
-            bytes_body)
-
-    def test_list_extensions_with_str_body(self):
-        self._test_list_extensions()
-
-    def test_list_extensions_with_bytes_body(self):
-        self._test_list_extensions(bytes_body=True)
-
-    def _test_show_extension(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.show_extension,
-            'tempest.common.service_client.ServiceClient.get',
-            self.FAKE_SHOW_EXTENSION,
-            bytes_body,
-            extension_alias="NMN")
-
-    def test_show_extension_with_str_body(self):
-        self._test_show_extension()
-
-    def test_show_extension_with_bytes_body(self):
-        self._test_show_extension(bytes_body=True)
diff --git a/tempest/tests/services/compute/test_fixedIPs_client.py b/tempest/tests/services/compute/test_fixedIPs_client.py
index 5acb422..b537baa 100644
--- a/tempest/tests/services/compute/test_fixedIPs_client.py
+++ b/tempest/tests/services/compute/test_fixedIPs_client.py
@@ -44,3 +44,16 @@
 
     def test_show_fixed_ip_with_bytes_body(self):
         self._test_show_fixed_ip(True)
+
+    def _test_reserve_fixed_ip(self, bytes_body=False):
+        self.check_service_client_function(
+            self.fixedIPsClient.reserve_fixed_ip,
+            'tempest.common.service_client.ServiceClient.post',
+            {}, bytes_body,
+            status=202, fixed_ip='Identifier')
+
+    def test_reserve_fixed_ip_with_str_body(self):
+        self._test_reserve_fixed_ip()
+
+    def test_reserve_fixed_ip_with_bytes_body(self):
+        self._test_reserve_fixed_ip(True)
diff --git a/tempest/tests/services/compute/test_images_client.py b/tempest/tests/services/compute/test_images_client.py
new file mode 100644
index 0000000..1d532b7
--- /dev/null
+++ b/tempest/tests/services/compute/test_images_client.py
@@ -0,0 +1,240 @@
+# Copyright 2015 NEC Corporation.  All rights reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+import copy
+
+from oslotest import mockpatch
+from tempest_lib import exceptions as lib_exc
+
+from tempest.services.compute.json import images_client
+from tempest.tests import fake_auth_provider
+from tempest.tests.services.compute import base
+
+
+class TestImagesClient(base.BaseComputeServiceTest):
+    # Data Dictionaries used for testing #
+    FAKE_IMAGE_METADATA = {
+        "list":
+            {"metadata": {
+             "auto_disk_config": "True",
+             "Label": "Changed"
+             }},
+        "set_item":
+            {"meta": {
+             "auto_disk_config": "True"
+             }},
+        "show_item":
+            {"meta": {
+             "kernel_id": "nokernel",
+             }},
+        "update":
+            {"metadata": {
+             "kernel_id": "False",
+             "Label": "UpdatedImage"
+             }},
+        "set":
+            {"metadata": {
+             "Label": "Changed",
+             "auto_disk_config": "True"
+             }},
+        "delete_item": {}
+        }
+
+    FAKE_IMAGE_DATA = {
+        "list":
+            {"images": [
+             {"id": "70a599e0-31e7-49b7-b260-868f441e862b",
+              "links": [
+                    {"href": "http://openstack.example.com/v2/openstack" +
+                             "/images/70a599e0-31e7-49b7-b260-868f441e862b",
+                     "rel": "self"
+                     }
+              ],
+              "name": "fakeimage7"
+              }]},
+        "show": {"image": {
+            "created": "2011-01-01T01:02:03Z",
+            "id": "70a599e0-31e7-49b7-b260-868f441e862b",
+            "links": [
+                {
+                    "href": "http://openstack.example.com/v2/openstack" +
+                            "/images/70a599e0-31e7-49b7-b260-868f441e862b",
+                    "rel": "self"
+                },
+            ],
+            "metadata": {
+                "architecture": "x86_64",
+                "auto_disk_config": "True",
+                "kernel_id": "nokernel",
+                "ramdisk_id": "nokernel"
+            },
+            "minDisk": 0,
+            "minRam": 0,
+            "name": "fakeimage7",
+            "progress": 100,
+            "status": "ACTIVE",
+            "updated": "2011-01-01T01:02:03Z"}},
+        "delete": {}
+        }
+    func2mock = {
+        'get': 'tempest.common.service_client.ServiceClient.get',
+        'post': 'tempest.common.service_client.ServiceClient.post',
+        'put': 'tempest.common.service_client.ServiceClient.put',
+        'delete': 'tempest.common.service_client.ServiceClient.delete'}
+    # Variable definition
+    FAKE_IMAGE_ID = FAKE_IMAGE_DATA['show']['image']['id']
+    FAKE_CREATE_INFO = {'location': 'None'}
+    FAKE_METADATA = FAKE_IMAGE_METADATA['show_item']['meta']
+
+    def setUp(self):
+        super(TestImagesClient, self).setUp()
+        fake_auth = fake_auth_provider.FakeAuthProvider()
+        self.client = images_client.ImagesClient(fake_auth,
+                                                 "compute", "regionOne")
+
+    def _test_image_operation(self, operation="delete", bytes_body=False):
+        response_code = 200
+        mock_operation = self.func2mock['get']
+        expected_op = self.FAKE_IMAGE_DATA[operation]
+        params = {"image_id": self.FAKE_IMAGE_ID}
+        if operation == 'list':
+            function = self.client.list_images
+        elif operation == 'show':
+            function = self.client.show_image
+        else:
+            function = self.client.delete_image
+            mock_operation = self.func2mock['delete']
+            response_code = 204
+
+        self.check_service_client_function(
+            function, mock_operation, expected_op,
+            bytes_body, response_code, **params)
+
+    def _test_image_metadata(self, operation="set_item", bytes_body=False):
+        response_code = 200
+        expected_op = self.FAKE_IMAGE_METADATA[operation]
+        if operation == 'list':
+            function = self.client.list_image_metadata
+            mock_operation = self.func2mock['get']
+            params = {"image_id": self.FAKE_IMAGE_ID}
+
+        elif operation == 'set':
+            function = self.client.set_image_metadata
+            mock_operation = self.func2mock['put']
+            params = {"image_id": "_dummy_data",
+                      "meta": self.FAKE_METADATA}
+
+        elif operation == 'update':
+            function = self.client.update_image_metadata
+            mock_operation = self.func2mock['post']
+            params = {"image_id": self.FAKE_IMAGE_ID,
+                      "meta": self.FAKE_METADATA}
+
+        elif operation == 'show_item':
+            mock_operation = self.func2mock['get']
+            function = self.client.show_image_metadata_item
+            params = {"image_id": self.FAKE_IMAGE_ID,
+                      "key": "123"}
+
+        elif operation == 'delete_item':
+            function = self.client.delete_image_metadata_item
+            mock_operation = self.func2mock['delete']
+            response_code = 204
+            params = {"image_id": self.FAKE_IMAGE_ID,
+                      "key": "123"}
+
+        else:
+            function = self.client.set_image_metadata_item
+            mock_operation = self.func2mock['put']
+            params = {"image_id": self.FAKE_IMAGE_ID,
+                      "key": "123",
+                      "meta": self.FAKE_METADATA}
+
+        self.check_service_client_function(
+            function, mock_operation, expected_op,
+            bytes_body, response_code, **params)
+
+    def _test_resource_deleted(self, bytes_body=False):
+        params = {"id": self.FAKE_IMAGE_ID}
+        expected_op = self.FAKE_IMAGE_DATA['show']['image']
+        self.useFixture(mockpatch.Patch('tempest.services.compute.json'
+                        '.images_client.ImagesClient.show_image',
+                                        side_effect=lib_exc.NotFound))
+        self.assertEqual(True, self.client.is_resource_deleted(**params))
+        tempdata = copy.deepcopy(self.FAKE_IMAGE_DATA['show'])
+        tempdata['image']['id'] = None
+        self.useFixture(mockpatch.Patch('tempest.services.compute.json'
+                        '.images_client.ImagesClient.show_image',
+                                        return_value=expected_op))
+        self.assertEqual(False, self.client.is_resource_deleted(**params))
+
+    def test_list_images_with_str_body(self):
+        self._test_image_operation('list')
+
+    def test_list_images_with_bytes_body(self):
+        self._test_image_operation('list', True)
+
+    def test_show_image_with_str_body(self):
+        self._test_image_operation('show')
+
+    def test_show_image_with_bytes_body(self):
+        self._test_image_operation('show', True)
+
+    def test_delete_image_with_str_body(self):
+        self._test_image_operation('delete')
+
+    def test_delete_image_with_bytes_body(self):
+        self._test_image_operation('delete', True)
+
+    def test_list_image_metadata_with_str_body(self):
+        self._test_image_metadata('list')
+
+    def test_list_image_metadata_with_bytes_body(self):
+        self._test_image_metadata('list', True)
+
+    def test_set_image_metadata_with_str_body(self):
+        self._test_image_metadata('set')
+
+    def test_set_image_metadata_with_bytes_body(self):
+        self._test_image_metadata('set', True)
+
+    def test_update_image_metadata_with_str_body(self):
+        self._test_image_metadata('update')
+
+    def test_update_image_metadata_with_bytes_body(self):
+        self._test_image_metadata('update', True)
+
+    def test_set_image_metadata_item_with_str_body(self):
+        self._test_image_metadata()
+
+    def test_set_image_metadata_item_with_bytes_body(self):
+        self._test_image_metadata(bytes_body=True)
+
+    def test_show_image_metadata_item_with_str_body(self):
+        self._test_image_metadata('show_item')
+
+    def test_show_image_metadata_item_with_bytes_body(self):
+        self._test_image_metadata('show_item', True)
+
+    def test_delete_image_metadata_item_with_str_body(self):
+        self._test_image_metadata('delete_item')
+
+    def test_delete_image_metadata_item_with_bytes_body(self):
+        self._test_image_metadata('delete_item', True)
+
+    def test_resource_delete_with_str_body(self):
+        self._test_resource_deleted()
+
+    def test_resource_delete_with_bytes_body(self):
+        self._test_resource_deleted(True)
diff --git a/tempest/tests/services/compute/test_snapshots_client.py b/tempest/tests/services/compute/test_snapshots_client.py
new file mode 100644
index 0000000..c24c6ae
--- /dev/null
+++ b/tempest/tests/services/compute/test_snapshots_client.py
@@ -0,0 +1,103 @@
+# Copyright 2015 NEC Corporation.  All rights reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+from oslotest import mockpatch
+from tempest_lib import exceptions as lib_exc
+
+from tempest.services.compute.json import snapshots_client
+from tempest.tests import fake_auth_provider
+from tempest.tests.services.compute import base
+
+
+class TestSnapshotsClient(base.BaseComputeServiceTest):
+
+    FAKE_SNAPSHOT = {
+        "createdAt": "2015-10-02T16:27:54.724209",
+        "displayDescription": u"Another \u1234.",
+        "displayName": u"v\u1234-001",
+        "id": "100",
+        "size": 100,
+        "status": "available",
+        "volumeId": "12"
+    }
+
+    FAKE_SNAPSHOTS = {"snapshots": [FAKE_SNAPSHOT]}
+
+    def setUp(self):
+        super(TestSnapshotsClient, self).setUp()
+        fake_auth = fake_auth_provider.FakeAuthProvider()
+        self.client = snapshots_client.SnapshotsClient(
+            fake_auth, 'compute', 'regionOne')
+
+    def _test_create_snapshot(self, bytes_body=False):
+        self.check_service_client_function(
+            self.client.create_snapshot,
+            'tempest.common.service_client.ServiceClient.post',
+            {"snapshot": self.FAKE_SNAPSHOT},
+            to_utf=bytes_body, status=200,
+            volume_id=self.FAKE_SNAPSHOT["volumeId"])
+
+    def test_create_snapshot_with_str_body(self):
+        self._test_create_snapshot()
+
+    def test_create_shapshot_with_bytes_body(self):
+        self._test_create_snapshot(bytes_body=True)
+
+    def _test_show_snapshot(self, bytes_body=False):
+        self.check_service_client_function(
+            self.client.show_snapshot,
+            'tempest.common.service_client.ServiceClient.get',
+            {"snapshot": self.FAKE_SNAPSHOT},
+            to_utf=bytes_body, snapshot_id=self.FAKE_SNAPSHOT["id"])
+
+    def test_show_snapshot_with_str_body(self):
+        self._test_show_snapshot()
+
+    def test_show_snapshot_with_bytes_body(self):
+        self._test_show_snapshot(bytes_body=True)
+
+    def _test_list_snapshots(self, bytes_body=False, **params):
+        self.check_service_client_function(
+            self.client.list_snapshots,
+            'tempest.common.service_client.ServiceClient.get',
+            self.FAKE_SNAPSHOTS, to_utf=bytes_body, **params)
+
+    def test_list_snapshots_with_str_body(self):
+        self._test_list_snapshots()
+
+    def test_list_snapshots_with_byte_body(self):
+        self._test_list_snapshots(bytes_body=True)
+
+    def test_list_snapshots_with_params(self):
+        self._test_list_snapshots('fake')
+
+    def test_delete_snapshot(self):
+        self.check_service_client_function(
+            self.client.delete_snapshot,
+            'tempest.common.service_client.ServiceClient.delete',
+            {}, status=202, snapshot_id=self.FAKE_SNAPSHOT['id'])
+
+    def test_is_resource_deleted_true(self):
+        module = ('tempest.services.compute.json.snapshots_client.'
+                  'SnapshotsClient.show_snapshot')
+        self.useFixture(mockpatch.Patch(
+            module, side_effect=lib_exc.NotFound))
+        self.assertTrue(self.client.is_resource_deleted('fake-id'))
+
+    def test_is_resource_deleted_false(self):
+        module = ('tempest.services.compute.json.snapshots_client.'
+                  'SnapshotsClient.show_snapshot')
+        self.useFixture(mockpatch.Patch(
+            module, return_value={}))
+        self.assertFalse(self.client.is_resource_deleted('fake-id'))
diff --git a/tempest/tests/services/compute/test_volumes_extensions_client.py b/tempest/tests/services/compute/test_volumes_client.py
similarity index 87%
rename from tempest/tests/services/compute/test_volumes_extensions_client.py
rename to tempest/tests/services/compute/test_volumes_client.py
index 2fe8497..33d4bad 100644
--- a/tempest/tests/services/compute/test_volumes_extensions_client.py
+++ b/tempest/tests/services/compute/test_volumes_client.py
@@ -17,12 +17,12 @@
 from oslotest import mockpatch
 from tempest_lib import exceptions as lib_exc
 
-from tempest.services.compute.json import volumes_extensions_client
+from tempest.services.compute.json import volumes_client
 from tempest.tests import fake_auth_provider
 from tempest.tests.services.compute import base
 
 
-class TestVolumesExtensionsClient(base.BaseComputeServiceTest):
+class TestVolumesClient(base.BaseComputeServiceTest):
 
     FAKE_VOLUME = {
         "id": "521752a6-acf6-4b2d-bc7a-119f9148cd8c",
@@ -43,9 +43,9 @@
     FAKE_VOLUMES = {"volumes": [FAKE_VOLUME]}
 
     def setUp(self):
-        super(TestVolumesExtensionsClient, self).setUp()
+        super(TestVolumesClient, self).setUp()
         fake_auth = fake_auth_provider.FakeAuthProvider()
-        self.client = volumes_extensions_client.VolumesExtensionsClient(
+        self.client = volumes_client.VolumesClient(
             fake_auth, 'compute', 'regionOne')
 
     def _test_list_volumes(self, bytes_body=False, **params):
@@ -100,15 +100,15 @@
             {}, status=202, volume_id=self.FAKE_VOLUME['id'])
 
     def test_is_resource_deleted_true(self):
-        module = ('tempest.services.compute.json.volumes_extensions_client.'
-                  'VolumesExtensionsClient.show_volume')
+        module = ('tempest.services.compute.json.volumes_client.'
+                  'VolumesClient.show_volume')
         self.useFixture(mockpatch.Patch(
             module, side_effect=lib_exc.NotFound))
         self.assertTrue(self.client.is_resource_deleted('fake-id'))
 
     def test_is_resource_deleted_false(self):
-        module = ('tempest.services.compute.json.volumes_extensions_client.'
-                  'VolumesExtensionsClient.show_volume')
+        module = ('tempest.services.compute.json.volumes_client.'
+                  'VolumesClient.show_volume')
         self.useFixture(mockpatch.Patch(
             module, return_value={}))
         self.assertFalse(self.client.is_resource_deleted('fake-id'))
diff --git a/tempest/tests/test_tenant_isolation.py b/tempest/tests/test_dynamic_creds.py
similarity index 83%
rename from tempest/tests/test_tenant_isolation.py
rename to tempest/tests/test_dynamic_creds.py
index 5aba2c7..5f57268 100644
--- a/tempest/tests/test_tenant_isolation.py
+++ b/tempest/tests/test_dynamic_creds.py
@@ -17,7 +17,7 @@
 from oslotest import mockpatch
 from tempest_lib.services.identity.v2 import token_client as json_token_client
 
-from tempest.common import isolated_creds
+from tempest.common import dynamic_creds
 from tempest.common import service_client
 from tempest import config
 from tempest import exceptions
@@ -30,10 +30,10 @@
 from tempest.tests import fake_identity
 
 
-class TestTenantIsolation(base.TestCase):
+class TestDynamicCredentialProvider(base.TestCase):
 
     def setUp(self):
-        super(TestTenantIsolation, self).setUp()
+        super(TestDynamicCredentialProvider, self).setUp()
         self.useFixture(fake_config.ConfigFixture())
         self.stubs.Set(config, 'TempestConfigPrivate', fake_config.FakePrivate)
         self.fake_http = fake_http.fake_httplib2(return_type=200)
@@ -44,10 +44,10 @@
         self._mock_list_ec2_credentials('fake_user_id', 'fake_tenant_id')
 
     def test_tempest_client(self):
-        iso_creds = isolated_creds.IsolatedCreds(name='test class')
-        self.assertTrue(isinstance(iso_creds.identity_admin_client,
+        creds = dynamic_creds.DynamicCredentialProvider(name='test class')
+        self.assertTrue(isinstance(creds.identity_admin_client,
                                    json_iden_client.IdentityClient))
-        self.assertTrue(isinstance(iso_creds.network_admin_client,
+        self.assertTrue(isinstance(creds.network_admin_client,
                                    json_network_client.NetworkClient))
 
     def _mock_user_create(self, id, name):
@@ -142,12 +142,12 @@
     @mock.patch('tempest_lib.common.rest_client.RestClient')
     def test_primary_creds(self, MockRestClient):
         cfg.CONF.set_default('neutron', False, 'service_available')
-        iso_creds = isolated_creds.IsolatedCreds(name='test class')
+        creds = dynamic_creds.DynamicCredentialProvider(name='test class')
         self._mock_assign_user_role()
         self._mock_list_role()
         self._mock_tenant_create('1234', 'fake_prim_tenant')
         self._mock_user_create('1234', 'fake_prim_user')
-        primary_creds = iso_creds.get_primary_creds()
+        primary_creds = creds.get_primary_creds()
         self.assertEqual(primary_creds.username, 'fake_prim_user')
         self.assertEqual(primary_creds.tenant_name, 'fake_prim_tenant')
         # Verify IDs
@@ -157,7 +157,7 @@
     @mock.patch('tempest_lib.common.rest_client.RestClient')
     def test_admin_creds(self, MockRestClient):
         cfg.CONF.set_default('neutron', False, 'service_available')
-        iso_creds = isolated_creds.IsolatedCreds(name='test class')
+        creds = dynamic_creds.DynamicCredentialProvider(name='test class')
         self._mock_list_roles('1234', 'admin')
         self._mock_user_create('1234', 'fake_admin_user')
         self._mock_tenant_create('1234', 'fake_admin_tenant')
@@ -168,7 +168,7 @@
         self.addCleanup(user_mock.stop)
         with mock.patch.object(json_iden_client.IdentityClient,
                                'assign_user_role') as user_mock:
-            admin_creds = iso_creds.get_admin_creds()
+            admin_creds = creds.get_admin_creds()
         user_mock.assert_has_calls([
             mock.call('1234', '1234', '1234')])
         self.assertEqual(admin_creds.username, 'fake_admin_user')
@@ -180,7 +180,7 @@
     @mock.patch('tempest_lib.common.rest_client.RestClient')
     def test_role_creds(self, MockRestClient):
         cfg.CONF.set_default('neutron', False, 'service_available')
-        iso_creds = isolated_creds.IsolatedCreds('v2', 'test class')
+        creds = dynamic_creds.DynamicCredentialProvider('v2', 'test class')
         self._mock_list_2_roles()
         self._mock_user_create('1234', 'fake_role_user')
         self._mock_tenant_create('1234', 'fake_role_tenant')
@@ -191,7 +191,8 @@
         self.addCleanup(user_mock.stop)
         with mock.patch.object(json_iden_client.IdentityClient,
                                'assign_user_role') as user_mock:
-            role_creds = iso_creds.get_creds_by_roles(roles=['role1', 'role2'])
+            role_creds = creds.get_creds_by_roles(
+                roles=['role1', 'role2'])
         calls = user_mock.mock_calls
         # Assert that the role creation is called with the 2 specified roles
         self.assertEqual(len(calls), 2)
@@ -208,26 +209,26 @@
     @mock.patch('tempest_lib.common.rest_client.RestClient')
     def test_all_cred_cleanup(self, MockRestClient):
         cfg.CONF.set_default('neutron', False, 'service_available')
-        iso_creds = isolated_creds.IsolatedCreds(name='test class')
+        creds = dynamic_creds.DynamicCredentialProvider(name='test class')
         self._mock_assign_user_role()
         self._mock_list_role()
         self._mock_tenant_create('1234', 'fake_prim_tenant')
         self._mock_user_create('1234', 'fake_prim_user')
-        iso_creds.get_primary_creds()
+        creds.get_primary_creds()
         self._mock_tenant_create('12345', 'fake_alt_tenant')
         self._mock_user_create('12345', 'fake_alt_user')
-        iso_creds.get_alt_creds()
+        creds.get_alt_creds()
         self._mock_tenant_create('123456', 'fake_admin_tenant')
         self._mock_user_create('123456', 'fake_admin_user')
         self._mock_list_roles('123456', 'admin')
-        iso_creds.get_admin_creds()
+        creds.get_admin_creds()
         user_mock = self.patch(
             'tempest.services.identity.v2.json.identity_client.'
             'IdentityClient.delete_user')
         tenant_mock = self.patch(
             'tempest.services.identity.v2.json.identity_client.'
             'IdentityClient.delete_tenant')
-        iso_creds.clear_isolated_creds()
+        creds.clear_creds()
         # Verify user delete calls
         calls = user_mock.mock_calls
         self.assertEqual(len(calls), 3)
@@ -248,12 +249,12 @@
     @mock.patch('tempest_lib.common.rest_client.RestClient')
     def test_alt_creds(self, MockRestClient):
         cfg.CONF.set_default('neutron', False, 'service_available')
-        iso_creds = isolated_creds.IsolatedCreds(name='test class')
+        creds = dynamic_creds.DynamicCredentialProvider(name='test class')
         self._mock_assign_user_role()
         self._mock_list_role()
         self._mock_user_create('1234', 'fake_alt_user')
         self._mock_tenant_create('1234', 'fake_alt_tenant')
-        alt_creds = iso_creds.get_alt_creds()
+        alt_creds = creds.get_alt_creds()
         self.assertEqual(alt_creds.username, 'fake_alt_user')
         self.assertEqual(alt_creds.tenant_name, 'fake_alt_tenant')
         # Verify IDs
@@ -263,22 +264,22 @@
     @mock.patch('tempest_lib.common.rest_client.RestClient')
     def test_no_network_creation_with_config_set(self, MockRestClient):
         cfg.CONF.set_default('create_isolated_networks', False, group='auth')
-        iso_creds = isolated_creds.IsolatedCreds(name='test class')
+        creds = dynamic_creds.DynamicCredentialProvider(name='test class')
         self._mock_assign_user_role()
         self._mock_list_role()
         self._mock_user_create('1234', 'fake_prim_user')
         self._mock_tenant_create('1234', 'fake_prim_tenant')
-        net = mock.patch.object(iso_creds.networks_admin_client,
+        net = mock.patch.object(creds.networks_admin_client,
                                 'delete_network')
         net_mock = net.start()
-        subnet = mock.patch.object(iso_creds.network_admin_client,
+        subnet = mock.patch.object(creds.network_admin_client,
                                    'delete_subnet')
         subnet_mock = subnet.start()
-        router = mock.patch.object(iso_creds.network_admin_client,
+        router = mock.patch.object(creds.network_admin_client,
                                    'delete_router')
         router_mock = router.start()
 
-        primary_creds = iso_creds.get_primary_creds()
+        primary_creds = creds.get_primary_creds()
         self.assertEqual(net_mock.mock_calls, [])
         self.assertEqual(subnet_mock.mock_calls, [])
         self.assertEqual(router_mock.mock_calls, [])
@@ -291,18 +292,18 @@
 
     @mock.patch('tempest_lib.common.rest_client.RestClient')
     def test_network_creation(self, MockRestClient):
-        iso_creds = isolated_creds.IsolatedCreds(name='test class')
+        creds = dynamic_creds.DynamicCredentialProvider(name='test class')
         self._mock_assign_user_role()
         self._mock_list_role()
         self._mock_user_create('1234', 'fake_prim_user')
         self._mock_tenant_create('1234', 'fake_prim_tenant')
-        self._mock_network_create(iso_creds, '1234', 'fake_net')
-        self._mock_subnet_create(iso_creds, '1234', 'fake_subnet')
+        self._mock_network_create(creds, '1234', 'fake_net')
+        self._mock_subnet_create(creds, '1234', 'fake_subnet')
         self._mock_router_create('1234', 'fake_router')
         router_interface_mock = self.patch(
             'tempest.services.network.json.network_client.NetworkClient.'
             'add_router_interface_with_subnet_id')
-        primary_creds = iso_creds.get_primary_creds()
+        primary_creds = creds.get_primary_creds()
         router_interface_mock.called_once_with('1234', '1234')
         network = primary_creds.network
         subnet = primary_creds.subnet
@@ -322,73 +323,71 @@
                                          "description": args['name'],
                                          "security_group_rules": [],
                                          "id": "sg-%s" % args['tenant_id']}]}
-        iso_creds = isolated_creds.IsolatedCreds(name='test class')
+        creds = dynamic_creds.DynamicCredentialProvider(name='test class')
         # Create primary tenant and network
         self._mock_assign_user_role()
         self._mock_list_role()
         self._mock_user_create('1234', 'fake_prim_user')
         self._mock_tenant_create('1234', 'fake_prim_tenant')
-        self._mock_network_create(iso_creds, '1234', 'fake_net')
-        self._mock_subnet_create(iso_creds, '1234', 'fake_subnet')
+        self._mock_network_create(creds, '1234', 'fake_net')
+        self._mock_subnet_create(creds, '1234', 'fake_subnet')
         self._mock_router_create('1234', 'fake_router')
         router_interface_mock = self.patch(
             'tempest.services.network.json.network_client.NetworkClient.'
             'add_router_interface_with_subnet_id')
-        iso_creds.get_primary_creds()
+        creds.get_primary_creds()
         router_interface_mock.called_once_with('1234', '1234')
         router_interface_mock.reset_mock()
         # Create alternate tenant and network
         self._mock_user_create('12345', 'fake_alt_user')
         self._mock_tenant_create('12345', 'fake_alt_tenant')
-        self._mock_network_create(iso_creds, '12345', 'fake_alt_net')
-        self._mock_subnet_create(iso_creds, '12345',
-                                 'fake_alt_subnet')
+        self._mock_network_create(creds, '12345', 'fake_alt_net')
+        self._mock_subnet_create(creds, '12345', 'fake_alt_subnet')
         self._mock_router_create('12345', 'fake_alt_router')
-        iso_creds.get_alt_creds()
+        creds.get_alt_creds()
         router_interface_mock.called_once_with('12345', '12345')
         router_interface_mock.reset_mock()
         # Create admin tenant and networks
         self._mock_user_create('123456', 'fake_admin_user')
         self._mock_tenant_create('123456', 'fake_admin_tenant')
-        self._mock_network_create(iso_creds, '123456',
-                                  'fake_admin_net')
-        self._mock_subnet_create(iso_creds, '123456',
-                                 'fake_admin_subnet')
+        self._mock_network_create(creds, '123456', 'fake_admin_net')
+        self._mock_subnet_create(creds, '123456', 'fake_admin_subnet')
         self._mock_router_create('123456', 'fake_admin_router')
         self._mock_list_roles('123456', 'admin')
-        iso_creds.get_admin_creds()
+        creds.get_admin_creds()
         self.patch('tempest.services.identity.v2.json.identity_client.'
                    'IdentityClient.delete_user')
         self.patch('tempest.services.identity.v2.json.identity_client.'
                    'IdentityClient.delete_tenant')
-        net = mock.patch.object(iso_creds.networks_admin_client,
+        net = mock.patch.object(creds.networks_admin_client,
                                 'delete_network')
         net_mock = net.start()
-        subnet = mock.patch.object(iso_creds.network_admin_client,
+        subnet = mock.patch.object(creds.network_admin_client,
                                    'delete_subnet')
         subnet_mock = subnet.start()
-        router = mock.patch.object(iso_creds.network_admin_client,
+        router = mock.patch.object(creds.network_admin_client,
                                    'delete_router')
         router_mock = router.start()
         remove_router_interface_mock = self.patch(
             'tempest.services.network.json.network_client.NetworkClient.'
             'remove_router_interface_with_subnet_id')
         return_values = ({'status': 200}, {'ports': []})
-        port_list_mock = mock.patch.object(iso_creds.network_admin_client,
+        port_list_mock = mock.patch.object(creds.network_admin_client,
                                            'list_ports',
                                            return_value=return_values)
 
         port_list_mock.start()
-        secgroup_list_mock = mock.patch.object(iso_creds.network_admin_client,
-                                               'list_security_groups',
-                                               side_effect=side_effect)
+        secgroup_list_mock = mock.patch.object(
+            creds.network_admin_client,
+            'list_security_groups',
+            side_effect=side_effect)
         secgroup_list_mock.start()
 
         return_values = (fake_http.fake_httplib({}, status=204), {})
         remove_secgroup_mock = self.patch(
             'tempest.services.network.json.network_client.'
             'NetworkClient.delete', return_value=return_values)
-        iso_creds.clear_isolated_creds()
+        creds.clear_creds()
         # Verify default security group delete
         calls = remove_secgroup_mock.mock_calls
         self.assertEqual(len(calls), 3)
@@ -432,18 +431,18 @@
 
     @mock.patch('tempest_lib.common.rest_client.RestClient')
     def test_network_alt_creation(self, MockRestClient):
-        iso_creds = isolated_creds.IsolatedCreds(name='test class')
+        creds = dynamic_creds.DynamicCredentialProvider(name='test class')
         self._mock_assign_user_role()
         self._mock_list_role()
         self._mock_user_create('1234', 'fake_alt_user')
         self._mock_tenant_create('1234', 'fake_alt_tenant')
-        self._mock_network_create(iso_creds, '1234', 'fake_alt_net')
-        self._mock_subnet_create(iso_creds, '1234', 'fake_alt_subnet')
+        self._mock_network_create(creds, '1234', 'fake_alt_net')
+        self._mock_subnet_create(creds, '1234', 'fake_alt_subnet')
         self._mock_router_create('1234', 'fake_alt_router')
         router_interface_mock = self.patch(
             'tempest.services.network.json.network_client.NetworkClient.'
             'add_router_interface_with_subnet_id')
-        alt_creds = iso_creds.get_alt_creds()
+        alt_creds = creds.get_alt_creds()
         router_interface_mock.called_once_with('1234', '1234')
         network = alt_creds.network
         subnet = alt_creds.subnet
@@ -457,18 +456,18 @@
 
     @mock.patch('tempest_lib.common.rest_client.RestClient')
     def test_network_admin_creation(self, MockRestClient):
-        iso_creds = isolated_creds.IsolatedCreds(name='test class')
+        creds = dynamic_creds.DynamicCredentialProvider(name='test class')
         self._mock_assign_user_role()
         self._mock_user_create('1234', 'fake_admin_user')
         self._mock_tenant_create('1234', 'fake_admin_tenant')
-        self._mock_network_create(iso_creds, '1234', 'fake_admin_net')
-        self._mock_subnet_create(iso_creds, '1234', 'fake_admin_subnet')
+        self._mock_network_create(creds, '1234', 'fake_admin_net')
+        self._mock_subnet_create(creds, '1234', 'fake_admin_subnet')
         self._mock_router_create('1234', 'fake_admin_router')
         router_interface_mock = self.patch(
             'tempest.services.network.json.network_client.NetworkClient.'
             'add_router_interface_with_subnet_id')
         self._mock_list_roles('123456', 'admin')
-        admin_creds = iso_creds.get_admin_creds()
+        admin_creds = creds.get_admin_creds()
         router_interface_mock.called_once_with('1234', '1234')
         network = admin_creds.network
         subnet = admin_creds.subnet
@@ -488,23 +487,23 @@
             'subnet': False,
             'dhcp': False,
         }
-        iso_creds = isolated_creds.IsolatedCreds(name='test class',
-                                                 network_resources=net_dict)
+        creds = dynamic_creds.DynamicCredentialProvider(
+            name='test class', network_resources=net_dict)
         self._mock_assign_user_role()
         self._mock_list_role()
         self._mock_user_create('1234', 'fake_prim_user')
         self._mock_tenant_create('1234', 'fake_prim_tenant')
-        net = mock.patch.object(iso_creds.networks_admin_client,
+        net = mock.patch.object(creds.networks_admin_client,
                                 'delete_network')
         net_mock = net.start()
-        subnet = mock.patch.object(iso_creds.network_admin_client,
+        subnet = mock.patch.object(creds.network_admin_client,
                                    'delete_subnet')
         subnet_mock = subnet.start()
-        router = mock.patch.object(iso_creds.network_admin_client,
+        router = mock.patch.object(creds.network_admin_client,
                                    'delete_router')
         router_mock = router.start()
 
-        primary_creds = iso_creds.get_primary_creds()
+        primary_creds = creds.get_primary_creds()
         self.assertEqual(net_mock.mock_calls, [])
         self.assertEqual(subnet_mock.mock_calls, [])
         self.assertEqual(router_mock.mock_calls, [])
@@ -523,14 +522,14 @@
             'subnet': False,
             'dhcp': False,
         }
-        iso_creds = isolated_creds.IsolatedCreds(name='test class',
-                                                 network_resources=net_dict)
+        creds = dynamic_creds.DynamicCredentialProvider(
+            name='test class', network_resources=net_dict)
         self._mock_assign_user_role()
         self._mock_list_role()
         self._mock_user_create('1234', 'fake_prim_user')
         self._mock_tenant_create('1234', 'fake_prim_tenant')
         self.assertRaises(exceptions.InvalidConfiguration,
-                          iso_creds.get_primary_creds)
+                          creds.get_primary_creds)
 
     @mock.patch('tempest_lib.common.rest_client.RestClient')
     def test_subnet_without_network(self, MockRestClient):
@@ -540,14 +539,14 @@
             'subnet': True,
             'dhcp': False,
         }
-        iso_creds = isolated_creds.IsolatedCreds(name='test class',
-                                                 network_resources=net_dict)
+        creds = dynamic_creds.DynamicCredentialProvider(
+            name='test class', network_resources=net_dict)
         self._mock_assign_user_role()
         self._mock_list_role()
         self._mock_user_create('1234', 'fake_prim_user')
         self._mock_tenant_create('1234', 'fake_prim_tenant')
         self.assertRaises(exceptions.InvalidConfiguration,
-                          iso_creds.get_primary_creds)
+                          creds.get_primary_creds)
 
     @mock.patch('tempest_lib.common.rest_client.RestClient')
     def test_dhcp_without_subnet(self, MockRestClient):
@@ -557,11 +556,11 @@
             'subnet': False,
             'dhcp': True,
         }
-        iso_creds = isolated_creds.IsolatedCreds(name='test class',
-                                                 network_resources=net_dict)
+        creds = dynamic_creds.DynamicCredentialProvider(
+            name='test class', network_resources=net_dict)
         self._mock_assign_user_role()
         self._mock_list_role()
         self._mock_user_create('1234', 'fake_prim_user')
         self._mock_tenant_create('1234', 'fake_prim_tenant')
         self.assertRaises(exceptions.InvalidConfiguration,
-                          iso_creds.get_primary_creds)
+                          creds.get_primary_creds)
diff --git a/tox.ini b/tox.ini
index 3250344..09c8626 100644
--- a/tox.ini
+++ b/tox.ini
@@ -24,7 +24,7 @@
          bash tools/pretty_tox.sh '{posargs}'
 
 [testenv:genconfig]
-commands = oslo-config-generator --config-file tools/config/config-generator.tempest.conf
+commands = oslo-config-generator --config-file etc/config-generator.tempest.conf
 
 [testenv:cover]
 setenv = OS_TEST_PATH=./tempest/tests
