diff --git a/tempest/api/compute/admin/test_flavors.py b/tempest/api/compute/admin/test_flavors.py
index 42a2984..085916e 100644
--- a/tempest/api/compute/admin/test_flavors.py
+++ b/tempest/api/compute/admin/test_flavors.py
@@ -221,7 +221,8 @@
         # Verify flavor is not used by other user
         self.assertRaises(lib_exc.BadRequest,
                           self.os.servers_client.create_server,
-                          'test', self.image_ref, flavor['id'])
+                          name='test', imageRef=self.image_ref,
+                          flavorRef=flavor['id'])
 
     @test.idempotent_id('b345b196-bfbd-4231-8ac1-6d7fe15ff3a3')
     def test_list_public_flavor_with_other_user(self):
diff --git a/tempest/api/compute/admin/test_servers.py b/tempest/api/compute/admin/test_servers.py
index 1849f83..dfaa5d5 100644
--- a/tempest/api/compute/admin/test_servers.py
+++ b/tempest/api/compute/admin/test_servers.py
@@ -111,7 +111,8 @@
         image_id = self.image_ref
         network = self.get_tenant_network()
         network_kwargs = fixed_network.set_networks_kwarg(network)
-        test_server = self.client.create_server(name, image_id, flavor,
+        test_server = self.client.create_server(name=name, imageRef=image_id,
+                                                flavorRef=flavor,
                                                 **network_kwargs)['server']
         self.addCleanup(self.client.delete_server, test_server['id'])
         waiters.wait_for_server_status(self.client,
@@ -198,5 +199,5 @@
         hints = {
             'same_host': self.s1_id
         }
-        self.create_test_server(sched_hints=hints,
+        self.create_test_server(scheduler_hints=hints,
                                 wait_until='ACTIVE')
diff --git a/tempest/api/compute/limits/test_absolute_limits_negative.py b/tempest/api/compute/limits/test_absolute_limits_negative.py
index 5755f5b..73e852f 100644
--- a/tempest/api/compute/limits/test_absolute_limits_negative.py
+++ b/tempest/api/compute/limits/test_absolute_limits_negative.py
@@ -55,4 +55,4 @@
         # A 403 Forbidden or 413 Overlimit (old behaviour) exception
         # will be raised when out of quota
         self.assertRaises((lib_exc.Forbidden, lib_exc.OverLimit),
-                          self.create_test_server, meta=meta_data)
+                          self.create_test_server, metadata=meta_data)
diff --git a/tempest/api/compute/servers/test_attach_interfaces.py b/tempest/api/compute/servers/test_attach_interfaces.py
index 530e422..24d503f 100644
--- a/tempest/api/compute/servers/test_attach_interfaces.py
+++ b/tempest/api/compute/servers/test_attach_interfaces.py
@@ -186,7 +186,7 @@
         self.assertTrue(interface_count > 0)
         self._check_interface(ifs[0])
         network_id = ifs[0]['net_id']
-        self.client.add_fixed_ip(server['id'], networkId=network_id)
+        self.servers_client.add_fixed_ip(server['id'], networkId=network_id)
         # Remove the fixed IP from server.
         server_detail = self.os.servers_client.show_server(
             server['id'])['server']
@@ -199,4 +199,4 @@
                     break
             if fixed_ip is not None:
                 break
-        self.client.remove_fixed_ip(server['id'], address=fixed_ip)
+        self.servers_client.remove_fixed_ip(server['id'], address=fixed_ip)
diff --git a/tempest/api/compute/servers/test_create_server.py b/tempest/api/compute/servers/test_create_server.py
index 419bfd7..68af81c 100644
--- a/tempest/api/compute/servers/test_create_server.py
+++ b/tempest/api/compute/servers/test_create_server.py
@@ -58,7 +58,7 @@
             validatable=True,
             wait_until='ACTIVE',
             name=cls.name,
-            meta=cls.meta,
+            metadata=cls.meta,
             accessIPv4=cls.accessIPv4,
             accessIPv6=cls.accessIPv6,
             personality=personality,
@@ -150,7 +150,7 @@
                         group_id)
 
         hints = {'group': group_id}
-        server = self.create_test_server(sched_hints=hints,
+        server = self.create_test_server(scheduler_hints=hints,
                                          wait_until='ACTIVE')
 
         # Check a server is in the group
diff --git a/tempest/api/compute/servers/test_server_actions.py b/tempest/api/compute/servers/test_server_actions.py
index c394e44..f0cd2a1 100644
--- a/tempest/api/compute/servers/test_server_actions.py
+++ b/tempest/api/compute/servers/test_server_actions.py
@@ -374,7 +374,7 @@
         # for a given server_id and number of lines
 
         # This reboot is necessary for outputting some console log after
-        # creating a instance backup. If a instance backup, the console
+        # creating an instance backup. If an instance backup, the console
         # log file is truncated and we cannot get any console log through
         # "console-log" API.
         # The detail is https://bugs.launchpad.net/nova/+bug/1251920
diff --git a/tempest/api/compute/servers/test_server_metadata.py b/tempest/api/compute/servers/test_server_metadata.py
index f9e8b4f..77ddb3b 100644
--- a/tempest/api/compute/servers/test_server_metadata.py
+++ b/tempest/api/compute/servers/test_server_metadata.py
@@ -28,7 +28,7 @@
     @classmethod
     def resource_setup(cls):
         super(ServerMetadataTestJSON, cls).resource_setup()
-        server = cls.create_test_server(meta={}, wait_until='ACTIVE')
+        server = cls.create_test_server(metadata={}, wait_until='ACTIVE')
         cls.server_id = server['id']
 
     def setUp(self):
diff --git a/tempest/api/compute/servers/test_server_metadata_negative.py b/tempest/api/compute/servers/test_server_metadata_negative.py
index 5804dbe..cee60fb 100644
--- a/tempest/api/compute/servers/test_server_metadata_negative.py
+++ b/tempest/api/compute/servers/test_server_metadata_negative.py
@@ -32,7 +32,7 @@
     def resource_setup(cls):
         super(ServerMetadataNegativeTestJSON, cls).resource_setup()
         cls.tenant_id = cls.client.tenant_id
-        server = cls.create_test_server(meta={}, wait_until='ACTIVE')
+        server = cls.create_test_server(metadata={}, wait_until='ACTIVE')
 
         cls.server_id = server['id']
 
@@ -48,7 +48,7 @@
             meta = {key: 'data1'}
             self.assertRaises((lib_exc.BadRequest, lib_exc.OverLimit),
                               self.create_test_server,
-                              meta=meta)
+                              metadata=meta)
 
         # no teardown - all creates should fail
 
@@ -59,7 +59,7 @@
         meta = {'': 'data1'}
         self.assertRaises(lib_exc.BadRequest,
                           self.create_test_server,
-                          meta=meta)
+                          metadata=meta)
 
     @test.attr(type=['negative'])
     @test.idempotent_id('4d9cd7a3-2010-4b41-b8fe-3bbf0b169466')
