diff --git a/etc/tempest.conf.sample b/etc/tempest.conf.sample
index 840983c..1095e77 100644
--- a/etc/tempest.conf.sample
+++ b/etc/tempest.conf.sample
@@ -290,18 +290,10 @@
 # (integer value)
 #ping_count = 1
 
-# Timeout in seconds to wait for authentication to succeed. (integer
-# value)
-#ssh_timeout = 300
-
 # Additional wait time for clean state, when there is no OS-EXT-STS
 # extension available (integer value)
 #ready_wait = 0
 
-# Timeout in seconds to wait for output from ssh channel. (integer
-# value)
-#ssh_channel_timeout = 60
-
 # Name of the fixed network that is visible to all test tenants. If
 # multiple networks are available for a tenant this is the network
 # which will be used for creating servers if tempest does not create a
@@ -313,9 +305,6 @@
 # use_floatingip_for_ssh=true or run_validation=false. (string value)
 #network_for_ssh = public
 
-# IP version used for SSH connections. (integer value)
-#ip_version_for_ssh = 4
-
 # Does SSH use Floating IPs? (boolean value)
 #use_floatingip_for_ssh = true
 
@@ -1128,6 +1117,7 @@
 #auth_method = keypair
 
 # Default IP version for ssh connections. (integer value)
+# Deprecated group/name - [compute]/ip_version_for_ssh
 #ip_version_for_ssh = 4
 
 # Timeout in seconds to wait for ping to succeed. (integer value)
@@ -1135,9 +1125,11 @@
 
 # Timeout in seconds to wait for the TCP connection to be successful.
 # (integer value)
+# Deprecated group/name - [compute]/ssh_channel_timeout
 #connect_timeout = 60
 
 # Timeout in seconds to wait for the ssh banner. (integer value)
+# Deprecated group/name - [compute]/ssh_timeout
 #ssh_timeout = 300
 
 
diff --git a/tempest/api/compute/admin/test_security_group_default_rules.py b/tempest/api/compute/admin/test_security_group_default_rules.py
index c1fe18c..13d6cc0 100644
--- a/tempest/api/compute/admin/test_security_group_default_rules.py
+++ b/tempest/api/compute/admin/test_security_group_default_rules.py
@@ -64,7 +64,7 @@
             # Delete Security Group default rule
             self.adm_client.delete_security_group_default_rule(rule['id'])
             self.assertRaises(lib_exc.NotFound,
-                              self.adm_client.get_security_group_default_rule,
+                              self.adm_client.show_security_group_default_rule,
                               rule['id'])
 
     @test.idempotent_id('4d752e0a-33a1-4c3a-b498-ff8667ca22e5')
@@ -125,6 +125,6 @@
                                                          cidr)
         self.addCleanup(self.adm_client.delete_security_group_default_rule,
                         rule['id'])
