rename tests -> api

Now that all the other tests are moved out of the tests directory
we can rename tests -> api to reflect that these tests are api
testing, and need to use only the internal clients.

Clean up references from other parts of OpenStack to the new api
namespace.

Reorder the imports as required with this naming change.

Added README.rst

Change-Id: I19203957f917b59e7c8a3838c590937752461a2f
diff --git a/tempest/api/README.rst b/tempest/api/README.rst
new file mode 100644
index 0000000..cf0aac7
--- /dev/null
+++ b/tempest/api/README.rst
@@ -0,0 +1,50 @@
+Tempest Guide to API tests
+========
+
+
+What are these tests?
+--------
+
+One of Tempest's prime function is to ensure that your OpenStack cloud
+works with the OpenStack API as documented. The current largest
+portion of Tempest code is devoted to test cases that do exactly this.
+
+It's also important to test not only the expected possitive path on
+APIs, but also to provide them with invalid data to ensure they fail
+in expected and documented ways. Over the course of the OpenStack
+project Tempest has discovered many fundamental bugs by doing just
+this.
+
+In order for some APIs to return meaniful results, there must be
+enough data in the system. This means these tests might start by
+spinning up a server, image, etc, then opperating on it.
+
+
+Why are these tests in tempest?
+--------
+
+This is one of the core missions for the Tempest project, and where it
+started. Many people use this bit of function in Tempest to ensure
+their clouds haven't broken the OpenStack API.
+
+It could be argued that some of the negative testing could be done
+back in the projects themselves, and we might evolve there over time,
+but currently in the OpenStack gate this is a fundamentally important
+place to keep things.
+
+
+Scope of these tests
+--------
+
+API tests should always use the Tempest implementation of the
+OpenStack API, as we want to ensure that bugs aren't hidden by the
+official clients.
+
+They should test specific API calls, and can build up complex state if
+it's needed for the API call to be meaningful.
+
+They should send not only good data, but bad data at the API and look
+for error codes.
+
+They should all be able to be run on their own, not depending on the
+state created by a previous test.
diff --git a/tempest/tests/__init__.py b/tempest/api/__init__.py
similarity index 100%
rename from tempest/tests/__init__.py
rename to tempest/api/__init__.py
diff --git a/tempest/tests/compute/__init__.py b/tempest/api/compute/__init__.py
similarity index 97%
rename from tempest/tests/compute/__init__.py
rename to tempest/api/compute/__init__.py
index 968f17e..6cd6f69 100644
--- a/tempest/tests/compute/__init__.py
+++ b/tempest/api/compute/__init__.py
@@ -36,7 +36,7 @@
 
 # All compute tests -- single setup function
 def generic_setup_package():
-    LOG.debug("Entering tempest.tests.compute.setup_package")
+    LOG.debug("Entering tempest.api.compute.setup_package")
 
     global MULTI_USER, DISK_CONFIG_ENABLED, FLAVOR_EXTRA_DATA_ENABLED
     os = clients.Manager()
diff --git a/tempest/tests/compute/admin/__init__.py b/tempest/api/compute/admin/__init__.py
similarity index 100%
rename from tempest/tests/compute/admin/__init__.py
rename to tempest/api/compute/admin/__init__.py
diff --git a/tempest/tests/compute/admin/test_aggregates.py b/tempest/api/compute/admin/test_aggregates.py
similarity index 99%
rename from tempest/tests/compute/admin/test_aggregates.py
rename to tempest/api/compute/admin/test_aggregates.py
index 07df77f..1eff4dd 100644
--- a/tempest/tests/compute/admin/test_aggregates.py
+++ b/tempest/api/compute/admin/test_aggregates.py
@@ -15,10 +15,10 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api.compute import base
 from tempest.common.utils.data_utils import rand_name
 from tempest import exceptions
 from tempest.test import attr
-from tempest.tests.compute import base
 
 
 class AggregatesAdminTestJSON(base.BaseComputeAdminTest):
diff --git a/tempest/tests/compute/admin/test_availability_zone.py b/tempest/api/compute/admin/test_availability_zone.py
similarity index 98%
rename from tempest/tests/compute/admin/test_availability_zone.py
rename to tempest/api/compute/admin/test_availability_zone.py
index 98ad49c..db54011 100644
--- a/tempest/tests/compute/admin/test_availability_zone.py
+++ b/tempest/api/compute/admin/test_availability_zone.py
@@ -15,9 +15,9 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api.compute import base
 from tempest import exceptions
 from tempest.test import attr
-from tempest.tests.compute import base
 
 
 class AvailabilityZoneAdminTestJSON(base.BaseComputeAdminTest):
diff --git a/tempest/tests/compute/admin/test_fixed_ips.py b/tempest/api/compute/admin/test_fixed_ips.py
similarity index 98%
rename from tempest/tests/compute/admin/test_fixed_ips.py
rename to tempest/api/compute/admin/test_fixed_ips.py
index d8b1359..4194b7e 100644
--- a/tempest/tests/compute/admin/test_fixed_ips.py
+++ b/tempest/api/compute/admin/test_fixed_ips.py
@@ -15,9 +15,9 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api.compute import base
 from tempest import exceptions
 from tempest.test import attr
-from tempest.tests.compute import base
 
 
 class FixedIPsBase(base.BaseComputeAdminTest):
diff --git a/tempest/tests/compute/admin/test_flavors.py b/tempest/api/compute/admin/test_flavors.py
similarity index 99%
rename from tempest/tests/compute/admin/test_flavors.py
rename to tempest/api/compute/admin/test_flavors.py
index 7957009..95457b9 100644
--- a/tempest/tests/compute/admin/test_flavors.py
+++ b/tempest/api/compute/admin/test_flavors.py
@@ -15,12 +15,12 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api import compute
+from tempest.api.compute import base
 from tempest.common.utils.data_utils import rand_int_id
 from tempest.common.utils.data_utils import rand_name
 from tempest import exceptions
 from tempest.test import attr
-from tempest.tests import compute
-from tempest.tests.compute import base
 
 
 class FlavorsAdminTestJSON(base.BaseComputeAdminTest):
diff --git a/tempest/tests/compute/admin/test_flavors_access.py b/tempest/api/compute/admin/test_flavors_access.py
similarity index 98%
rename from tempest/tests/compute/admin/test_flavors_access.py
rename to tempest/api/compute/admin/test_flavors_access.py
index 4cc3f57..85648a9 100644
--- a/tempest/tests/compute/admin/test_flavors_access.py
+++ b/tempest/api/compute/admin/test_flavors_access.py
@@ -15,12 +15,12 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api import compute
+from tempest.api.compute import base
 from tempest.common.utils.data_utils import rand_int_id
 from tempest.common.utils.data_utils import rand_name
 from tempest import exceptions
 from tempest.test import attr
-from tempest.tests import compute
-from tempest.tests.compute import base
 
 
 class FlavorsAccessTestJSON(base.BaseComputeAdminTest):
diff --git a/tempest/tests/compute/admin/test_flavors_extra_specs.py b/tempest/api/compute/admin/test_flavors_extra_specs.py
similarity index 98%
rename from tempest/tests/compute/admin/test_flavors_extra_specs.py
rename to tempest/api/compute/admin/test_flavors_extra_specs.py
index 31a2511..357a787 100644
--- a/tempest/tests/compute/admin/test_flavors_extra_specs.py
+++ b/tempest/api/compute/admin/test_flavors_extra_specs.py
@@ -15,10 +15,10 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api import compute
+from tempest.api.compute import base
 from tempest import exceptions
 from tempest.test import attr
-from tempest.tests import compute
-from tempest.tests.compute import base
 
 
 class FlavorsExtraSpecsTestJSON(base.BaseComputeAdminTest):
diff --git a/tempest/tests/compute/admin/test_quotas.py b/tempest/api/compute/admin/test_quotas.py
similarity index 99%
rename from tempest/tests/compute/admin/test_quotas.py
rename to tempest/api/compute/admin/test_quotas.py
index 7160aed..ba21dc5 100644
--- a/tempest/tests/compute/admin/test_quotas.py
+++ b/tempest/api/compute/admin/test_quotas.py
@@ -15,10 +15,10 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api.compute import base
 from tempest.common.utils.data_utils import rand_name
 from tempest import exceptions
 from tempest.test import attr
