diff --git a/tempest/api/README.rst b/tempest/api/README.rst new file mode 100644 index 0000000000..cf0aac7afb --- /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 98% rename from tempest/tests/compute/__init__.py rename to tempest/api/compute/__init__.py index 968f17eebf..6cd6f693cf 100644 --- a/tempest/tests/compute/__init__.py +++ b/tempest/api/compute/__init__.py @@ -36,7 +36,7 @@ MULTI_USER = True # 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 07df77f539..1eff4dda94 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 98ad49c6c6..db540110bf 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 99% rename from tempest/tests/compute/admin/test_fixed_ips.py rename to tempest/api/compute/admin/test_fixed_ips.py index d8b1359b93..4194b7eaee 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 7957009c25..95457b98dc 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 4cc3f5796e..85648a967c 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 31a251174f..357a7871a6 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 7160aedecf..ba21dc548a 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 057716487a..aacfe8a9d7 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 fbefe352b4..5f0df3c829 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 95244dfa2c..2fd03ff444 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 5fe911f795..8263dc2d7b 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 b795909b24..017659e75d 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 5d6439b0e4..6b167a80b9 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 1dae8a5bf5..0647d0607e 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 99% rename from tempest/tests/compute/images/test_images_oneserver.py rename to tempest/api/compute/images/test_images_oneserver.py index dfc16f42fd..e5e02a7605 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 b1a6f777a6..4ba8e99d68 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 07c48fe372..fddad1471b 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 87c71aaa4c..15a23e51fb 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 6933fd7f8f..b2c496b2e0 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 c2032d44c7..ad311d9a68 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 d0afde4d3f..75afe0d1df 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 99% rename from tempest/tests/compute/servers/test_attach_interfaces.py rename to tempest/api/compute/servers/test_attach_interfaces.py index c7d4fa057b..8977cad5fa 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 b522992a32..f06a0cc63f 100644 --- a/tempest/tests/compute/servers/test_create_server.py +++ b/tempest/api/compute/servers/test_create_server.py @@ -20,13 +20,12 @@ import base64 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 fe1c271b7f..64fb7d3cf2 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 e7e31e831c..81fd26c68c 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 ca5e11297a..7c4f5f5f4a 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 99% rename from tempest/tests/compute/servers/test_list_servers_negative.py rename to tempest/api/compute/servers/test_list_servers_negative.py index 0559206ddc..2c15c99b60 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 99% rename from tempest/tests/compute/servers/test_multiple_create.py rename to tempest/api/compute/servers/test_multiple_create.py index 47a38b1956..476a7676ec 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 5634784d69..e8f41ec682 100644 --- a/tempest/tests/compute/servers/test_server_actions.py +++ b/tempest/api/compute/servers/test_server_actions.py @@ -20,13 +20,13 @@ import time 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 05fa32034d..01e4341eca 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 69c0ad9e6f..664a0c0275 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 0546859023..b0ee9e70c2 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 862a86a662..a7410ecf77 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 99% rename from tempest/tests/compute/servers/test_servers.py rename to tempest/api/compute/servers/test_servers.py index 4796e86f8a..f86ac0716c 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 9013b36d5f..b3691796a2 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 476a556e9c..bdec1cbd15 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 6edc94669f..b0d6a0b30a 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 2c13fb9875..5bc4a30ad5 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 e22d45a828..622800a398 100644 --- a/tempest/tests/compute/test_live_block_migration.py +++ b/tempest/api/compute/test_live_block_migration.py @@ -20,10 +20,10 @@ import string 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 92e5a7045b..1a8a40bb39 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 99% rename from tempest/tests/compute/volumes/test_attach_volume.py rename to tempest/api/compute/volumes/test_attach_volume.py index cb0a964e4c..a086c17d08 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 99% rename from tempest/tests/compute/volumes/test_volumes_get.py rename to tempest/api/compute/volumes/test_volumes_get.py index 65d2d4512f..4646ae27b8 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 99% rename from tempest/tests/compute/volumes/test_volumes_list.py rename to tempest/api/compute/volumes/test_volumes_list.py index ffd6a8c348..b1ef2fd65e 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 99% rename from tempest/tests/compute/volumes/test_volumes_negative.py rename to tempest/api/compute/volumes/test_volumes_negative.py index 306b93bad4..a4ecd0d096 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 8b03834132..e5fdc1b660 100644 --- a/tempest/tests/identity/__init__.py +++ b/tempest/api/identity/__init__.py @@ -22,4 +22,4 @@ LOG = logging.getLogger(__name__) # 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 b3d7921c40..08b86caf52 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 99% rename from tempest/tests/identity/admin/test_services.py rename to tempest/api/identity/admin/test_services.py index 6d8700fd25..644853ac6a 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 c51a14a9d9..815cfbeace 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 e638a086e5..abc311bd36 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 535fc92b3b..f01cc64d76 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 98% rename from tempest/tests/identity/admin/v3/test_services.py rename to tempest/api/identity/admin/v3/test_services.py index e85c6c040f..b35b93a732 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 d88cf2eda1..04e993d2a5 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 7293d59bc5..29bcaf44b4 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 70e576266d..c5d3f935c3 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 99% rename from tempest/tests/image/v2/test_images.py rename to tempest/api/image/v2/test_images.py index 6356b4cc03..966adc3192 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 99% rename from tempest/tests/network/test_networks.py rename to tempest/api/network/test_networks.py index e61bc62c72..d4e0645bdd 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 97% rename from tempest/tests/object_storage/base.py rename to tempest/api/object_storage/base.py index 5bfe1a3c13..745de22e47 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 eb66de8a7a..ddedfc6dea 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 99% rename from tempest/tests/object_storage/test_container_services.py rename to tempest/api/object_storage/test_container_services.py index 508132ac1e..0b4b57b15f 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 99% rename from tempest/tests/object_storage/test_container_sync.py rename to tempest/api/object_storage/test_container_sync.py index 666d356ba1..32439901f5 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 76370b1c5d..ab192e8a2b 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 2c196cfc32..4d7ee74efc 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 99% rename from tempest/tests/object_storage/test_object_version.py rename to tempest/api/object_storage/test_object_version.py index 4a1696542e..d449c0af71 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 93b3b77d78..bbc1d971e0 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 99% rename from tempest/tests/volume/admin/test_volume_types.py rename to tempest/api/volume/admin/test_volume_types.py index a35f0176b8..74a62cbdb1 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 99% 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 aeb58c7b6a..20c5cc4be1 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 4a1a0b2d1d..0507a998f2 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 98% rename from tempest/tests/volume/admin/test_volume_types_negative.py rename to tempest/api/volume/admin/test_volume_types_negative.py index bd358b8d8f..f94f0eaa02 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 8664a7dfd9..41fd930b38 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 99% rename from tempest/tests/volume/test_volumes_get.py rename to tempest/api/volume/test_volumes_get.py index 65748e8c62..0148183334 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 99% rename from tempest/tests/volume/test_volumes_list.py rename to tempest/api/volume/test_volumes_list.py index 7f5c75659a..32026625f9 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 99% rename from tempest/tests/volume/test_volumes_negative.py rename to tempest/api/volume/test_volumes_negative.py index f02bb3f408..eea37e0496 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 935d42e262..c05a6d164f 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 4f94195754..a358f200bb 100644 --- a/tempest/scenario/manager.py +++ b/tempest/scenario/manager.py @@ -32,11 +32,11 @@ try: 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 ee2dc0dd39..5ccfd52cc8 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 304677f09c..8a23e8f998 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 2eab393cef..5db0dc6971 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 2449c8687e..066a2b5d57 100644 --- a/tox.ini +++ b/tox.ini @@ -20,7 +20,7 @@ setenv = VIRTUAL_ENV={envdir} 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 @@ setenv = VIRTUAL_ENV={envdir} 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]