-        fetched_rule = self.adm_client.get_security_group_default_rule(
+        fetched_rule = self.adm_client.show_security_group_default_rule(
             rule['id'])
         self.assertEqual(rule, fetched_rule)
diff --git a/tempest/api/compute/admin/test_simple_tenant_usage.py b/tempest/api/compute/admin/test_simple_tenant_usage.py
index 98b7c5f..02085e8 100644
--- a/tempest/api/compute/admin/test_simple_tenant_usage.py
+++ b/tempest/api/compute/admin/test_simple_tenant_usage.py
@@ -60,7 +60,7 @@
         # Get usage for a specific tenant
         params = {'start': self.start,
                   'end': self.end}
-        tenant_usage = self.adm_client.get_tenant_usage(
+        tenant_usage = self.adm_client.show_tenant_usage(
             self.tenant_id, params)
 
         self.assertEqual(len(tenant_usage), 8)
@@ -70,7 +70,7 @@
         # Get usage for a specific tenant with non admin user
         params = {'start': self.start,
                   'end': self.end}
-        tenant_usage = self.client.get_tenant_usage(
+        tenant_usage = self.client.show_tenant_usage(
             self.tenant_id, params)
 
         self.assertEqual(len(tenant_usage), 8)
diff --git a/tempest/api/compute/admin/test_simple_tenant_usage_negative.py b/tempest/api/compute/admin/test_simple_tenant_usage_negative.py
index 5a3c9a4..3c66859 100644
--- a/tempest/api/compute/admin/test_simple_tenant_usage_negative.py
+++ b/tempest/api/compute/admin/test_simple_tenant_usage_negative.py
@@ -47,7 +47,7 @@
         params = {'start': self.start,
                   'end': self.end}
         self.assertRaises(lib_exc.NotFound,
-                          self.adm_client.get_tenant_usage,
+                          self.adm_client.show_tenant_usage,
                           '', params)
 
     @test.attr(type=['negative'])
@@ -57,7 +57,7 @@
         params = {'start': self.end,
                   'end': self.start}
         self.assertRaises(lib_exc.BadRequest,
-                          self.adm_client.get_tenant_usage,
+                          self.adm_client.show_tenant_usage,
                           self.client.tenant_id, params)
 
     @test.attr(type=['negative'])
diff --git a/tempest/api/compute/security_groups/test_security_groups.py b/tempest/api/compute/security_groups/test_security_groups.py
index 0ce26a3..821065c 100644
--- a/tempest/api/compute/security_groups/test_security_groups.py
+++ b/tempest/api/compute/security_groups/test_security_groups.py
@@ -75,7 +75,7 @@
                          "not equal to the requested name")
         # Now fetch the created Security Group by its 'id'
         fetched_group = \
-            self.client.get_security_group(securitygroup['id'])
+            self.client.show_security_group(securitygroup['id'])
         self.assertEqual(securitygroup, fetched_group,
                          "The fetched Security Group is different "
                          "from the created Group")
@@ -141,6 +141,6 @@
                                           description=s_new_des)
         # get the security group
         fetched_group = \
-            self.client.get_security_group(securitygroup_id)
+            self.client.show_security_group(securitygroup_id)
         self.assertEqual(s_new_name, fetched_group['name'])
         self.assertEqual(s_new_des, fetched_group['description'])
diff --git a/tempest/api/compute/security_groups/test_security_groups_negative.py b/tempest/api/compute/security_groups/test_security_groups_negative.py
index 06e073d..27a6670 100644
--- a/tempest/api/compute/security_groups/test_security_groups_negative.py
+++ b/tempest/api/compute/security_groups/test_security_groups_negative.py
@@ -58,7 +58,7 @@
         # Negative test:Should not be able to GET the details
         # of non-existent Security Group
         non_exist_id = self._generate_a_non_existent_security_group_id()
-        self.assertRaises(lib_exc.NotFound, self.client.get_security_group,
+        self.assertRaises(lib_exc.NotFound, self.client.show_security_group,
                           non_exist_id)
 
     @decorators.skip_because(bug="1161411",
diff --git a/tempest/api/compute/test_authorization.py b/tempest/api/compute/test_authorization.py
index af29425..4933ce2 100644
--- a/tempest/api/compute/test_authorization.py
+++ b/tempest/api/compute/test_authorization.py
@@ -271,7 +271,7 @@
     def test_get_security_group_of_alt_account_fails(self):
         # A GET request for another user's security group should fail
         self.assertRaises(lib_exc.NotFound,
-                          self.alt_security_client.get_security_group,
+                          self.alt_security_client.show_security_group,
                           self.security_group['id'])
 
     @test.idempotent_id('155387a5-2bbc-4acf-ab06-698dae537ea5')
diff --git a/tempest/api/compute/test_tenant_networks.py b/tempest/api/compute/test_tenant_networks.py
index a37dce1..ad5adaa 100644
--- a/tempest/api/compute/test_tenant_networks.py
+++ b/tempest/api/compute/test_tenant_networks.py
@@ -29,5 +29,5 @@
         self.assertNotEmpty(tenant_networks, "No tenant networks found.")
 
         for net in tenant_networks:
-            tenant_network = self.client.get_tenant_network(net['id'])
+            tenant_network = self.client.show_tenant_network(net['id'])
             self.assertEqual(net['id'], tenant_network['id'])
diff --git a/tempest/api/compute/volumes/test_volumes_get.py b/tempest/api/compute/volumes/test_volumes_get.py
index d96dcc2..efacbda 100644
--- a/tempest/api/compute/volumes/test_volumes_get.py
+++ b/tempest/api/compute/volumes/test_volumes_get.py
@@ -58,7 +58,7 @@
         # Wait for Volume status to become ACTIVE
         self.client.wait_for_volume_status(volume['id'], 'available')
         # GET Volume
-        fetched_volume = self.client.get_volume(volume['id'])
+        fetched_volume = self.client.show_volume(volume['id'])
         # Verification of details of fetched Volume
         self.assertEqual(v_name,
                          fetched_volume['displayName'],
diff --git a/tempest/api/compute/volumes/test_volumes_list.py b/tempest/api/compute/volumes/test_volumes_list.py
index fdece0c..93fabc8 100644
--- a/tempest/api/compute/volumes/test_volumes_list.py
+++ b/tempest/api/compute/volumes/test_volumes_list.py
@@ -57,7 +57,7 @@
                 volume = cls.client.create_volume(display_name=v_name,
                                                   metadata=metadata)
                 cls.client.wait_for_volume_status(volume['id'], 'available')
-                volume = cls.client.get_volume(volume['id'])
+                volume = cls.client.show_volume(volume['id'])
                 cls.volume_list.append(volume)
                 cls.volume_id_list.append(volume['id'])
             except Exception:
@@ -102,7 +102,7 @@
     def test_volume_list_with_details(self):
         # Should return the list of Volumes with details
         # Fetch all Volumes
-        fetched_list = self.client.list_volumes_with_detail()
+        fetched_list = self.client.list_volumes(detail=True)
         # Now check if all the Volumes created in setup are in fetched list
         missing_volumes = [
             v for v in self.volume_list if v not in fetched_list
@@ -117,7 +117,7 @@
     def test_volume_list_param_limit(self):
         # Return the list of volumes based on limit set
         params = {'limit': 2}
-        fetched_vol_list = self.client.list_volumes(params=params)
+        fetched_vol_list = self.client.list_volumes(**params)
 
         self.assertEqual(len(fetched_vol_list), params['limit'],
                          "Failed to list volumes by limit set")
@@ -126,7 +126,7 @@
     def test_volume_list_with_detail_param_limit(self):
         # Return the list of volumes with details based on limit set.
         params = {'limit': 2}
-        fetched_vol_list = self.client.list_volumes_with_detail(params=params)
+        fetched_vol_list = self.client.list_volumes(detail=True, **params)
 
         self.assertEqual(len(fetched_vol_list), params['limit'],
                          "Failed to list volume details by limit set")
@@ -137,7 +137,7 @@
         # get all volumes list
         all_vol_list = self.client.list_volumes()
         params = {'offset': 1, 'limit': 1}
-        fetched_vol_list = self.client.list_volumes(params=params)
+        fetched_vol_list = self.client.list_volumes(**params)
 
         # Validating length of the fetched volumes
         self.assertEqual(len(fetched_vol_list), params['limit'],
@@ -152,9 +152,9 @@
     def test_volume_list_with_detail_param_offset_and_limit(self):
         # Return the list of volumes details based on offset and limit set.
         # get all volumes list
-        all_vol_list = self.client.list_volumes_with_detail()
+        all_vol_list = self.client.list_volumes(detail=True)
         params = {'offset': 1, 'limit': 1}
-        fetched_vol_list = self.client.list_volumes_with_detail(params=params)
+        fetched_vol_list = self.client.list_volumes(detail=True, **params)
 
         # Validating length of the fetched volumes
         self.assertEqual(len(fetched_vol_list), params['limit'],
diff --git a/tempest/api/compute/volumes/test_volumes_negative.py b/tempest/api/compute/volumes/test_volumes_negative.py
index 65d9def..592e5a7 100644
--- a/tempest/api/compute/volumes/test_volumes_negative.py
+++ b/tempest/api/compute/volumes/test_volumes_negative.py
@@ -45,7 +45,7 @@
         # Negative: Should not be able to get details of nonexistent volume
         # Creating a nonexistent volume id
         # Trying to GET a non existent volume
-        self.assertRaises(lib_exc.NotFound, self.client.get_volume,
+        self.assertRaises(lib_exc.NotFound, self.client.show_volume,
                           str(uuid.uuid4()))
 
     @test.attr(type=['negative'])
@@ -91,13 +91,13 @@
     def test_get_invalid_volume_id(self):
         # Negative: Should not be able to get volume with invalid id
         self.assertRaises(lib_exc.NotFound,
-                          self.client.get_volume, '#$%%&^&^')
+                          self.client.show_volume, '#$%%&^&^')
 
     @test.attr(type=['negative'])
     @test.idempotent_id('62bab09a-4c03-4617-8cca-8572bc94af9b')
     def test_get_volume_without_passing_volume_id(self):
         # Negative: Should not be able to get volume when empty ID is passed
-        self.assertRaises(lib_exc.NotFound, self.client.get_volume, '')
+        self.assertRaises(lib_exc.NotFound, self.client.show_volume, '')
 
     @test.attr(type=['negative'])
     @test.idempotent_id('62972737-124b-4513-b6cf-2f019f178494')
diff --git a/tempest/common/utils/linux/remote_client.py b/tempest/common/utils/linux/remote_client.py
index d4e6eb8..93c2c10 100644
--- a/tempest/common/utils/linux/remote_client.py
+++ b/tempest/common/utils/linux/remote_client.py
@@ -30,10 +30,10 @@
 
     # NOTE(afazekas): It should always get an address instead of server
     def __init__(self, server, username, password=None, pkey=None):
-        ssh_timeout = CONF.compute.ssh_timeout
+        ssh_timeout = CONF.validation.ssh_timeout
         network = CONF.compute.network_for_ssh
-        ip_version = CONF.compute.ip_version_for_ssh
-        ssh_channel_timeout = CONF.compute.ssh_channel_timeout
+        ip_version = CONF.validation.ip_version_for_ssh
+        connect_timeout = CONF.validation.connect_timeout
         if isinstance(server, six.string_types):
             ip_address = server
         else:
@@ -46,7 +46,7 @@
                 raise exceptions.ServerUnreachable()
         self.ssh_client = ssh.Client(ip_address, username, password,
                                      ssh_timeout, pkey=pkey,
-                                     channel_timeout=ssh_channel_timeout)
+                                     channel_timeout=connect_timeout)
 
     def exec_command(self, cmd):
         # Shell options below add more clearness on failures,
@@ -72,8 +72,7 @@
             return output.split()[1]
 
     def get_number_of_vcpus(self):
-        command = 'cat /proc/cpuinfo | grep processor | wc -l'
-        output = self.exec_command(command)
+        output = self.exec_command('grep -c processor /proc/cpuinfo')
         return int(output)
 
     def get_partitions(self):
diff --git a/tempest/config.py b/tempest/config.py
index e3f9f0a..7382088 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -240,18 +240,10 @@
                default=1,
                help="The number of ping packets originating from remote "
                     "linux hosts"),
-    cfg.IntOpt('ssh_timeout',
-               default=300,
-               help="Timeout in seconds to wait for authentication to "
-                    "succeed."),
     cfg.IntOpt('ready_wait',
                default=0,
                help="Additional wait time for clean state, when there is "
                     "no OS-EXT-STS extension available"),
-    cfg.IntOpt('ssh_channel_timeout',
-               default=60,
-               help="Timeout in seconds to wait for output from ssh "
-                    "channel."),
     cfg.StrOpt('fixed_network_name',
                help="Name of the fixed network that is visible to all test "
                     "tenants. If multiple networks are available for a tenant"
@@ -263,9 +255,6 @@
                default='public',
                help="Network used for SSH connections. Ignored if "
                     "use_floatingip_for_ssh=true or run_validation=false."),
-    cfg.IntOpt('ip_version_for_ssh',
-               default=4,
-               help="IP version used for SSH connections."),
     cfg.BoolOpt('use_floatingip_for_ssh',
                 default=True,
                 help="Does SSH use Floating IPs?"),
@@ -602,17 +591,23 @@
                     'Additional methods will be handled in a separate spec.'),
     cfg.IntOpt('ip_version_for_ssh',
                default=4,
-               help='Default IP version for ssh connections.'),
+               help='Default IP version for ssh connections.',
+               deprecated_opts=[cfg.DeprecatedOpt('ip_version_for_ssh',
+                                                  group='compute')]),
     cfg.IntOpt('ping_timeout',
                default=120,
                help='Timeout in seconds to wait for ping to succeed.'),
     cfg.IntOpt('connect_timeout',
                default=60,
                help='Timeout in seconds to wait for the TCP connection to be '
-                    'successful.'),
+                    'successful.',
+               deprecated_opts=[cfg.DeprecatedOpt('ssh_channel_timeout',
+                                                  group='compute')]),
     cfg.IntOpt('ssh_timeout',
                default=300,
-               help='Timeout in seconds to wait for the ssh banner.'),
+               help='Timeout in seconds to wait for the ssh banner.',
+               deprecated_opts=[cfg.DeprecatedOpt('ssh_timeout',
+                                                  group='compute')]),
 ]
 
 volume_group = cfg.OptGroup(name='volume',
diff --git a/tempest/scenario/test_volume_boot_pattern.py b/tempest/scenario/test_volume_boot_pattern.py
index 1731c48..d321e85 100644
--- a/tempest/scenario/test_volume_boot_pattern.py
+++ b/tempest/scenario/test_volume_boot_pattern.py
@@ -47,7 +47,7 @@
         vol_name = data_utils.rand_name('volume-origin')
         return self.create_volume(name=vol_name, imageRef=img_uuid)
 
-    def _boot_instance_from_volume(self, vol_id, keypair):
+    def _boot_instance_from_volume(self, vol_id, keypair, security_group):
         # NOTE(gfidente): the syntax for block_device_mapping is
         # dev_name=id:type:size:delete_on_terminate
         # where type needs to be "snap" if the server is booted
@@ -56,12 +56,10 @@
             'device_name': 'vda',
             'volume_id': vol_id,
             'delete_on_termination': '0'}]