-from tempest.tests.compute import base
 
 
 class QuotasAdminTestJSON(base.BaseComputeAdminTest):
diff --git a/tempest/tests/compute/admin/test_services.py b/tempest/api/compute/admin/test_services.py
similarity index 97%
rename from tempest/tests/compute/admin/test_services.py
rename to tempest/api/compute/admin/test_services.py
index 0577164..aacfe8a 100644
--- a/tempest/tests/compute/admin/test_services.py
+++ b/tempest/api/compute/admin/test_services.py
@@ -15,9 +15,9 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api.compute import base
 from tempest import exceptions
 from tempest.test import attr
-from tempest.tests.compute import base
 
 
 class ServicesAdminTestJSON(base.BaseComputeAdminTest):
diff --git a/tempest/tests/compute/base.py b/tempest/api/compute/base.py
similarity index 99%
rename from tempest/tests/compute/base.py
rename to tempest/api/compute/base.py
index fbefe35..5f0df3c 100644
--- a/tempest/tests/compute/base.py
+++ b/tempest/api/compute/base.py
@@ -18,11 +18,11 @@
 import logging
 import time
 
+from tempest.api import compute
 from tempest import clients
 from tempest.common.utils.data_utils import rand_name
 from tempest import exceptions
 import tempest.test
-from tempest.tests import compute
 
 
 LOG = logging.getLogger(__name__)
diff --git a/tempest/tests/compute/flavors/__init__.py b/tempest/api/compute/flavors/__init__.py
similarity index 100%
rename from tempest/tests/compute/flavors/__init__.py
rename to tempest/api/compute/flavors/__init__.py
diff --git a/tempest/tests/compute/flavors/test_flavors.py b/tempest/api/compute/flavors/test_flavors.py
similarity index 99%
rename from tempest/tests/compute/flavors/test_flavors.py
rename to tempest/api/compute/flavors/test_flavors.py
index 95244df..2fd03ff 100644
--- a/tempest/tests/compute/flavors/test_flavors.py
+++ b/tempest/api/compute/flavors/test_flavors.py
@@ -15,9 +15,9 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api.compute import base
 from tempest import exceptions
 from tempest.test import attr
-from tempest.tests.compute import base
 
 
 class FlavorsTestJSON(base.BaseComputeTest):
diff --git a/tempest/tests/compute/floating_ips/__init__.py b/tempest/api/compute/floating_ips/__init__.py
similarity index 100%
rename from tempest/tests/compute/floating_ips/__init__.py
rename to tempest/api/compute/floating_ips/__init__.py
diff --git a/tempest/tests/compute/floating_ips/test_floating_ips_actions.py b/tempest/api/compute/floating_ips/test_floating_ips_actions.py
similarity index 99%
rename from tempest/tests/compute/floating_ips/test_floating_ips_actions.py
rename to tempest/api/compute/floating_ips/test_floating_ips_actions.py
index 5fe911f..8263dc2 100644
--- a/tempest/tests/compute/floating_ips/test_floating_ips_actions.py
+++ b/tempest/api/compute/floating_ips/test_floating_ips_actions.py
@@ -15,10 +15,10 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api.compute import base
 from tempest.common.utils.data_utils import rand_name
 from tempest import exceptions
 from tempest.test import attr
-from tempest.tests.compute import base
 
 
 class FloatingIPsTestJSON(base.BaseComputeTest):
diff --git a/tempest/tests/compute/floating_ips/test_list_floating_ips.py b/tempest/api/compute/floating_ips/test_list_floating_ips.py
similarity index 98%
rename from tempest/tests/compute/floating_ips/test_list_floating_ips.py
rename to tempest/api/compute/floating_ips/test_list_floating_ips.py
index b795909..017659e 100644
--- a/tempest/tests/compute/floating_ips/test_list_floating_ips.py
+++ b/tempest/api/compute/floating_ips/test_list_floating_ips.py
@@ -15,10 +15,10 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api.compute import base
 from tempest.common.utils.data_utils import rand_name
 from tempest import exceptions
 from tempest.test import attr
-from tempest.tests.compute import base
 
 
 class FloatingIPDetailsTestJSON(base.BaseComputeTest):
diff --git a/tempest/tests/compute/images/__init__.py b/tempest/api/compute/images/__init__.py
similarity index 100%
rename from tempest/tests/compute/images/__init__.py
rename to tempest/api/compute/images/__init__.py
diff --git a/tempest/tests/compute/images/test_image_metadata.py b/tempest/api/compute/images/test_image_metadata.py
similarity index 99%
rename from tempest/tests/compute/images/test_image_metadata.py
rename to tempest/api/compute/images/test_image_metadata.py
index 5d6439b..6b167a8 100644
--- a/tempest/tests/compute/images/test_image_metadata.py
+++ b/tempest/api/compute/images/test_image_metadata.py
@@ -15,10 +15,10 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api.compute import base
 from tempest.common.utils.data_utils import rand_name
 from tempest import exceptions
 from tempest.test import attr
-from tempest.tests.compute import base
 
 
 class ImagesMetadataTestJSON(base.BaseComputeTest):
diff --git a/tempest/tests/compute/images/test_images.py b/tempest/api/compute/images/test_images.py
similarity index 98%
rename from tempest/tests/compute/images/test_images.py
rename to tempest/api/compute/images/test_images.py
index 1dae8a5..0647d06 100644
--- a/tempest/tests/compute/images/test_images.py
+++ b/tempest/api/compute/images/test_images.py
@@ -17,13 +17,13 @@
 
 import testtools
 
+from tempest.api import compute
+from tempest.api.compute import base
 from tempest import clients
 from tempest.common.utils.data_utils import parse_image_id
 from tempest.common.utils.data_utils import rand_name
 from tempest import exceptions
 from tempest.test import attr
-from tempest.tests import compute
-from tempest.tests.compute import base
 
 
 class ImagesTestJSON(base.BaseComputeTest):
diff --git a/tempest/tests/compute/images/test_images_oneserver.py b/tempest/api/compute/images/test_images_oneserver.py
similarity index 98%
rename from tempest/tests/compute/images/test_images_oneserver.py
rename to tempest/api/compute/images/test_images_oneserver.py
index dfc16f4..e5e02a7 100644
--- a/tempest/tests/compute/images/test_images_oneserver.py
+++ b/tempest/api/compute/images/test_images_oneserver.py
@@ -17,13 +17,13 @@
 
 import testtools
 
+from tempest.api import compute
+from tempest.api.compute import base
 from tempest import clients
 from tempest.common.utils.data_utils import parse_image_id
 from tempest.common.utils.data_utils import rand_name
 from tempest import exceptions
 from tempest.test import attr
-from tempest.tests import compute
-from tempest.tests.compute import base
 
 
 class ImagesOneServerTestJSON(base.BaseComputeTest):
diff --git a/tempest/tests/compute/images/test_list_image_filters.py b/tempest/api/compute/images/test_list_image_filters.py
similarity index 99%
rename from tempest/tests/compute/images/test_list_image_filters.py
rename to tempest/api/compute/images/test_list_image_filters.py
index b1a6f77..4ba8e99 100644
--- a/tempest/tests/compute/images/test_list_image_filters.py
+++ b/tempest/api/compute/images/test_list_image_filters.py
@@ -15,11 +15,11 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api.compute import base
 from tempest.common.utils.data_utils import parse_image_id
 from tempest.common.utils.data_utils import rand_name
 from tempest import exceptions
 from tempest.test import attr
-from tempest.tests.compute import base
 
 
 class ListImageFiltersTestJSON(base.BaseComputeTest):
diff --git a/tempest/tests/compute/images/test_list_images.py b/tempest/api/compute/images/test_list_images.py
similarity index 97%
rename from tempest/tests/compute/images/test_list_images.py
rename to tempest/api/compute/images/test_list_images.py
index 07c48fe..fddad14 100644
--- a/tempest/tests/compute/images/test_list_images.py
+++ b/tempest/api/compute/images/test_list_images.py
@@ -15,8 +15,8 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api.compute import base
 from tempest.test import attr
