diff --git a/tempest/api/compute/servers/test_create_server.py b/tempest/api/compute/servers/test_create_server.py
index 2f7ae25..902b72c 100644
--- a/tempest/api/compute/servers/test_create_server.py
+++ b/tempest/api/compute/servers/test_create_server.py
@@ -40,6 +40,7 @@
         cls.client = cls.servers_client
         cls.network_client = cls.os.network_client
         cls.networks_client = cls.os.networks_client
+        cls.subnets_client = cls.os.subnets_client
 
     @classmethod
     def resource_setup(cls):
@@ -68,11 +69,11 @@
         self.addCleanup(self.networks_client.delete_network,
                         net['network']['id'])
 
-        subnet = self.network_client.create_subnet(
+        subnet = self.subnets_client.create_subnet(
             network_id=net['network']['id'],
             cidr=cidr,
             ip_version=4)
-        self.addCleanup(self.network_client.delete_subnet,
+        self.addCleanup(self.subnets_client.delete_subnet,
                         subnet['subnet']['id'])
         return net
 
diff --git a/tempest/api/compute/test_authorization.py b/tempest/api/compute/test_authorization.py
index 484c156..f8d0cca 100644
--- a/tempest/api/compute/test_authorization.py
+++ b/tempest/api/compute/test_authorization.py
@@ -186,6 +186,14 @@
 
     @test.idempotent_id('acf8724b-142b-4044-82c3-78d31a533f24')
     def test_create_server_fails_when_tenant_incorrect(self):
+        # BUG(sdague): this test should fail because of bad auth url,
+        # which means that when we run with a service catalog without
+        # project_id in the urls, it should fail to fail, and thus
+        # fail the test. It does not.
+        #
+        # The 400 BadRequest is clearly ambiguous, and something else
+        # is wrong about this request. This should be fixed.
+        #
         # A create server request should fail if the tenant id does not match
         # the current user
         # Change the base URL to impersonate another user
@@ -199,9 +207,22 @@
 
     @test.idempotent_id('f03d1ded-7fd4-4d29-bc13-e2391f29c625')
     def test_create_keypair_in_analt_user_tenant(self):
-        # A create keypair request should fail if the tenant id does not match
-        # the current user
-        # POST keypair with other user tenant
+        """create keypair should not function for alternate tenant
+
+        POST {alt_service_url}/os-keypairs
+
+        Attempt to create a keypair against an alternate tenant by
+        changing using a different tenant's service url. This should
+        return a BadRequest. This tests basic tenant isolation protections.
+
+        NOTE(sdague): if the environment does not use project_id in
+        the service urls, this test is not valid. Skip under these
+        conditions.
+
+        """
+        if self.alt_keypairs_client.base_url == self.keypairs_client.base_url:
+            raise self.skipException("Service urls don't include project_id")
+
         k_name = data_utils.rand_name('keypair')
         try:
             # Change the base URL to impersonate another user
@@ -250,9 +271,23 @@
 
     @test.idempotent_id('752c917e-83be-499d-a422-3559127f7d3c')
     def test_create_security_group_in_analt_user_tenant(self):
-        # A create security group request should fail if the tenant id does not
-        # match the current user
-        # POST security group with other user tenant
+        """create security group should not function for alternate tenant
+
+        POST {alt_service_url}/os-security-groups
+
+        Attempt to create a security group against an alternate tenant
+        by changing using a different tenant's service url. This
+        should return a BadRequest. This tests basic tenant isolation
+        protections.
+
+        NOTE(sdague): if the environment does not use project_id in
+        the service urls, this test is not valid. Skip under these
+        conditions.
+
+        """
+        if self.alt_security_client.base_url == self.security_client.base_url:
+            raise self.skipException("Service urls don't include project_id")
+
         s_name = data_utils.rand_name('security')
         s_description = data_utils.rand_name('security')
         try:
@@ -289,9 +324,23 @@
 
     @test.idempotent_id('b2b76de0-210a-4089-b921-591c9ec552f6')
     def test_create_security_group_rule_in_analt_user_tenant(self):
-        # A create security group rule request should fail if the tenant id
-        # does not match the current user
-        # POST security group rule with other user tenant
+        """create security group rule should not function for alternate tenant
+
+        POST {alt_service_url}/os-security-group-rules
+
+        Attempt to create a security group rule against an alternate
+        tenant by changing using a different tenant's service
+        url. This should return a BadRequest. This tests basic tenant
+        isolation protections.
+
+        NOTE(sdague): if the environment does not use project_id in
+        the service urls, this test is not valid. Skip under these
+        conditions.
+
+        """
+        if self.alt_security_client.base_url == self.security_client.base_url:
+            raise self.skipException("Service urls don't include project_id")
+
         parent_group_id = self.security_group['id']
         ip_protocol = 'icmp'
         from_port = -1
diff --git a/tempest/api/image/v2/test_images.py b/tempest/api/image/v2/test_images.py
index a336507..bacf211 100644
--- a/tempest/api/image/v2/test_images.py
+++ b/tempest/api/image/v2/test_images.py
@@ -18,10 +18,15 @@
 
 from six import moves
 
+from oslo_log import log as logging
 from tempest.api.image import base
 from tempest.common.utils import data_utils
+from tempest import config
 from tempest import test
 
+CONF = config.CONF
+LOG = logging.getLogger(__name__)
+
 
 class BasicOperationsImagesTest(base.BaseV2ImageTest):
     """
@@ -39,9 +44,11 @@
 
         uuid = '00000000-1111-2222-3333-444455556666'
         image_name = data_utils.rand_name('image')
+        container_format = CONF.image.container_formats[0]
+        disk_format = CONF.image.disk_formats[0]
         body = self.create_image(name=image_name,
-                                 container_format='bare',
-                                 disk_format='raw',
+                                 container_format=container_format,
+                                 disk_format=disk_format,
                                  visibility='private',
                                  ramdisk_id=uuid)
         self.assertIn('id', body)
@@ -77,9 +84,11 @@
 
         # Create image
         image_name = data_utils.rand_name('image')
+        container_format = CONF.image.container_formats[0]
+        disk_format = CONF.image.disk_formats[0]
         body = self.client.create_image(name=image_name,
-                                        container_format='bare',
-                                        disk_format='raw',
+                                        container_format=container_format,
+                                        disk_format=disk_format,
                                         visibility='private')
         image_id = body['id']
 
@@ -99,9 +108,11 @@
 
         # Create image
         image_name = data_utils.rand_name('image')
+        container_format = CONF.image.container_formats[0]
+        disk_format = CONF.image.disk_formats[0]
         body = self.client.create_image(name=image_name,
-                                        container_format='bare',
-                                        disk_format='iso',
+                                        container_format=container_format,
+                                        disk_format=disk_format,
                                         visibility='private')
         self.addCleanup(self.client.delete_image, body['id'])
         self.assertEqual('queued', body['status'])
@@ -133,13 +144,17 @@
         super(ListImagesTest, cls).resource_setup()
         # We add a few images here to test the listing functionality of
         # the images API
-        cls._create_standard_image('bare', 'raw')
-        cls._create_standard_image('bare', 'raw')
-        cls._create_standard_image('ami', 'raw')
-        # Add some more for listing
-        cls._create_standard_image('ami', 'ami')
-        cls._create_standard_image('ari', 'ari')
-        cls._create_standard_image('aki', 'aki')
+        container_fmts = CONF.image.container_formats
+        disk_fmts = CONF.image.disk_formats
+        all_pairs = [(container_fmt, disk_fmt)
+                     for container_fmt in container_fmts
+                     for disk_fmt in disk_fmts]
+
+        for (container_fmt, disk_fmt) in all_pairs[:6]:
+            LOG.debug("Creating a image"
+                      "(Container format: %s, Disk format: %s).",
+                      container_fmt, disk_fmt)
+            cls._create_standard_image(container_fmt, disk_fmt)
 
     @classmethod
     def _create_standard_image(cls, container_format, disk_format):
@@ -201,7 +216,7 @@
     @test.idempotent_id('cf1b9a48-8340-480e-af7b-fe7e17690876')
     def test_list_images_param_size(self):
         # Test to get all images by size
-        image_id = self.created_images[1]
+        image_id = self.created_images[0]
         # Get image metadata
         image = self.client.show_image(image_id)
 
@@ -211,7 +226,7 @@
     @test.idempotent_id('4ad8c157-971a-4ba8-aa84-ed61154b1e7f')
     def test_list_images_param_min_max_size(self):
         # Test to get all images with size between 2000 to 3000
-        image_id = self.created_images[1]
+        image_id = self.created_images[0]
         # Get image metadata
         image = self.client.show_image(image_id)
 
@@ -234,7 +249,7 @@
     @test.idempotent_id('e914a891-3cc8-4b40-ad32-e0a39ffbddbb')
     def test_list_images_param_limit(self):
         # Test to get images by limit
-        params = {"limit": 2}
+        params = {"limit": 1}
         images_list = self.client.list_images(params=params)['images']
 
         self.assertEqual(len(images_list), params['limit'],
diff --git a/tempest/api/network/admin/test_external_network_extension.py b/tempest/api/network/admin/test_external_network_extension.py
index 62aa18e..ac53587 100644
--- a/tempest/api/network/admin/test_external_network_extension.py
+++ b/tempest/api/network/admin/test_external_network_extension.py
@@ -103,8 +103,9 @@
         self.addCleanup(self._try_delete_resource,
                         self.admin_networks_client.delete_network,
                         external_network['id'])
-        subnet = self.create_subnet(external_network, client=client,
-                                    enable_dhcp=False)
+        subnet = self.create_subnet(
+            external_network, client=self.admin_subnets_client,
+            enable_dhcp=False)
         body = client.create_floatingip(
             floating_network_id=external_network['id'])
         created_floating_ip = body['floatingip']
@@ -121,7 +122,7 @@
         self.assertNotIn(created_floating_ip['id'],
                          (f['id'] for f in floatingip_list['floatingips']))
         # Verifies subnet is deleted
-        subnet_list = client.list_subnets()
+        subnet_list = self.admin_subnets_client.list_subnets()
         self.assertNotIn(subnet['id'],
                          (s['id'] for s in subnet_list))
         # Removes subnet from the cleanup list
diff --git a/tempest/api/network/base.py b/tempest/api/network/base.py
index 39bdcff..26cf180 100644
--- a/tempest/api/network/base.py
+++ b/tempest/api/network/base.py
@@ -74,6 +74,7 @@
         super(BaseNetworkTest, cls).setup_clients()
         cls.client = cls.os.network_client
         cls.networks_client = cls.os.networks_client
+        cls.subnets_client = cls.os.subnets_client
 
     @classmethod
     def resource_setup(cls):
@@ -115,7 +116,7 @@
                                          router)
             # Clean up subnets
             for subnet in cls.subnets:
-                cls._try_delete_resource(cls.client.delete_subnet,
+                cls._try_delete_resource(cls.subnets_client.delete_subnet,
                                          subnet['id'])
             # Clean up networks
             for network in cls.networks:
@@ -160,7 +161,7 @@
 
         # allow tests to use admin client
         if not client:
-            client = cls.client
+            client = cls.subnets_client
 
         # The cidr and mask_bits depend on the ip version.
         ip_version = ip_version if ip_version is not None else cls._ip_version
@@ -267,6 +268,7 @@
         super(BaseAdminNetworkTest, cls).setup_clients()
         cls.admin_client = cls.os_adm.network_client
         cls.admin_networks_client = cls.os_adm.networks_client
+        cls.admin_subnets_client = cls.os_adm.subnets_client
 
     @classmethod
     def create_metering_label(cls, name, description):
diff --git a/tempest/api/network/test_dhcp_ipv6.py b/tempest/api/network/test_dhcp_ipv6.py
index f362f85..631a38b 100644
--- a/tempest/api/network/test_dhcp_ipv6.py
+++ b/tempest/api/network/test_dhcp_ipv6.py
@@ -75,11 +75,11 @@
                 if port['id'] in [p['id'] for p in self.ports]:
                     self.client.delete_port(port['id'])
                     self._remove_from_list_by_index(self.ports, port)
-        body = self.client.list_subnets()
+        body = self.subnets_client.list_subnets()
         subnets = body['subnets']
         for subnet in subnets:
             if subnet['id'] in [s['id'] for s in self.subnets]:
-                self.client.delete_subnet(subnet['id'])
+                self.subnets_client.delete_subnet(subnet['id'])
                 self._remove_from_list_by_index(self.subnets, subnet)
         body = self.client.list_routers()
         routers = body['routers']
diff --git a/tempest/api/network/test_networks.py b/tempest/api/network/test_networks.py
index a4ab43a..c5b2080 100644
--- a/tempest/api/network/test_networks.py
+++ b/tempest/api/network/test_networks.py
@@ -194,7 +194,7 @@
         subnet_id = subnet['id']
         # Verify subnet update
         new_name = "New_subnet"
-        body = self.client.update_subnet(subnet_id, name=new_name)
+        body = self.subnets_client.update_subnet(subnet_id, name=new_name)
         updated_subnet = body['subnet']
         self.assertEqual(updated_subnet['name'], new_name)
 
@@ -241,7 +241,7 @@
     @test.idempotent_id('bd635d81-6030-4dd1-b3b9-31ba0cfdf6cc')
     def test_show_subnet(self):
         # Verify the details of a subnet
-        body = self.client.show_subnet(self.subnet['id'])
+        body = self.subnets_client.show_subnet(self.subnet['id'])
         subnet = body['subnet']
         self.assertNotEmpty(subnet, "Subnet returned has no fields")
         for key in ['id', 'cidr']:
@@ -252,8 +252,8 @@
     def test_show_subnet_fields(self):
         # Verify specific fields of a subnet
         fields = ['id', 'network_id']
-        body = self.client.show_subnet(self.subnet['id'],
-                                       fields=fields)
+        body = self.subnets_client.show_subnet(self.subnet['id'],
+                                               fields=fields)
         subnet = body['subnet']
         self.assertEqual(sorted(subnet.keys()), sorted(fields))
         for field_name in fields:
@@ -263,7 +263,7 @@
     @test.idempotent_id('db68ba48-f4ea-49e9-81d1-e367f6d0b20a')
     def test_list_subnets(self):
         # Verify the subnet exists in the list of all subnets
-        body = self.client.list_subnets()
+        body = self.subnets_client.list_subnets()
         subnets = [subnet['id'] for subnet in body['subnets']
                    if subnet['id'] == self.subnet['id']]
         self.assertNotEmpty(subnets, "Created subnet not found in the list")
@@ -272,7 +272,7 @@
     def test_list_subnets_fields(self):
         # Verify specific fields of subnets
         fields = ['id', 'network_id']
-        body = self.client.list_subnets(fields=fields)
+        body = self.subnets_client.list_subnets(fields=fields)
         subnets = body['subnets']
         self.assertNotEmpty(subnets, "Subnet list returned is empty")
         for subnet in subnets:
@@ -303,7 +303,7 @@
         body = self.networks_client.delete_network(net_id)
 
         # Verify that the subnet got automatically deleted.
-        self.assertRaises(lib_exc.NotFound, self.client.show_subnet,
+        self.assertRaises(lib_exc.NotFound, self.subnets_client.show_subnet,
                           subnet_id)
 
         # Since create_subnet adds the subnet to the delete list, and it is
@@ -362,8 +362,8 @@
                   'gateway_ip': new_gateway, 'enable_dhcp': True}
 
         new_name = "New_subnet"
-        body = self.client.update_subnet(subnet_id, name=new_name,
-                                         **kwargs)
+        body = self.subnets_client.update_subnet(subnet_id, name=new_name,
+                                                 **kwargs)
         updated_subnet = body['subnet']
         kwargs['name'] = new_name
         self.assertEqual(sorted(updated_subnet['dns_nameservers']),
@@ -398,7 +398,7 @@
         # subnets_iter is a list (iterator) of lists. This flattens it to a
         # list of UUIDs
         public_subnets_iter = itertools.chain(*subnets_iter)
-        body = self.client.list_subnets()
+        body = self.subnets_client.list_subnets()
         subnets = [sub['id'] for sub in body['subnets']
                    if sub['id'] in public_subnets_iter]
         self.assertEmpty(subnets, "Public subnets visible")
@@ -435,9 +435,9 @@
 
     def _delete_subnets(self, created_subnets):
         for n in created_subnets:
-            self.client.delete_subnet(n['id'])
+            self.subnets_client.delete_subnet(n['id'])
         # Asserting that the subnets are not found in the list after deletion
-        body = self.client.list_subnets()
+        body = self.subnets_client.list_subnets()
         subnets_list = [subnet['id'] for subnet in body['subnets']]
         for n in created_subnets:
             self.assertNotIn(n['id'], subnets_list)
@@ -496,7 +496,7 @@
         created_subnets = body['subnets']
         self.addCleanup(self._delete_subnets, created_subnets)
         # Asserting that the subnets are found in the list after creation
-        body = self.client.list_subnets()
+        body = self.subnets_client.list_subnets()
         subnets_list = [subnet['id'] for subnet in body['subnets']]
         for n in created_subnets:
             self.assertIsNotNone(n['id'])
@@ -576,7 +576,7 @@
         # Verifies Subnet GW is None in IPv4
         self.assertEqual(subnet2['gateway_ip'], None)
         # Verifies all 2 subnets in the same network
-        body = self.client.list_subnets()
+        body = self.subnets_client.list_subnets()
         subnets = [sub['id'] for sub in body['subnets']
                    if sub['network_id'] == network['id']]
         test_subnet_ids = [sub['id'] for sub in (subnet1, subnet2)]
@@ -621,9 +621,9 @@
                                              'ipv6_address_mode': mode})
         port = self.create_port(slaac_network)
         self.assertIsNotNone(port['fixed_ips'][0]['ip_address'])
-        self.client.delete_subnet(subnet_slaac['id'])
+        self.subnets_client.delete_subnet(subnet_slaac['id'])
         self.subnets.pop()
-        subnets = self.client.list_subnets()
+        subnets = self.subnets_client.list_subnets()
         subnet_ids = [subnet['id'] for subnet in subnets['subnets']]
         self.assertNotIn(subnet_slaac['id'], subnet_ids,
                          "Subnet wasn't deleted")
diff --git a/tempest/api/network/test_networks_negative.py b/tempest/api/network/test_networks_negative.py
index 4d1971f..4fe31cf 100644
--- a/tempest/api/network/test_networks_negative.py
+++ b/tempest/api/network/test_networks_negative.py
@@ -34,7 +34,7 @@
     @test.idempotent_id('d746b40c-5e09-4043-99f7-cba1be8b70df')
     def test_show_non_existent_subnet(self):
         non_exist_id = data_utils.rand_uuid()
-        self.assertRaises(lib_exc.NotFound, self.client.show_subnet,
+        self.assertRaises(lib_exc.NotFound, self.subnets_client.show_subnet,
                           non_exist_id)
 
     @test.attr(type=['negative'])
@@ -64,7 +64,7 @@
     @test.idempotent_id('1cc47884-ac52-4415-a31c-e7ce5474a868')
     def test_update_non_existent_subnet(self):
         non_exist_id = data_utils.rand_uuid()
-        self.assertRaises(lib_exc.NotFound, self.client.update_subnet,
+        self.assertRaises(lib_exc.NotFound, self.subnets_client.update_subnet,
                           non_exist_id, name='new_name')
 
     @test.attr(type=['negative'])
@@ -72,7 +72,7 @@
     def test_delete_non_existent_subnet(self):
         non_exist_id = data_utils.rand_uuid()
         self.assertRaises(lib_exc.NotFound,
-                          self.client.delete_subnet, non_exist_id)
+                          self.subnets_client.delete_subnet, non_exist_id)
 
     @test.attr(type=['negative'])
     @test.idempotent_id('13d3b106-47e6-4b9b-8d53-dae947f092fe')
diff --git a/tempest/api/network/test_ports.py b/tempest/api/network/test_ports.py
index 321473c..6f58075 100644
--- a/tempest/api/network/test_ports.py
+++ b/tempest/api/network/test_ports.py
@@ -106,7 +106,7 @@
         allocation_pools = {'allocation_pools': [{'start': str(address + 4),
                                                   'end': str(address + 6)}]}
         subnet = self.create_subnet(network, **allocation_pools)
-        self.addCleanup(self.client.delete_subnet, subnet['id'])
+        self.addCleanup(self.subnets_client.delete_subnet, subnet['id'])
         body = self.client.create_port(network_id=net_id)
         self.addCleanup(self.client.delete_port, body['port']['id'])
         port = body['port']
@@ -155,7 +155,7 @@
         # Create network and subnet
         network = self.create_network()
         subnet = self.create_subnet(network)
-        self.addCleanup(self.client.delete_subnet, subnet['id'])
+        self.addCleanup(self.subnets_client.delete_subnet, subnet['id'])
         # Create two ports
         port_1 = self.client.create_port(network_id=network['id'])
         self.addCleanup(self.client.delete_port, port_1['port']['id'])
@@ -187,7 +187,7 @@
         network = self.create_network()
         self.addCleanup(self.networks_client.delete_network, network['id'])
         subnet = self.create_subnet(network)
-        self.addCleanup(self.client.delete_subnet, subnet['id'])
+        self.addCleanup(self.subnets_client.delete_subnet, subnet['id'])
         router = self.create_router(data_utils.rand_name('router-'))
         self.addCleanup(self.client.delete_router, router['id'])
         port = self.client.create_port(network_id=network['id'])
@@ -220,9 +220,9 @@
         network = self.create_network()
         self.addCleanup(self.networks_client.delete_network, network['id'])
         subnet_1 = self.create_subnet(network)
-        self.addCleanup(self.client.delete_subnet, subnet_1['id'])
+        self.addCleanup(self.subnets_client.delete_subnet, subnet_1['id'])
         subnet_2 = self.create_subnet(network)
-        self.addCleanup(self.client.delete_subnet, subnet_2['id'])
+        self.addCleanup(self.subnets_client.delete_subnet, subnet_2['id'])
         fixed_ip_1 = [{'subnet_id': subnet_1['id']}]
         fixed_ip_2 = [{'subnet_id': subnet_2['id']}]
 
@@ -247,7 +247,7 @@
 
     def _update_port_with_security_groups(self, security_groups_names):
         subnet_1 = self.create_subnet(self.network)
-        self.addCleanup(self.client.delete_subnet, subnet_1['id'])
+        self.addCleanup(self.subnets_client.delete_subnet, subnet_1['id'])
         fixed_ip_1 = [{'subnet_id': subnet_1['id']}]
 
         security_groups_list = list()
@@ -328,7 +328,7 @@
         network = self.create_network()
         self.addCleanup(self.networks_client.delete_network, network['id'])
         subnet = self.create_subnet(network)
-        self.addCleanup(self.client.delete_subnet, subnet['id'])
+        self.addCleanup(self.subnets_client.delete_subnet, subnet['id'])
         port = self.create_port(network, security_groups=[])
         self.addCleanup(self.client.delete_port, port['id'])
         self.assertIsNotNone(port['security_groups'])
diff --git a/tempest/api/orchestration/stacks/test_neutron_resources.py b/tempest/api/orchestration/stacks/test_neutron_resources.py
index 99c2a97..070150d 100644
--- a/tempest/api/orchestration/stacks/test_neutron_resources.py
+++ b/tempest/api/orchestration/stacks/test_neutron_resources.py
@@ -44,6 +44,7 @@
     def setup_clients(cls):
         super(NeutronResourcesTestJSON, cls).setup_clients()
         cls.network_client = cls.os.network_client
+        cls.subnets_client = cls.os.subnets_client
 
     @classmethod
     def resource_setup(cls):
@@ -130,7 +131,7 @@
     def test_created_subnet(self):
         """Verifies created subnet."""
         subnet_id = self.test_resources.get('Subnet')['physical_resource_id']
-        body = self.network_client.show_subnet(subnet_id)
+        body = self.subnets_client.show_subnet(subnet_id)
         subnet = body['subnet']
         network_id = self.test_resources.get('Network')['physical_resource_id']
         self.assertEqual(subnet_id, subnet['id'])
diff --git a/tempest/api_schema/response/compute/v2_1/aggregates.py b/tempest/api_schema/response/compute/v2_1/aggregates.py
deleted file mode 100644
index 1a9fe41..0000000
--- a/tempest/api_schema/response/compute/v2_1/aggregates.py
+++ /dev/null
@@ -1,92 +0,0 @@
-# Copyright 2014 NEC Corporation.  All rights reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-import copy
-
-# create-aggregate api doesn't have 'hosts' and 'metadata' attributes.
-aggregate_for_create = {
-    'type': 'object',
-    'properties': {
-        'availability_zone': {'type': ['string', 'null']},
-        'created_at': {'type': 'string'},
-        'deleted': {'type': 'boolean'},
-        'deleted_at': {'type': ['string', 'null']},
-        'id': {'type': 'integer'},
-        'name': {'type': 'string'},
-        'updated_at': {'type': ['string', 'null']}
-    },
-    'additionalProperties': False,
-    'required': ['availability_zone', 'created_at', 'deleted',
-                 'deleted_at', 'id', 'name', 'updated_at'],
-}
-
-common_aggregate_info = copy.deepcopy(aggregate_for_create)
-common_aggregate_info['properties'].update({
-    'hosts': {'type': 'array'},
-    'metadata': {'type': 'object'}
-})
-common_aggregate_info['required'].extend(['hosts', 'metadata'])
-
-list_aggregates = {
-    'status_code': [200],
-    'response_body': {
-        'type': 'object',
-        'properties': {
-            'aggregates': {
-                'type': 'array',
-                'items': common_aggregate_info
-            }
-        },
-        'additionalProperties': False,
-        'required': ['aggregates'],
-    }
-}
-
-get_aggregate = {
-    'status_code': [200],
-    'response_body': {
-        'type': 'object',
-        'properties': {
-            'aggregate': common_aggregate_info
-        },
-        'additionalProperties': False,
-        'required': ['aggregate'],
-    }
-}
-
-aggregate_set_metadata = get_aggregate
-# The 'updated_at' attribute of 'update_aggregate' can't be null.
-update_aggregate = copy.deepcopy(get_aggregate)
-update_aggregate['response_body']['properties']['aggregate']['properties'][
-    'updated_at'] = {
-        'type': 'string'
-    }
-
-delete_aggregate = {
-    'status_code': [200]
-}
-
-create_aggregate = {
-    'status_code': [200],
-    'response_body': {
-        'type': 'object',
-        'properties': {
-            'aggregate': aggregate_for_create
-        },
-        'additionalProperties': False,
-        'required': ['aggregate'],
-    }
-}
-
-aggregate_add_remove_host = get_aggregate
diff --git a/tempest/api_schema/response/compute/v2_1/availability_zone.py b/tempest/api_schema/response/compute/v2_1/availability_zone.py
deleted file mode 100644
index d9aebce..0000000
--- a/tempest/api_schema/response/compute/v2_1/availability_zone.py
+++ /dev/null
@@ -1,78 +0,0 @@
-# Copyright 2014 NEC Corporation.  All rights reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-import copy
-
-
-base = {
-    'status_code': [200],
-    'response_body': {
-        'type': 'object',
-        'properties': {
-            'availabilityZoneInfo': {
-                'type': 'array',
-                'items': {
-                    'type': 'object',
-                    'properties': {
-                        'zoneName': {'type': 'string'},
-                        'zoneState': {
-                            'type': 'object',
-                            'properties': {
-                                'available': {'type': 'boolean'}
-                            },
-                            'additionalProperties': False,
-                            'required': ['available']
-                        },
-                        # NOTE: Here is the difference between detail and
-                        # non-detail.
-                        'hosts': {'type': 'null'}
-                    },
-                    'additionalProperties': False,
-                    'required': ['zoneName', 'zoneState', 'hosts']
-                }
-            }
-        },
-        'additionalProperties': False,
-        'required': ['availabilityZoneInfo']
-    }
-}
-
-detail = {
-    'type': 'object',
-    'patternProperties': {
-        # NOTE: Here is for a hostname
-        '^[a-zA-Z0-9-_.]+$': {
-            'type': 'object',
-            'patternProperties': {
-                # NOTE: Here is for a service name
-                '^.*$': {
-                    'type': 'object',
-                    'properties': {
-                        'available': {'type': 'boolean'},
-                        'active': {'type': 'boolean'},
-                        'updated_at': {'type': ['string', 'null']}
-                    },
-                    'additionalProperties': False,
-                    'required': ['available', 'active', 'updated_at']
-                }
-            }
-        }
-    }
-}
-
-list_availability_zone_list = copy.deepcopy(base)
-
-list_availability_zone_list_detail = copy.deepcopy(base)
-list_availability_zone_list_detail['response_body']['properties'][
-    'availabilityZoneInfo']['items']['properties']['hosts'] = detail
diff --git a/tempest/api_schema/response/compute/v2_1/baremetal_nodes.py b/tempest/api_schema/response/compute/v2_1/baremetal_nodes.py
deleted file mode 100644
index d1ee877..0000000
--- a/tempest/api_schema/response/compute/v2_1/baremetal_nodes.py
+++ /dev/null
@@ -1,63 +0,0 @@
-# Copyright 2015 NEC Corporation.  All rights reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-import copy
-
-node = {
-    'type': 'object',
-    'properties': {
-        'id': {'type': 'string'},
-        'interfaces': {'type': 'array'},
-        'host': {'type': 'string'},
-        'task_state': {'type': ['string', 'null']},
-        'cpus': {'type': ['integer', 'string']},
-        'memory_mb': {'type': ['integer', 'string']},
-        'disk_gb': {'type': ['integer', 'string']},
-    },
-    'additionalProperties': False,
-    'required': ['id', 'interfaces', 'host', 'task_state', 'cpus', 'memory_mb',
-                 'disk_gb']
-}
-
-list_baremetal_nodes = {
-    'status_code': [200],
-    'response_body': {
-        'type': 'object',
-        'properties': {
-            'nodes': {
-                'type': 'array',
-                'items': node
-            }
-        },
-        'additionalProperties': False,
-        'required': ['nodes']
-    }
-}
-
-baremetal_node = {
-    'status_code': [200],
-    'response_body': {
-        'type': 'object',
-        'properties': {
-            'node': node
-        },
-        'additionalProperties': False,
-        'required': ['node']
-    }
-}
-get_baremetal_node = copy.deepcopy(baremetal_node)
-get_baremetal_node['response_body']['properties']['node'][
-    'properties'].update({'instance_uuid': {'type': ['string', 'null']}})
-get_baremetal_node['response_body']['properties']['node'][
-    'required'].append('instance_uuid')
diff --git a/tempest/api_schema/response/compute/v2_1/certificates.py b/tempest/api_schema/response/compute/v2_1/certificates.py
deleted file mode 100644
index 4e7cbe4..0000000
--- a/tempest/api_schema/response/compute/v2_1/certificates.py
+++ /dev/null
@@ -1,41 +0,0 @@
-# Copyright 2014 NEC Corporation.  All rights reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-import copy
-
-_common_schema = {
-    'status_code': [200],
-    'response_body': {
-        'type': 'object',
-        'properties': {
-            'certificate': {
-                'type': 'object',
-                'properties': {
-                    'data': {'type': 'string'},
-                    'private_key': {'type': 'string'},
-                },
-                'additionalProperties': False,
-                'required': ['data', 'private_key']
-            }
-        },
-        'additionalProperties': False,
-        'required': ['certificate']
-    }
-}
-
-get_certificate = copy.deepcopy(_common_schema)
-get_certificate['response_body']['properties']['certificate'][
-    'properties']['private_key'].update({'type': 'null'})
-
-create_certificate = copy.deepcopy(_common_schema)
diff --git a/tempest/api_schema/response/compute/v2_1/extensions.py b/tempest/api_schema/response/compute/v2_1/extensions.py
deleted file mode 100644
index a6a455c..0000000
--- a/tempest/api_schema/response/compute/v2_1/extensions.py
+++ /dev/null
@@ -1,47 +0,0 @@
-# Copyright 2014 NEC Corporation.  All rights reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-list_extensions = {
-    'status_code': [200],
-    'response_body': {
-        'type': 'object',
-        'properties': {
-            'extensions': {
-                'type': 'array',
-                'items': {
-                    'type': 'object',
-                    'properties': {
-                        'updated': {
-                            'type': 'string',
-                            'format': 'data-time'
-                        },
-                        'name': {'type': 'string'},
-                        'links': {'type': 'array'},
-                        'namespace': {
-                            'type': 'string',
-                            'format': 'uri'
-                        },
-                        'alias': {'type': 'string'},
-                        'description': {'type': 'string'}
-                    },
-                    'additionalProperties': False,
-                    'required': ['updated', 'name', 'links', 'namespace',
-                                 'alias', 'description']
-                }
-            }
-        },
-        'additionalProperties': False,
-        'required': ['extensions']
-    }
-}
diff --git a/tempest/clients.py b/tempest/clients.py
index cffdc3f..19d3000 100644
--- a/tempest/clients.py
+++ b/tempest/clients.py
@@ -17,6 +17,15 @@
 
 from oslo_log import log as logging
 from tempest_lib.services.compute.agents_client import AgentsClient
+from tempest_lib.services.compute.aggregates_client import AggregatesClient
+from tempest_lib.services.compute.availability_zone_client import \
+    AvailabilityZoneClient
+from tempest_lib.services.compute.baremetal_nodes_client import \
+    BaremetalNodesClient
+from tempest_lib.services.compute.certificates_client import \
+    CertificatesClient
+from tempest_lib.services.compute.extensions_client import \
+    ExtensionsClient
 from tempest_lib.services.identity.v2.token_client import TokenClient
 from tempest_lib.services.identity.v3.token_client import V3TokenClient
 
@@ -28,16 +37,6 @@
 from tempest.services.baremetal.v1.json.baremetal_client import \
     BaremetalClient
 from tempest.services import botoclients
-from tempest.services.compute.json.aggregates_client import \
-    AggregatesClient
-from tempest.services.compute.json.availability_zone_client import \
-    AvailabilityZoneClient
-from tempest.services.compute.json.baremetal_nodes_client import \
-    BaremetalNodesClient
-from tempest.services.compute.json.certificates_client import \
-    CertificatesClient
-from tempest.services.compute.json.extensions_client import \
-    ExtensionsClient
 from tempest.services.compute.json.fixed_ips_client import FixedIPsClient
 from tempest.services.compute.json.flavors_client import FlavorsClient
 from tempest.services.compute.json.floating_ip_pools_client import \
@@ -108,6 +107,7 @@
     MessagingClient
 from tempest.services.network.json.network_client import NetworkClient
 from tempest.services.network.json.networks_client import NetworksClient
+from tempest.services.network.json.subnets_client import SubnetsClient
 from tempest.services.object_storage.account_client import AccountClient
 from tempest.services.object_storage.container_client import ContainerClient
 from tempest.services.object_storage.object_client import ObjectClient
@@ -205,6 +205,14 @@
             build_interval=CONF.network.build_interval,
             build_timeout=CONF.network.build_timeout,
             **self.default_params)
+        self.subnets_client = SubnetsClient(
+            self.auth_provider,
+            CONF.network.catalog_type,
+            CONF.network.region or CONF.identity.region,
+            endpoint_type=CONF.network.endpoint_type,
+            build_interval=CONF.network.build_interval,
+            build_timeout=CONF.network.build_timeout,
+            **self.default_params)
         self.messaging_client = MessagingClient(
             self.auth_provider,
             CONF.messaging.catalog_type,
diff --git a/tempest/cmd/account_generator.py b/tempest/cmd/account_generator.py
index 02c6e7f..a90b0ce 100755
--- a/tempest/cmd/account_generator.py
+++ b/tempest/cmd/account_generator.py
@@ -94,6 +94,7 @@
 from tempest.services.identity.v2.json import identity_client
 from tempest.services.network.json import network_client
 from tempest.services.network.json import networks_client
+from tempest.services.network.json import subnets_client
 import tempest_lib.auth
 from tempest_lib.common.utils import data_utils
 import tempest_lib.exceptions
@@ -138,6 +139,7 @@
     )
     network_admin = None
     networks_admin = None
+    subnets_admin = None
     neutron_iso_networks = False
     if (CONF.service_available.neutron and
         CONF.auth.create_isolated_networks):
@@ -154,12 +156,19 @@
             CONF.network.region or CONF.identity.region,
             endpoint_type='adminURL',
             **params)
-    return identity_admin, neutron_iso_networks, network_admin, networks_admin
+        subnets_admin = subnets_client.SubnetsClient(
+            _auth,
+            CONF.network.catalog_type,
+            CONF.network.region or CONF.identity.region,
+            endpoint_type='adminURL',
+            **params)
+    return (identity_admin, neutron_iso_networks, network_admin,
+            networks_admin, subnets_admin)
 
 
 def create_resources(opts, resources):
     (identity_admin, neutron_iso_networks,
-     network_admin, networks_admin) = get_admin_clients(opts)
+     network_admin, networks_admin, subnets_admin) = get_admin_clients(opts)
     roles = identity_admin.list_roles()['roles']
     for u in resources['users']:
         u['role_ids'] = []
@@ -202,7 +211,8 @@
         for u in resources['users']:
             tenant = identity_admin.get_tenant_by_name(u['tenant'])
             network_name, router_name = create_network_resources(
-                network_admin, networks_admin, tenant['id'], u['name'])
+                network_admin, networks_admin, subnets_admin, tenant['id'],
+                u['name'])
             u['network'] = network_name
             u['router'] = router_name
         LOG.info('Networks created')
@@ -229,7 +239,7 @@
 
 
 def create_network_resources(network_admin_client, networks_admin_client,
-                             tenant_id, name):
+                             subnets_admin_client, tenant_id, name):
 
     def _create_network(name):
         resp_body = networks_admin_client.create_network(
@@ -241,7 +251,7 @@
         mask_bits = CONF.network.tenant_network_mask_bits
         for subnet_cidr in base_cidr.subnet(mask_bits):
             try:
-                resp_body = network_admin_client.\
+                resp_body = subnets_admin_client.\
                     create_subnet(
                         network_id=network_id, cidr=str(subnet_cidr),
                         name=subnet_name,
diff --git a/tempest/cmd/cleanup_service.py b/tempest/cmd/cleanup_service.py
index 6c79abc..64e1303 100644
--- a/tempest/cmd/cleanup_service.py
+++ b/tempest/cmd/cleanup_service.py
@@ -382,6 +382,7 @@
         super(NetworkService, self).__init__(kwargs)
         self.client = manager.network_client
         self.networks_client = manager.networks_client
+        self.subnets_client = manager.subnets_client
 
     def _filter_by_conf_networks(self, item_list):
         if not item_list or not all(('network_id' in i for i in item_list)):
@@ -676,7 +677,7 @@
 class NetworkSubnetService(NetworkService):
 
     def list(self):
-        client = self.client
+        client = self.subnets_client
         subnets = client.list_subnets(**self.tenant_filter)
         subnets = subnets['subnets']
         if self.is_preserve:
@@ -685,7 +686,7 @@
         return subnets
 
     def delete(self):
-        client = self.client
+        client = self.subnets_client
         subnets = self.list()
         for subnet in subnets:
             try:
diff --git a/tempest/cmd/javelin.py b/tempest/cmd/javelin.py
index 2dbcd98..d9588b3 100755
--- a/tempest/cmd/javelin.py
+++ b/tempest/cmd/javelin.py
@@ -129,6 +129,7 @@
 from tempest.services.identity.v2.json import identity_client
 from tempest.services.image.v2.json import image_client
 from tempest.services.network.json import network_client
+from tempest.services.network.json import subnets_client
 from tempest.services.object_storage import container_client
 from tempest.services.object_storage import object_client
 from tempest.services.telemetry.json import telemetry_client
@@ -240,6 +241,14 @@
             build_interval=CONF.network.build_interval,
             build_timeout=CONF.network.build_timeout,
             **default_params)
+        self.subnets = subnets_client.SubnetsClient(
+            _auth,
+            CONF.network.catalog_type,
+            CONF.network.region or CONF.identity.region,
+            endpoint_type=CONF.network.endpoint_type,
+            build_interval=CONF.network.build_interval,
+            build_timeout=CONF.network.build_timeout,
+            **default_params)
 
 
 def load_resources(fname):
@@ -769,9 +778,9 @@
     LOG.info("Destroying subnets")
     for subnet in subnets:
         client = client_for_user(subnet['owner'])
-        subnet_id = _get_resource_by_name(client.networks,
+        subnet_id = _get_resource_by_name(client.subnets,
                                           'subnets', subnet['name'])['id']
-        client.networks.delete_subnet(subnet_id)
+        client.subnets.delete_subnet(subnet_id)
 
 
 def create_routers(routers):
diff --git a/tempest/common/dynamic_creds.py b/tempest/common/dynamic_creds.py
index f0b6625..8ff189a 100644
--- a/tempest/common/dynamic_creds.py
+++ b/tempest/common/dynamic_creds.py
@@ -41,8 +41,9 @@
             'identity_admin', fill_in=True,
             identity_version=self.identity_version)
         (self.identity_admin_client, self.network_admin_client,
-         self.networks_admin_client) = self._get_admin_clients()
-        # Domain where dynamic credentials are provisioned (v3 only).
+         self.networks_admin_client,
+         self.subnets_admin_client) = self._get_admin_clients()
+        # Domain where isolated credentials are provisioned (v3 only).
         # Use that of the admin account is None is configured.
         self.creds_domain_name = None
         if self.identity_version == 'v3':
@@ -61,9 +62,11 @@
         """
         os = clients.Manager(self.default_admin_creds)
         if self.identity_version == 'v2':
-            return os.identity_client, os.network_client, os.networks_client
+            return (os.identity_client, os.network_client, os.networks_client,
+                    os.subnets_client)
         else:
-            return os.identity_v3_client, os.network_client, os.networks_client
+            return (os.identity_v3_client, os.network_client,
+                    os.networks_client, os.subnets_client)
 
     def _create_creds(self, suffix="", admin=False, roles=None):
         """Create random credentials under the following schema.
@@ -168,7 +171,7 @@
         for subnet_cidr in base_cidr.subnet(mask_bits):
             try:
                 if self.network_resources:
-                    resp_body = self.network_admin_client.\
+                    resp_body = self.subnets_admin_client.\
                         create_subnet(
                             network_id=network_id, cidr=str(subnet_cidr),
                             name=subnet_name,
@@ -176,7 +179,7 @@
                             enable_dhcp=self.network_resources['dhcp'],
                             ip_version=4)
                 else:
-                    resp_body = self.network_admin_client.\
+                    resp_body = self.subnets_admin_client.\
                         create_subnet(network_id=network_id,
                                       cidr=str(subnet_cidr),
                                       name=subnet_name,
@@ -260,9 +263,9 @@
                      router_name)
 
     def _clear_isolated_subnet(self, subnet_id, subnet_name):
-        net_client = self.network_admin_client
+        client = self.subnets_admin_client
         try:
-            net_client.delete_subnet(subnet_id)
+            client.delete_subnet(subnet_id)
         except lib_exc.NotFound:
             LOG.warn('subnet with name: %s not found for delete' %
                      subnet_name)
diff --git a/tempest/config.py b/tempest/config.py
index b9c8aa7..0cda018 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -483,7 +483,16 @@
     cfg.IntOpt('build_interval',
                default=1,
                help="Time in seconds between image operation status "
-                    "checks.")
+                    "checks."),
+    cfg.ListOpt('container_formats',
+                default=['ami', 'ari', 'aki', 'bare', 'ovf', 'ova'],
+                help="A list of image's container formats "
+                     "users can specify."),
+    cfg.ListOpt('disk_formats',
+                default=['ami', 'ari', 'aki', 'vhd', 'vmdk', 'raw', 'qcow2',
+                         'vdi', 'iso'],
+                help="A list of image's disk formats "
+                     "users can specify.")
 ]
 
 image_feature_group = cfg.OptGroup(name='image-feature-enabled',
@@ -929,29 +938,32 @@
 ]
 
 
-data_processing_group = cfg.OptGroup(name="data_processing",
+data_processing_group = cfg.OptGroup(name="data-processing",
                                      title="Data Processing options")
 
 DataProcessingGroup = [
     cfg.StrOpt('catalog_type',
-               default='data_processing',
+               default='data-processing',
+               deprecated_group="data_processing",
                help="Catalog type of the data processing service."),
     cfg.StrOpt('endpoint_type',
                default='publicURL',
                choices=['public', 'admin', 'internal',
                         'publicURL', 'adminURL', 'internalURL'],
+               deprecated_group="data_processing",
                help="The endpoint type to use for the data processing "
                     "service."),
 ]
 
 
 data_processing_feature_group = cfg.OptGroup(
-    name="data_processing-feature-enabled",
+    name="data-processing-feature-enabled",
     title="Enabled Data Processing features")
 
 DataProcessingFeaturesGroup = [
     cfg.ListOpt('plugins',
                 default=["vanilla", "hdp"],
+                deprecated_group="data_processing-feature-enabled",
                 help="List of enabled data processing plugins")
 ]
 
@@ -1297,9 +1309,7 @@
 class TempestConfigPrivate(object):
     """Provides OpenStack configuration information."""
 
-    DEFAULT_CONFIG_DIR = os.path.join(
-        os.path.abspath(os.path.dirname(os.path.dirname(__file__))),
-        "etc")
+    DEFAULT_CONFIG_DIR = os.path.join(os.getcwd(), "etc")
 
     DEFAULT_CONFIG_FILE = "tempest.conf"
 
@@ -1329,9 +1339,9 @@
         self.telemetry = _CONF.telemetry
         self.telemetry_feature_enabled = _CONF['telemetry-feature-enabled']
         self.dashboard = _CONF.dashboard
-        self.data_processing = _CONF.data_processing
+        self.data_processing = _CONF['data-processing']
         self.data_processing_feature_enabled = _CONF[
-            'data_processing-feature-enabled']
+            'data-processing-feature-enabled']
         self.boto = _CONF.boto
         self.stress = _CONF.stress
         self.scenario = _CONF.scenario
diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py
index fd84570..036914e 100644
--- a/tempest/scenario/manager.py
+++ b/tempest/scenario/manager.py
@@ -62,6 +62,7 @@
         # Neutron network client
         cls.network_client = cls.manager.network_client
         cls.networks_client = cls.manager.networks_client
+        cls.subnets_client = cls.manager.subnets_client
         # Heat client
         cls.orchestration_client = cls.manager.orchestration_client
 
@@ -494,9 +495,23 @@
                                     stdout=subprocess.PIPE,
                                     stderr=subprocess.PIPE)
             proc.communicate()
+
             return (proc.returncode == 0) == should_succeed
 
-        return tempest.test.call_until_true(ping, timeout, 1)
+        caller = misc_utils.find_test_caller()
+        LOG.debug('%(caller)s begins to ping %(ip)s in %(timeout)s sec and the'
+                  ' expected result is %(should_succeed)s' % {
+                      'caller': caller, 'ip': ip_address, 'timeout': timeout,
+                      'should_succeed':
+                      'reachable' if should_succeed else 'unreachable'
+                  })
+        result = tempest.test.call_until_true(ping, timeout, 1)
+        LOG.debug('%(caller)s finishes ping %(ip)s in %(timeout)s sec and the '
+                  'ping result is %(result)s' % {
+                      'caller': caller, 'ip': ip_address, 'timeout': timeout,
+                      'result': 'expected' if result else 'unexpected'
+                  })
+        return result
 
     def check_vm_connectivity(self, ip_address,
                               username=None,
@@ -630,7 +645,7 @@
 
     def _list_subnets(self, *args, **kwargs):
         """List subnets using admin creds """
-        subnets_list = self.admin_manager.network_client.list_subnets(
+        subnets_list = self.admin_manager.subnets_client.list_subnets(
             *args, **kwargs)
         return subnets_list['subnets']
 
@@ -652,14 +667,16 @@
             *args, **kwargs)
         return agents_list['agents']
 
-    def _create_subnet(self, network, client=None, namestart='subnet-smoke',
-                       **kwargs):
+    def _create_subnet(self, network, client=None, subnets_client=None,
+                       namestart='subnet-smoke', **kwargs):
         """
         Create a subnet for the given network within the cidr block
         configured for tenant networks.
         """
         if not client:
             client = self.network_client
+        if not subnets_client:
+            subnets_client = self.subnets_client
 
         def cidr_in_use(cidr, tenant_id):
             """
@@ -697,15 +714,16 @@
                 **kwargs
             )
             try:
-                result = client.create_subnet(**subnet)
+                result = subnets_client.create_subnet(**subnet)
                 break
             except lib_exc.Conflict as e:
                 is_overlapping_cidr = 'overlaps with another subnet' in str(e)
                 if not is_overlapping_cidr:
                     raise
         self.assertIsNotNone(result, 'Unable to allocate tenant network')
-        subnet = net_resources.DeletableSubnet(client=client,
-                                               **result['subnet'])
+        subnet = net_resources.DeletableSubnet(
+            network_client=client, subnets_client=subnets_client,
+            **result['subnet'])
         self.assertEqual(subnet.cidr, str_cidr)
         self.addCleanup(self.delete_wrapper, subnet.delete)
         return subnet
@@ -726,7 +744,7 @@
         return port
 
     def _get_server_port_id_and_ip4(self, server, ip_addr=None):
-        ports = self._list_ports(device_id=server['id'],
+        ports = self._list_ports(device_id=server['id'], status='ACTIVE',
                                  fixed_ip=ip_addr)
         # it might happen here that this port has more then one ip address
         # as in case of dual stack- when this port is created on 2 subnets
@@ -1062,7 +1080,8 @@
         self.assertEqual(admin_state_up, router.admin_state_up)
 
     def create_networks(self, client=None, networks_client=None,
-                        tenant_id=None, dns_nameservers=None):
+                        subnets_client=None, tenant_id=None,
+                        dns_nameservers=None):
         """Create a network with a subnet connected to a router.
 
         The baremetal driver is a special case since all nodes are
@@ -1092,7 +1111,8 @@
                 tenant_id=tenant_id)
             router = self._get_router(client=client, tenant_id=tenant_id)
 
-            subnet_kwargs = dict(network=network, client=client)
+            subnet_kwargs = dict(network=network, client=client,
+                                 subnets_client=subnets_client)
             # use explicit check because empty list is a valid option
             if dns_nameservers is not None:
                 subnet_kwargs['dns_nameservers'] = dns_nameservers
diff --git a/tempest/scenario/test_security_groups_basic_ops.py b/tempest/scenario/test_security_groups_basic_ops.py
index a35c0b2..3c11c22 100644
--- a/tempest/scenario/test_security_groups_basic_ops.py
+++ b/tempest/scenario/test_security_groups_basic_ops.py
@@ -291,7 +291,8 @@
     def _create_tenant_network(self, tenant):
         network, subnet, router = self.create_networks(
             client=tenant.manager.network_client,
-            networks_client=tenant.manager.networks_client)
+            networks_client=tenant.manager.networks_client,
+            subnets_client=tenant.manager.subnets_client)
         tenant.set_network(network, subnet, router)
 
     def _set_compute_context(self, tenant):
diff --git a/tempest/services/compute/json/aggregates_client.py b/tempest/services/compute/json/aggregates_client.py
deleted file mode 100644
index c9895db..0000000
--- a/tempest/services/compute/json/aggregates_client.py
+++ /dev/null
@@ -1,100 +0,0 @@
-# Copyright 2013 NEC Corporation.
-# All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-from oslo_serialization import jsonutils as json
-from tempest_lib import exceptions as lib_exc
-
-from tempest.api_schema.response.compute.v2_1 import aggregates as schema
-from tempest.common import service_client
-
-
-class AggregatesClient(service_client.ServiceClient):
-
-    def list_aggregates(self):
-        """Get aggregate list."""
-        resp, body = self.get("os-aggregates")
-        body = json.loads(body)
-        self.validate_response(schema.list_aggregates, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def show_aggregate(self, aggregate_id):
-        """Get details of the given aggregate."""
-        resp, body = self.get("os-aggregates/%s" % aggregate_id)
-        body = json.loads(body)
-        self.validate_response(schema.get_aggregate, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def create_aggregate(self, **kwargs):
-        """Creates a new aggregate."""
-        post_body = json.dumps({'aggregate': kwargs})
-        resp, body = self.post('os-aggregates', post_body)
-
-        body = json.loads(body)
-        self.validate_response(schema.create_aggregate, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def update_aggregate(self, aggregate_id, **kwargs):
-        """Update a aggregate."""
-        put_body = json.dumps({'aggregate': kwargs})
-        resp, body = self.put('os-aggregates/%s' % aggregate_id, put_body)
-
-        body = json.loads(body)
-        self.validate_response(schema.update_aggregate, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def delete_aggregate(self, aggregate_id):
-        """Deletes the given aggregate."""
-        resp, body = self.delete("os-aggregates/%s" % aggregate_id)
-        self.validate_response(schema.delete_aggregate, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def is_resource_deleted(self, id):
-        try:
-            self.show_aggregate(id)
-        except lib_exc.NotFound:
-            return True
-        return False
-
-    @property
-    def resource_type(self):
-        """Returns the primary type of resource this client works with."""
-        return 'aggregate'
-
-    def add_host(self, aggregate_id, **kwargs):
-        """Adds a host to the given aggregate."""
-        post_body = json.dumps({'add_host': kwargs})
-        resp, body = self.post('os-aggregates/%s/action' % aggregate_id,
-                               post_body)
-        body = json.loads(body)
-        self.validate_response(schema.aggregate_add_remove_host, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def remove_host(self, aggregate_id, **kwargs):
-        """Removes a host from the given aggregate."""
-        post_body = json.dumps({'remove_host': kwargs})
-        resp, body = self.post('os-aggregates/%s/action' % aggregate_id,
-                               post_body)
-        body = json.loads(body)
-        self.validate_response(schema.aggregate_add_remove_host, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def set_metadata(self, aggregate_id, **kwargs):
-        """Replaces the aggregate's existing metadata with new metadata."""
-        post_body = json.dumps({'set_metadata': kwargs})
-        resp, body = self.post('os-aggregates/%s/action' % aggregate_id,
-                               post_body)
-        body = json.loads(body)
-        self.validate_response(schema.aggregate_set_metadata, resp, body)
-        return service_client.ResponseBody(resp, body)
diff --git a/tempest/services/compute/json/availability_zone_client.py b/tempest/services/compute/json/availability_zone_client.py
deleted file mode 100644
index 0012637..0000000
--- a/tempest/services/compute/json/availability_zone_client.py
+++ /dev/null
@@ -1,35 +0,0 @@
-# Copyright 2013 NEC Corporation.
-# All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-from oslo_serialization import jsonutils as json
-
-from tempest.api_schema.response.compute.v2_1 import availability_zone \
-    as schema
-from tempest.common import service_client
-
-
-class AvailabilityZoneClient(service_client.ServiceClient):
-
-    def list_availability_zones(self, detail=False):
-        url = 'os-availability-zone'
-        schema_list = schema.list_availability_zone_list
-        if detail:
-            url += '/detail'
-            schema_list = schema.list_availability_zone_list_detail
-
-        resp, body = self.get(url)
-        body = json.loads(body)
-        self.validate_response(schema_list, resp, body)
-        return service_client.ResponseBody(resp, body)
diff --git a/tempest/services/compute/json/baremetal_nodes_client.py b/tempest/services/compute/json/baremetal_nodes_client.py
deleted file mode 100644
index 15f883a..0000000
--- a/tempest/services/compute/json/baremetal_nodes_client.py
+++ /dev/null
@@ -1,44 +0,0 @@
-# Copyright 2015 NEC Corporation.  All rights reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-from oslo_serialization import jsonutils as json
-from six.moves.urllib import parse as urllib
-
-from tempest.api_schema.response.compute.v2_1 import baremetal_nodes \
-    as schema
-from tempest.common import service_client
-
-
-class BaremetalNodesClient(service_client.ServiceClient):
-    """
-    Tests Baremetal API
-    """
-
-    def list_baremetal_nodes(self, **params):
-        """List all baremetal nodes."""
-        url = 'os-baremetal-nodes'
-        if params:
-            url += '?%s' % urllib.urlencode(params)
-        resp, body = self.get(url)
-        body = json.loads(body)
-        self.validate_response(schema.list_baremetal_nodes, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def show_baremetal_node(self, baremetal_node_id):
-        """Returns the details of a single baremetal node."""
-        url = 'os-baremetal-nodes/%s' % baremetal_node_id
-        resp, body = self.get(url)
-        body = json.loads(body)
-        self.validate_response(schema.get_baremetal_node, resp, body)
-        return service_client.ResponseBody(resp, body)
diff --git a/tempest/services/compute/json/certificates_client.py b/tempest/services/compute/json/certificates_client.py
deleted file mode 100644
index d6c72f4..0000000
--- a/tempest/services/compute/json/certificates_client.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright 2013 IBM Corp
-# All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-from oslo_serialization import jsonutils as json
-
-from tempest.api_schema.response.compute.v2_1 import certificates as schema
-from tempest.common import service_client
-
-
-class CertificatesClient(service_client.ServiceClient):
-
-    def show_certificate(self, certificate_id):
-        url = "os-certificates/%s" % certificate_id
-        resp, body = self.get(url)
-        body = json.loads(body)
-        self.validate_response(schema.get_certificate, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def create_certificate(self):
-        """create certificates."""
-        url = "os-certificates"
-        resp, body = self.post(url, None)
-        body = json.loads(body)
-        self.validate_response(schema.create_certificate, resp, body)
-        return service_client.ResponseBody(resp, body)
diff --git a/tempest/services/compute/json/extensions_client.py b/tempest/services/compute/json/extensions_client.py
deleted file mode 100644
index 4741812..0000000
--- a/tempest/services/compute/json/extensions_client.py
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright 2012 OpenStack Foundation
-# All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-from oslo_serialization import jsonutils as json
-
-from tempest.api_schema.response.compute.v2_1 import extensions as schema
-from tempest.common import service_client
-
-
-class ExtensionsClient(service_client.ServiceClient):
-
-    def list_extensions(self):
-        url = 'extensions'
-        resp, body = self.get(url)
-        body = json.loads(body)
-        self.validate_response(schema.list_extensions, resp, body)
-        return service_client.ResponseBody(resp, body)
-
-    def show_extension(self, extension_alias):
-        resp, body = self.get('extensions/%s' % extension_alias)
-        body = json.loads(body)
-        return service_client.ResponseBody(resp, body)
diff --git a/tempest/services/compute/json/servers_client.py b/tempest/services/compute/json/servers_client.py
index 1d2c7b2..e54cfe4 100644
--- a/tempest/services/compute/json/servers_client.py
+++ b/tempest/services/compute/json/servers_client.py
@@ -32,8 +32,8 @@
         self.enable_instance_password = enable_instance_password
 
     def create_server(self, **kwargs):
-        """
-        Creates an instance of a server.
+        """Create server
+
         Most parameters except the following are passed to the API without
         any changes.
         :param disk_config: The name is changed to OS-DCF:diskConfig
@@ -69,7 +69,8 @@
         return service_client.ResponseBody(resp, body)
 
     def update_server(self, server_id, **kwargs):
-        """Updates the properties of an existing server.
+        """Update server
+
         Most parameters except the following are passed to the API without
         any changes.
         :param disk_config: The name is changed to OS-DCF:diskConfig
@@ -84,20 +85,20 @@
         return service_client.ResponseBody(resp, body)
 
     def show_server(self, server_id):
-        """Returns the details of an existing server."""
+        """Get server details"""
         resp, body = self.get("servers/%s" % server_id)
         body = json.loads(body)
         self.validate_response(schema.get_server, resp, body)
         return service_client.ResponseBody(resp, body)
 
     def delete_server(self, server_id):
-        """Deletes the given server."""
+        """Delete server"""
         resp, body = self.delete("servers/%s" % server_id)
         self.validate_response(schema.delete_server, resp, body)
         return service_client.ResponseBody(resp, body)
 
     def list_servers(self, detail=False, **params):
-        """Lists all servers for a user."""
+        """List servers"""
 
         url = 'servers'
         _schema = schema.list_servers
diff --git a/tempest/services/compute/json/services_client.py b/tempest/services/compute/json/services_client.py
index f82a18f..6e2f320 100644
--- a/tempest/services/compute/json/services_client.py
+++ b/tempest/services/compute/json/services_client.py
@@ -33,25 +33,25 @@
         self.validate_response(schema.list_services, resp, body)
         return service_client.ResponseBody(resp, body)
 
-    def enable_service(self, host_name, binary):
+    def enable_service(self, **kwargs):
         """
         Enable service on a host
         host_name: Name of host
         binary: Service binary
         """
-        post_body = json.dumps({'binary': binary, 'host': host_name})
+        post_body = json.dumps(kwargs)
         resp, body = self.put('os-services/enable', post_body)
         body = json.loads(body)
         self.validate_response(schema.enable_disable_service, resp, body)
         return service_client.ResponseBody(resp, body)
 
-    def disable_service(self, host_name, binary):
+    def disable_service(self, **kwargs):
         """
         Disable service on a host
         host_name: Name of host
         binary: Service binary
         """
-        post_body = json.dumps({'binary': binary, 'host': host_name})
+        post_body = json.dumps(kwargs)
         resp, body = self.put('os-services/disable', post_body)
         body = json.loads(body)
         self.validate_response(schema.enable_disable_service, resp, body)
diff --git a/tempest/services/network/json/network_client.py b/tempest/services/network/json/network_client.py
index d766aa5..7821f37 100644
--- a/tempest/services/network/json/network_client.py
+++ b/tempest/services/network/json/network_client.py
@@ -34,28 +34,6 @@
     quotas
     """
 
-    def create_subnet(self, **kwargs):
-        uri = '/subnets'
-        post_data = {'subnet': kwargs}
-        return self.create_resource(uri, post_data)
-
-    def update_subnet(self, subnet_id, **kwargs):
-        uri = '/subnets/%s' % subnet_id
-        post_data = {'subnet': kwargs}
-        return self.update_resource(uri, post_data)
-
-    def show_subnet(self, subnet_id, **fields):
-        uri = '/subnets/%s' % subnet_id
-        return self.show_resource(uri, **fields)
-
-    def delete_subnet(self, subnet_id):
-        uri = '/subnets/%s' % subnet_id
-        return self.delete_resource(uri)
-
-    def list_subnets(self, **filters):
-        uri = '/subnets'
-        return self.list_resources(uri, **filters)
-
     def create_port(self, **kwargs):
         uri = '/ports'
         post_data = {'port': kwargs}
diff --git a/tempest/services/network/json/subnets_client.py b/tempest/services/network/json/subnets_client.py
new file mode 100644
index 0000000..957b606
--- /dev/null
+++ b/tempest/services/network/json/subnets_client.py
@@ -0,0 +1,38 @@
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+from tempest.services.network.json import base
+
+
+class SubnetsClient(base.BaseNetworkClient):
+
+    def create_subnet(self, **kwargs):
+        uri = '/subnets'
+        post_data = {'subnet': kwargs}
+        return self.create_resource(uri, post_data)
+
+    def update_subnet(self, subnet_id, **kwargs):
+        uri = '/subnets/%s' % subnet_id
+        post_data = {'subnet': kwargs}
+        return self.update_resource(uri, post_data)
+
+    def show_subnet(self, subnet_id, **fields):
+        uri = '/subnets/%s' % subnet_id
+        return self.show_resource(uri, **fields)
+
+    def delete_subnet(self, subnet_id):
+        uri = '/subnets/%s' % subnet_id
+        return self.delete_resource(uri)
+
+    def list_subnets(self, **filters):
+        uri = '/subnets'
+        return self.list_resources(uri, **filters)
diff --git a/tempest/services/network/resources.py b/tempest/services/network/resources.py
index 23d936e..16d9823 100644
--- a/tempest/services/network/resources.py
+++ b/tempest/services/network/resources.py
@@ -41,7 +41,9 @@
 
     def __init__(self, *args, **kwargs):
         self.client = kwargs.pop('client', None)
+        self.network_client = kwargs.pop('network_client', None)
         self.networks_client = kwargs.pop('networks_client', None)
+        self.subnets_client = kwargs.pop('subnets_client', None)
         super(DeletableResource, self).__init__(*args, **kwargs)
 
     def __str__(self):
@@ -83,23 +85,23 @@
         self._router_ids = set()
 
     def update(self, *args, **kwargs):
-        result = self.client.update_subnet(self.id,
-                                           *args,
-                                           **kwargs)
+        result = self.subnets_client.update_subnet(self.id,
+                                                   *args,
+                                                   **kwargs)
         return super(DeletableSubnet, self).update(**result['subnet'])
 
     def add_to_router(self, router_id):
         self._router_ids.add(router_id)
-        self.client.add_router_interface_with_subnet_id(router_id,
-                                                        subnet_id=self.id)
+        self.network_client.add_router_interface_with_subnet_id(
+            router_id, subnet_id=self.id)
 
     def delete(self):
         for router_id in self._router_ids.copy():
-            self.client.remove_router_interface_with_subnet_id(
+            self.network_client.remove_router_interface_with_subnet_id(
                 router_id,
                 subnet_id=self.id)
             self._router_ids.remove(router_id)
-        self.client.delete_subnet(self.id)
+        self.subnets_client.delete_subnet(self.id)
 
 
 class DeletableRouter(DeletableResource):
diff --git a/tempest/tests/cmd/test_javelin.py b/tempest/tests/cmd/test_javelin.py
index 4a8f729..fc3d984 100644
--- a/tempest/tests/cmd/test_javelin.py
+++ b/tempest/tests/cmd/test_javelin.py
@@ -380,7 +380,7 @@
 
         javelin.destroy_subnets([self.fake_object])
 
-        mocked_function = self.fake_client.networks.delete_subnet
+        mocked_function = self.fake_client.subnets.delete_subnet
         mocked_function.assert_called_once_with(fake_subnet_id)
 
     def test_destroy_routers(self):
diff --git a/tempest/tests/cmd/test_tempest_init.py b/tempest/tests/cmd/test_tempest_init.py
index 2b868be..1d60c67 100644
--- a/tempest/tests/cmd/test_tempest_init.py
+++ b/tempest/tests/cmd/test_tempest_init.py
@@ -12,8 +12,8 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
-# import mock
 import os
+import shutil
 
 import fixtures
 
@@ -40,6 +40,24 @@
         self.addCleanup(conf_file.close)
         self.assertEqual(conf_file.read(), testr_conf_file)
 
+    def test_generate_sample_config(self):
+        local_dir = self.useFixture(fixtures.TempDir())
+        etc_dir_path = os.path.join(local_dir.path, 'etc/')
+        os.mkdir(etc_dir_path)
+        tmp_dir = self.useFixture(fixtures.TempDir())
+        config_dir = os.path.join(tmp_dir.path, 'config/')
+        shutil.copytree('etc/', config_dir)
+        init_cmd = init.TempestInit(None, None)
+        local_sample_conf_file = os.path.join(etc_dir_path,
+                                              'tempest.conf.sample')
+        # Verify no sample config file exist
+        self.assertFalse(os.path.isfile(local_sample_conf_file))
+        init_cmd.generate_sample_config(local_dir.path, config_dir)
+
+        # Verify sample config file exist with some content
+        self.assertTrue(os.path.isfile(local_sample_conf_file))
+        self.assertGreater(os.path.getsize(local_sample_conf_file), 0)
+
     def test_create_working_dir_with_existing_local_dir(self):
         fake_local_dir = self.useFixture(fixtures.TempDir())
         fake_local_conf_dir = self.useFixture(fixtures.TempDir())
diff --git a/tempest/tests/common/test_service_clients.py b/tempest/tests/common/test_service_clients.py
index e4228a7..4225da8 100644
--- a/tempest/tests/common/test_service_clients.py
+++ b/tempest/tests/common/test_service_clients.py
@@ -17,34 +17,13 @@
 import six
 
 from tempest.services.baremetal.v1.json import baremetal_client
-from tempest.services.compute.json import aggregates_client
-from tempest.services.compute.json import availability_zone_client
-from tempest.services.compute.json import certificates_client
-from tempest.services.compute.json import extensions_client
-from tempest.services.compute.json import fixed_ips_client
-from tempest.services.compute.json import flavors_client
-from tempest.services.compute.json import floating_ip_pools_client
-from tempest.services.compute.json import floating_ips_bulk_client
 from tempest.services.compute.json import floating_ips_client
-from tempest.services.compute.json import hosts_client
-from tempest.services.compute.json import hypervisor_client
-from tempest.services.compute.json import images_client
-from tempest.services.compute.json import instance_usage_audit_log_client
 from tempest.services.compute.json import interfaces_client
-from tempest.services.compute.json import keypairs_client
-from tempest.services.compute.json import limits_client
-from tempest.services.compute.json import migrations_client
-from tempest.services.compute.json import networks_client as nova_net_client
 from tempest.services.compute.json import quota_classes_client
-from tempest.services.compute.json import quotas_client
-from tempest.services.compute.json import security_group_default_rules_client \
-    as nova_secgrop_default_client
 from tempest.services.compute.json import security_group_rules_client
-from tempest.services.compute.json import security_groups_client
 from tempest.services.compute.json import server_groups_client
 from tempest.services.compute.json import servers_client
 from tempest.services.compute.json import services_client
-from tempest.services.compute.json import tenant_usages_client
 from tempest.services.compute.json import volumes_client \
     as compute_volumes_client
 from tempest.services.data_processing.v1_1 import data_processing_client
@@ -108,33 +87,13 @@
     def test_service_client_creations_with_specified_args(self, mock_init):
         test_clients = [
             baremetal_client.BaremetalClient,
-            aggregates_client.AggregatesClient,
-            availability_zone_client.AvailabilityZoneClient,
-            certificates_client.CertificatesClient,
-            extensions_client.ExtensionsClient,
-            fixed_ips_client.FixedIPsClient,
-            flavors_client.FlavorsClient,
-            floating_ip_pools_client.FloatingIPPoolsClient,
-            floating_ips_bulk_client.FloatingIPsBulkClient,
             floating_ips_client.FloatingIPsClient,
-            hosts_client.HostsClient,
-            hypervisor_client.HypervisorClient,
-            images_client.ImagesClient,
-            instance_usage_audit_log_client.InstanceUsagesAuditLogClient,
             interfaces_client.InterfacesClient,
-            keypairs_client.KeyPairsClient,
-            limits_client.LimitsClient,
-            migrations_client.MigrationsClient,
-            nova_net_client.NetworksClient,
-            quotas_client.QuotasClient,
             quota_classes_client.QuotaClassesClient,
-            nova_secgrop_default_client.SecurityGroupDefaultRulesClient,
             security_group_rules_client.SecurityGroupRulesClient,
-            security_groups_client.SecurityGroupsClient,
             server_groups_client.ServerGroupsClient,
             servers_client.ServersClient,
             services_client.ServicesClient,
-            tenant_usages_client.TenantUsagesClient,
             compute_volumes_client.VolumesClient,
             data_processing_client.DataProcessingClient,
             db_flavor_client.DatabaseFlavorsClient,
diff --git a/tempest/tests/services/compute/test_aggregates_client.py b/tempest/tests/services/compute/test_aggregates_client.py
deleted file mode 100644
index e92b76b..0000000
--- a/tempest/tests/services/compute/test_aggregates_client.py
+++ /dev/null
@@ -1,131 +0,0 @@
-# Copyright 2015 NEC Corporation.  All rights reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-from tempest_lib.tests import fake_auth_provider
-
-from tempest.services.compute.json import aggregates_client
-from tempest.tests.services.compute import base
-
-
-class TestAggregatesClient(base.BaseComputeServiceTest):
-    FAKE_SHOW_AGGREGATE = {
-        "aggregate":
-        {
-            "name": "hoge",
-            "availability_zone": None,
-            "deleted": False,
-            "created_at":
-            "2015-07-16T03:07:32.000000",
-            "updated_at": None,
-            "hosts": [],
-            "deleted_at": None,
-            "id": 1,
-            "metadata": {}
-        }
-    }
-
-    FAKE_CREATE_AGGREGATE = {
-        "aggregate":
-        {
-            "name": u'\xf4',
-            "availability_zone": None,
-            "deleted": False,
-            "created_at": "2015-07-21T04:11:18.000000",
-            "updated_at": None,
-            "deleted_at": None,
-            "id": 1
-        }
-    }
-
-    FAKE_UPDATE_AGGREGATE = {
-        "aggregate":
-        {
-            "name": u'\xe9',
-            "availability_zone": None,
-            "deleted": False,
-            "created_at": "2015-07-16T03:07:32.000000",
-            "updated_at": "2015-07-23T05:16:29.000000",
-            "hosts": [],
-            "deleted_at": None,
-            "id": 1,
-            "metadata": {}
-        }
-    }
-
-    def setUp(self):
-        super(TestAggregatesClient, self).setUp()
-        fake_auth = fake_auth_provider.FakeAuthProvider()
-        self.client = aggregates_client.AggregatesClient(
-            fake_auth, 'compute', 'regionOne')
-
-    def _test_list_aggregates(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.list_aggregates,
-            'tempest.common.service_client.ServiceClient.get',
-            {"aggregates": []},
-            bytes_body)
-
-    def test_list_aggregates_with_str_body(self):
-        self._test_list_aggregates()
-
-    def test_list_aggregates_with_bytes_body(self):
-        self._test_list_aggregates(bytes_body=True)
-
-    def _test_show_aggregate(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.show_aggregate,
-            'tempest.common.service_client.ServiceClient.get',
-            self.FAKE_SHOW_AGGREGATE,
-            bytes_body,
-            aggregate_id=1)
-
-    def test_show_aggregate_with_str_body(self):
-        self._test_show_aggregate()
-
-    def test_show_aggregate_with_bytes_body(self):
-        self._test_show_aggregate(bytes_body=True)
-
-    def _test_create_aggregate(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.create_aggregate,
-            'tempest.common.service_client.ServiceClient.post',
-            self.FAKE_CREATE_AGGREGATE,
-            bytes_body,
-            name='hoge')
-
-    def test_create_aggregate_with_str_body(self):
-        self._test_create_aggregate()
-
-    def test_create_aggregate_with_bytes_body(self):
-        self._test_create_aggregate(bytes_body=True)
-
-    def test_delete_aggregate(self):
-        self.check_service_client_function(
-            self.client.delete_aggregate,
-            'tempest.common.service_client.ServiceClient.delete',
-            {}, aggregate_id="1")
-
-    def _test_update_aggregate(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.update_aggregate,
-            'tempest.common.service_client.ServiceClient.put',
-            self.FAKE_UPDATE_AGGREGATE,
-            bytes_body,
-            aggregate_id=1)
-
-    def test_update_aggregate_with_str_body(self):
-        self._test_update_aggregate()
-
-    def test_update_aggregate_with_bytes_body(self):
-        self._test_update_aggregate(bytes_body=True)
diff --git a/tempest/tests/services/compute/test_availability_zone_client.py b/tempest/tests/services/compute/test_availability_zone_client.py
deleted file mode 100644
index e1d94bc..0000000
--- a/tempest/tests/services/compute/test_availability_zone_client.py
+++ /dev/null
@@ -1,82 +0,0 @@
-# Copyright 2015 NEC Corporation.  All rights reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-import copy
-
-from tempest_lib.tests import fake_auth_provider
-
-from tempest.services.compute.json import availability_zone_client
-from tempest.tests.services.compute import base
-
-
-class TestAvailabilityZoneClient(base.BaseComputeServiceTest):
-
-    FAKE_AZ_INFO = {
-        "availabilityZoneInfo":
-        [
-            {
-                "zoneState": {
-                    "available": True
-                },
-                "hosts": None,
-                "zoneName": u'\xf4'
-            }
-        ]
-    }
-
-    FAKE_AZ_DETAILS = {
-        "testhost": {
-            "nova-compute": {
-                "available": True,
-                "active": True,
-                "updated_at": "2015-09-10T07:16:46.000000"
-            }
-        }
-    }
-
-    def setUp(self):
-        super(TestAvailabilityZoneClient, self).setUp()
-        fake_auth = fake_auth_provider.FakeAuthProvider()
-        self.client = availability_zone_client.AvailabilityZoneClient(
-            fake_auth, 'compute', 'regionOne')
-
-    def _test_availability_zones(self, to_utf=False):
-        self.check_service_client_function(
-            self.client.list_availability_zones,
-            'tempest.common.service_client.ServiceClient.get',
-            self.FAKE_AZ_INFO,
-            to_utf)
-
-    def _test_availability_zones_with_details(self, to_utf=False):
-        fake_az_details = copy.deepcopy(self.FAKE_AZ_INFO)
-        fake_az_details['availabilityZoneInfo'][0]['hosts'] = \
-            self.FAKE_AZ_DETAILS
-        self.check_service_client_function(
-            self.client.list_availability_zones,
-            'tempest.common.service_client.ServiceClient.get',
-            fake_az_details,
-            to_utf,
-            detail=True)
-
-    def test_list_availability_zones_with_str_body(self):
-        self._test_availability_zones()
-
-    def test_list_availability_zones_with_bytes_body(self):
-        self._test_availability_zones(True)
-
-    def test_list_availability_zones_with_str_body_and_details(self):
-        self._test_availability_zones_with_details()
-
-    def test_list_availability_zones_with_bytes_body_and_details(self):
-        self._test_availability_zones_with_details(True)
diff --git a/tempest/tests/services/compute/test_baremetal_nodes_client.py b/tempest/tests/services/compute/test_baremetal_nodes_client.py
deleted file mode 100644
index 86c035c..0000000
--- a/tempest/tests/services/compute/test_baremetal_nodes_client.py
+++ /dev/null
@@ -1,75 +0,0 @@
-# Copyright 2015 NEC Corporation.  All rights reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-import copy
-
-from tempest_lib.tests import fake_auth_provider
-
-from tempest.services.compute.json import baremetal_nodes_client
-from tempest.tests.services.compute import base
-
-
-class TestBareMetalNodesClient(base.BaseComputeServiceTest):
-
-    FAKE_NODE_INFO = {'cpus': '8',
-                      'disk_gb': '64',
-                      'host': '10.0.2.15',
-                      'id': 'Identifier',
-                      'instance_uuid': "null",
-                      'interfaces': [
-                          {
-                              "address": "20::01",
-                              "datapath_id": "null",
-                              "id": 1,
-                              "port_no": None
-                          }
-                      ],
-                      'memory_mb': '8192',
-                      'task_state': None}
-
-    def setUp(self):
-        super(TestBareMetalNodesClient, self).setUp()
-        fake_auth = fake_auth_provider.FakeAuthProvider()
-        self.baremetal_nodes_client = (baremetal_nodes_client.
-                                       BaremetalNodesClient
-                                       (fake_auth, 'compute',
-                                        'regionOne'))
-
-    def _test_bareMetal_nodes(self, operation='list', bytes_body=False):
-        if operation != 'list':
-            expected = {"node": self.FAKE_NODE_INFO}
-            function = self.baremetal_nodes_client.show_baremetal_node
-        else:
-            node_info = copy.deepcopy(self.FAKE_NODE_INFO)
-            del node_info['instance_uuid']
-            expected = {"nodes": [node_info]}
-            function = self.baremetal_nodes_client.list_baremetal_nodes
-
-        self.check_service_client_function(
-            function,
-            'tempest.common.service_client.ServiceClient.get',
-            expected, bytes_body, 200,
-            baremetal_node_id='Identifier')
-
-    def test_list_bareMetal_nodes_with_str_body(self):
-        self._test_bareMetal_nodes()
-
-    def test_list_bareMetal_nodes_with_bytes_body(self):
-        self._test_bareMetal_nodes(bytes_body=True)
-
-    def test_show_bareMetal_node_with_str_body(self):
-        self._test_bareMetal_nodes('show')
-
-    def test_show_bareMetal_node_with_bytes_body(self):
-        self._test_bareMetal_nodes('show', True)
diff --git a/tempest/tests/services/compute/test_certificates_client.py b/tempest/tests/services/compute/test_certificates_client.py
deleted file mode 100644
index 2ba90d0..0000000
--- a/tempest/tests/services/compute/test_certificates_client.py
+++ /dev/null
@@ -1,65 +0,0 @@
-# Copyright 2015 NEC Corporation.  All rights reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-import copy
-
-from tempest_lib.tests import fake_auth_provider
-
-from tempest.services.compute.json import certificates_client
-from tempest.tests.services.compute import base
-
-
-class TestCertificatesClient(base.BaseComputeServiceTest):
-
-    FAKE_CERTIFICATE = {
-        "certificate": {
-            "data": "-----BEGIN----MIICyzCCAjSgAwI----END CERTIFICATE-----\n",
-            "private_key": None
-        }
-    }
-
-    def setUp(self):
-        super(TestCertificatesClient, self).setUp()
-        fake_auth = fake_auth_provider.FakeAuthProvider()
-        self.client = certificates_client.CertificatesClient(
-            fake_auth, 'compute', 'regionOne')
-
-    def _test_show_certificate(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.show_certificate,
-            'tempest.common.service_client.ServiceClient.get',
-            self.FAKE_CERTIFICATE,
-            bytes_body,
-            certificate_id="fake-id")
-
-    def test_show_certificate_with_str_body(self):
-        self._test_show_certificate()
-
-    def test_show_certificate_with_bytes_body(self):
-        self._test_show_certificate(bytes_body=True)
-
-    def _test_create_certificate(self, bytes_body=False):
-        cert = copy.deepcopy(self.FAKE_CERTIFICATE)
-        cert['certificate']['private_key'] = "my_private_key"
-        self.check_service_client_function(
-            self.client.create_certificate,
-            'tempest.common.service_client.ServiceClient.post',
-            cert,
-            bytes_body)
-
-    def test_create_certificate_with_str_body(self):
-        self._test_create_certificate()
-
-    def test_create_certificate_with_bytes_body(self):
-        self._test_create_certificate(bytes_body=True)
diff --git a/tempest/tests/services/compute/test_extensions_client.py b/tempest/tests/services/compute/test_extensions_client.py
deleted file mode 100644
index 21efc52..0000000
--- a/tempest/tests/services/compute/test_extensions_client.py
+++ /dev/null
@@ -1,66 +0,0 @@
-# Copyright 2015 NEC Corporation.  All rights reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-from tempest_lib.tests import fake_auth_provider
-
-from tempest.services.compute.json import extensions_client
-from tempest.tests.services.compute import base
-
-
-class TestExtensionsClient(base.BaseComputeServiceTest):
-
-    FAKE_SHOW_EXTENSION = {
-        "extension": {
-            "updated": "2011-06-09T00:00:00Z",
-            "name": "Multinic",
-            "links": [],
-            "namespace":
-            "http://docs.openstack.org/compute/ext/multinic/api/v1.1",
-            "alias": "NMN",
-            "description": u'\u2740(*\xb4\u25e1`*)\u2740'
-        }
-    }
-
-    def setUp(self):
-        super(TestExtensionsClient, self).setUp()
-        fake_auth = fake_auth_provider.FakeAuthProvider()
-        self.client = extensions_client.ExtensionsClient(
-            fake_auth, 'compute', 'regionOne')
-
-    def _test_list_extensions(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.list_extensions,
-            'tempest.common.service_client.ServiceClient.get',
-            {"extensions": []},
-            bytes_body)
-
-    def test_list_extensions_with_str_body(self):
-        self._test_list_extensions()
-
-    def test_list_extensions_with_bytes_body(self):
-        self._test_list_extensions(bytes_body=True)
-
-    def _test_show_extension(self, bytes_body=False):
-        self.check_service_client_function(
-            self.client.show_extension,
-            'tempest.common.service_client.ServiceClient.get',
-            self.FAKE_SHOW_EXTENSION,
-            bytes_body,
-            extension_alias="NMN")
-
-    def test_show_extension_with_str_body(self):
-        self._test_show_extension()
-
-    def test_show_extension_with_bytes_body(self):
-        self._test_show_extension(bytes_body=True)
diff --git a/tempest/tests/services/compute/test_servers_client.py b/tempest/tests/services/compute/test_servers_client.py
index 5813318..e347cf1 100644
--- a/tempest/tests/services/compute/test_servers_client.py
+++ b/tempest/tests/services/compute/test_servers_client.py
@@ -77,7 +77,7 @@
             }
         ],
         "metadata": {
-            u"My Server Nu\1234me": u"Apau\1234che1"
+            u"My Server N\u1234me": u"Apa\u1234che1"
         },
         "name": u"new\u1234-server-test",
         "progress": 0,
@@ -87,7 +87,37 @@
         "user_id": "fake"}
     }
 
+    FAKE_SERVER_POST = {"server": {
+        "id": "616fb98f-46ca-475e-917e-2563e5a8cd19",
+        "adminPass": "fake-admin-pass",
+        "security_groups": [
+            'fake-security-group-1',
+            'fake-security-group-2'
+        ],
+        "links": [
+            {
+                "href": "http://os.co/v2/616fb98f-46ca-475e-917e-2563e5a8cd19",
+                "rel": "self"
+            },
+            {
+                "href": "http://os.co/616fb98f-46ca-475e-917e-2563e5a8cd19",
+                "rel": "bookmark"
+            }
+        ],
+        "OS-DCF:diskConfig": "fake-disk-config"}
+    }
+
+    FAKE_ADDRESS = {"addresses": {
+        "private": [
+            {
+                "addr": "192.168.0.3",
+                "version": 4
+            }
+        ]}
+    }
+
     server_id = FAKE_SERVER_GET['server']['id']
+    network_id = 'a6b0875b-6b5d-4a5a-81eb-0c3aa62e5fdb'
 
     def setUp(self):
         super(TestServersClient, self).setUp()
@@ -131,3 +161,52 @@
             status=204,
             server_id=self.server_id
             )
+
+    def test_create_server_with_str_body(self):
+        self._test_create_server()
+
+    def test_create_server_with_bytes_body(self):
+        self._test_create_server(True)
+
+    def _test_create_server(self, bytes_body=False):
+        self.check_service_client_function(
+            self.client.create_server,
+            'tempest.common.service_client.ServiceClient.post',
+            self.FAKE_SERVER_POST,
+            bytes_body,
+            status=202,
+            name='fake-name',
+            imageRef='fake-image-ref',
+            flavorRef='fake-flavor-ref'
+            )
+
+    def test_list_addresses_with_str_body(self):
+        self._test_list_addresses()
+
+    def test_list_addresses_with_bytes_body(self):
+        self._test_list_addresses(True)
+
+    def _test_list_addresses(self, bytes_body=False):
+        self.check_service_client_function(
+            self.client.list_addresses,
+            'tempest.common.service_client.ServiceClient.get',
+            self.FAKE_ADDRESS,
+            bytes_body,
+            server_id=self.server_id
+            )
+
+    def test_list_addresses_by_network_with_str_body(self):
+        self._test_list_addresses_by_network()
+
+    def test_list_addresses_by_network_with_bytes_body(self):
+        self._test_list_addresses_by_network(True)
+
+    def _test_list_addresses_by_network(self, bytes_body=False):
+        self.check_service_client_function(
+            self.client.list_addresses_by_network,
+            'tempest.common.service_client.ServiceClient.get',
+            self.FAKE_ADDRESS['addresses'],
+            bytes_body,
+            server_id=self.server_id,
+            network_id=self.network_id
+            )
diff --git a/tempest/tests/test_dynamic_creds.py b/tempest/tests/test_dynamic_creds.py
index 5f57268..92ed526 100644
--- a/tempest/tests/test_dynamic_creds.py
+++ b/tempest/tests/test_dynamic_creds.py
@@ -127,7 +127,7 @@
 
     def _mock_subnet_create(self, iso_creds, id, name):
         subnet_fix = self.useFixture(mockpatch.PatchObject(
-            iso_creds.network_admin_client,
+            iso_creds.subnets_admin_client,
             'create_subnet',
             return_value={'subnet': {'id': id, 'name': name}}))
         return subnet_fix
@@ -272,7 +272,7 @@
         net = mock.patch.object(creds.networks_admin_client,
                                 'delete_network')
         net_mock = net.start()
-        subnet = mock.patch.object(creds.network_admin_client,
+        subnet = mock.patch.object(creds.subnets_admin_client,
                                    'delete_subnet')
         subnet_mock = subnet.start()
         router = mock.patch.object(creds.network_admin_client,
@@ -362,7 +362,7 @@
         net = mock.patch.object(creds.networks_admin_client,
                                 'delete_network')
         net_mock = net.start()
-        subnet = mock.patch.object(creds.network_admin_client,
+        subnet = mock.patch.object(creds.subnets_admin_client,
                                    'delete_subnet')
         subnet_mock = subnet.start()
         router = mock.patch.object(creds.network_admin_client,
@@ -496,7 +496,7 @@
         net = mock.patch.object(creds.networks_admin_client,
                                 'delete_network')
         net_mock = net.start()
-        subnet = mock.patch.object(creds.network_admin_client,
+        subnet = mock.patch.object(creds.subnets_admin_client,
                                    'delete_subnet')
         subnet_mock = subnet.start()
         router = mock.patch.object(creds.network_admin_client,
