diff --git a/etc/tempest.conf.sample b/etc/tempest.conf.sample
index 2e57007..f5e0cf8 100644
--- a/etc/tempest.conf.sample
+++ b/etc/tempest.conf.sample
@@ -302,9 +302,11 @@
 # value)
 #ssh_channel_timeout = 60
 
-# Name of the fixed network that is visible to all test tenants.
-# (string value)
-#fixed_network_name = private
+# Name of the fixed network that is visible to all test tenants. If
+# multiple networks are available for a tenant this is the network
+# which will be used for creating servers if tempest does not create a
+# network or a network is not specified elsewhere (string value)
+#fixed_network_name = <None>
 
 # Network used for SSH connections. Ignored if
 # use_floatingip_for_ssh=true or run_ssh=false. (string value)
diff --git a/tempest/api/compute/admin/test_networks.py b/tempest/api/compute/admin/test_networks.py
index c20d483..477dc61 100644
--- a/tempest/api/compute/admin/test_networks.py
+++ b/tempest/api/compute/admin/test_networks.py
@@ -37,12 +37,15 @@
     @test.idempotent_id('d206d211-8912-486f-86e2-a9d090d1f416')
     def test_get_network(self):
         networks = self.client.list_networks()
-        configured_network = [x for x in networks if x['label'] ==
-                              CONF.compute.fixed_network_name]
-        self.assertEqual(1, len(configured_network),
-                         "{0} networks with label {1}".format(
-                             len(configured_network),
-                             CONF.compute.fixed_network_name))
+        if CONF.compute.fixed_network_name:
+            configured_network = [x for x in networks if x['label'] ==
+                                  CONF.compute.fixed_network_name]
+            self.assertEqual(1, len(configured_network),
+                             "{0} networks with label {1}".format(
+                                 len(configured_network),
+                                 CONF.compute.fixed_network_name))
+        else:
+            configured_network = networks
         configured_network = configured_network[0]
         network = self.client.get_network(configured_network['id'])
         self.assertEqual(configured_network['label'], network['label'])
@@ -51,5 +54,9 @@
     def test_list_all_networks(self):
         networks = self.client.list_networks()
         # Check the configured network is in the list
-        configured_network = CONF.compute.fixed_network_name
-        self.assertIn(configured_network, [x['label'] for x in networks])
+        if CONF.compute.fixed_network_name:
+            configured_network = CONF.compute.fixed_network_name
+            self.assertIn(configured_network, [x['label'] for x in networks])
+        else:
+            network_name = map(lambda x: x['label'], networks)
+            self.assertGreaterEqual(len(network_name), 1)
diff --git a/tempest/api/compute/admin/test_servers.py b/tempest/api/compute/admin/test_servers.py
index c872184..ef3a029 100644
--- a/tempest/api/compute/admin/test_servers.py
+++ b/tempest/api/compute/admin/test_servers.py
@@ -16,6 +16,7 @@
 from tempest_lib import decorators
 
 from tempest.api.compute import base
+from tempest.common import fixed_network
 from tempest import test
 
 
@@ -112,7 +113,10 @@
         name = data_utils.rand_name('server')
         flavor = self.flavor_ref
         image_id = self.image_ref
-        test_server = self.client.create_server(name, image_id, flavor)
+        network = self.get_tenant_network()
+        network_kwargs = fixed_network.set_networks_kwarg(network)
+        test_server = self.client.create_server(name, image_id, flavor,
+                                                **network_kwargs)
         self.addCleanup(self.client.delete_server, test_server['id'])
         self.client.wait_for_server_status(test_server['id'], 'ACTIVE')
         server = self.client.get_server(test_server['id'])
diff --git a/tempest/api/compute/base.py b/tempest/api/compute/base.py
index 05bc9f8..4995209 100644
--- a/tempest/api/compute/base.py
+++ b/tempest/api/compute/base.py
@@ -22,6 +22,7 @@
 
 from tempest import clients
 from tempest.common import credentials
+from tempest.common import fixed_network
 from tempest import config
 from tempest import exceptions
 import tempest.test
@@ -212,6 +213,8 @@
         flavor = kwargs.get('flavor', cls.flavor_ref)
         image_id = kwargs.get('image_id', cls.image_ref)
 
+        kwargs = fixed_network.set_networks_kwarg(
+            cls.get_tenant_network(), kwargs) or {}
         body = cls.servers_client.create_server(
             name, image_id, flavor, **kwargs)
 
diff --git a/tempest/api/compute/servers/test_attach_interfaces.py b/tempest/api/compute/servers/test_attach_interfaces.py
index 0702f3f..42a61da 100644
--- a/tempest/api/compute/servers/test_attach_interfaces.py
+++ b/tempest/api/compute/servers/test_attach_interfaces.py
@@ -13,13 +13,15 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+import time
+
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.compute import base
 from tempest import config
 from tempest import exceptions
 from tempest import test
 
-import time
-
 CONF = config.CONF
 
 
@@ -125,8 +127,15 @@
         self.assertTrue(interface_count > 0)
         self._check_interface(ifs[0])
 
-        iface = self._test_create_interface(server)
-        ifs.append(iface)
+        try:
+            iface = self._test_create_interface(server)
+        except lib_exc.BadRequest as e:
+            msg = ('Multiple possible networks found, use a Network ID to be '
+                   'more specific.')
+            if not CONF.compute.fixed_network_name and e.message == msg:
+                raise
+        else:
+            ifs.append(iface)
 
         iface = self._test_create_interface_by_network_id(server, ifs)
         ifs.append(iface)
diff --git a/tempest/api/compute/servers/test_list_server_filters.py b/tempest/api/compute/servers/test_list_server_filters.py
index 5c10f30..f33204d 100644
--- a/tempest/api/compute/servers/test_list_server_filters.py
+++ b/tempest/api/compute/servers/test_list_server_filters.py
@@ -19,6 +19,7 @@
 
 from tempest.api.compute import base
 from tempest.api import utils
+from tempest.common import fixed_network
 from tempest import config
 from tempest import test
 
@@ -66,9 +67,16 @@
             raise RuntimeError("Image %s (image_ref_alt) was not found!" %
                                cls.image_ref_alt)
 
+        network = cls.get_tenant_network()
+        if network:
+            cls.fixed_network_name = network['name']
+        else:
+            cls.fixed_network_name = None
+        network_kwargs = fixed_network.set_networks_kwarg(network)
         cls.s1_name = data_utils.rand_name(cls.__name__ + '-instance')
         cls.s1 = cls.create_test_server(name=cls.s1_name,
-                                        wait_until='ACTIVE')
+                                        wait_until='ACTIVE',
+                                        **network_kwargs)
 
         cls.s2_name = data_utils.rand_name(cls.__name__ + '-instance')
         cls.s2 = cls.create_test_server(name=cls.s2_name,
@@ -80,12 +88,6 @@
                                         flavor=cls.flavor_ref_alt,
                                         wait_until='ACTIVE')
 
-        cls.fixed_network_name = CONF.compute.fixed_network_name
-        if CONF.service_available.neutron:
-            if hasattr(cls.isolated_creds, 'get_primary_network'):
-                network = cls.isolated_creds.get_primary_network()
-                cls.fixed_network_name = network['name']
-
     @test.idempotent_id('05e8a8e7-9659-459a-989d-92c2f501f4ba')
     @utils.skip_unless_attr('multiple_images', 'Only one image found')
     @test.attr(type='gate')