-from tempest.tests.compute import base
 
 
 class ListImagesTestJSON(base.BaseComputeTest):
diff --git a/tempest/tests/compute/keypairs/__init__.py b/tempest/api/compute/keypairs/__init__.py
similarity index 100%
rename from tempest/tests/compute/keypairs/__init__.py
rename to tempest/api/compute/keypairs/__init__.py
diff --git a/tempest/tests/compute/keypairs/test_keypairs.py b/tempest/api/compute/keypairs/test_keypairs.py
similarity index 99%
rename from tempest/tests/compute/keypairs/test_keypairs.py
rename to tempest/api/compute/keypairs/test_keypairs.py
index 87c71aa..15a23e5 100644
--- a/tempest/tests/compute/keypairs/test_keypairs.py
+++ b/tempest/api/compute/keypairs/test_keypairs.py
@@ -15,10 +15,10 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api.compute import base
 from tempest.common.utils.data_utils import rand_name
 from tempest import exceptions
 from tempest.test import attr
-from tempest.tests.compute import base
 
 
 class KeyPairsTestJSON(base.BaseComputeTest):
diff --git a/tempest/tests/compute/limits/__init__.py b/tempest/api/compute/limits/__init__.py
similarity index 100%
rename from tempest/tests/compute/limits/__init__.py
rename to tempest/api/compute/limits/__init__.py
diff --git a/tempest/tests/compute/limits/test_absolute_limits.py b/tempest/api/compute/limits/test_absolute_limits.py
similarity index 98%
rename from tempest/tests/compute/limits/test_absolute_limits.py
rename to tempest/api/compute/limits/test_absolute_limits.py
index 6933fd7..b2c496b 100644
--- a/tempest/tests/compute/limits/test_absolute_limits.py
+++ b/tempest/api/compute/limits/test_absolute_limits.py
@@ -15,9 +15,9 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api.compute import base
 from tempest import exceptions
 from tempest.test import attr
-from tempest.tests.compute import base
 
 
 class AbsoluteLimitsTestJSON(base.BaseComputeTest):
diff --git a/tempest/tests/compute/security_groups/__init__.py b/tempest/api/compute/security_groups/__init__.py
similarity index 100%
rename from tempest/tests/compute/security_groups/__init__.py
rename to tempest/api/compute/security_groups/__init__.py
diff --git a/tempest/tests/compute/security_groups/test_security_group_rules.py b/tempest/api/compute/security_groups/test_security_group_rules.py
similarity index 99%
rename from tempest/tests/compute/security_groups/test_security_group_rules.py
rename to tempest/api/compute/security_groups/test_security_group_rules.py
index c2032d4..ad311d9 100644
--- a/tempest/tests/compute/security_groups/test_security_group_rules.py
+++ b/tempest/api/compute/security_groups/test_security_group_rules.py
@@ -15,10 +15,10 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api.compute import base
 from tempest.common.utils.data_utils import rand_name
 from tempest import exceptions
 from tempest.test import attr
-from tempest.tests.compute import base
 
 
 class SecurityGroupRulesTestJSON(base.BaseComputeTest):
diff --git a/tempest/tests/compute/security_groups/test_security_groups.py b/tempest/api/compute/security_groups/test_security_groups.py
similarity index 99%
rename from tempest/tests/compute/security_groups/test_security_groups.py
rename to tempest/api/compute/security_groups/test_security_groups.py
index d0afde4..75afe0d 100644
--- a/tempest/tests/compute/security_groups/test_security_groups.py
+++ b/tempest/api/compute/security_groups/test_security_groups.py
@@ -15,10 +15,10 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api.compute import base
 from tempest.common.utils.data_utils import rand_name
 from tempest import exceptions
 from tempest.test import attr
-from tempest.tests.compute import base
 
 
 class SecurityGroupsTestJSON(base.BaseComputeTest):
diff --git a/tempest/tests/compute/servers/__init__.py b/tempest/api/compute/servers/__init__.py
similarity index 100%
rename from tempest/tests/compute/servers/__init__.py
rename to tempest/api/compute/servers/__init__.py
diff --git a/tempest/tests/compute/servers/test_attach_interfaces.py b/tempest/api/compute/servers/test_attach_interfaces.py
similarity index 98%
rename from tempest/tests/compute/servers/test_attach_interfaces.py
rename to tempest/api/compute/servers/test_attach_interfaces.py
index c7d4fa0..8977cad 100644
--- a/tempest/tests/compute/servers/test_attach_interfaces.py
+++ b/tempest/api/compute/servers/test_attach_interfaces.py
@@ -13,7 +13,7 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-from tempest.tests.compute import base
+from tempest.api.compute import base
 
 import time
 
diff --git a/tempest/tests/compute/servers/test_create_server.py b/tempest/api/compute/servers/test_create_server.py
similarity index 98%
rename from tempest/tests/compute/servers/test_create_server.py
rename to tempest/api/compute/servers/test_create_server.py
index b522992..f06a0cc 100644
--- a/tempest/tests/compute/servers/test_create_server.py
+++ b/tempest/api/compute/servers/test_create_server.py
@@ -20,13 +20,12 @@
 import netaddr
 import testtools
 
-
+from tempest.api import compute
+from tempest.api.compute import base
 from tempest.common.utils.data_utils import rand_name
 from tempest.common.utils.linux.remote_client import RemoteClient
 import tempest.config
 from tempest.test import attr
-from tempest.tests import compute
-from tempest.tests.compute import base
 
 
 @attr(type='smoke')
diff --git a/tempest/tests/compute/servers/test_disk_config.py b/tempest/api/compute/servers/test_disk_config.py
similarity index 98%
rename from tempest/tests/compute/servers/test_disk_config.py
rename to tempest/api/compute/servers/test_disk_config.py
index fe1c271..64fb7d3 100644
--- a/tempest/tests/compute/servers/test_disk_config.py
+++ b/tempest/api/compute/servers/test_disk_config.py
@@ -17,9 +17,9 @@
 
 import testtools
 
+from tempest.api import compute
+from tempest.api.compute import base
 from tempest.test import attr
-from tempest.tests import compute
-from tempest.tests.compute import base
 
 
 class ServerDiskConfigTestJSON(base.BaseComputeTest):
diff --git a/tempest/tests/compute/servers/test_instance_actions.py b/tempest/api/compute/servers/test_instance_actions.py
similarity index 98%
rename from tempest/tests/compute/servers/test_instance_actions.py
rename to tempest/api/compute/servers/test_instance_actions.py
index e7e31e8..81fd26c 100644
--- a/tempest/tests/compute/servers/test_instance_actions.py
+++ b/tempest/api/compute/servers/test_instance_actions.py
@@ -15,9 +15,9 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api.compute import base
 from tempest import exceptions
 from tempest.test import attr
-from tempest.tests.compute import base
 
 
 class InstanceActionsTestJSON(base.BaseComputeTest):
diff --git a/tempest/tests/compute/servers/test_list_server_filters.py b/tempest/api/compute/servers/test_list_server_filters.py
similarity index 99%
rename from tempest/tests/compute/servers/test_list_server_filters.py
rename to tempest/api/compute/servers/test_list_server_filters.py
index ca5e112..7c4f5f5 100644
--- a/tempest/tests/compute/servers/test_list_server_filters.py
+++ b/tempest/api/compute/servers/test_list_server_filters.py
@@ -15,14 +15,13 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+import testtools
 
+from tempest.api.compute import base
+from tempest.api import utils
 from tempest.common.utils.data_utils import rand_name
 from tempest import exceptions
 from tempest.test import attr
-from tempest.tests.compute import base
-from tempest.tests import utils
-
-import testtools
 
 
 class ListServerFiltersTestJSON(base.BaseComputeTest):