-        self.security_group = self._create_security_group()
-        security_groups = [{'name': self.security_group['name']}]
         create_kwargs = {
             'block_device_mapping': bd_map,
             'key_name': keypair['name'],
-            'security_groups': security_groups
+            'security_groups': [{'name': security_group['name']}]
         }
         return self.create_server(image='', create_kwargs=create_kwargs)
 
@@ -134,12 +132,12 @@
     @test.services('compute', 'volume', 'image')
     def test_volume_boot_pattern(self):
         keypair = self.create_keypair()
-        self.security_group = self._create_security_group()
+        security_group = self._create_security_group()
 
         # create an instance from volume
         volume_origin = self._create_volume_from_image()
         instance_1st = self._boot_instance_from_volume(volume_origin['id'],
-                                                       keypair)
+                                                       keypair, security_group)
 
         # write content to volume on instance
         ssh_client_for_instance_1st = self._ssh_to_server(instance_1st,
@@ -151,7 +149,7 @@
 
         # create a 2nd instance from volume
         instance_2nd = self._boot_instance_from_volume(volume_origin['id'],
-                                                       keypair)
+                                                       keypair, security_group)
 
         # check the content of written file
         ssh_client_for_instance_2nd = self._ssh_to_server(instance_2nd,
@@ -163,8 +161,9 @@
 
         # create a 3rd instance from snapshot
         volume = self._create_volume_from_snapshot(snapshot['id'])
-        instance_from_snapshot = self._boot_instance_from_volume(volume['id'],
-                                                                 keypair)
+        instance_from_snapshot = (
+            self._boot_instance_from_volume(volume['id'],
+                                            keypair, security_group))
 
         # check the content of written file
         ssh_client = self._ssh_to_server(instance_from_snapshot, keypair)
@@ -176,15 +175,16 @@
 
 
 class TestVolumeBootPatternV2(TestVolumeBootPattern):
-    def _boot_instance_from_volume(self, vol_id, keypair):
-        bdms = [{'uuid': vol_id, 'source_type': 'volume',
-                 'destination_type': 'volume', 'boot_index': 0,
-                 'delete_on_termination': False}]
-        self.security_group = self._create_security_group()
-        security_groups = [{'name': self.security_group['name']}]
+    def _boot_instance_from_volume(self, vol_id, keypair, security_group):
+        bd_map_v2 = [{
+            'uuid': vol_id,
+            'source_type': 'volume',
+            'destination_type': 'volume',
+            'boot_index': 0,
+            'delete_on_termination': False}]
         create_kwargs = {
-            'block_device_mapping_v2': bdms,
+            'block_device_mapping_v2': bd_map_v2,
             'key_name': keypair['name'],
-            'security_groups': security_groups
+            'security_groups': [{'name': security_group['name']}]
         }
         return self.create_server(image='', create_kwargs=create_kwargs)
diff --git a/tempest/services/compute/json/agents_client.py b/tempest/services/compute/json/agents_client.py
index c69e483..4a91d7a 100644
--- a/tempest/services/compute/json/agents_client.py
+++ b/tempest/services/compute/json/agents_client.py
@@ -45,12 +45,12 @@
 
     def delete_agent(self, agent_id):
         """Delete an existing agent build."""
-        resp, body = self.delete("os-agents/%s" % str(agent_id))
+        resp, body = self.delete("os-agents/%s" % agent_id)
         self.validate_response(schema.delete_agent, resp, body)
         return service_client.ResponseBody(resp, body)
 
     def update_agent(self, agent_id, **kwargs):
         """Update an agent build."""
         put_body = json.dumps({'para': kwargs})
-        resp, body = self.put('os-agents/%s' % str(agent_id), put_body)
+        resp, body = self.put('os-agents/%s' % agent_id, put_body)
         return service_client.ResponseBody(resp, self._parse_resp(body))
diff --git a/tempest/services/compute/json/aggregates_client.py b/tempest/services/compute/json/aggregates_client.py
index 6c02b63..7afe7d7 100644
--- a/tempest/services/compute/json/aggregates_client.py
+++ b/tempest/services/compute/json/aggregates_client.py
@@ -32,7 +32,7 @@
 
     def show_aggregate(self, aggregate_id):
         """Get details of the given aggregate."""
-        resp, body = self.get("os-aggregates/%s" % str(aggregate_id))
+        resp, body = self.get("os-aggregates/%s" % aggregate_id)
         body = json.loads(body)
         self.validate_response(schema.get_aggregate, resp, body)
         return service_client.ResponseBody(resp, body['aggregate'])
@@ -53,7 +53,7 @@
             'availability_zone': availability_zone
         }
         put_body = json.dumps({'aggregate': put_body})