diff --git a/tempest/api/compute/servers/test_servers_negative.py b/tempest/api/compute/servers/test_servers_negative.py
index dbaa6a1..6946be4 100644
--- a/tempest/api/compute/servers/test_servers_negative.py
+++ b/tempest/api/compute/servers/test_servers_negative.py
@@ -236,7 +236,7 @@
         metadata = {'a': 'b' * 260}
         self.assertRaises((lib_exc.BadRequest, lib_exc.OverLimit),
                           self.create_test_server,
-                          meta=metadata)
+                          metadata=metadata)
 
     @test.attr(type=['negative'])
     @test.idempotent_id('aa8eed43-e2cb-4ebf-930b-da14f6a21d81')
diff --git a/tempest/api/compute/test_authorization.py b/tempest/api/compute/test_authorization.py
index e60874f..484c156 100644
--- a/tempest/api/compute/test_authorization.py
+++ b/tempest/api/compute/test_authorization.py
@@ -181,7 +181,8 @@
     def test_create_server_with_unauthorized_image(self):
         # Server creation with another user's image should fail
         self.assertRaises(lib_exc.BadRequest, self.alt_client.create_server,
-                          'test', self.image['id'], self.flavor_ref)
+                          name='test', imageRef=self.image['id'],
+                          flavorRef=self.flavor_ref)
 
     @test.idempotent_id('acf8724b-142b-4044-82c3-78d31a533f24')
     def test_create_server_fails_when_tenant_incorrect(self):
@@ -193,8 +194,8 @@
             auth_data=self.client.auth_provider.auth_data
         )
         self.assertRaises(lib_exc.BadRequest,
-                          self.alt_client.create_server, 'test',
-                          self.image['id'], self.flavor_ref)
+                          self.alt_client.create_server, name='test',
+                          imageRef=self.image['id'], flavorRef=self.flavor_ref)
 
     @test.idempotent_id('f03d1ded-7fd4-4d29-bc13-e2391f29c625')
     def test_create_keypair_in_analt_user_tenant(self):
diff --git a/tempest/api/database/limits/test_limits.py b/tempest/api/database/limits/test_limits.py
index 4b7f2d6..ee51b1d 100644
--- a/tempest/api/database/limits/test_limits.py
+++ b/tempest/api/database/limits/test_limits.py
@@ -27,7 +27,7 @@
     @test.attr(type='smoke')
     @test.idempotent_id('73024538-f316-4829-b3e9-b459290e137a')
     def test_absolute_limits(self):
-        # Test to verify if all absolute limit paramaters are
+        # Test to verify if all absolute limit parameters are
         # present when verb is ABSOLUTE
         limits = self.client.list_db_limits()['limits']
         expected_abs_limits = ['max_backups', 'max_volumes',
diff --git a/tempest/api/volume/test_volumes_snapshots.py b/tempest/api/volume/test_volumes_snapshots.py
index 7eaa9cc..9866da3 100644
--- a/tempest/api/volume/test_volumes_snapshots.py
+++ b/tempest/api/volume/test_volumes_snapshots.py
@@ -85,9 +85,7 @@
         snapshot = self.create_snapshot(self.volume_origin['id'],
                                         force=True)
         # Delete the snapshot
-        self.snapshots_client.delete_snapshot(snapshot['id'])
-        self.snapshots_client.wait_for_resource_deletion(snapshot['id'])
-        self.snapshots.remove(snapshot)
+        self.cleanup_snapshot(snapshot)
 
     @test.idempotent_id('2a8abbe4-d871-46db-b049-c41f5af8216e')
     def test_snapshot_create_get_list_update_delete(self):
@@ -126,9 +124,7 @@
         self.assertEqual(new_desc, updated_snapshot[self.descrip_field])
 
         # Delete the snapshot
-        self.snapshots_client.delete_snapshot(snapshot['id'])
-        self.snapshots_client.wait_for_resource_deletion(snapshot['id'])
-        self.snapshots.remove(snapshot)
+        self.cleanup_snapshot(snapshot)
 
     @test.idempotent_id('59f41f43-aebf-48a9-ab5d-d76340fab32b')
     def test_snapshots_list_with_params(self):
@@ -137,6 +133,7 @@
         display_name = data_utils.rand_name('snap')
         params = {self.name_field: display_name}
         snapshot = self.create_snapshot(self.volume_origin['id'], **params)
+        self.addCleanup(self.cleanup_snapshot, snapshot)
 
         # Verify list snapshots by display_name filter
         params = {self.name_field: snapshot[self.name_field]}
@@ -158,6 +155,7 @@
         display_name = data_utils.rand_name('snap')
         params = {self.name_field: display_name}
         snapshot = self.create_snapshot(self.volume_origin['id'], **params)
+        self.addCleanup(self.cleanup_snapshot, snapshot)
 
         # Verify list snapshot details by display_name filter
         params = {self.name_field: snapshot[self.name_field]}
@@ -181,7 +179,13 @@
         self.volumes_client.wait_for_volume_status(volume['id'], 'available')
         self.volumes_client.delete_volume(volume['id'])
         self.volumes_client.wait_for_resource_deletion(volume['id'])
-        self.clear_snapshots()
+        self.cleanup_snapshot(snapshot)
+
+    def cleanup_snapshot(self, snapshot):
+        # Delete the snapshot
+        self.snapshots_client.delete_snapshot(snapshot['id'])
+        self.snapshots_client.wait_for_resource_deletion(snapshot['id'])
+        self.snapshots.remove(snapshot)
 
 
 class VolumesV1SnapshotTestJSON(VolumesV2SnapshotTestJSON):
diff --git a/tempest/cmd/javelin.py b/tempest/cmd/javelin.py
index 380be8f..2dbcd98 100755
--- a/tempest/cmd/javelin.py
+++ b/tempest/cmd/javelin.py
@@ -869,7 +869,8 @@
             kwargs['networks'] = [{'uuid': get_net_id(network)}
                                   for network in server['networks']]
         body = client.servers.create_server(
-            server['name'], image_id, flavor_id, **kwargs)['server']
+            name=server['name'], imageRef=image_id, flavorRef=flavor_id,
+            **kwargs)['server']
         server_id = body['id']
         client.servers.wait_for_server_status(server_id, 'ACTIVE')
         # create security group(s) after server spawning
diff --git a/tempest/cmd/verify_tempest_config.py b/tempest/cmd/verify_tempest_config.py
index 6d53b59..4fcdf8b 100755
--- a/tempest/cmd/verify_tempest_config.py
+++ b/tempest/cmd/verify_tempest_config.py
@@ -65,10 +65,10 @@
     # Check glance api versions
     _, versions = os.image_client.get_versions()
     if CONF.image_feature_enabled.api_v1 != contains_version('v1.', versions):