diff --git a/tempest/tests/compute/servers/test_list_servers_negative.py b/tempest/api/compute/servers/test_list_servers_negative.py
similarity index 98%
rename from tempest/tests/compute/servers/test_list_servers_negative.py
rename to tempest/api/compute/servers/test_list_servers_negative.py
index 0559206..2c15c99 100644
--- a/tempest/tests/compute/servers/test_list_servers_negative.py
+++ b/tempest/api/compute/servers/test_list_servers_negative.py
@@ -16,10 +16,10 @@
 #    under the License.
 
 
+from tempest.api import compute
+from tempest.api.compute import base
 from tempest import clients
 from tempest import exceptions
-from tempest.tests import compute
-from tempest.tests.compute import base
 
 
 class ListServersNegativeTestJSON(base.BaseComputeTest):
diff --git a/tempest/tests/compute/servers/test_multiple_create.py b/tempest/api/compute/servers/test_multiple_create.py
similarity index 98%
rename from tempest/tests/compute/servers/test_multiple_create.py
rename to tempest/api/compute/servers/test_multiple_create.py
index 47a38b1..476a767 100644
--- a/tempest/tests/compute/servers/test_multiple_create.py
+++ b/tempest/api/compute/servers/test_multiple_create.py
@@ -15,10 +15,10 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api.compute import base
 from tempest.common.utils.data_utils import rand_name
 from tempest import exceptions
 from tempest.test import attr
-from tempest.tests.compute import base
 
 
 class MultipleCreateTestJSON(base.BaseComputeTest):
diff --git a/tempest/tests/compute/servers/test_server_actions.py b/tempest/api/compute/servers/test_server_actions.py
similarity index 99%
rename from tempest/tests/compute/servers/test_server_actions.py
rename to tempest/api/compute/servers/test_server_actions.py
index 5634784..e8f41ec 100644
--- a/tempest/tests/compute/servers/test_server_actions.py
+++ b/tempest/api/compute/servers/test_server_actions.py
@@ -20,13 +20,13 @@
 
 import testtools
 
+from tempest.api import compute
+from tempest.api.compute import base
 from tempest.common.utils.data_utils import rand_name
 from tempest.common.utils.linux.remote_client import RemoteClient
 import tempest.config
 from tempest import exceptions
 from tempest.test import attr
-from tempest.tests import compute
-from tempest.tests.compute import base
 
 
 class ServerActionsTestJSON(base.BaseComputeTest):
diff --git a/tempest/tests/compute/servers/test_server_addresses.py b/tempest/api/compute/servers/test_server_addresses.py
similarity index 98%
rename from tempest/tests/compute/servers/test_server_addresses.py
rename to tempest/api/compute/servers/test_server_addresses.py
index 05fa320..01e4341 100644
--- a/tempest/tests/compute/servers/test_server_addresses.py
+++ b/tempest/api/compute/servers/test_server_addresses.py
@@ -15,9 +15,9 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api.compute import base
 from tempest import exceptions
 from tempest.test import attr
-from tempest.tests.compute import base
 
 
 class ServerAddressesTest(base.BaseComputeTest):
diff --git a/tempest/tests/compute/servers/test_server_metadata.py b/tempest/api/compute/servers/test_server_metadata.py
similarity index 99%
rename from tempest/tests/compute/servers/test_server_metadata.py
rename to tempest/api/compute/servers/test_server_metadata.py
index 69c0ad9..664a0c0 100644
--- a/tempest/tests/compute/servers/test_server_metadata.py
+++ b/tempest/api/compute/servers/test_server_metadata.py
@@ -15,9 +15,9 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api.compute import base
 from tempest import exceptions
 from tempest.test import attr
-from tempest.tests.compute import base
 
 
 class ServerMetadataTestJSON(base.BaseComputeTest):
diff --git a/tempest/tests/compute/servers/test_server_personality.py b/tempest/api/compute/servers/test_server_personality.py
similarity index 98%
rename from tempest/tests/compute/servers/test_server_personality.py
rename to tempest/api/compute/servers/test_server_personality.py
index 0546859..b0ee9e7 100644
--- a/tempest/tests/compute/servers/test_server_personality.py
+++ b/tempest/api/compute/servers/test_server_personality.py
@@ -17,9 +17,9 @@
 
 import base64
 
+from tempest.api.compute import base
 from tempest import exceptions
 from tempest.test import attr
-from tempest.tests.compute import base
 
 
 class ServerPersonalityTestJSON(base.BaseComputeTest):
diff --git a/tempest/tests/compute/servers/test_server_rescue.py b/tempest/api/compute/servers/test_server_rescue.py
similarity index 99%
rename from tempest/tests/compute/servers/test_server_rescue.py
rename to tempest/api/compute/servers/test_server_rescue.py
index 862a86a..a7410ec 100644
--- a/tempest/tests/compute/servers/test_server_rescue.py
+++ b/tempest/api/compute/servers/test_server_rescue.py
@@ -15,11 +15,11 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api.compute import base
 from tempest.common.utils.data_utils import rand_name
 import tempest.config
 from tempest import exceptions
 from tempest.test import attr
-from tempest.tests.compute import base
 
 
 class ServerRescueTestJSON(base.BaseComputeTest):
diff --git a/tempest/tests/compute/servers/test_servers.py b/tempest/api/compute/servers/test_servers.py
similarity index 98%
rename from tempest/tests/compute/servers/test_servers.py
rename to tempest/api/compute/servers/test_servers.py
index 4796e86..f86ac07 100644
--- a/tempest/tests/compute/servers/test_servers.py
+++ b/tempest/api/compute/servers/test_servers.py
@@ -15,9 +15,9 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api.compute import base
 from tempest.common.utils.data_utils import rand_name
 from tempest.test import attr
-from tempest.tests.compute import base
 
 
 class ServersTestJSON(base.BaseComputeTest):
diff --git a/tempest/tests/compute/servers/test_servers_negative.py b/tempest/api/compute/servers/test_servers_negative.py
similarity index 99%
rename from tempest/tests/compute/servers/test_servers_negative.py
rename to tempest/api/compute/servers/test_servers_negative.py
index 9013b36..b369179 100644
--- a/tempest/tests/compute/servers/test_servers_negative.py
+++ b/tempest/api/compute/servers/test_servers_negative.py
@@ -17,11 +17,11 @@
 
 import sys
 
+from tempest.api.compute import base
 from tempest import clients
 from tempest.common.utils.data_utils import rand_name
 from tempest import exceptions
 from tempest.test import attr
-from tempest.tests.compute import base
 
 
 class ServersNegativeTest(base.BaseComputeTest):
diff --git a/tempest/tests/compute/servers/test_virtual_interfaces.py b/tempest/api/compute/servers/test_virtual_interfaces.py
similarity index 98%
rename from tempest/tests/compute/servers/test_virtual_interfaces.py
rename to tempest/api/compute/servers/test_virtual_interfaces.py
index 476a556..bdec1cb 100644
--- a/tempest/tests/compute/servers/test_virtual_interfaces.py
+++ b/tempest/api/compute/servers/test_virtual_interfaces.py
@@ -17,10 +17,10 @@
 
 import netaddr
 
+from tempest.api.compute import base
 from tempest.common.utils.data_utils import rand_name
 from tempest import exceptions
 from tempest.test import attr
-from tempest.tests.compute import base
 
 
 @attr(type='smoke')
diff --git a/tempest/tests/compute/test_authorization.py b/tempest/api/compute/test_authorization.py
similarity index 99%
rename from tempest/tests/compute/test_authorization.py
rename to tempest/api/compute/test_authorization.py
index 6edc946..b0d6a0b 100644
--- a/tempest/tests/compute/test_authorization.py
+++ b/tempest/api/compute/test_authorization.py
@@ -15,12 +15,12 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api import compute
+from tempest.api.compute import base
 from tempest import clients
 from tempest.common.utils.data_utils import parse_image_id
 from tempest.common.utils.data_utils import rand_name
 from tempest import exceptions
-from tempest.tests import compute
-from tempest.tests.compute import base
 
 
 class AuthorizationTestJSON(base.BaseComputeTest):
