diff --git a/tempest/api/compute/admin/test_aggregates.py b/tempest/api/compute/admin/test_aggregates.py
index 3553ce7..4d05ff7 100644
--- a/tempest/api/compute/admin/test_aggregates.py
+++ b/tempest/api/compute/admin/test_aggregates.py
@@ -223,5 +223,5 @@
         server = self.create_test_server(name=server_name,
                                          availability_zone=az_name,
                                          wait_until='ACTIVE')
-        body = admin_servers_client.show_server(server['id'])
+        body = admin_servers_client.show_server(server['id'])['server']
         self.assertEqual(self.host, body[self._host_key])
diff --git a/tempest/api/compute/admin/test_fixed_ips.py b/tempest/api/compute/admin/test_fixed_ips.py
index 669585c..9cda0cd 100644
--- a/tempest/api/compute/admin/test_fixed_ips.py
+++ b/tempest/api/compute/admin/test_fixed_ips.py
@@ -38,7 +38,7 @@
     def resource_setup(cls):
         super(FixedIPsTestJson, cls).resource_setup()
         server = cls.create_test_server(wait_until='ACTIVE')
-        server = cls.servers_client.show_server(server['id'])
+        server = cls.servers_client.show_server(server['id'])['server']
         for ip_set in server['addresses']:
             for ip in server['addresses'][ip_set]:
                 if ip['OS-EXT-IPS:type'] == 'fixed':
diff --git a/tempest/api/compute/admin/test_fixed_ips_negative.py b/tempest/api/compute/admin/test_fixed_ips_negative.py
index e67936c..8d745c9 100644
--- a/tempest/api/compute/admin/test_fixed_ips_negative.py
+++ b/tempest/api/compute/admin/test_fixed_ips_negative.py
@@ -40,7 +40,7 @@
     def resource_setup(cls):
         super(FixedIPsNegativeTestJson, cls).resource_setup()
         server = cls.create_test_server(wait_until='ACTIVE')
-        server = cls.servers_client.show_server(server['id'])
+        server = cls.servers_client.show_server(server['id'])['server']
         for ip_set in server['addresses']:
             for ip in server['addresses'][ip_set]:
                 if ip['OS-EXT-IPS:type'] == 'fixed':
diff --git a/tempest/api/compute/admin/test_live_migration.py b/tempest/api/compute/admin/test_live_migration.py
index 410f7b7..9d49124 100644
--- a/tempest/api/compute/admin/test_live_migration.py
+++ b/tempest/api/compute/admin/test_live_migration.py
@@ -49,7 +49,7 @@
         ]
 
     def _get_server_details(self, server_id):
-        body = self.admin_servers_client.show_server(server_id)
+        body = self.admin_servers_client.show_server(server_id)['server']
         return body
 
     def _get_host_for_server(self, server_id):
diff --git a/tempest/api/compute/admin/test_servers.py b/tempest/api/compute/admin/test_servers.py
index 0528fa5..1849f83 100644
--- a/tempest/api/compute/admin/test_servers.py
+++ b/tempest/api/compute/admin/test_servers.py
@@ -66,7 +66,7 @@
         # Reset server's state to 'active'
         self.client.reset_state(self.s1_id, state='active')
         # Verify server's state
-        server = self.client.show_server(self.s1_id)
+        server = self.client.show_server(self.s1_id)['server']
         self.assertEqual(server['status'], 'ACTIVE')
         servers = body['servers']
         # Verify error server in list result
@@ -112,11 +112,11 @@
         network = self.get_tenant_network()
         network_kwargs = fixed_network.set_networks_kwarg(network)
         test_server = self.client.create_server(name, image_id, flavor,
-                                                **network_kwargs)
+                                                **network_kwargs)['server']
         self.addCleanup(self.client.delete_server, test_server['id'])
         waiters.wait_for_server_status(self.client,
                                        test_server['id'], 'ACTIVE')
-        server = self.client.show_server(test_server['id'])
+        server = self.client.show_server(test_server['id'])['server']
         self.assertEqual(server['status'], 'ACTIVE')
         hostname = server[self._host_key]
         params = {'host': hostname}
@@ -135,14 +135,14 @@
         self.client.reset_state(self.s1_id)
 
         # Verify server's state
-        server = self.client.show_server(self.s1_id)
+        server = self.client.show_server(self.s1_id)['server']
         self.assertEqual(server['status'], 'ERROR')
 
         # Reset server's state to 'active'
         self.client.reset_state(self.s1_id, state='active')
 
         # Verify server's state
-        server = self.client.show_server(self.s1_id)
+        server = self.client.show_server(self.s1_id)['server']
         self.assertEqual(server['status'], 'ACTIVE')
 
     @decorators.skip_because(bug="1240043")
@@ -164,7 +164,7 @@
         # resetting vm state require admin privilege
         self.client.reset_state(self.s1_id, state='error')
         rebuilt_server = self.non_admin_client.rebuild_server(
-            self.s1_id, self.image_ref_alt)
+            self.s1_id, self.image_ref_alt)['server']
         self.addCleanup(waiters.wait_for_server_status, self.non_admin_client,
                         self.s1_id, 'ACTIVE')
         self.addCleanup(self.non_admin_client.rebuild_server, self.s1_id,
@@ -179,7 +179,8 @@
                                        rebuilt_server['id'], 'ACTIVE',
                                        raise_on_error=False)
         # Verify the server properties after rebuilding
-        server = self.non_admin_client.show_server(rebuilt_server['id'])
+        server = (self.non_admin_client.show_server(rebuilt_server['id'])
+                  ['server'])
         rebuilt_image_id = server['image']['id']
         self.assertEqual(self.image_ref_alt, rebuilt_image_id)
 
diff --git a/tempest/api/compute/base.py b/tempest/api/compute/base.py
index 1f53f9a..8d68986 100644
--- a/tempest/api/compute/base.py
+++ b/tempest/api/compute/base.py
@@ -75,6 +75,7 @@
         cls.networks_client = cls.os.networks_client
         cls.limits_client = cls.os.limits_client
         cls.volumes_extensions_client = cls.os.volumes_extensions_client
+        cls.snapshots_extensions_client = cls.os.snapshots_extensions_client
         cls.interfaces_client = cls.os.interfaces_client
         cls.fixed_ips_client = cls.os.fixed_ips_client
         cls.availability_zone_client = cls.os.availability_zone_client
diff --git a/tempest/api/compute/security_groups/test_security_group_rules.py b/tempest/api/compute/security_groups/test_security_group_rules.py
index 3c22d28..9aa59f7 100644
--- a/tempest/api/compute/security_groups/test_security_group_rules.py
+++ b/tempest/api/compute/security_groups/test_security_group_rules.py
@@ -161,8 +161,8 @@
         self.addCleanup(self.client.delete_security_group_rule, rule2_id)
 
         # Get rules of the created Security Group
-        rules = (self.client.list_security_group_rules(securitygroup_id)
-                 ['rules'])
+        rules = self.security_groups_client.show_security_group(
+            securitygroup_id)['security_group']['rules']
         self.assertTrue(any([i for i in rules if i['id'] == rule1_id]))
         self.assertTrue(any([i for i in rules if i['id'] == rule2_id]))
 
@@ -187,6 +187,7 @@
         # Delete group2
         self.security_groups_client.delete_security_group(sg2_id)
         # Get rules of the Group1
-        rules = self.client.list_security_group_rules(sg1_id)['rules']
+        rules = (self.security_groups_client.show_security_group(sg1_id)
+                 ['security_group']['rules'])
         # The group1 has no rules because group2 has deleted
         self.assertEqual(0, len(rules))
diff --git a/tempest/api/compute/servers/test_attach_interfaces.py b/tempest/api/compute/servers/test_attach_interfaces.py
index dcdb562..530e422 100644
--- a/tempest/api/compute/servers/test_attach_interfaces.py
+++ b/tempest/api/compute/servers/test_attach_interfaces.py
@@ -189,7 +189,7 @@
         self.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['id'])['server']
         # Get the Fixed IP from server.
         fixed_ip = None
         for ip_set in server_detail['addresses']:
diff --git a/tempest/api/compute/servers/test_create_server.py b/tempest/api/compute/servers/test_create_server.py
index 529b596..419bfd7 100644
--- a/tempest/api/compute/servers/test_create_server.py
+++ b/tempest/api/compute/servers/test_create_server.py
@@ -64,7 +64,8 @@
             personality=personality,
             disk_config=disk_config)
         cls.password = cls.server_initial['adminPass']
-        cls.server = cls.client.show_server(cls.server_initial['id'])
+        cls.server = (cls.client.show_server(cls.server_initial['id'])
+                      ['server'])
 
     def _create_net_subnet_ret_net_from_cidr(self, cidr):
         name_net = data_utils.rand_name(self.__class__.__name__)
@@ -185,7 +186,8 @@
 
         self.addCleanup(cleanup_server)
 
-        addresses = self.client.list_addresses(server_multi_nics['id'])
+        addresses = (self.client.list_addresses(server_multi_nics['id'])
+                     ['addresses'])
 
         # We can't predict the ip addresses assigned to the server on networks.
         # Sometimes the assigned addresses are ['19.80.0.2', '19.86.0.2'], at
@@ -226,7 +228,8 @@
 
         self.addCleanup(cleanup_server)
 