-        resp, body = self.put('os-aggregates/%s' % str(aggregate_id), put_body)
+        resp, body = self.put('os-aggregates/%s' % aggregate_id, put_body)
 
         body = json.loads(body)
         self.validate_response(schema.update_aggregate, resp, body)
@@ -61,7 +61,7 @@
 
     def delete_aggregate(self, aggregate_id):
         """Deletes the given aggregate."""
-        resp, body = self.delete("os-aggregates/%s" % str(aggregate_id))
+        resp, body = self.delete("os-aggregates/%s" % aggregate_id)
         self.validate_response(schema.delete_aggregate, resp, body)
         return service_client.ResponseBody(resp, body)
 
diff --git a/tempest/services/compute/json/flavors_client.py b/tempest/services/compute/json/flavors_client.py
index ebe4117..93601b1 100644
--- a/tempest/services/compute/json/flavors_client.py
+++ b/tempest/services/compute/json/flavors_client.py
@@ -43,7 +43,7 @@
         return service_client.ResponseBodyList(resp, body['flavors'])
 
     def show_flavor(self, flavor_id):
-        resp, body = self.get("flavors/%s" % str(flavor_id))
+        resp, body = self.get("flavors/%s" % flavor_id)
         body = json.loads(body)
         self.validate_response(schema.create_get_flavor_details, resp, body)
         return service_client.ResponseBody(resp, body['flavor'])
@@ -113,7 +113,7 @@
 
     def show_flavor_extra_spec(self, flavor_id, key):
         """Gets extra Specs key-value of the mentioned flavor and key."""