diff --git a/tempest/tests/compute/test_extensions.py b/tempest/api/compute/test_extensions.py
similarity index 96%
rename from tempest/tests/compute/test_extensions.py
rename to tempest/api/compute/test_extensions.py
index 2c13fb9..5bc4a30 100644
--- a/tempest/tests/compute/test_extensions.py
+++ b/tempest/api/compute/test_extensions.py
@@ -16,8 +16,8 @@
 #    under the License.
 
 
+from tempest.api.compute import base
 from tempest.test import attr
-from tempest.tests.compute import base
 
 
 class ExtensionsTestJSON(base.BaseComputeTest):
diff --git a/tempest/tests/compute/test_live_block_migration.py b/tempest/api/compute/test_live_block_migration.py
similarity index 99%
rename from tempest/tests/compute/test_live_block_migration.py
rename to tempest/api/compute/test_live_block_migration.py
index e22d45a..622800a 100644
--- a/tempest/tests/compute/test_live_block_migration.py
+++ b/tempest/api/compute/test_live_block_migration.py
@@ -20,10 +20,10 @@
 
 import testtools
 
+from tempest.api.compute import base
 from tempest import config
 from tempest import exceptions
 from tempest.test import attr
-from tempest.tests.compute import base
 
 
 @attr(category='live-migration')
diff --git a/tempest/tests/compute/test_quotas.py b/tempest/api/compute/test_quotas.py
similarity index 98%
rename from tempest/tests/compute/test_quotas.py
rename to tempest/api/compute/test_quotas.py
index 92e5a70..1a8a40b 100644
--- a/tempest/tests/compute/test_quotas.py
+++ b/tempest/api/compute/test_quotas.py
@@ -15,8 +15,8 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api.compute import base
 from tempest.test import attr
-from tempest.tests.compute import base
 
 
 class QuotasTestJSON(base.BaseComputeTest):
diff --git a/tempest/tests/compute/volumes/__init__.py b/tempest/api/compute/volumes/__init__.py
similarity index 100%
rename from tempest/tests/compute/volumes/__init__.py
rename to tempest/api/compute/volumes/__init__.py
diff --git a/tempest/tests/compute/volumes/test_attach_volume.py b/tempest/api/compute/volumes/test_attach_volume.py
similarity index 98%
rename from tempest/tests/compute/volumes/test_attach_volume.py
rename to tempest/api/compute/volumes/test_attach_volume.py
index cb0a964..a086c17 100644
--- a/tempest/tests/compute/volumes/test_attach_volume.py
+++ b/tempest/api/compute/volumes/test_attach_volume.py
@@ -17,10 +17,10 @@
 
 import testtools
 
+from tempest.api.compute import base
 from tempest.common.utils.linux.remote_client import RemoteClient
 import tempest.config
 from tempest.test import attr
-from tempest.tests.compute import base
 
 
 class AttachVolumeTestJSON(base.BaseComputeTest):
diff --git a/tempest/tests/compute/volumes/test_volumes_get.py b/tempest/api/compute/volumes/test_volumes_get.py
similarity index 98%
rename from tempest/tests/compute/volumes/test_volumes_get.py
rename to tempest/api/compute/volumes/test_volumes_get.py
index 65d2d45..4646ae2 100644
--- a/tempest/tests/compute/volumes/test_volumes_get.py
+++ b/tempest/api/compute/volumes/test_volumes_get.py
@@ -15,9 +15,9 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api.compute import base
 from tempest.common.utils.data_utils import rand_name
 from tempest.test import attr
-from tempest.tests.compute import base
 
 
 class VolumesGetTestJSON(base.BaseComputeTest):
diff --git a/tempest/tests/compute/volumes/test_volumes_list.py b/tempest/api/compute/volumes/test_volumes_list.py
similarity index 98%
rename from tempest/tests/compute/volumes/test_volumes_list.py
rename to tempest/api/compute/volumes/test_volumes_list.py
index ffd6a8c..b1ef2fd 100644
--- a/tempest/tests/compute/volumes/test_volumes_list.py
+++ b/tempest/api/compute/volumes/test_volumes_list.py
@@ -15,9 +15,8 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-
+from tempest.api.compute import base
 from tempest.common.utils.data_utils import rand_name
-from tempest.tests.compute import base
 
 
 class VolumesTestJSON(base.BaseComputeTest):
diff --git a/tempest/tests/compute/volumes/test_volumes_negative.py b/tempest/api/compute/volumes/test_volumes_negative.py
similarity index 98%
rename from tempest/tests/compute/volumes/test_volumes_negative.py
rename to tempest/api/compute/volumes/test_volumes_negative.py
index 306b93b..a4ecd0d 100644
--- a/tempest/tests/compute/volumes/test_volumes_negative.py
+++ b/tempest/api/compute/volumes/test_volumes_negative.py
@@ -15,9 +15,9 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api.compute import base
 from tempest.common.utils.data_utils import rand_name
 from tempest import exceptions
-from tempest.tests.compute import base
 
 
 class VolumesNegativeTest(base.BaseComputeTest):
diff --git a/tempest/tests/identity/__init__.py b/tempest/api/identity/__init__.py
similarity index 92%
rename from tempest/tests/identity/__init__.py
rename to tempest/api/identity/__init__.py
index 8b03834..e5fdc1b 100644
--- a/tempest/tests/identity/__init__.py
+++ b/tempest/api/identity/__init__.py
@@ -22,4 +22,4 @@
 
 # All identity tests -- single setup function
 def setup_package():
-    LOG.debug("Entering tempest.tests.identity.setup_package")
+    LOG.debug("Entering tempest.api.identity.setup_package")
diff --git a/tempest/tests/identity/admin/__init__.py b/tempest/api/identity/admin/__init__.py
similarity index 100%
rename from tempest/tests/identity/admin/__init__.py
rename to tempest/api/identity/admin/__init__.py
diff --git a/tempest/tests/identity/admin/test_roles.py b/tempest/api/identity/admin/test_roles.py
similarity index 99%
rename from tempest/tests/identity/admin/test_roles.py
rename to tempest/api/identity/admin/test_roles.py
index b3d7921..08b86ca 100644
--- a/tempest/tests/identity/admin/test_roles.py
+++ b/tempest/api/identity/admin/test_roles.py
@@ -15,10 +15,10 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api.identity import base
 from tempest.common.utils.data_utils import rand_name
 from tempest import exceptions
 from tempest.test import attr
-from tempest.tests.identity import base
 
 
 class RolesTestJSON(base.BaseIdentityAdminTest):
diff --git a/tempest/tests/identity/admin/test_services.py b/tempest/api/identity/admin/test_services.py
similarity index 98%
rename from tempest/tests/identity/admin/test_services.py
rename to tempest/api/identity/admin/test_services.py
index 6d8700f..644853a 100644
--- a/tempest/tests/identity/admin/test_services.py
+++ b/tempest/api/identity/admin/test_services.py
@@ -16,10 +16,10 @@
 #    under the License.
 
 
+from tempest.api.identity import base
 from tempest.common.utils.data_utils import rand_name
 from tempest import exceptions
 from tempest.test import attr
-from tempest.tests.identity import base
 
 
 class ServicesTestJSON(base.BaseIdentityAdminTest):
diff --git a/tempest/tests/identity/admin/test_tenants.py b/tempest/api/identity/admin/test_tenants.py
similarity index 99%
rename from tempest/tests/identity/admin/test_tenants.py
rename to tempest/api/identity/admin/test_tenants.py
index c51a14a..815cfbe 100644
--- a/tempest/tests/identity/admin/test_tenants.py
+++ b/tempest/api/identity/admin/test_tenants.py
@@ -15,10 +15,10 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api.identity import base
 from tempest.common.utils.data_utils import rand_name
 from tempest import exceptions
 from tempest.test import attr
-from tempest.tests.identity import base
 
 
 class TenantsTestJSON(base.BaseIdentityAdminTest):