-        addresses = self.client.list_addresses(server_multi_nics['id'])
+        addresses = (self.client.list_addresses(server_multi_nics['id'])
+                     ['addresses'])
 
         addr = [addresses[net1['network']['name']][0]['addr'],
                 addresses[net2['network']['name']][0]['addr'],
@@ -315,7 +318,7 @@
 
         # Get partition number of server without extra specs.
         server_no_eph_disk = self.client.show_server(
-            server_no_eph_disk['id'])
+            server_no_eph_disk['id'])['server']
         linux_client = remote_client.RemoteClient(
             self.get_server_ip(server_no_eph_disk),
             self.ssh_user,
@@ -333,7 +336,7 @@
             flavor=flavor_with_eph_disk_id)
 
         server_with_eph_disk = self.client.show_server(
-            server_with_eph_disk['id'])
+            server_with_eph_disk['id'])['server']
         linux_client = remote_client.RemoteClient(
             self.get_server_ip(server_with_eph_disk),
             self.ssh_user,
diff --git a/tempest/api/compute/servers/test_delete_server.py b/tempest/api/compute/servers/test_delete_server.py
index 5d461ab..6796bb5 100644
--- a/tempest/api/compute/servers/test_delete_server.py
+++ b/tempest/api/compute/servers/test_delete_server.py
@@ -150,7 +150,7 @@
         server = self.create_test_server(wait_until='ACTIVE')
         self.admin_client.reset_state(server['id'], state='error')
         # Verify server's state
-        server = self.non_admin_client.show_server(server['id'])
+        server = self.non_admin_client.show_server(server['id'])['server']
         self.assertEqual(server['status'], 'ERROR')
         self.non_admin_client.delete_server(server['id'])
         waiters.wait_for_server_termination(self.servers_client,
diff --git a/tempest/api/compute/servers/test_disk_config.py b/tempest/api/compute/servers/test_disk_config.py
index 929b300..617cdd5 100644
--- a/tempest/api/compute/servers/test_disk_config.py
+++ b/tempest/api/compute/servers/test_disk_config.py
@@ -44,12 +44,12 @@
         cls.server_id = server['id']
 
     def _update_server_with_disk_config(self, disk_config):
-        server = self.client.show_server(self.server_id)
+        server = self.client.show_server(self.server_id)['server']
         if disk_config != server['OS-DCF:diskConfig']:
-            server = self.client.update_server(self.server_id,
-                                               disk_config=disk_config)
+            server = self.client.update_server(
+                self.server_id, disk_config=disk_config)['server']
             waiters.wait_for_server_status(self.client, server['id'], 'ACTIVE')
-            server = self.client.show_server(server['id'])
+            server = self.client.show_server(server['id'])['server']
             self.assertEqual(disk_config, server['OS-DCF:diskConfig'])
 
     @test.idempotent_id('bef56b09-2e8c-4883-a370-4950812f430e')
@@ -59,13 +59,13 @@
 
         server = self.client.rebuild_server(self.server_id,
                                             self.image_ref_alt,
-                                            disk_config='MANUAL')
+                                            disk_config='MANUAL')['server']
 
         # Wait for the server to become active
         waiters.wait_for_server_status(self.client, server['id'], 'ACTIVE')
 
         # Verify the specified attributes are set correctly
-        server = self.client.show_server(server['id'])
+        server = self.client.show_server(server['id'])['server']
         self.assertEqual('MANUAL', server['OS-DCF:diskConfig'])
 
     @test.idempotent_id('9c9fae77-4feb-402f-8450-bf1c8b609713')
@@ -75,17 +75,17 @@
 
         server = self.client.rebuild_server(self.server_id,
                                             self.image_ref_alt,
-                                            disk_config='AUTO')
+                                            disk_config='AUTO')['server']
 
         # Wait for the server to become active
         waiters.wait_for_server_status(self.client, server['id'], 'ACTIVE')
 
         # Verify the specified attributes are set correctly
-        server = self.client.show_server(server['id'])
+        server = self.client.show_server(server['id'])['server']
         self.assertEqual('AUTO', server['OS-DCF:diskConfig'])
 
     def _get_alternative_flavor(self):
-        server = self.client.show_server(self.server_id)
+        server = self.client.show_server(self.server_id)['server']
 
         if server['flavor']['id'] == self.flavor_ref:
             return self.flavor_ref_alt
@@ -108,7 +108,7 @@
         self.client.confirm_resize_server(self.server_id)
         waiters.wait_for_server_status(self.client, self.server_id, 'ACTIVE')
 
-        server = self.client.show_server(self.server_id)
+        server = self.client.show_server(self.server_id)['server']
         self.assertEqual('AUTO', server['OS-DCF:diskConfig'])
 
     @test.idempotent_id('693d16f3-556c-489a-8bac-3d0ca2490bad')
@@ -127,7 +127,7 @@
         self.client.confirm_resize_server(self.server_id)
         waiters.wait_for_server_status(self.client, self.server_id, 'ACTIVE')
 
-        server = self.client.show_server(self.server_id)
+        server = self.client.show_server(self.server_id)['server']
         self.assertEqual('MANUAL', server['OS-DCF:diskConfig'])
 
     @test.idempotent_id('5ef18867-358d-4de9-b3c9-94d4ba35742f')
@@ -137,9 +137,9 @@
 
         # Update the disk_config attribute to manual
         server = self.client.update_server(self.server_id,
-                                           disk_config='MANUAL')
+                                           disk_config='MANUAL')['server']
         waiters.wait_for_server_status(self.client, server['id'], 'ACTIVE')
 
         # Verify the disk_config attribute is set correctly
-        server = self.client.show_server(server['id'])
+        server = self.client.show_server(server['id'])['server']
         self.assertEqual('MANUAL', server['OS-DCF:diskConfig'])
diff --git a/tempest/api/compute/servers/test_instance_actions.py b/tempest/api/compute/servers/test_instance_actions.py
index 4ac1a49..97d47fd 100644
--- a/tempest/api/compute/servers/test_instance_actions.py
+++ b/tempest/api/compute/servers/test_instance_actions.py
@@ -38,7 +38,8 @@
         self.client.reboot_server(self.server_id, 'HARD')
         waiters.wait_for_server_status(self.client, self.server_id, 'ACTIVE')
 
-        body = self.client.list_instance_actions(self.server_id)
+        body = (self.client.list_instance_actions(self.server_id)
+                ['instanceActions'])
         self.assertTrue(len(body) == 2, str(body))
         self.assertTrue(any([i for i in body if i['action'] == 'create']))
         self.assertTrue(any([i for i in body if i['action'] == 'reboot']))
@@ -46,7 +47,7 @@
     @test.idempotent_id('aacc71ca-1d70-4aa5-bbf6-0ff71470e43c')
     def test_get_instance_action(self):
         # Get the action details of the provided server
-        body = self.client.get_instance_action(self.server_id,
-                                               self.request_id)
+        body = self.client.get_instance_action(
+            self.server_id, self.request_id)['instanceAction']
         self.assertEqual(self.server_id, body['instance_uuid'])
         self.assertEqual('create', body['action'])
diff --git a/tempest/api/compute/servers/test_list_server_filters.py b/tempest/api/compute/servers/test_list_server_filters.py
index 16e4392..3acff98 100644
--- a/tempest/api/compute/servers/test_list_server_filters.py
+++ b/tempest/api/compute/servers/test_list_server_filters.py
@@ -274,7 +274,7 @@
         if not self.fixed_network_name:
             msg = 'fixed_network_name needs to be configured to run this test'
             raise self.skipException(msg)
-        self.s1 = self.client.show_server(self.s1['id'])
+        self.s1 = self.client.show_server(self.s1['id'])['server']
         for addr_spec in self.s1['addresses'][self.fixed_network_name]:
             ip = addr_spec['addr']
             if addr_spec['version'] == 4:
@@ -298,7 +298,7 @@
         if not self.fixed_network_name:
             msg = 'fixed_network_name needs to be configured to run this test'
             raise self.skipException(msg)
-        self.s1 = self.client.show_server(self.s1['id'])
+        self.s1 = self.client.show_server(self.s1['id'])['server']
         addr_spec = self.s1['addresses'][self.fixed_network_name][0]
         ip = addr_spec['addr'][0:-3]
         if addr_spec['version'] == 4:
diff --git a/tempest/api/compute/servers/test_server_actions.py b/tempest/api/compute/servers/test_server_actions.py
index 47629c0..c394e44 100644
--- a/tempest/api/compute/servers/test_server_actions.py
+++ b/tempest/api/compute/servers/test_server_actions.py
@@ -52,8 +52,8 @@
             self.__class__.server_id = server['id']
         except Exception:
             # Rebuild server if something happened to it during a test
-            self.__class__.server_id = self.rebuild_server(self.server_id,
-                                                           validatable=True)
+            self.__class__.server_id = self.rebuild_server(
+                self.server_id, validatable=True)['server']
 
     def tearDown(self):
         self.server_check_teardown()
@@ -87,7 +87,7 @@
 
         if CONF.validation.run_validation:
             # Verify that the user can authenticate with the new password