-        resp, body = self.get('flavors/%s/os-extra_specs/%s' % (str(flavor_id),
+        resp, body = self.get('flavors/%s/os-extra_specs/%s' % (flavor_id,
                               key))
         body = json.loads(body)
         self.validate_response(
@@ -134,7 +134,7 @@
     def unset_flavor_extra_spec(self, flavor_id, key):
         """Unsets extra Specs from the mentioned flavor."""
         resp, body = self.delete('flavors/%s/os-extra_specs/%s' %
-                                 (str(flavor_id), key))
+                                 (flavor_id, key))
         self.validate_response(schema.unset_flavor_extra_specs, resp, body)
         return service_client.ResponseBody(resp, body)
 
diff --git a/tempest/services/compute/json/floating_ips_client.py b/tempest/services/compute/json/floating_ips_client.py
index 6095dc0..5cfc325 100644
--- a/tempest/services/compute/json/floating_ips_client.py
+++ b/tempest/services/compute/json/floating_ips_client.py
@@ -37,7 +37,7 @@
 
     def show_floating_ip(self, floating_ip_id):
         """Get the details of a floating IP."""
-        url = "os-floating-ips/%s" % str(floating_ip_id)
+        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)
@@ -55,14 +55,14 @@
 
     def delete_floating_ip(self, floating_ip_id):
         """Deletes the provided floating IP from the project."""
-        url = "os-floating-ips/%s" % str(floating_ip_id)
+        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" % str(server_id)
+        url = "servers/%s/action" % server_id
         post_body = {
             'addFloatingIp': {
                 'address': floating_ip,
@@ -76,7 +76,7 @@
 
     def disassociate_floating_ip_from_server(self, floating_ip, server_id):
         """Disassociate the provided floating IP from a specific server."""
-        url = "servers/%s/action" % str(server_id)
+        url = "servers/%s/action" % server_id
         post_body = {
             'removeFloatingIp': {
                 'address': floating_ip,
diff --git a/tempest/services/compute/json/hosts_client.py b/tempest/services/compute/json/hosts_client.py
index 223b80f..d79368b 100644
--- a/tempest/services/compute/json/hosts_client.py
+++ b/tempest/services/compute/json/hosts_client.py
@@ -37,7 +37,7 @@
     def show_host(self, hostname):
         """Show detail information for the host."""
 
-        resp, body = self.get("os-hosts/%s" % str(hostname))
+        resp, body = self.get("os-hosts/%s" % hostname)
         body = json.loads(body)
         self.validate_response(schema.get_host_detail, resp, body)
         return service_client.ResponseBodyList(resp, body['host'])
@@ -52,7 +52,7 @@
         request_body.update(**kwargs)
         request_body = json.dumps(request_body)
 
-        resp, body = self.put("os-hosts/%s" % str(hostname), request_body)
+        resp, body = self.put("os-hosts/%s" % hostname, request_body)
         body = json.loads(body)
         self.validate_response(schema.update_host, resp, body)
         return service_client.ResponseBody(resp, body)
@@ -60,7 +60,7 @@
     def startup_host(self, hostname):
         """Startup a host."""
 
-        resp, body = self.get("os-hosts/%s/startup" % str(hostname))
+        resp, body = self.get("os-hosts/%s/startup" % hostname)
         body = json.loads(body)
         self.validate_response(schema.startup_host, resp, body)
         return service_client.ResponseBody(resp, body['host'])
@@ -68,7 +68,7 @@
     def shutdown_host(self, hostname):
         """Shutdown a host."""
 
-        resp, body = self.get("os-hosts/%s/shutdown" % str(hostname))
+        resp, body = self.get("os-hosts/%s/shutdown" % hostname)
         body = json.loads(body)
         self.validate_response(schema.shutdown_host, resp, body)
         return service_client.ResponseBody(resp, body['host'])
@@ -76,7 +76,7 @@
     def reboot_host(self, hostname):
         """reboot a host."""
 
-        resp, body = self.get("os-hosts/%s/reboot" % str(hostname))
+        resp, body = self.get("os-hosts/%s/reboot" % hostname)
         body = json.loads(body)
         self.validate_response(schema.reboot_host, resp, body)
         return service_client.ResponseBody(resp, body['host'])
diff --git a/tempest/services/compute/json/images_client.py b/tempest/services/compute/json/images_client.py
index 3736a15..d288982 100644
--- a/tempest/services/compute/json/images_client.py
+++ b/tempest/services/compute/json/images_client.py
@@ -38,7 +38,7 @@
             post_body['createImage']['metadata'] = meta
 
         post_body = json.dumps(post_body)
-        resp, body = self.post('servers/%s/action' % str(server_id),
+        resp, body = self.post('servers/%s/action' % server_id,
                                post_body)
         self.validate_response(schema.create_image, resp, body)
         return service_client.ResponseBody(resp, body)
@@ -61,7 +61,7 @@
 
     def show_image(self, image_id):
         """Returns the details of a single image."""
-        resp, body = self.get("images/%s" % str(image_id))
+        resp, body = self.get("images/%s" % image_id)
         self.expected_success(200, resp.status)
         body = json.loads(body)
         self.validate_response(schema.get_image, resp, body)
@@ -69,7 +69,7 @@
 
     def delete_image(self, image_id):
         """Deletes the provided image."""
-        resp, body = self.delete("images/%s" % str(image_id))
+        resp, body = self.delete("images/%s" % image_id)
         self.validate_response(schema.delete, resp, body)
         return service_client.ResponseBody(resp, body)
 
@@ -79,7 +79,7 @@
 
     def list_image_metadata(self, image_id):
         """Lists all metadata items for an image."""
-        resp, body = self.get("images/%s/metadata" % str(image_id))
+        resp, body = self.get("images/%s/metadata" % image_id)
         body = json.loads(body)
         self.validate_response(schema.image_metadata, resp, body)
         return service_client.ResponseBody(resp, body['metadata'])
@@ -87,7 +87,7 @@
     def set_image_metadata(self, image_id, meta):
         """Sets the metadata for an image."""
         post_body = json.dumps({'metadata': meta})
-        resp, body = self.put('images/%s/metadata' % str(image_id), post_body)
+        resp, body = self.put('images/%s/metadata' % image_id, post_body)
         body = json.loads(body)
         self.validate_response(schema.image_metadata, resp, body)
         return service_client.ResponseBody(resp, body['metadata'])
@@ -95,14 +95,14 @@
     def update_image_metadata(self, image_id, meta):
         """Updates the metadata for an image."""
         post_body = json.dumps({'metadata': meta})
-        resp, body = self.post('images/%s/metadata' % str(image_id), post_body)
+        resp, body = self.post('images/%s/metadata' % image_id, post_body)
         body = json.loads(body)
         self.validate_response(schema.image_metadata, resp, body)
         return service_client.ResponseBody(resp, body['metadata'])
 
     def show_image_metadata_item(self, image_id, key):
         """Returns the value for a specific image metadata key."""
-        resp, body = self.get("images/%s/metadata/%s" % (str(image_id), key))
+        resp, body = self.get("images/%s/metadata/%s" % (image_id, key))
         body = json.loads(body)
         self.validate_response(schema.image_meta_item, resp, body)
         return service_client.ResponseBody(resp, body['meta'])
@@ -110,7 +110,7 @@
     def set_image_metadata_item(self, image_id, key, meta):
         """Sets the value for a specific image metadata key."""
         post_body = json.dumps({'meta': meta})
-        resp, body = self.put('images/%s/metadata/%s' % (str(image_id), key),
+        resp, body = self.put('images/%s/metadata/%s' % (image_id, key),
                               post_body)
         body = json.loads(body)
         self.validate_response(schema.image_meta_item, resp, body)
@@ -119,7 +119,7 @@
     def delete_image_metadata_item(self, image_id, key):
         """Deletes a single image metadata key/value pair."""
         resp, body = self.delete("images/%s/metadata/%s" %
-                                 (str(image_id), key))
+                                 (image_id, key))
         self.validate_response(schema.delete, resp, body)
         return service_client.ResponseBody(resp, body)
 
diff --git a/tempest/services/compute/json/interfaces_client.py b/tempest/services/compute/json/interfaces_client.py
index 223e90b..a0d7c60 100644
--- a/tempest/services/compute/json/interfaces_client.py
+++ b/tempest/services/compute/json/interfaces_client.py
@@ -89,7 +89,7 @@
                 'networkId': network_id
             }
         })
-        resp, body = self.post('servers/%s/action' % str(server_id),
+        resp, body = self.post('servers/%s/action' % server_id,
                                post_body)
         self.validate_response(servers_schema.server_actions_common_schema,
                                resp, body)
@@ -102,7 +102,7 @@
                 'address': ip_address
             }
         })
-        resp, body = self.post('servers/%s/action' % str(server_id),
+        resp, body = self.post('servers/%s/action' % server_id,
                                post_body)
         self.validate_response(servers_schema.server_actions_common_schema,
                                resp, body)
diff --git a/tempest/services/compute/json/keypairs_client.py b/tempest/services/compute/json/keypairs_client.py
index 143fe72..65cd19f 100644
--- a/tempest/services/compute/json/keypairs_client.py
+++ b/tempest/services/compute/json/keypairs_client.py
@@ -33,7 +33,7 @@
         return service_client.ResponseBodyList(resp, body['keypairs'])
 
     def show_keypair(self, key_name):
-        resp, body = self.get("os-keypairs/%s" % str(key_name))
+        resp, body = self.get("os-keypairs/%s" % key_name)
         body = json.loads(body)
         self.validate_response(schema.get_keypair, resp, body)
         return service_client.ResponseBody(resp, body['keypair'])
@@ -49,6 +49,6 @@
         return service_client.ResponseBody(resp, body['keypair'])
 
     def delete_keypair(self, key_name):
-        resp, body = self.delete("os-keypairs/%s" % str(key_name))
+        resp, body = self.delete("os-keypairs/%s" % key_name)
         self.validate_response(schema.delete_keypair, resp, body)
         return service_client.ResponseBody(resp, body)
diff --git a/tempest/services/compute/json/networks_client.py b/tempest/services/compute/json/networks_client.py
index e641787..21dd067 100644
--- a/tempest/services/compute/json/networks_client.py
+++ b/tempest/services/compute/json/networks_client.py
@@ -27,7 +27,7 @@
         return service_client.ResponseBodyList(resp, body['networks'])
 
     def show_network(self, network_id):
-        resp, body = self.get("os-networks/%s" % str(network_id))
+        resp, body = self.get("os-networks/%s" % network_id)
         body = json.loads(body)
         self.expected_success(200, resp.status)
         return service_client.ResponseBody(resp, body['network'])
diff --git a/tempest/services/compute/json/security_group_default_rules_client.py b/tempest/services/compute/json/security_group_default_rules_client.py
index 3bf3263..6853c03 100644
--- a/tempest/services/compute/json/security_group_default_rules_client.py
+++ b/tempest/services/compute/json/security_group_default_rules_client.py
@@ -49,7 +49,7 @@
     def delete_security_group_default_rule(self,
                                            security_group_default_rule_id):
         """Deletes the provided Security Group default rule."""
-        resp, body = self.delete('os-security-group-default-rules/%s' % str(
+        resp, body = self.delete('os-security-group-default-rules/%s' % (
             security_group_default_rule_id))
         self.validate_response(schema.delete_security_group_default_rule,
                                resp, body)
@@ -64,10 +64,10 @@
         rules = body['security_group_default_rules']
         return service_client.ResponseBodyList(resp, rules)
 
-    def get_security_group_default_rule(self, security_group_default_rule_id):
+    def show_security_group_default_rule(self, security_group_default_rule_id):
         """Return the details of provided Security Group default rule."""
-        resp, body = self.get('os-security-group-default-rules/%s' % str(
-            security_group_default_rule_id))
+        resp, body = self.get('os-security-group-default-rules/%s' %
+                              security_group_default_rule_id)
         body = json.loads(body)
         self.validate_response(schema.create_get_security_group_default_rule,
                                resp, body)
diff --git a/tempest/services/compute/json/security_groups_client.py b/tempest/services/compute/json/security_groups_client.py
index 2855e13..5f1656c 100644
--- a/tempest/services/compute/json/security_groups_client.py
+++ b/tempest/services/compute/json/security_groups_client.py
@@ -36,9 +36,9 @@
         self.validate_response(schema.list_security_groups, resp, body)
         return service_client.ResponseBodyList(resp, body['security_groups'])
 
-    def get_security_group(self, security_group_id):
+    def show_security_group(self, security_group_id):
         """Get the details of a Security Group."""
-        url = "os-security-groups/%s" % str(security_group_id)
+        url = "os-security-groups/%s" % security_group_id
         resp, body = self.get(url)
         body = json.loads(body)
         self.validate_response(schema.get_security_group, resp, body)
@@ -74,7 +74,7 @@
         if description:
             post_body['description'] = description
         post_body = json.dumps({'security_group': post_body})
-        resp, body = self.put('os-security-groups/%s' % str(security_group_id),
+        resp, body = self.put('os-security-groups/%s' % security_group_id,
                               post_body)
         body = json.loads(body)
         self.validate_response(schema.update_security_group, resp, body)
@@ -83,7 +83,7 @@
     def delete_security_group(self, security_group_id):
         """Deletes the provided Security Group."""
         resp, body = self.delete(
-            'os-security-groups/%s' % str(security_group_id))
+            'os-security-groups/%s' % security_group_id)
         self.validate_response(schema.delete_security_group, resp, body)
         return service_client.ResponseBody(resp, body)
 
@@ -117,7 +117,7 @@
     def delete_security_group_rule(self, group_rule_id):
         """Deletes the provided Security Group rule."""
         resp, body = self.delete('os-security-group-rules/%s' %
-                                 str(group_rule_id))
+                                 group_rule_id)
         self.validate_response(schema.delete_security_group_rule, resp, body)
         return service_client.ResponseBody(resp, body)
 
@@ -133,7 +133,7 @@
 
     def is_resource_deleted(self, id):
         try:
-            self.get_security_group(id)
+            self.show_security_group(id)
         except lib_exc.NotFound:
             return True
         return False
diff --git a/tempest/services/compute/json/servers_client.py b/tempest/services/compute/json/servers_client.py
index 1af1b37..644f881 100644
--- a/tempest/services/compute/json/servers_client.py
+++ b/tempest/services/compute/json/servers_client.py
@@ -131,21 +131,21 @@
             post_body['OS-DCF:diskConfig'] = disk_config
 
         post_body = json.dumps({'server': post_body})
-        resp, body = self.put("servers/%s" % str(server_id), post_body)
+        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['server'])
 
     def get_server(self, server_id):
         """Returns the details of an existing server."""
-        resp, body = self.get("servers/%s" % str(server_id))
+        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['server'])
 
     def delete_server(self, server_id):
         """Deletes the given server."""
-        resp, body = self.delete("servers/%s" % str(server_id))
+        resp, body = self.delete("servers/%s" % server_id)
         self.validate_response(schema.delete_server, resp, body)
         return service_client.ResponseBody(resp, body)
 
@@ -201,7 +201,7 @@
 
     def list_addresses(self, server_id):
         """Lists all addresses for a server."""
-        resp, body = self.get("servers/%s/ips" % str(server_id))
+        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['addresses'])
@@ -209,7 +209,7 @@
     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" %