diff --git a/tempest/tests/identity/admin/test_users.py b/tempest/api/identity/admin/test_users.py
similarity index 99%
rename from tempest/tests/identity/admin/test_users.py
rename to tempest/api/identity/admin/test_users.py
index e638a08..abc311b 100644
--- a/tempest/tests/identity/admin/test_users.py
+++ b/tempest/api/identity/admin/test_users.py
@@ -15,12 +15,13 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+import testtools
+from testtools.matchers._basic import Contains
+
+from tempest.api.identity import base
 from tempest.common.utils.data_utils import rand_name
 from tempest import exceptions
 from tempest.test import attr
-from tempest.tests.identity import base
-import testtools
-from testtools.matchers._basic import Contains
 
 
 class UsersTestJSON(base.BaseIdentityAdminTest):
diff --git a/tempest/tests/identity/admin/v3/__init__.py b/tempest/api/identity/admin/v3/__init__.py
similarity index 100%
rename from tempest/tests/identity/admin/v3/__init__.py
rename to tempest/api/identity/admin/v3/__init__.py
diff --git a/tempest/tests/identity/admin/v3/test_endpoints.py b/tempest/api/identity/admin/v3/test_endpoints.py
similarity index 99%
rename from tempest/tests/identity/admin/v3/test_endpoints.py
rename to tempest/api/identity/admin/v3/test_endpoints.py
index 535fc92..f01cc64 100644
--- a/tempest/tests/identity/admin/v3/test_endpoints.py
+++ b/tempest/api/identity/admin/v3/test_endpoints.py
@@ -15,9 +15,9 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api.identity import base
 from tempest.common.utils.data_utils import rand_name
 from tempest.test import attr
-from tempest.tests.identity import base
 
 
 class EndPointsTestJSON(base.BaseIdentityAdminTest):
diff --git a/tempest/tests/identity/admin/v3/test_services.py b/tempest/api/identity/admin/v3/test_services.py
similarity index 97%
rename from tempest/tests/identity/admin/v3/test_services.py
rename to tempest/api/identity/admin/v3/test_services.py
index e85c6c0..b35b93a 100644
--- a/tempest/tests/identity/admin/v3/test_services.py
+++ b/tempest/api/identity/admin/v3/test_services.py
@@ -16,9 +16,9 @@
 #    under the License.
 
 
+from tempest.api.identity import base
 from tempest.common.utils.data_utils import rand_name
 from tempest.test import attr
-from tempest.tests.identity import base
 
 
 class ServicesTestJSON(base.BaseIdentityAdminTest):
diff --git a/tempest/tests/identity/admin/v3/test_users.py b/tempest/api/identity/admin/v3/test_users.py
similarity index 99%
rename from tempest/tests/identity/admin/v3/test_users.py
rename to tempest/api/identity/admin/v3/test_users.py
index d88cf2e..04e993d 100644
--- a/tempest/tests/identity/admin/v3/test_users.py
+++ b/tempest/api/identity/admin/v3/test_users.py
@@ -15,9 +15,9 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api.identity import base
 from tempest.common.utils.data_utils import rand_name
 from tempest.test import attr
-from tempest.tests.identity import base
 
 
 class UsersV3TestJSON(base.BaseIdentityAdminTest):
diff --git a/tempest/tests/identity/base.py b/tempest/api/identity/base.py
similarity index 100%
rename from tempest/tests/identity/base.py
rename to tempest/api/identity/base.py
diff --git a/tempest/tests/image/__init__.py b/tempest/api/image/__init__.py
similarity index 100%
rename from tempest/tests/image/__init__.py
rename to tempest/api/image/__init__.py
diff --git a/tempest/tests/image/base.py b/tempest/api/image/base.py
similarity index 100%
rename from tempest/tests/image/base.py
rename to tempest/api/image/base.py
diff --git a/tempest/tests/image/v1/__init__.py b/tempest/api/image/v1/__init__.py
similarity index 100%
rename from tempest/tests/image/v1/__init__.py
rename to tempest/api/image/v1/__init__.py
diff --git a/tempest/tests/image/v1/test_image_members.py b/tempest/api/image/v1/test_image_members.py
similarity index 98%
rename from tempest/tests/image/v1/test_image_members.py
rename to tempest/api/image/v1/test_image_members.py
index 7293d59..29bcaf4 100644
--- a/tempest/tests/image/v1/test_image_members.py
+++ b/tempest/api/image/v1/test_image_members.py
@@ -16,9 +16,9 @@
 
 import cStringIO as StringIO
 
+from tempest.api.image import base
 from tempest import clients
 from tempest.test import attr
-from tempest.tests.image import base
 
 
 class ImageMembersTests(base.BaseV1ImageTest):
diff --git a/tempest/tests/image/v1/test_images.py b/tempest/api/image/v1/test_images.py
similarity index 99%
rename from tempest/tests/image/v1/test_images.py
rename to tempest/api/image/v1/test_images.py
index 70e5762..c5d3f93 100644
--- a/tempest/tests/image/v1/test_images.py
+++ b/tempest/api/image/v1/test_images.py
@@ -17,9 +17,9 @@
 
 import cStringIO as StringIO
 
+from tempest.api.image import base
 from tempest import exceptions
 from tempest.test import attr
-from tempest.tests.image import base
 
 
 class CreateRegisterImagesTest(base.BaseV1ImageTest):
diff --git a/tempest/tests/image/v2/__init__.py b/tempest/api/image/v2/__init__.py
similarity index 100%
rename from tempest/tests/image/v2/__init__.py
rename to tempest/api/image/v2/__init__.py
diff --git a/tempest/tests/image/v2/test_images.py b/tempest/api/image/v2/test_images.py
similarity index 98%
rename from tempest/tests/image/v2/test_images.py
rename to tempest/api/image/v2/test_images.py
index 6356b4c..966adc3 100644
--- a/tempest/tests/image/v2/test_images.py
+++ b/tempest/api/image/v2/test_images.py
@@ -19,9 +19,9 @@
 import cStringIO as StringIO
 import random
 
+from tempest.api.image import base
 from tempest import exceptions
 from tempest.test import attr
-from tempest.tests.image import base
 
 
 class CreateRegisterImagesTest(base.BaseV2ImageTest):
diff --git a/tempest/tests/network/__init__.py b/tempest/api/network/__init__.py
similarity index 100%
rename from tempest/tests/network/__init__.py
rename to tempest/api/network/__init__.py
diff --git a/tempest/tests/network/base.py b/tempest/api/network/base.py
similarity index 100%
rename from tempest/tests/network/base.py
rename to tempest/api/network/base.py
diff --git a/tempest/tests/network/common.py b/tempest/api/network/common.py
similarity index 100%
rename from tempest/tests/network/common.py
rename to tempest/api/network/common.py
diff --git a/tempest/tests/network/test_networks.py b/tempest/api/network/test_networks.py
similarity index 98%
rename from tempest/tests/network/test_networks.py
rename to tempest/api/network/test_networks.py
index e61bc62..d4e0645 100644
--- a/tempest/tests/network/test_networks.py
+++ b/tempest/api/network/test_networks.py
@@ -17,10 +17,10 @@
 
 import netaddr
 
+from tempest.api.network import base
 from tempest.common.utils.data_utils import rand_name
 from tempest import exceptions
 from tempest.test import attr
-from tempest.tests.network import base
 
 
 class NetworksTest(base.BaseNetworkTest):
diff --git a/tempest/tests/object_storage/__init__.py b/tempest/api/object_storage/__init__.py
similarity index 100%
rename from tempest/tests/object_storage/__init__.py
rename to tempest/api/object_storage/__init__.py
diff --git a/tempest/tests/object_storage/base.py b/tempest/api/object_storage/base.py
similarity index 96%
rename from tempest/tests/object_storage/base.py
rename to tempest/api/object_storage/base.py
index 5bfe1a3..745de22 100644
--- a/tempest/tests/object_storage/base.py
+++ b/tempest/api/object_storage/base.py
@@ -16,10 +16,10 @@
 #    under the License.
 
 
+from tempest.api.identity.base import DataGenerator
 from tempest import clients
 from tempest import exceptions
 import tempest.test
-from tempest.tests.identity.base import DataGenerator
 
 
 class BaseObjectTest(tempest.test.BaseTestCase):
