diff --git a/doc/source/configuration.rst b/doc/source/configuration.rst
index 1b2b6d2..7f1e292 100644
--- a/doc/source/configuration.rst
+++ b/doc/source/configuration.rst
@@ -9,26 +9,16 @@
 config file which explains the purpose of each individual option. You can see
 the sample config file here: :ref:`tempest-sampleconf`
 
-Lock Path
----------
-
-There are some tests and operations inside of tempest that need to be
-externally locked when running in parallel to prevent them from running at
-the same time. This is a mandatory step for configuring tempest and is still
-needed even when running serially. All that is needed to do this is:
-
- #. Set the lock_path option in the oslo_concurrency group
-
 Auth/Credentials
 ----------------
 
 Tempest currently has 2 different ways in configuration to provide credentials
 to use when running tempest. One is a traditional set of configuration options
-in the tempest.conf file. These options are in the identity section and let you
-specify a regular user, a global admin user, and an alternate user set of
-credentials. (which consist of a username, password, and project/tenant name)
-These options should be clearly labelled in the sample config file in the
-identity section.
+in the tempest.conf file. These options are in the auth and identity sections
+and let you specify a global admin user, a regular user and an alternate user
+set of credentials. (which consist of a username, password, and project/tenant
+name) These options should be clearly labelled in the sample config file in the
+auth and identity sections.
 
 The other method to provide credentials is using the accounts.yaml file. This
 file is used to specify an arbitrary number of users available to run tests
@@ -119,6 +109,9 @@
  #. Provide tempest with the location of your accounts.yaml file with the
     test_accounts_file option in the auth section
 
+    *NOTE: Be sure to use a full path for the file otherwise Tempest will
+    likely not find it.*
+
  #. Set use_dynamic_credentials = False in the auth group
 
 It is worth pointing out that each set of credentials in the accounts.yaml
@@ -136,21 +129,21 @@
 non-tenant isolated case was converted to internally work similarly to the
 accounts.yaml file. This mechanism was then called the legacy test accounts
 provider. To use the legacy test accounts provider you can specify the sets of
-credentials in the configuration file like detailed above with following 9
+credentials in the configuration file like detailed above with following 6
 options in the identity section:
 
  #. username
  #. password
  #. tenant_name
- #. admin_username
- #. admin_password
- #. admin_tenant_name
  #. alt_username
  #. alt_password
  #. alt_tenant_name
 
 And in the auth section:
-
+ 
+ #. admin_username
+ #. admin_password
+ #. admin_tenant_name
  #. use_dynamic_credentials = False
  #. comment out 'test_accounts_file' or keep it as empty
 
diff --git a/requirements.txt b/requirements.txt
index df04ca8..469b294 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -16,11 +16,11 @@
 oslo.i18n>=1.5.0 # Apache-2.0
 oslo.log>=1.12.0 # Apache-2.0
 oslo.serialization>=1.10.0 # Apache-2.0
-oslo.utils>=2.8.0 # Apache-2.0
+oslo.utils>=3.2.0 # Apache-2.0
 six>=1.9.0
 iso8601>=0.1.9
 fixtures>=1.3.1
 testscenarios>=0.4
-tempest-lib>=0.11.0
+tempest-lib>=0.12.0
 PyYAML>=3.1.0
 stevedore>=1.5.0 # Apache-2.0
diff --git a/run_tempest.sh b/run_tempest.sh
index a704684..8c8f25f 100755
--- a/run_tempest.sh
+++ b/run_tempest.sh
@@ -14,8 +14,6 @@
   echo "  -C, --config             Config file location"
   echo "  -h, --help               Print this usage message"
   echo "  -d, --debug              Run tests with testtools instead of testr. This allows you to use PDB"
-  echo "  -l, --logging            Enable logging"
-  echo "  -L, --logging-config     Logging config file location.  Default is etc/logging.conf"
   echo "  -- [TESTROPTIONS]        After the first '--' you can pass arbitrary arguments to testr "
 }
 
@@ -31,10 +29,8 @@
 wrapper=""
 config_file=""
 update=0
-logging=0
-logging_config=etc/logging.conf
 
-if ! options=$(getopt -o VNnfusthdC:lL: -l virtual-env,no-virtual-env,no-site-packages,force,update,smoke,serial,help,debug,config:,logging,logging-config: -- "$@")
+if ! options=$(getopt -o VNnfusthdC:lL: -l virtual-env,no-virtual-env,no-site-packages,force,update,smoke,serial,help,debug,config: -- "$@")
 then
     # parse error
     usage
@@ -55,8 +51,6 @@
     -C|--config) config_file=$2; shift;;
     -s|--smoke) testrargs+="smoke";;
     -t|--serial) serial=1;;
-    -l|--logging) logging=1;;
-    -L|--logging-config) logging_config=$2; shift;;
     --) [ "yes" == "$first_uu" ] || testrargs="$testrargs $1"; first_uu=no  ;;
     *) testrargs="$testrargs $1";;
   esac
@@ -69,16 +63,6 @@
     export TEMPEST_CONFIG=`basename "$config_file"`
 fi
 
-if [ $logging -eq 1 ]; then
-    if [ ! -f "$logging_config" ]; then
-        echo "No such logging config file: $logging_config"
-        exit 1
-    fi
-    logging_config=`readlink -f "$logging_config"`
-    export TEMPEST_LOG_CONFIG_DIR=`dirname "$logging_config"`
-    export TEMPEST_LOG_CONFIG=`basename "$logging_config"`
-fi
-
 cd `dirname "$0"`
 
 if [ $no_site_packages -eq 1 ]; then
diff --git a/tempest/api/compute/admin/test_security_groups.py b/tempest/api/compute/admin/test_security_groups.py
index e31129b..1494745 100644
--- a/tempest/api/compute/admin/test_security_groups.py
+++ b/tempest/api/compute/admin/test_security_groups.py
@@ -13,8 +13,6 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-import testtools
-
 from tempest.api.compute import base
 from tempest.common.utils import data_utils
 from tempest import config
@@ -38,9 +36,6 @@
             self.client.delete_security_group(securitygroup_id)
 
     @test.idempotent_id('49667619-5af9-4c63-ab5d-2cfdd1c8f7f1')
-    @testtools.skipIf(CONF.service_available.neutron,
-                      "Skipped because neutron does not support all_tenants "
-                      "search filter.")
     @test.services('network')
     def test_list_security_groups_list_all_tenants_filter(self):
         # Admin can list security groups of all tenants
diff --git a/tempest/api/compute/base.py b/tempest/api/compute/base.py
index aa8ee3f..f7b3655 100644
--- a/tempest/api/compute/base.py
+++ b/tempest/api/compute/base.py
@@ -55,6 +55,13 @@
     @classmethod
     def setup_credentials(cls):
         cls.set_network_resources()
+        cls.request_microversion = (
+            api_version_utils.select_request_microversion(
+                cls.min_microversion,
+                CONF.compute_feature_enabled.min_microversion))
+        if cls.request_microversion:
+            cls.services_microversion = {
+                CONF.compute.catalog_type: cls.request_microversion}
         super(BaseV2ComputeTest, cls).setup_credentials()
 
     @classmethod
@@ -278,8 +285,8 @@
             # into the delete_volume method as a convenience to the caller.
             volumes_client.wait_for_resource_deletion(volume_id)
         except lib_exc.NotFound:
-            LOG.warn("Unable to delete volume '%s' since it was not found. "
-                     "Maybe it was already deleted?" % volume_id)
+            LOG.warning("Unable to delete volume '%s' since it was not found. "
+                        "Maybe it was already deleted?" % volume_id)
 
     @classmethod
     def prepare_instance_network(cls):
diff --git a/tempest/api/compute/servers/test_server_personality.py b/tempest/api/compute/servers/test_server_personality.py
index 58d26d3..c948f8c 100644
--- a/tempest/api/compute/servers/test_server_personality.py
+++ b/tempest/api/compute/servers/test_server_personality.py
@@ -55,13 +55,14 @@
         file_path = '/test.txt'
         personality = [{'path': file_path,
                         'contents': base64.b64encode(file_contents)}]
-        server = self.create_test_server(personality=personality,
-                                         wait_until='ACTIVE',
-                                         validatable=True)
+        created_server = self.create_test_server(personality=personality,
+                                                 wait_until='ACTIVE',
+                                                 validatable=True)
+        server = self.client.show_server(created_server['id'])['server']
         if CONF.validation.run_validation:
             linux_client = remote_client.RemoteClient(
                 self.get_server_ip(server),
-                self.ssh_user, server['adminPass'],
+                self.ssh_user, created_server['adminPass'],
                 self.validation_resources['keypair']['private_key'])
             self.assertEqual(file_contents,
                              linux_client.exec_command(
@@ -116,13 +117,14 @@
                 'path': path,
                 'contents': base64.b64encode(file_contents),
             })
-        server = self.create_test_server(personality=person,
-                                         wait_until='ACTIVE',
-                                         validatable=True)
+        created_server = self.create_test_server(personality=person,
+                                                 wait_until='ACTIVE',
+                                                 validatable=True)
+        server = self.client.show_server(created_server['id'])['server']
         if CONF.validation.run_validation:
             linux_client = remote_client.RemoteClient(
                 self.get_server_ip(server),
-                self.ssh_user, server['adminPass'],
+                self.ssh_user, created_server['adminPass'],
                 self.validation_resources['keypair']['private_key'])
             for i in person:
                 self.assertEqual(base64.b64decode(i['contents']),
diff --git a/tempest/api/identity/admin/v2/test_roles.py b/tempest/api/identity/admin/v2/test_roles.py
index e547bdd..3f3d16e 100644
--- a/tempest/api/identity/admin/v2/test_roles.py
+++ b/tempest/api/identity/admin/v2/test_roles.py
@@ -27,7 +27,7 @@
         super(RolesTestJSON, cls).resource_setup()
         for _ in moves.xrange(5):
             role_name = data_utils.rand_name(name='role')
-            role = cls.roles_client.create_role(role_name)['role']
+            role = cls.roles_client.create_role(name=role_name)['role']
             cls.data.roles.append(role)
 
     def _get_role_params(self):
@@ -57,7 +57,7 @@
     def test_role_create_delete(self):
         """Role should be created, verified, and deleted."""
         role_name = data_utils.rand_name(name='role-test')
-        body = self.roles_client.create_role(role_name)['role']
+        body = self.roles_client.create_role(name=role_name)['role']
         self.assertEqual(role_name, body['name'])
 
         body = self.roles_client.list_roles()['roles']
diff --git a/tempest/api/identity/admin/v2/test_roles_negative.py b/tempest/api/identity/admin/v2/test_roles_negative.py
index a57163d..c9af7c6 100644
--- a/tempest/api/identity/admin/v2/test_roles_negative.py
+++ b/tempest/api/identity/admin/v2/test_roles_negative.py
@@ -53,7 +53,7 @@
     def test_role_create_blank_name(self):
         # Should not be able to create a role with a blank name
         self.assertRaises(lib_exc.BadRequest, self.roles_client.create_role,
-                          '')
+                          name='')
 
     @test.attr(type=['negative'])
     @test.idempotent_id('585c8998-a8a4-4641-a5dd-abef7a8ced00')
@@ -61,7 +61,8 @@
         # Non-administrator user should not be able to create role
         role_name = data_utils.rand_name(name='role')
         self.assertRaises(lib_exc.Forbidden,
-                          self.non_admin_roles_client.create_role, role_name)
+                          self.non_admin_roles_client.create_role,
+                          name=role_name)
 
     @test.attr(type=['negative'])
     @test.idempotent_id('a7edd17a-e34a-4aab-8bb7-fa6f498645b8')
@@ -71,7 +72,7 @@
         self.client.delete_token(token)
         role_name = data_utils.rand_name(name='role')
         self.assertRaises(lib_exc.Unauthorized,
-                          self.roles_client.create_role, role_name)
+                          self.roles_client.create_role, name=role_name)
         self.client.auth_provider.clear_auth()
 
     @test.attr(type=['negative'])
@@ -79,18 +80,18 @@
     def test_role_create_duplicate(self):
         # Role names should be unique
         role_name = data_utils.rand_name(name='role-dup')
-        body = self.roles_client.create_role(role_name)['role']
+        body = self.roles_client.create_role(name=role_name)['role']
         role1_id = body.get('id')
         self.addCleanup(self.roles_client.delete_role, role1_id)
         self.assertRaises(lib_exc.Conflict, self.roles_client.create_role,
-                          role_name)
+                          name=role_name)
 
     @test.attr(type=['negative'])
     @test.idempotent_id('15347635-b5b1-4a87-a280-deb2bd6d865e')
     def test_delete_role_by_unauthorized_user(self):
         # Non-administrator user should not be able to delete role
         role_name = data_utils.rand_name(name='role')
-        body = self.roles_client.create_role(role_name)['role']
+        body = self.roles_client.create_role(name=role_name)['role']
         self.data.roles.append(body)
         role_id = body.get('id')
         self.assertRaises(lib_exc.Forbidden,
@@ -101,7 +102,7 @@
     def test_delete_role_request_without_token(self):
         # Request to delete role without a valid token should fail
         role_name = data_utils.rand_name(name='role')
-        body = self.roles_client.create_role(role_name)['role']
+        body = self.roles_client.create_role(name=role_name)['role']
         self.data.roles.append(body)
         role_id = body.get('id')
         token = self.client.auth_provider.get_token()
diff --git a/tempest/api/identity/admin/v2/test_tokens.py b/tempest/api/identity/admin/v2/test_tokens.py
index e752b02..fdb5a5a 100644
--- a/tempest/api/identity/admin/v2/test_tokens.py
+++ b/tempest/api/identity/admin/v2/test_tokens.py
@@ -77,7 +77,7 @@
 
         # Create a role
         role_name = data_utils.rand_name(name='role')
-        role = self.roles_client.create_role(role_name)['role']
+        role = self.roles_client.create_role(name=role_name)['role']
         self.data.roles.append(role)
 
         # Grant the user the role on the tenants.
diff --git a/tempest/api/identity/admin/v2/test_users.py b/tempest/api/identity/admin/v2/test_users.py
index 2e9714e..d886524 100644
--- a/tempest/api/identity/admin/v2/test_users.py
+++ b/tempest/api/identity/admin/v2/test_users.py
@@ -202,7 +202,7 @@
         # Updating the user with new password
         new_pass = data_utils.rand_password()
         update_user = self.client.update_user_password(
-            self.data.user['id'], new_pass)['user']
+            self.data.user['id'], password=new_pass)['user']
         self.assertEqual(update_user['id'], self.data.user['id'])
 
         # Validate the updated password
diff --git a/tempest/api/identity/admin/v3/test_endpoints.py b/tempest/api/identity/admin/v3/test_endpoints.py
index 429e2e3..2ac832e 100644
--- a/tempest/api/identity/admin/v3/test_endpoints.py
+++ b/tempest/api/identity/admin/v3/test_endpoints.py
@@ -34,8 +34,8 @@
         s_type = data_utils.rand_name('type')
         s_description = data_utils.rand_name('description')
         cls.service_data = (
-            cls.service_client.create_service(name=s_name, type=s_type,
-                                              description=s_description))
+            cls.services_client.create_service(name=s_name, type=s_type,
+                                               description=s_description))
         cls.service_data = cls.service_data['service']
         cls.service_id = cls.service_data['id']
         cls.service_ids.append(cls.service_id)
@@ -56,7 +56,7 @@
         for e in cls.setup_endpoints:
             cls.client.delete_endpoint(e['id'])
         for s in cls.service_ids:
-            cls.service_client.delete_service(s)
+            cls.services_client.delete_service(s)
         super(EndPointsTestJSON, cls).resource_cleanup()
 
     @test.idempotent_id('c19ecf90-240e-4e23-9966-21cee3f6a618')
@@ -113,8 +113,8 @@
         s_type = data_utils.rand_name('type')
         s_description = data_utils.rand_name('description')
         service2 = (
-            self.service_client.create_service(name=s_name, type=s_type,
-                                               description=s_description))
+            self.services_client.create_service(name=s_name, type=s_type,
+                                                description=s_description))
         service2 = service2['service']
         self.service_ids.append(service2['id'])
         # Updating endpoint with new values
diff --git a/tempest/api/identity/admin/v3/test_endpoints_negative.py b/tempest/api/identity/admin/v3/test_endpoints_negative.py
index 8f9bf2a..372254f 100644
--- a/tempest/api/identity/admin/v3/test_endpoints_negative.py
+++ b/tempest/api/identity/admin/v3/test_endpoints_negative.py
@@ -37,8 +37,8 @@
         s_type = data_utils.rand_name('type')
         s_description = data_utils.rand_name('description')
         cls.service_data = (
-            cls.service_client.create_service(name=s_name, type=s_type,
-                                              description=s_description)
+            cls.services_client.create_service(name=s_name, type=s_type,
+                                               description=s_description)
             ['service'])
         cls.service_id = cls.service_data['id']
         cls.service_ids.append(cls.service_id)
@@ -46,7 +46,7 @@
     @classmethod
     def resource_cleanup(cls):
         for s in cls.service_ids:
-            cls.service_client.delete_service(s)
+            cls.services_client.delete_service(s)
         super(EndpointsNegativeTestJSON, cls).resource_cleanup()
 
     @test.attr(type=['negative'])
diff --git a/tempest/api/identity/admin/v3/test_policies.py b/tempest/api/identity/admin/v3/test_policies.py
index f38d25d..3b5e5d4 100644
--- a/tempest/api/identity/admin/v3/test_policies.py
+++ b/tempest/api/identity/admin/v3/test_policies.py
@@ -21,7 +21,7 @@
 class PoliciesTestJSON(base.BaseIdentityV3AdminTest):
 
     def _delete_policy(self, policy_id):
-        self.policy_client.delete_policy(policy_id)
+        self.policies_client.delete_policy(policy_id)
 
     @test.idempotent_id('1a0ad286-2d06-4123-ab0d-728893a76201')
     def test_list_policies(self):
@@ -31,13 +31,13 @@
         for _ in range(3):
             blob = data_utils.rand_name('BlobName')
             policy_type = data_utils.rand_name('PolicyType')
-            policy = self.policy_client.create_policy(
+            policy = self.policies_client.create_policy(
                 blob=blob, type=policy_type)['policy']
             # Delete the Policy at the end of this method
             self.addCleanup(self._delete_policy, policy['id'])
             policy_ids.append(policy['id'])
         # List and Verify Policies
-        body = self.policy_client.list_policies()['policies']
+        body = self.policies_client.list_policies()['policies']
         for p in body:
             fetched_ids.append(p['id'])
         missing_pols = [p for p in policy_ids if p not in fetched_ids]
@@ -49,8 +49,8 @@
         # Test to update policy
         blob = data_utils.rand_name('BlobName')
         policy_type = data_utils.rand_name('PolicyType')
-        policy = self.policy_client.create_policy(blob=blob,
-                                                  type=policy_type)['policy']
+        policy = self.policies_client.create_policy(blob=blob,
+                                                    type=policy_type)['policy']
         self.addCleanup(self._delete_policy, policy['id'])
         self.assertIn('id', policy)
         self.assertIn('type', policy)
@@ -60,11 +60,12 @@
         self.assertEqual(policy_type, policy['type'])
         # Update policy
         update_type = data_utils.rand_name('UpdatedPolicyType')
-        data = self.policy_client.update_policy(
+        data = self.policies_client.update_policy(
             policy['id'], type=update_type)['policy']
         self.assertIn('type', data)
         # Assertion for updated value with fetched value
-        fetched_policy = self.policy_client.show_policy(policy['id'])['policy']
+        fetched_policy = self.policies_client.show_policy(
+            policy['id'])['policy']
         self.assertIn('id', fetched_policy)
         self.assertIn('blob', fetched_policy)
         self.assertIn('type', fetched_policy)
diff --git a/tempest/api/identity/admin/v3/test_regions.py b/tempest/api/identity/admin/v3/test_regions.py
index ec1b12e..8bba3cb 100644
--- a/tempest/api/identity/admin/v3/test_regions.py
+++ b/tempest/api/identity/admin/v3/test_regions.py
@@ -25,7 +25,7 @@
     @classmethod
     def setup_clients(cls):
         super(RegionsTestJSON, cls).setup_clients()
-        cls.client = cls.region_client
+        cls.client = cls.regions_client
 
     @classmethod
     def resource_setup(cls):
diff --git a/tempest/api/identity/admin/v3/test_roles.py b/tempest/api/identity/admin/v3/test_roles.py
index f194d9c..ae714aa 100644
--- a/tempest/api/identity/admin/v3/test_roles.py
+++ b/tempest/api/identity/admin/v3/test_roles.py
@@ -25,7 +25,7 @@
         super(RolesV3TestJSON, cls).resource_setup()
         for _ in range(3):
             role_name = data_utils.rand_name(name='role')
-            role = cls.client.create_role(role_name)['role']
+            role = cls.client.create_role(name=role_name)['role']
             cls.data.v3_roles.append(role)
         cls.fetched_role_ids = list()
         u_name = data_utils.rand_name('user')
@@ -47,7 +47,7 @@
             email=u_email, project_id=cls.project['id'],
             domain_id=cls.domain['id'])['user']
         cls.role = cls.client.create_role(
-            data_utils.rand_name('Role'))['role']
+            name=data_utils.rand_name('Role'))['role']
 
     @classmethod
     def resource_cleanup(cls):
@@ -69,13 +69,14 @@
     @test.idempotent_id('18afc6c0-46cf-4911-824e-9989cc056c3a')
     def test_role_create_update_get_list(self):
         r_name = data_utils.rand_name('Role')
-        role = self.client.create_role(r_name)['role']
+        role = self.client.create_role(name=r_name)['role']
         self.addCleanup(self.client.delete_role, role['id'])
         self.assertIn('name', role)
         self.assertEqual(role['name'], r_name)
 
         new_name = data_utils.rand_name('NewRole')
-        updated_role = self.client.update_role(new_name, role['id'])['role']
+        updated_role = self.client.update_role(role['id'],
+                                               name=new_name)['role']
         self.assertIn('name', updated_role)
         self.assertIn('id', updated_role)
         self.assertIn('links', updated_role)
diff --git a/tempest/api/identity/admin/v3/test_services.py b/tempest/api/identity/admin/v3/test_services.py
index d1595dd..c6e3df4 100644
--- a/tempest/api/identity/admin/v3/test_services.py
+++ b/tempest/api/identity/admin/v3/test_services.py
@@ -24,9 +24,9 @@
 
     def _del_service(self, service_id):
         # Used for deleting the services created in this class
-        self.service_client.delete_service(service_id)
+        self.services_client.delete_service(service_id)
         # Checking whether service is deleted successfully