@@ -284,6 +286,9 @@
     def test_list_servers_filtered_by_ip(self):
         # Filter servers by ip
         # Here should be listed 1 server
+        if not self.fixed_network_name:
+            msg = 'fixed_network_name needs to be configured to run this test'
+            raise self.skipException(msg)
         self.s1 = self.client.get_server(self.s1['id'])
         ip = self.s1['addresses'][self.fixed_network_name][0]['addr']
         params = {'ip': ip}
@@ -302,6 +307,9 @@
         # Filter servers by regex ip
         # List all servers filtered by part of ip address.
         # Here should be listed all servers
+        if not self.fixed_network_name:
+            msg = 'fixed_network_name needs to be configured to run this test'
+            raise self.skipException(msg)
         self.s1 = self.client.get_server(self.s1['id'])
         ip = self.s1['addresses'][self.fixed_network_name][0]['addr'][0:-3]
         params = {'ip': ip}
diff --git a/tempest/api/identity/base.py b/tempest/api/identity/base.py
index e171a02..b83da3e 100644
--- a/tempest/api/identity/base.py
+++ b/tempest/api/identity/base.py
@@ -19,6 +19,7 @@
 
 from tempest import clients
 from tempest.common import cred_provider
+from tempest.common import credentials
 from tempest import config
 import tempest.test
 
@@ -26,13 +27,7 @@
 LOG = logging.getLogger(__name__)
 
 
-class BaseIdentityAdminTest(tempest.test.BaseTestCase):
-
-    @classmethod
-    def setup_credentials(cls):
-        super(BaseIdentityAdminTest, cls).setup_credentials()
-        cls.os = cls.get_client_manager()
-        cls.os_adm = clients.Manager(cls.isolated_creds.get_admin_creds())
+class BaseIdentityTest(tempest.test.BaseTestCase):
 
     @classmethod
     def disable_user(cls, user_name):
@@ -69,24 +64,55 @@
             return role[0]
 
 
-class BaseIdentityV2AdminTest(BaseIdentityAdminTest):
+class BaseIdentityV2Test(BaseIdentityTest):
+
+    @classmethod
+    def setup_credentials(cls):
+        super(BaseIdentityV2Test, cls).setup_credentials()
+        cls.os = cls.get_client_manager(identity_version='v2')
 
     @classmethod
     def skip_checks(cls):
-        super(BaseIdentityV2AdminTest, cls).skip_checks()
+        super(BaseIdentityV2Test, cls).skip_checks()
         if not CONF.identity_feature_enabled.api_v2:
             raise cls.skipException("Identity api v2 is not enabled")
 
     @classmethod
     def setup_clients(cls):
+        super(BaseIdentityV2Test, cls).setup_clients()
+        cls.non_admin_client = cls.os.identity_client
+        cls.non_admin_token_client = cls.os.token_client
+
+    @classmethod
+    def resource_setup(cls):
+        super(BaseIdentityV2Test, cls).resource_setup()
+
+    @classmethod
+    def resource_cleanup(cls):
+        super(BaseIdentityV2Test, cls).resource_cleanup()
+
+
+class BaseIdentityV2AdminTest(BaseIdentityV2Test):
+
+    @classmethod
+    def setup_credentials(cls):
+        super(BaseIdentityV2AdminTest, cls).setup_credentials()
+        cls.os_adm = clients.Manager(cls.isolated_creds.get_admin_creds())
+
+    @classmethod
+    def skip_checks(cls):
+        if not credentials.is_admin_available():
+            raise cls.skipException('v2 Admin auth disabled')
+        super(BaseIdentityV2AdminTest, cls).skip_checks()
+
+    @classmethod
+    def setup_clients(cls):
         super(BaseIdentityV2AdminTest, cls).setup_clients()
         cls.client = cls.os_adm.identity_client
         cls.token_client = cls.os_adm.token_client
         if not cls.client.has_admin_extensions():
             raise cls.skipException("Admin extensions disabled")
 
-        cls.non_admin_client = cls.os.identity_client
-
     @classmethod
     def resource_setup(cls):
         super(BaseIdentityV2AdminTest, cls).resource_setup()
@@ -98,27 +124,59 @@
         super(BaseIdentityV2AdminTest, cls).resource_cleanup()
 
 
-class BaseIdentityV3AdminTest(BaseIdentityAdminTest):
+class BaseIdentityV3Test(BaseIdentityTest):
+
+    @classmethod
+    def setup_credentials(cls):
+        super(BaseIdentityV3Test, cls).setup_credentials()
+        cls.os = cls.get_client_manager(identity_version='v3')
 
     @classmethod
     def skip_checks(cls):
-        super(BaseIdentityV3AdminTest, cls).skip_checks()
+        super(BaseIdentityV3Test, cls).skip_checks()
         if not CONF.identity_feature_enabled.api_v3:
             raise cls.skipException("Identity api v3 is not enabled")
 
     @classmethod
     def setup_clients(cls):
+        super(BaseIdentityV3Test, cls).setup_clients()
+        cls.non_admin_client = cls.os.identity_v3_client
+        cls.non_admin_token = cls.os.token_v3_client
+        cls.non_admin_endpoints_client = cls.os.endpoints_client
+        cls.non_admin_region_client = cls.os.region_client
+        cls.non_admin_service_client = cls.os.service_client
+        cls.non_admin_policy_client = cls.os.policy_client
+        cls.non_admin_creds_client = cls.os.credentials_client
+
+    @classmethod
+    def resource_cleanup(cls):
+        super(BaseIdentityV3Test, cls).resource_cleanup()
+
+
+class BaseIdentityV3AdminTest(BaseIdentityV3Test):
+
+    @classmethod
+    def setup_credentials(cls):
+        super(BaseIdentityV3AdminTest, cls).setup_credentials()
+        cls.os_adm = clients.Manager(cls.isolated_creds.get_admin_creds())
+
+    @classmethod
+    def skip_checks(cls):
+        if not credentials.is_admin_available():
+            raise cls.skipException('v3 Admin auth disabled')
+        super(BaseIdentityV3AdminTest, cls).skip_checks()
+
+    @classmethod
+    def setup_clients(cls):
         super(BaseIdentityV3AdminTest, cls).setup_clients()
         cls.client = cls.os_adm.identity_v3_client
         cls.token = cls.os_adm.token_v3_client
         cls.endpoints_client = cls.os_adm.endpoints_client
         cls.region_client = cls.os_adm.region_client
         cls.data = DataGenerator(cls.client)
-        cls.non_admin_client = cls.os.identity_v3_client
         cls.service_client = cls.os_adm.service_client
         cls.policy_client = cls.os_adm.policy_client
         cls.creds_client = cls.os_adm.credentials_client
-        cls.non_admin_client = cls.os.identity_v3_client
 
     @classmethod
     def resource_cleanup(cls):