-            server = self.client.show_server(self.server_id)
+            server = self.client.show_server(self.server_id)['server']
             linux_client = remote_client.RemoteClient(
                 self.get_server_ip(server),
                 self.ssh_user,
@@ -97,7 +97,7 @@
     def _test_reboot_server(self, reboot_type):
         if CONF.validation.run_validation:
             # Get the time the server was last rebooted,
-            server = self.client.show_server(self.server_id)
+            server = self.client.show_server(self.server_id)['server']
             linux_client = remote_client.RemoteClient(
                 self.get_server_ip(server),
                 self.ssh_user,
@@ -132,7 +132,8 @@
         self._test_reboot_server('SOFT')
 
     def _rebuild_server_and_check(self, image_ref):
-        rebuilt_server = self.client.rebuild_server(self.server_id, image_ref)
+        rebuilt_server = (self.client.rebuild_server(self.server_id, image_ref)
+                          ['server'])
         waiters.wait_for_server_status(self.client, self.server_id, 'ACTIVE')
         msg = ('Server was not rebuilt to the original image. '
                'The original image: {0}. The current image: {1}'
@@ -148,12 +149,13 @@
         personality = [{'path': 'rebuild.txt',
                        'contents': base64.b64encode(file_contents)}]
         password = 'rebuildPassw0rd'
-        rebuilt_server = self.client.rebuild_server(self.server_id,
-                                                    self.image_ref_alt,
-                                                    name=new_name,
-                                                    metadata=meta,
-                                                    personality=personality,
-                                                    adminPass=password)
+        rebuilt_server = self.client.rebuild_server(
+            self.server_id,
+            self.image_ref_alt,
+            name=new_name,
+            metadata=meta,
+            personality=personality,
+            adminPass=password)['server']
 
         # If the server was rebuilt on a different image, restore it to the
         # original image once the test ends
@@ -169,7 +171,7 @@
         # Verify the server properties after the rebuild completes
         waiters.wait_for_server_status(self.client,
                                        rebuilt_server['id'], 'ACTIVE')
-        server = self.client.show_server(rebuilt_server['id'])
+        server = self.client.show_server(rebuilt_server['id'])['server']
         rebuilt_image_id = server['image']['id']
         self.assertTrue(self.image_ref_alt.endswith(rebuilt_image_id))
         self.assertEqual(new_name, server['name'])
@@ -187,13 +189,14 @@
     def test_rebuild_server_in_stop_state(self):
         # The server in stop state  should be rebuilt using the provided
         # image and remain in SHUTOFF state
-        server = self.client.show_server(self.server_id)
+        server = self.client.show_server(self.server_id)['server']
         old_image = server['image']['id']
         new_image = (self.image_ref_alt
                      if old_image == self.image_ref else self.image_ref)
         self.client.stop_server(self.server_id)
         waiters.wait_for_server_status(self.client, self.server_id, 'SHUTOFF')
-        rebuilt_server = self.client.rebuild_server(self.server_id, new_image)
+        rebuilt_server = (self.client.rebuild_server(self.server_id, new_image)
+                          ['server'])
         # If the server was rebuilt on a different image, restore it to the
         # original image once the test ends
         if self.image_ref_alt != self.image_ref:
@@ -208,7 +211,7 @@
         # Verify the server properties after the rebuild completes
         waiters.wait_for_server_status(self.client,
                                        rebuilt_server['id'], 'SHUTOFF')
-        server = self.client.show_server(rebuilt_server['id'])
+        server = self.client.show_server(rebuilt_server['id'])['server']
         rebuilt_image_id = server['image']['id']
         self.assertEqual(new_image, rebuilt_image_id)
 
@@ -232,7 +235,7 @@
         waiters.wait_for_server_status(self.client, self.server_id,
                                        expected_status)
 
-        server = self.client.show_server(self.server_id)
+        server = self.client.show_server(self.server_id)['server']
         self.assertEqual(self.flavor_ref_alt, server['flavor']['id'])
 
         if stop:
@@ -269,7 +272,7 @@
         self.client.revert_resize_server(self.server_id)
         waiters.wait_for_server_status(self.client, self.server_id, 'ACTIVE')
 
-        server = self.client.show_server(self.server_id)
+        server = self.client.show_server(self.server_id)['server']
         self.assertEqual(self.flavor_ref, server['flavor']['id'])
 
     @test.idempotent_id('b963d4f1-94b3-4c40-9e97-7b583f46e470')
@@ -358,7 +361,7 @@
 
     def _get_output(self):
         output = self.client.get_console_output(
-            self.server_id, 10).data
+            self.server_id, 10)['output']
         self.assertTrue(output, "Console output was empty.")
         lines = len(output.split('\n'))
         self.assertEqual(lines, 10)
@@ -387,7 +390,7 @@
 
         def _check_full_length_console_log():
             output = self.client.get_console_output(server['id'],
-                                                    None).data
+                                                    None)['output']
             self.assertTrue(output, "Console output was empty.")
             lines = len(output.split('\n'))
 
@@ -453,7 +456,7 @@
             waiters.wait_for_server_status(self.client, self.server_id,
                                            'SHELVED_OFFLOADED')
 
-        server = self.client.show_server(self.server_id)
+        server = self.client.show_server(self.server_id)['server']
         image_name = server['name'] + '-shelved'
         params = {'name': image_name}
         images = self.images_client.list_images(**params)['images']
@@ -475,7 +478,7 @@
         # Lock the server,try server stop(exceptions throw),unlock it and retry
         self.client.lock_server(self.server_id)
         self.addCleanup(self.client.unlock_server, self.server_id)
-        server = self.client.show_server(self.server_id)
+        server = self.client.show_server(self.server_id)['server']
         self.assertEqual(server['status'], 'ACTIVE')
         # Locked server is not allowed to be stopped by non-admin user
         self.assertRaises(lib_exc.Conflict,
@@ -501,7 +504,7 @@
         console_types = ['novnc', 'xvpvnc']
         for console_type in console_types:
             body = self.client.get_vnc_console(self.server_id,
-                                               console_type)
+                                               console_type)['console']
             self.assertEqual(console_type, body['type'])
             self.assertNotEqual('', body['url'])
             self._validate_url(body['url'])
diff --git a/tempest/api/compute/servers/test_server_addresses.py b/tempest/api/compute/servers/test_server_addresses.py
index a17f581..864f38f 100644
--- a/tempest/api/compute/servers/test_server_addresses.py
+++ b/tempest/api/compute/servers/test_server_addresses.py
@@ -45,7 +45,7 @@
         # All public and private addresses for
         # a server should be returned
 
-        addresses = self.client.list_addresses(self.server['id'])
+        addresses = self.client.list_addresses(self.server['id'])['addresses']
 
         # We do not know the exact network configuration, but an instance
         # should at least have a single public or private address
@@ -63,7 +63,7 @@
         # Providing a network type should filter
         # the addresses return by that type
 
-        addresses = self.client.list_addresses(self.server['id'])
+        addresses = self.client.list_addresses(self.server['id'])['addresses']
 
         # Once again we don't know the environment's exact network config,
         # but the response for each individual network should be the same
diff --git a/tempest/api/compute/servers/test_server_metadata.py b/tempest/api/compute/servers/test_server_metadata.py
index 234633b..f9e8b4f 100644
--- a/tempest/api/compute/servers/test_server_metadata.py
+++ b/tempest/api/compute/servers/test_server_metadata.py
@@ -34,12 +34,13 @@
     def setUp(self):
         super(ServerMetadataTestJSON, self).setUp()
         meta = {'key1': 'value1', 'key2': 'value2'}
-        self.client.set_server_metadata(self.server_id, meta)
+        self.client.set_server_metadata(self.server_id, meta)['metadata']
 
     @test.idempotent_id('479da087-92b3-4dcf-aeb3-fd293b2d14ce')
     def test_list_server_metadata(self):
         # All metadata key/value pairs for a server should be returned
-        resp_metadata = self.client.list_server_metadata(self.server_id)
+        resp_metadata = (self.client.list_server_metadata(self.server_id)
+                         ['metadata'])
 
         # Verify the expected metadata items are in the list
         expected = {'key1': 'value1', 'key2': 'value2'}
@@ -50,11 +51,13 @@
         # The server's metadata should be replaced with the provided values
         # Create a new set of metadata for the server
         req_metadata = {'meta2': 'data2', 'meta3': 'data3'}
-        self.client.set_server_metadata(self.server_id, req_metadata)
+        self.client.set_server_metadata(self.server_id,
+                                        req_metadata)['metadata']
 
         # Verify the expected values are correct, and that the
         # previous values have been removed
-        resp_metadata = self.client.list_server_metadata(self.server_id)
+        resp_metadata = (self.client.list_server_metadata(self.server_id)
+                         ['metadata'])
         self.assertEqual(resp_metadata, req_metadata)
 
     @test.idempotent_id('344d981e-0c33-4997-8a5d-6c1d803e4134')
@@ -65,7 +68,8 @@
         self.client.update_server_metadata(self.server_id, meta)
 
         # Verify the values have been updated to the proper values
-        resp_metadata = self.client.list_server_metadata(self.server_id)
+        resp_metadata = (self.client.list_server_metadata(self.server_id)
+                         ['metadata'])
         expected = {'key1': 'alt1', 'key2': 'value2', 'key3': 'value3'}
         self.assertEqual(expected, resp_metadata)
 
@@ -75,14 +79,16 @@
         # passed
         meta = {}
         self.client.update_server_metadata(self.server_id, meta)
-        resp_metadata = self.client.list_server_metadata(self.server_id)
+        resp_metadata = (self.client.list_server_metadata(self.server_id)
+                         ['metadata'])
         expected = {'key1': 'value1', 'key2': 'value2'}
         self.assertEqual(expected, resp_metadata)
 
     @test.idempotent_id('3043c57d-7e0e-49a6-9a96-ad569c265e6a')
     def test_get_server_metadata_item(self):
         # The value for a specific metadata key should be returned
-        meta = self.client.get_server_metadata_item(self.server_id, 'key2')
+        meta = self.client.get_server_metadata_item(self.server_id,
+                                                    'key2')['meta']
         self.assertEqual('value2', meta['key2'])
 
     @test.idempotent_id('58c02d4f-5c67-40be-8744-d3fa5982eb1c')
@@ -93,7 +99,8 @@
         self.client.set_server_metadata_item(self.server_id, 'nova', meta)
 
         # Verify the meta item's value has been updated
-        resp_metadata = self.client.list_server_metadata(self.server_id)
+        resp_metadata = (self.client.list_server_metadata(self.server_id)
+                         ['metadata'])
         expected = {'key1': 'value1', 'key2': 'value2', 'nova': 'alt'}
         self.assertEqual(expected, resp_metadata)
 
@@ -103,6 +110,7 @@
         self.client.delete_server_metadata_item(self.server_id, 'key1')
 
         # Verify the metadata item has been removed
-        resp_metadata = self.client.list_server_metadata(self.server_id)
+        resp_metadata = (self.client.list_server_metadata(self.server_id)
+                         ['metadata'])
         expected = {'key2': 'value2'}
         self.assertEqual(expected, resp_metadata)
diff --git a/tempest/api/compute/servers/test_servers.py b/tempest/api/compute/servers/test_servers.py
index 8cfb670..d2fb652 100644
--- a/tempest/api/compute/servers/test_servers.py
+++ b/tempest/api/compute/servers/test_servers.py
@@ -52,9 +52,9 @@
                                          wait_until='ACTIVE')
         id2 = server['id']
         self.assertNotEqual(id1, id2, "Did not create a new server")