-        self.assertRaises(lib_exc.NotFound, self.service_client.show_service,
+        self.assertRaises(lib_exc.NotFound, self.services_client.show_service,
                           service_id)
 
     @test.attr(type='smoke')
@@ -36,7 +36,7 @@
         name = data_utils.rand_name('service')
         serv_type = data_utils.rand_name('type')
         desc = data_utils.rand_name('description')
-        create_service = self.service_client.create_service(
+        create_service = self.services_client.create_service(
             type=serv_type, name=name, description=desc)['service']
         self.addCleanup(self._del_service, create_service['id'])
         self.assertIsNotNone(create_service['id'])
@@ -49,14 +49,14 @@
         s_id = create_service['id']
         resp1_desc = create_service['description']
         s_desc2 = data_utils.rand_name('desc2')
-        update_service = self.service_client.update_service(
+        update_service = self.services_client.update_service(
             s_id, description=s_desc2)['service']
         resp2_desc = update_service['description']
 
         self.assertNotEqual(resp1_desc, resp2_desc)
 
         # Get service
-        fetched_service = self.service_client.show_service(s_id)['service']
+        fetched_service = self.services_client.show_service(s_id)['service']
         resp3_desc = fetched_service['description']
 
         self.assertEqual(resp2_desc, resp3_desc)
@@ -67,9 +67,9 @@
         # Create a service only with name and type
         name = data_utils.rand_name('service')
         serv_type = data_utils.rand_name('type')
-        service = self.service_client.create_service(
+        service = self.services_client.create_service(
             type=serv_type, name=name)['service']
-        self.addCleanup(self.service_client.delete_service, service['id'])
+        self.addCleanup(self.services_client.delete_service, service['id'])
         self.assertIn('id', service)
         expected_data = {'name': name, 'type': serv_type}
         self.assertDictContainsSubset(expected_data, service)
@@ -81,14 +81,14 @@
         for _ in range(3):
             name = data_utils.rand_name('service')
             serv_type = data_utils.rand_name('type')
-            create_service = self.service_client.create_service(
+            create_service = self.services_client.create_service(
                 type=serv_type, name=name)['service']
-            self.addCleanup(self.service_client.delete_service,
+            self.addCleanup(self.services_client.delete_service,
                             create_service['id'])
             service_ids.append(create_service['id'])
 
         # List and Verify Services
-        services = self.service_client.list_services()['services']
+        services = self.services_client.list_services()['services']
         fetched_ids = [service['id'] for service in services]
         found = [s for s in fetched_ids if s in service_ids]
         self.assertEqual(len(found), len(service_ids))
diff --git a/tempest/api/identity/admin/v3/test_tokens.py b/tempest/api/identity/admin/v3/test_tokens.py
index f5b20d5..b1446cf 100644
--- a/tempest/api/identity/admin/v3/test_tokens.py
+++ b/tempest/api/identity/admin/v3/test_tokens.py
@@ -76,7 +76,7 @@
 
         # Create a role
         role_name = data_utils.rand_name(name='role')
-        role = self.client.create_role(role_name)['role']
+        role = self.client.create_role(name=role_name)['role']
         self.addCleanup(self.client.delete_role, role['id'])
 
         # Grant the user the role on both projects.
diff --git a/tempest/api/identity/admin/v3/test_trusts.py b/tempest/api/identity/admin/v3/test_trusts.py
index bf7ad71..85961b4 100644
--- a/tempest/api/identity/admin/v3/test_trusts.py
+++ b/tempest/api/identity/admin/v3/test_trusts.py
@@ -69,10 +69,10 @@
         self.delegated_role = data_utils.rand_name('DelegatedRole')
         self.not_delegated_role = data_utils.rand_name('NotDelegatedRole')
 
-        role = self.client.create_role(self.delegated_role)['role']
+        role = self.client.create_role(name=self.delegated_role)['role']
         self.delegated_role_id = role['id']
 
-        role = self.client.create_role(self.not_delegated_role)['role']
+        role = self.client.create_role(name=self.not_delegated_role)['role']
         self.not_delegated_role_id = role['id']
 
         # Assign roles to trustor
diff --git a/tempest/api/identity/admin/v3/test_users.py b/tempest/api/identity/admin/v3/test_users.py
index 6dbd443..a402b3f 100644
--- a/tempest/api/identity/admin/v3/test_users.py
+++ b/tempest/api/identity/admin/v3/test_users.py
@@ -117,7 +117,7 @@
         self.addCleanup(self.client.delete_user, user_body['id'])
         # Creating Role
         role_body = self.client.create_role(
-            data_utils.rand_name('role'))['role']
+            name=data_utils.rand_name('role'))['role']
         # Delete the Role at the end of this method
         self.addCleanup(self.client.delete_role, role_body['id'])
 
diff --git a/tempest/api/identity/base.py b/tempest/api/identity/base.py
index 1a4c8bb..d68a204 100644
--- a/tempest/api/identity/base.py
+++ b/tempest/api/identity/base.py
@@ -30,7 +30,7 @@
     @classmethod
     def disable_user(cls, user_name):
         user = cls.get_user_by_name(user_name)
-        cls.client.enable_disable_user(user['id'], False)
+        cls.client.enable_disable_user(user['id'], enabled=False)
 
     @classmethod
     def disable_tenant(cls, tenant_name):
@@ -143,9 +143,9 @@
         cls.client = cls.os_adm.identity_v3_client
         cls.token = cls.os_adm.token_v3_client
         cls.endpoints_client = cls.os_adm.endpoints_client
-        cls.region_client = cls.os_adm.region_client
-        cls.service_client = cls.os_adm.service_client
-        cls.policy_client = cls.os_adm.policy_client
+        cls.regions_client = cls.os_adm.regions_client
+        cls.services_client = cls.os_adm.identity_services_client
+        cls.policies_client = cls.os_adm.policies_client
         cls.creds_client = cls.os_adm.credentials_client
         cls.groups_client = cls.os_adm.groups_client
 
@@ -237,7 +237,8 @@
         def setup_test_role(self):
             """Set up a test role."""
             self.test_role = data_utils.rand_name('role')
-            self.role = self.roles_client.create_role(self.test_role)['role']
+            self.role = self.roles_client.create_role(
+                name=self.test_role)['role']
             self.roles.append(self.role)
 
         def setup_test_v3_user(self):
@@ -265,7 +266,7 @@
         def setup_test_v3_role(self):
             """Set up a test v3 role."""
             self.test_role = data_utils.rand_name('role')
-            self.v3_role = self.client.create_role(self.test_role)['role']
+            self.v3_role = self.client.create_role(name=self.test_role)['role']
             self.v3_roles.append(self.v3_role)
 
         def setup_test_domain(self):
diff --git a/tempest/api/identity/v2/test_users.py b/tempest/api/identity/v2/test_users.py
index 5f2a8c4..98a2e68 100644
--- a/tempest/api/identity/v2/test_users.py
+++ b/tempest/api/identity/v2/test_users.py
@@ -51,14 +51,10 @@
         # to change password back. important for allow_tenant_isolation = false
         self.addCleanup(
             self.non_admin_client_for_cleanup.update_user_own_password,
-            user_id=user_id,
-            new_pass=old_pass,
-            old_pass=new_pass)
-
+            user_id, original_password=new_pass, password=old_pass)
         # user updates own password
         self.non_admin_client.update_user_own_password(
-            user_id=user_id, new_pass=new_pass, old_pass=old_pass)
-
+            user_id, password=new_pass, original_password=old_pass)
         # TODO(lbragstad): Sleeping after the response status has been checked
         # and the body loaded as JSON allows requests to fail-fast. The sleep
         # is necessary because keystone will err on the side of security and
diff --git a/tempest/api/network/admin/test_agent_management.py b/tempest/api/network/admin/test_agent_management.py
index 64802aa..61f8e15 100644
--- a/tempest/api/network/admin/test_agent_management.py
+++ b/tempest/api/network/admin/test_agent_management.py
@@ -29,13 +29,13 @@
     @classmethod
     def resource_setup(cls):
         super(AgentManagementTestJSON, cls).resource_setup()
-        body = cls.admin_client.list_agents()
+        body = cls.admin_agents_client.list_agents()
         agents = body['agents']
         cls.agent = agents[0]
 
     @test.idempotent_id('9c80f04d-11f3-44a4-8738-ed2f879b0ff4')
     def test_list_agent(self):
-        body = self.admin_client.list_agents()
+        body = self.admin_agents_client.list_agents()
         agents = body['agents']
         # Hearthbeats must be excluded from comparison
         self.agent.pop('heartbeat_timestamp', None)
@@ -47,12 +47,12 @@
 
     @test.idempotent_id('e335be47-b9a1-46fd-be30-0874c0b751e6')
     def test_list_agents_non_admin(self):
-        body = self.client.list_agents()
+        body = self.agents_client.list_agents()
         self.assertEqual(len(body["agents"]), 0)
 
     @test.idempotent_id('869bc8e8-0fda-4a30-9b71-f8a7cf58ca9f')
     def test_show_agent(self):
-        body = self.admin_client.show_agent(self.agent['id'])
+        body = self.admin_agents_client.show_agent(self.agent['id'])
         agent = body['agent']
         self.assertEqual(agent['id'], self.agent['id'])
 
@@ -62,8 +62,8 @@
         # Try to update the 'admin_state_up' to the original
         # one to avoid the negative effect.
         agent_status = {'admin_state_up': origin_status}
-        body = self.admin_client.update_agent(agent_id=self.agent['id'],
-                                              agent=agent_status)
+        body = self.admin_agents_client.update_agent(agent_id=self.agent['id'],
+                                                     agent=agent_status)
         updated_status = body['agent']['admin_state_up']
         self.assertEqual(origin_status, updated_status)
 
@@ -72,8 +72,8 @@
         self.useFixture(fixtures.LockFixture('agent_description'))
         description = 'description for update agent.'
         agent_description = {'description': description}
-        body = self.admin_client.update_agent(agent_id=self.agent['id'],
-                                              agent=agent_description)
+        body = self.admin_agents_client.update_agent(agent_id=self.agent['id'],
+                                                     agent=agent_description)
         self.addCleanup(self._restore_agent)
         updated_description = body['agent']['description']
         self.assertEqual(updated_description, description)
@@ -83,5 +83,5 @@
 
         description = self.agent['description'] or ''
         origin_agent = {'description': description}
-        self.admin_client.update_agent(agent_id=self.agent['id'],
-                                       agent=origin_agent)
+        self.admin_agents_client.update_agent(agent_id=self.agent['id'],
+                                              agent=origin_agent)
diff --git a/tempest/api/network/admin/test_dhcp_agent_scheduler.py b/tempest/api/network/admin/test_dhcp_agent_scheduler.py
index 7692b56..5ff465b 100644
--- a/tempest/api/network/admin/test_dhcp_agent_scheduler.py
+++ b/tempest/api/network/admin/test_dhcp_agent_scheduler.py
@@ -51,7 +51,7 @@
 
     def _check_network_in_dhcp_agent(self, network_id, agent):
         network_ids = []
-        body = self.admin_client.list_networks_hosted_by_one_dhcp_agent(
+        body = self.admin_agents_client.list_networks_hosted_by_one_dhcp_agent(
             agent['id'])
         networks = body['networks']
         for network in networks:
@@ -65,7 +65,7 @@
         self.ports.remove(self.port)
         agent = dict()
         agent['agent_type'] = None
-        body = self.admin_client.list_agents()
+        body = self.admin_agents_client.list_agents()
         agents = body['agents']
         for a in agents:
             if a['agent_type'] == 'DHCP agent':
@@ -84,14 +84,14 @@
             self._remove_network_from_dhcp_agent(network_id, agent)
 
     def _remove_network_from_dhcp_agent(self, network_id, agent):
-        self.admin_client.remove_network_from_dhcp_agent(
+        self.admin_agents_client.remove_network_from_dhcp_agent(
             agent_id=agent['id'],
             network_id=network_id)
         self.assertFalse(self._check_network_in_dhcp_agent(
             network_id, agent))
 
     def _add_dhcp_agent_to_network(self, network_id, agent):
-        self.admin_client.add_dhcp_agent_to_network(agent['id'],
-                                                    network_id)
+        self.admin_agents_client.add_dhcp_agent_to_network(
+            agent['id'], network_id=network_id)
         self.assertTrue(self._check_network_in_dhcp_agent(
             network_id, agent))
diff --git a/tempest/api/network/admin/test_l3_agent_scheduler.py b/tempest/api/network/admin/test_l3_agent_scheduler.py
index 36747a3..2e8fd50 100644
--- a/tempest/api/network/admin/test_l3_agent_scheduler.py
+++ b/tempest/api/network/admin/test_l3_agent_scheduler.py
@@ -51,7 +51,7 @@
     @classmethod
     def resource_setup(cls):
         super(L3AgentSchedulerTestJSON, cls).resource_setup()
-        body = cls.admin_client.list_agents()
+        body = cls.admin_agents_client.list_agents()
         agents = body['agents']
         for agent in agents:
             # TODO(armax): falling back on default _agent_mode can be
@@ -90,12 +90,12 @@
 
     @test.idempotent_id('b7ce6e89-e837-4ded-9b78-9ed3c9c6a45a')
     def test_list_routers_on_l3_agent(self):
-        self.admin_client.list_routers_on_l3_agent(self.agent['id'])
+        self.admin_agents_client.list_routers_on_l3_agent(self.agent['id'])
 
     @test.idempotent_id('9464e5e7-8625-49c3-8fd1-89c52be59d66')
     def test_add_list_remove_router_on_l3_agent(self):
         l3_agent_ids = list()
-        self.admin_client.add_router_to_l3_agent(
+        self.admin_agents_client.add_router_to_l3_agent(
             self.agent['id'],
             router_id=self.router['id'])
         body = (
@@ -105,7 +105,7 @@
             self.assertIn('agent_type', agent)
             self.assertEqual('L3 agent', agent['agent_type'])
         self.assertIn(self.agent['id'], l3_agent_ids)
-        body = self.admin_client.remove_router_from_l3_agent(
+        body = self.admin_agents_client.remove_router_from_l3_agent(
             self.agent['id'],
             self.router['id'])
         # NOTE(afazekas): The deletion not asserted, because neutron
diff --git a/tempest/api/network/base.py b/tempest/api/network/base.py
index f1fd3e9..2a1776a 100644
--- a/tempest/api/network/base.py
+++ b/tempest/api/network/base.py
@@ -71,11 +71,14 @@
     def setup_clients(cls):
         super(BaseNetworkTest, cls).setup_clients()
         cls.client = cls.os.network_client
+        cls.agents_client = cls.os.network_agents_client
         cls.networks_client = cls.os.networks_client
+        cls.subnetpools_client = cls.os.subnetpools_client
         cls.subnets_client = cls.os.subnets_client
         cls.ports_client = cls.os.ports_client
         cls.quotas_client = cls.os.network_quotas_client
         cls.floating_ips_client = cls.os.floating_ips_client
+        cls.security_groups_client = cls.os.security_groups_client
 
     @classmethod
     def resource_setup(cls):
@@ -272,6 +275,7 @@
     def setup_clients(cls):
         super(BaseAdminNetworkTest, cls).setup_clients()
         cls.admin_client = cls.os_adm.network_client
+        cls.admin_agents_client = cls.os_adm.network_agents_client
         cls.admin_networks_client = cls.os_adm.networks_client
         cls.admin_subnets_client = cls.os_adm.subnets_client
         cls.admin_ports_client = cls.os_adm.ports_client
diff --git a/tempest/api/network/base_security_groups.py b/tempest/api/network/base_security_groups.py
index 1cef2cc..1525e19 100644
--- a/tempest/api/network/base_security_groups.py
+++ b/tempest/api/network/base_security_groups.py
@@ -22,17 +22,18 @@
     def _create_security_group(self):
         # Create a security group
         name = data_utils.rand_name('secgroup-')
-        group_create_body = self.client.create_security_group(name=name)
+        group_create_body = (
+            self.security_groups_client.create_security_group(name=name))
         self.addCleanup(self._delete_security_group,
                         group_create_body['security_group']['id'])
         self.assertEqual(group_create_body['security_group']['name'], name)
         return group_create_body, name
 
     def _delete_security_group(self, secgroup_id):
-        self.client.delete_security_group(secgroup_id)
+        self.security_groups_client.delete_security_group(secgroup_id)
         # Asserting that the security group is not found in the list
         # after deletion
-        list_body = self.client.list_security_groups()
+        list_body = self.security_groups_client.list_security_groups()
         secgroup_list = list()
         for secgroup in list_body['security_groups']:
             secgroup_list.append(secgroup['id'])
diff --git a/tempest/api/network/test_networks.py b/tempest/api/network/test_networks.py
index a266142..1c446ef 100644
--- a/tempest/api/network/test_networks.py
+++ b/tempest/api/network/test_networks.py
@@ -449,9 +449,9 @@
     @test.idempotent_id('d4f9024d-1e28-4fc1-a6b1-25dbc6fa11e2')
     def test_bulk_create_delete_network(self):
         # Creates 2 networks in one request
-        network_names = [data_utils.rand_name('network-'),
-                         data_utils.rand_name('network-')]
-        body = self.client.create_bulk_network(network_names)
+        network_list = [{'name': data_utils.rand_name('network-')},
+                        {'name': data_utils.rand_name('network-')}]
+        body = self.client.create_bulk_network(networks=network_list)
         created_networks = body['networks']
         self.addCleanup(self._delete_networks, created_networks)
         # Asserting that the networks are found in the list after creation
@@ -486,7 +486,7 @@
             }
             subnets_list.append(p1)
         del subnets_list[1]['name']
-        body = self.client.create_bulk_subnet(subnets_list)
+        body = self.client.create_bulk_subnet(subnets=subnets_list)
         created_subnets = body['subnets']
         self.addCleanup(self._delete_subnets, created_subnets)
         # Asserting that the subnets are found in the list after creation
@@ -512,7 +512,7 @@
             }
             port_list.append(p1)
         del port_list[1]['name']
-        body = self.client.create_bulk_port(port_list)
+        body = self.client.create_bulk_port(ports=port_list)
         created_ports = body['ports']
         self.addCleanup(self._delete_ports, created_ports)
         # Asserting that the ports are found in the list after creation
diff --git a/tempest/api/network/test_ports.py b/tempest/api/network/test_ports.py
index 43da1c4..67f2c83 100644
--- a/tempest/api/network/test_ports.py
+++ b/tempest/api/network/test_ports.py
@@ -74,7 +74,7 @@
         network2 = self.create_network(network_name=name)
         network_list = [network1['id'], network2['id']]
         port_list = [{'network_id': net_id} for net_id in network_list]
-        body = self.client.create_bulk_port(port_list)
+        body = self.client.create_bulk_port(ports=port_list)
         created_ports = body['ports']
         port1 = created_ports[0]
         port2 = created_ports[1]
@@ -250,17 +250,19 @@
         fixed_ip_1 = [{'subnet_id': subnet_1['id']}]
 
         security_groups_list = list()
+        sec_grps_client = self.security_groups_client
         for name in security_groups_names:
-            group_create_body = self.client.create_security_group(
+            group_create_body = sec_grps_client.create_security_group(
                 name=name)
-            self.addCleanup(self.client.delete_security_group,
+            self.addCleanup(self.security_groups_client.delete_security_group,
                             group_create_body['security_group']['id'])
             security_groups_list.append(group_create_body['security_group']
                                         ['id'])
         # Create a port
         sec_grp_name = data_utils.rand_name('secgroup')
-        security_group = self.client.create_security_group(name=sec_grp_name)
-        self.addCleanup(self.client.delete_security_group,
+        security_group = sec_grps_client.create_security_group(
+            name=sec_grp_name)
+        self.addCleanup(self.security_groups_client.delete_security_group,
                         security_group['security_group']['id'])
         post_body = {
             "name": data_utils.rand_name('port-'),
diff --git a/tempest/api/network/test_security_groups.py b/tempest/api/network/test_security_groups.py
index ccc5232..cf45328 100644
--- a/tempest/api/network/test_security_groups.py
+++ b/tempest/api/network/test_security_groups.py
@@ -71,7 +71,7 @@
     @test.idempotent_id('e30abd17-fef9-4739-8617-dc26da88e686')
     def test_list_security_groups(self):
         # Verify the that security group belonging to tenant exist in list
-        body = self.client.list_security_groups()
+        body = self.security_groups_client.list_security_groups()
         security_groups = body['security_groups']
         found = None
         for n in security_groups:
@@ -86,7 +86,7 @@
         group_create_body, name = self._create_security_group()
 
         # List security groups and verify if created group is there in response
-        list_body = self.client.list_security_groups()
+        list_body = self.security_groups_client.list_security_groups()
         secgroup_list = list()
         for secgroup in list_body['security_groups']:
             secgroup_list.append(secgroup['id'])
@@ -94,7 +94,7 @@
         # Update the security group
         new_name = data_utils.rand_name('security-')
         new_description = data_utils.rand_name('security-description')
-        update_body = self.client.update_security_group(
+        update_body = self.security_groups_client.update_security_group(
             group_create_body['security_group']['id'],
             name=new_name,
             description=new_description)
@@ -103,7 +103,7 @@
         self.assertEqual(update_body['security_group']['description'],
                          new_description)
         # Show details of the updated security group
-        show_body = self.client.show_security_group(
+        show_body = self.security_groups_client.show_security_group(
             group_create_body['security_group']['id'])
         self.assertEqual(show_body['security_group']['name'], new_name)
         self.assertEqual(show_body['security_group']['description'],
diff --git a/tempest/api/network/test_security_groups_negative.py b/tempest/api/network/test_security_groups_negative.py
index f80ea59..58e39e9 100644
--- a/tempest/api/network/test_security_groups_negative.py
+++ b/tempest/api/network/test_security_groups_negative.py
@@ -38,8 +38,9 @@
     @test.idempotent_id('424fd5c3-9ddc-486a-b45f-39bf0c820fc6')
     def test_show_non_existent_security_group(self):
         non_exist_id = str(uuid.uuid4())
-        self.assertRaises(lib_exc.NotFound, self.client.show_security_group,
-                          non_exist_id)
+        self.assertRaises(
+            lib_exc.NotFound, self.security_groups_client.show_security_group,
+            non_exist_id)
 
     @test.attr(type=['negative'])
     @test.idempotent_id('4c094c09-000b-4e41-8100-9617600c02a6')
@@ -54,7 +55,7 @@
     def test_delete_non_existent_security_group(self):
         non_exist_id = str(uuid.uuid4())
         self.assertRaises(lib_exc.NotFound,
-                          self.client.delete_security_group,
+                          self.security_groups_client.delete_security_group,
                           non_exist_id
                           )
 
@@ -163,7 +164,7 @@
         # Create security group named 'default', it should be failed.
         name = 'default'
         self.assertRaises(lib_exc.Conflict,
-                          self.client.create_security_group,
+                          self.security_groups_client.create_security_group,
                           name=name)
 
     @test.attr(type=['negative'])
diff --git a/tempest/api/network/test_subnetpools_extensions.py b/tempest/api/network/test_subnetpools_extensions.py
index 8a61ff8..29d1d89 100644
--- a/tempest/api/network/test_subnetpools_extensions.py
+++ b/tempest/api/network/test_subnetpools_extensions.py
@@ -50,27 +50,28 @@
         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)
+        body = self.subnetpools_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)
+        body = self.subnetpools_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)
+        body = self.subnetpools_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,
+        body = self.subnetpools_client.delete_subnetpools(subnetpool_id)
+        self.assertRaises(lib_exc.NotFound,
+                          self.subnetpools_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)
+            self.subnetpools_client.delete_subnetpools(subnetpool_id)
         except lib_exc.NotFound:
             pass
diff --git a/tempest/api/telemetry/base.py b/tempest/api/telemetry/base.py
index 8b617ac..bbf6db2 100644
--- a/tempest/api/telemetry/base.py
+++ b/tempest/api/telemetry/base.py
@@ -75,10 +75,11 @@
         return body
 
     @classmethod
-    def create_image(cls, client):
-        body = client.create_image(
-            name=data_utils.rand_name('image'), container_format='bare',
-            disk_format='raw', visibility='private')
+    def create_image(cls, client, **kwargs):
+        body = client.create_image(name=data_utils.rand_name('image'),
+                                   container_format='bare',
+                                   disk_format='raw',
+                                   **kwargs)
         # TODO(jswarren) Move ['image'] up to initial body value assignment
         # once both v1 and v2 glance clients include the full response
         # object.
diff --git a/tempest/api/telemetry/test_telemetry_notification_api.py b/tempest/api/telemetry/test_telemetry_notification_api.py
index 7511505..a575125 100644
--- a/tempest/api/telemetry/test_telemetry_notification_api.py
+++ b/tempest/api/telemetry/test_telemetry_notification_api.py
@@ -39,7 +39,7 @@
     @testtools.skipIf(not CONF.image_feature_enabled.api_v1,
                       "Glance api v1 is disabled")
     def test_check_glance_v1_notifications(self):
-        body = self.create_image(self.image_client)
+        body = self.create_image(self.image_client, is_public=False)
         self.image_client.update_image(body['id'], data='data')
 
         query = 'resource', 'eq', body['id']
@@ -55,7 +55,7 @@
     @testtools.skipIf(not CONF.image_feature_enabled.api_v2,
                       "Glance api v2 is disabled")
     def test_check_glance_v2_notifications(self):
-        body = self.create_image(self.image_client_v2)
+        body = self.create_image(self.image_client_v2, visibility='private')
 
         self.image_client_v2.store_image_file(body['id'], "file")
         self.image_client_v2.show_image_file(body['id'])
diff --git a/tempest/api/volume/admin/test_multi_backend.py b/tempest/api/volume/admin/test_multi_backend.py
index 6d2aaea..8e43b00 100644
--- a/tempest/api/volume/admin/test_multi_backend.py
+++ b/tempest/api/volume/admin/test_multi_backend.py
@@ -71,7 +71,7 @@
         else:
             extra_specs = {spec_key_without_prefix: backend_name_key}
         self.type = self.volume_types_client.create_volume_type(
-            type_name, extra_specs=extra_specs)['volume_type']
+            name=type_name, extra_specs=extra_specs)['volume_type']
         self.volume_type_id_list.append(self.type['id'])
 
         params = {self.name_field: vol_name, 'volume_type': type_name}
diff --git a/tempest/api/volume/admin/test_volume_types.py b/tempest/api/volume/admin/test_volume_types.py
index 2d9019a..acb591d 100644
--- a/tempest/api/volume/admin/test_volume_types.py
+++ b/tempest/api/volume/admin/test_volume_types.py
@@ -32,7 +32,7 @@
 
     @test.idempotent_id('9d9b28e3-1b2e-4483-a2cc-24aa0ea1de54')
     def test_volume_type_list(self):
-        # List Volume types.
+        # List volume types.
         body = self.volume_types_client.list_volume_types()['volume_types']
         self.assertIsInstance(body, list)
 
@@ -50,7 +50,7 @@
         for i in range(2):
             vol_type_name = data_utils.rand_name("volume-type")
             vol_type = self.volume_types_client.create_volume_type(
-                vol_type_name,
+                name=vol_type_name,
                 extra_specs=extra_specs)['volume_type']
             volume_types.append(vol_type)
             self.addCleanup(self._delete_volume_type, vol_type['id'])
@@ -97,7 +97,7 @@
         extra_specs = {"storage_protocol": proto,
                        "vendor_name": vendor}
         body = self.volume_types_client.create_volume_type(
-            name,
+            name=name,
             extra_specs=extra_specs)['volume_type']
         self.assertIn('id', body)
         self.addCleanup(self._delete_volume_type, body['id'])
@@ -125,7 +125,8 @@
         provider = "LuksEncryptor"
         control_location = "front-end"
         name = data_utils.rand_name("volume-type")
-        body = self.volume_types_client.create_volume_type(name)['volume_type']
+        body = self.volume_types_client.create_volume_type(
+            name=name)['volume_type']
         self.addCleanup(self._delete_volume_type, body['id'])
 
         # Create encryption type
diff --git a/tempest/api/volume/admin/test_volume_types_extra_specs.py b/tempest/api/volume/admin/test_volume_types_extra_specs.py
index bec803c..502cd86 100644
--- a/tempest/api/volume/admin/test_volume_types_extra_specs.py
+++ b/tempest/api/volume/admin/test_volume_types_extra_specs.py
@@ -25,7 +25,7 @@
         super(VolumeTypesExtraSpecsV2Test, cls).resource_setup()
         vol_type_name = data_utils.rand_name('Volume-type')
         cls.volume_type = cls.volume_types_client.create_volume_type(
-            vol_type_name)['volume_type']
+            name=vol_type_name)['volume_type']
 
     @classmethod
     def resource_cleanup(cls):
diff --git a/tempest/api/volume/admin/test_volume_types_extra_specs_negative.py b/tempest/api/volume/admin/test_volume_types_extra_specs_negative.py
index 040ef53..6483af3 100644
--- a/tempest/api/volume/admin/test_volume_types_extra_specs_negative.py
+++ b/tempest/api/volume/admin/test_volume_types_extra_specs_negative.py
@@ -30,7 +30,7 @@
         vol_type_name = data_utils.rand_name('Volume-type')
         cls.extra_specs = {"spec1": "val1"}
         cls.volume_type = cls.volume_types_client.create_volume_type(
-            vol_type_name,
+            name=vol_type_name,
             extra_specs=cls.extra_specs)['volume_type']
 
     @classmethod
@@ -70,7 +70,7 @@
     def test_update_multiple_extra_spec(self):
         # Should not update volume type extra specs with multiple specs as
             # body.
-        extra_spec = {"spec1": "val2", 'spec2': 'val1'}
+        extra_spec = {"spec1": "val2", "spec2": "val1"}
         self.assertRaises(
             lib_exc.BadRequest,
             self.volume_types_client.update_volume_type_extra_specs,
@@ -101,7 +101,7 @@
         self.assertRaises(
             lib_exc.BadRequest,
             self.volume_types_client.create_volume_type_extra_specs,
-            self.volume_type['id'], ['invalid'])
+            self.volume_type['id'], extra_specs=['invalid'])
 
     @test.idempotent_id('031cda8b-7d23-4246-8bf6-bbe73fd67074')
     def test_delete_nonexistent_volume_type_id(self):
diff --git a/tempest/api/volume/admin/test_volume_types_negative.py b/tempest/api/volume/admin/test_volume_types_negative.py
index 2694b63..bc32fc9 100644
--- a/tempest/api/volume/admin/test_volume_types_negative.py
+++ b/tempest/api/volume/admin/test_volume_types_negative.py
@@ -36,7 +36,7 @@
     def test_create_with_empty_name(self):
         # Should not be able to create volume type with an empty name.
         self.assertRaises(lib_exc.BadRequest,
-                          self.volume_types_client.create_volume_type, '')
+                          self.volume_types_client.create_volume_type, name='')
 
     @test.idempotent_id('994610d6-0476-4018-a644-a2602ef5d4aa')
     def test_get_nonexistent_type_id(self):
diff --git a/tempest/api/volume/base.py b/tempest/api/volume/base.py
index 12e6761..5c4d0e1 100644
--- a/tempest/api/volume/base.py
+++ b/tempest/api/volume/base.py
@@ -217,8 +217,8 @@
         """create a test Qos-Specs."""
         name = name or data_utils.rand_name(cls.__name__ + '-QoS')
         consumer = consumer or 'front-end'
-        qos_specs = cls.volume_qos_client.create_qos(name, consumer,
-                                                     **kwargs)['qos_specs']
+        qos_specs = cls.volume_qos_client.create_qos(
+            name=name, consumer=consumer, **kwargs)['qos_specs']
         cls.qos_specs.append(qos_specs['id'])
         return qos_specs
 
diff --git a/tempest/api/volume/test_qos.py b/tempest/api/volume/test_qos.py
index 2f7c3df..722a39a 100644
--- a/tempest/api/volume/test_qos.py
+++ b/tempest/api/volume/test_qos.py
@@ -53,7 +53,7 @@
     def _create_test_volume_type(self):
         vol_type_name = utils.rand_name("volume-type")
         vol_type = self.volume_types_client.create_volume_type(
-            vol_type_name)['volume_type']
+            name=vol_type_name)['volume_type']
         self.addCleanup(self.volume_types_client.delete_volume_type,
                         vol_type['id'])
         return vol_type
diff --git a/tempest/api_schema/response/compute/v2_1/floating_ips.py b/tempest/api_schema/response/compute/v2_1/floating_ips.py
deleted file mode 100644
index 3551681..0000000
--- a/tempest/api_schema/response/compute/v2_1/floating_ips.py
+++ /dev/null
@@ -1,148 +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 tempest.api_schema.response.compute.v2_1 import parameter_types
-
-common_floating_ip_info = {
-    'type': 'object',
-    'properties': {
-        # NOTE: Now the type of 'id' is integer, but
-        # here allows 'string' also because we will be
-        # able to change it to 'uuid' in the future.
-        'id': {'type': ['integer', 'string']},
-        'pool': {'type': ['string', 'null']},
-        'instance_id': {'type': ['string', 'null']},
-        'ip': parameter_types.ip_address,
-        'fixed_ip': parameter_types.ip_address
-    },
-    'additionalProperties': False,
-    'required': ['id', 'pool', 'instance_id',
-                 'ip', 'fixed_ip'],
-
-}
-list_floating_ips = {
-    'status_code': [200],
-    'response_body': {
-        'type': 'object',
-        'properties': {
-            'floating_ips': {
-                'type': 'array',
-                'items': common_floating_ip_info
-            },
-        },
-        'additionalProperties': False,
-        'required': ['floating_ips'],
-    }
-}
-
-create_get_floating_ip = {
-    'status_code': [200],
-    'response_body': {
-        'type': 'object',
-        'properties': {
-            'floating_ip': common_floating_ip_info
-        },
-        'additionalProperties': False,
-        'required': ['floating_ip'],
-    }
-}
-
-list_floating_ip_pools = {
-    'status_code': [200],
-    'response_body': {
-        'type': 'object',
-        'properties': {
-            'floating_ip_pools': {
-                'type': 'array',
-                'items': {
-                    'type': 'object',
-                    'properties': {
-                        'name': {'type': 'string'}
-                    },
-                    'additionalProperties': False,
-                    'required': ['name'],
-                }
-            }
-        },
-        'additionalProperties': False,
-        'required': ['floating_ip_pools'],
-    }
-}
-
-add_remove_floating_ip = {
-    'status_code': [202]
-}
-
-create_floating_ips_bulk = {
-    'status_code': [200],
-    'response_body': {
-        'type': 'object',
-        'properties': {
-            'floating_ips_bulk_create': {
-                'type': 'object',
-                'properties': {
-                    'interface': {'type': ['string', 'null']},
-                    'ip_range': {'type': 'string'},
-                    'pool': {'type': ['string', 'null']},
-                },
-                'additionalProperties': False,
-                'required': ['interface', 'ip_range', 'pool'],
-            }
-        },
-        'additionalProperties': False,
-        'required': ['floating_ips_bulk_create'],
-    }
-}
-
-delete_floating_ips_bulk = {
-    'status_code': [200],
-    'response_body': {
-        'type': 'object',
-        'properties': {
-            'floating_ips_bulk_delete': {'type': 'string'}
-        },
-        'additionalProperties': False,
-        'required': ['floating_ips_bulk_delete'],
-    }
-}
-
-list_floating_ips_bulk = {
-    'status_code': [200],
-    'response_body': {
-        'type': 'object',
-        'properties': {
-            'floating_ip_info': {
-                'type': 'array',
-                'items': {
-                    'type': 'object',
-                    'properties': {
-                        'address': parameter_types.ip_address,
-                        'instance_uuid': {'type': ['string', 'null']},
-                        'interface': {'type': ['string', 'null']},
-                        'pool': {'type': ['string', 'null']},
-                        'project_id': {'type': ['string', 'null']},
-                        'fixed_ip': parameter_types.ip_address
-                    },
-                    'additionalProperties': False,
-                    # NOTE: fixed_ip is introduced after JUNO release,
-                    # So it is not defined as 'required'.
-                    'required': ['address', 'instance_uuid', 'interface',
-                                 'pool', 'project_id'],
-                }
-            }
-        },
-        'additionalProperties': False,
-        'required': ['floating_ip_info'],
-    }
-}
diff --git a/tempest/api_schema/response/compute/v2_1/parameter_types.py b/tempest/api_schema/response/compute/v2_1/parameter_types.py
deleted file mode 100644
index 07cc890..0000000
--- a/tempest/api_schema/response/compute/v2_1/parameter_types.py
+++ /dev/null
@@ -1,96 +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.
-
-links = {
-    'type': 'array',
-    'items': {
-        'type': 'object',
-        'properties': {
-            'href': {
-                'type': 'string',
-                'format': 'uri'
-            },
-            'rel': {'type': 'string'}
-        },
-        'additionalProperties': False,
-        'required': ['href', 'rel']
-    }
-}
-
-mac_address = {
-    'type': 'string',
-    'pattern': '(?:[a-f0-9]{2}:){5}[a-f0-9]{2}'
-}
-
-ip_address = {
-    'oneOf': [
-        {
-            'type': 'string',
-            'oneOf': [
-                {'format': 'ipv4'},
-                {'format': 'ipv6'}
-            ]
-        },
-        {'type': 'null'}
-    ]
-}
-
-access_ip_v4 = {
-    'type': 'string',
-    'oneOf': [{'format': 'ipv4'}, {'enum': ['']}]
-}
-
-access_ip_v6 = {
-    'type': 'string',
-    'oneOf': [{'format': 'ipv6'}, {'enum': ['']}]
-}
-
-addresses = {
-    'type': 'object',
-    'patternProperties': {
-        # NOTE: Here is for 'private' or something.
-        '^[a-zA-Z0-9-_.]+$': {
-            'type': 'array',
-            'items': {
-                'type': 'object',
-                'properties': {
-                    'version': {'type': 'integer'},
-                    'addr': {
-                        'type': 'string',
-                        'oneOf': [
-                            {'format': 'ipv4'},
-                            {'format': 'ipv6'}
-                        ]
-                    }
-                },
-                'additionalProperties': False,
-                'required': ['version', 'addr']
-            }
-        }
-    }
-}
-
-response_header = {
-    'connection': {'type': 'string'},
-    'content-length': {'type': 'string'},
-    'content-type': {'type': 'string'},
-    'status': {'type': 'string'},
-    'x-compute-request-id': {'type': 'string'},
-    'vary': {'type': 'string'},
-    'x-openstack-nova-api-version': {'type': 'string'},
-    'date': {
-        'type': 'string',
-        'format': 'data-time'
-    }
-}
diff --git a/tempest/api_schema/response/compute/v2_1/security_groups.py b/tempest/api_schema/response/compute/v2_1/security_groups.py
deleted file mode 100644
index 5ed5a5c..0000000
--- a/tempest/api_schema/response/compute/v2_1/security_groups.py
+++ /dev/null
@@ -1,113 +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.
-
-common_security_group_rule = {
-    'from_port': {'type': ['integer', 'null']},
-    'to_port': {'type': ['integer', 'null']},
-    'group': {
-        'type': 'object',
-        'properties': {
-            'tenant_id': {'type': 'string'},
-            'name': {'type': 'string'}
-        },
-        'additionalProperties': False,
-    },
-    'ip_protocol': {'type': ['string', 'null']},
-    # 'parent_group_id' can be UUID so defining it as 'string' also.
-    'parent_group_id': {'type': ['string', 'integer', 'null']},
-    'ip_range': {
-        'type': 'object',
-        'properties': {
-            'cidr': {'type': 'string'}
-        },
-        'additionalProperties': False,
-        # When optional argument is provided in request body
-        # like 'group_id' then, attribute 'cidr' does not
-        # comes in response body. So it is not 'required'.
-    },
-    'id': {'type': ['string', 'integer']}
-}
-
-common_security_group = {
-    'type': 'object',
-    'properties': {
-        'id': {'type': ['integer', 'string']},
-        'name': {'type': 'string'},
-        'tenant_id': {'type': 'string'},
-        'rules': {
-            'type': 'array',
-            'items': {
-                'type': ['object', 'null'],
-                'properties': common_security_group_rule,
-                'additionalProperties': False,
-            }
-        },
-        'description': {'type': 'string'},
-    },
-    'additionalProperties': False,
-    'required': ['id', 'name', 'tenant_id', 'rules', 'description'],
-}
-
-list_security_groups = {
-    'status_code': [200],
-    'response_body': {
-        'type': 'object',
-        'properties': {
-            'security_groups': {
-                'type': 'array',
-                'items': common_security_group
-            }
-        },
-        'additionalProperties': False,
-        'required': ['security_groups']
-    }
-}
-
-get_security_group = create_security_group = update_security_group = {
-    'status_code': [200],
-    'response_body': {
-        'type': 'object',
-        'properties': {
-            'security_group': common_security_group
-        },
-        'additionalProperties': False,
-        'required': ['security_group']
-    }
-}
-
-delete_security_group = {
-    'status_code': [202]
-}
-
-create_security_group_rule = {
-    'status_code': [200],
-    'response_body': {
-        'type': 'object',
-        'properties': {
-            'security_group_rule': {
-                'type': 'object',
-                'properties': common_security_group_rule,
-                'additionalProperties': False,
-                'required': ['from_port', 'to_port', 'group', 'ip_protocol',
-                             'parent_group_id', 'id', 'ip_range']
-            }
-        },
-        'additionalProperties': False,
-        'required': ['security_group_rule']
-    }
-}
-
-delete_security_group_rule = {
-    'status_code': [202]
-}
diff --git a/tempest/api_schema/response/compute/v2_1/servers.py b/tempest/api_schema/response/compute/v2_1/servers.py
deleted file mode 100644
index 38f7c82..0000000
--- a/tempest/api_schema/response/compute/v2_1/servers.py
+++ /dev/null
@@ -1,549 +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
-
-from tempest.api_schema.response.compute.v2_1 import parameter_types
-
-create_server = {
-    'status_code': [202],
-    'response_body': {
-        'type': 'object',
-        'properties': {
-            'server': {
-                'type': 'object',
-                'properties': {
-                    'id': {'type': 'string'},
-                    'security_groups': {'type': 'array'},
-                    'links': parameter_types.links,
-                    'OS-DCF:diskConfig': {'type': 'string'}
-                },
-                'additionalProperties': False,
-                # NOTE: OS-DCF:diskConfig & security_groups are API extension,
-                # and some environments return a response without these
-                # attributes.So they are not 'required'.
-                'required': ['id', 'links']
-            }
-        },
-        'additionalProperties': False,
-        'required': ['server']
-    }
-}
-
-create_server_with_admin_pass = copy.deepcopy(create_server)
-create_server_with_admin_pass['response_body']['properties']['server'][
-    'properties'].update({'adminPass': {'type': 'string'}})
-create_server_with_admin_pass['response_body']['properties']['server'][
-    'required'].append('adminPass')
-
-list_servers = {
-    'status_code': [200],
-    'response_body': {
-        'type': 'object',
-        'properties': {
-            'servers': {
-                'type': 'array',
-                'items': {
-                    'type': 'object',
-                    'properties': {
-                        'id': {'type': 'string'},
-                        'links': parameter_types.links,
-                        'name': {'type': 'string'}
-                    },
-                    'additionalProperties': False,
-                    'required': ['id', 'links', 'name']
-                }
-            },
-            'servers_links': parameter_types.links
-        },
-        'additionalProperties': False,
-        # NOTE(gmann): servers_links attribute is not necessary to be
-        # present always So it is not 'required'.
-        'required': ['servers']
-    }
-}
-
-delete_server = {
-    'status_code': [204],
-}
-
-common_show_server = {
-    'type': 'object',
-    'properties': {
-        'id': {'type': 'string'},
-        'name': {'type': 'string'},
-        'status': {'type': 'string'},
-        'image': {'oneOf': [
-            {'type': 'object',
-                'properties': {
-                    'id': {'type': 'string'},
-                    'links': parameter_types.links
-                },
-                'additionalProperties': False,
-                'required': ['id', 'links']},
-            {'type': ['string', 'null']}
-        ]},
-        'flavor': {
-            'type': 'object',
-            'properties': {
-                'id': {'type': 'string'},
-                'links': parameter_types.links
-            },
-            'additionalProperties': False,
-            'required': ['id', 'links']
-        },
-        'fault': {
-            'type': 'object',
-            'properties': {
-                'code': {'type': 'integer'},
-                'created': {'type': 'string'},
-                'message': {'type': 'string'},
-                'details': {'type': 'string'},
-            },
-            'additionalProperties': False,
-            # NOTE(gmann): 'details' is not necessary to be present
-            #  in the 'fault'. So it is not defined as 'required'.
-            'required': ['code', 'created', 'message']
-        },
-        'user_id': {'type': 'string'},
-        'tenant_id': {'type': 'string'},
-        'created': {'type': 'string'},
-        'updated': {'type': 'string'},
-        'progress': {'type': 'integer'},
-        'metadata': {'type': 'object'},
-        'links': parameter_types.links,
-        'addresses': parameter_types.addresses,
-        'hostId': {'type': 'string'},
-        'OS-DCF:diskConfig': {'type': 'string'},
-        'accessIPv4': parameter_types.access_ip_v4,
-        'accessIPv6': parameter_types.access_ip_v6
-    },
-    'additionalProperties': False,
-    # NOTE(GMann): 'progress' attribute is present in the response
-    # only when server's status is one of the progress statuses
-    # ("ACTIVE","BUILD", "REBUILD", "RESIZE","VERIFY_RESIZE")
-    # 'fault' attribute is present in the response
-    # only when server's status is one of the  "ERROR", "DELETED".
-    # OS-DCF:diskConfig and accessIPv4/v6 are API
-    # extensions, and some environments return a response
-    # without these attributes.So these are not defined as 'required'.
-    'required': ['id', 'name', 'status', 'image', 'flavor',
-                 'user_id', 'tenant_id', 'created', 'updated',
-                 'metadata', 'links', 'addresses', 'hostId']
-}
-
-update_server = {
-    'status_code': [200],
-    'response_body': {
-        'type': 'object',
-        'properties': {
-            'server': common_show_server
-        },
-        'additionalProperties': False,
-        'required': ['server']
-    }
-}
-
-server_detail = copy.deepcopy(common_show_server)
-server_detail['properties'].update({
-    'key_name': {'type': ['string', 'null']},
-    'security_groups': {'type': 'array'},
-
-    # NOTE: Non-admin users also can see "OS-SRV-USG" and "OS-EXT-AZ"
-    # attributes.
-    'OS-SRV-USG:launched_at': {'type': ['string', 'null']},
-    'OS-SRV-USG:terminated_at': {'type': ['string', 'null']},
-    'OS-EXT-AZ:availability_zone': {'type': 'string'},
-
-    # NOTE: Admin users only can see "OS-EXT-STS" and "OS-EXT-SRV-ATTR"
-    # attributes.
-    'OS-EXT-STS:task_state': {'type': ['string', 'null']},
-    'OS-EXT-STS:vm_state': {'type': 'string'},
-    'OS-EXT-STS:power_state': {'type': 'integer'},
-    'OS-EXT-SRV-ATTR:host': {'type': ['string', 'null']},
-    'OS-EXT-SRV-ATTR:instance_name': {'type': 'string'},
-    'OS-EXT-SRV-ATTR:hypervisor_hostname': {'type': ['string', 'null']},
-    'os-extended-volumes:volumes_attached': {'type': 'array'},
-    'config_drive': {'type': 'string'}
-})
-server_detail['properties']['addresses']['patternProperties'][
-    '^[a-zA-Z0-9-_.]+$']['items']['properties'].update({
-        'OS-EXT-IPS:type': {'type': 'string'},
-        'OS-EXT-IPS-MAC:mac_addr': parameter_types.mac_address})
-# NOTE(gmann): Update OS-EXT-IPS:type and OS-EXT-IPS-MAC:mac_addr
-# attributes in server address. Those are API extension,
-# and some environments return a response without
-# these attributes. So they are not 'required'.
-
-get_server = {
-    'status_code': [200],
-    'response_body': {
-        'type': 'object',
-        'properties': {
-            'server': server_detail
-        },
-        'additionalProperties': False,
-        'required': ['server']
-    }
-}
-
-list_servers_detail = {
-    'status_code': [200],
-    'response_body': {
-        'type': 'object',
-        'properties': {
-            'servers': {
-                'type': 'array',
-                'items': server_detail
-            },
-            'servers_links': parameter_types.links
-        },
-        'additionalProperties': False,
-        # NOTE(gmann): servers_links attribute is not necessary to be
-        # present always So it is not 'required'.
-        'required': ['servers']
-    }
-}
-
-rebuild_server = copy.deepcopy(update_server)
-rebuild_server['status_code'] = [202]
-
-rebuild_server_with_admin_pass = copy.deepcopy(rebuild_server)
-rebuild_server_with_admin_pass['response_body']['properties']['server'][
-    'properties'].update({'adminPass': {'type': 'string'}})
-rebuild_server_with_admin_pass['response_body']['properties']['server'][
-    'required'].append('adminPass')
-
-rescue_server = {
-    'status_code': [200],
-    'response_body': {
-        'type': 'object',
-        'properties': {
-            'adminPass': {'type': 'string'}
-        },
-        'additionalProperties': False,
-        'required': ['adminPass']
-    }
-}
-
-list_virtual_interfaces = {
-    'status_code': [200],
-    'response_body': {
-        'type': 'object',
-        'properties': {
-            'virtual_interfaces': {
-                'type': 'array',
-                'items': {
-                    'type': 'object',
-                    'properties': {
-                        'id': {'type': 'string'},
-                        'mac_address': parameter_types.mac_address,
-                        'OS-EXT-VIF-NET:net_id': {'type': 'string'}
-                    },
-                    'additionalProperties': False,
-                    # 'OS-EXT-VIF-NET:net_id' is API extension So it is
-                    # not defined as 'required'
-                    'required': ['id', 'mac_address']
-                }
-            }
-        },
-        'additionalProperties': False,
-        'required': ['virtual_interfaces']
-    }
-}
-
-common_attach_volume_info = {
-    'type': 'object',
-    'properties': {
-        'id': {'type': 'string'},
-        'device': {'type': 'string'},
-        'volumeId': {'type': 'string'},
-        'serverId': {'type': ['integer', 'string']}
-    },
-    'additionalProperties': False,
-    'required': ['id', 'device', 'volumeId', 'serverId']
-}
-
-attach_volume = {
-    'status_code': [200],
-    'response_body': {
-        'type': 'object',
-        'properties': {
-            'volumeAttachment': common_attach_volume_info
-        },
-        'additionalProperties': False,
-        'required': ['volumeAttachment']
-    }
-}
-
-detach_volume = {
-    'status_code': [202]
-}
-
-show_volume_attachment = copy.deepcopy(attach_volume)
-show_volume_attachment['response_body']['properties'][
-    'volumeAttachment']['properties'].update({'serverId': {'type': 'string'}})
-
-list_volume_attachments = {
-    'status_code': [200],
-    'response_body': {
-        'type': 'object',
-        'properties': {
-            'volumeAttachments': {
-                'type': 'array',
-                'items': common_attach_volume_info
-            }
-        },
-        'additionalProperties': False,
-        'required': ['volumeAttachments']
-    }
-}
-list_volume_attachments['response_body']['properties'][
-    'volumeAttachments']['items']['properties'].update(
-    {'serverId': {'type': 'string'}})
-
-list_addresses_by_network = {
-    'status_code': [200],
-    'response_body': parameter_types.addresses
-}
-
-list_addresses = {
-    'status_code': [200],
-    'response_body': {
-        'type': 'object',
-        'properties': {
-            'addresses': parameter_types.addresses
-        },
-        'additionalProperties': False,
-        'required': ['addresses']
-    }
-}
-
-common_server_group = {
-    'type': 'object',
-    'properties': {
-        'id': {'type': 'string'},
-        'name': {'type': 'string'},
-        'policies': {
-            'type': 'array',
-            'items': {'type': 'string'}
-        },
-        # 'members' attribute contains the array of instance's UUID of
-        # instances present in server group
-        'members': {
-            'type': 'array',
-            'items': {'type': 'string'}
-        },
-        'metadata': {'type': 'object'}
-    },
-    'additionalProperties': False,
-    'required': ['id', 'name', 'policies', 'members', 'metadata']
-}
-
-create_show_server_group = {
-    'status_code': [200],
-    'response_body': {
-        'type': 'object',
-        'properties': {
-            'server_group': common_server_group
-        },
-        'additionalProperties': False,
-        'required': ['server_group']
-    }
-}
-
-delete_server_group = {
-    'status_code': [204]
-}
-
-list_server_groups = {
-    'status_code': [200],
-    'response_body': {
-        'type': 'object',
-        'properties': {
-            'server_groups': {
-                'type': 'array',
-                'items': common_server_group
-            }
-        },
-        'additionalProperties': False,
-        'required': ['server_groups']
-    }
-}
-
-instance_actions = {
-    'type': 'object',
-    'properties': {
-        'action': {'type': 'string'},
-        'request_id': {'type': 'string'},
-        'user_id': {'type': 'string'},
-        'project_id': {'type': 'string'},
-        'start_time': {'type': 'string'},
-        'message': {'type': ['string', 'null']},
-        'instance_uuid': {'type': 'string'}
-    },
-    'additionalProperties': False,
-    'required': ['action', 'request_id', 'user_id', 'project_id',
-                 'start_time', 'message', 'instance_uuid']
-}
-
-instance_action_events = {
-    'type': 'array',
-    'items': {
-        'type': 'object',
-        'properties': {
-            'event': {'type': 'string'},
-            'start_time': {'type': 'string'},
-            'finish_time': {'type': 'string'},
-            'result': {'type': 'string'},
-            'traceback': {'type': ['string', 'null']}
-        },
-        'additionalProperties': False,
-        'required': ['event', 'start_time', 'finish_time', 'result',
-                     'traceback']
-    }
-}
-
-list_instance_actions = {
-    'status_code': [200],
-    'response_body': {
-        'type': 'object',
-        'properties': {
-            'instanceActions': {
-                'type': 'array',
-                'items': instance_actions
-            }
-        },
-        'additionalProperties': False,
-        'required': ['instanceActions']
-    }
-}
-
-instance_actions_with_events = copy.deepcopy(instance_actions)
-instance_actions_with_events['properties'].update({
-    'events': instance_action_events})
-# 'events' does not come in response body always so it is not
-# defined as 'required'
-
-show_instance_action = {
-    'status_code': [200],
-    'response_body': {
-        'type': 'object',
-        'properties': {
-            'instanceAction': instance_actions_with_events
-        },
-        'additionalProperties': False,
-        'required': ['instanceAction']
-    }
-}
-
-show_password = {
-    'status_code': [200],
-    'response_body': {
-        'type': 'object',
-        'properties': {
-            'password': {'type': 'string'}
-        },
-        'additionalProperties': False,
-        'required': ['password']
-    }
-}
-
-get_vnc_console = {
-    'status_code': [200],
-    'response_body': {
-        'type': 'object',
-        'properties': {
-            'console': {
-                'type': 'object',
-                'properties': {
-                    'type': {'type': 'string'},
-                    'url': {
-                        'type': 'string',
-                        'format': 'uri'
-                    }
-                },
-                'additionalProperties': False,
-                'required': ['type', 'url']
-            }
-        },
-        'additionalProperties': False,
-        'required': ['console']
-    }
-}
-
-get_console_output = {
-    'status_code': [200],
-    'response_body': {
-        'type': 'object',
-        'properties': {
-            'output': {'type': 'string'}
-        },
-        'additionalProperties': False,
-        'required': ['output']
-    }
-}
-
-set_server_metadata = {
-    'status_code': [200],
-    'response_body': {
-        'type': 'object',
-        'properties': {
-            'metadata': {
-                'type': 'object',
-                'patternProperties': {
-                    '^.+$': {'type': 'string'}
-                }
-            }
-        },
-        'additionalProperties': False,
-        'required': ['metadata']
-    }
-}
-
-list_server_metadata = copy.deepcopy(set_server_metadata)
-
-update_server_metadata = copy.deepcopy(set_server_metadata)
-
-delete_server_metadata_item = {
-    'status_code': [204]
-}
-
-set_show_server_metadata_item = {
-    'status_code': [200],
-    'response_body': {
-        'type': 'object',
-        'properties': {
-            'meta': {
-                'type': 'object',
-                'patternProperties': {
-                    '^.+$': {'type': 'string'}
-                }
-            }
-        },
-        'additionalProperties': False,
-        'required': ['meta']
-    }
-}
-
-server_actions_common_schema = {
-    'status_code': [202]
-}
-
-server_actions_delete_password = {
-    'status_code': [204]
-}
-
-server_actions_confirm_resize = copy.deepcopy(
-    server_actions_delete_password)
diff --git a/tempest/clients.py b/tempest/clients.py
index 761f6f7..772ddfc 100644
--- a/tempest/clients.py
+++ b/tempest/clients.py
@@ -32,6 +32,8 @@
     FloatingIPPoolsClient
 from tempest_lib.services.compute.floating_ips_bulk_client import \
     FloatingIPsBulkClient
+from tempest_lib.services.compute.floating_ips_client import \
+    FloatingIPsClient as ComputeFloatingIPsClient
 from tempest_lib.services.compute.hosts_client import HostsClient
 from tempest_lib.services.compute.hypervisor_client import \
     HypervisorClient
@@ -49,8 +51,13 @@
 from tempest_lib.services.compute.quotas_client import QuotasClient
 from tempest_lib.services.compute.security_group_default_rules_client import \
     SecurityGroupDefaultRulesClient
+from tempest_lib.services.compute.security_group_rules_client import \
+    SecurityGroupRulesClient
 from tempest_lib.services.compute.security_groups_client import \
     SecurityGroupsClient as ComputeSecurityGroupsClient
+from tempest_lib.services.compute.server_groups_client import \
+    ServerGroupsClient
+from tempest_lib.services.compute.servers_client import ServersClient
 from tempest_lib.services.compute.services_client import ServicesClient
 from tempest_lib.services.compute.snapshots_client import \
     SnapshotsClient as ComputeSnapshotsClient
@@ -70,14 +77,7 @@
 from tempest import manager
 from tempest.services.baremetal.v1.json.baremetal_client import \
     BaremetalClient
-from tempest.services.compute.json.floating_ips_client import \
-    FloatingIPsClient as ComputeFloatingIPsClient
 from tempest.services.compute.json.keypairs_client import KeyPairsClient
-from tempest.services.compute.json.security_group_rules_client import \
-    SecurityGroupRulesClient
-from tempest.services.compute.json.server_groups_client import \
-    ServerGroupsClient
-from tempest.services.compute.json.servers_client import ServersClient
 from tempest.services.data_processing.v1_1.data_processing_client import \
     DataProcessingClient
 from tempest.services.database.json.flavors_client import \
@@ -99,16 +99,18 @@
 from tempest.services.identity.v3.json.groups_client import \
     GroupsClient as GroupsV3Client
 from tempest.services.identity.v3.json.identity_client import IdentityV3Client
-from tempest.services.identity.v3.json.policy_client import \
-    PolicyClient as PolicyV3Client
-from tempest.services.identity.v3.json.region_client import \
-    RegionClient as RegionV3Client
-from tempest.services.identity.v3.json.service_client import \
-    ServiceClient as ServiceV3Client
+from tempest.services.identity.v3.json.policies_client import \
+    PoliciesClient as PoliciesV3Client
+from tempest.services.identity.v3.json.regions_client import \
+    RegionsClient as RegionsV3Client
+from tempest.services.identity.v3.json.services_client import \
+    ServicesClient as IdentityServicesV3Client
 from tempest.services.image.v1.json.images_client import ImagesClient
 from tempest.services.image.v2.json.images_client import ImagesClientV2
 from tempest.services.messaging.json.messaging_client import \
     MessagingClient
+from tempest.services.network.json.agents_client import AgentsClient \
+    as NetworkAgentsClient
 from tempest.services.network.json.floating_ips_client import FloatingIPsClient
 from tempest.services.network.json.metering_label_rules_client import \
     MeteringLabelRulesClient
@@ -119,6 +121,9 @@
 from tempest.services.network.json.ports_client import PortsClient
 from tempest.services.network.json.quotas_client import QuotasClient \
     as NetworkQuotasClient
+from tempest.services.network.json.security_groups_client import \
+    SecurityGroupsClient
+from tempest.services.network.json.subnetpools_client import SubnetpoolsClient
 from tempest.services.network.json.subnets_client import SubnetsClient
 from tempest.services.object_storage.account_client import AccountClient
 from tempest.services.object_storage.container_client import ContainerClient
@@ -187,9 +192,30 @@
     }
     default_params_with_timeout_values.update(default_params)
 
-    def __init__(self, credentials, service=None):
-        super(Manager, self).__init__(credentials=credentials)
+    def __init__(self, credentials, service=None, api_microversions=None):
+        """Initialization of Manager class.
 
+        Setup all services clients and make them available for tests cases.
+        :param credentials: type Credentials or TestResources
+        :param service: Service name
+        :param api_microversions: This is dict of services catalog type
+               and their microversion which will be set on respective
+               services clients.
+               {<service catalog type>: request_microversion}
+               Example :
+                {'compute': request_microversion}
+                    - request_microversion will be set on all compute
+                      service clients.
+                OR
+                {'compute': request_microversion,
+                 'volume': request_microversion}
+                    - request_microversion of compute will be set on all
+                      compute service clients.
+                    - request_microversion of volume will be set on all
+                      volume service clients.
+        """
+        super(Manager, self).__init__(credentials=credentials)
+        self.api_microversions = api_microversions or {}
         self._set_compute_clients()
         self._set_database_clients()
         self._set_identity_clients()
@@ -202,6 +228,14 @@
             CONF.identity.region,
             endpoint_type=CONF.baremetal.endpoint_type,
             **self.default_params_with_timeout_values)
+        self.network_agents_client = NetworkAgentsClient(
+            self.auth_provider,
+            CONF.network.catalog_type,
+            CONF.network.region or CONF.identity.region,
+            endpoint_type=CONF.network.endpoint_type,
+            build_interval=CONF.network.build_interval,
+            build_timeout=CONF.network.build_timeout,
+            **self.default_params)
         self.network_client = NetworkClient(
             self.auth_provider,
             CONF.network.catalog_type,
@@ -218,6 +252,14 @@
             build_interval=CONF.network.build_interval,
             build_timeout=CONF.network.build_timeout,
             **self.default_params)
+        self.subnetpools_client = SubnetpoolsClient(
+            self.auth_provider,
+            CONF.network.catalog_type,
+            CONF.network.region or CONF.identity.region,
+            endpoint_type=CONF.network.endpoint_type,
+            build_interval=CONF.network.build_interval,
+            build_timeout=CONF.network.build_timeout,
+            **self.default_params)
         self.subnets_client = SubnetsClient(
             self.auth_provider,
             CONF.network.catalog_type,
@@ -266,6 +308,14 @@
             build_interval=CONF.network.build_interval,
             build_timeout=CONF.network.build_timeout,
             **self.default_params)
+        self.security_groups_client = SecurityGroupsClient(
+            self.auth_provider,
+            CONF.network.catalog_type,
+            CONF.network.region or CONF.identity.region,
+            endpoint_type=CONF.network.endpoint_type,
+            build_interval=CONF.network.build_interval,
+            build_timeout=CONF.network.build_timeout,
+            **self.default_params)
         self.messaging_client = MessagingClient(
             self.auth_provider,
             CONF.messaging.catalog_type,
@@ -319,6 +369,8 @@
         self.negative_client = negative_rest_client.NegativeRestClient(
             self.auth_provider, service, **self.default_params)
 
+        self._set_api_microversions()
+
     def _set_compute_clients(self):
         params = {
             'service': CONF.compute.catalog_type,
@@ -448,9 +500,11 @@
                                                    **params_v3)
         self.endpoints_client = EndPointV3Client(self.auth_provider,
                                                  **params_v3)
-        self.service_client = ServiceV3Client(self.auth_provider, **params_v3)
-        self.policy_client = PolicyV3Client(self.auth_provider, **params_v3)
-        self.region_client = RegionV3Client(self.auth_provider, **params_v3)
+        self.identity_services_client = IdentityServicesV3Client(
+            self.auth_provider, **params_v3)
+        self.policies_client = PoliciesV3Client(self.auth_provider,
+                                                **params_v3)
+        self.regions_client = RegionsV3Client(self.auth_provider, **params_v3)
         self.credentials_client = CredentialsV3Client(self.auth_provider,
                                                       **params_v3)
         self.groups_client = GroupsV3Client(self.auth_provider, **params_v3)
@@ -535,3 +589,15 @@
         self.account_client = AccountClient(self.auth_provider, **params)
         self.container_client = ContainerClient(self.auth_provider, **params)
         self.object_client = ObjectClient(self.auth_provider, **params)
+
+    def _set_api_microversions(self):
+        service_clients = [x for x in self.__dict__ if x.endswith('_client')]
+        for client in service_clients:
+            client_obj = getattr(self, client)
+            microversion = self.api_microversions.get(client_obj.service)
+            if microversion:
+                if hasattr(client_obj, 'set_api_microversion'):
+                    client_obj.set_api_microversion(microversion)
+                else:
+                    LOG.debug("Need to implement set_api_microversion on %s"
+                              % client)
diff --git a/tempest/cmd/account_generator.py b/tempest/cmd/account_generator.py
index b90ee04..5a2713b 100755
--- a/tempest/cmd/account_generator.py
+++ b/tempest/cmd/account_generator.py
@@ -201,7 +201,8 @@
         if tenant not in existing:
             tenants_admin.create_tenant(tenant)
         else:
-            LOG.warn("Tenant '%s' already exists in this environment" % tenant)
+            LOG.warning("Tenant '%s' already exists in this environment"
+                        % tenant)
     LOG.info('Tenants created')
     for u in resources['users']:
         try:
@@ -220,8 +221,8 @@
                     enabled=True)
                 break
             else:
-                LOG.warn("User '%s' already exists in this environment. "
-                         "New name generated" % u['name'])
+                LOG.warning("User '%s' already exists in this environment. "
+                            "New name generated" % u['name'])
                 u['name'] = random_user_name(opts.tag, u['prefix'])
 
     LOG.info('Users created')
diff --git a/tempest/cmd/cleanup.py b/tempest/cmd/cleanup.py
index 3c32d48..7b73a61 100644
--- a/tempest/cmd/cleanup.py
+++ b/tempest/cmd/cleanup.py
@@ -51,6 +51,7 @@
 Please run with **--help** to see full list of options.
 """
 import sys
+import traceback
 
 from cliff import command
 from oslo_log import log as logging
@@ -74,6 +75,16 @@
         super(TempestCleanup, self).__init__(app, cmd)
 
     def take_action(self, parsed_args):
+        try:
+            self.init(parsed_args)
+            self._cleanup()
+        except Exception:
+            LOG.exception("Failure during cleanup")
+            traceback.print_exc()
+            raise
+        return 0
+
+    def init(self, parsed_args):
         cleanup_service.init_conf()
         self.options = parsed_args
         self.admin_mgr = credentials.AdminManager()
@@ -96,10 +107,9 @@
             return
 
         self._load_json()
-        self._cleanup()
 
     def _cleanup(self):
-        LOG.debug("Begin cleanup")
+        print ("Begin cleanup")
         is_dry_run = self.options.dry_run
         is_preserve = not self.options.delete_tempest_conf_objects
         is_save_state = False
@@ -118,7 +128,7 @@
                   'is_save_state': is_save_state}
         tenant_service = cleanup_service.TenantService(admin_mgr, **kwargs)
         tenants = tenant_service.list()
-        LOG.debug("Process %s tenants" % len(tenants))
+        print ("Process %s tenants" % len(tenants))
 
         # Loop through list of tenants and clean them up.
         for tenant in tenants:
@@ -149,7 +159,7 @@
             self._remove_admin_role(tenant_id)
 
     def _clean_tenant(self, tenant):
-        LOG.debug("Cleaning tenant:  %s " % tenant['name'])
+        print ("Cleaning tenant:  %s " % tenant['name'])
         is_dry_run = self.options.dry_run
         dry_run_data = self.dry_run_data
         is_preserve = not self.options.delete_tempest_conf_objects
@@ -176,14 +186,14 @@
             svc.run()
 
     def _init_admin_ids(self):
-        id_cl = self.admin_mgr.identity_client
+        tn_cl = self.admin_mgr.tenants_client
         rl_cl = self.admin_mgr.roles_client
 
-        tenant = identity.get_tenant_by_name(id_cl,
+        tenant = identity.get_tenant_by_name(tn_cl,
                                              CONF.auth.admin_tenant_name)
         self.admin_tenant_id = tenant['id']
 
-        user = identity.get_user_by_username(id_cl, self.admin_tenant_id,
+        user = identity.get_user_by_username(tn_cl, self.admin_tenant_id,
                                              CONF.auth.admin_username)
         self.admin_id = user['id']
 
@@ -249,9 +259,9 @@
                               "exists, exception: %s" % ex)
 
     def _tenant_exists(self, tenant_id):
-        id_cl = self.admin_mgr.identity_client
+        tn_cl = self.admin_mgr.tenants_client
         try:
-            t = id_cl.show_tenant(tenant_id)
+            t = tn_cl.show_tenant(tenant_id)
             LOG.debug("Tenant is: %s" % str(t))
             return True
         except Exception as ex:
@@ -259,7 +269,7 @@
             return False
 
     def _init_state(self):
-        LOG.debug("Initializing saved state.")
+        print ("Initializing saved state.")
         data = {}
         admin_mgr = self.admin_mgr
         kwargs = {'data': data,
diff --git a/tempest/cmd/cleanup_service.py b/tempest/cmd/cleanup_service.py
index 032b8b4..2aeb5b1 100644
--- a/tempest/cmd/cleanup_service.py
+++ b/tempest/cmd/cleanup_service.py
@@ -389,6 +389,7 @@
         self.floating_ips_client = manager.floating_ips_client
         self.metering_labels_client = manager.metering_labels_client
         self.metering_label_rules_client = manager.metering_label_rules_client
+        self.security_groups_client = manager.security_groups_client
 
     def _filter_by_conf_networks(self, item_list):
         if not item_list or not all(('network_id' in i for i in item_list)):
@@ -654,7 +655,7 @@
 
 class NetworkSecGroupService(NetworkService):
     def list(self):
-        client = self.client
+        client = self.security_groups_client
         filter = self.tenant_filter
         # cannot delete default sec group so never show it.
         secgroups = [secgroup for secgroup in
@@ -855,7 +856,7 @@
             self.data['users'][user['id']] = user['name']
 
 
-class RoleService(IdentityService):
+class RoleService(BaseService):
 
     def __init__(self, manager, **kwargs):
         super(RoleService, self).__init__(kwargs)
@@ -895,7 +896,7 @@
             self.data['roles'][role['id']] = role['name']
 
 
-class TenantService(IdentityService):
+class TenantService(BaseService):
 
     def __init__(self, manager, **kwargs):
         super(TenantService, self).__init__(kwargs)
diff --git a/tempest/cmd/javelin.py b/tempest/cmd/javelin.py
index cdd0044..6dfa0a7 100755
--- a/tempest/cmd/javelin.py
+++ b/tempest/cmd/javelin.py
@@ -118,15 +118,15 @@
 from tempest_lib import auth
 from tempest_lib import exceptions as lib_exc
 from tempest_lib.services.compute import flavors_client
+from tempest_lib.services.compute import floating_ips_client
+from tempest_lib.services.compute import security_group_rules_client
 from tempest_lib.services.compute import security_groups_client
+from tempest_lib.services.compute import servers_client
 import yaml
 
 from tempest.common import identity
 from tempest.common import waiters
 from tempest import config
-from tempest.services.compute.json import floating_ips_client
-from tempest.services.compute.json import security_group_rules_client
-from tempest.services.compute.json import servers_client
 from tempest.services.identity.v2.json import identity_client
 from tempest.services.identity.v2.json import roles_client
 from tempest.services.identity.v2.json import tenants_client
@@ -311,7 +311,8 @@
         if tenant not in existing:
             admin.tenants.create_tenant(tenant)['tenant']
         else:
-            LOG.warn("Tenant '%s' already exists in this environment" % tenant)
+            LOG.warning("Tenant '%s' already exists in this environment"
+                        % tenant)
 
 
 def destroy_tenants(tenants):
@@ -376,8 +377,8 @@
         try:
             identity.get_user_by_username(admin.identity,
                                           tenant['id'], u['name'])
-            LOG.warn("User '%s' already exists in this environment"
-                     % u['name'])
+            LOG.warning("User '%s' already exists in this environment"
+                        % u['name'])
         except lib_exc.NotFound:
             admin.identity.create_user(
                 u['name'], u['pass'], tenant['id'],
@@ -1074,7 +1075,7 @@
     destroy_secgroups(RES['secgroups'])
     destroy_users(RES['users'])
     destroy_tenants(RES['tenants'])
-    LOG.warn("Destroy mode incomplete")
+    LOG.warning("Destroy mode incomplete")
 
 
 def get_options():
diff --git a/tempest/cmd/run_stress.py b/tempest/cmd/run_stress.py
index f99e5d9..943fe5b 100644
--- a/tempest/cmd/run_stress.py
+++ b/tempest/cmd/run_stress.py
@@ -22,6 +22,7 @@
 except ImportError:
     # unittest in python 2.6 does not contain loader, so uses unittest2
     from unittest2 import loader
+import traceback
 
 from cliff import command
 from oslo_log import log as logging
@@ -79,7 +80,16 @@
         return pa
 
     def take_action(self, pa):
-        return action(pa)
+        try:
+            action(pa)
+        except Exception:
+            LOG.exception("Failure in the stress test framework")
+            traceback.print_exc()
+            raise
+        return 0
+
+    def get_description(self):
+        return 'Run tempest stress tests'
 
 
 def add_arguments(parser):
@@ -149,4 +159,5 @@
         sys.exit(main())
     except Exception:
         LOG.exception("Failure in the stress test framework")
+        traceback.print_exc()
         sys.exit(1)
diff --git a/tempest/common/api_version_utils.py b/tempest/common/api_version_utils.py
index c499f23..6b6364e 100644
--- a/tempest/common/api_version_utils.py
+++ b/tempest/common/api_version_utils.py
@@ -62,3 +62,10 @@
                   config_min_version.get_string(),
                   config_max_version.get_string()))
         raise testtools.TestCase.skipException(msg)
+
+
+def select_request_microversion(test_min_version, cfg_min_version):
+    test_version = api_version_request.APIVersionRequest(test_min_version)
+    cfg_version = api_version_request.APIVersionRequest(cfg_min_version)
+    max_version = cfg_version if cfg_version >= test_version else test_version
+    return max_version.get_string()
diff --git a/tempest/common/cred_client.py b/tempest/common/cred_client.py
index a33732e..5d15988 100644
--- a/tempest/common/cred_client.py
+++ b/tempest/common/cred_client.py
@@ -61,7 +61,7 @@
 
     def create_user_role(self, role_name):
         if not self._check_role_exists(role_name):
-            self.roles_client.create_role(role_name)
+            self.roles_client.create_role(name=role_name)
 
     def assign_user_role(self, user, project, role_name):
         role = self._check_role_exists(role_name)
diff --git a/tempest/common/dynamic_creds.py b/tempest/common/dynamic_creds.py
index c52aa41..0af07f0 100644
--- a/tempest/common/dynamic_creds.py
+++ b/tempest/common/dynamic_creds.py
@@ -62,7 +62,8 @@
          self.network_admin_client,
          self.networks_admin_client,
          self.subnets_admin_client,
-         self.ports_admin_client) = self._get_admin_clients()
+         self.ports_admin_client,
+         self.security_groups_admin_client) = self._get_admin_clients()
         # Domain where isolated credentials are provisioned (v3 only).
         # Use that of the admin account is None is configured.
         self.creds_domain_name = None
@@ -87,10 +88,11 @@
         if self.identity_version == 'v2':
             return (os.identity_client, os.tenants_client, os.roles_client,
                     os.network_client, os.networks_client, os.subnets_client,
-                    os.ports_client)
+                    os.ports_client, os.security_groups_client)
         else:
             return (os.identity_v3_client, None, None, os.network_client,
-                    os.networks_client, os.subnets_client, os.ports_client)
+                    os.networks_client, os.subnets_client, os.ports_client,
+                    os.security_groups_client)
 
     def _create_creds(self, suffix="", admin=False, roles=None):
         """Create random credentials under the following schema.
@@ -283,36 +285,36 @@
         try:
             net_client.delete_router(router_id)
         except lib_exc.NotFound:
-            LOG.warn('router with name: %s not found for delete' %
-                     router_name)
+            LOG.warning('router with name: %s not found for delete' %
+                        router_name)
 
     def _clear_isolated_subnet(self, subnet_id, subnet_name):
         client = self.subnets_admin_client
         try:
             client.delete_subnet(subnet_id)
         except lib_exc.NotFound:
-            LOG.warn('subnet with name: %s not found for delete' %
-                     subnet_name)
+            LOG.warning('subnet with name: %s not found for delete' %
+                        subnet_name)
 
     def _clear_isolated_network(self, network_id, network_name):
         net_client = self.networks_admin_client
         try:
             net_client.delete_network(network_id)
         except lib_exc.NotFound:
-            LOG.warn('network with name: %s not found for delete' %
-                     network_name)
+            LOG.warning('network with name: %s not found for delete' %
+                        network_name)
 
     def _cleanup_default_secgroup(self, tenant):
-        net_client = self.network_admin_client
-        resp_body = net_client.list_security_groups(tenant_id=tenant,
+        nsg_client = self.security_groups_admin_client
+        resp_body = nsg_client.list_security_groups(tenant_id=tenant,
                                                     name="default")
         secgroups_to_delete = resp_body['security_groups']
         for secgroup in secgroups_to_delete:
             try:
-                net_client.delete_security_group(secgroup['id'])
+                nsg_client.delete_security_group(secgroup['id'])
             except lib_exc.NotFound:
-                LOG.warn('Security group %s, id %s not found for clean-up' %
-                         (secgroup['name'], secgroup['id']))
+                LOG.warning('Security group %s, id %s not found for clean-up' %
+                            (secgroup['name'], secgroup['id']))
 
     def _clear_isolated_net_resources(self):
         net_client = self.network_admin_client
@@ -331,8 +333,8 @@
                     net_client.remove_router_interface_with_subnet_id(
                         creds.router['id'], creds.subnet['id'])
                 except lib_exc.NotFound:
-                    LOG.warn('router with name: %s not found for delete' %
-                             creds.router['name'])
+                    LOG.warning('router with name: %s not found for delete' %
+                                creds.router['name'])
                 self._clear_isolated_router(creds.router['id'],
                                             creds.router['name'])
             if (not self.network_resources or
@@ -352,15 +354,15 @@
             try:
                 self.creds_client.delete_user(creds.user_id)
             except lib_exc.NotFound:
-                LOG.warn("user with name: %s not found for delete" %
-                         creds.username)
+                LOG.warning("user with name: %s not found for delete" %
+                            creds.username)
             try:
                 if CONF.service_available.neutron:
                     self._cleanup_default_secgroup(creds.tenant_id)
                 self.creds_client.delete_project(creds.tenant_id)
             except lib_exc.NotFound:
-                LOG.warn("tenant with name: %s not found for delete" %
-                         creds.tenant_name)
+                LOG.warning("tenant with name: %s not found for delete" %
+                            creds.tenant_name)
         self._creds = {}
 
     def is_multi_user(self):
diff --git a/tempest/common/fixed_network.py b/tempest/common/fixed_network.py
index 56cd331..3fc1365 100644
--- a/tempest/common/fixed_network.py
+++ b/tempest/common/fixed_network.py
@@ -49,13 +49,13 @@
                    name, networks))
         if caller:
             msg = '(%s) %s' % (caller, msg)
-        LOG.warn(msg)
+        LOG.warning(msg)
         raise exceptions.InvalidTestResource(type='network', name=name)
     else:
         msg = "Network with name: %s not found" % name
         if caller:
             msg = '(%s) %s' % (caller, msg)
-        LOG.warn(msg)
+        LOG.warning(msg)
         raise exceptions.InvalidTestResource(type='network', name=name)
     # To be consistent between neutron and nova network always use name even
     # if label is used in the api response. If neither is present than then
@@ -65,7 +65,7 @@
         msg = "Network found from list doesn't contain a valid name or label"
         if caller:
             msg = '(%s) %s' % (caller, msg)
-        LOG.warn(msg)
+        LOG.warning(msg)
         raise exceptions.InvalidTestResource(type='network', name=name)
     network['name'] = name
     return network
@@ -122,6 +122,6 @@
         if 'id' in network.keys():
             params.update({"networks": [{'uuid': network['id']}]})
         else:
-            LOG.warn('The provided network dict: %s was invalid and did not '
-                     ' contain an id' % network)
+            LOG.warning('The provided network dict: %s was invalid and did '
+                        'not contain an id' % network)
     return params
diff --git a/tempest/common/validation_resources.py b/tempest/common/validation_resources.py
index f526299..bb71a51 100644
--- a/tempest/common/validation_resources.py
+++ b/tempest/common/validation_resources.py
@@ -73,8 +73,8 @@
             try:
                 keypair_client.delete_keypair(keypair_name)
             except lib_exc.NotFound:
-                LOG.warn("Keypair %s is not found when attempting to delete"
-                         % keypair_name)
+                LOG.warning("Keypair %s is not found when attempting to delete"
+                            % keypair_name)
             except Exception as exc:
                 LOG.exception('Exception raised while deleting key %s'
                               % keypair_name)
@@ -87,8 +87,8 @@
                 security_group_client.delete_security_group(sec_id)
                 security_group_client.wait_for_resource_deletion(sec_id)
             except lib_exc.NotFound:
-                LOG.warn("Security group %s is not found when attempting to "
-                         " delete" % sec_id)
+                LOG.warning("Security group %s is not found when attempting "
+                            "to delete" % sec_id)
             except lib_exc.Conflict as exc:
                 LOG.exception('Conflict while deleting security '
                               'group %s VM might not be deleted ' % sec_id)
@@ -105,8 +105,8 @@
             try:
                 floating_client.delete_floating_ip(fip_id)
             except lib_exc.NotFound:
-                LOG.warn('Floating ip %s not found while attempting to delete'
-                         % fip_id)
+                LOG.warning('Floating ip %s not found while attempting to '
+                            'delete' % fip_id)
             except Exception as exc:
                 LOG.exception('Exception raised while deleting ip %s '
                               % fip_id)
diff --git a/tempest/config.py b/tempest/config.py
index b847c06..8f2ca4b 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -1372,6 +1372,13 @@
             _CONF([], project='tempest', default_config_files=config_files)
         else:
             _CONF([], project='tempest')
+
+        logging_cfg_path = "%s/logging.conf" % os.path.dirname(path)
+        if (not hasattr(_CONF, 'log_config_append') and
+            os.path.isfile(logging_cfg_path)):
+            # if logging conf is in place we need to set log_config_append
+            _CONF.log_config_append = logging_cfg_path
+
         logging.setup(_CONF, 'tempest')
         LOG = logging.getLogger('tempest')
         LOG.info("Using tempest config file %s" % path)
diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py
index c2159c3..e5e0d16 100644
--- a/tempest/scenario/manager.py
+++ b/tempest/scenario/manager.py
@@ -67,6 +67,7 @@
         cls.ports_client = cls.manager.ports_client
         cls.subnets_client = cls.manager.subnets_client
         cls.floating_ips_client = cls.manager.floating_ips_client
+        cls.security_groups_client = cls.manager.security_groups_client
         # Heat client
         cls.orchestration_client = cls.manager.orchestration_client
 
@@ -196,7 +197,7 @@
                 # to pass to create_port
                 if 'security_groups' in kwargs:
                     security_groups =\
-                        clients.network_client.list_security_groups(
+                        clients.security_groups_client.list_security_groups(
                         ).get('security_groups')
                     sec_dict = dict([(s['name'], s['id'])
                                     for s in security_groups])
@@ -728,7 +729,7 @@
 
     def _list_agents(self, *args, **kwargs):
         """List agents using admin creds """
-        agents_list = self.admin_manager.network_client.list_agents(
+        agents_list = self.admin_manager.network_agents_client.list_agents(
             *args, **kwargs)
         return agents_list['agents']
 
@@ -931,8 +932,8 @@
             try:
                 source.ping_host(dest, nic=nic)
             except lib_exc.SSHExecCommandFailed:
-                LOG.warn('Failed to ping IP: %s via a ssh connection from: %s.'
-                         % (dest, source.ssh_client.host))
+                LOG.warning('Failed to ping IP: %s via a ssh connection '
+                            'from: %s.' % (dest, source.ssh_client.host))
                 return not should_succeed
             return should_succeed
 
@@ -941,18 +942,22 @@
                                             1)
 
     def _create_security_group(self, client=None, tenant_id=None,
-                               namestart='secgroup-smoke'):
+                               namestart='secgroup-smoke',
+                               security_groups_client=None):
         if client is None:
             client = self.network_client
+        if security_groups_client is None:
+            security_groups_client = self.security_groups_client
         if tenant_id is None:
-            tenant_id = client.tenant_id
-        secgroup = self._create_empty_security_group(namestart=namestart,
-                                                     client=client,
-                                                     tenant_id=tenant_id)
+            tenant_id = security_groups_client.tenant_id
+        secgroup = self._create_empty_security_group(
+            namestart=namestart, client=security_groups_client,
+            tenant_id=tenant_id)
 
         # Add rules to the security group
-        rules = self._create_loginable_secgroup_rule(client=client,
-                                                     secgroup=secgroup)
+        rules = self._create_loginable_secgroup_rule(
+            client=client, secgroup=secgroup,
+            security_groups_client=security_groups_client)
         for rule in rules:
             self.assertEqual(tenant_id, rule.tenant_id)
             self.assertEqual(secgroup.id, rule.security_group_id)
@@ -970,7 +975,7 @@
         :returns: DeletableSecurityGroup -- containing the secgroup created
         """
         if client is None:
-            client = self.network_client
+            client = self.security_groups_client
         if not tenant_id:
             tenant_id = client.tenant_id
         sg_name = data_utils.rand_name(namestart)
@@ -995,7 +1000,7 @@
         :returns: DeletableSecurityGroup -- default secgroup for given tenant
         """
         if client is None:
-            client = self.network_client
+            client = self.security_groups_client
         if not tenant_id:
             tenant_id = client.tenant_id
         sgs = [
@@ -1008,7 +1013,8 @@
                                                     **sgs[0])
 
     def _create_security_group_rule(self, secgroup=None, client=None,
-                                    tenant_id=None, **kwargs):
+                                    tenant_id=None,
+                                    security_groups_client=None, **kwargs):
         """Create a rule from a dictionary of rule parameters.
 
         Create a rule in a secgroup. if secgroup not defined will search for
@@ -1028,11 +1034,13 @@
         """
         if client is None:
             client = self.network_client
+        if security_groups_client is None:
+            security_groups_client = self.security_groups_client
         if not tenant_id:
-            tenant_id = client.tenant_id
+            tenant_id = security_groups_client.tenant_id
         if secgroup is None:
-            secgroup = self._default_security_group(client=client,
-                                                    tenant_id=tenant_id)
+            secgroup = self._default_security_group(
+                client=security_groups_client, tenant_id=tenant_id)
 
         ruleset = dict(security_group_id=secgroup.id,
                        tenant_id=secgroup.tenant_id)
@@ -1049,7 +1057,8 @@
 
         return sg_rule
 
-    def _create_loginable_secgroup_rule(self, client=None, secgroup=None):
+    def _create_loginable_secgroup_rule(self, client=None, secgroup=None,
+                                        security_groups_client=None):
         """Create loginable security group rule
 
         These rules are intended to permit inbound ssh and icmp
@@ -1060,6 +1069,8 @@
 
         if client is None:
             client = self.network_client
+        if security_groups_client is None:
+            security_groups_client = self.security_groups_client
         rules = []
         rulesets = [
             dict(
@@ -1083,7 +1094,9 @@
                 ruleset['direction'] = r_direction
                 try:
                     sg_rule = self._create_security_group_rule(
-                        client=client, secgroup=secgroup, **ruleset)
+                        client=client, secgroup=secgroup,
+                        security_groups_client=security_groups_client,
+                        **ruleset)
                 except lib_exc.Conflict as ex:
                     # if rule already exist - skip rule and continue
                     msg = 'Security group rule already exists'
@@ -1365,7 +1378,7 @@
         randomized_name = data_utils.rand_name('scenario-type-' + name)
         LOG.debug("Creating a volume type: %s", randomized_name)
         body = client.create_volume_type(
-            randomized_name)['volume_type']
+            name=randomized_name)['volume_type']
         self.assertIn('id', body)
         self.addCleanup(client.delete_volume_type, body['id'])
         return body
diff --git a/tempest/scenario/test_baremetal_basic_ops.py b/tempest/scenario/test_baremetal_basic_ops.py
index 9415629..93b32f7 100644
--- a/tempest/scenario/test_baremetal_basic_ops.py
+++ b/tempest/scenario/test_baremetal_basic_ops.py
@@ -123,23 +123,9 @@
         # the same size as our flavor definition.
         eph_size = self.get_flavor_ephemeral_size()
         if eph_size:
-            preserve_ephemeral = True
-
             self.verify_partition(vm_client, 'ephemeral0', '/mnt', eph_size)
             # Create the test file
-            timestamp = self.create_timestamp(
+            self.create_timestamp(
                 floating_ip, private_key=self.keypair['private_key'])
-        else:
-            preserve_ephemeral = False
 
-        # Rebuild and preserve the ephemeral partition if it exists
-        self.rebuild_instance(preserve_ephemeral)
-        self.verify_connectivity()
-
-        # Check that we maintained our data
-        if eph_size:
-            self.verify_partition(vm_client, 'ephemeral0', '/mnt', eph_size)
-            timestamp2 = self.get_timestamp(
-                floating_ip, private_key=self.keypair['private_key'])
-            self.assertEqual(timestamp, timestamp2)
         self.terminate_instance()
diff --git a/tempest/scenario/test_network_basic_ops.py b/tempest/scenario/test_network_basic_ops.py
index 44942b0..b8bec16 100644
--- a/tempest/scenario/test_network_basic_ops.py
+++ b/tempest/scenario/test_network_basic_ops.py
@@ -683,9 +683,9 @@
 
         list_hosts = (self.admin_manager.network_client.
                       list_l3_agents_hosting_router)
-        schedule_router = (self.admin_manager.network_client.
+        schedule_router = (self.admin_manager.network_agents_client.
                            add_router_to_l3_agent)
-        unschedule_router = (self.admin_manager.network_client.
+        unschedule_router = (self.admin_manager.network_agents_client.
                              remove_router_from_l3_agent)
 
         agent_list = set(a["id"] for a in
diff --git a/tempest/scenario/test_security_groups_basic_ops.py b/tempest/scenario/test_security_groups_basic_ops.py
index 4e5a1e0..783b740 100644
--- a/tempest/scenario/test_security_groups_basic_ops.py
+++ b/tempest/scenario/test_security_groups_basic_ops.py
@@ -176,14 +176,14 @@
         access_sg = self._create_empty_security_group(
             namestart='secgroup_access-',
             tenant_id=tenant.creds.tenant_id,
-            client=tenant.manager.network_client
+            client=tenant.manager.security_groups_client
         )
 
         # don't use default secgroup since it allows in-tenant traffic
         def_sg = self._create_empty_security_group(
             namestart='secgroup_general-',
             tenant_id=tenant.creds.tenant_id,
-            client=tenant.manager.network_client
+            client=tenant.manager.security_groups_client
         )
         tenant.security_groups.update(access=access_sg, default=def_sg)
         ssh_rule = dict(
@@ -464,7 +464,7 @@
         new_sg = self._create_empty_security_group(
             namestart='secgroup_new-',
             tenant_id=new_tenant.creds.tenant_id,
-            client=new_tenant.manager.network_client)
+            client=new_tenant.manager.security_groups_client)
         icmp_rule = dict(
             protocol='icmp',
             direction='ingress',
diff --git a/tempest/services/compute/json/floating_ips_client.py b/tempest/services/compute/json/floating_ips_client.py
deleted file mode 100644
index b3e2f2f..0000000
--- a/tempest/services/compute/json/floating_ips_client.py
+++ /dev/null
@@ -1,103 +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 six.moves.urllib import parse as urllib
-from tempest_lib import exceptions as lib_exc
-
-from tempest.api_schema.response.compute.v2_1 import floating_ips as schema
-from tempest.common import service_client
-
-
-class FloatingIPsClient(service_client.ServiceClient):
-
-    def list_floating_ips(self, **params):
-        """Returns a list of all floating IPs filtered by any parameters."""
-        url = 'os-floating-ips'
-        if params:
-            url += '?%s' % urllib.urlencode(params)
-
-        resp, body = self.get(url)
-        body = json.loads(body)
-        self.validate_response(schema.list_floating_ips, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def show_floating_ip(self, floating_ip_id):
-        """Get the details of a floating IP."""
-        url = "os-floating-ips/%s" % floating_ip_id
-        resp, body = self.get(url)
-        body = json.loads(body)
-        self.validate_response(schema.create_get_floating_ip, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def create_floating_ip(self, **kwargs):
-        """Allocate a floating IP to the project.
-
-        Available params: see http://developer.openstack.org/
-                              api-ref-compute-v2.1.html#createFloatingIP
-        """
-        url = 'os-floating-ips'
-        post_body = json.dumps(kwargs)
-        resp, body = self.post(url, post_body)
-        body = json.loads(body)
-        self.validate_response(schema.create_get_floating_ip, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def delete_floating_ip(self, floating_ip_id):
-        """Deletes the provided floating IP from the project."""
-        url = "os-floating-ips/%s" % floating_ip_id
-        resp, body = self.delete(url)
-        self.validate_response(schema.add_remove_floating_ip, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def associate_floating_ip_to_server(self, floating_ip, server_id):
-        """Associate the provided floating IP to a specific server."""
-        url = "servers/%s/action" % server_id
-        post_body = {
-            'addFloatingIp': {
-                'address': floating_ip,
-            }
-        }
-
-        post_body = json.dumps(post_body)
-        resp, body = self.post(url, post_body)
-        self.validate_response(schema.add_remove_floating_ip, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def disassociate_floating_ip_from_server(self, floating_ip, server_id):
-        """Disassociate the provided floating IP from a specific server."""
-        url = "servers/%s/action" % server_id
-        post_body = {
-            'removeFloatingIp': {
-                'address': floating_ip,
-            }
-        }
-
-        post_body = json.dumps(post_body)
-        resp, body = self.post(url, post_body)
-        self.validate_response(schema.add_remove_floating_ip, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def is_resource_deleted(self, id):
-        try:
-            self.show_floating_ip(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 'floating_ip'
diff --git a/tempest/services/compute/json/security_group_rules_client.py b/tempest/services/compute/json/security_group_rules_client.py
deleted file mode 100644
index 314b1ed..0000000
--- a/tempest/services/compute/json/security_group_rules_client.py
+++ /dev/null
@@ -1,47 +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 security_groups as schema
-from tempest.common import service_client
-
-
-class SecurityGroupRulesClient(service_client.ServiceClient):
-
-    def create_security_group_rule(self, **kwargs):
-        """Creating a new security group rules.
-
-        parent_group_id :ID of Security group
-        ip_protocol : ip_proto (icmp, tcp, udp).
-        from_port: Port at start of range.
-        to_port  : Port at end of range.
-        Following optional keyword arguments are accepted:
-        cidr     : CIDR for address range.
-        group_id : ID of the Source group
-        """
-        post_body = json.dumps({'security_group_rule': kwargs})
-        url = 'os-security-group-rules'
-        resp, body = self.post(url, post_body)
-        body = json.loads(body)
-        self.validate_response(schema.create_security_group_rule, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def delete_security_group_rule(self, group_rule_id):
-        """Deletes the provided Security Group rule."""
-        resp, body = self.delete('os-security-group-rules/%s' %
-                                 group_rule_id)
-        self.validate_response(schema.delete_security_group_rule, 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
deleted file mode 100644
index 44ac015..0000000
--- a/tempest/services/compute/json/server_groups_client.py
+++ /dev/null
@@ -1,56 +0,0 @@
-# Copyright 2012 OpenStack Foundation
-# Copyright 2013 Hewlett-Packard Development Company, L.P.
-# 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 servers as schema
-from tempest.common import service_client
-
-
-class ServerGroupsClient(service_client.ServiceClient):
-
-    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 = json.dumps({'server_group': kwargs})
-        resp, body = self.post('os-server-groups', post_body)
-
-        body = json.loads(body)
-        self.validate_response(schema.create_show_server_group, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def delete_server_group(self, server_group_id):
-        """Delete the given server-group."""
-        resp, body = self.delete("os-server-groups/%s" % server_group_id)
-        self.validate_response(schema.delete_server_group, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def list_server_groups(self):
-        """List the server-groups."""
-        resp, body = self.get("os-server-groups")
-        body = json.loads(body)
-        self.validate_response(schema.list_server_groups, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def show_server_group(self, server_group_id):
-        """Get the details of given server_group."""
-        resp, body = self.get("os-server-groups/%s" % server_group_id)
-        body = json.loads(body)
-        self.validate_response(schema.create_show_server_group, resp, body)
-        return service_client.ResponseBody(resp, body)
diff --git a/tempest/services/compute/json/servers_client.py b/tempest/services/compute/json/servers_client.py
deleted file mode 100644
index c20295b..0000000
--- a/tempest/services/compute/json/servers_client.py
+++ /dev/null
@@ -1,561 +0,0 @@
-# Copyright 2012 OpenStack Foundation
-# Copyright 2013 Hewlett-Packard Development Company, L.P.
-# 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 oslo_serialization import jsonutils as json
-from six.moves.urllib import parse as urllib
-
-from tempest.api_schema.response.compute.v2_1 import servers as schema
-from tempest.common import service_client
-
-
-class ServersClient(service_client.ServiceClient):
-
-    def __init__(self, auth_provider, service, region,
-                 enable_instance_password=True, **kwargs):
-        super(ServersClient, self).__init__(
-            auth_provider, service, region, **kwargs)
-        self.enable_instance_password = enable_instance_password
-
-    def create_server(self, **kwargs):
-        """Create server.
-
-        Available params: see http://developer.openstack.org/
-                              api-ref-compute-v2.1.html#createServer
-
-        Most parameters except the following are passed to the API without
-        any changes.
-        :param disk_config: The name is changed to OS-DCF:diskConfig
-        :param scheduler_hints: The name is changed to os:scheduler_hints and
-        the parameter is set in the same level as the parameter 'server'.
-        """
-        body = copy.deepcopy(kwargs)
-        if body.get('disk_config'):
-            body['OS-DCF:diskConfig'] = body.pop('disk_config')
-
-        hints = None
-        if body.get('scheduler_hints'):
-            hints = {'os:scheduler_hints': body.pop('scheduler_hints')}
-
-        post_body = {'server': body}
-
-        if hints:
-            post_body = dict(post_body.items() + hints.items())
-
-        post_body = json.dumps(post_body)
-        resp, body = self.post('servers', post_body)
-
-        body = json.loads(body)
-        # NOTE(maurosr): this deals with the case of multiple server create
-        # with return reservation id set True
-        if 'reservation_id' in body:
-            return service_client.ResponseBody(resp, body)
-        if self.enable_instance_password:
-            create_schema = schema.create_server_with_admin_pass
-        else:
-            create_schema = schema.create_server
-        self.validate_response(create_schema, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def update_server(self, server_id, **kwargs):
-        """Update server.
-
-        Available params: see http://developer.openstack.org/
-                              api-ref-compute-v2.1.html#updateServer
-
-        Most parameters except the following are passed to the API without
-        any changes.
-        :param disk_config: The name is changed to OS-DCF:diskConfig
-        """
-        if kwargs.get('disk_config'):
-            kwargs['OS-DCF:diskConfig'] = kwargs.pop('disk_config')
-
-        post_body = json.dumps({'server': kwargs})
-        resp, body = self.put("servers/%s" % server_id, post_body)
-        body = json.loads(body)
-        self.validate_response(schema.update_server, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def show_server(self, server_id):
-        """Get server details."""
-        resp, body = self.get("servers/%s" % server_id)
-        body = json.loads(body)
-        self.validate_response(schema.get_server, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def delete_server(self, server_id):
-        """Delete server."""
-        resp, body = self.delete("servers/%s" % server_id)
-        self.validate_response(schema.delete_server, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def list_servers(self, detail=False, **params):
-        """List servers.
-
-        Available params: see http://developer.openstack.org/
-                              api-ref-compute-v2.1.html#listServers
-                          and http://developer.openstack.org/
-                              api-ref-compute-v2.1.html#listDetailServers
-        """
-
-        url = 'servers'
-        _schema = schema.list_servers
-
-        if detail:
-            url += '/detail'
-            _schema = schema.list_servers_detail
-        if params:
-            url += '?%s' % urllib.urlencode(params)
-
-        resp, body = self.get(url)
-        body = json.loads(body)
-        self.validate_response(_schema, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def list_addresses(self, server_id):
-        """Lists all addresses for a server."""
-        resp, body = self.get("servers/%s/ips" % server_id)
-        body = json.loads(body)
-        self.validate_response(schema.list_addresses, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def list_addresses_by_network(self, server_id, network_id):
-        """Lists all addresses of a specific network type for a server."""
-        resp, body = self.get("servers/%s/ips/%s" %
-                              (server_id, network_id))
-        body = json.loads(body)
-        self.validate_response(schema.list_addresses_by_network, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def action(self, server_id, action_name,
-               schema=schema.server_actions_common_schema,
-               **kwargs):
-        post_body = json.dumps({action_name: kwargs})
-        resp, body = self.post('servers/%s/action' % server_id,
-                               post_body)
-        if body:
-            body = json.loads(body)
-        self.validate_response(schema, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def create_backup(self, server_id, **kwargs):
-        """Backup a server instance.
-
-        Available params: see http://developer.openstack.org/
-                              api-ref-compute-v2.1.html#createBackup
-        """
-        return self.action(server_id, "createBackup", **kwargs)
-
-    def change_password(self, server_id, **kwargs):
-        """Change the root password for the server.
-
-        Available params: see http://developer.openstack.org/
-                              api-ref-compute-v2.1.html#changePassword
-        """
-        return self.action(server_id, 'changePassword', **kwargs)
-
-    def show_password(self, server_id):
-        resp, body = self.get("servers/%s/os-server-password" %
-                              server_id)
-        body = json.loads(body)
-        self.validate_response(schema.show_password, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def delete_password(self, server_id):
-        """Removes the encrypted server password from the metadata server
-
-        Note that this does not actually change the instance server
-        password.
-        """
-        resp, body = self.delete("servers/%s/os-server-password" %
-                                 server_id)
-        self.validate_response(schema.server_actions_delete_password,
-                               resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def reboot_server(self, server_id, **kwargs):
-        """Reboot a server.
-
-        Available params: http://developer.openstack.org/
-                          api-ref-compute-v2.1.html#reboot
-        """
-        return self.action(server_id, 'reboot', **kwargs)
-
-    def rebuild_server(self, server_id, image_ref, **kwargs):
-        """Rebuild a server with a new image.
-
-        Available params: http://developer.openstack.org/
-                          api-ref-compute-v2.1.html#rebuild
-
-        Most parameters except the following are passed to the API without
-        any changes.
-        :param disk_config: The name is changed to OS-DCF:diskConfig
-        """
-        kwargs['imageRef'] = image_ref
-        if 'disk_config' in kwargs:
-            kwargs['OS-DCF:diskConfig'] = kwargs.pop('disk_config')
-        if self.enable_instance_password:
-            rebuild_schema = schema.rebuild_server_with_admin_pass
-        else:
-            rebuild_schema = schema.rebuild_server
-        return self.action(server_id, 'rebuild',
-                           rebuild_schema, **kwargs)
-
-    def resize_server(self, server_id, flavor_ref, **kwargs):
-        """Change the flavor of a server.
-
-        Available params: http://developer.openstack.org/
-                          api-ref-compute-v2.1.html#resize
-
-        Most parameters except the following are passed to the API without
-        any changes.
-        :param disk_config: The name is changed to OS-DCF:diskConfig
-        """
-        kwargs['flavorRef'] = flavor_ref
-        if 'disk_config' in kwargs:
-            kwargs['OS-DCF:diskConfig'] = kwargs.pop('disk_config')
-        return self.action(server_id, 'resize', **kwargs)
-
-    def confirm_resize_server(self, server_id, **kwargs):
-        """Confirm the flavor change for a server.
-
-        Available params: see http://developer.openstack.org/
-                              api-ref-compute-v2.1.html#confirmResize
-        """
-        return self.action(server_id, 'confirmResize',
-                           schema.server_actions_confirm_resize,
-                           **kwargs)
-
-    def revert_resize_server(self, server_id, **kwargs):
-        """Revert a server back to its original flavor.
-
-        Available params: see http://developer.openstack.org/
-                              api-ref-compute-v2.1.html#revertResize
-        """
-        return self.action(server_id, 'revertResize', **kwargs)
-
-    def list_server_metadata(self, server_id):
-        resp, body = self.get("servers/%s/metadata" % server_id)
-        body = json.loads(body)
-        self.validate_response(schema.list_server_metadata, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def set_server_metadata(self, server_id, meta, no_metadata_field=False):
-        if no_metadata_field:
-            post_body = ""
-        else:
-            post_body = json.dumps({'metadata': meta})
-        resp, body = self.put('servers/%s/metadata' % server_id,
-                              post_body)
-        body = json.loads(body)
-        self.validate_response(schema.set_server_metadata, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def update_server_metadata(self, server_id, meta):
-        post_body = json.dumps({'metadata': meta})
-        resp, body = self.post('servers/%s/metadata' % server_id,
-                               post_body)
-        body = json.loads(body)
-        self.validate_response(schema.update_server_metadata,
-                               resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def show_server_metadata_item(self, server_id, key):
-        resp, body = self.get("servers/%s/metadata/%s" % (server_id, key))
-        body = json.loads(body)
-        self.validate_response(schema.set_show_server_metadata_item,
-                               resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def set_server_metadata_item(self, server_id, key, meta):
-        post_body = json.dumps({'meta': meta})
-        resp, body = self.put('servers/%s/metadata/%s' % (server_id, key),
-                              post_body)
-        body = json.loads(body)
-        self.validate_response(schema.set_show_server_metadata_item,
-                               resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def delete_server_metadata_item(self, server_id, key):
-        resp, body = self.delete("servers/%s/metadata/%s" %
-                                 (server_id, key))
-        self.validate_response(schema.delete_server_metadata_item,
-                               resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def stop_server(self, server_id, **kwargs):
-        return self.action(server_id, 'os-stop', **kwargs)
-
-    def start_server(self, server_id, **kwargs):
-        return self.action(server_id, 'os-start', **kwargs)
-
-    def attach_volume(self, server_id, **kwargs):
-        """Attaches a volume to a server instance."""
-        post_body = json.dumps({'volumeAttachment': kwargs})
-        resp, body = self.post('servers/%s/os-volume_attachments' % server_id,
-                               post_body)
-        body = json.loads(body)
-        self.validate_response(schema.attach_volume, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def detach_volume(self, server_id, volume_id):  # noqa
-        """Detaches a volume from a server instance."""
-        resp, body = self.delete('servers/%s/os-volume_attachments/%s' %
-                                 (server_id, volume_id))
-        self.validate_response(schema.detach_volume, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def show_volume_attachment(self, server_id, attach_id):
-        """Return details about the given volume attachment."""
-        resp, body = self.get('servers/%s/os-volume_attachments/%s' % (
-            server_id, attach_id))
-        body = json.loads(body)
-        self.validate_response(schema.show_volume_attachment, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def list_volume_attachments(self, server_id):
-        """Returns the list of volume attachments for a given instance."""
-        resp, body = self.get('servers/%s/os-volume_attachments' % (
-            server_id))
-        body = json.loads(body)
-        self.validate_response(schema.list_volume_attachments, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def add_security_group(self, server_id, **kwargs):
-        """Add a security group to the server.
-
-        Available params: TODO
-        """
-        # TODO(oomichi): The api-site doesn't contain this API description.
-        # So the above should be changed to the api-site link after
-        # adding the description on the api-site.
-        # LP: https://bugs.launchpad.net/openstack-api-site/+bug/1524199
-        return self.action(server_id, 'addSecurityGroup', **kwargs)
-
-    def remove_security_group(self, server_id, **kwargs):
-        """Remove a security group from the server.
-
-        Available params: TODO
-        """
-        # TODO(oomichi): The api-site doesn't contain this API description.
-        # So the above should be changed to the api-site link after
-        # adding the description on the api-site.
-        # LP: https://bugs.launchpad.net/openstack-api-site/+bug/1524199
-        return self.action(server_id, 'removeSecurityGroup', **kwargs)
-
-    def live_migrate_server(self, server_id, **kwargs):
-        """This should be called with administrator privileges.
-
-        Available params: http://developer.openstack.org/
-                          api-ref-compute-v2.1.html#migrateLive
-        """
-        return self.action(server_id, 'os-migrateLive', **kwargs)
-
-    def migrate_server(self, server_id, **kwargs):
-        """Migrate a server to a new host.
-
-        Available params: http://developer.openstack.org/
-                          api-ref-compute-v2.1.html#migrate
-        """
-        return self.action(server_id, 'migrate', **kwargs)
-
-    def lock_server(self, server_id, **kwargs):
-        """Lock the given server.
-
-        Available params: http://developer.openstack.org/
-                          api-ref-compute-v2.1.html#lock
-        """
-        return self.action(server_id, 'lock', **kwargs)
-
-    def unlock_server(self, server_id, **kwargs):
-        """UNlock the given server.
-
-        Available params: http://developer.openstack.org/
-                          api-ref-compute-v2.1.html#unlock
-        """
-        return self.action(server_id, 'unlock', **kwargs)
-
-    def suspend_server(self, server_id, **kwargs):
-        """Suspend the provided server.
-
-        Available params: http://developer.openstack.org/
-                          api-ref-compute-v2.1.html#suspend
-        """
-        return self.action(server_id, 'suspend', **kwargs)
-
-    def resume_server(self, server_id, **kwargs):
-        """Un-suspend the provided server.
-
-        Available params: http://developer.openstack.org/
-                          api-ref-compute-v2.1.html#resume
-        """
-        return self.action(server_id, 'resume', **kwargs)
-
-    def pause_server(self, server_id, **kwargs):
-        """Pause the provided server.
-
-        Available params: http://developer.openstack.org/
-                          api-ref-compute-v2.1.html#pause
-        """
-        return self.action(server_id, 'pause', **kwargs)
-
-    def unpause_server(self, server_id, **kwargs):
-        """Un-pause the provided server.
-
-        Available params: http://developer.openstack.org/
-                          api-ref-compute-v2.1.html#unpause
-        """
-        return self.action(server_id, 'unpause', **kwargs)
-
-    def reset_state(self, server_id, **kwargs):
-        """Reset the state of a server to active/error.
-
-        Available params: http://developer.openstack.org/
-                          api-ref-compute-v2.1.html#resetState
-        """
-        return self.action(server_id, 'os-resetState', **kwargs)
-
-    def shelve_server(self, server_id, **kwargs):
-        """Shelve the provided server.
-
-        Available params: http://developer.openstack.org/
-                          api-ref-compute-v2.1.html#shelve
-        """
-        return self.action(server_id, 'shelve', **kwargs)
-
-    def unshelve_server(self, server_id, **kwargs):
-        """Un-shelve the provided server.
-
-        Available params: http://developer.openstack.org/
-                          api-ref-compute-v2.1.html#unshelve
-        """
-        return self.action(server_id, 'unshelve', **kwargs)
-
-    def shelve_offload_server(self, server_id, **kwargs):
-        """Shelve-offload the provided server.
-
-        Available params: http://developer.openstack.org/
-                          api-ref-compute-v2.1.html#shelveOffload
-        """
-        return self.action(server_id, 'shelveOffload', **kwargs)
-
-    def get_console_output(self, server_id, **kwargs):
-        """Get console output.
-
-        Available params: http://developer.openstack.org/
-                          api-ref-compute-v2.1.html#getConsoleOutput
-        """
-        return self.action(server_id, 'os-getConsoleOutput',
-                           schema.get_console_output, **kwargs)
-
-    def list_virtual_interfaces(self, server_id):
-        """List the virtual interfaces used in an instance."""
-        resp, body = self.get('/'.join(['servers', server_id,
-                              'os-virtual-interfaces']))
-        body = json.loads(body)
-        self.validate_response(schema.list_virtual_interfaces, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def rescue_server(self, server_id, **kwargs):
-        """Rescue the provided server.
-
-        Available params: http://developer.openstack.org/
-                          api-ref-compute-v2.1.html#rescue
-        """
-        return self.action(server_id, 'rescue', schema.rescue_server, **kwargs)
-
-    def unrescue_server(self, server_id):
-        """Unrescue the provided server."""
-        return self.action(server_id, 'unrescue')
-
-    def show_server_diagnostics(self, server_id):
-        """Get the usage data for a server."""
-        resp, body = self.get("servers/%s/diagnostics" % server_id)
-        return service_client.ResponseBody(resp, json.loads(body))
-
-    def list_instance_actions(self, server_id):
-        """List the provided server action."""
-        resp, body = self.get("servers/%s/os-instance-actions" %
-                              server_id)
-        body = json.loads(body)
-        self.validate_response(schema.list_instance_actions, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def show_instance_action(self, server_id, request_id):
-        """Returns the action details of the provided server."""
-        resp, body = self.get("servers/%s/os-instance-actions/%s" %
-                              (server_id, request_id))
-        body = json.loads(body)
-        self.validate_response(schema.show_instance_action, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def force_delete_server(self, server_id, **kwargs):
-        """Force delete a server.
-
-        Available params: http://developer.openstack.org/
-                          api-ref-compute-v2.1.html#forceDelete
-        """
-        return self.action(server_id, 'forceDelete', **kwargs)
-
-    def restore_soft_deleted_server(self, server_id, **kwargs):
-        """Restore a soft-deleted server.
-
-        Available params: http://developer.openstack.org/
-                          api-ref-compute-v2.1.html#restore
-        """
-        return self.action(server_id, 'restore', **kwargs)
-
-    def reset_network(self, server_id, **kwargs):
-        """Reset the Network of a server.
-
-        Available params: http://developer.openstack.org/
-                          api-ref-compute-v2.1.html#resetNetwork
-        """
-        return self.action(server_id, 'resetNetwork', **kwargs)
-
-    def inject_network_info(self, server_id, **kwargs):
-        """Inject the Network Info into server.
-
-        Available params: http://developer.openstack.org/
-                          api-ref-compute-v2.1.html#injectNetworkInfo
-        """
-        return self.action(server_id, 'injectNetworkInfo', **kwargs)
-
-    def get_vnc_console(self, server_id, **kwargs):
-        """Get URL of VNC console.
-
-        Available params: http://developer.openstack.org/
-                          api-ref-compute-v2.1.html#getVNCConsole
-        """
-        return self.action(server_id, "os-getVNCConsole",
-                           schema.get_vnc_console, **kwargs)
-
-    def add_fixed_ip(self, server_id, **kwargs):
-        """Add a fixed IP to server instance.
-
-        Available params: http://developer.openstack.org/
-                          api-ref-compute-v2.1.html#addFixedIp
-        """
-        return self.action(server_id, 'addFixedIp', **kwargs)
-
-    def remove_fixed_ip(self, server_id, **kwargs):
-        """Remove input fixed IP from input server instance.
-
-        Available params: http://developer.openstack.org/
-                          api-ref-compute-v2.1.html#removeFixedIp
-        """
-        return self.action(server_id, 'removeFixedIp', **kwargs)
diff --git a/tempest/services/identity/v2/json/identity_client.py b/tempest/services/identity/v2/json/identity_client.py
index 54596be..ff6c838 100644
--- a/tempest/services/identity/v2/json/identity_client.py
+++ b/tempest/services/identity/v2/json/identity_client.py
@@ -71,12 +71,17 @@
         body = json.loads(body)
         return service_client.ResponseBody(resp, body)
 
-    def enable_disable_user(self, user_id, enabled):
-        """Enables or disables a user."""
-        put_body = {
-            'enabled': enabled
-        }
-        put_body = json.dumps({'user': put_body})
+    def enable_disable_user(self, user_id, **kwargs):
+        """Enables or disables a user.
+
+        Available params: see http://developer.openstack.org/
+                              api-ref-identity-v2-ext.html#enableUser
+        """
+        # NOTE: The URL (users/<id>/enabled) is different from the api-site
+        # one (users/<id>/OS-KSADM/enabled) , but they are the same API
+        # because of the fact that in keystone/contrib/admin_crud/core.py
+        # both api use same action='set_user_enabled'
+        put_body = json.dumps({'user': kwargs})
         resp, body = self.put('users/%s/enabled' % user_id, put_body)
         self.expected_success(200, resp.status)
         body = json.loads(body)
@@ -159,25 +164,28 @@
         self.expected_success(204, resp.status)
         return service_client.ResponseBody(resp, body)
 
-    def update_user_password(self, user_id, new_pass):
+    def update_user_password(self, user_id, **kwargs):
         """Update User Password."""
-        put_body = {
-            'password': new_pass,
-            'id': user_id
-        }
-        put_body = json.dumps({'user': put_body})
+        # TODO(piyush): Current api-site doesn't contain this API description.
+        # After fixing the api-site, we need to fix here also for putting the
+        # link to api-site.
+        # LP: https://bugs.launchpad.net/openstack-api-site/+bug/1524147
+        put_body = json.dumps({'user': kwargs})
         resp, body = self.put('users/%s/OS-KSADM/password' % user_id, put_body)
         self.expected_success(200, resp.status)
         body = json.loads(body)
         return service_client.ResponseBody(resp, body)
 
-    def update_user_own_password(self, user_id, new_pass, old_pass):
+    def update_user_own_password(self, user_id, **kwargs):
         """User updates own password"""
-        patch_body = {
-            "password": new_pass,
-            "original_password": old_pass
-        }
-        patch_body = json.dumps({'user': patch_body})
+        # TODO(piyush): Current api-site doesn't contain this API description.
+        # After fixing the api-site, we need to fix here also for putting the
+        # link to api-site.
+        # LP: https://bugs.launchpad.net/openstack-api-site/+bug/1524153
+        # NOTE: This API is used for updating user password by itself.
+        # Ref: http://lists.openstack.org/pipermail/openstack-dev/2015-December
+        #      /081803.html
+        patch_body = json.dumps({'user': kwargs})
         resp, body = self.patch('OS-KSCRUD/users/%s' % user_id, patch_body)
         self.expected_success(200, resp.status)
         body = json.loads(body)
diff --git a/tempest/services/identity/v2/json/roles_client.py b/tempest/services/identity/v2/json/roles_client.py
index de8f9cb..ef6dfe9 100644
--- a/tempest/services/identity/v2/json/roles_client.py
+++ b/tempest/services/identity/v2/json/roles_client.py
@@ -18,12 +18,13 @@
 class RolesClient(service_client.ServiceClient):
     api_version = "v2.0"
 
-    def create_role(self, name):
-        """Create a role."""
-        post_body = {
-            'name': name,
-        }
-        post_body = json.dumps({'role': post_body})
+    def create_role(self, **kwargs):
+        """Create a role.
+
+        Available params: see http://developer.openstack.org/
+                              api-ref-identity-v2-ext.html#createRole
+        """
+        post_body = json.dumps({'role': kwargs})
         resp, body = self.post('OS-KSADM/roles', post_body)
         self.expected_success(200, resp.status)
         body = json.loads(body)
diff --git a/tempest/services/identity/v3/json/identity_client.py b/tempest/services/identity/v3/json/identity_client.py
index 972db99..ab8ba2a 100644
--- a/tempest/services/identity/v3/json/identity_client.py
+++ b/tempest/services/identity/v3/json/identity_client.py
@@ -180,12 +180,13 @@
         self.expected_success(204, resp.status)
         return service_client.ResponseBody(resp, body)
 
-    def create_role(self, name):
-        """Create a Role."""
-        post_body = {
-            'name': name
-        }
-        post_body = json.dumps({'role': post_body})
+    def create_role(self, **kwargs):
+        """Create a Role.
+
+        Available params: see http://developer.openstack.org/
+                              api-ref-identity-v3.html#createRole
+        """
+        post_body = json.dumps({'role': kwargs})
         resp, body = self.post('roles', post_body)
         self.expected_success(201, resp.status)
         body = json.loads(body)
@@ -205,12 +206,13 @@
         body = json.loads(body)
         return service_client.ResponseBody(resp, body)
 
-    def update_role(self, name, role_id):
-        """Create a Role."""
-        post_body = {
-            'name': name
-        }
-        post_body = json.dumps({'role': post_body})
+    def update_role(self, role_id, **kwargs):
+        """Update a Role.
+
+        Available params: see http://developer.openstack.org/
+                          api-ref-identity-v3.html#updateRole
+        """
+        post_body = json.dumps({'role': kwargs})
         resp, body = self.patch('roles/%s' % str(role_id), post_body)
         self.expected_success(200, resp.status)
         body = json.loads(body)
diff --git a/tempest/services/identity/v3/json/policy_client.py b/tempest/services/identity/v3/json/policies_client.py
similarity index 97%
rename from tempest/services/identity/v3/json/policy_client.py
rename to tempest/services/identity/v3/json/policies_client.py
index 7927ed5..639ed6d 100644
--- a/tempest/services/identity/v3/json/policy_client.py
+++ b/tempest/services/identity/v3/json/policies_client.py
@@ -22,7 +22,7 @@
 from tempest.common import service_client
 
 
-class PolicyClient(service_client.ServiceClient):
+class PoliciesClient(service_client.ServiceClient):
     api_version = "v3"
 
     def create_policy(self, **kwargs):
diff --git a/tempest/services/identity/v3/json/region_client.py b/tempest/services/identity/v3/json/regions_client.py
similarity index 98%
rename from tempest/services/identity/v3/json/region_client.py
rename to tempest/services/identity/v3/json/regions_client.py
index 3595391..bc4b7a1 100644
--- a/tempest/services/identity/v3/json/region_client.py
+++ b/tempest/services/identity/v3/json/regions_client.py
@@ -23,7 +23,7 @@
 from tempest.common import service_client
 
 
-class RegionClient(service_client.ServiceClient):
+class RegionsClient(service_client.ServiceClient):
     api_version = "v3"
 
     def create_region(self, region_id=None, **kwargs):
diff --git a/tempest/services/identity/v3/json/service_client.py b/tempest/services/identity/v3/json/services_client.py
similarity index 97%
rename from tempest/services/identity/v3/json/service_client.py
rename to tempest/services/identity/v3/json/services_client.py
index 3dbfe5e..dd65f1d 100644
--- a/tempest/services/identity/v3/json/service_client.py
+++ b/tempest/services/identity/v3/json/services_client.py
@@ -22,7 +22,7 @@
 from tempest.common import service_client
 
 
-class ServiceClient(service_client.ServiceClient):
+class ServicesClient(service_client.ServiceClient):
     api_version = "v3"
 
     def update_service(self, service_id, **kwargs):
diff --git a/tempest/services/network/json/agents_client.py b/tempest/services/network/json/agents_client.py
new file mode 100644
index 0000000..07f93b2
--- /dev/null
+++ b/tempest/services/network/json/agents_client.py
@@ -0,0 +1,68 @@
+# 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.services.network.json import base
+
+
+class AgentsClient(base.BaseNetworkClient):
+
+    def update_agent(self, agent_id, **kwargs):
+        """Update agent."""
+        # TODO(piyush): Current api-site doesn't contain this API description.
+        # After fixing the api-site, we need to fix here also for putting the
+        # link to api-site.
+        # LP: https://bugs.launchpad.net/openstack-api-site/+bug/1526673
+        uri = '/agents/%s' % agent_id
+        return self.update_resource(uri, kwargs)
+
+    def show_agent(self, agent_id, **fields):
+        uri = '/agents/%s' % agent_id
+        return self.show_resource(uri, **fields)
+
+    def list_agents(self, **filters):
+        uri = '/agents'
+        return self.list_resources(uri, **filters)
+
+    def list_routers_on_l3_agent(self, agent_id):
+        uri = '/agents/%s/l3-routers' % agent_id
+        return self.list_resources(uri)
+
+    def add_router_to_l3_agent(self, agent_id, **kwargs):
+        # TODO(piyush): Current api-site doesn't contain this API description.
+        # After fixing the api-site, we need to fix here also for putting the
+        # link to api-site.
+        # LP: https://bugs.launchpad.net/openstack-api-site/+bug/1526670
+        uri = '/agents/%s/l3-routers' % agent_id
+        return self.create_resource(uri, kwargs)
+
+    def remove_router_from_l3_agent(self, agent_id, router_id):
+        uri = '/agents/%s/l3-routers/%s' % (agent_id, router_id)
+        return self.delete_resource(uri)
+
+    def list_networks_hosted_by_one_dhcp_agent(self, agent_id):
+        uri = '/agents/%s/dhcp-networks' % agent_id
+        return self.list_resources(uri)
+
+    def remove_network_from_dhcp_agent(self, agent_id, network_id):
+        uri = '/agents/%s/dhcp-networks/%s' % (agent_id,
+                                               network_id)
+        return self.delete_resource(uri)
+
+    def add_dhcp_agent_to_network(self, agent_id, **kwargs):
+        # TODO(piyush): Current api-site doesn't contain this API description.
+        # After fixing the api-site, we need to fix here also for putting the
+        # link to api-site.
+        # LP: https://bugs.launchpad.net/openstack-api-site/+bug/1526212
+        uri = '/agents/%s/dhcp-networks' % agent_id
+        return self.create_resource(uri, kwargs)
diff --git a/tempest/services/network/json/network_client.py b/tempest/services/network/json/network_client.py
index 6e3b0fe..e8e21d2 100644
--- a/tempest/services/network/json/network_client.py
+++ b/tempest/services/network/json/network_client.py
@@ -35,28 +35,6 @@
     quotas
     """
 
-    def create_security_group(self, **kwargs):
-        uri = '/security-groups'
-        post_data = {'security_group': kwargs}
-        return self.create_resource(uri, post_data)
-
-    def update_security_group(self, security_group_id, **kwargs):
-        uri = '/security-groups/%s' % security_group_id
-        post_data = {'security_group': kwargs}
-        return self.update_resource(uri, post_data)
-
-    def show_security_group(self, security_group_id, **fields):
-        uri = '/security-groups/%s' % security_group_id
-        return self.show_resource(uri, **fields)
-
-    def delete_security_group(self, security_group_id):
-        uri = '/security-groups/%s' % security_group_id
-        return self.delete_resource(uri)
-
-    def list_security_groups(self, **filters):
-        uri = '/security-groups'
-        return self.list_resources(uri, **filters)
-
     def create_security_group_rule(self, **kwargs):
         uri = '/security-group-rules'
         post_data = {'security_group_rule': kwargs}
@@ -82,21 +60,32 @@
         uri = '/extensions'
         return self.list_resources(uri, **filters)
 
-    def create_bulk_network(self, names):
-        network_list = [{'name': name} for name in names]
-        post_data = {'networks': network_list}
+    def create_bulk_network(self, **kwargs):
+        """create bulk network
+
+        Available params: see http://developer.openstack.org/
+                              api-ref-networking-v2.html#bulkCreateNetwork
+        """
         uri = '/networks'
-        return self.create_resource(uri, post_data)
+        return self.create_resource(uri, kwargs)
 
-    def create_bulk_subnet(self, subnet_list):
-        post_data = {'subnets': subnet_list}
+    def create_bulk_subnet(self, **kwargs):
+        """create bulk subnet
+
+        Available params: see http://developer.openstack.org/
+                              api-ref-networking-v2.html#bulkCreateSubnet
+        """
         uri = '/subnets'
-        return self.create_resource(uri, post_data)
+        return self.create_resource(uri, kwargs)
 
-    def create_bulk_port(self, port_list):
-        post_data = {'ports': port_list}
+    def create_bulk_port(self, **kwargs):
+        """create bulk port
+
+        Available params: see http://developer.openstack.org/
+                              api-ref-networking-v2.html#bulkCreatePorts
+        """
         uri = '/ports'
-        return self.create_resource(uri, post_data)
+        return self.create_resource(uri, kwargs)
 
     def wait_for_resource_deletion(self, resource_type, id, client=None):
         """Waits for a resource to be deleted."""
@@ -240,60 +229,14 @@
         uri = '/ports?device_id=%s' % uuid
         return self.list_resources(uri)
 
-    def update_agent(self, agent_id, **kwargs):
-        """Update agent
-
-        :param agent_info: Agent update information.
-        E.g {"admin_state_up": True}
-        """
-        # TODO(piyush): Current api-site doesn't contain this API description.
-        # After fixing the api-site, we need to fix here also for putting the
-        # link to api-site.
-        # LP: https://bugs.launchpad.net/openstack-api-site/+bug/1526673
-        uri = '/agents/%s' % agent_id
-        return self.update_resource(uri, kwargs)
-
-    def show_agent(self, agent_id, **fields):
-        uri = '/agents/%s' % agent_id
-        return self.show_resource(uri, **fields)
-
-    def list_agents(self, **filters):
-        uri = '/agents'
-        return self.list_resources(uri, **filters)
-
-    def list_routers_on_l3_agent(self, agent_id):
-        uri = '/agents/%s/l3-routers' % agent_id
-        return self.list_resources(uri)
-
     def list_l3_agents_hosting_router(self, router_id):
         uri = '/routers/%s/l3-agents' % router_id
         return self.list_resources(uri)
 
-    def add_router_to_l3_agent(self, agent_id, **kwargs):
-        # TODO(piyush): Current api-site doesn't contain this API description.
-        # After fixing the api-site, we need to fix here also for putting the
-        # link to api-site.
-        # LP: https://bugs.launchpad.net/openstack-api-site/+bug/1526670
-        uri = '/agents/%s/l3-routers' % agent_id
-        return self.create_resource(uri, kwargs)
-
-    def remove_router_from_l3_agent(self, agent_id, router_id):
-        uri = '/agents/%s/l3-routers/%s' % (agent_id, router_id)
-        return self.delete_resource(uri)
-
     def list_dhcp_agent_hosting_network(self, network_id):
         uri = '/networks/%s/dhcp-agents' % network_id
         return self.list_resources(uri)
 
-    def list_networks_hosted_by_one_dhcp_agent(self, agent_id):
-        uri = '/agents/%s/dhcp-networks' % agent_id
-        return self.list_resources(uri)
-
-    def remove_network_from_dhcp_agent(self, agent_id, network_id):
-        uri = '/agents/%s/dhcp-networks/%s' % (agent_id,
-                                               network_id)
-        return self.delete_resource(uri)
-
     def update_extra_routes(self, router_id, **kwargs):
         """Update Extra routes.
 
@@ -312,30 +255,3 @@
             }
         }
         return self.update_resource(uri, put_body)
-
-    def add_dhcp_agent_to_network(self, agent_id, network_id):
-        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/services/network/json/security_groups_client.py b/tempest/services/network/json/security_groups_client.py
new file mode 100644
index 0000000..a60d2a6
--- /dev/null
+++ b/tempest/services/network/json/security_groups_client.py
@@ -0,0 +1,38 @@
+#    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.services.network.json import base
+
+
+class SecurityGroupsClient(base.BaseNetworkClient):
+
+    def create_security_group(self, **kwargs):
+        uri = '/security-groups'
+        post_data = {'security_group': kwargs}
+        return self.create_resource(uri, post_data)
+
+    def update_security_group(self, security_group_id, **kwargs):
+        uri = '/security-groups/%s' % security_group_id
+        post_data = {'security_group': kwargs}
+        return self.update_resource(uri, post_data)
+
+    def show_security_group(self, security_group_id, **fields):
+        uri = '/security-groups/%s' % security_group_id
+        return self.show_resource(uri, **fields)
+
+    def delete_security_group(self, security_group_id):
+        uri = '/security-groups/%s' % security_group_id
+        return self.delete_resource(uri)
+
+    def list_security_groups(self, **filters):
+        uri = '/security-groups'
+        return self.list_resources(uri, **filters)
diff --git a/tempest/services/network/json/subnetpools_client.py b/tempest/services/network/json/subnetpools_client.py
new file mode 100644
index 0000000..b5aec47
--- /dev/null
+++ b/tempest/services/network/json/subnetpools_client.py
@@ -0,0 +1,40 @@
+# 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.services.network.json import base
+
+
+class SubnetpoolsClient(base.BaseNetworkClient):
+
+    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/services/volume/base/admin/base_types_client.py b/tempest/services/volume/base/admin/base_types_client.py
index de6ea8a..867273e 100644
--- a/tempest/services/volume/base/admin/base_types_client.py
+++ b/tempest/services/volume/base/admin/base_types_client.py
@@ -47,10 +47,10 @@
         """Returns the primary type of resource this client works with."""
         return 'volume-type/encryption-type'
 
-    def list_volume_types(self, params=None):
+    def list_volume_types(self, **params):
         """List all the volume_types created."""
         url = 'types'
-        if params is not None:
+        if params:
             url += '?%s' % urllib.urlencode(params)
 
         resp, body = self.get(url)
@@ -66,19 +66,13 @@
         self.expected_success(200, resp.status)
         return service_client.ResponseBody(resp, body)
 
-    def create_volume_type(self, name, **kwargs):
-        """Creates a new Volume_type.
+    def create_volume_type(self, **kwargs):
+        """Create volume type.
 
-        name(Required): Name of volume_type.
-        Following optional keyword arguments are accepted:
-        extra_specs: A dictionary of values to be used as extra_specs.
+        Available params: see http://developer.openstack.org/
+                              api-ref-blockstorage-v2.html#createVolumeType
         """
-        post_body = {
-            'name': name,
-            'extra_specs': kwargs.get('extra_specs'),
-        }
-
-        post_body = json.dumps({'volume_type': post_body})
+        post_body = json.dumps({'volume_type': kwargs})
         resp, body = self.post('types', post_body)
         body = json.loads(body)
         self.expected_success(200, resp.status)
@@ -90,10 +84,17 @@
         self.expected_success(202, resp.status)
         return service_client.ResponseBody(resp, body)
 
-    def list_volume_types_extra_specs(self, vol_type_id, params=None):
-        """List all the volume_types extra specs created."""
+    def list_volume_types_extra_specs(self, vol_type_id, **params):
+        """List all the volume_types extra specs created.
+
+        TODO: Current api-site doesn't contain this API description.
+        After fixing the api-site, we need to fix here also for putting
+        the link to api-site.
+
+
+        """
         url = 'types/%s/extra_specs' % str(vol_type_id)
-        if params is not None:
+        if params:
             url += '?%s' % urllib.urlencode(params)
 
         resp, body = self.get(url)
@@ -101,23 +102,23 @@
         self.expected_success(200, resp.status)
         return service_client.ResponseBody(resp, body)
 
-    def show_volume_type_extra_specs(self, vol_type_id, extra_spec_name):
+    def show_volume_type_extra_specs(self, vol_type_id, extra_specs_name):
         """Returns the details of a single volume_type extra spec."""
         url = "types/%s/extra_specs/%s" % (str(vol_type_id),
-                                           str(extra_spec_name))
+                                           str(extra_specs_name))
         resp, body = self.get(url)
         body = json.loads(body)
         self.expected_success(200, resp.status)
         return service_client.ResponseBody(resp, body)
 
-    def create_volume_type_extra_specs(self, vol_type_id, extra_spec):
+    def create_volume_type_extra_specs(self, vol_type_id, extra_specs):
         """Creates a new Volume_type extra spec.
 
         vol_type_id: Id of volume_type.
         extra_specs: A dictionary of values to be used as extra_specs.
         """
         url = "types/%s/extra_specs" % str(vol_type_id)
-        post_body = json.dumps({'extra_specs': extra_spec})
+        post_body = json.dumps({'extra_specs': extra_specs})
         resp, body = self.post(url, post_body)
         body = json.loads(body)
         self.expected_success(200, resp.status)
@@ -131,7 +132,7 @@
         return service_client.ResponseBody(resp, body)
 
     def update_volume_type_extra_specs(self, vol_type_id, extra_spec_name,
-                                       extra_spec):
+                                       extra_specs):
         """Update a volume_type extra spec.
 
         vol_type_id: Id of volume_type.
@@ -141,7 +142,7 @@
         """
         url = "types/%s/extra_specs/%s" % (str(vol_type_id),
                                            str(extra_spec_name))
-        put_body = json.dumps(extra_spec)
+        put_body = json.dumps(extra_specs)
         resp, body = self.put(url, put_body)
         body = json.loads(body)
         self.expected_success(200, resp.status)
@@ -159,18 +160,14 @@
         return service_client.ResponseBody(resp, body)
 
     def create_encryption_type(self, vol_type_id, **kwargs):
-        """Create a new encryption type for the specified volume type.
+        """Create encryption type.
 
-        vol_type_id: Id of volume_type.
-        provider: Class providing encryption support.
-        cipher: Encryption algorithm/mode to use.
-        key_size: Size of the encryption key, in bits.
-        control_location: Notional service where encryption is performed.
+        TODO: Current api-site doesn't contain this API description.
+        After fixing the api-site, we need to fix here also for putting
+        the link to api-site.
         """
         url = "/types/%s/encryption" % str(vol_type_id)
-        post_body = {}
-        post_body.update(kwargs)
-        post_body = json.dumps({'encryption': post_body})
+        post_body = json.dumps({'encryption': kwargs})
         resp, body = self.post(url, post_body)
         body = json.loads(body)
         self.expected_success(200, resp.status)
diff --git a/tempest/services/volume/base/base_qos_client.py b/tempest/services/volume/base/base_qos_client.py
index c7f6c6e..697e902 100644
--- a/tempest/services/volume/base/base_qos_client.py
+++ b/tempest/services/volume/base/base_qos_client.py
@@ -67,15 +67,13 @@
                 raise exceptions.TimeoutException
             time.sleep(self.build_interval)
 
-    def create_qos(self, name, consumer, **kwargs):
+    def create_qos(self, **kwargs):
         """Create a QoS Specification.
 
-        name : name of the QoS specifications
-        consumer : conumer of Qos ( front-end / back-end / both )
+        Available params: see http://developer.openstack.org/
+                              api-ref-blockstorage-v2.html#createQoSSpec
         """
-        post_body = {'name': name, 'consumer': consumer}
-        post_body.update(kwargs)
-        post_body = json.dumps({'qos_specs': post_body})
+        post_body = json.dumps({'qos_specs': kwargs})
         resp, body = self.post('qos-specs', post_body)
         self.expected_success(200, resp.status)
         body = json.loads(body)
@@ -107,7 +105,8 @@
     def set_qos_key(self, qos_id, **kwargs):
         """Set the specified keys/values of QoS specification.
 
-        kwargs : it is the dictionary of the key=value pairs to set
+        Available params: see http://developer.openstack.org/
+                              api-ref-blockstorage-v2.html#setQoSKey
         """
         put_body = json.dumps({"qos_specs": kwargs})
         resp, body = self.put('qos-specs/%s' % qos_id, put_body)
@@ -118,7 +117,9 @@
     def unset_qos_key(self, qos_id, keys):
         """Unset the specified keys of QoS specification.
 
-        keys : it is the array of the keys to unset
+        :param keys: keys to delete from the QoS specification.
+
+        TODO(jordanP): Add a link once LP #1524877 is fixed.
         """
         put_body = json.dumps({'keys': keys})
         resp, body = self.put('qos-specs/%s/delete_keys' % qos_id, put_body)
diff --git a/tempest/stress/driver.py b/tempest/stress/driver.py
index a550d71..a3e1ea3 100644
--- a/tempest/stress/driver.py
+++ b/tempest/stress/driver.py
@@ -106,7 +106,7 @@
         if process['process'].is_alive():
             try:
                 pid = process['process'].pid
-                LOG.warn("Process %d hangs. Send SIGKILL." % pid)
+                LOG.warning("Process %d hangs. Send SIGKILL." % pid)
                 os.kill(pid, signal.SIGKILL)
             except Exception:
                 pass
@@ -239,14 +239,13 @@
             had_errors = True
         sum_runs += process['statistic']['runs']
         sum_fails += process['statistic']['fails']
-        LOG.info(" Process %d (%s): Run %d actions (%d failed)" %
-                 (process['p_number'],
-                  process['action'],
-                  process['statistic']['runs'],
-                     process['statistic']['fails']))
-    LOG.info("Summary:")
-    LOG.info("Run %d actions (%d failed)" %
-             (sum_runs, sum_fails))
+        print ("Process %d (%s): Run %d actions (%d failed)" % (
+               process['p_number'],
+               process['action'],
+               process['statistic']['runs'],
+               process['statistic']['fails']))
+    print ("Summary:")
+    print ("Run %d actions (%d failed)" % (sum_runs, sum_fails))
 
     if not had_errors and CONF.stress.full_clean_stack:
         LOG.info("cleaning up")
diff --git a/tempest/test.py b/tempest/test.py
index 407df3b..aed438c 100644
--- a/tempest/test.py
+++ b/tempest/test.py
@@ -226,6 +226,7 @@
     # Resources required to validate a server using ssh
     validation_resources = {}
     network_resources = {}
+    services_microversion = {}
 
     # NOTE(sdague): log_format is defined inline here instead of using the oslo
     # default because going through the config path recouples config to the
@@ -375,8 +376,8 @@
             cls.validation_resources = vresources.create_validation_resources(
                 cls.os, cls.validation_resources)
         else:
-            LOG.warn("Client manager not found, validation resources not"
-                     " created")
+            LOG.warning("Client manager not found, validation resources not"
+                        " created")
 
     @classmethod
     def resource_cleanup(cls):
@@ -391,8 +392,8 @@
                                                       cls.validation_resources)
                 cls.validation_resources = {}
             else:
-                LOG.warn("Client manager not found, validation resources not"
-                         " deleted")
+                LOG.warning("Client manager not found, validation resources "
+                            "not deleted")
 
     def setUp(self):
         super(BaseTestCase, self).setUp()
@@ -515,7 +516,8 @@
             else:
                 raise exceptions.InvalidCredentials(
                     "Invalid credentials type %s" % credential_type)
-        return clients.Manager(credentials=creds, service=cls._service)
+        return clients.Manager(credentials=creds, service=cls._service,
+                               api_microversions=cls.services_microversion)
 
     @classmethod
     def clear_credentials(cls):
@@ -602,7 +604,8 @@
                 credentials.is_admin_available(
                     identity_version=cls.get_identity_version())):
             admin_creds = cred_provider.get_admin_creds()
-            admin_manager = clients.Manager(admin_creds)
+            admin_manager = clients.Manager(
+                admin_creds, api_microversions=cls.services_microversion)
             networks_client = admin_manager.compute_networks_client
         return fixed_network.get_tenant_network(
             cred_provider, networks_client, CONF.compute.fixed_network_name)
diff --git a/tempest/tests/common/test_api_version_utils.py b/tempest/tests/common/test_api_version_utils.py
index 33024b6..9f399a2 100644
--- a/tempest/tests/common/test_api_version_utils.py
+++ b/tempest/tests/common/test_api_version_utils.py
@@ -192,3 +192,30 @@
     def test_cfg_version_min_greater_than_max(self):
         self.assertRaises(exceptions.InvalidConfiguration,
                           self._test_version, '2.2', '2.7', '2.9', '2.7')
+
+
+class TestSelectRequestMicroversion(base.TestCase):
+
+    def _test_request_version(self, test_min_version,
+                              cfg_min_version, expected_version):
+        selected_version = api_version_utils.select_request_microversion(
+            test_min_version, cfg_min_version)
+        self.assertEqual(expected_version, selected_version)
+
+    def test_cfg_min_version_greater(self):
+        self._test_request_version('2.1', '2.3', expected_version='2.3')
+
+    def test_class_min_version_greater(self):
+        self._test_request_version('2.5', '2.3', expected_version='2.5')
+
+    def test_cfg_min_version_none(self):
+        self._test_request_version('2.5', None, expected_version='2.5')
+
+    def test_class_min_version_none(self):
+        self._test_request_version(None, '2.3', expected_version='2.3')
+
+    def test_both_min_version_none(self):
+        self._test_request_version(None, None, expected_version=None)
+
+    def test_both_min_version_equal(self):
+        self._test_request_version('2.3', '2.3', expected_version='2.3')
diff --git a/tempest/tests/common/test_dynamic_creds.py b/tempest/tests/common/test_dynamic_creds.py
index d520985..a55e556 100644
--- a/tempest/tests/common/test_dynamic_creds.py
+++ b/tempest/tests/common/test_dynamic_creds.py
@@ -396,15 +396,15 @@
 
         port_list_mock.start()
         secgroup_list_mock = mock.patch.object(
-            creds.network_admin_client,
+            creds.security_groups_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)
+            'tempest.services.network.json.security_groups_client.'
+            'SecurityGroupsClient.delete', return_value=return_values)
         creds.clear_creds()
         # Verify default security group delete
         calls = remove_secgroup_mock.mock_calls
diff --git a/tempest/tests/common/test_service_clients.py b/tempest/tests/common/test_service_clients.py
index c313071..f248957 100644
--- a/tempest/tests/common/test_service_clients.py
+++ b/tempest/tests/common/test_service_clients.py
@@ -17,10 +17,6 @@
 import six
 
 from tempest.services.baremetal.v1.json import baremetal_client
-from tempest.services.compute.json import floating_ips_client
-from tempest.services.compute.json import security_group_rules_client
-from tempest.services.compute.json import server_groups_client
-from tempest.services.compute.json import servers_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
@@ -30,9 +26,9 @@
 from tempest.services.identity.v3.json import endpoints_client
 from tempest.services.identity.v3.json import identity_client as \
     identity_v3_identity_client
-from tempest.services.identity.v3.json import policy_client
-from tempest.services.identity.v3.json import region_client
-from tempest.services.identity.v3.json import service_client
+from tempest.services.identity.v3.json import policies_client
+from tempest.services.identity.v3.json import regions_client
+from tempest.services.identity.v3.json import services_client
 from tempest.services.image.v1.json import images_client
 from tempest.services.image.v2.json import images_client as images_v2_client
 from tempest.services.messaging.json import messaging_client
@@ -87,10 +83,6 @@
     def test_service_client_creations_with_specified_args(self, mock_init):
         test_clients = [
             baremetal_client.BaremetalClient,
-            floating_ips_client.FloatingIPsClient,
-            security_group_rules_client.SecurityGroupRulesClient,
-            server_groups_client.ServerGroupsClient,
-            servers_client.ServersClient,
             data_processing_client.DataProcessingClient,
             db_flavor_client.DatabaseFlavorsClient,
             db_version_client.DatabaseVersionsClient,
@@ -126,9 +118,9 @@
             credentials_client.CredentialsClient,
             endpoints_client.EndPointClient,
             identity_v3_identity_client.IdentityV3Client,
-            policy_client.PolicyClient,
-            region_client.RegionClient,
-            service_client.ServiceClient,
+            policies_client.PoliciesClient,
+            regions_client.RegionsClient,
+            services_client.ServicesClient,
             images_client.ImagesClient,
             images_v2_client.ImagesClientV2
         ]
diff --git a/tempest/tests/services/compute/test_floating_ips_client.py b/tempest/tests/services/compute/test_floating_ips_client.py
deleted file mode 100644
index ee22004..0000000
--- a/tempest/tests/services/compute/test_floating_ips_client.py
+++ /dev/null
@@ -1,113 +0,0 @@
-# Copyright 2015 IBM Corp.
-#
-#    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 floating_ips_client
-from tempest.tests import fake_auth_provider
-from tempest.tests.services.compute import base
-
-
-class TestFloatingIpsClient(base.BaseComputeServiceTest):
-
-    floating_ip = {"fixed_ip": None,
-                   "id": "46d61064-13ba-4bf0-9557-69de824c3d6f",
-                   "instance_id": "a1daa443-a6bb-463e-aea2-104b7d912eb8",
-                   "ip": "10.10.10.1",
-                   "pool": "nova"}
-
-    def setUp(self):
-        super(TestFloatingIpsClient, self).setUp()
-        fake_auth = fake_auth_provider.FakeAuthProvider()
-        self.client = floating_ips_client.FloatingIPsClient(
-            fake_auth, 'compute', 'regionOne')
-
-    def _test_list_floating_ips(self, bytes_body=False):
-        expected = {'floating_ips': [TestFloatingIpsClient.floating_ip]}
-        self.check_service_client_function(
-            self.client.list_floating_ips,
-            'tempest.common.service_client.ServiceClient.get',
-            expected,
-            bytes_body)
-
-    def test_list_floating_ips_str_body(self):
-        self._test_list_floating_ips(bytes_body=False)
-
-    def test_list_floating_ips_byte_body(self):
-        self._test_list_floating_ips(bytes_body=True)
-
-    def _test_show_floating_ip(self, bytes_body=False):
-        expected = {"floating_ip": TestFloatingIpsClient.floating_ip}
-        self.check_service_client_function(
-            self.client.show_floating_ip,
-            'tempest.common.service_client.ServiceClient.get',
-            expected,
-            bytes_body,
-            floating_ip_id='a1daa443-a6bb-463e-aea2-104b7d912eb8')
-
-    def test_show_floating_ip_str_body(self):
-        self._test_show_floating_ip(bytes_body=False)
-
-    def test_show_floating_ip_byte_body(self):
-        self._test_show_floating_ip(bytes_body=True)
-
-    def _test_create_floating_ip(self, bytes_body=False):
-        expected = {"floating_ip": TestFloatingIpsClient.floating_ip}
-        self.check_service_client_function(
-            self.client.create_floating_ip,
-            'tempest.common.service_client.ServiceClient.post',
-            expected,
-            bytes_body,
-            pool_name='nova')
-
-    def test_create_floating_ip_str_body(self):
-        self._test_create_floating_ip(bytes_body=False)
-
-    def test_create_floating_ip_byte_body(self):
-        self._test_create_floating_ip(bytes_body=True)
-
-    def test_delete_floating_ip(self):
-        self.check_service_client_function(
-            self.client.delete_floating_ip,
-            'tempest.common.service_client.ServiceClient.delete',
-            {}, status=202, floating_ip_id='fake-id')
-
-    def test_associate_floating_ip_to_server(self):
-        self.check_service_client_function(
-            self.client.associate_floating_ip_to_server,
-            'tempest.common.service_client.ServiceClient.post',
-            {}, status=202, floating_ip='10.10.10.1',
-            server_id='c782b7a9-33cd-45f0-b795-7f87f456408b')
-
-    def test_disassociate_floating_ip_from_server(self):
-        self.check_service_client_function(
-            self.client.disassociate_floating_ip_from_server,
-            'tempest.common.service_client.ServiceClient.post',
-            {}, status=202, floating_ip='10.10.10.1',
-            server_id='c782b7a9-33cd-45f0-b795-7f87f456408b')
-
-    def test_is_resource_deleted_true(self):
-        self.useFixture(mockpatch.Patch(
-            'tempest.services.compute.json.floating_ips_client.'
-            'FloatingIPsClient.show_floating_ip',
-            side_effect=lib_exc.NotFound()))
-        self.assertTrue(self.client.is_resource_deleted('fake-id'))
-
-    def test_is_resource_deleted_false(self):
-        self.useFixture(mockpatch.Patch(
-            'tempest.services.compute.json.floating_ips_client.'
-            'FloatingIPsClient.show_floating_ip',
-            return_value={"floating_ip": TestFloatingIpsClient.floating_ip}))
-        self.assertFalse(self.client.is_resource_deleted('fake-id'))
diff --git a/tempest/tests/services/compute/test_security_group_rules_client.py b/tempest/tests/services/compute/test_security_group_rules_client.py
deleted file mode 100644
index c182742..0000000
--- a/tempest/tests/services/compute/test_security_group_rules_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.services.compute.json import security_group_rules_client
-from tempest.tests import fake_auth_provider
-from tempest.tests.services.compute import base
-
-
-class TestSecurityGroupRulesClient(base.BaseComputeServiceTest):
-
-    FAKE_SECURITY_GROUP_RULE = {
-        "security_group_rule": {
-            "id": "2d021cf1-ce4b-4292-994f-7a785d62a144",
-            "ip_range": {
-                "cidr": "0.0.0.0/0"
-            },
-            "parent_group_id": "48700ff3-30b8-4e63-845f-a79c9633e9fb",
-            "to_port": 443,
-            "ip_protocol": "tcp",
-            "group": {},
-            "from_port": 443
-        }
-    }
-
-    def setUp(self):
-        super(TestSecurityGroupRulesClient, self).setUp()
-        fake_auth = fake_auth_provider.FakeAuthProvider()
-        self.client = security_group_rules_client.SecurityGroupRulesClient(
-            fake_auth, 'compute', 'regionOne')
-
-    def _test_create_security_group_rule(self, bytes_body=False):
-        req_body = {
-            "from_port": "443",
-            "ip_protocol": "tcp",
-            "to_port": "443",
-            "cidr": "0.0.0.0/0",
-            "parent_group_id": "48700ff3-30b8-4e63-845f-a79c9633e9fb"
-        }
-        self.check_service_client_function(
-            self.client.create_security_group_rule,
-            'tempest.common.service_client.ServiceClient.post',
-            self.FAKE_SECURITY_GROUP_RULE,
-            to_utf=bytes_body, **req_body)
-
-    def test_create_security_group_rule_with_str_body(self):
-        self._test_create_security_group_rule()
-
-    def test_create_security_group_rule_with_bytes_body(self):
-        self._test_create_security_group_rule(bytes_body=True)
-
-    def test_delete_security_group_rule(self):
-        self.check_service_client_function(
-            self.client.delete_security_group_rule,
-            'tempest.common.service_client.ServiceClient.delete',
-            {}, status=202, group_rule_id='group-id')
diff --git a/tempest/tests/services/compute/test_server_groups_client.py b/tempest/tests/services/compute/test_server_groups_client.py
deleted file mode 100644
index e531e2f..0000000
--- a/tempest/tests/services/compute/test_server_groups_client.py
+++ /dev/null
@@ -1,84 +0,0 @@
-# Copyright 2015 IBM Corp.
-#
-#    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 httplib2
-
-from oslotest import mockpatch
-from tempest_lib.tests import fake_auth_provider
-
-from tempest.services.compute.json import server_groups_client
-from tempest.tests.services.compute import base
-
-
-class TestServerGroupsClient(base.BaseComputeServiceTest):
-
-    server_group = {
-        "id": "5bbcc3c4-1da2-4437-a48a-66f15b1b13f9",
-        "name": "test",
-        "policies": ["anti-affinity"],
-        "members": [],
-        "metadata": {}}
-
-    def setUp(self):
-        super(TestServerGroupsClient, self).setUp()
-        fake_auth = fake_auth_provider.FakeAuthProvider()
-        self.client = server_groups_client.ServerGroupsClient(
-            fake_auth, 'compute', 'regionOne')
-
-    def _test_create_server_group(self, bytes_body=False):
-        expected = {"server_group": TestServerGroupsClient.server_group}
-        self.check_service_client_function(
-            self.client.create_server_group,
-            'tempest.common.service_client.ServiceClient.post', expected,
-            bytes_body, name='fake-group', policies=['affinity'])
-
-    def test_create_server_group_str_body(self):
-        self._test_create_server_group(bytes_body=False)
-
-    def test_create_server_group_byte_body(self):
-        self._test_create_server_group(bytes_body=True)
-
-    def test_delete_server_group(self):
-        response = (httplib2.Response({'status': 204}), None)
-        self.useFixture(mockpatch.Patch(
-            'tempest.common.service_client.ServiceClient.delete',
-            return_value=response))
-        self.client.delete_server_group('fake-group')
-
-    def _test_list_server_groups(self, bytes_body=False):
-        expected = {"server_groups": [TestServerGroupsClient.server_group]}
-        self.check_service_client_function(
-            self.client.list_server_groups,
-            'tempest.common.service_client.ServiceClient.get',
-            expected, bytes_body)
-
-    def test_list_server_groups_str_body(self):
-        self._test_list_server_groups(bytes_body=False)
-
-    def test_list_server_groups_byte_body(self):
-        self._test_list_server_groups(bytes_body=True)
-
-    def _test_show_server_group(self, bytes_body=False):
-        expected = {"server_group": TestServerGroupsClient.server_group}
-        self.check_service_client_function(
-            self.client.show_server_group,
-            'tempest.common.service_client.ServiceClient.get',
-            expected, bytes_body,
-            server_group_id='5bbcc3c4-1da2-4437-a48a-66f15b1b13f9')
-
-    def test_show_server_group_str_body(self):
-        self._test_show_server_group(bytes_body=False)
-
-    def test_show_server_group_byte_body(self):
-        self._test_show_server_group(bytes_body=True)
diff --git a/tempest/tests/services/compute/test_servers_client.py b/tempest/tests/services/compute/test_servers_client.py
deleted file mode 100644
index 1fd0740..0000000
--- a/tempest/tests/services/compute/test_servers_client.py
+++ /dev/null
@@ -1,999 +0,0 @@
-# Copyright 2015 IBM Corp.
-#
-#    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.services.compute.json import servers_client
-from tempest.tests import fake_auth_provider
-from tempest.tests.services.compute import base
-
-
-class TestServersClient(base.BaseComputeServiceTest):
-
-    FAKE_SERVERS = {'servers': [{
-        "id": "616fb98f-46ca-475e-917e-2563e5a8cd19",
-        "links": [
-            {
-                "href": "http://os.co/v2/616fb98f-46ca-475e-917e-2563e5a8cd19",
-                "rel": "self"
-            },
-            {
-                "href": "http://os.co/616fb98f-46ca-475e-917e-2563e5a8cd19",
-                "rel": "bookmark"
-            }
-        ],
-        "name": u"new\u1234-server-test"}]
-    }
-
-    FAKE_SERVER_DIAGNOSTICS = {
-        "cpu0_time": 17300000000,
-        "memory": 524288,
-        "vda_errors": -1,
-        "vda_read": 262144,
-        "vda_read_req": 112,
-        "vda_write": 5778432,
-        "vda_write_req": 488,
-        "vnet1_rx": 2070139,
-        "vnet1_rx_drop": 0,
-        "vnet1_rx_errors": 0,
-        "vnet1_rx_packets": 26701,
-        "vnet1_tx": 140208,
-        "vnet1_tx_drop": 0,
-        "vnet1_tx_errors": 0,
-        "vnet1_tx_packets": 662
-    }
-
-    FAKE_SERVER_GET = {'server': {
-        "accessIPv4": "",
-        "accessIPv6": "",
-        "addresses": {
-            "private": [
-                {
-                    "addr": "192.168.0.3",
-                    "version": 4
-                }
-            ]
-        },
-        "created": "2012-08-20T21:11:09Z",
-        "flavor": {
-            "id": "1",
-            "links": [
-                {
-                    "href": "http://os.com/openstack/flavors/1",
-                    "rel": "bookmark"
-                }
-            ]
-        },
-        "hostId": "65201c14a29663e06d0748e561207d998b343e1d164bfa0aafa9c45d",
-        "id": "893c7791-f1df-4c3d-8383-3caae9656c62",
-        "image": {
-            "id": "70a599e0-31e7-49b7-b260-868f441e862b",
-            "links": [
-                {
-                    "href": "http://imgs/70a599e0-31e7-49b7-b260-868f441e862b",
-                    "rel": "bookmark"
-                }
-            ]
-        },
-        "links": [
-            {
-                "href": "http://v2/srvs/893c7791-f1df-4c3d-8383-3caae9656c62",
-                "rel": "self"
-            },
-            {
-                "href": "http://srvs/893c7791-f1df-4c3d-8383-3caae9656c62",
-                "rel": "bookmark"
-            }
-        ],
-        "metadata": {
-            u"My Server N\u1234me": u"Apa\u1234che1"
-        },
-        "name": u"new\u1234-server-test",
-        "progress": 0,
-        "status": "ACTIVE",
-        "tenant_id": "openstack",
-        "updated": "2012-08-20T21:11:09Z",
-        "user_id": "fake"}
-    }
-
-    FAKE_SERVER_POST = {"server": {
-        "id": "616fb98f-46ca-475e-917e-2563e5a8cd19",
-        "adminPass": "fake-admin-pass",
-        "security_groups": [
-            'fake-security-group-1',
-            'fake-security-group-2'
-        ],
-        "links": [
-            {
-                "href": "http://os.co/v2/616fb98f-46ca-475e-917e-2563e5a8cd19",
-                "rel": "self"
-            },
-            {
-                "href": "http://os.co/616fb98f-46ca-475e-917e-2563e5a8cd19",
-                "rel": "bookmark"
-            }
-        ],
-        "OS-DCF:diskConfig": "fake-disk-config"}
-    }
-
-    FAKE_ADDRESS = {"addresses": {
-        "private": [
-            {
-                "addr": "192.168.0.3",
-                "version": 4
-            }
-        ]}
-    }
-
-    FAKE_COMMON_VOLUME = {
-        "id": "a6b0875b-6b5d-4a5a-81eb-0c3aa62e5fdb",
-        "device": "fake-device",
-        "volumeId": "a6b0875b-46ca-475e-917e-0c3aa62e5fdb",
-        "serverId": "616fb98f-46ca-475e-917e-2563e5a8cd19"
-    }
-
-    FAKE_VIRTUAL_INTERFACES = {
-        "id": "a6b0875b-46ca-475e-917e-0c3aa62e5fdb",
-        "mac_address": "00:25:90:5b:f8:c3",
-        "OS-EXT-VIF-NET:net_id": "fake-os-net-id"
-    }
-
-    FAKE_INSTANCE_ACTIONS = {
-        "action": "fake-action",
-        "request_id": "16fb98f-46ca-475e-917e-2563e5a8cd19",
-        "user_id": "16fb98f-46ca-475e-917e-2563e5a8cd12",
-        "project_id": "16fb98f-46ca-475e-917e-2563e5a8cd34",
-        "start_time": "09MAR2015 11:15",
-        "message": "fake-msg",
-        "instance_uuid": "16fb98f-46ca-475e-917e-2563e5a8cd12"
-    }
-
-    FAKE_VNC_CONSOLE = {
-        "type": "fake-type",
-        "url": "http://os.co/v2/616fb98f-46ca-475e-917e-2563e5a8cd19"
-    }
-
-    FAKE_INSTANCE_ACTION_EVENTS = {
-        "event": "fake-event",
-        "start_time": "09MAR2015 11:15",
-        "finish_time": "09MAR2015 11:15",
-        "result": "fake-result",
-        "traceback": "fake-trace-back"
-    }
-
-    FAKE_INSTANCE_WITH_EVENTS = copy.deepcopy(FAKE_INSTANCE_ACTIONS)
-    FAKE_INSTANCE_WITH_EVENTS['events'] = [FAKE_INSTANCE_ACTION_EVENTS]
-
-    FAKE_REBUILD_SERVER = copy.deepcopy(FAKE_SERVER_GET)
-    FAKE_REBUILD_SERVER['server']['adminPass'] = 'fake-admin-pass'
-
-    server_id = FAKE_SERVER_GET['server']['id']
-    network_id = 'a6b0875b-6b5d-4a5a-81eb-0c3aa62e5fdb'
-
-    def setUp(self):
-        super(TestServersClient, self).setUp()
-        fake_auth = fake_auth_provider.FakeAuthProvider()
-        self.client = servers_client.ServersClient(
-            fake_auth, 'compute', 'regionOne')
-
-    def test_list_servers_with_str_body(self):
-        self._test_list_servers()
-
-    def test_list_servers_with_bytes_body(self):
-        self._test_list_servers(bytes_body=True)
-
-    def _test_list_servers(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.list_servers,
-            'tempest.common.service_client.ServiceClient.get',
-            self.FAKE_SERVERS,
-            bytes_body)
-
-    def test_show_server_with_str_body(self):
-        self._test_show_server()
-
-    def test_show_server_with_bytes_body(self):
-        self._test_show_server(bytes_body=True)
-
-    def _test_show_server(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.show_server,
-            'tempest.common.service_client.ServiceClient.get',
-            self.FAKE_SERVER_GET,
-            bytes_body,
-            server_id=self.server_id
-            )
-
-    def test_delete_server(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.delete_server,
-            'tempest.common.service_client.ServiceClient.delete',
-            {},
-            status=204,
-            server_id=self.server_id
-            )
-
-    def test_create_server_with_str_body(self):
-        self._test_create_server()
-
-    def test_create_server_with_bytes_body(self):
-        self._test_create_server(True)
-
-    def _test_create_server(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.create_server,
-            'tempest.common.service_client.ServiceClient.post',
-            self.FAKE_SERVER_POST,
-            bytes_body,
-            status=202,
-            name='fake-name',
-            imageRef='fake-image-ref',
-            flavorRef='fake-flavor-ref'
-            )
-
-    def test_list_addresses_with_str_body(self):
-        self._test_list_addresses()
-
-    def test_list_addresses_with_bytes_body(self):
-        self._test_list_addresses(True)
-
-    def _test_list_addresses(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.list_addresses,
-            'tempest.common.service_client.ServiceClient.get',
-            self.FAKE_ADDRESS,
-            bytes_body,
-            server_id=self.server_id
-            )
-
-    def test_list_addresses_by_network_with_str_body(self):
-        self._test_list_addresses_by_network()
-
-    def test_list_addresses_by_network_with_bytes_body(self):
-        self._test_list_addresses_by_network(True)
-
-    def _test_list_addresses_by_network(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.list_addresses_by_network,
-            'tempest.common.service_client.ServiceClient.get',
-            self.FAKE_ADDRESS['addresses'],
-            server_id=self.server_id,
-            network_id=self.network_id
-            )
-
-    def test_action_with_str_body(self):
-        self._test_action()
-
-    def test_action_with_bytes_body(self):
-        self._test_action(True)
-
-    def _test_action(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.action,
-            'tempest.common.service_client.ServiceClient.post',
-            {},
-            server_id=self.server_id,
-            action_name='fake-action-name',
-            schema={'status_code': 200}
-            )
-
-    def test_create_backup_with_str_body(self):
-        self._test_create_backup()
-
-    def test_create_backup_with_bytes_body(self):
-        self._test_create_backup(True)
-
-    def _test_create_backup(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.create_backup,
-            'tempest.common.service_client.ServiceClient.post',
-            {},
-            status=202,
-            server_id=self.server_id,
-            backup_type='fake-backup',
-            rotation='fake-rotation',
-            name='fake-name'
-            )
-
-    def test_change_password_with_str_body(self):
-        self._test_change_password()
-
-    def test_change_password_with_bytes_body(self):
-        self._test_change_password(True)
-
-    def _test_change_password(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.change_password,
-            'tempest.common.service_client.ServiceClient.post',
-            {},
-            status=202,
-            server_id=self.server_id,
-            adminPass='fake-admin-pass'
-            )
-
-    def test_show_password_with_str_body(self):
-        self._test_show_password()
-
-    def test_show_password_with_bytes_body(self):
-        self._test_show_password(True)
-
-    def _test_show_password(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.show_password,
-            'tempest.common.service_client.ServiceClient.get',
-            {'password': 'fake-password'},
-            server_id=self.server_id
-            )
-
-    def test_delete_password_with_str_body(self):
-        self._test_delete_password()
-
-    def test_delete_password_with_bytes_body(self):
-        self._test_delete_password(True)
-
-    def _test_delete_password(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.delete_password,
-            'tempest.common.service_client.ServiceClient.delete',
-            {},
-            status=204,
-            server_id=self.server_id
-            )
-
-    def test_reboot_server_with_str_body(self):
-        self._test_reboot_server()
-
-    def test_reboot_server_with_bytes_body(self):
-        self._test_reboot_server(True)
-
-    def _test_reboot_server(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.reboot_server,
-            'tempest.common.service_client.ServiceClient.post',
-            {},
-            status=202,
-            server_id=self.server_id,
-            type='fake-reboot-type'
-            )
-
-    def test_rebuild_server_with_str_body(self):
-        self._test_rebuild_server()
-
-    def test_rebuild_server_with_bytes_body(self):
-        self._test_rebuild_server(True)
-
-    def _test_rebuild_server(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.rebuild_server,
-            'tempest.common.service_client.ServiceClient.post',
-            self.FAKE_REBUILD_SERVER,
-            status=202,
-            server_id=self.server_id,
-            image_ref='fake-image-ref'
-            )
-
-    def test_resize_server_with_str_body(self):
-        self._test_resize_server()
-
-    def test_resize_server_with_bytes_body(self):
-        self._test_resize_server(True)
-
-    def _test_resize_server(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.resize_server,
-            'tempest.common.service_client.ServiceClient.post',
-            {},
-            status=202,
-            server_id=self.server_id,
-            flavor_ref='fake-flavor-ref'
-            )
-
-    def test_confirm_resize_server_with_str_body(self):
-        self._test_confirm_resize_server()
-
-    def test_confirm_resize_server_with_bytes_body(self):
-        self._test_confirm_resize_server(True)
-
-    def _test_confirm_resize_server(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.confirm_resize_server,
-            'tempest.common.service_client.ServiceClient.post',
-            {},
-            status=204,
-            server_id=self.server_id
-            )
-
-    def test_revert_resize_server_with_str_body(self):
-        self._test_revert_resize()
-
-    def test_revert_resize_server_with_bytes_body(self):
-        self._test_revert_resize(True)
-
-    def _test_revert_resize(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.revert_resize_server,
-            'tempest.common.service_client.ServiceClient.post',
-            {},
-            status=202,
-            server_id=self.server_id
-            )
-
-    def test_list_server_metadata_with_str_body(self):
-        self._test_list_server_metadata()
-
-    def test_list_server_metadata_with_bytes_body(self):
-        self._test_list_server_metadata()
-
-    def _test_list_server_metadata(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.list_server_metadata,
-            'tempest.common.service_client.ServiceClient.get',
-            {'metadata': {'fake-key': 'fake-meta-data'}},
-            server_id=self.server_id
-            )
-
-    def test_set_server_metadata_with_str_body(self):
-        self._test_set_server_metadata()
-
-    def test_set_server_metadata_with_bytes_body(self):
-        self._test_set_server_metadata(True)
-
-    def _test_set_server_metadata(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.set_server_metadata,
-            'tempest.common.service_client.ServiceClient.put',
-            {'metadata': {'fake-key': 'fake-meta-data'}},
-            server_id=self.server_id,
-            meta='fake-meta'
-            )
-
-    def test_update_server_metadata_with_str_body(self):
-        self._test_update_server_metadata()
-
-    def test_update_server_metadata_with_bytes_body(self):
-        self._test_update_server_metadata(True)
-
-    def _test_update_server_metadata(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.update_server_metadata,
-            'tempest.common.service_client.ServiceClient.post',
-            {'metadata': {'fake-key': 'fake-meta-data'}},
-            server_id=self.server_id,
-            meta='fake-meta'
-            )
-
-    def test_show_server_metadata_item_with_str_body(self):
-        self._test_show_server_metadata()
-
-    def test_show_server_metadata_item_with_bytes_body(self):
-        self._test_show_server_metadata(True)
-
-    def _test_show_server_metadata(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.show_server_metadata_item,
-            'tempest.common.service_client.ServiceClient.get',
-            {'meta': {'fake-key': 'fake-meta-data'}},
-            server_id=self.server_id,
-            key='fake-key'
-            )
-
-    def test_set_server_metadata_item_with_str_body(self):
-        self._test_set_server_metadata_item()
-
-    def test_set_server_metadata_item_with_bytes_body(self):
-        self._test_set_server_metadata_item(True)
-
-    def _test_set_server_metadata_item(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.set_server_metadata_item,
-            'tempest.common.service_client.ServiceClient.put',
-            {'meta': {'fake-key': 'fake-meta-data'}},
-            server_id=self.server_id,
-            key='fake-key',
-            meta='fake-meta'
-            )
-
-    def test_delete_server_metadata_item_with_str_body(self):
-        self._test_delete_server_metadata()
-
-    def test_delete_server_metadata_item_with_bytes_body(self):
-        self._test_delete_server_metadata(True)
-
-    def _test_delete_server_metadata(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.delete_server_metadata_item,
-            'tempest.common.service_client.ServiceClient.delete',
-            {},
-            status=204,
-            server_id=self.server_id,
-            key='fake-key'
-            )
-
-    def test_stop_server_with_str_body(self):
-        self._test_stop_server()
-
-    def test_stop_server_with_bytes_body(self):
-        self._test_stop_server(True)
-
-    def _test_stop_server(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.stop_server,
-            'tempest.common.service_client.ServiceClient.post',
-            {},
-            status=202,
-            server_id=self.server_id
-            )
-
-    def test_start_server_with_str_body(self):
-        self._test_start_server()
-
-    def test_start_server_with_bytes_body(self):
-        self._test_start_server(True)
-
-    def _test_start_server(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.start_server,
-            'tempest.common.service_client.ServiceClient.post',
-            {},
-            status=202,
-            server_id=self.server_id
-            )
-
-    def test_attach_volume_with_str_body(self):
-        self._test_attach_volume_server()
-
-    def test_attach_volume_with_bytes_body(self):
-        self._test_attach_volume_server(True)
-
-    def _test_attach_volume_server(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.attach_volume,
-            'tempest.common.service_client.ServiceClient.post',
-            {'volumeAttachment': self.FAKE_COMMON_VOLUME},
-            server_id=self.server_id
-            )
-
-    def test_detach_volume_with_str_body(self):
-        self._test_detach_volume_server()
-
-    def test_detach_volume_with_bytes_body(self):
-        self._test_detach_volume_server(True)
-
-    def _test_detach_volume_server(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.detach_volume,
-            'tempest.common.service_client.ServiceClient.delete',
-            {},
-            status=202,
-            server_id=self.server_id,
-            volume_id=self.FAKE_COMMON_VOLUME['volumeId']
-            )
-
-    def test_show_volume_attachment_with_str_body(self):
-        self._test_show_volume_attachment()
-
-    def test_show_volume_attachment_with_bytes_body(self):
-        self._test_show_volume_attachment(True)
-
-    def _test_show_volume_attachment(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.show_volume_attachment,
-            'tempest.common.service_client.ServiceClient.get',
-            {'volumeAttachment': self.FAKE_COMMON_VOLUME},
-            server_id=self.server_id,
-            attach_id='fake-attach-id'
-            )
-
-    def test_list_volume_attachments_with_str_body(self):
-        self._test_list_volume_attachments()
-
-    def test_list_volume_attachments_with_bytes_body(self):
-        self._test_list_volume_attachments(True)
-
-    def _test_list_volume_attachments(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.list_volume_attachments,
-            'tempest.common.service_client.ServiceClient.get',
-            {'volumeAttachments': [self.FAKE_COMMON_VOLUME]},
-            server_id=self.server_id
-            )
-
-    def test_add_security_group_with_str_body(self):
-        self._test_add_security_group()
-
-    def test_add_security_group_with_bytes_body(self):
-        self._test_add_security_group(True)
-
-    def _test_add_security_group(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.add_security_group,
-            'tempest.common.service_client.ServiceClient.post',
-            {},
-            status=202,
-            server_id=self.server_id,
-            name='fake-name'
-            )
-
-    def test_remove_security_group_with_str_body(self):
-        self._test_remove_security_group()
-
-    def test_remove_security_group_with_bytes_body(self):
-        self._test_remove_security_group(True)
-
-    def _test_remove_security_group(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.remove_security_group,
-            'tempest.common.service_client.ServiceClient.post',
-            {},
-            status=202,
-            server_id=self.server_id,
-            name='fake-name'
-            )
-
-    def test_live_migrate_server_with_str_body(self):
-        self._test_live_migrate_server()
-
-    def test_live_migrate_server_with_bytes_body(self):
-        self._test_live_migrate_server(True)
-
-    def _test_live_migrate_server(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.live_migrate_server,
-            'tempest.common.service_client.ServiceClient.post',
-            {},
-            status=202,
-            server_id=self.server_id
-            )
-
-    def test_migrate_server_with_str_body(self):
-        self._test_migrate_server()
-
-    def test_migrate_server_with_bytes_body(self):
-        self._test_migrate_server(True)
-
-    def _test_migrate_server(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.migrate_server,
-            'tempest.common.service_client.ServiceClient.post',
-            {},
-            status=202,
-            server_id=self.server_id
-            )
-
-    def test_lock_server_with_str_body(self):
-        self._test_lock_server()
-
-    def test_lock_server_with_bytes_body(self):
-        self._test_lock_server(True)
-
-    def _test_lock_server(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.lock_server,
-            'tempest.common.service_client.ServiceClient.post',
-            {},
-            status=202,
-            server_id=self.server_id
-            )
-
-    def test_unlock_server_with_str_body(self):
-        self._test_unlock_server()
-
-    def test_unlock_server_with_bytes_body(self):
-        self._test_unlock_server(True)
-
-    def _test_unlock_server(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.unlock_server,
-            'tempest.common.service_client.ServiceClient.post',
-            {},
-            status=202,
-            server_id=self.server_id
-            )
-
-    def test_suspend_server_with_str_body(self):
-        self._test_suspend_server()
-
-    def test_suspend_server_with_bytes_body(self):
-        self._test_suspend_server(True)
-
-    def _test_suspend_server(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.suspend_server,
-            'tempest.common.service_client.ServiceClient.post',
-            {},
-            status=202,
-            server_id=self.server_id
-            )
-
-    def test_resume_server_with_str_body(self):
-        self._test_resume_server()
-
-    def test_resume_server_with_bytes_body(self):
-        self._test_resume_server(True)
-
-    def _test_resume_server(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.resume_server,
-            'tempest.common.service_client.ServiceClient.post',
-            {},
-            status=202,
-            server_id=self.server_id
-            )
-
-    def test_pause_server_with_str_body(self):
-        self._test_pause_server()
-
-    def test_pause_server_with_bytes_body(self):
-        self._test_pause_server(True)
-
-    def _test_pause_server(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.pause_server,
-            'tempest.common.service_client.ServiceClient.post',
-            {},
-            status=202,
-            server_id=self.server_id
-            )
-
-    def test_unpause_server_with_str_body(self):
-        self._test_unpause_server()
-
-    def test_unpause_server_with_bytes_body(self):
-        self._test_unpause_server(True)
-
-    def _test_unpause_server(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.unpause_server,
-            'tempest.common.service_client.ServiceClient.post',
-            {},
-            status=202,
-            server_id=self.server_id
-            )
-
-    def test_reset_state_with_str_body(self):
-        self._test_reset_state()
-
-    def test_reset_state_with_bytes_body(self):
-        self._test_reset_state(True)
-
-    def _test_reset_state(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.reset_state,
-            'tempest.common.service_client.ServiceClient.post',
-            {},
-            status=202,
-            server_id=self.server_id,
-            state='fake-state'
-            )
-
-    def test_shelve_server_with_str_body(self):
-        self._test_shelve_server()
-
-    def test_shelve_server_with_bytes_body(self):
-        self._test_shelve_server(True)
-
-    def _test_shelve_server(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.shelve_server,
-            'tempest.common.service_client.ServiceClient.post',
-            {},
-            status=202,
-            server_id=self.server_id
-            )
-
-    def test_unshelve_server_with_str_body(self):
-        self._test_unshelve_server()
-
-    def test_unshelve_server_with_bytes_body(self):
-        self._test_unshelve_server(True)
-
-    def _test_unshelve_server(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.unshelve_server,
-            'tempest.common.service_client.ServiceClient.post',
-            {},
-            status=202,
-            server_id=self.server_id
-            )
-
-    def test_shelve_offload_server_with_str_body(self):
-        self._test_shelve_offload_server()
-
-    def test_shelve_offload_server_with_bytes_body(self):
-        self._test_shelve_offload_server(True)
-
-    def _test_shelve_offload_server(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.shelve_offload_server,
-            'tempest.common.service_client.ServiceClient.post',
-            {},
-            status=202,
-            server_id=self.server_id
-            )
-
-    def test_get_console_output_with_str_body(self):
-        self._test_get_console_output()
-
-    def test_get_console_output_with_bytes_body(self):
-        self._test_get_console_output(True)
-
-    def _test_get_console_output(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.get_console_output,
-            'tempest.common.service_client.ServiceClient.post',
-            {'output': 'fake-output'},
-            server_id=self.server_id,
-            length='fake-length'
-            )
-
-    def test_list_virtual_interfaces_with_str_body(self):
-        self._test_list_virtual_interfaces()
-
-    def test_list_virtual_interfaces_with_bytes_body(self):
-        self._test_list_virtual_interfaces(True)
-
-    def _test_list_virtual_interfaces(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.list_virtual_interfaces,
-            'tempest.common.service_client.ServiceClient.get',
-            {'virtual_interfaces': [self.FAKE_VIRTUAL_INTERFACES]},
-            server_id=self.server_id
-            )
-
-    def test_rescue_server_with_str_body(self):
-        self._test_rescue_server()
-
-    def test_rescue_server_with_bytes_body(self):
-        self._test_rescue_server(True)
-
-    def _test_rescue_server(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.rescue_server,
-            'tempest.common.service_client.ServiceClient.post',
-            {'adminPass': 'fake-admin-pass'},
-            server_id=self.server_id
-            )
-
-    def test_unrescue_server_with_str_body(self):
-        self._test_unrescue_server()
-
-    def test_unrescue_server_with_bytes_body(self):
-        self._test_unrescue_server(True)
-
-    def _test_unrescue_server(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.unrescue_server,
-            'tempest.common.service_client.ServiceClient.post',
-            {},
-            status=202,
-            server_id=self.server_id
-            )
-
-    def test_show_server_diagnostics_with_str_body(self):
-        self._test_show_server_diagnostics()
-
-    def test_show_server_diagnostics_with_bytes_body(self):
-        self._test_show_server_diagnostics(True)
-
-    def _test_show_server_diagnostics(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.show_server_diagnostics,
-            'tempest.common.service_client.ServiceClient.get',
-            self.FAKE_SERVER_DIAGNOSTICS,
-            status=200,
-            server_id=self.server_id
-            )
-
-    def test_list_instance_actions_with_str_body(self):
-        self._test_list_instance_actions()
-
-    def test_list_instance_actions_with_bytes_body(self):
-        self._test_list_instance_actions(True)
-
-    def _test_list_instance_actions(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.list_instance_actions,
-            'tempest.common.service_client.ServiceClient.get',
-            {'instanceActions': [self.FAKE_INSTANCE_ACTIONS]},
-            server_id=self.server_id
-            )
-
-    def test_show_instance_action_with_str_body(self):
-        self._test_show_instance_action()
-
-    def test_show_instance_action_with_bytes_body(self):
-        self._test_show_instance_action(True)
-
-    def _test_show_instance_action(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.show_instance_action,
-            'tempest.common.service_client.ServiceClient.get',
-            {'instanceAction': self.FAKE_INSTANCE_WITH_EVENTS},
-            server_id=self.server_id,
-            request_id='fake-request-id'
-            )
-
-    def test_force_delete_server_with_str_body(self):
-        self._test_force_delete_server()
-
-    def test_force_delete_server_with_bytes_body(self):
-        self._test_force_delete_server(True)
-
-    def _test_force_delete_server(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.force_delete_server,
-            'tempest.common.service_client.ServiceClient.post',
-            {},
-            status=202,
-            server_id=self.server_id
-            )
-
-    def test_restore_soft_deleted_server_with_str_body(self):
-        self._test_restore_soft_deleted_server()
-
-    def test_restore_soft_deleted_server_with_bytes_body(self):
-        self._test_restore_soft_deleted_server(True)
-
-    def _test_restore_soft_deleted_server(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.restore_soft_deleted_server,
-            'tempest.common.service_client.ServiceClient.post',
-            {},
-            status=202,
-            server_id=self.server_id
-            )
-
-    def test_reset_network_with_str_body(self):
-        self._test_reset_network()
-
-    def test_reset_network_with_bytes_body(self):
-        self._test_reset_network(True)
-
-    def _test_reset_network(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.reset_network,
-            'tempest.common.service_client.ServiceClient.post',
-            {},
-            status=202,
-            server_id=self.server_id
-            )
-
-    def test_inject_network_info_with_str_body(self):
-        self._test_inject_network_info()
-
-    def test_inject_network_info_with_bytes_body(self):
-        self._test_inject_network_info(True)
-
-    def _test_inject_network_info(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.inject_network_info,
-            'tempest.common.service_client.ServiceClient.post',
-            {},
-            status=202,
-            server_id=self.server_id
-            )
-
-    def test_get_vnc_console_with_str_body(self):
-        self._test_get_vnc_console()
-
-    def test_get_vnc_console_with_bytes_body(self):
-        self._test_get_vnc_console(True)
-
-    def _test_get_vnc_console(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.get_vnc_console,
-            'tempest.common.service_client.ServiceClient.post',
-            {'console': self.FAKE_VNC_CONSOLE},
-            server_id=self.server_id,
-            type='fake-console-type'
-            )