diff --git a/tempest/tests/object_storage/test_account_services.py b/tempest/api/object_storage/test_account_services.py
similarity index 98%
rename from tempest/tests/object_storage/test_account_services.py
rename to tempest/api/object_storage/test_account_services.py
index eb66de8..ddedfc6 100644
--- a/tempest/tests/object_storage/test_account_services.py
+++ b/tempest/api/object_storage/test_account_services.py
@@ -15,10 +15,10 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api.object_storage import base
 from tempest.common.utils.data_utils import rand_name
 from tempest import exceptions
 from tempest.test import attr
-from tempest.tests.object_storage import base
 
 
 class AccountTest(base.BaseObjectTest):
diff --git a/tempest/tests/object_storage/test_container_services.py b/tempest/api/object_storage/test_container_services.py
similarity index 98%
rename from tempest/tests/object_storage/test_container_services.py
rename to tempest/api/object_storage/test_container_services.py
index 508132a..0b4b57b 100644
--- a/tempest/tests/object_storage/test_container_services.py
+++ b/tempest/api/object_storage/test_container_services.py
@@ -15,10 +15,10 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api.object_storage import base
 from tempest.common.utils.data_utils import arbitrary_string
 from tempest.common.utils.data_utils import rand_name
 from tempest.test import attr
-from tempest.tests.object_storage import base
 
 
 class ContainerTest(base.BaseObjectTest):
diff --git a/tempest/tests/object_storage/test_container_sync.py b/tempest/api/object_storage/test_container_sync.py
similarity index 98%
rename from tempest/tests/object_storage/test_container_sync.py
rename to tempest/api/object_storage/test_container_sync.py
index 666d356..3243990 100644
--- a/tempest/tests/object_storage/test_container_sync.py
+++ b/tempest/api/object_storage/test_container_sync.py
@@ -15,11 +15,13 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+import time
+
+import testtools
+
+from tempest.api.object_storage import base
 from tempest.common.utils.data_utils import rand_name
 from tempest.test import attr
-from tempest.tests.object_storage import base
-import testtools
-import time
 
 
 class ContainerSyncTest(base.BaseObjectTest):
diff --git a/tempest/tests/object_storage/test_object_expiry.py b/tempest/api/object_storage/test_object_expiry.py
similarity index 98%
rename from tempest/tests/object_storage/test_object_expiry.py
rename to tempest/api/object_storage/test_object_expiry.py
index 76370b1..ab192e8 100644
--- a/tempest/tests/object_storage/test_object_expiry.py
+++ b/tempest/api/object_storage/test_object_expiry.py
@@ -15,13 +15,15 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+import time
+
+import testtools
+
+from tempest.api.object_storage import base
 from tempest.common.utils.data_utils import arbitrary_string
 from tempest.common.utils.data_utils import rand_name
 from tempest import exceptions
 from tempest.test import attr
-from tempest.tests.object_storage import base
-import testtools
-import time
 
 
 class ObjectExpiryTest(base.BaseObjectTest):
diff --git a/tempest/tests/object_storage/test_object_services.py b/tempest/api/object_storage/test_object_services.py
similarity index 99%
rename from tempest/tests/object_storage/test_object_services.py
rename to tempest/api/object_storage/test_object_services.py
index 2c196cf..4d7ee74 100644
--- a/tempest/tests/object_storage/test_object_services.py
+++ b/tempest/api/object_storage/test_object_services.py
@@ -15,13 +15,15 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+import time
+
+import testtools
+
+from tempest.api.object_storage import base
 from tempest.common.utils.data_utils import arbitrary_string
 from tempest.common.utils.data_utils import rand_name
 from tempest import exceptions
 from tempest.test import attr
-from tempest.tests.object_storage import base
-import testtools
-import time
 
 
 class ObjectTest(base.BaseObjectTest):
diff --git a/tempest/tests/object_storage/test_object_version.py b/tempest/api/object_storage/test_object_version.py
similarity index 98%
rename from tempest/tests/object_storage/test_object_version.py
rename to tempest/api/object_storage/test_object_version.py
index 4a16965..d449c0a 100644
--- a/tempest/tests/object_storage/test_object_version.py
+++ b/tempest/api/object_storage/test_object_version.py
@@ -15,9 +15,9 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api.object_storage import base
 from tempest.common.utils.data_utils import rand_name
 from tempest.test import attr
-from tempest.tests.object_storage import base
 
 
 class ContainerTest(base.BaseObjectTest):
diff --git a/tempest/tests/utils.py b/tempest/api/utils.py
similarity index 100%
rename from tempest/tests/utils.py
rename to tempest/api/utils.py
diff --git a/tempest/tests/volume/__init__.py b/tempest/api/volume/__init__.py
similarity index 100%
rename from tempest/tests/volume/__init__.py
rename to tempest/api/volume/__init__.py
diff --git a/tempest/tests/volume/admin/__init__.py b/tempest/api/volume/admin/__init__.py
similarity index 100%
rename from tempest/tests/volume/admin/__init__.py
rename to tempest/api/volume/admin/__init__.py
diff --git a/tempest/tests/volume/admin/test_multi_backend.py b/tempest/api/volume/admin/test_multi_backend.py
similarity index 99%
rename from tempest/tests/volume/admin/test_multi_backend.py
rename to tempest/api/volume/admin/test_multi_backend.py
index 93b3b77..bbc1d97 100644
--- a/tempest/tests/volume/admin/test_multi_backend.py
+++ b/tempest/api/volume/admin/test_multi_backend.py
@@ -18,12 +18,12 @@
 import logging
 import testtools
 
+from tempest.api.volume import base
 from tempest.common.utils.data_utils import rand_name
 from tempest import config
 from tempest.services.volume.json.admin import volume_types_client
 from tempest.services.volume.json import volumes_client
 from tempest.test import attr
-from tempest.tests.volume import base
 
 LOG = logging.getLogger(__name__)
 
diff --git a/tempest/tests/volume/admin/test_volume_types.py b/tempest/api/volume/admin/test_volume_types.py
similarity index 98%
rename from tempest/tests/volume/admin/test_volume_types.py
rename to tempest/api/volume/admin/test_volume_types.py
index a35f017..74a62cb 100644
--- a/tempest/tests/volume/admin/test_volume_types.py
+++ b/tempest/api/volume/admin/test_volume_types.py
@@ -15,10 +15,10 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api.volume.base import BaseVolumeTest
 from tempest.common.utils.data_utils import rand_name
 from tempest.services.volume.json.admin import volume_types_client
 from tempest.test import attr
-from tempest.tests.volume.base import BaseVolumeTest
 
 
 class VolumeTypesTest(BaseVolumeTest):
diff --git a/tempest/tests/volume/admin/test_volume_types_extra_specs.py b/tempest/api/volume/admin/test_volume_types_extra_specs.py
similarity index 98%
rename from tempest/tests/volume/admin/test_volume_types_extra_specs.py
rename to tempest/api/volume/admin/test_volume_types_extra_specs.py
index aeb58c7..20c5cc4 100644
--- a/tempest/tests/volume/admin/test_volume_types_extra_specs.py
+++ b/tempest/api/volume/admin/test_volume_types_extra_specs.py
@@ -15,9 +15,9 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api.volume import base
 from tempest.common.utils.data_utils import rand_name
 from tempest.test import attr
-from tempest.tests.volume import base
 
 
 class VolumeTypesExtraSpecsTest(base.BaseVolumeAdminTest):
diff --git a/tempest/tests/volume/admin/test_volume_types_extra_specs_negative.py b/tempest/api/volume/admin/test_volume_types_extra_specs_negative.py
similarity index 99%
rename from tempest/tests/volume/admin/test_volume_types_extra_specs_negative.py
rename to tempest/api/volume/admin/test_volume_types_extra_specs_negative.py
index 4a1a0b2..0507a99 100644
--- a/tempest/tests/volume/admin/test_volume_types_extra_specs_negative.py
+++ b/tempest/api/volume/admin/test_volume_types_extra_specs_negative.py
@@ -17,10 +17,10 @@
 
 import uuid
 