-                              (str(server_id), network_id))
+                              (server_id, network_id))
         body = json.loads(body)
         self.validate_response(schema.list_addresses_by_network, resp, body)
         return service_client.ResponseBody(resp, body)
@@ -218,7 +218,7 @@
                schema=schema.server_actions_common_schema,
                response_class=service_client.ResponseBody, **kwargs):
         post_body = json.dumps({action_name: kwargs})
-        resp, body = self.post('servers/%s/action' % str(server_id),
+        resp, body = self.post('servers/%s/action' % server_id,
                                post_body)
         if response_key is not None:
             body = json.loads(body)
@@ -250,7 +250,7 @@
 
     def get_password(self, server_id):
         resp, body = self.get("servers/%s/os-server-password" %
-                              str(server_id))
+                              server_id)
         body = json.loads(body)
         self.validate_response(schema.get_password, resp, body)
         return service_client.ResponseBody(resp, body)
@@ -262,7 +262,7 @@
         password.
         """
         resp, body = self.delete("servers/%s/os-server-password" %
-                                 str(server_id))
+                                 server_id)
         self.validate_response(schema.server_actions_delete_password,
                                resp, body)
         return service_client.ResponseBody(resp, body)
@@ -303,7 +303,7 @@
         return self.action(server_id, 'revertResize', None, **kwargs)
 
     def list_server_metadata(self, server_id):
-        resp, body = self.get("servers/%s/metadata" % str(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['metadata'])
@@ -313,7 +313,7 @@
             post_body = ""
         else:
             post_body = json.dumps({'metadata': meta})
-        resp, body = self.put('servers/%s/metadata' % str(server_id),
+        resp, body = self.put('servers/%s/metadata' % server_id,
                               post_body)
         body = json.loads(body)
         self.validate_response(schema.set_server_metadata, resp, body)
@@ -321,7 +321,7 @@
 
     def update_server_metadata(self, server_id, meta):
         post_body = json.dumps({'metadata': meta})
-        resp, body = self.post('servers/%s/metadata' % str(server_id),
+        resp, body = self.post('servers/%s/metadata' % server_id,
                                post_body)
         body = json.loads(body)
         self.validate_response(schema.update_server_metadata,
@@ -329,7 +329,7 @@
         return service_client.ResponseBody(resp, body['metadata'])
 
     def get_server_metadata_item(self, server_id, key):
-        resp, body = self.get("servers/%s/metadata/%s" % (str(server_id), key))
+        resp, body = self.get("servers/%s/metadata/%s" % (server_id, key))
         body = json.loads(body)
         self.validate_response(schema.set_get_server_metadata_item,
                                resp, body)
@@ -337,7 +337,7 @@
 
     def set_server_metadata_item(self, server_id, key, meta):
         post_body = json.dumps({'meta': meta})
-        resp, body = self.put('servers/%s/metadata/%s' % (str(server_id), key),
+        resp, body = self.put('servers/%s/metadata/%s' % (server_id, key),
                               post_body)
         body = json.loads(body)
         self.validate_response(schema.set_get_server_metadata_item,
@@ -346,7 +346,7 @@
 
     def delete_server_metadata_item(self, server_id, key):
         resp, body = self.delete("servers/%s/metadata/%s" %
-                                 (str(server_id), key))
+                                 (server_id, key))
         self.validate_response(schema.delete_server_metadata_item,
                                resp, body)
         return service_client.ResponseBody(resp, body)
@@ -381,7 +381,7 @@
     def get_volume_attachment(self, server_id, attach_id):
         """Return details about the given volume attachment."""
         resp, body = self.get('servers/%s/os-volume_attachments/%s' % (
-            str(server_id), attach_id))
+            server_id, attach_id))
         body = json.loads(body)
         self.validate_response(schema.get_volume_attachment, resp, body)
         return service_client.ResponseBody(resp, body['volumeAttachment'])
@@ -389,7 +389,7 @@
     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' % (
-            str(server_id)))
+            server_id))
         body = json.loads(body)
         self.validate_response(schema.list_volume_attachments, resp, body)
         return service_client.ResponseBodyList(resp, body['volumeAttachments'])
@@ -413,7 +413,7 @@
 
         req_body = json.dumps({'os-migrateLive': migrate_params})
 
-        resp, body = self.post("servers/%s/action" % str(server_id), req_body)
+        resp, body = self.post("servers/%s/action" % server_id, req_body)
         self.validate_response(schema.server_actions_common_schema,
                                resp, body)
         return service_client.ResponseBody(resp, body)
@@ -492,13 +492,13 @@
 
     def get_server_diagnostics(self, server_id):
         """Get the usage data for a server."""
-        resp, body = self.get("servers/%s/diagnostics" % str(server_id))
+        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" %
-                              str(server_id))
+                              server_id)
         body = json.loads(body)
         self.validate_response(schema.list_instance_actions, resp, body)
         return service_client.ResponseBodyList(resp, body['instanceActions'])
@@ -506,7 +506,7 @@
     def get_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" %
-                              (str(server_id), str(request_id)))
+                              (server_id, request_id))
         body = json.loads(body)
         self.validate_response(schema.get_instance_action, resp, body)
         return service_client.ResponseBody(resp, body['instanceAction'])
@@ -553,7 +553,7 @@
 
     def delete_server_group(self, server_group_id):
         """Delete the given server-group."""
-        resp, body = self.delete("os-server-groups/%s" % str(server_group_id))
+        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)
 
@@ -566,7 +566,7 @@
 
     def get_server_group(self, server_group_id):
         """Get the details of given server_group."""
-        resp, body = self.get("os-server-groups/%s" % str(server_group_id))
+        resp, body = self.get("os-server-groups/%s" % server_group_id)
         body = json.loads(body)
         self.validate_response(schema.create_get_server_group, resp, body)
         return service_client.ResponseBody(resp, body['server_group'])
diff --git a/tempest/services/compute/json/tenant_networks_client.py b/tempest/services/compute/json/tenant_networks_client.py
index 11251f6..b130819 100644
--- a/tempest/services/compute/json/tenant_networks_client.py
+++ b/tempest/services/compute/json/tenant_networks_client.py
@@ -26,8 +26,8 @@
         self.validate_response(schema.list_tenant_networks, resp, body)
         return service_client.ResponseBodyList(resp, body['networks'])
 
-    def get_tenant_network(self, network_id):
-        resp, body = self.get("os-tenant-networks/%s" % str(network_id))
+    def show_tenant_network(self, network_id):
+        resp, body = self.get("os-tenant-networks/%s" % network_id)
         body = json.loads(body)
         self.validate_response(schema.get_tenant_network, resp, body)
         return service_client.ResponseBody(resp, body['network'])
diff --git a/tempest/services/compute/json/tenant_usages_client.py b/tempest/services/compute/json/tenant_usages_client.py
index 52f46e2..a1b1a46 100644
--- a/tempest/services/compute/json/tenant_usages_client.py
+++ b/tempest/services/compute/json/tenant_usages_client.py
@@ -33,7 +33,7 @@
         self.validate_response(schema.list_tenant_usage, resp, body)
         return service_client.ResponseBodyList(resp, body['tenant_usages'][0])
 
-    def get_tenant_usage(self, tenant_id, params=None):
+    def show_tenant_usage(self, tenant_id, params=None):
         url = 'os-simple-tenant-usage/%s' % tenant_id
         if params:
             url += '?%s' % urllib.urlencode(params)
diff --git a/tempest/services/compute/json/volumes_extensions_client.py b/tempest/services/compute/json/volumes_extensions_client.py
index 4d7a7aa..b6f1124 100644
--- a/tempest/services/compute/json/volumes_extensions_client.py
+++ b/tempest/services/compute/json/volumes_extensions_client.py
@@ -32,9 +32,12 @@
             auth_provider, service, region, **kwargs)
         self.default_volume_size = default_volume_size
 
-    def list_volumes(self, params=None):
+    def list_volumes(self, detail=False, **params):
         """List all the volumes created."""
         url = 'os-volumes'
+
+        if detail:
+            url += '/detail'
         if params:
             url += '?%s' % urllib.urlencode(params)
 
@@ -43,20 +46,9 @@
         self.validate_response(schema.list_volumes, resp, body)
         return service_client.ResponseBodyList(resp, body['volumes'])
 
-    def list_volumes_with_detail(self, params=None):
-        """List all the details of volumes."""
-        url = 'os-volumes/detail'
-        if params:
-            url += '?%s' % urllib.urlencode(params)
-
-        resp, body = self.get(url)
-        body = json.loads(body)
-        self.validate_response(schema.list_volumes, resp, body)
-        return service_client.ResponseBodyList(resp, body['volumes'])
-
-    def get_volume(self, volume_id):
+    def show_volume(self, volume_id):
         """Returns the details of a single volume."""
-        url = "os-volumes/%s" % str(volume_id)
+        url = "os-volumes/%s" % volume_id
         resp, body = self.get(url)
         body = json.loads(body)
         self.validate_response(schema.create_get_volume, resp, body)
@@ -85,19 +77,19 @@
 
     def delete_volume(self, volume_id):
         """Deletes the Specified Volume."""
-        resp, body = self.delete("os-volumes/%s" % str(volume_id))
+        resp, body = self.delete("os-volumes/%s" % volume_id)
         self.validate_response(schema.delete_volume, resp, body)
         return service_client.ResponseBody(resp, body)
 
     def wait_for_volume_status(self, volume_id, status):
         """Waits for a Volume to reach a given status."""
-        body = self.get_volume(volume_id)
+        body = self.show_volume(volume_id)
         volume_status = body['status']
         start = int(time.time())
 
         while volume_status != status:
             time.sleep(self.build_interval)
-            body = self.get_volume(volume_id)
+            body = self.show_volume(volume_id)
             volume_status = body['status']
             if volume_status == 'error':
                 raise exceptions.VolumeBuildErrorException(volume_id=volume_id)
@@ -111,7 +103,7 @@
 
     def is_resource_deleted(self, id):
         try:
-            self.get_volume(id)
+            self.show_volume(id)
         except lib_exc.NotFound:
             return True
         return False
diff --git a/tempest/services/identity/v2/json/identity_client.py b/tempest/services/identity/v2/json/identity_client.py
index c5f7338..deb7605 100644
--- a/tempest/services/identity/v2/json/identity_client.py
+++ b/tempest/services/identity/v2/json/identity_client.py
@@ -17,6 +17,7 @@
 
 
 class IdentityClientJSON(service_client.ServiceClient):
+    api_version = "v2.0"
 
     def get_api_description(self):
         """Retrieves info about the v2.0 Identity API"""
diff --git a/tempest/tests/common/utils/linux/test_remote_client.py b/tempest/tests/common/utils/linux/test_remote_client.py
index 3506856..3ff8e0d 100644
--- a/tempest/tests/common/utils/linux/test_remote_client.py
+++ b/tempest/tests/common/utils/linux/test_remote_client.py
@@ -28,9 +28,9 @@
         super(TestRemoteClient, self).setUp()
         self.useFixture(fake_config.ConfigFixture())
         self.stubs.Set(config, 'TempestConfigPrivate', fake_config.FakePrivate)
-        cfg.CONF.set_default('ip_version_for_ssh', 4, group='compute')
+        cfg.CONF.set_default('ip_version_for_ssh', 4, group='validation')
         cfg.CONF.set_default('network_for_ssh', 'public', group='compute')
-        cfg.CONF.set_default('ssh_channel_timeout', 1, group='compute')
+        cfg.CONF.set_default('connect_timeout', 1, group='validation')
 
         self.conn = remote_client.RemoteClient('127.0.0.1', 'user', 'pass')
         self.ssh_mock = self.useFixture(mockpatch.PatchObject(self.conn,
@@ -79,8 +79,7 @@
     def test_get_number_of_vcpus(self):
         self.ssh_mock.mock.exec_command.return_value = '16'
         self.assertEqual(self.conn.get_number_of_vcpus(), 16)
-        self._assert_exec_called_with(
-            'cat /proc/cpuinfo | grep processor | wc -l')
+        self._assert_exec_called_with('grep -c processor /proc/cpuinfo')
 
     def test_get_partitions(self):
         proc_partitions = """major minor  #blocks  name