diff --git a/tempest/api/identity/v2/__init__.py b/tempest/api/identity/v2/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tempest/api/identity/v2/__init__.py
diff --git a/tempest/api/identity/v2/test_tokens.py b/tempest/api/identity/v2/test_tokens.py
new file mode 100644
index 0000000..5a8afa0
--- /dev/null
+++ b/tempest/api/identity/v2/test_tokens.py
@@ -0,0 +1,38 @@
+# Copyright 2015 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 tempest.api.identity import base
+from tempest import test
+
+
+class TokensTest(base.BaseIdentityV2Test):
+
+    @test.idempotent_id('65ae3b78-91ff-467b-a705-f6678863b8ec')
+    def test_create_token(self):
+
+        token_client = self.non_admin_token_client
+
+        # get a token for the user
+        creds = self.os.credentials
+        username = creds.username
+        password = creds.password
+        tenant_name = creds.tenant_name
+
+        body = token_client.auth(username,
+                                 password,
+                                 tenant_name)
+
+        self.assertEqual(body['token']['tenant']['name'],
+                         tenant_name)
diff --git a/tempest/api/identity/v3/__init__.py b/tempest/api/identity/v3/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tempest/api/identity/v3/__init__.py
diff --git a/tempest/api/identity/v3/test_tokens.py b/tempest/api/identity/v3/test_tokens.py
new file mode 100644
index 0000000..ab4a09f
--- /dev/null
+++ b/tempest/api/identity/v3/test_tokens.py
@@ -0,0 +1,33 @@
+# Copyright 2015 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 tempest.api.identity import base
+from tempest import test
+
+
+class TokensV3Test(base.BaseIdentityV3Test):
+
+    @test.idempotent_id('6f8e4436-fc96-4282-8122-e41df57197a9')
+    def test_create_token(self):
+
+        creds = self.os.credentials
+        user_id = creds.user_id
+        username = creds.username
+        password = creds.password
+        resp = self.non_admin_token.auth(user_id=user_id,
+                                         password=password)
+
+        subject_name = resp['token']['user']['name']
+        self.assertEqual(subject_name, username)
diff --git a/tempest/api/network/admin/test_agent_management.py b/tempest/api/network/admin/test_agent_management.py
index d5454ec..be5bb1f 100644
--- a/tempest/api/network/admin/test_agent_management.py
+++ b/tempest/api/network/admin/test_agent_management.py
@@ -20,11 +20,15 @@
 class AgentManagementTestJSON(base.BaseAdminNetworkTest):
 
     @classmethod
-    def resource_setup(cls):
-        super(AgentManagementTestJSON, cls).resource_setup()
+    def skip_checks(cls):
+        super(AgentManagementTestJSON, cls).skip_checks()
         if not test.is_extension_enabled('agent', 'network'):
             msg = "agent extension not enabled."
             raise cls.skipException(msg)
+
+    @classmethod
+    def resource_setup(cls):
+        super(AgentManagementTestJSON, cls).resource_setup()
         body = cls.admin_client.list_agents()
         agents = body['agents']
         cls.agent = agents[0]
diff --git a/tempest/api/network/admin/test_dhcp_agent_scheduler.py b/tempest/api/network/admin/test_dhcp_agent_scheduler.py
index 26f5e7a..3b94b82 100644
--- a/tempest/api/network/admin/test_dhcp_agent_scheduler.py
+++ b/tempest/api/network/admin/test_dhcp_agent_scheduler.py
@@ -19,11 +19,15 @@
 class DHCPAgentSchedulersTestJSON(base.BaseAdminNetworkTest):
 
     @classmethod
-    def resource_setup(cls):
-        super(DHCPAgentSchedulersTestJSON, cls).resource_setup()
+    def skip_checks(cls):
+        super(DHCPAgentSchedulersTestJSON, cls).skip_checks()
         if not test.is_extension_enabled('dhcp_agent_scheduler', 'network'):
             msg = "dhcp_agent_scheduler extension not enabled."
             raise cls.skipException(msg)
+
+    @classmethod
+    def resource_setup(cls):
+        super(DHCPAgentSchedulersTestJSON, cls).resource_setup()
         # Create a network and make sure it will be hosted by a
         # dhcp agent: this is done by creating a regular port
         cls.network = cls.create_network()
diff --git a/tempest/api/network/admin/test_floating_ips_admin_actions.py b/tempest/api/network/admin/test_floating_ips_admin_actions.py
index ccf3980..ce3e319 100644
--- a/tempest/api/network/admin/test_floating_ips_admin_actions.py
+++ b/tempest/api/network/admin/test_floating_ips_admin_actions.py
@@ -24,16 +24,23 @@
 
 
 class FloatingIPAdminTestJSON(base.BaseAdminNetworkTest):
-
     force_tenant_isolation = True
 
     @classmethod
+    def setup_credentials(cls):
+        super(FloatingIPAdminTestJSON, cls).setup_credentials()
+        cls.alt_manager = clients.Manager(cls.isolated_creds.get_alt_creds())
+
+    @classmethod
+    def setup_clients(cls):
+        super(FloatingIPAdminTestJSON, cls).setup_clients()
+        cls.alt_client = cls.alt_manager.network_client
+
+    @classmethod
     def resource_setup(cls):
         super(FloatingIPAdminTestJSON, cls).resource_setup()
         cls.ext_net_id = CONF.network.public_network_id
         cls.floating_ip = cls.create_floatingip(cls.ext_net_id)