+from tempest.api.volume import base
 from tempest.common.utils.data_utils import rand_name
 from tempest import exceptions
 from tempest.test import attr
-from tempest.tests.volume import base
 
 
 class ExtraSpecsNegativeTest(base.BaseVolumeAdminTest):
diff --git a/tempest/tests/volume/admin/test_volume_types_negative.py b/tempest/api/volume/admin/test_volume_types_negative.py
similarity index 97%
rename from tempest/tests/volume/admin/test_volume_types_negative.py
rename to tempest/api/volume/admin/test_volume_types_negative.py
index bd358b8..f94f0ea 100644
--- a/tempest/tests/volume/admin/test_volume_types_negative.py
+++ b/tempest/api/volume/admin/test_volume_types_negative.py
@@ -17,9 +17,9 @@
 
 import uuid
 
+from tempest.api.volume import base
 from tempest import exceptions
 from tempest.test import attr
-from tempest.tests.volume import base
 
 
 class VolumeTypesNegativeTest(base.BaseVolumeAdminTest):
diff --git a/tempest/tests/volume/base.py b/tempest/api/volume/base.py
similarity index 100%
rename from tempest/tests/volume/base.py
rename to tempest/api/volume/base.py
diff --git a/tempest/tests/volume/test_volumes_actions.py b/tempest/api/volume/test_volumes_actions.py
similarity index 98%
rename from tempest/tests/volume/test_volumes_actions.py
rename to tempest/api/volume/test_volumes_actions.py
index 8664a7d..41fd930 100644
--- a/tempest/tests/volume/test_volumes_actions.py
+++ b/tempest/api/volume/test_volumes_actions.py
@@ -15,9 +15,9 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api.volume.base import BaseVolumeTest
 from tempest.common.utils.data_utils import rand_name
 from tempest.test import attr
-from tempest.tests.volume.base import BaseVolumeTest
 
 
 class VolumesActionsTest(BaseVolumeTest):
diff --git a/tempest/tests/volume/test_volumes_get.py b/tempest/api/volume/test_volumes_get.py
similarity index 98%
rename from tempest/tests/volume/test_volumes_get.py
rename to tempest/api/volume/test_volumes_get.py
index 65748e8..0148183 100644
--- a/tempest/tests/volume/test_volumes_get.py
+++ b/tempest/api/volume/test_volumes_get.py
@@ -15,9 +15,9 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api.volume import base
 from tempest.common.utils.data_utils import rand_name
 from tempest.test import attr
-from tempest.tests.volume import base
 
 
 class VolumesGetTest(base.BaseVolumeTest):
diff --git a/tempest/tests/volume/test_volumes_list.py b/tempest/api/volume/test_volumes_list.py
similarity index 98%
rename from tempest/tests/volume/test_volumes_list.py
rename to tempest/api/volume/test_volumes_list.py
index 7f5c756..3202662 100644
--- a/tempest/tests/volume/test_volumes_list.py
+++ b/tempest/api/volume/test_volumes_list.py
@@ -15,9 +15,9 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api.volume import base
 from tempest.common.utils.data_utils import rand_name
 from tempest.test import attr
-from tempest.tests.volume import base
 
 
 class VolumesListTest(base.BaseVolumeTest):
diff --git a/tempest/tests/volume/test_volumes_negative.py b/tempest/api/volume/test_volumes_negative.py
similarity index 98%
rename from tempest/tests/volume/test_volumes_negative.py
rename to tempest/api/volume/test_volumes_negative.py
index f02bb3f..eea37e0 100644
--- a/tempest/tests/volume/test_volumes_negative.py
+++ b/tempest/api/volume/test_volumes_negative.py
@@ -15,10 +15,10 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api.volume import base
 from tempest.common.utils.data_utils import rand_name
 from tempest import exceptions
 from tempest.test import attr
-from tempest.tests.volume import base
 
 
 class VolumesNegativeTest(base.BaseVolumeTest):
diff --git a/tempest/tests/volume/test_volumes_snapshots.py b/tempest/api/volume/test_volumes_snapshots.py
similarity index 98%
rename from tempest/tests/volume/test_volumes_snapshots.py
rename to tempest/api/volume/test_volumes_snapshots.py
index 935d42e..c05a6d1 100644
--- a/tempest/tests/volume/test_volumes_snapshots.py
+++ b/tempest/api/volume/test_volumes_snapshots.py
@@ -14,8 +14,8 @@
 
 import logging
 
+from tempest.api.volume import base
 from tempest.test import attr
-from tempest.tests.volume import base
 
 LOG = logging.getLogger(__name__)
 
diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py
index 4f94195..a358f20 100644
--- a/tempest/scenario/manager.py
+++ b/tempest/scenario/manager.py
@@ -32,11 +32,11 @@
 except ImportError:
     pass
 
+from tempest.api.network import common as net_common
 from tempest.common.utils.data_utils import rand_name
 from tempest import exceptions
 import tempest.manager
 import tempest.test
-from tempest.tests.network import common as net_common
 
 
 LOG = logging.getLogger(__name__)
diff --git a/tempest/scenario/test_network_basic_ops.py b/tempest/scenario/test_network_basic_ops.py
index ee2dc0d..5ccfd52 100644
--- a/tempest/scenario/test_network_basic_ops.py
+++ b/tempest/scenario/test_network_basic_ops.py
@@ -16,10 +16,10 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api.network import common as net_common
 from tempest.common.utils.data_utils import rand_name
 from tempest.scenario import manager
 from tempest.test import attr
-from tempest.tests.network import common as net_common
 
 
 class TestNetworkBasicOps(manager.NetworkScenarioTest):
diff --git a/tempest/whitebox/test_images_whitebox.py b/tempest/whitebox/test_images_whitebox.py
index 304677f..8a23e8f 100644
--- a/tempest/whitebox/test_images_whitebox.py
+++ b/tempest/whitebox/test_images_whitebox.py
@@ -15,10 +15,10 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api.compute import base
 from tempest.common.utils.data_utils import rand_name
 from tempest import exceptions
 from tempest.test import attr
-from tempest.tests.compute import base
 from tempest.whitebox import manager
 
 
diff --git a/tempest/whitebox/test_servers_whitebox.py b/tempest/whitebox/test_servers_whitebox.py
index 2eab393..5db0dc6 100644
--- a/tempest/whitebox/test_servers_whitebox.py
+++ b/tempest/whitebox/test_servers_whitebox.py
@@ -15,9 +15,9 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api.identity.base import BaseIdentityAdminTest
 from tempest import exceptions
 from tempest.test import attr
-from tempest.tests.identity.base import BaseIdentityAdminTest
 from tempest.whitebox import manager
 
 
diff --git a/tox.ini b/tox.ini
index 2449c86..066a2b5 100644
--- a/tox.ini
+++ b/tox.ini
@@ -20,7 +20,7 @@
          NOSE_OPENSTACK_SHOW_ELAPSED=1
          NOSE_OPENSTACK_STDOUT=1
 commands =
-  nosetests --logging-format '%(asctime)-15s %(message)s' --with-xunit --xunit-file=nosetests-full.xml -sv tempest/tests tempest/scenario tempest/thirdparty tempest/cli
+  nosetests --logging-format '%(asctime)-15s %(message)s' --with-xunit --xunit-file=nosetests-full.xml -sv tempest/api tempest/scenario tempest/thirdparty tempest/cli
 
 [testenv:smoke]
 sitepackages = True
@@ -46,7 +46,7 @@
          NOSE_OPENSTACK_STDOUT=1
 commands =
    python -m tools/tempest_coverage -c start --combine
-   nosetests --logging-format '%(asctime)-15s %(message)s' --with-xunit --xunit-file=nosetests-full.xml -sv tempest/tests tempest/scenario tempest/thirdparty tempest/cli
+   nosetests --logging-format '%(asctime)-15s %(message)s' --with-xunit --xunit-file=nosetests-full.xml -sv tempest/api tempest/scenario tempest/thirdparty tempest/cli
    python -m tools/tempest_coverage -c report --html
 
 [testenv:pep8]