-        print_and_or_update('api_v1', 'image_feature_enabled',
+        print_and_or_update('api_v1', 'image-feature-enabled',
                             not CONF.image_feature_enabled.api_v1, update)
     if CONF.image_feature_enabled.api_v2 != contains_version('v2.', versions):
-        print_and_or_update('api_v2', 'image_feature_enabled',
+        print_and_or_update('api_v2', 'image-feature-enabled',
                             not CONF.image_feature_enabled.api_v2, update)
 
 
@@ -105,11 +105,11 @@
     versions = _get_api_versions(os, 'keystone')
     if (CONF.identity_feature_enabled.api_v2 !=
             contains_version('v2.', versions)):
-        print_and_or_update('api_v2', 'identity_feature_enabled',
+        print_and_or_update('api_v2', 'identity-feature-enabled',
                             not CONF.identity_feature_enabled.api_v2, update)
     if (CONF.identity_feature_enabled.api_v3 !=
             contains_version('v3.', versions)):
-        print_and_or_update('api_v3', 'identity_feature_enabled',
+        print_and_or_update('api_v3', 'identity-feature-enabled',
                             not CONF.identity_feature_enabled.api_v3, update)
 
 
@@ -118,11 +118,11 @@
     versions = _get_api_versions(os, 'cinder')
     if (CONF.volume_feature_enabled.api_v1 !=
             contains_version('v1.', versions)):
-        print_and_or_update('api_v1', 'volume_feature_enabled',
+        print_and_or_update('api_v1', 'volume-feature-enabled',
                             not CONF.volume_feature_enabled.api_v1, update)
     if (CONF.volume_feature_enabled.api_v2 !=
             contains_version('v2.', versions)):
-        print_and_or_update('api_v2', 'volume_feature_enabled',
+        print_and_or_update('api_v2', 'volume-feature-enabled',
                             not CONF.volume_feature_enabled.api_v2, update)
 
 
diff --git a/tempest/common/compute.py b/tempest/common/compute.py
index a76696e..176be51 100644
--- a/tempest/common/compute.py
+++ b/tempest/common/compute.py
@@ -34,7 +34,7 @@
     This method is a common wrapper returning a test server that can be
     pingable or sshable.
 
-    :param clients: Client manager which provides Openstack Tempest clients.
+    :param clients: Client manager which provides OpenStack Tempest clients.
     :param validatable: Whether the server will be pingable or sshable.
     :param validation_resources: Resources created for the connection to the
     server. Include a keypair, a security group and an IP.
@@ -51,8 +51,8 @@
     else:
         name = data_utils.rand_name(__name__ + "-instance")
 
-    flavor = kwargs.get('flavor', CONF.compute.flavor_ref)
-    image_id = kwargs.get('image_id', CONF.compute.image_ref)
+    flavor = kwargs.pop('flavor', CONF.compute.flavor_ref)
+    image_id = kwargs.pop('image_id', CONF.compute.image_ref)
 
     kwargs = fixed_network.set_networks_kwarg(
         tenant_network, kwargs) or {}
@@ -85,7 +85,8 @@
             if wait_until is None:
                 wait_until = 'ACTIVE'
 
-    body = clients.servers_client.create_server(name, image_id, flavor,
+    body = clients.servers_client.create_server(name=name, imageRef=image_id,
+                                                flavorRef=flavor,
                                                 **kwargs)
 
     # handle the case of multiple servers
diff --git a/tempest/common/utils/linux/remote_client.py b/tempest/common/utils/linux/remote_client.py
index a567c6a..9308390 100644
--- a/tempest/common/utils/linux/remote_client.py
+++ b/tempest/common/utils/linux/remote_client.py
@@ -163,9 +163,9 @@
         * dhclient
         """
         # TODO(yfried): add support for dhcpcd
-        suported_clients = ['udhcpc', 'dhclient']
+        supported_clients = ['udhcpc', 'dhclient']
         dhcp_client = CONF.scenario.dhcp_client
-        if dhcp_client not in suported_clients:
+        if dhcp_client not in supported_clients:
             raise exceptions.InvalidConfiguration('%s DHCP client unsupported'
                                                   % dhcp_client)
         if dhcp_client == 'udhcpc' and not fixed_ip:
diff --git a/tempest/config.py b/tempest/config.py
index b867980..3d3ddff 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -1048,7 +1048,7 @@
     # TODO(yfried): add support for dhcpcd
     cfg.StrOpt('dhcp_client',
                default='udhcpc',
-               choices=["udhcpc", "dhclient"],
+               choices=["udhcpc", "dhclient", ""],
                help='DHCP client used by images to renew DCHP lease. '
                     'If left empty, update operation will be skipped. '
                     'Supported clients: "udhcpc", "dhclient"')
diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py
index d70021c..7ab3864 100644
--- a/tempest/scenario/manager.py
+++ b/tempest/scenario/manager.py
@@ -178,7 +178,8 @@
 
         LOG.debug("Creating a server (name: %s, image: %s, flavor: %s)",
                   name, image, flavor)
-        server = self.servers_client.create_server(name, image, flavor,
+        server = self.servers_client.create_server(name=name, imageRef=image,
+                                                   flavorRef=flavor,
                                                    **create_kwargs)['server']
         if wait_on_delete:
             self.addCleanup(waiters.wait_for_server_termination,
@@ -1073,7 +1074,10 @@
 
     def create_server(self, name=None, image=None, flavor=None,
                       wait_on_boot=True, wait_on_delete=True,
-                      create_kwargs=None):
+                      network_client=None, create_kwargs=None):
+        if network_client is None:
+            network_client = self.network_client
+
         vnic_type = CONF.network.port_vnic_type
 
         # If vnic_type is configured create port for
@@ -1084,19 +1088,16 @@
             create_port_body = {'binding:vnic_type': vnic_type,
                                 'namestart': 'port-smoke'}
             if create_kwargs:
-                net_client = create_kwargs.get("network_client",
-                                               self.network_client)
-
                 # Convert security group names to security group ids
                 # to pass to create_port
                 if create_kwargs.get('security_groups'):
-                    security_groups = net_client.list_security_groups().get(
-                        'security_groups')
+                    security_groups = network_client.list_security_groups(
+                        ).get('security_groups')
                     sec_dict = dict([(s['name'], s['id'])
                                     for s in security_groups])
 
-                    sec_groups_names = [s['name'] for s in create_kwargs[
-                        'security_groups']]
+                    sec_groups_names = [s['name'] for s in create_kwargs.get(
+                        'security_groups')]
                     security_groups_ids = [sec_dict[s]
                                            for s in sec_groups_names]
 
@@ -1104,15 +1105,14 @@
                         create_port_body[
                             'security_groups'] = security_groups_ids
                 networks = create_kwargs.get('networks')
-            else:
-                net_client = self.network_client
+
             # If there are no networks passed to us we look up
             # for the tenant's private networks and create a port
             # if there is only one private network. The same behaviour
             # as we would expect when passing the call to the clients
             # with no networks
             if not networks:
-                networks = net_client.list_networks(filters={
+                networks = network_client.list_networks(filters={
                     'router:external': False})
                 self.assertEqual(1, len(networks),
                                  "There is more than one"
@@ -1120,7 +1120,7 @@
             for net in networks:
                 net_id = net['uuid']
                 port = self._create_port(network_id=net_id,
-                                         client=net_client,
+                                         client=network_client,
                                          **create_port_body)
                 ports.append({'port': port.id})
             if ports:
@@ -1343,9 +1343,9 @@
             control_location=control_location)['encryption']
 
 
-class SwiftScenarioTest(ScenarioTest):
+class ObjectStorageScenarioTest(ScenarioTest):
     """
-    Provide harness to do Swift scenario tests.
+    Provide harness to do Object Storage scenario tests.
 
     Subclasses implement the tests that use the methods provided by this
     class.
@@ -1353,7 +1353,7 @@
 
     @classmethod
     def skip_checks(cls):
-        super(SwiftScenarioTest, cls).skip_checks()
+        super(ObjectStorageScenarioTest, cls).skip_checks()
         if not CONF.service_available.swift:
             skip_msg = ("%s skipped as swift is not available" %
                         cls.__name__)
@@ -1362,13 +1362,13 @@
     @classmethod
     def setup_credentials(cls):
         cls.set_network_resources()
-        super(SwiftScenarioTest, cls).setup_credentials()
+        super(ObjectStorageScenarioTest, cls).setup_credentials()
         operator_role = CONF.object_storage.operator_role
         cls.os_operator = cls.get_client_manager(roles=[operator_role])
 
     @classmethod
     def setup_clients(cls):
-        super(SwiftScenarioTest, cls).setup_clients()
+        super(ObjectStorageScenarioTest, cls).setup_clients()
         # Clients for Swift
         cls.account_client = cls.os_operator.account_client
         cls.container_client = cls.os_operator.container_client
diff --git a/tempest/scenario/test_large_ops.py b/tempest/scenario/test_large_ops.py
index 2ad5d2d..63dd4f0 100644
--- a/tempest/scenario/test_large_ops.py
+++ b/tempest/scenario/test_large_ops.py
@@ -99,9 +99,9 @@
         create_kwargs = fixed_network.set_networks_kwarg(network,
                                                          create_kwargs)
         self.servers_client.create_server(
-            name,
-            self.image,
-            flavor_id,
+            name=name,
+            imageRef=self.image,
+            flavorRef=flavor_id,
             **create_kwargs)
         # needed because of bug 1199788
         params = {'name': name}
diff --git a/tempest/scenario/test_swift_basic_ops.py b/tempest/scenario/test_object_storage_basic_ops.py
similarity index 97%
rename from tempest/scenario/test_swift_basic_ops.py
rename to tempest/scenario/test_object_storage_basic_ops.py
index 69e0c4c..49768c5 100644
--- a/tempest/scenario/test_swift_basic_ops.py
+++ b/tempest/scenario/test_object_storage_basic_ops.py
@@ -24,7 +24,7 @@
 LOG = logging.getLogger(__name__)
 
 
-class TestSwiftBasicOps(manager.SwiftScenarioTest):
+class TestObjectStorageBasicOps(manager.ObjectStorageScenarioTest):
     """
     Test swift basic ops.
      * get swift stat.
diff --git a/tempest/scenario/test_swift_telemetry_middleware.py b/tempest/scenario/test_object_storage_telemetry_middleware.py
similarity index 95%
rename from tempest/scenario/test_swift_telemetry_middleware.py
rename to tempest/scenario/test_object_storage_telemetry_middleware.py
index c5a0e7c..3376a7c 100644
--- a/tempest/scenario/test_swift_telemetry_middleware.py
+++ b/tempest/scenario/test_object_storage_telemetry_middleware.py
@@ -34,7 +34,7 @@
 NOTIFICATIONS_SLEEP = 1
 
 
-class TestSwiftTelemetry(manager.SwiftScenarioTest):
+class TestObjectStorageTelemetry(manager.ObjectStorageScenarioTest):
     """
     Test that swift uses the ceilometer middleware.
      * create container.
@@ -45,7 +45,7 @@
 
     @classmethod
     def skip_checks(cls):
-        super(TestSwiftTelemetry, cls).skip_checks()
+        super(TestObjectStorageTelemetry, cls).skip_checks()
         if not CONF.service_available.ceilometer:
             skip_msg = ("%s skipped as ceilometer is not available" %
                         cls.__name__)
@@ -53,7 +53,7 @@
 
     @classmethod
     def setup_clients(cls):
-        super(TestSwiftTelemetry, cls).setup_clients()
+        super(TestObjectStorageTelemetry, cls).setup_clients()
         cls.telemetry_client = cls.os_operator.telemetry_client
 
     def _confirm_notifications(self, container_name, obj_name):
diff --git a/tempest/scenario/test_security_groups_basic_ops.py b/tempest/scenario/test_security_groups_basic_ops.py
index 9afb598..297076c 100644
--- a/tempest/scenario/test_security_groups_basic_ops.py
+++ b/tempest/scenario/test_security_groups_basic_ops.py
@@ -244,10 +244,12 @@
                 {'uuid': tenant.network.id},
             ],
             'key_name': tenant.keypair['name'],
-            'security_groups': security_groups_names,
-            'network_client': tenant.manager.network_client
+            'security_groups': security_groups_names
         }
-        server = self.create_server(name=name, create_kwargs=create_kwargs)
+        server = self.create_server(
+            name=name,
+            network_client=tenant.manager.network_client,
+            create_kwargs=create_kwargs)
         self.assertEqual(
             sorted([s['name'] for s in security_groups]),
             sorted([s['name'] for s in server['security_groups']]))
@@ -552,3 +554,44 @@
                                    username=ssh_login,
                                    private_key=private_key,
                                    should_connect=True)
+
+    @test.requires_ext(service='network', extension='port-security')
+    @test.idempotent_id('7c811dcc-263b-49a3-92d2-1b4d8405f50c')
+    @test.services('compute', 'network')
+    def test_port_security_disable_security_group(self):
+        """
+        This test verifies port_security_enabled=False disables
+        the default security group rules.
+        """
+        new_tenant = self.primary_tenant
+
+        # Create server
+        name = 'server-{tenant}-gen-1'.format(
+               tenant=new_tenant.creds.tenant_name
+        )
+        name = data_utils.rand_name(name)
+        server = self._create_server(name, new_tenant)
+
+        access_point_ssh = self._connect_to_access_point(new_tenant)
+        server_id = server['id']
+        port_id = self._list_ports(device_id=server_id)[0]['id']
+
+        # Flip the port's port security and check connectivity
+        try:
+            self.network_client.update_port(port_id,
+                                            port_security_enabled=True,
+                                            security_groups=[])
+            self._check_connectivity(access_point=access_point_ssh,
+                                     ip=self._get_server_ip(server),
+                                     should_succeed=False)
+
+            self.network_client.update_port(port_id,
+                                            port_security_enabled=False,
+                                            security_groups=[])
+            self._check_connectivity(
+                access_point=access_point_ssh,
+                ip=self._get_server_ip(server))
+        except Exception:
+            for tenant in self.tenants.values():
+                self._log_console_output(servers=tenant.servers)
+            raise
diff --git a/tempest/scenario/test_shelve_instance.py b/tempest/scenario/test_shelve_instance.py
index 022306e..bf4b8e7 100644
--- a/tempest/scenario/test_shelve_instance.py
+++ b/tempest/scenario/test_shelve_instance.py
@@ -30,7 +30,7 @@
     """
     This test shelves then unshelves a Nova instance
     The following is the scenario outline:
-     * boot a instance and create a timestamp file in it
+     * boot an instance and create a timestamp file in it
      * shelve the instance
      * unshelve the instance
      * check the existence of the timestamp file in the unshelved instance
@@ -64,22 +64,29 @@
         waiters.wait_for_server_status(self.servers_client, server['id'],
                                        'ACTIVE')
 
-    @test.idempotent_id('1164e700-0af0-4a4c-8792-35909a88743c')
-    @testtools.skipUnless(CONF.compute_feature_enabled.shelve,
-                          'Shelve is not available.')
-    @test.services('compute', 'network', 'image')
-    def test_shelve_instance(self):
+    def _create_server_then_shelve_and_unshelve(self, boot_from_volume=False):
         self.keypair = self.create_keypair()
 
         self.security_group = self._create_security_group()
         security_groups = [{'name': self.security_group['name']}]
-
         create_kwargs = {
             'key_name': self.keypair['name'],
             'security_groups': security_groups
         }
-        server = self.create_server(image=CONF.compute.image_ref,
-                                    create_kwargs=create_kwargs)
+
+        if boot_from_volume:
+            volume = self.create_volume(size=CONF.volume.volume_size,
+                                        imageRef=CONF.compute.image_ref)
+            bd_map = [{
+                'device_name': 'vda',
+                'volume_id': volume['id'],
+                'delete_on_termination': '0'}]
+
+            create_kwargs['block_device_mapping'] = bd_map
+            server = self.create_server(create_kwargs=create_kwargs)
+        else:
+            server = self.create_server(image=CONF.compute.image_ref,
+                                        create_kwargs=create_kwargs)
 
         if CONF.compute.use_floatingip_for_ssh:
             floating_ip = (self.floating_ips_client.create_floating_ip()
@@ -101,3 +108,17 @@
             self._check_timestamp(floating_ip['ip'])
         else:
             self._check_timestamp(server)
+
+    @test.idempotent_id('1164e700-0af0-4a4c-8792-35909a88743c')
+    @testtools.skipUnless(CONF.compute_feature_enabled.shelve,
+                          'Shelve is not available.')
+    @test.services('compute', 'network', 'image')
+    def test_shelve_instance(self):
+        self._create_server_then_shelve_and_unshelve()
+
+    @test.idempotent_id('c1b6318c-b9da-490b-9c67-9339b627271f')
+    @testtools.skipUnless(CONF.compute_feature_enabled.shelve,
+                          'Shelve is not available.')
+    @test.services('compute', 'volume', 'network', 'image')
+    def test_shelve_volume_backed_instance(self):
+        self._create_server_then_shelve_and_unshelve(boot_from_volume=True)
diff --git a/tempest/scenario/test_snapshot_pattern.py b/tempest/scenario/test_snapshot_pattern.py
index 1298faa..b5e5da8 100644
--- a/tempest/scenario/test_snapshot_pattern.py
+++ b/tempest/scenario/test_snapshot_pattern.py
@@ -29,7 +29,7 @@
     """
     This test is for snapshotting an instance and booting with it.
     The following is the scenario outline:
-     * boot a instance and create a timestamp file in it
+     * boot an instance and create a timestamp file in it
      * snapshot the instance
      * boot a second instance from the snapshot
      * check the existence of the timestamp file in the second instance
@@ -62,11 +62,11 @@
                           'Snapshotting is not available.')
     @test.services('compute', 'network', 'image')
     def test_snapshot_pattern(self):
-        # prepare for booting a instance
+        # prepare for booting an instance
         self._add_keypair()
         self.security_group = self._create_security_group()
 
-        # boot a instance and create a timestamp file in it
+        # boot an instance and create a timestamp file in it
         server = self._boot_image(CONF.compute.image_ref)
         if CONF.compute.use_floatingip_for_ssh:
             fip_for_server = self.create_floating_ip(server)
diff --git a/tempest/scenario/test_stamp_pattern.py b/tempest/scenario/test_stamp_pattern.py
index 5f1e7fe..91e4657 100644
--- a/tempest/scenario/test_stamp_pattern.py
+++ b/tempest/scenario/test_stamp_pattern.py
@@ -150,7 +150,7 @@
                           'Snapshotting is not available.')
     @tempest.test.services('compute', 'network', 'volume', 'image')
     def test_stamp_pattern(self):
-        # prepare for booting a instance
+        # prepare for booting an instance
         self._add_keypair()
         self.security_group = self._create_security_group()
 
diff --git a/tempest/scenario/utils.py b/tempest/scenario/utils.py
index 0a7d492..2841060 100644
--- a/tempest/scenario/utils.py
+++ b/tempest/scenario/utils.py
@@ -91,8 +91,8 @@
         def test_create_server_metadata(self):
             name = rand_name('instance')
             self.servers_client.create_server(name=name,
-                                              flavor_ref=self.flavor_ref,
-                                              image_ref=self.image_ref)
+                                              flavorRef=self.flavor_ref,
+                                              imageRef=self.image_ref)
     """
     validchars = "-_.{ascii}{digit}".format(ascii=string.ascii_letters,
                                             digit=string.digits)
diff --git a/tempest/services/compute/json/interfaces_client.py b/tempest/services/compute/json/interfaces_client.py
index 2e66082..fe076d8 100644
--- a/tempest/services/compute/json/interfaces_client.py
+++ b/tempest/services/compute/json/interfaces_client.py
@@ -16,7 +16,6 @@
 from oslo_serialization import jsonutils as json
 
 from tempest.api_schema.response.compute.v2_1 import interfaces as schema
-from tempest.api_schema.response.compute.v2_1 import servers as servers_schema
 from tempest.common import service_client
 
 
@@ -49,21 +48,3 @@
                                                                  port_id))
         self.validate_response(schema.delete_interface, resp, body)
         return service_client.ResponseBody(resp, body)
-
-    def add_fixed_ip(self, server_id, **kwargs):
-        """Add a fixed IP to input server instance."""
-        post_body = json.dumps({'addFixedIp': kwargs})
-        resp, body = self.post('servers/%s/action' % server_id,
-                               post_body)
-        self.validate_response(servers_schema.server_actions_common_schema,
-                               resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def remove_fixed_ip(self, server_id, **kwargs):
-        """Remove input fixed IP from input server instance."""
-        post_body = json.dumps({'removeFixedIp': kwargs})
-        resp, body = self.post('servers/%s/action' % server_id,
-                               post_body)
-        self.validate_response(servers_schema.server_actions_common_schema,
-                               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
index a36603f..1d2c7b2 100644
--- a/tempest/services/compute/json/servers_client.py
+++ b/tempest/services/compute/json/servers_client.py
@@ -14,6 +14,8 @@
 #    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
 
@@ -29,59 +31,28 @@
             auth_provider, service, region, **kwargs)
         self.enable_instance_password = enable_instance_password
 
-    def create_server(self, name, image_ref, flavor_ref, **kwargs):
+    def create_server(self, **kwargs):
         """
         Creates an instance of a server.
-        name (Required): The name of the server.
-        image_ref (Required): Reference to the image used to build the server.
-        flavor_ref (Required): The flavor used to build the server.
-        Following optional keyword arguments are accepted:
-        adminPass: Sets the initial root password.
-        key_name: Key name of keypair that was created earlier.
-        meta: A dictionary of values to be used as metadata.
-        personality: A list of dictionaries for files to be injected into
-        the server.
-        security_groups: A list of security group dicts.
-        networks: A list of network dicts with UUID and fixed_ip.
-        user_data: User data for instance.
-        availability_zone: Availability zone in which to launch instance.
-        accessIPv4: The IPv4 access address for the server.
-        accessIPv6: The IPv6 access address for the server.
-        min_count: Count of minimum number of instances to launch.
-        max_count: Count of maximum number of instances to launch.
-        disk_config: Determines if user or admin controls disk configuration.
-        return_reservation_id: Enable/Disable the return of reservation id
-        block_device_mapping: Block device mapping for the server.
-        block_device_mapping_v2: Block device mapping V2 for the server.
+        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'.
         """
-        post_body = {
-            'name': name,
-            'imageRef': image_ref,
-            'flavorRef': flavor_ref
-        }
+        body = copy.deepcopy(kwargs)
+        if body.get('disk_config'):
+            body['OS-DCF:diskConfig'] = body.pop('disk_config')
 
-        for option in ['personality', 'adminPass', 'key_name',
-                       'security_groups', 'networks', 'user_data',
-                       'availability_zone', 'accessIPv4', 'accessIPv6',
-                       'min_count', 'max_count', ('metadata', 'meta'),
-                       ('OS-DCF:diskConfig', 'disk_config'),
-                       'return_reservation_id', 'block_device_mapping',
-                       'block_device_mapping_v2']:
-            if isinstance(option, tuple):
-                post_param = option[0]
-                key = option[1]
-            else:
-                post_param = option
-                key = option
-            value = kwargs.get(key)
-            if value is not None:
-                post_body[post_param] = value
+        hints = None
+        if body.get('scheduler_hints'):
+            hints = {'os:scheduler_hints': body.pop('scheduler_hints')}
 
-        post_body = {'server': post_body}
+        post_body = {'server': body}
 
-        if 'sched_hints' in kwargs:
-            hints = {'os:scheduler_hints': kwargs.get('sched_hints')}
+        if hints:
             post_body = dict(post_body.items() + hints.items())
+
         post_body = json.dumps(post_body)
         resp, body = self.post('servers', post_body)
 
@@ -457,3 +428,11 @@
         return self.action(server_id, "os-getVNCConsole",
                            schema.get_vnc_console,
                            type=console_type)
+
+    def add_fixed_ip(self, server_id, **kwargs):
+        """Add a fixed IP to input server instance."""
+        return self.action(server_id, 'addFixedIp', **kwargs)
+
+    def remove_fixed_ip(self, server_id, **kwargs):
+        """Remove input fixed IP from input server instance."""
+        return self.action(server_id, 'removeFixedIp', **kwargs)
diff --git a/tempest/stress/actions/server_create_destroy.py b/tempest/stress/actions/server_create_destroy.py
index 37664de..44b6f62 100644
--- a/tempest/stress/actions/server_create_destroy.py
+++ b/tempest/stress/actions/server_create_destroy.py
@@ -30,7 +30,7 @@
         name = data_utils.rand_name("instance")
         self.logger.info("creating %s" % name)
         server = self.manager.servers_client.create_server(
-            name, self.image, self.flavor)['server']
+            name=name, imageRef=self.image, flavorRef=self.flavor)['server']
         server_id = server['id']
         waiters.wait_for_server_status(self.manager.servers_client, server_id,
                                        'ACTIVE')
diff --git a/tempest/stress/actions/ssh_floating.py b/tempest/stress/actions/ssh_floating.py
index 81bb071..d912b25 100644
--- a/tempest/stress/actions/ssh_floating.py
+++ b/tempest/stress/actions/ssh_floating.py
@@ -75,8 +75,8 @@
         self.logger.info("creating %s" % name)
         vm_args = self.vm_extra_args.copy()
         vm_args['security_groups'] = [self.sec_grp]
-        server = servers_client.create_server(name, self.image,
-                                              self.flavor,
+        server = servers_client.create_server(name=name, imageRef=self.image,
+                                              flavorRef=self.flavor,
                                               **vm_args)['server']
         self.server_id = server['id']
         if self.wait_after_vm_create:
diff --git a/tempest/stress/actions/volume_attach_delete.py b/tempest/stress/actions/volume_attach_delete.py
index b3753a5..847f342 100644
--- a/tempest/stress/actions/volume_attach_delete.py
+++ b/tempest/stress/actions/volume_attach_delete.py
@@ -39,7 +39,7 @@
         vm_name = data_utils.rand_name("instance")
         self.logger.info("creating vm: %s" % vm_name)
         server = self.manager.servers_client.create_server(
-            vm_name, self.image, self.flavor)['server']
+            name=vm_name, imageRef=self.image, flavorRef=self.flavor)['server']
         server_id = server['id']
         waiters.wait_for_server_status(self.manager.servers_client, server_id,
                                        'ACTIVE')
diff --git a/tempest/stress/actions/volume_attach_verify.py b/tempest/stress/actions/volume_attach_verify.py
index 8105626..95841a9 100644
--- a/tempest/stress/actions/volume_attach_verify.py
+++ b/tempest/stress/actions/volume_attach_verify.py
@@ -39,8 +39,8 @@
         vm_args = self.vm_extra_args.copy()
         vm_args['security_groups'] = [self.sec_grp]
         vm_args['key_name'] = self.key['name']
-        server = servers_client.create_server(name, self.image,
-                                              self.flavor,
+        server = servers_client.create_server(name=name, imageRef=self.image,
+                                              flavorRef=self.flavor,
                                               **vm_args)['server']
         self.server_id = server['id']
         waiters.wait_for_server_status(self.manager.servers_client,
diff --git a/tempest/tests/cmd/test_verify_tempest_config.py b/tempest/tests/cmd/test_verify_tempest_config.py
index 2de5802..a5dea54 100644
--- a/tempest/tests/cmd/test_verify_tempest_config.py
+++ b/tempest/tests/cmd/test_verify_tempest_config.py
@@ -113,7 +113,7 @@
                                'print_and_or_update') as print_mock:
             verify_tempest_config.verify_keystone_api_versions(fake_os, True)
         print_mock.assert_called_once_with('api_v3',
-                                           'identity_feature_enabled',
+                                           'identity-feature-enabled',
                                            False, True)
 
     def test_verify_keystone_api_versions_no_v2(self):
@@ -129,7 +129,7 @@
                                'print_and_or_update') as print_mock:
             verify_tempest_config.verify_keystone_api_versions(fake_os, True)
         print_mock.assert_called_once_with('api_v2',
-                                           'identity_feature_enabled',
+                                           'identity-feature-enabled',
                                            False, True)
 
     def test_verify_cinder_api_versions_no_v2(self):
@@ -144,7 +144,7 @@
         with mock.patch.object(verify_tempest_config,
                                'print_and_or_update') as print_mock:
             verify_tempest_config.verify_cinder_api_versions(fake_os, True)
-        print_mock.assert_called_once_with('api_v2', 'volume_feature_enabled',
+        print_mock.assert_called_once_with('api_v2', 'volume-feature-enabled',
                                            False, True)
 
     def test_verify_cinder_api_versions_no_v1(self):
@@ -159,7 +159,7 @@
         with mock.patch.object(verify_tempest_config,
                                'print_and_or_update') as print_mock:
             verify_tempest_config.verify_cinder_api_versions(fake_os, True)
-        print_mock.assert_called_once_with('api_v1', 'volume_feature_enabled',
+        print_mock.assert_called_once_with('api_v1', 'volume-feature-enabled',
                                            False, True)
 
     def test_verify_glance_version_no_v2_with_v1_1(self):
@@ -170,7 +170,7 @@
         with mock.patch.object(verify_tempest_config,
                                'print_and_or_update') as print_mock:
             verify_tempest_config.verify_glance_api_versions(fake_os, True)
-        print_mock.assert_called_once_with('api_v2', 'image_feature_enabled',
+        print_mock.assert_called_once_with('api_v2', 'image-feature-enabled',
                                            False, True)
 
     def test_verify_glance_version_no_v2_with_v1_0(self):
@@ -181,7 +181,7 @@
         with mock.patch.object(verify_tempest_config,
                                'print_and_or_update') as print_mock:
             verify_tempest_config.verify_glance_api_versions(fake_os, True)
-        print_mock.assert_called_once_with('api_v2', 'image_feature_enabled',
+        print_mock.assert_called_once_with('api_v2', 'image-feature-enabled',
                                            False, True)
 
     def test_verify_glance_version_no_v1(self):
@@ -192,7 +192,7 @@
         with mock.patch.object(verify_tempest_config,
                                'print_and_or_update') as print_mock:
             verify_tempest_config.verify_glance_api_versions(fake_os, True)
-        print_mock.assert_called_once_with('api_v1', 'image_feature_enabled',
+        print_mock.assert_called_once_with('api_v1', 'image-feature-enabled',
                                            False, True)
 
     def test_verify_extensions_neutron(self):
diff --git a/tempest/tests/services/compute/test_availability_zone_client.py b/tempest/tests/services/compute/test_availability_zone_client.py
index 6100f44..e1d94bc 100644
--- a/tempest/tests/services/compute/test_availability_zone_client.py
+++ b/tempest/tests/services/compute/test_availability_zone_client.py
@@ -12,6 +12,8 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+import copy
+
 from tempest_lib.tests import fake_auth_provider
 
 from tempest.services.compute.json import availability_zone_client
@@ -20,7 +22,7 @@
 
 class TestAvailabilityZoneClient(base.BaseComputeServiceTest):
 
-    FAKE_AVAILABIRITY_ZONE_INFO = {
+    FAKE_AZ_INFO = {
         "availabilityZoneInfo":
         [
             {
@@ -33,20 +35,48 @@
         ]
     }
 
+    FAKE_AZ_DETAILS = {
+        "testhost": {
+            "nova-compute": {
+                "available": True,
+                "active": True,
+                "updated_at": "2015-09-10T07:16:46.000000"
+            }
+        }
+    }
+
     def setUp(self):
         super(TestAvailabilityZoneClient, self).setUp()
         fake_auth = fake_auth_provider.FakeAuthProvider()
         self.client = availability_zone_client.AvailabilityZoneClient(
             fake_auth, 'compute', 'regionOne')
 
-    def test_list_availability_zones_with_str_body(self):
+    def _test_availability_zones(self, to_utf=False):
         self.check_service_client_function(
             self.client.list_availability_zones,
             'tempest.common.service_client.ServiceClient.get',
-            self.FAKE_AVAILABIRITY_ZONE_INFO)
+            self.FAKE_AZ_INFO,
+            to_utf)
+
+    def _test_availability_zones_with_details(self, to_utf=False):
+        fake_az_details = copy.deepcopy(self.FAKE_AZ_INFO)
+        fake_az_details['availabilityZoneInfo'][0]['hosts'] = \
+            self.FAKE_AZ_DETAILS
+        self.check_service_client_function(
+            self.client.list_availability_zones,
+            'tempest.common.service_client.ServiceClient.get',
+            fake_az_details,
+            to_utf,
+            detail=True)
+
+    def test_list_availability_zones_with_str_body(self):
+        self._test_availability_zones()
 
     def test_list_availability_zones_with_bytes_body(self):
-        self.check_service_client_function(
-            self.client.list_availability_zones,
-            'tempest.common.service_client.ServiceClient.get',
-            self.FAKE_AVAILABIRITY_ZONE_INFO, to_utf=True)
+        self._test_availability_zones(True)
+
+    def test_list_availability_zones_with_str_body_and_details(self):
+        self._test_availability_zones_with_details()
+
+    def test_list_availability_zones_with_bytes_body_and_details(self):
+        self._test_availability_zones_with_details(True)
diff --git a/tempest/tests/services/compute/test_floating_ips_client.py b/tempest/tests/services/compute/test_floating_ips_client.py
new file mode 100644
index 0000000..ee22004
--- /dev/null
+++ b/tempest/tests/services/compute/test_floating_ips_client.py
@@ -0,0 +1,113 @@
+# 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_hypervisor_client.py b/tempest/tests/services/compute/test_hypervisor_client.py
new file mode 100644
index 0000000..441e7e6
--- /dev/null
+++ b/tempest/tests/services/compute/test_hypervisor_client.py
@@ -0,0 +1,167 @@
+# 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 tempest.services.compute.json import hypervisor_client
+from tempest.tests import fake_auth_provider
+from tempest.tests.services.compute import base
+
+
+class TestHypervisorClient(base.BaseComputeServiceTest):
+
+    hypervisor_id = "1"
+    hypervisor_name = "hyper.hostname.com"
+
+    def setUp(self):
+        super(TestHypervisorClient, self).setUp()
+        fake_auth = fake_auth_provider.FakeAuthProvider()
+        self.client = hypervisor_client.HypervisorClient(
+            fake_auth, 'compute', 'regionOne')
+
+    def test_list_hypervisor_str_body(self):
+        self._test_list_hypervisor(bytes_body=False)
+
+    def test_list_hypervisor_byte_body(self):
+        self._test_list_hypervisor(bytes_body=True)
+
+    def _test_list_hypervisor(self, bytes_body=False):
+        expected = {"hypervisors": [{
+            "id": 1,
+            "hypervisor_hostname": "hypervisor1.hostname.com"},
+            {
+            "id": 2,
+            "hypervisor_hostname": "hypervisor2.hostname.com"}]}
+        self.check_service_client_function(
+            self.client.list_hypervisors,
+            'tempest.common.service_client.ServiceClient.get',
+            expected, bytes_body)
+
+    def test_show_hypervisor_str_body(self):
+        self._test_show_hypervisor(bytes_body=False)
+
+    def test_show_hypervisor_byte_body(self):
+        self._test_show_hypervisor(bytes_body=True)
+
+    def _test_show_hypervisor(self, bytes_body=False):
+        expected = {"hypervisor": {
+            "cpu_info": "?",
+            "current_workload": 0,
+            "disk_available_least": 1,
+            "host_ip": "10.10.10.10",
+            "free_disk_gb": 1028,
+            "free_ram_mb": 7680,
+            "hypervisor_hostname": "fake-mini",
+            "hypervisor_type": "fake",
+            "hypervisor_version": 1,
+            "id": 1,
+            "local_gb": 1028,
+            "local_gb_used": 0,
+            "memory_mb": 8192,
+            "memory_mb_used": 512,
+            "running_vms": 0,
+            "service": {
+                "host": "fake_host",
+                "id": 2},
+            "vcpus": 1,
+            "vcpus_used": 0}}
+        self.check_service_client_function(
+            self.client.show_hypervisor,
+            'tempest.common.service_client.ServiceClient.get',
+            expected, bytes_body,
+            hypervisor_id=self.hypervisor_id)
+
+    def test_list_servers_on_hypervisor_str_body(self):
+        self._test_list_servers_on_hypervisor(bytes_body=False)
+
+    def test_list_servers_on_hypervisor_byte_body(self):
+        self._test_list_servers_on_hypervisor(bytes_body=True)
+
+    def _test_list_servers_on_hypervisor(self, bytes_body=False):
+        expected = {"hypervisors": [{
+            "id": 1,
+            "hypervisor_hostname": "hyper.hostname.com",
+            "servers": [{
+                "uuid": "e1ae8fc4-b72d-4c2f-a427-30dd420b6277",
+                "name": "instance-00000001"},
+                {
+                "uuid": "e1ae8fc4-b72d-4c2f-a427-30dd42066666",
+                "name": "instance-00000002"}
+                ]}
+            ]}
+        self.check_service_client_function(
+            self.client.list_servers_on_hypervisor,
+            'tempest.common.service_client.ServiceClient.get',
+            expected, bytes_body,
+            hypervisor_name=self.hypervisor_name)
+
+    def test_show_hypervisor_statistics_str_body(self):
+        self._test_show_hypervisor_statistics(bytes_body=False)
+
+    def test_show_hypervisor_statistics_byte_body(self):
+        self._test_show_hypervisor_statistics(bytes_body=True)
+
+    def _test_show_hypervisor_statistics(self, bytes_body=False):
+        expected = {
+            "hypervisor_statistics": {
+                "count": 1,
+                "current_workload": 0,
+                "disk_available_least": 0,
+                "free_disk_gb": 1028,
+                "free_ram_mb": 7680,
+                "local_gb": 1028,
+                "local_gb_used": 0,
+                "memory_mb": 8192,
+                "memory_mb_used": 512,
+                "running_vms": 0,
+                "vcpus": 1,
+                "vcpus_used": 0}}
+        self.check_service_client_function(
+            self.client.show_hypervisor_statistics,
+            'tempest.common.service_client.ServiceClient.get',
+            expected, bytes_body)
+
+    def test_show_hypervisor_uptime_str_body(self):
+        self._test_show_hypervisor_uptime(bytes_body=False)
+
+    def test_show_hypervisor_uptime_byte_body(self):
+        self._test_show_hypervisor_uptime(bytes_body=True)
+
+    def _test_show_hypervisor_uptime(self, bytes_body=False):
+        expected = {
+            "hypervisor": {
+                "hypervisor_hostname": "fake-mini",
+                "id": 1,
+                "uptime": (" 08:32:11 up 93 days, 18:25, 12 users, "
+                           " load average: 0.20, 0.12, 0.14")
+            }}
+        self.check_service_client_function(
+            self.client.show_hypervisor_uptime,
+            'tempest.common.service_client.ServiceClient.get',
+            expected, bytes_body,
+            hypervisor_id=self.hypervisor_id)
+
+    def test_search_hypervisor_str_body(self):
+        self._test_search_hypervisor(bytes_body=False)
+
+    def test_search_hypervisor_byte_body(self):
+        self._test_search_hypervisor(bytes_body=True)
+
+    def _test_search_hypervisor(self, bytes_body=False):
+        expected = {"hypervisors": [{
+            "id": 2,
+            "hypervisor_hostname": "hyper.hostname.com"}]}
+        self.check_service_client_function(
+            self.client.search_hypervisor,
+            'tempest.common.service_client.ServiceClient.get',
+            expected, bytes_body,
+            hypervisor_name=self.hypervisor_name)
diff --git a/tempest/thirdparty/boto/test.py b/tempest/thirdparty/boto/test.py
index 8c371a7..1ced180 100644
--- a/tempest/thirdparty/boto/test.py
+++ b/tempest/thirdparty/boto/test.py
@@ -211,7 +211,7 @@
     def resource_setup(cls):
         super(BotoTestCase, cls).resource_setup()
         cls.conclusion = decision_maker()
-        # The trash contains cleanup functions and paramaters in tuples
+        # The trash contains cleanup functions and parameters in tuples
         # (function, *args, **kwargs)
         cls._resource_trash_bin = {}
         cls._sequence = -1