-        cls.alt_manager = clients.Manager(cls.isolated_creds.get_alt_creds())
-        cls.alt_client = cls.alt_manager.network_client
         cls.network = cls.create_network()
         cls.subnet = cls.create_subnet(cls.network)
         cls.router = cls.create_router(data_utils.rand_name('router-'),
diff --git a/tempest/api/network/admin/test_l3_agent_scheduler.py b/tempest/api/network/admin/test_l3_agent_scheduler.py
index 257289f..ad121b0 100644
--- a/tempest/api/network/admin/test_l3_agent_scheduler.py
+++ b/tempest/api/network/admin/test_l3_agent_scheduler.py
@@ -15,11 +15,11 @@
 from tempest_lib.common.utils import data_utils
 
 from tempest.api.network import base
+from tempest import exceptions
 from tempest import test
 
 
 class L3AgentSchedulerTestJSON(base.BaseAdminNetworkTest):
-
     """
     Tests the following operations in the Neutron API using the REST client for
     Neutron:
@@ -34,12 +34,15 @@
     """
 
     @classmethod
-    def resource_setup(cls):
-        super(L3AgentSchedulerTestJSON, cls).resource_setup()
+    def skip_checks(cls):
+        super(L3AgentSchedulerTestJSON, cls).skip_checks()
         if not test.is_extension_enabled('l3_agent_scheduler', 'network'):
             msg = "L3 Agent Scheduler Extension not enabled."
             raise cls.skipException(msg)
-        # Trying to get agent details for L3 Agent
+
+    @classmethod
+    def resource_setup(cls):
+        super(L3AgentSchedulerTestJSON, cls).resource_setup()
         body = cls.admin_client.list_agents()
         agents = body['agents']
         for agent in agents:
@@ -47,8 +50,8 @@
                 cls.agent = agent
                 break
         else:
-            msg = "L3 Agent not found"
-            raise cls.skipException(msg)
+            msg = "L3 Agent Scheduler enabled in conf, but L3 Agent not found"
+            raise exceptions.InvalidConfiguration(msg)
 
     @test.attr(type='smoke')
     @test.idempotent_id('b7ce6e89-e837-4ded-9b78-9ed3c9c6a45a')
diff --git a/tempest/api/network/admin/test_lbaas_agent_scheduler.py b/tempest/api/network/admin/test_lbaas_agent_scheduler.py
index 29b69c3..c4f117b 100644
--- a/tempest/api/network/admin/test_lbaas_agent_scheduler.py
+++ b/tempest/api/network/admin/test_lbaas_agent_scheduler.py
@@ -19,7 +19,6 @@
 
 
 class LBaaSAgentSchedulerTestJSON(base.BaseAdminNetworkTest):
-
     """
     Tests the following operations in the Neutron API using the REST client for
     Neutron:
@@ -35,11 +34,15 @@
     """
 
     @classmethod
-    def resource_setup(cls):
-        super(LBaaSAgentSchedulerTestJSON, cls).resource_setup()
+    def skip_checks(cls):
+        super(LBaaSAgentSchedulerTestJSON, cls).skip_checks()
         if not test.is_extension_enabled('lbaas_agent_scheduler', 'network'):
             msg = "LBaaS Agent Scheduler Extension not enabled."
             raise cls.skipException(msg)
+
+    @classmethod
+    def resource_setup(cls):
+        super(LBaaSAgentSchedulerTestJSON, cls).resource_setup()
         cls.network = cls.create_network()
         cls.subnet = cls.create_subnet(cls.network)
         pool_name = data_utils.rand_name('pool-')
diff --git a/tempest/api/network/admin/test_load_balancer_admin_actions.py b/tempest/api/network/admin/test_load_balancer_admin_actions.py
index b49b57c..5a32119 100644
--- a/tempest/api/network/admin/test_load_balancer_admin_actions.py
+++ b/tempest/api/network/admin/test_load_balancer_admin_actions.py
@@ -20,7 +20,6 @@
 
 
 class LoadBalancerAdminTestJSON(base.BaseAdminNetworkTest):
-
     """
     Test admin actions for load balancer.
 
@@ -29,15 +28,28 @@
     """
 
     @classmethod
-    def resource_setup(cls):
-        super(LoadBalancerAdminTestJSON, cls).resource_setup()
+    def skip_checks(cls):
+        super(LoadBalancerAdminTestJSON, cls).skip_checks()
         if not test.is_extension_enabled('lbaas', 'network'):
             msg = "lbaas extension not enabled."
             raise cls.skipException(msg)
+
+    @classmethod
+    def setup_credentials(cls):
+        super(LoadBalancerAdminTestJSON, cls).setup_credentials()
+        cls.manager = cls.get_client_manager()
+        cls.primary_creds = cls.isolated_creds.get_primary_creds()
+
+    @classmethod
+    def setup_clients(cls):
+        super(LoadBalancerAdminTestJSON, cls).setup_clients()
+        cls.client = cls.manager.network_client
+
+    @classmethod
+    def resource_setup(cls):
+        super(LoadBalancerAdminTestJSON, cls).resource_setup()
         cls.force_tenant_isolation = True
-        manager = cls.get_client_manager()
-        cls.client = manager.network_client
-        cls.tenant_id = cls.isolated_creds.get_primary_creds().tenant_id
+        cls.tenant_id = cls.primary_creds.tenant_id
         cls.network = cls.create_network()
         cls.subnet = cls.create_subnet(cls.network)
         cls.pool = cls.create_pool(data_utils.rand_name('pool-'),
diff --git a/tempest/api/network/admin/test_quotas.py b/tempest/api/network/admin/test_quotas.py
index 60552b9..275c0d1 100644
--- a/tempest/api/network/admin/test_quotas.py
+++ b/tempest/api/network/admin/test_quotas.py
@@ -20,7 +20,6 @@
 
 
 class QuotasTest(base.BaseAdminNetworkTest):
-
     """
     Tests the following operations in the Neutron API using the REST client for
     Neutron:
@@ -38,11 +37,15 @@
     """
 
     @classmethod
-    def resource_setup(cls):
-        super(QuotasTest, cls).resource_setup()
+    def skip_checks(cls):
+        super(QuotasTest, cls).skip_checks()
         if not test.is_extension_enabled('quotas', 'network'):
             msg = "quotas extension not enabled."
             raise cls.skipException(msg)
+
+    @classmethod
+    def setup_clients(cls):
+        super(QuotasTest, cls).setup_clients()
         cls.identity_admin_client = cls.os_adm.identity_client
 
     def _check_quotas(self, new_quotas):
diff --git a/tempest/api/network/base.py b/tempest/api/network/base.py
index cc2d21a..09a5555 100644
--- a/tempest/api/network/base.py
+++ b/tempest/api/network/base.py
@@ -19,6 +19,7 @@
 from tempest_lib import exceptions as lib_exc
 
 from tempest import clients
+from tempest.common import credentials
 from tempest import config
 from tempest import exceptions
 import tempest.test
@@ -56,19 +57,30 @@
     _ip_version = 4
 
     @classmethod
-    def resource_setup(cls):
-        # Create no network resources for these test.
-        cls.set_network_resources()
-        super(BaseNetworkTest, cls).resource_setup()
+    def skip_checks(cls):
+        super(BaseNetworkTest, cls).skip_checks()
         if not CONF.service_available.neutron:
             raise cls.skipException("Neutron support is required")
         if cls._ip_version == 6 and not CONF.network_feature_enabled.ipv6:
             raise cls.skipException("IPv6 Tests are disabled.")
 
-        os = cls.get_client_manager()
+    @classmethod
+    def setup_credentials(cls):
+        # Create no network resources for these test.
+        cls.set_network_resources()
+        super(BaseNetworkTest, cls).setup_credentials()
+        cls.os = cls.get_client_manager()
+
+    @classmethod
+    def setup_clients(cls):
+        super(BaseNetworkTest, cls).setup_clients()
+        cls.client = cls.os.network_client
+
+    @classmethod
+    def resource_setup(cls):
+        super(BaseNetworkTest, cls).resource_setup()
 
         cls.network_cfg = CONF.network
-        cls.client = os.network_client
         cls.networks = []
         cls.subnets = []
         cls.ports = []
@@ -414,16 +426,22 @@
 class BaseAdminNetworkTest(BaseNetworkTest):
 
     @classmethod
-    def resource_setup(cls):
-        super(BaseAdminNetworkTest, cls).resource_setup()
-
-        try:
-            creds = cls.isolated_creds.get_admin_creds()
-            cls.os_adm = clients.Manager(credentials=creds)
-        except NotImplementedError:
+    def skip_checks(cls):
+        super(BaseAdminNetworkTest, cls).skip_checks()
+        if not credentials.is_admin_available():
             msg = ("Missing Administrative Network API credentials "
                    "in configuration.")
             raise cls.skipException(msg)
+
+    @classmethod
+    def setup_credentials(cls):
+        super(BaseAdminNetworkTest, cls).setup_credentials()
+        creds = cls.isolated_creds.get_admin_creds()
+        cls.os_adm = clients.Manager(credentials=creds)
+
+    @classmethod
+    def setup_clients(cls):
+        super(BaseAdminNetworkTest, cls).setup_clients()
         cls.admin_client = cls.os_adm.network_client
 
     @classmethod
diff --git a/tempest/api/network/base_routers.py b/tempest/api/network/base_routers.py
index 1b580b0..aa4e200 100644
--- a/tempest/api/network/base_routers.py
+++ b/tempest/api/network/base_routers.py
@@ -21,10 +21,6 @@
     # as some router operations, such as enabling or disabling SNAT
     # require admin credentials by default
 
-    @classmethod
-    def resource_setup(cls):
-        super(BaseRouterTest, cls).resource_setup()
-
     def _delete_router(self, router_id):
         self.client.delete_router(router_id)
         # Asserting that the router is not found in the list
diff --git a/tempest/api/network/base_security_groups.py b/tempest/api/network/base_security_groups.py
index c704049..6699bf7 100644
--- a/tempest/api/network/base_security_groups.py
+++ b/tempest/api/network/base_security_groups.py
@@ -20,10 +20,6 @@
 
 class BaseSecGroupTest(base.BaseNetworkTest):
 
-    @classmethod
-    def resource_setup(cls):
-        super(BaseSecGroupTest, cls).resource_setup()
-
     def _create_security_group(self):
         # Create a security group
         name = data_utils.rand_name('secgroup-')
diff --git a/tempest/api/network/test_allowed_address_pair.py b/tempest/api/network/test_allowed_address_pair.py
index 99bd82c..d2db326 100644
--- a/tempest/api/network/test_allowed_address_pair.py
+++ b/tempest/api/network/test_allowed_address_pair.py
@@ -23,7 +23,6 @@
 
 
 class AllowedAddressPairTestJSON(base.BaseNetworkTest):
-
     """
     Tests the Neutron Allowed Address Pair API extension using the Tempest
     ReST client. The following API operations are tested with this extension:
@@ -41,11 +40,15 @@
     """
 
     @classmethod
-    def resource_setup(cls):
-        super(AllowedAddressPairTestJSON, cls).resource_setup()
+    def skip_checks(cls):
+        super(AllowedAddressPairTestJSON, cls).skip_checks()
         if not test.is_extension_enabled('allowed-address-pairs', 'network'):
             msg = "Allowed Address Pairs extension not enabled."
             raise cls.skipException(msg)
+
+    @classmethod
+    def resource_setup(cls):
+        super(AllowedAddressPairTestJSON, cls).resource_setup()
         cls.network = cls.create_network()
         cls.create_subnet(cls.network)
         port = cls.create_port(cls.network)
diff --git a/tempest/api/network/test_dhcp_ipv6.py b/tempest/api/network/test_dhcp_ipv6.py
index a10f749..253d779 100644
--- a/tempest/api/network/test_dhcp_ipv6.py
+++ b/tempest/api/network/test_dhcp_ipv6.py
@@ -41,6 +41,7 @@
 
     @classmethod
     def skip_checks(cls):
+        super(NetworksTestDHCPv6, cls).skip_checks()
         msg = None
         if not CONF.network_feature_enabled.ipv6:
             msg = "IPv6 is not enabled"
diff --git a/tempest/api/network/test_extensions.py b/tempest/api/network/test_extensions.py
index bce8efe..e9f1bf4 100644
--- a/tempest/api/network/test_extensions.py
+++ b/tempest/api/network/test_extensions.py
@@ -31,10 +31,6 @@
 
     """
 
-    @classmethod
-    def resource_setup(cls):
-        super(ExtensionsTestJSON, cls).resource_setup()
-
     @test.attr(type='smoke')
     @test.idempotent_id('ef28c7e6-e646-4979-9d67-deb207bc5564')
     def test_list_show_extensions(self):
diff --git a/tempest/api/network/test_extra_dhcp_options.py b/tempest/api/network/test_extra_dhcp_options.py
index 5060a48..1937028 100644
--- a/tempest/api/network/test_extra_dhcp_options.py
+++ b/tempest/api/network/test_extra_dhcp_options.py
@@ -20,7 +20,6 @@
 
 
 class ExtraDHCPOptionsTestJSON(base.BaseNetworkTest):
-
     """
     Tests the following operations with the Extra DHCP Options Neutron API
     extension:
@@ -36,11 +35,15 @@
     """
 
     @classmethod
-    def resource_setup(cls):
-        super(ExtraDHCPOptionsTestJSON, cls).resource_setup()
+    def skip_checks(cls):
+        super(ExtraDHCPOptionsTestJSON, cls).skip_checks()
         if not test.is_extension_enabled('extra_dhcp_opt', 'network'):
             msg = "Extra DHCP Options extension not enabled."
             raise cls.skipException(msg)
+
+    @classmethod
+    def resource_setup(cls):
+        super(ExtraDHCPOptionsTestJSON, cls).resource_setup()
         cls.network = cls.create_network()
         cls.subnet = cls.create_subnet(cls.network)
         cls.port = cls.create_port(cls.network)
diff --git a/tempest/api/network/test_floating_ips.py b/tempest/api/network/test_floating_ips.py
index 212013a..23223f6 100644
--- a/tempest/api/network/test_floating_ips.py
+++ b/tempest/api/network/test_floating_ips.py
@@ -24,7 +24,6 @@
 
 
 class FloatingIPTestJSON(base.BaseNetworkTest):
-
     """
     Tests the following operations in the Quantum API using the REST client for
     Neutron:
@@ -45,11 +44,15 @@
     """
 
     @classmethod
-    def resource_setup(cls):
-        super(FloatingIPTestJSON, cls).resource_setup()
+    def skip_checks(cls):
+        super(FloatingIPTestJSON, cls).skip_checks()
         if not test.is_extension_enabled('router', 'network'):
             msg = "router extension not enabled."
             raise cls.skipException(msg)
+
+    @classmethod
+    def resource_setup(cls):
+        super(FloatingIPTestJSON, cls).resource_setup()
         cls.ext_net_id = CONF.network.public_network_id
 
         # Create network, subnet, router and add interface
diff --git a/tempest/api/network/test_floating_ips_negative.py b/tempest/api/network/test_floating_ips_negative.py
index a7f806c..824034f 100644
--- a/tempest/api/network/test_floating_ips_negative.py
+++ b/tempest/api/network/test_floating_ips_negative.py
@@ -25,7 +25,6 @@
 
 
 class FloatingIPNegativeTestJSON(base.BaseNetworkTest):
-
     """
     Test the following negative  operations for floating ips:
 
@@ -35,11 +34,15 @@
     """
 
     @classmethod
-    def resource_setup(cls):
-        super(FloatingIPNegativeTestJSON, cls).resource_setup()
+    def skip_checks(cls):
+        super(FloatingIPNegativeTestJSON, cls).skip_checks()
         if not test.is_extension_enabled('router', 'network'):
             msg = "router extension not enabled."
             raise cls.skipException(msg)
+
+    @classmethod
+    def resource_setup(cls):
+        super(FloatingIPNegativeTestJSON, cls).resource_setup()
         cls.ext_net_id = CONF.network.public_network_id
         # Create a network with a subnet connected to a router.
         cls.network = cls.create_network()
diff --git a/tempest/api/network/test_fwaas_extensions.py b/tempest/api/network/test_fwaas_extensions.py
index e2b6ff1..cecf96d 100644
--- a/tempest/api/network/test_fwaas_extensions.py
+++ b/tempest/api/network/test_fwaas_extensions.py
@@ -24,7 +24,6 @@
 
 
 class FWaaSExtensionTestJSON(base.BaseNetworkTest):
-
     """
     Tests the following operations in the Neutron API using the REST client for
     Neutron:
@@ -51,11 +50,15 @@
     """
 
     @classmethod
-    def resource_setup(cls):
-        super(FWaaSExtensionTestJSON, cls).resource_setup()
+    def skip_checks(cls):
+        super(FWaaSExtensionTestJSON, cls).skip_checks()
         if not test.is_extension_enabled('fwaas', 'network'):
             msg = "FWaaS Extension not enabled."
             raise cls.skipException(msg)
+
+    @classmethod
+    def resource_setup(cls):
+        super(FWaaSExtensionTestJSON, cls).resource_setup()
         cls.fw_rule = cls.create_firewall_rule("allow", "tcp")
         cls.fw_policy = cls.create_firewall_policy()
 
diff --git a/tempest/api/network/test_load_balancer.py b/tempest/api/network/test_load_balancer.py
index 583f91a..8bd0f24 100644
--- a/tempest/api/network/test_load_balancer.py
+++ b/tempest/api/network/test_load_balancer.py
@@ -21,7 +21,6 @@
 
 
 class LoadBalancerTestJSON(base.BaseNetworkTest):
-
     """
     Tests the following operations in the Neutron API using the REST client for
     Neutron:
@@ -39,11 +38,15 @@
     """
 
     @classmethod
-    def resource_setup(cls):
-        super(LoadBalancerTestJSON, cls).resource_setup()
+    def skip_checks(cls):
+        super(LoadBalancerTestJSON, cls).skip_checks()
         if not test.is_extension_enabled('lbaas', 'network'):
             msg = "lbaas extension not enabled."
             raise cls.skipException(msg)
+
+    @classmethod
+    def resource_setup(cls):
+        super(LoadBalancerTestJSON, cls).resource_setup()
         cls.network = cls.create_network()
         cls.name = cls.network['name']
         cls.subnet = cls.create_subnet(cls.network)
diff --git a/tempest/api/network/test_metering_extensions.py b/tempest/api/network/test_metering_extensions.py
index c712af2..7935e5b 100644
--- a/tempest/api/network/test_metering_extensions.py
+++ b/tempest/api/network/test_metering_extensions.py
@@ -23,7 +23,6 @@
 
 
 class MeteringTestJSON(base.BaseAdminNetworkTest):
-
     """
     Tests the following operations in the Neutron API using the REST client for
     Neutron:
@@ -33,11 +32,15 @@
     """
 
     @classmethod
-    def resource_setup(cls):
-        super(MeteringTestJSON, cls).resource_setup()
+    def skip_checks(cls):
+        super(MeteringTestJSON, cls).skip_checks()
         if not test.is_extension_enabled('metering', 'network'):
             msg = "metering extension not enabled."
             raise cls.skipException(msg)
+
+    @classmethod
+    def resource_setup(cls):
+        super(MeteringTestJSON, cls).resource_setup()
         description = "metering label created by tempest"
         name = data_utils.rand_name("metering-label")
         cls.metering_label = cls.create_metering_label(name, description)
diff --git a/tempest/api/network/test_networks.py b/tempest/api/network/test_networks.py
index 2e01a85..f85e8cf 100644
--- a/tempest/api/network/test_networks.py
+++ b/tempest/api/network/test_networks.py
@@ -27,7 +27,6 @@
 
 
 class NetworksTestJSON(base.BaseNetworkTest):
-
     """
     Tests the following operations in the Neutron API using the REST client for
     Neutron:
@@ -417,7 +416,6 @@
 
 
 class BulkNetworkOpsTestJSON(base.BaseNetworkTest):
-
     """
     Tests the following operations in the Neutron API using the REST client for
     Neutron:
@@ -604,11 +602,11 @@
 class NetworksIpV6TestAttrs(NetworksIpV6TestJSON):
 
     @classmethod
-    def resource_setup(cls):
+    def skip_checks(cls):
+        super(NetworksIpV6TestAttrs, cls).skip_checks()
         if not CONF.network_feature_enabled.ipv6_subnet_attributes:
             raise cls.skipException("IPv6 extended attributes for "
                                     "subnets not available")
-        super(NetworksIpV6TestAttrs, cls).resource_setup()
 
     @test.attr(type='smoke')
     @test.idempotent_id('da40cd1b-a833-4354-9a85-cd9b8a3b74ca')
diff --git a/tempest/api/network/test_ports.py b/tempest/api/network/test_ports.py
index 6fe955e..953b268 100644
--- a/tempest/api/network/test_ports.py
+++ b/tempest/api/network/test_ports.py
@@ -28,7 +28,6 @@
 
 
 class PortsTestJSON(sec_base.BaseSecGroupTest):
-
     """
     Test the following operations for ports:
 
@@ -315,13 +314,17 @@
 class PortsAdminExtendedAttrsTestJSON(base.BaseAdminNetworkTest):
 
     @classmethod
+    def setup_clients(cls):
+        super(PortsAdminExtendedAttrsTestJSON, cls).setup_clients()
+        cls.identity_client = cls.os_adm.identity_client
+
+    @classmethod
     def resource_setup(cls):
         super(PortsAdminExtendedAttrsTestJSON, cls).resource_setup()
-        cls.identity_client = cls._get_identity_admin_client()
-        cls.tenant = cls.identity_client.get_tenant_by_name(
-            CONF.identity.tenant_name)
         cls.network = cls.create_network()
         cls.host_id = socket.gethostname()
+        cls.tenant = cls.identity_client.get_tenant_by_name(
+            CONF.identity.tenant_name)
 
     @test.attr(type='smoke')
     @test.idempotent_id('8e8569c1-9ac7-44db-8bc1-f5fb2814f29b')
diff --git a/tempest/api/network/test_routers.py b/tempest/api/network/test_routers.py
index e9c9484..c6f3849 100644
--- a/tempest/api/network/test_routers.py
+++ b/tempest/api/network/test_routers.py
@@ -17,7 +17,6 @@
 from tempest_lib.common.utils import data_utils
 
 from tempest.api.network import base_routers as base
-from tempest import clients
 from tempest import config
 from tempest import test
 
@@ -27,13 +26,20 @@
 class RoutersTest(base.BaseRouterTest):
 
     @classmethod
-    def resource_setup(cls):
-        super(RoutersTest, cls).resource_setup()
+    def skip_checks(cls):
+        super(RoutersTest, cls).skip_checks()
         if not test.is_extension_enabled('router', 'network'):
             msg = "router extension not enabled."
             raise cls.skipException(msg)
-        admin_manager = clients.AdminManager()
-        cls.identity_admin_client = admin_manager.identity_client
+
+    @classmethod
+    def setup_clients(cls):
+        super(RoutersTest, cls).setup_clients()
+        cls.identity_admin_client = cls.os_adm.identity_client
+
+    @classmethod
+    def resource_setup(cls):
+        super(RoutersTest, cls).resource_setup()
         cls.tenant_cidr = (CONF.network.tenant_network_cidr
                            if cls._ip_version == 4 else
                            CONF.network.tenant_network_v6_cidr)
diff --git a/tempest/api/network/test_routers_negative.py b/tempest/api/network/test_routers_negative.py
index 9e7d574..ae17222 100644
--- a/tempest/api/network/test_routers_negative.py
+++ b/tempest/api/network/test_routers_negative.py
@@ -27,11 +27,15 @@
 class RoutersNegativeTest(base.BaseRouterTest):
 
     @classmethod
-    def resource_setup(cls):
-        super(RoutersNegativeTest, cls).resource_setup()
+    def skip_checks(cls):
+        super(RoutersNegativeTest, cls).skip_checks()
         if not test.is_extension_enabled('router', 'network'):
             msg = "router extension not enabled."
             raise cls.skipException(msg)
+
+    @classmethod
+    def resource_setup(cls):
+        super(RoutersNegativeTest, cls).resource_setup()
         cls.router = cls.create_router(data_utils.rand_name('router-'))
         cls.network = cls.create_network()
         cls.subnet = cls.create_subnet(cls.network)
diff --git a/tempest/api/network/test_security_groups.py b/tempest/api/network/test_security_groups.py
index 46dbeee..71e1beb 100644
--- a/tempest/api/network/test_security_groups.py
+++ b/tempest/api/network/test_security_groups.py
@@ -24,12 +24,11 @@
 
 
 class SecGroupTest(base.BaseSecGroupTest):
-
     _tenant_network_cidr = CONF.network.tenant_network_cidr
 
     @classmethod
-    def resource_setup(cls):
-        super(SecGroupTest, cls).resource_setup()
+    def skip_checks(cls):
+        super(SecGroupTest, cls).skip_checks()
         if not test.is_extension_enabled('security-group', 'network'):
             msg = "security-group extension not enabled."
             raise cls.skipException(msg)
diff --git a/tempest/api/network/test_security_groups_negative.py b/tempest/api/network/test_security_groups_negative.py
index 97c0592..0c5f017 100644
--- a/tempest/api/network/test_security_groups_negative.py
+++ b/tempest/api/network/test_security_groups_negative.py
@@ -25,12 +25,11 @@
 
 
 class NegativeSecGroupTest(base.BaseSecGroupTest):
-
     _tenant_network_cidr = CONF.network.tenant_network_cidr
 
     @classmethod
-    def resource_setup(cls):
-        super(NegativeSecGroupTest, cls).resource_setup()
+    def skip_checks(cls):
+        super(NegativeSecGroupTest, cls).skip_checks()
         if not test.is_extension_enabled('security-group', 'network'):
             msg = "security-group extension not enabled."
             raise cls.skipException(msg)
diff --git a/tempest/api/network/test_service_type_management.py b/tempest/api/network/test_service_type_management.py
index a1e4136..085ad73 100644
--- a/tempest/api/network/test_service_type_management.py
+++ b/tempest/api/network/test_service_type_management.py
@@ -19,8 +19,8 @@
 class ServiceTypeManagementTestJSON(base.BaseNetworkTest):
 
     @classmethod
-    def resource_setup(cls):
-        super(ServiceTypeManagementTestJSON, cls).resource_setup()
+    def skip_checks(cls):
+        super(ServiceTypeManagementTestJSON, cls).skip_checks()
         if not test.is_extension_enabled('service-type', 'network'):
             msg = "Neutron Service Type Management not enabled."
             raise cls.skipException(msg)
diff --git a/tempest/api/network/test_vpnaas_extensions.py b/tempest/api/network/test_vpnaas_extensions.py
index ba30326..4ab69e0 100644
--- a/tempest/api/network/test_vpnaas_extensions.py
+++ b/tempest/api/network/test_vpnaas_extensions.py
@@ -24,7 +24,6 @@
 
 
 class VPNaaSTestJSON(base.BaseAdminNetworkTest):
-
     """
     Tests the following operations in the Neutron API using the REST client for
     Neutron:
@@ -34,10 +33,14 @@
     """
 
     @classmethod
-    def resource_setup(cls):
+    def skip_checks(cls):
+        super(VPNaaSTestJSON, cls).skip_checks()
         if not test.is_extension_enabled('vpnaas', 'network'):
             msg = "vpnaas extension not enabled."
             raise cls.skipException(msg)
+
+    @classmethod
+    def resource_setup(cls):
         super(VPNaaSTestJSON, cls).resource_setup()
         cls.ext_net_id = CONF.network.public_network_id
         cls.network = cls.create_network()
diff --git a/tempest/api/volume/base.py b/tempest/api/volume/base.py
index 157bd44..1f76b1c 100644
--- a/tempest/api/volume/base.py
+++ b/tempest/api/volume/base.py
@@ -18,6 +18,7 @@
 from tempest_lib import exceptions as lib_exc
 
 from tempest import clients
+from tempest.common import fixed_network
 from tempest import config
 from tempest import exceptions
 import tempest.test
@@ -62,6 +63,7 @@
         super(BaseVolumeTest, cls).setup_clients()
 
         cls.servers_client = cls.os.servers_client
+        cls.networks_client = cls.os.networks_client
 
         if cls._api_version == 1:
             cls.snapshots_client = cls.os.snapshots_client
@@ -159,6 +161,15 @@
             except Exception:
                 pass
 
+    @classmethod
+    def create_server(cls, name, **kwargs):
+        network = cls.get_tenant_network()
+        network_kwargs = fixed_network.set_networks_kwarg(network, kwargs)
+        return cls.servers_client.create_server(name,
+                                                cls.image_ref,
+                                                cls.flavor_ref,
+                                                **network_kwargs)
+
 
 class BaseVolumeAdminTest(BaseVolumeTest):
     """Base test case class for all Volume Admin API tests."""
diff --git a/tempest/api/volume/test_volumes_actions.py b/tempest/api/volume/test_volumes_actions.py
index 3de5021..1872ec7 100644
--- a/tempest/api/volume/test_volumes_actions.py
+++ b/tempest/api/volume/test_volumes_actions.py
@@ -36,9 +36,7 @@
 
         # Create a test shared instance
         srv_name = data_utils.rand_name(cls.__name__ + '-Instance')
-        cls.server = cls.servers_client.create_server(srv_name,
-                                                      cls.image_ref,
-                                                      cls.flavor_ref)
+        cls.server = cls.create_server(srv_name)
         cls.servers_client.wait_for_server_status(cls.server['id'], 'ACTIVE')
 
         # Create a test shared volume for attach/detach tests
diff --git a/tempest/api/volume/test_volumes_negative.py b/tempest/api/volume/test_volumes_negative.py
index af6e24e..a47e964 100644
--- a/tempest/api/volume/test_volumes_negative.py
+++ b/tempest/api/volume/test_volumes_negative.py
@@ -179,9 +179,7 @@
     @test.services('compute')
     def test_attach_volumes_with_nonexistent_volume_id(self):
         srv_name = data_utils.rand_name('Instance')
-        server = self.servers_client.create_server(srv_name,
-                                                   self.image_ref,
-                                                   self.flavor_ref)
+        server = self.create_server(srv_name)
         self.addCleanup(self.servers_client.delete_server, server['id'])
         self.servers_client.wait_for_server_status(server['id'], 'ACTIVE')
         self.assertRaises(lib_exc.NotFound,
diff --git a/tempest/api/volume/test_volumes_snapshots.py b/tempest/api/volume/test_volumes_snapshots.py
index 2b6339a..b277390 100644
--- a/tempest/api/volume/test_volumes_snapshots.py
+++ b/tempest/api/volume/test_volumes_snapshots.py
@@ -69,9 +69,7 @@
         # Create a snapshot when volume status is in-use
         # Create a test instance
         server_name = data_utils.rand_name('instance')
-        server = self.servers_client.create_server(server_name,
-                                                   self.image_ref,
-                                                   self.flavor_ref)
+        server = self.create_server(server_name)
         self.addCleanup(self.servers_client.delete_server, server['id'])
         self.servers_client.wait_for_server_status(server['id'], 'ACTIVE')
         mountpoint = '/dev/%s' % CONF.compute.volume_device_name
diff --git a/tempest/common/fixed_network.py b/tempest/common/fixed_network.py
new file mode 100644
index 0000000..b06ddf2
--- /dev/null
+++ b/tempest/common/fixed_network.py
@@ -0,0 +1,89 @@
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+import copy
+from oslo_log import log as logging
+
+from tempest_lib import exceptions as lib_exc
+
+from tempest import config
+from tempest import exceptions
+
+CONF = config.CONF
+
+LOG = logging.getLogger(__name__)
+
+
+def get_tenant_network(creds_provider, compute_networks_client):
+    """Get a network usable by the primary tenant
+
+    :param creds_provider: instance of credential provider
+    :param compute_networks_client: compute network client. We want to have the
+           compute network client so we can have use a common approach for both
+           neutron and nova-network cases. If this is not an admin network
+           client, set_network_kwargs might fail in case fixed_network_name
+           is the network to be used, and it's not visible to the tenant
+    :return a dict with 'id' and 'name' of the network
+    """
+    fixed_network_name = CONF.compute.fixed_network_name
+    network = None
+    # NOTE(andreaf) get_primary_network will always be available once
+    # bp test-accounts-continued is implemented
+    if (CONF.auth.allow_tenant_isolation and
+        (CONF.service_available.neutron and
+         not CONF.service_available.ironic)):
+        network = creds_provider.get_primary_network()
+    else:
+        if fixed_network_name:
+            try:
+                resp = compute_networks_client.list_networks(
+                    name=fixed_network_name)
+                if isinstance(resp, list):
+                    networks = resp
+                elif isinstance(resp, dict):
+                    networks = resp['networks']
+                else:
+                    raise lib_exc.NotFound()
+                if len(networks) > 0:
+                    network = networks[0]
+                else:
+                    msg = "Configured fixed_network_name not found"
+                    raise exceptions.InvalidConfiguration(msg)
+                # To be consistent with network isolation, add name is only
+                # label is available
+                network['name'] = network.get('name', network.get('label'))
+            except lib_exc.NotFound:
+                # In case of nova network, if the fixed_network_name is not
+                # owned by the tenant, and the network client is not an admin
+                # one, list_networks will not find it
+                LOG.info('Unable to find network %s. '
+                         'Starting instance without specifying a network.' %
+                         fixed_network_name)
+                network = {'name': fixed_network_name}
+    LOG.info('Found network %s available for tenant' % network)
+    return network
+
+
+def set_networks_kwarg(network, kwargs=None):
+    """Set 'networks' kwargs for a server create if missing
+
+    :param network: dict of network to be used with 'id' and 'name'
+    :param kwargs: server create kwargs to be enhanced
+    :return: new dict of kwargs updated to include networks
+    """
+    params = copy.copy(kwargs) or {}
+    if kwargs and 'networks' in kwargs:
+        return params
+
+    if network:
+        params.update({"networks": [{'uuid': network['id']}]})
+    return params
diff --git a/tempest/config.py b/tempest/config.py
index 4ee4669..f884baa 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -232,9 +232,11 @@
                help="Timeout in seconds to wait for output from ssh "
                     "channel."),
     cfg.StrOpt('fixed_network_name',
-               default='private',
                help="Name of the fixed network that is visible to all test "
-                    "tenants."),
+                    "tenants. If multiple networks are available for a tenant"
+                    " this is the network which will be used for creating "
+                    "servers if tempest does not create a network or a "
+                    "network is not specified elsewhere"),
     cfg.StrOpt('network_for_ssh',
                default='public',
                help="Network used for SSH connections. Ignored if "
diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py
index f8cc17c..bae8296 100644
--- a/tempest/scenario/manager.py
+++ b/tempest/scenario/manager.py
@@ -24,6 +24,7 @@
 
 from tempest import clients
 from tempest.common import credentials
+from tempest.common import fixed_network
 from tempest.common.utils.linux import remote_client
 from tempest import config
 from tempest import exceptions
@@ -184,6 +185,8 @@
             flavor = CONF.compute.flavor_ref
         if create_kwargs is None:
             create_kwargs = {}
+        network = self.get_tenant_network()
+        fixed_network.set_networks_kwarg(network, create_kwargs)
 
         LOG.debug("Creating a server (name: %s, image: %s, flavor: %s)",
                   name, image, flavor)
diff --git a/tempest/services/compute/json/networks_client.py b/tempest/services/compute/json/networks_client.py
index ef1c058..0ae0920 100644
--- a/tempest/services/compute/json/networks_client.py
+++ b/tempest/services/compute/json/networks_client.py
@@ -20,11 +20,15 @@
 
 class NetworksClientJSON(service_client.ServiceClient):
 
-    def list_networks(self):
+    def list_networks(self, name=None):
         resp, body = self.get("os-networks")
         body = json.loads(body)
         self.expected_success(200, resp.status)
-        return service_client.ResponseBodyList(resp, body['networks'])
+        if name:
+            networks = [n for n in body['networks'] if n['label'] == name]
+        else:
+            networks = body['networks']
+        return service_client.ResponseBodyList(resp, networks)
 
     def get_network(self, network_id):
         resp, body = self.get("os-networks/%s" % str(network_id))
diff --git a/tempest/test.py b/tempest/test.py
index 19bae74..da936b4 100644
--- a/tempest/test.py
+++ b/tempest/test.py
@@ -32,6 +32,7 @@
 
 from tempest import clients
 from tempest.common import credentials
+from tempest.common import fixed_network
 import tempest.common.generator.valid_generator as valid
 from tempest import config
 from tempest import exceptions
@@ -435,6 +436,21 @@
                 'subnet': subnet,
                 'dhcp': dhcp}
 
+    @classmethod
+    def get_tenant_network(cls):
+        """Get the network to be used in testing
+
+        :return: network dict including 'id' and 'name'
+        """
+        # Make sure isolated_creds exists and get a network client
+        networks_client = cls.get_client_manager().networks_client
+        isolated_creds = getattr(cls, 'isolated_creds', None)
+        if credentials.is_admin_available():
+            admin_creds = isolated_creds.get_admin_creds()
+            networks_client = clients.Manager(admin_creds).networks_client
+        return fixed_network.get_tenant_network(isolated_creds,
+                                                networks_client)
+
     def assertEmpty(self, list, msg=None):
         self.assertTrue(len(list) == 0, msg)
 