-        server = self.client.show_server(id1)
+        server = self.client.show_server(id1)['server']
         name1 = server['name']
-        server = self.client.show_server(id2)
+        server = self.client.show_server(id2)['server']
         name2 = server['name']
         self.assertEqual(name1, name2)
 
@@ -68,7 +68,7 @@
         self.keypairs_client.list_keypairs()
         server = self.create_test_server(key_name=key_name)
         waiters.wait_for_server_status(self.client, server['id'], 'ACTIVE')
-        server = self.client.show_server(server['id'])
+        server = self.client.show_server(server['id'])['server']
         self.assertEqual(key_name, server['key_name'])
 
     def _update_server_name(self, server_id, status):
@@ -80,7 +80,7 @@
         waiters.wait_for_server_status(self.client, server_id, status)
 
         # Verify the name of the server has changed
-        server = self.client.show_server(server_id)
+        server = self.client.show_server(server_id)['server']
         self.assertEqual(new_name, server['name'])
         return server
 
@@ -112,7 +112,7 @@
         waiters.wait_for_server_status(self.client, server['id'], 'ACTIVE')
 
         # Verify the access addresses have been updated
-        server = self.client.show_server(server['id'])
+        server = self.client.show_server(server['id'])['server']
         self.assertEqual('1.1.1.1', server['accessIPv4'])
         self.assertEqual('::babe:202:202', server['accessIPv6'])
 
@@ -121,5 +121,5 @@
         # Create a server without an IPv4 address(only IPv6 address).
         server = self.create_test_server(accessIPv6='2001:2001::3')
         waiters.wait_for_server_status(self.client, server['id'], 'ACTIVE')
-        server = self.client.show_server(server['id'])
+        server = self.client.show_server(server['id'])['server']
         self.assertEqual('2001:2001::3', server['accessIPv6'])
diff --git a/tempest/api/compute/servers/test_servers_negative.py b/tempest/api/compute/servers/test_servers_negative.py
index d5b60da..dbaa6a1 100644
--- a/tempest/api/compute/servers/test_servers_negative.py
+++ b/tempest/api/compute/servers/test_servers_negative.py
@@ -476,7 +476,7 @@
                                            self.server_id,
                                            'SHELVED')
 
-        server = self.client.show_server(self.server_id)
+        server = self.client.show_server(self.server_id)['server']
         image_name = server['name'] + '-shelved'
         params = {'name': image_name}
         images = self.images_client.list_images(**params)['images']
diff --git a/tempest/api/compute/test_authorization.py b/tempest/api/compute/test_authorization.py
index b5a24c7..e60874f 100644
--- a/tempest/api/compute/test_authorization.py
+++ b/tempest/api/compute/test_authorization.py
@@ -64,7 +64,7 @@
     def resource_setup(cls):
         super(AuthorizationTestJSON, cls).resource_setup()
         server = cls.create_test_server(wait_until='ACTIVE')
-        cls.server = cls.client.show_server(server['id'])
+        cls.server = cls.client.show_server(server['id'])['server']
 
         name = data_utils.rand_name('image')
         body = cls.glance_client.create_image(name=name,
diff --git a/tempest/api/compute/volumes/test_attach_volume.py b/tempest/api/compute/volumes/test_attach_volume.py
index ba34039..ab4ddf7 100644
--- a/tempest/api/compute/volumes/test_attach_volume.py
+++ b/tempest/api/compute/volumes/test_attach_volume.py
@@ -70,8 +70,8 @@
             adminPass=admin_pass)
 
         # Record addresses so that we can ssh later
-        self.server['addresses'] = (
-            self.servers_client.list_addresses(self.server['id']))
+        self.server['addresses'] = self.servers_client.list_addresses(
+            self.server['id'])['addresses']
 
         # Create a volume and wait for it to become ready
         self.volume = self.volumes_client.create_volume(
@@ -84,7 +84,7 @@
         self.attachment = self.servers_client.attach_volume(
             self.server['id'],
             volumeId=self.volume['id'],
-            device='/dev/%s' % self.device)
+            device='/dev/%s' % self.device)['volumeAttachment']
         self.volumes_client.wait_for_volume_status(self.volume['id'], 'in-use')
 
         self.addCleanup(self._detach, self.server['id'], self.volume['id'])
@@ -139,14 +139,14 @@
         self._create_and_attach()
         # List Volume attachment of the server
         body = self.servers_client.list_volume_attachments(
-            self.server['id'])
+            self.server['id'])['volumeAttachments']
         self.assertEqual(1, len(body))
         self.assertIn(self.attachment, body)
 
         # Get Volume attachment of the server
         body = self.servers_client.get_volume_attachment(
             self.server['id'],
-            self.attachment['id'])
+            self.attachment['id'])['volumeAttachment']
         self.assertEqual(self.server['id'], body['serverId'])
         self.assertEqual(self.volume['id'], body['volumeId'])
         self.assertEqual(self.attachment['id'], body['id'])
diff --git a/tempest/api/compute/volumes/test_volume_snapshots.py b/tempest/api/compute/volumes/test_volume_snapshots.py
new file mode 100644
index 0000000..a00c0ba
--- /dev/null
+++ b/tempest/api/compute/volumes/test_volume_snapshots.py
@@ -0,0 +1,73 @@
+# Copyright 2015 Fujitsu(fnst) Corporation
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+from tempest.api.compute import base
+from tempest.common.utils import data_utils
+from tempest.common import waiters
+from tempest import config
+from tempest import test
+
+
+CONF = config.CONF
+
+
+class VolumesSnapshotsTestJSON(base.BaseV2ComputeTest):
+
+    @classmethod
+    def skip_checks(cls):
+        super(VolumesSnapshotsTestJSON, cls).skip_checks()
+        if not CONF.service_available.cinder:
+            skip_msg = ("%s skipped as Cinder is not available" % cls.__name__)
+            raise cls.skipException(skip_msg)
+
+    @classmethod
+    def setup_clients(cls):
+        super(VolumesSnapshotsTestJSON, cls).setup_clients()
+        cls.volumes_client = cls.volumes_extensions_client
+        cls.snapshots_client = cls.snapshots_extensions_client
+
+    @test.idempotent_id('cd4ec87d-7825-450d-8040-6e2068f2da8f')
+    def test_volume_snapshot_create_get_list_delete(self):
+        v_name = data_utils.rand_name('Volume')
+        volume = self.volumes_client.create_volume(
+            size=CONF.volume.volume_size,
+            display_name=v_name)['volume']
+        self.addCleanup(self.delete_volume, volume['id'])
+        waiters.wait_for_volume_status(self.volumes_client, volume['id'],
+                                       'available')
+        s_name = data_utils.rand_name('Snapshot')
+        # Create snapshot
+        snapshot = self.snapshots_client.create_snapshot(
+            volume['id'],
+            display_name=s_name)['snapshot']
+
+        def delete_snapshot(snapshot_id):
+            waiters.wait_for_snapshot_status(self.snapshots_client,
+                                             snapshot_id,
+                                             'available')
+            # Delete snapshot
+            self.snapshots_client.delete_snapshot(snapshot_id)
+            self.snapshots_client.wait_for_resource_deletion(snapshot_id)
+
+        self.addCleanup(delete_snapshot, snapshot['id'])
+        self.assertEqual(volume['id'], snapshot['volumeId'])
+        # Get snapshot
+        fetched_snapshot = self.snapshots_client.show_snapshot(
+            snapshot['id'])['snapshot']
+        self.assertEqual(s_name, fetched_snapshot['displayName'])
+        self.assertEqual(volume['id'], fetched_snapshot['volumeId'])
+        # Fetch all snapshots
+        snapshots = self.snapshots_client.list_snapshots()['snapshots']
+        self.assertIn(snapshot['id'], map(lambda x: x['id'], snapshots))
diff --git a/tempest/api/database/flavors/test_flavors.py b/tempest/api/database/flavors/test_flavors.py
index c97ddd7..62c1e05 100644
--- a/tempest/api/database/flavors/test_flavors.py
+++ b/tempest/api/database/flavors/test_flavors.py
@@ -28,7 +28,8 @@
     @test.idempotent_id('c94b825e-0132-4686-8049-8a4a2bc09525')
     def test_get_db_flavor(self):
         # The expected flavor details should be returned
-        flavor = self.client.get_db_flavor_details(self.db_flavor_ref)
+        flavor = (self.client.get_db_flavor_details(self.db_flavor_ref)
+                  ['flavor'])
         self.assertEqual(self.db_flavor_ref, str(flavor['id']))
         self.assertIn('ram', flavor)
         self.assertIn('links', flavor)
@@ -37,9 +38,10 @@
     @test.attr(type='smoke')
     @test.idempotent_id('685025d6-0cec-4673-8a8d-995cb8e0d3bb')
     def test_list_db_flavors(self):
-        flavor = self.client.get_db_flavor_details(self.db_flavor_ref)
+        flavor = (self.client.get_db_flavor_details(self.db_flavor_ref)
+                  ['flavor'])
         # List of all flavors should contain the expected flavor
-        flavors = self.client.list_db_flavors()
+        flavors = self.client.list_db_flavors()['flavors']
         self.assertIn(flavor, flavors)
 
     def _check_values(self, names, db_flavor, os_flavor, in_db=True):
@@ -57,7 +59,7 @@
     @test.idempotent_id('afb2667f-4ec2-4925-bcb7-313fdcffb80d')
     @test.services('compute')
     def test_compare_db_flavors_with_os(self):
-        db_flavors = self.client.list_db_flavors()
+        db_flavors = self.client.list_db_flavors()['flavors']
         os_flavors = (self.os_flavors_client.list_flavors(detail=True)
                       ['flavors'])
         self.assertEqual(len(os_flavors), len(db_flavors),
@@ -65,7 +67,7 @@
                          (os_flavors, db_flavors))
         for os_flavor in os_flavors:
             db_flavor =\
-                self.client.get_db_flavor_details(os_flavor['id'])
+                self.client.get_db_flavor_details(os_flavor['id'])['flavor']
             self._check_values(['id', 'name', 'ram'], db_flavor, os_flavor)
             self._check_values(['disk', 'vcpus', 'swap'], db_flavor, os_flavor,
                                in_db=False)
diff --git a/tempest/api/orchestration/stacks/test_neutron_resources.py b/tempest/api/orchestration/stacks/test_neutron_resources.py
index cb6d1db..8f1f0d6 100644
--- a/tempest/api/orchestration/stacks/test_neutron_resources.py
+++ b/tempest/api/orchestration/stacks/test_neutron_resources.py
@@ -87,7 +87,7 @@
                 server_id = body['physical_resource_id']
                 LOG.debug('Console output for %s', server_id)
                 output = cls.servers_client.get_console_output(
-                    server_id, None).data
+                    server_id, None)['output']
                 LOG.debug(output)
             raise e
 
@@ -184,7 +184,7 @@
     def test_created_server(self):
         """Verifies created sever."""
         server_id = self.test_resources.get('Server')['physical_resource_id']
-        server = self.servers_client.show_server(server_id)
+        server = self.servers_client.show_server(server_id)['server']
         self.assertEqual(self.keypair_name, server['key_name'])
         self.assertEqual('ACTIVE', server['status'])
         network = server['addresses'][self.neutron_basic_template['resources'][
diff --git a/tempest/api/volume/admin/test_snapshots_actions.py b/tempest/api/volume/admin/test_snapshots_actions.py
index 784f1b6..aa6bfdf 100644
--- a/tempest/api/volume/admin/test_snapshots_actions.py
+++ b/tempest/api/volume/admin/test_snapshots_actions.py
@@ -15,10 +15,18 @@
 
 from tempest.api.volume import base
 from tempest.common.utils import data_utils
+from tempest import config
 from tempest import test
 
+CONF = config.CONF
+
 
 class SnapshotsActionsV2Test(base.BaseVolumeAdminTest):
+    @classmethod
+    def skip_checks(cls):
+        super(SnapshotsActionsV2Test, cls).skip_checks()
+        if not CONF.volume_feature_enabled.snapshot:
+            raise cls.skipException("Cinder snapshot feature disabled")
 
     @classmethod
     def setup_clients(cls):
diff --git a/tempest/api/volume/test_snapshot_metadata.py b/tempest/api/volume/test_snapshot_metadata.py
index ce6ba90..e50ca95 100644
--- a/tempest/api/volume/test_snapshot_metadata.py
+++ b/tempest/api/volume/test_snapshot_metadata.py
@@ -16,10 +16,18 @@
 from testtools import matchers
 
 from tempest.api.volume import base
+from tempest import config
 from tempest import test
 
+CONF = config.CONF
+
 
 class SnapshotV2MetadataTestJSON(base.BaseVolumeTest):
+    @classmethod
+    def skip_checks(cls):
+        super(SnapshotV2MetadataTestJSON, cls).skip_checks()
+        if not CONF.volume_feature_enabled.snapshot:
+            raise cls.skipException("Cinder snapshot feature disabled")
 
     @classmethod
     def setup_clients(cls):
diff --git a/tempest/api_schema/response/compute/v2_1/snapshots.py b/tempest/api_schema/response/compute/v2_1/snapshots.py
new file mode 100644
index 0000000..01a524b
--- /dev/null
+++ b/tempest/api_schema/response/compute/v2_1/snapshots.py
@@ -0,0 +1,61 @@
+# Copyright 2015 Fujitsu(fnst) Corporation
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+common_snapshot_info = {
+    'type': 'object',
+    'properties': {
+        'id': {'type': 'string'},
+        'volumeId': {'type': 'string'},
+        'status': {'type': 'string'},
+        'size': {'type': 'integer'},
+        'createdAt': {'type': 'string'},
+        'displayName': {'type': ['string', 'null']},
+        'displayDescription': {'type': ['string', 'null']}
+    },
+    'additionalProperties': False,
+    'required': ['id', 'volumeId', 'status', 'size',
+                 'createdAt', 'displayName', 'displayDescription']
+}
+
+create_get_snapshot = {
+    'status_code': [200],
+    'response_body': {
+        'type': 'object',
+        'properties': {
+            'snapshot': common_snapshot_info
+        },
+        'additionalProperties': False,
+        'required': ['snapshot']
+    }
+}
+
+list_snapshots = {
+    'status_code': [200],
+    'response_body': {
+        'type': 'object',
+        'properties': {
+            'snapshots': {
+                'type': 'array',
+                'items': common_snapshot_info
+            }
+        },
+        'additionalProperties': False,
+        'required': ['snapshots']
+    }
+}
+
+delete_snapshot = {
+    'status_code': [202]
+}
diff --git a/tempest/clients.py b/tempest/clients.py
index c0d4585..28efd9d 100644
--- a/tempest/clients.py
+++ b/tempest/clients.py
@@ -16,8 +16,8 @@
 import copy
 
 from oslo_log import log as logging
-from tempest_lib.services.identity.v2.token_client import TokenClientJSON
-from tempest_lib.services.identity.v3.token_client import V3TokenClientJSON
+from tempest_lib.services.identity.v2.token_client import TokenClient
+from tempest_lib.services.identity.v3.token_client import V3TokenClient
 
 from tempest.common import cred_provider
 from tempest.common import negative_rest_client
@@ -73,6 +73,8 @@
     ServerGroupsClient
 from tempest.services.compute.json.servers_client import ServersClient
 from tempest.services.compute.json.services_client import ServicesClient
+from tempest.services.compute.json.snapshots_extensions_client import \
+    SnapshotsExtensionsClient
 from tempest.services.compute.json.tenant_networks_client import \
     TenantNetworksClient
 from tempest.services.compute.json.tenant_usages_client import \
@@ -325,6 +327,8 @@
             self.auth_provider, **params_volume)
         self.compute_versions_client = VersionsClient(self.auth_provider,
                                                       **params_volume)
+        self.snapshots_extensions_client = SnapshotsExtensionsClient(
+            self.auth_provider, **params_volume)
 
     def _set_database_clients(self):
         self.database_flavors_client = DatabaseFlavorsClient(
@@ -377,14 +381,14 @@
         # API version is marked as enabled
         if CONF.identity_feature_enabled.api_v2:
             if CONF.identity.uri:
-                self.token_client = TokenClientJSON(
+                self.token_client = TokenClient(
                     CONF.identity.uri, **self.default_params)
             else:
                 msg = 'Identity v2 API enabled, but no identity.uri set'
                 raise exceptions.InvalidConfiguration(msg)
         if CONF.identity_feature_enabled.api_v3:
             if CONF.identity.uri_v3:
-                self.token_v3_client = V3TokenClientJSON(
+                self.token_v3_client = V3TokenClient(
                     CONF.identity.uri_v3, **self.default_params)
             else:
                 msg = 'Identity v3 API enabled, but no identity.uri_v3 set'
diff --git a/tempest/cmd/javelin.py b/tempest/cmd/javelin.py
index 6973c87..5d06b90 100755
--- a/tempest/cmd/javelin.py
+++ b/tempest/cmd/javelin.py
@@ -457,7 +457,7 @@
                 found,
                 "Couldn't find expected server %s" % server['name'])
 
-            found = client.servers.show_server(found['id'])
+            found = client.servers.show_server(found['id'])['server']
             # validate neutron is enabled and ironic disabled:
             if (CONF.service_available.neutron and
                     not CONF.baremetal.driver_enabled):
@@ -869,7 +869,7 @@
             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'], image_id, 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/common/compute.py b/tempest/common/compute.py
index 5c4d8af..a76696e 100644
--- a/tempest/common/compute.py
+++ b/tempest/common/compute.py
@@ -18,6 +18,7 @@
 from tempest_lib.common.utils import data_utils
 
 from tempest.common import fixed_network
+from tempest.common import service_client
 from tempest.common import waiters
 from tempest import config
 
@@ -88,12 +89,15 @@
                                                 **kwargs)
 
     # handle the case of multiple servers
-    servers = [body]
+    servers = []
     if 'min_count' in kwargs or 'max_count' in kwargs:
         # Get servers created which name match with name param.
         body_servers = clients.servers_client.list_servers()
         servers = \
             [s for s in body_servers['servers'] if s['name'].startswith(name)]
+    else:
+        body = service_client.ResponseBody(body.response, body['server'])
+        servers = [body]
 
     # The name of the method to associate a floating IP to as server is too
     # long for PEP8 compliance so:
diff --git a/tempest/common/waiters.py b/tempest/common/waiters.py
index 248513e..867d3f6 100644
--- a/tempest/common/waiters.py
+++ b/tempest/common/waiters.py
@@ -34,7 +34,7 @@
 
     # NOTE(afazekas): UNKNOWN status possible on ERROR
     # or in a very early stage.
-    body = client.show_server(server_id)
+    body = client.show_server(server_id)['server']
     old_status = server_status = body['status']
     old_task_state = task_state = _get_task_state(body)
     start_time = int(time.time())
@@ -61,7 +61,7 @@
                 return
 
         time.sleep(client.build_interval)
-        body = client.show_server(server_id)
+        body = client.show_server(server_id)['server']
         server_status = body['status']
         task_state = _get_task_state(body)
         if (server_status != old_status) or (task_state != old_task_state):
@@ -102,7 +102,7 @@
     start_time = int(time.time())
     while True:
         try:
-            body = client.show_server(server_id)
+            body = client.show_server(server_id)['server']
         except lib_exc.NotFound:
             return
 
@@ -183,6 +183,27 @@
             raise exceptions.TimeoutException(message)
 
 
+def wait_for_snapshot_status(client, snapshot_id, status):
+    """Waits for a Snapshot to reach a given status."""
+    body = client.show_snapshot(snapshot_id)['snapshot']
+    snapshot_status = body['status']
+    start = int(time.time())
+
+    while snapshot_status != status:
+        time.sleep(client.build_interval)
+        body = client.show_snapshot(snapshot_id)['snapshot']
+        snapshot_status = body['status']
+        if snapshot_status == 'error':
+            raise exceptions.SnapshotBuildErrorException(
+                snapshot_id=snapshot_id)
+        if int(time.time()) - start >= client.build_timeout:
+            message = ('Snapshot %s failed to reach %s status (current %s) '
+                       'within the required time (%s s).' %
+                       (snapshot_id, status, snapshot_status,
+                        client.build_timeout))
+            raise exceptions.TimeoutException(message)
+
+
 def wait_for_bm_node_status(client, node_id, attr, status):
     """Waits for a baremetal node attribute to reach given status.
 
diff --git a/tempest/config.py b/tempest/config.py
index 295b74d..ccfcd9c 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -1143,7 +1143,7 @@
                                title='Baremetal provisioning service options',
                                help='When enabling baremetal tests, Nova '
                                     'must be configured to use the Ironic '
-                                    'driver. The following paremeters for the '
+                                    'driver. The following parameters for the '
                                     '[compute] section must be disabled: '
                                     'console_output, interface_attach, '
                                     'live_migration, pause, rescue, resize '
diff --git a/tempest/exceptions.py b/tempest/exceptions.py
index 15482ab..b3d60f6 100644
--- a/tempest/exceptions.py
+++ b/tempest/exceptions.py
@@ -64,7 +64,7 @@
 
 
 class InvalidIdentityVersion(TempestException):
-    message = "Invalid version %(identity_version) of the identity service"
+    message = "Invalid version %(identity_version)s of the identity service"
 
 
 class TimeoutException(TempestException):
diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py
index 4f113d3..d70021c 100644
--- a/tempest/scenario/manager.py
+++ b/tempest/scenario/manager.py
@@ -179,7 +179,7 @@
         LOG.debug("Creating a server (name: %s, image: %s, flavor: %s)",
                   name, image, flavor)
         server = self.servers_client.create_server(name, image, flavor,
-                                                   **create_kwargs)
+                                                   **create_kwargs)['server']
         if wait_on_delete:
             self.addCleanup(waiters.wait_for_server_termination,
                             self.servers_client,
@@ -197,7 +197,7 @@
         # The instance retrieved on creation is missing network
         # details, necessitating retrieval after it becomes active to
         # ensure correct details.
-        server = self.servers_client.show_server(server['id'])
+        server = self.servers_client.show_server(server['id'])['server']
         self.assertEqual(server['name'], name)
         return server
 
@@ -400,7 +400,7 @@
             servers = servers['servers']
         for server in servers:
             console_output = self.servers_client.get_console_output(
-                server['id'], length=None).data
+                server['id'], length=None)['output']
             LOG.debug('Console output for %s\nbody=\n%s',
                       server['id'], console_output)
 
@@ -450,7 +450,7 @@
     def nova_volume_attach(self):
         volume = self.servers_client.attach_volume(
             self.server['id'], volumeId=self.volume['id'], device='/dev/%s'
-            % CONF.compute.volume_device_name)
+            % CONF.compute.volume_device_name)['volumeAttachment']
         self.assertEqual(self.volume['id'], volume['id'])
         self.volumes_client.wait_for_volume_status(volume['id'], 'in-use')
         # Refresh the volume after the attachment
@@ -1278,7 +1278,8 @@
         waiters.wait_for_server_status(self.servers_client,
                                        self.instance['id'], 'ACTIVE')
         self.node = self.get_node(instance_id=self.instance['id'])
-        self.instance = self.servers_client.show_server(self.instance['id'])
+        self.instance = (self.servers_client.show_server(self.instance['id'])
+                         ['server'])
 
     def terminate_instance(self):
         self.servers_client.delete_server(self.instance['id'])
diff --git a/tempest/scenario/test_minimum_basic.py b/tempest/scenario/test_minimum_basic.py
index 402bc68..eac8311 100644
--- a/tempest/scenario/test_minimum_basic.py
+++ b/tempest/scenario/test_minimum_basic.py
@@ -62,7 +62,8 @@
         self.assertIn(self.server['id'], [x['id'] for x in servers])
 
     def nova_show(self):
-        got_server = self.servers_client.show_server(self.server['id'])
+        got_server = (self.servers_client.show_server(self.server['id'])
+                      ['server'])
         excluded_keys = ['OS-EXT-AZ:availability_zone']
         # Exclude these keys because of LP:#1486475
         excluded_keys.extend(['OS-EXT-STS:power_state', 'updated'])
@@ -98,7 +99,8 @@
                         self.server['id'], secgroup['name'])
 
         def wait_for_secgroup_add():
-            body = self.servers_client.show_server(self.server['id'])
+            body = (self.servers_client.show_server(self.server['id'])
+                    ['server'])
             return {'name': secgroup['name']} in body['security_groups']
 
         if not test.call_until_true(wait_for_secgroup_add,
diff --git a/tempest/scenario/test_server_advanced_ops.py b/tempest/scenario/test_server_advanced_ops.py
index 99eecae..c83dbb1 100644
--- a/tempest/scenario/test_server_advanced_ops.py
+++ b/tempest/scenario/test_server_advanced_ops.py
@@ -81,19 +81,22 @@
         self.servers_client.suspend_server(instance_id)
         waiters.wait_for_server_status(self.servers_client, instance_id,
                                        'SUSPENDED')
-        fetched_instance = self.servers_client.show_server(instance_id)
+        fetched_instance = (self.servers_client.show_server(instance_id)
+                            ['server'])
         LOG.debug("Resuming instance %s. Current status: %s",
                   instance_id, fetched_instance['status'])
         self.servers_client.resume_server(instance_id)
         waiters.wait_for_server_status(self.servers_client, instance_id,
                                        'ACTIVE')
-        fetched_instance = self.servers_client.show_server(instance_id)
+        fetched_instance = (self.servers_client.show_server(instance_id)
+                            ['server'])
         LOG.debug("Suspending instance %s. Current status: %s",
                   instance_id, fetched_instance['status'])
         self.servers_client.suspend_server(instance_id)
         waiters.wait_for_server_status(self.servers_client, instance_id,
                                        'SUSPENDED')
-        fetched_instance = self.servers_client.show_server(instance_id)
+        fetched_instance = (self.servers_client.show_server(instance_id)
+                            ['server'])
         LOG.debug("Resuming instance %s. Current status: %s",
                   instance_id, fetched_instance['status'])
         self.servers_client.resume_server(instance_id)
diff --git a/tempest/scenario/test_stamp_pattern.py b/tempest/scenario/test_stamp_pattern.py
index a7bdba3..5f1e7fe 100644
--- a/tempest/scenario/test_stamp_pattern.py
+++ b/tempest/scenario/test_stamp_pattern.py
@@ -106,7 +106,7 @@
     def _attach_volume(self, server, volume):
         attached_volume = self.servers_client.attach_volume(
             server['id'], volumeId=volume['id'], device='/dev/%s'
-            % CONF.compute.volume_device_name)
+            % CONF.compute.volume_device_name)['volumeAttachment']
         self.assertEqual(volume['id'], attached_volume['id'])
         self._wait_for_volume_status(attached_volume, 'in-use')
 
diff --git a/tempest/services/compute/json/security_group_rules_client.py b/tempest/services/compute/json/security_group_rules_client.py
index c1c6b1a..9626f60 100644
--- a/tempest/services/compute/json/security_group_rules_client.py
+++ b/tempest/services/compute/json/security_group_rules_client.py
@@ -14,7 +14,6 @@
 #    under the License.
 
 from oslo_serialization import jsonutils as json
-from tempest_lib import exceptions as lib_exc
 
 from tempest.api_schema.response.compute.v2_1 import security_groups as schema
 from tempest.common import service_client
@@ -46,13 +45,3 @@
                                  group_rule_id)
         self.validate_response(schema.delete_security_group_rule, resp, body)
         return service_client.ResponseBody(resp, body)
-
-    def list_security_group_rules(self, security_group_id):
-        """List all rules for a security group."""
-        resp, body = self.get('os-security-groups')
-        body = json.loads(body)
-        self.validate_response(schema.list_security_groups, resp, body)
-        for sg in body['security_groups']:
-            if sg['id'] == security_group_id:
-                return service_client.ResponseBody(resp, sg)
-        raise lib_exc.NotFound('No such Security Group')
diff --git a/tempest/services/compute/json/servers_client.py b/tempest/services/compute/json/servers_client.py
index 5603fed..a36603f 100644
--- a/tempest/services/compute/json/servers_client.py
+++ b/tempest/services/compute/json/servers_client.py
@@ -95,7 +95,7 @@
         else:
             create_schema = schema.create_server
         self.validate_response(create_schema, resp, body)
-        return service_client.ResponseBody(resp, body['server'])
+        return service_client.ResponseBody(resp, body)
 
     def update_server(self, server_id, **kwargs):
         """Updates the properties of an existing server.
@@ -110,14 +110,14 @@
         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'])
+        return service_client.ResponseBody(resp, body)
 
     def show_server(self, server_id):
         """Returns the details of an existing server."""
         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'])
+        return service_client.ResponseBody(resp, body)
 
     def delete_server(self, server_id):
         """Deletes the given server."""
@@ -147,7 +147,7 @@
         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'])
+        return service_client.ResponseBody(resp, body)
 
     def list_addresses_by_network(self, server_id, network_id):
         """Lists all addresses of a specific network type for a server."""
@@ -157,30 +157,27 @@
         self.validate_response(schema.list_addresses_by_network, resp, body)
         return service_client.ResponseBody(resp, body)
 
-    def action(self, server_id, action_name, response_key,
+    def action(self, server_id, action_name,
                schema=schema.server_actions_common_schema,
-               response_class=service_client.ResponseBody, **kwargs):
+               **kwargs):
         post_body = json.dumps({action_name: kwargs})
         resp, body = self.post('servers/%s/action' % server_id,
                                post_body)
-        if response_key is not None:
+        if body:
             body = json.loads(body)
-            self.validate_response(schema, resp, body)
-            body = body[response_key]
-        else:
-            self.validate_response(schema, resp, body)
-        return response_class(resp, body)
+        self.validate_response(schema, resp, body)
+        return service_client.ResponseBody(resp, body)
 
     def create_backup(self, server_id, backup_type, rotation, name):
         """Backup a server instance."""
-        return self.action(server_id, "createBackup", None,
+        return self.action(server_id, "createBackup",
                            backup_type=backup_type,
                            rotation=rotation,
                            name=name)
 
     def change_password(self, server_id, adminPass):
         """Changes the root password for the server."""
-        return self.action(server_id, 'changePassword', None,
+        return self.action(server_id, 'changePassword',
                            adminPass=adminPass)
 
     def get_password(self, server_id):
@@ -204,7 +201,7 @@
 
     def reboot_server(self, server_id, reboot_type):
         """Reboots a server."""
-        return self.action(server_id, 'reboot', None, type=reboot_type)
+        return self.action(server_id, 'reboot', type=reboot_type)
 
     def rebuild_server(self, server_id, image_ref, **kwargs):
         """Rebuilds a server with a new image.
@@ -219,7 +216,7 @@
             rebuild_schema = schema.rebuild_server_with_admin_pass
         else:
             rebuild_schema = schema.rebuild_server
-        return self.action(server_id, 'rebuild', 'server',
+        return self.action(server_id, 'rebuild',
                            rebuild_schema, **kwargs)
 
     def resize_server(self, server_id, flavor_ref, **kwargs):
@@ -231,23 +228,23 @@
         kwargs['flavorRef'] = flavor_ref
         if 'disk_config' in kwargs:
             kwargs['OS-DCF:diskConfig'] = kwargs.pop('disk_config')
-        return self.action(server_id, 'resize', None, **kwargs)
+        return self.action(server_id, 'resize', **kwargs)
 
     def confirm_resize_server(self, server_id, **kwargs):
         """Confirms the flavor change for a server."""
         return self.action(server_id, 'confirmResize',
-                           None, schema.server_actions_confirm_resize,
+                           schema.server_actions_confirm_resize,
                            **kwargs)
 
     def revert_resize_server(self, server_id, **kwargs):
         """Reverts a server back to its original flavor."""
-        return self.action(server_id, 'revertResize', None, **kwargs)
+        return self.action(server_id, 'revertResize', **kwargs)
 
     def list_server_metadata(self, server_id):
         resp, body = self.get("servers/%s/metadata" % server_id)
         body = json.loads(body)
         self.validate_response(schema.list_server_metadata, resp, body)
-        return service_client.ResponseBody(resp, body['metadata'])
+        return service_client.ResponseBody(resp, body)
 
     def set_server_metadata(self, server_id, meta, no_metadata_field=False):
         if no_metadata_field:
@@ -258,7 +255,7 @@
                               post_body)
         body = json.loads(body)
         self.validate_response(schema.set_server_metadata, resp, body)
-        return service_client.ResponseBody(resp, body['metadata'])
+        return service_client.ResponseBody(resp, body)
 
     def update_server_metadata(self, server_id, meta):
         post_body = json.dumps({'metadata': meta})
@@ -267,14 +264,14 @@
         body = json.loads(body)
         self.validate_response(schema.update_server_metadata,
                                resp, body)
-        return service_client.ResponseBody(resp, body['metadata'])
+        return service_client.ResponseBody(resp, body)
 
     def get_server_metadata_item(self, server_id, key):
         resp, body = self.get("servers/%s/metadata/%s" % (server_id, key))
         body = json.loads(body)
         self.validate_response(schema.set_get_server_metadata_item,
                                resp, body)
-        return service_client.ResponseBody(resp, body['meta'])
+        return service_client.ResponseBody(resp, body)
 
     def set_server_metadata_item(self, server_id, key, meta):
         post_body = json.dumps({'meta': meta})
@@ -283,7 +280,7 @@
         body = json.loads(body)
         self.validate_response(schema.set_get_server_metadata_item,
                                resp, body)
-        return service_client.ResponseBody(resp, body['meta'])
+        return service_client.ResponseBody(resp, body)
 
     def delete_server_metadata_item(self, server_id, key):
         resp, body = self.delete("servers/%s/metadata/%s" %
@@ -293,10 +290,10 @@
         return service_client.ResponseBody(resp, body)
 
     def stop_server(self, server_id, **kwargs):
-        return self.action(server_id, 'os-stop', None, **kwargs)
+        return self.action(server_id, 'os-stop', **kwargs)
 
     def start_server(self, server_id, **kwargs):
-        return self.action(server_id, 'os-start', None, **kwargs)
+        return self.action(server_id, 'os-start', **kwargs)
 
     def attach_volume(self, server_id, **kwargs):
         """Attaches a volume to a server instance."""
@@ -305,7 +302,7 @@
                                post_body)
         body = json.loads(body)
         self.validate_response(schema.attach_volume, resp, body)
-        return service_client.ResponseBody(resp, body['volumeAttachment'])
+        return service_client.ResponseBody(resp, body)
 
     def detach_volume(self, server_id, volume_id):
         """Detaches a volume from a server instance."""
@@ -320,7 +317,7 @@
             server_id, attach_id))
         body = json.loads(body)
         self.validate_response(schema.get_volume_attachment, resp, body)
-        return service_client.ResponseBody(resp, body['volumeAttachment'])
+        return service_client.ResponseBody(resp, body)
 
     def list_volume_attachments(self, server_id):
         """Returns the list of volume attachments for a given instance."""
@@ -328,15 +325,15 @@
             server_id))
         body = json.loads(body)
         self.validate_response(schema.list_volume_attachments, resp, body)
-        return service_client.ResponseBodyList(resp, body['volumeAttachments'])
+        return service_client.ResponseBody(resp, body)
 
     def add_security_group(self, server_id, name):
         """Adds a security group to the server."""
-        return self.action(server_id, 'addSecurityGroup', None, name=name)
+        return self.action(server_id, 'addSecurityGroup', name=name)
 
     def remove_security_group(self, server_id, name):
         """Removes a security group from the server."""
-        return self.action(server_id, 'removeSecurityGroup', None, name=name)
+        return self.action(server_id, 'removeSecurityGroup', name=name)
 
     def live_migrate_server(self, server_id, **kwargs):
         """This should be called with administrator privileges ."""
@@ -350,53 +347,52 @@
 
     def migrate_server(self, server_id, **kwargs):
         """Migrates a server to a new host."""
-        return self.action(server_id, 'migrate', None, **kwargs)
+        return self.action(server_id, 'migrate', **kwargs)
 
     def lock_server(self, server_id, **kwargs):
         """Locks the given server."""
-        return self.action(server_id, 'lock', None, **kwargs)
+        return self.action(server_id, 'lock', **kwargs)
 
     def unlock_server(self, server_id, **kwargs):
         """UNlocks the given server."""
-        return self.action(server_id, 'unlock', None, **kwargs)
+        return self.action(server_id, 'unlock', **kwargs)
 
     def suspend_server(self, server_id, **kwargs):
         """Suspends the provided server."""
-        return self.action(server_id, 'suspend', None, **kwargs)
+        return self.action(server_id, 'suspend', **kwargs)
 
     def resume_server(self, server_id, **kwargs):
         """Un-suspends the provided server."""
-        return self.action(server_id, 'resume', None, **kwargs)
+        return self.action(server_id, 'resume', **kwargs)
 
     def pause_server(self, server_id, **kwargs):
         """Pauses the provided server."""
-        return self.action(server_id, 'pause', None, **kwargs)
+        return self.action(server_id, 'pause', **kwargs)
 
     def unpause_server(self, server_id, **kwargs):
         """Un-pauses the provided server."""
-        return self.action(server_id, 'unpause', None, **kwargs)
+        return self.action(server_id, 'unpause', **kwargs)
 
     def reset_state(self, server_id, state='error'):
         """Resets the state of a server to active/error."""
-        return self.action(server_id, 'os-resetState', None, state=state)
+        return self.action(server_id, 'os-resetState', state=state)
 
     def shelve_server(self, server_id, **kwargs):
         """Shelves the provided server."""
-        return self.action(server_id, 'shelve', None, **kwargs)
+        return self.action(server_id, 'shelve', **kwargs)
 
     def unshelve_server(self, server_id, **kwargs):
         """Un-shelves the provided server."""
-        return self.action(server_id, 'unshelve', None, **kwargs)
+        return self.action(server_id, 'unshelve', **kwargs)
 
     def shelve_offload_server(self, server_id, **kwargs):
         """Shelve-offload the provided server."""
-        return self.action(server_id, 'shelveOffload', None, **kwargs)
+        return self.action(server_id, 'shelveOffload', **kwargs)
 
     def get_console_output(self, server_id, length):
         kwargs = {'length': length} if length else {}
-        return self.action(server_id, 'os-getConsoleOutput', 'output',
+        return self.action(server_id, 'os-getConsoleOutput',
                            schema.get_console_output,
-                           response_class=service_client.ResponseBodyData,
                            **kwargs)
 
     def list_virtual_interfaces(self, server_id):
@@ -411,14 +407,13 @@
 
     def rescue_server(self, server_id, **kwargs):
         """Rescue the provided server."""
-        return self.action(server_id, 'rescue', 'adminPass',
+        return self.action(server_id, 'rescue',
                            schema.rescue_server,
-                           response_class=service_client.ResponseBodyData,
                            **kwargs)
 
     def unrescue_server(self, server_id):
         """Unrescue the provided server."""
-        return self.action(server_id, 'unrescue', None)
+        return self.action(server_id, 'unrescue')
 
     def get_server_diagnostics(self, server_id):
         """Get the usage data for a server."""
@@ -431,7 +426,7 @@
                               server_id)
         body = json.loads(body)
         self.validate_response(schema.list_instance_actions, resp, body)
-        return service_client.ResponseBodyList(resp, body['instanceActions'])
+        return service_client.ResponseBody(resp, body)
 
     def get_instance_action(self, server_id, request_id):
         """Returns the action details of the provided server."""
@@ -439,26 +434,26 @@
                               (server_id, request_id))
         body = json.loads(body)
         self.validate_response(schema.get_instance_action, resp, body)
-        return service_client.ResponseBody(resp, body['instanceAction'])
+        return service_client.ResponseBody(resp, body)
 
     def force_delete_server(self, server_id, **kwargs):
         """Force delete a server."""
-        return self.action(server_id, 'forceDelete', None, **kwargs)
+        return self.action(server_id, 'forceDelete', **kwargs)
 
     def restore_soft_deleted_server(self, server_id, **kwargs):
         """Restore a soft-deleted server."""
-        return self.action(server_id, 'restore', None, **kwargs)
+        return self.action(server_id, 'restore', **kwargs)
 
     def reset_network(self, server_id, **kwargs):
         """Resets the Network of a server"""
-        return self.action(server_id, 'resetNetwork', None, **kwargs)
+        return self.action(server_id, 'resetNetwork', **kwargs)
 
     def inject_network_info(self, server_id, **kwargs):
         """Inject the Network Info into server"""
-        return self.action(server_id, 'injectNetworkInfo', None, **kwargs)
+        return self.action(server_id, 'injectNetworkInfo', **kwargs)
 
     def get_vnc_console(self, server_id, console_type):
         """Get URL of VNC console."""
         return self.action(server_id, "os-getVNCConsole",
-                           "console", schema.get_vnc_console,
+                           schema.get_vnc_console,
                            type=console_type)
diff --git a/tempest/services/compute/json/snapshots_extensions_client.py b/tempest/services/compute/json/snapshots_extensions_client.py
new file mode 100644
index 0000000..6902a39
--- /dev/null
+++ b/tempest/services/compute/json/snapshots_extensions_client.py
@@ -0,0 +1,71 @@
+# Copyright 2015 Fujitsu(fnst) Corporation
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+from oslo_serialization import jsonutils as json
+from six.moves.urllib import parse as urllib
+from tempest_lib import exceptions as lib_exc
+
+from tempest.api_schema.response.compute.v2_1 import snapshots as schema
+from tempest.common import service_client
+
+
+class SnapshotsExtensionsClient(service_client.ServiceClient):
+
+    def create_snapshot(self, volume_id, **kwargs):
+        post_body = {
+            'volume_id': volume_id
+        }
+        post_body.update(kwargs)
+        post_body = json.dumps({'snapshot': post_body})
+        resp, body = self.post('os-snapshots', post_body)
+        body = json.loads(body)
+        self.validate_response(schema.create_get_snapshot, resp, body)
+        return service_client.ResponseBody(resp, body)
+
+    def show_snapshot(self, snapshot_id):
+        url = "os-snapshots/%s" % snapshot_id
+        resp, body = self.get(url)
+        body = json.loads(body)
+        self.validate_response(schema.create_get_snapshot, resp, body)
+        return service_client.ResponseBody(resp, body)
+
+    def list_snapshots(self, detail=False, params=None):
+        url = 'os-snapshots'
+
+        if detail:
+            url += '/detail'
+        if params:
+            url += '?%s' % urllib.urlencode(params)
+        resp, body = self.get(url)
+        body = json.loads(body)
+        self.validate_response(schema.list_snapshots, resp, body)
+        return service_client.ResponseBody(resp, body)
+
+    def delete_snapshot(self, snapshot_id):
+        resp, body = self.delete("os-snapshots/%s" % snapshot_id)
+        self.validate_response(schema.delete_snapshot, resp, body)
+        return service_client.ResponseBody(resp, body)
+
+    def is_resource_deleted(self, id):
+        try:
+            self.show_snapshot(id)
+        except lib_exc.NotFound:
+            return True
+        return False
+
+    @property
+    def resource_type(self):
+        """Returns the primary type of resource this client works with."""
+        return 'snapshot'
diff --git a/tempest/services/database/json/flavors_client.py b/tempest/services/database/json/flavors_client.py
index 4fe5a46..88feb17 100644
--- a/tempest/services/database/json/flavors_client.py
+++ b/tempest/services/database/json/flavors_client.py
@@ -13,6 +13,7 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from oslo_serialization import jsonutils as json
 import urllib
 
 from tempest.common import service_client
@@ -27,9 +28,11 @@
 
         resp, body = self.get(url)
         self.expected_success(200, resp.status)
-        return service_client.ResponseBodyList(resp, self._parse_resp(body))
+        body = json.loads(body)
+        return service_client.ResponseBody(resp, body)
 
     def get_db_flavor_details(self, db_flavor_id):
         resp, body = self.get("flavors/%s" % str(db_flavor_id))
         self.expected_success(200, resp.status)
-        return service_client.ResponseBody(resp, self._parse_resp(body))
+        body = json.loads(body)
+        return service_client.ResponseBody(resp, body)
diff --git a/tempest/stress/actions/server_create_destroy.py b/tempest/stress/actions/server_create_destroy.py
index 17f4bc9..37664de 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)
+            name, self.image, 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 2505a77..81bb071 100644
--- a/tempest/stress/actions/ssh_floating.py
+++ b/tempest/stress/actions/ssh_floating.py
@@ -77,7 +77,7 @@
         vm_args['security_groups'] = [self.sec_grp]
         server = servers_client.create_server(name, self.image,
                                               self.flavor,
-                                              **vm_args)
+                                              **vm_args)['server']
         self.server_id = server['id']
         if self.wait_after_vm_create:
             waiters.wait_for_server_status(self.manager.servers_client,
diff --git a/tempest/stress/actions/volume_attach_delete.py b/tempest/stress/actions/volume_attach_delete.py
index b35f587..b3753a5 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)
+            vm_name, self.image, 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 fe481c4..8105626 100644
--- a/tempest/stress/actions/volume_attach_verify.py
+++ b/tempest/stress/actions/volume_attach_verify.py
@@ -41,7 +41,7 @@
         vm_args['key_name'] = self.key['name']
         server = servers_client.create_server(name, self.image,
                                               self.flavor,
-                                              **vm_args)
+                                              **vm_args)['server']
         self.server_id = server['id']
         waiters.wait_for_server_status(self.manager.servers_client,
                                        self.server_id, 'ACTIVE')
diff --git a/tempest/tests/services/compute/test_agents_client.py b/tempest/tests/services/compute/test_agents_client.py
index 9493a32..01035ab 100644
--- a/tempest/tests/services/compute/test_agents_client.py
+++ b/tempest/tests/services/compute/test_agents_client.py
@@ -56,6 +56,12 @@
             'tempest.common.service_client.ServiceClient.get',
             {"agents": []},
             bytes_body)
+        self.check_service_client_function(
+            self.client.list_agents,
+            'tempest.common.service_client.ServiceClient.get',
+            {"agents": []},
+            bytes_body,
+            hypervisor="kvm")
 
     def _test_create_agent(self, bytes_body=False):
         self.check_service_client_function(
diff --git a/tempest/tests/services/compute/test_server_groups_client.py b/tempest/tests/services/compute/test_server_groups_client.py
new file mode 100644
index 0000000..253dac1
--- /dev/null
+++ b/tempest/tests/services/compute/test_server_groups_client.py
@@ -0,0 +1,84 @@
+# Copyright 2015 IBM Corp.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+import httplib2
+
+from oslotest import mockpatch
+
+from tempest.services.compute.json import server_groups_client
+from tempest.tests import fake_auth_provider
+from tempest.tests.services.compute import base
+
+
+class TestServerGroupsClient(base.BaseComputeServiceTest):
+
+    server_group = {
+        "id": "5bbcc3c4-1da2-4437-a48a-66f15b1b13f9",
+        "name": "test",
+        "policies": ["anti-affinity"],
+        "members": [],
+        "metadata": {}}
+
+    def setUp(self):
+        super(TestServerGroupsClient, self).setUp()
+        fake_auth = fake_auth_provider.FakeAuthProvider()
+        self.client = server_groups_client.ServerGroupsClient(
+            fake_auth, 'compute', 'regionOne')
+
+    def _test_create_server_group(self, bytes_body=False):
+        expected = {"server_group": TestServerGroupsClient.server_group}
+        self.check_service_client_function(
+            self.client.create_server_group,
+            'tempest.common.service_client.ServiceClient.post', expected,
+            bytes_body, name='fake-group', policies=['affinity'])
+
+    def test_create_server_group_str_body(self):
+        self._test_create_server_group(bytes_body=False)
+
+    def test_create_server_group_byte_body(self):
+        self._test_create_server_group(bytes_body=True)
+
+    def test_delete_server_group(self):
+        response = (httplib2.Response({'status': 204}), None)
+        self.useFixture(mockpatch.Patch(
+            'tempest.common.service_client.ServiceClient.delete',
+            return_value=response))
+        self.client.delete_server_group('fake-group')
+
+    def _test_list_server_groups(self, bytes_body=False):
+        expected = {"server_groups": [TestServerGroupsClient.server_group]}
+        self.check_service_client_function(
+            self.client.list_server_groups,
+            'tempest.common.service_client.ServiceClient.get',
+            expected, bytes_body)
+
+    def test_list_server_groups_str_body(self):
+        self._test_list_server_groups(bytes_body=False)
+
+    def test_list_server_groups_byte_body(self):
+        self._test_list_server_groups(bytes_body=True)
+
+    def _test_get_server_group(self, bytes_body=False):
+        expected = {"server_group": TestServerGroupsClient.server_group}
+        self.check_service_client_function(
+            self.client.get_server_group,
+            'tempest.common.service_client.ServiceClient.get',
+            expected, bytes_body,
+            server_group_id='5bbcc3c4-1da2-4437-a48a-66f15b1b13f9')
+
+    def test_get_server_group_str_body(self):
+        self._test_get_server_group(bytes_body=False)
+
+    def test_get_server_group_byte_body(self):
+        self._test_get_server_group(bytes_body=True)
