From db9672e3473cd6046f269d63435e102a477d8cdd Mon Sep 17 00:00:00 2001 From: "Andrea Frittoli (andreaf)" Date: Tue, 23 Feb 2016 14:07:24 -0500 Subject: [PATCH] Use tempest.lib code in tempest Now that tempest_lib code is copied back into tempest, stop using tempest_lib in tempest, and start using the copied code. Remove the dependency to tempest_lib from requirements, and drop the script to use tempest_lib in tempest. Add os-testr to the test-requirements. Partially implements bp tempest-lib-reintegration Change-Id: I21ab5fe6349f72c98ac9f960a29bf62e813f8b1b --- requirements.txt | 2 +- setup.cfg | 2 + tempest/api/baremetal/admin/base.py | 3 +- tempest/api/baremetal/admin/test_chassis.py | 2 +- tempest/api/baremetal/admin/test_nodes.py | 2 +- tempest/api/baremetal/admin/test_ports.py | 2 +- .../baremetal/admin/test_ports_negative.py | 3 +- tempest/api/compute/admin/test_agents.py | 2 +- tempest/api/compute/admin/test_aggregates.py | 3 +- .../compute/admin/test_aggregates_negative.py | 3 +- .../admin/test_availability_zone_negative.py | 3 +- .../compute/admin/test_fixed_ips_negative.py | 3 +- tempest/api/compute/admin/test_flavors.py | 3 +- .../admin/test_flavors_access_negative.py | 3 +- .../test_flavors_extra_specs_negative.py | 3 +- .../api/compute/admin/test_hosts_negative.py | 3 +- .../compute/admin/test_hypervisor_negative.py | 3 +- .../test_instance_usage_audit_log_negative.py | 2 +- .../api/compute/admin/test_quotas_negative.py | 5 +- .../test_security_group_default_rules.py | 2 +- tempest/api/compute/admin/test_servers.py | 3 +- .../compute/admin/test_servers_negative.py | 2 +- .../compute/admin/test_services_negative.py | 3 +- .../compute/admin/test_simple_tenant_usage.py | 2 +- .../test_simple_tenant_usage_negative.py | 2 +- tempest/api/compute/base.py | 2 +- .../floating_ips/test_floating_ips_actions.py | 3 +- .../test_floating_ips_actions_negative.py | 3 +- .../test_list_floating_ips_negative.py | 3 +- .../images/test_image_metadata_negative.py | 3 +- .../compute/images/test_images_negative.py | 3 +- .../images/test_images_oneserver_negative.py | 2 +- .../test_list_image_filters_negative.py | 3 +- .../keypairs/test_keypairs_negative.py | 3 +- .../limits/test_absolute_limits_negative.py | 3 +- .../test_security_group_rules_negative.py | 3 +- .../security_groups/test_security_groups.py | 3 +- .../test_security_groups_negative.py | 4 +- .../compute/servers/test_attach_interfaces.py | 3 +- .../servers/test_instance_actions_negative.py | 3 +- .../servers/test_list_server_filters.py | 5 +- .../servers/test_list_servers_negative.py | 2 +- .../servers/test_multiple_create_negative.py | 3 +- .../compute/servers/test_server_actions.py | 4 +- .../servers/test_server_addresses_negative.py | 3 +- .../servers/test_server_metadata_negative.py | 3 +- .../servers/test_server_personality.py | 4 +- .../servers/test_server_rescue_negative.py | 2 +- .../compute/servers/test_servers_negative.py | 2 +- .../servers/test_virtual_interfaces.py | 2 +- .../test_virtual_interfaces_negative.py | 3 +- tempest/api/compute/test_authorization.py | 2 +- .../test_live_block_migration_negative.py | 3 +- .../compute/volumes/test_volumes_negative.py | 3 +- tempest/api/data_processing/base.py | 2 +- .../database/flavors/test_flavors_negative.py | 3 +- .../identity/admin/v2/test_roles_negative.py | 3 +- .../api/identity/admin/v2/test_services.py | 2 +- .../identity/admin/v2/test_tenant_negative.py | 3 +- .../identity/admin/v2/test_users_negative.py | 3 +- .../admin/v3/test_default_project_id.py | 3 +- .../admin/v3/test_domains_negative.py | 5 +- .../admin/v3/test_endpoints_negative.py | 3 +- .../admin/v3/test_projects_negative.py | 3 +- tempest/api/identity/admin/v3/test_regions.py | 3 +- .../api/identity/admin/v3/test_services.py | 3 +- tempest/api/identity/admin/v3/test_tokens.py | 3 +- tempest/api/identity/admin/v3/test_trusts.py | 2 +- .../identity/admin/v3/test_users_negative.py | 3 +- tempest/api/identity/base.py | 2 +- .../api/identity/v2/test_ec2_credentials.py | 3 +- tempest/api/identity/v2/test_tenants.py | 3 +- tempest/api/identity/v2/test_users.py | 5 +- tempest/api/identity/v3/test_projects.py | 3 +- tempest/api/identity/v3/test_users.py | 5 +- tempest/api/image/admin/v2/test_images.py | 4 +- tempest/api/image/base.py | 2 +- .../image/v1/test_image_members_negative.py | 3 +- tempest/api/image/v1/test_images_negative.py | 2 +- .../image/v2/test_images_member_negative.py | 3 +- .../v2/test_images_metadefs_namespaces.py | 2 +- tempest/api/image/v2/test_images_negative.py | 3 +- .../api/image/v2/test_images_tags_negative.py | 3 +- .../admin/test_external_networks_negative.py | 3 +- .../api/network/admin/test_negative_quotas.py | 2 +- tempest/api/network/admin/test_quotas.py | 2 +- tempest/api/network/base.py | 2 +- tempest/api/network/test_dhcp_ipv6.py | 2 +- .../api/network/test_floating_ips_negative.py | 3 +- tempest/api/network/test_networks.py | 2 +- tempest/api/network/test_networks_negative.py | 3 +- tempest/api/network/test_routers_negative.py | 2 +- .../network/test_security_groups_negative.py | 3 +- .../network/test_service_type_management.py | 3 +- .../network/test_subnetpools_extensions.py | 2 +- tempest/api/object_storage/base.py | 3 +- .../test_account_quotas_negative.py | 5 +- .../test_account_services_negative.py | 3 +- .../test_container_acl_negative.py | 3 +- .../object_storage/test_container_quotas.py | 3 +- .../object_storage/test_container_services.py | 3 +- .../test_container_staticweb.py | 3 +- .../api/object_storage/test_container_sync.py | 2 +- .../api/object_storage/test_object_expiry.py | 2 +- .../test_object_formpost_negative.py | 2 +- tempest/api/object_storage/test_object_slo.py | 2 +- .../test_object_temp_url_negative.py | 2 +- tempest/api/orchestration/base.py | 2 +- .../api/orchestration/stacks/test_limits.py | 3 +- .../orchestration/stacks/test_soft_conf.py | 3 +- .../stacks/test_templates_negative.py | 3 +- .../api/orchestration/stacks/test_volumes.py | 3 +- tempest/api/telemetry/base.py | 2 +- tempest/api/telemetry/test_alarming_api.py | 3 +- .../telemetry/test_alarming_api_negative.py | 2 +- .../test_telemetry_notification_api.py | 2 +- .../admin/test_volume_quotas_negative.py | 3 +- .../api/volume/admin/test_volume_services.py | 2 +- .../test_volume_snapshot_quotas_negative.py | 3 +- .../test_volume_types_extra_specs_negative.py | 3 +- .../admin/test_volume_types_negative.py | 3 +- .../api/volume/admin/test_volumes_backup.py | 3 +- tempest/api/volume/base.py | 3 +- tempest/api/volume/test_volumes_negative.py | 3 +- .../volume/test_volumes_snapshots_negative.py | 3 +- tempest/clients.py | 142 +++++++++--------- tempest/cmd/account_generator.py | 26 ++-- tempest/cmd/javelin.py | 16 +- tempest/common/compute.py | 2 +- tempest/common/cred_client.py | 4 +- tempest/common/cred_provider.py | 2 +- tempest/common/credentials_factory.py | 2 +- tempest/common/dynamic_creds.py | 2 +- tempest/common/fixed_network.py | 3 +- tempest/common/identity.py | 2 +- tempest/common/preprov_creds.py | 4 +- tempest/common/service_client.py | 2 +- tempest/common/utils/__init__.py | 3 +- tempest/common/utils/linux/remote_client.py | 6 +- tempest/common/validation_resources.py | 2 +- tempest/common/waiters.py | 4 +- tempest/manager.py | 3 +- tempest/scenario/manager.py | 4 +- tempest/scenario/test_large_ops.py | 3 +- tempest/scenario/test_stamp_pattern.py | 4 +- tempest/scenario/utils.py | 4 +- .../compute/json/base_compute_client.py | 2 +- .../services/image/v1/json/images_client.py | 4 +- .../services/image/v2/json/images_client.py | 2 +- .../services/network/json/network_client.py | 5 +- .../json/orchestration_client.py | 2 +- .../volume/base/admin/base_types_client.py | 2 +- .../volume/base/base_backups_client.py | 2 +- .../services/volume/base/base_qos_client.py | 2 +- .../volume/base/base_snapshots_client.py | 2 +- .../volume/base/base_volumes_client.py | 2 +- tempest/stress/driver.py | 2 +- tempest/test.py | 2 +- tempest/test_discover/plugins.py | 2 +- tempest/tests/cmd/test_javelin.py | 2 +- tempest/tests/common/test_configured_creds.py | 8 +- tempest/tests/common/test_dynamic_creds.py | 32 ++-- tempest/tests/common/test_preprov_creds.py | 8 +- tempest/tests/common/test_service_clients.py | 2 +- .../compute/test_base_compute_client.py | 2 +- .../services/compute/test_keypairs_client.py | 11 +- tempest/tests/stress/test_stress.py | 3 +- tools/use_tempest_lib.sh | 141 ----------------- 168 files changed, 302 insertions(+), 527 deletions(-) delete mode 100755 tools/use_tempest_lib.sh diff --git a/requirements.txt b/requirements.txt index 66e569671e..46ebbc54c8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -21,7 +21,7 @@ six>=1.9.0 # MIT iso8601>=0.1.9 # MIT fixtures>=1.3.1 # Apache-2.0/BSD testscenarios>=0.4 # Apache-2.0/BSD -tempest-lib>=0.14.0 # Apache-2.0 PyYAML>=3.1.0 # MIT stevedore>=1.5.0 # Apache-2.0 PrettyTable<0.8,>=0.7 # BSD +os-testr>=0.4.1 # Apache-2.0 diff --git a/setup.cfg b/setup.cfg index cc3a3656f0..0ddb8989bc 100644 --- a/setup.cfg +++ b/setup.cfg @@ -32,6 +32,8 @@ console_scripts = tempest-cleanup = tempest.cmd.cleanup:main tempest-account-generator = tempest.cmd.account_generator:main tempest = tempest.cmd.main:main + skip-tracker = tempest.lib.cmd.skip_tracker:main + check-uuid = tempest.lib.cmd.check_uuid:run tempest.cm = account-generator = tempest.cmd.account_generator:TempestAccountGenerator init = tempest.cmd.init:TempestInit diff --git a/tempest/api/baremetal/admin/base.py b/tempest/api/baremetal/admin/base.py index 80b69b91b9..f7891dda89 100644 --- a/tempest/api/baremetal/admin/base.py +++ b/tempest/api/baremetal/admin/base.py @@ -12,10 +12,9 @@ import functools -from tempest_lib import exceptions as lib_exc - from tempest.common.utils import data_utils from tempest import config +from tempest.lib import exceptions as lib_exc from tempest import test CONF = config.CONF diff --git a/tempest/api/baremetal/admin/test_chassis.py b/tempest/api/baremetal/admin/test_chassis.py index 29fc64c93f..339aaea632 100644 --- a/tempest/api/baremetal/admin/test_chassis.py +++ b/tempest/api/baremetal/admin/test_chassis.py @@ -12,10 +12,10 @@ # under the License. import six -from tempest_lib import exceptions as lib_exc from tempest.api.baremetal.admin import base from tempest.common.utils import data_utils +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/baremetal/admin/test_nodes.py b/tempest/api/baremetal/admin/test_nodes.py index b6dee18162..8cc4d055a3 100644 --- a/tempest/api/baremetal/admin/test_nodes.py +++ b/tempest/api/baremetal/admin/test_nodes.py @@ -11,11 +11,11 @@ # under the License. import six -from tempest_lib import exceptions as lib_exc from tempest.api.baremetal.admin import base from tempest.common.utils import data_utils from tempest.common import waiters +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/baremetal/admin/test_ports.py b/tempest/api/baremetal/admin/test_ports.py index 180b848242..ce519c1ed8 100644 --- a/tempest/api/baremetal/admin/test_ports.py +++ b/tempest/api/baremetal/admin/test_ports.py @@ -11,10 +11,10 @@ # under the License. import six -from tempest_lib import exceptions as lib_exc from tempest.api.baremetal.admin import base from tempest.common.utils import data_utils +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/baremetal/admin/test_ports_negative.py b/tempest/api/baremetal/admin/test_ports_negative.py index 610758ae26..8f04db997c 100644 --- a/tempest/api/baremetal/admin/test_ports_negative.py +++ b/tempest/api/baremetal/admin/test_ports_negative.py @@ -10,10 +10,9 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.baremetal.admin import base from tempest.common.utils import data_utils +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/compute/admin/test_agents.py b/tempest/api/compute/admin/test_agents.py index 9f7bbaeec0..671b1391a9 100644 --- a/tempest/api/compute/admin/test_agents.py +++ b/tempest/api/compute/admin/test_agents.py @@ -13,10 +13,10 @@ # under the License. from oslo_log import log -from tempest_lib import exceptions as lib_exc from tempest.api.compute import base from tempest.common.utils import data_utils +from tempest.lib import exceptions as lib_exc from tempest import test LOG = log.getLogger(__name__) diff --git a/tempest/api/compute/admin/test_aggregates.py b/tempest/api/compute/admin/test_aggregates.py index 1d83feca09..a2b1e2fcc0 100644 --- a/tempest/api/compute/admin/test_aggregates.py +++ b/tempest/api/compute/admin/test_aggregates.py @@ -13,11 +13,10 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.compute import base from tempest.common import tempest_fixtures as fixtures from tempest.common.utils import data_utils +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/compute/admin/test_aggregates_negative.py b/tempest/api/compute/admin/test_aggregates_negative.py index 181533b522..6b75aeeb41 100644 --- a/tempest/api/compute/admin/test_aggregates_negative.py +++ b/tempest/api/compute/admin/test_aggregates_negative.py @@ -13,11 +13,10 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.compute import base from tempest.common import tempest_fixtures as fixtures from tempest.common.utils import data_utils +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/compute/admin/test_availability_zone_negative.py b/tempest/api/compute/admin/test_availability_zone_negative.py index fe979d4e16..c60de1e5d1 100644 --- a/tempest/api/compute/admin/test_availability_zone_negative.py +++ b/tempest/api/compute/admin/test_availability_zone_negative.py @@ -12,9 +12,8 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.compute import base +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/compute/admin/test_fixed_ips_negative.py b/tempest/api/compute/admin/test_fixed_ips_negative.py index 8d745c9cad..05bba21053 100644 --- a/tempest/api/compute/admin/test_fixed_ips_negative.py +++ b/tempest/api/compute/admin/test_fixed_ips_negative.py @@ -12,10 +12,9 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.compute import base from tempest import config +from tempest.lib import exceptions as lib_exc from tempest import test CONF = config.CONF diff --git a/tempest/api/compute/admin/test_flavors.py b/tempest/api/compute/admin/test_flavors.py index 1ef8f67d16..96dedcf978 100644 --- a/tempest/api/compute/admin/test_flavors.py +++ b/tempest/api/compute/admin/test_flavors.py @@ -15,10 +15,9 @@ import uuid -from tempest_lib import exceptions as lib_exc - from tempest.api.compute import base from tempest.common.utils import data_utils +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/compute/admin/test_flavors_access_negative.py b/tempest/api/compute/admin/test_flavors_access_negative.py index 5070fd72f7..3854973b55 100644 --- a/tempest/api/compute/admin/test_flavors_access_negative.py +++ b/tempest/api/compute/admin/test_flavors_access_negative.py @@ -15,10 +15,9 @@ import uuid -from tempest_lib import exceptions as lib_exc - from tempest.api.compute import base from tempest.common.utils import data_utils +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/compute/admin/test_flavors_extra_specs_negative.py b/tempest/api/compute/admin/test_flavors_extra_specs_negative.py index 14646e84d8..b0ab9be3ac 100644 --- a/tempest/api/compute/admin/test_flavors_extra_specs_negative.py +++ b/tempest/api/compute/admin/test_flavors_extra_specs_negative.py @@ -14,10 +14,9 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.compute import base from tempest.common.utils import data_utils +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/compute/admin/test_hosts_negative.py b/tempest/api/compute/admin/test_hosts_negative.py index 65ada4d194..83669455ae 100644 --- a/tempest/api/compute/admin/test_hosts_negative.py +++ b/tempest/api/compute/admin/test_hosts_negative.py @@ -12,10 +12,9 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.compute import base from tempest.common.utils import data_utils +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/compute/admin/test_hypervisor_negative.py b/tempest/api/compute/admin/test_hypervisor_negative.py index 0e8012ac4e..f313f76df4 100644 --- a/tempest/api/compute/admin/test_hypervisor_negative.py +++ b/tempest/api/compute/admin/test_hypervisor_negative.py @@ -15,10 +15,9 @@ import uuid -from tempest_lib import exceptions as lib_exc - from tempest.api.compute import base from tempest.common.utils import data_utils +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/compute/admin/test_instance_usage_audit_log_negative.py b/tempest/api/compute/admin/test_instance_usage_audit_log_negative.py index eea310353a..b9085025fe 100644 --- a/tempest/api/compute/admin/test_instance_usage_audit_log_negative.py +++ b/tempest/api/compute/admin/test_instance_usage_audit_log_negative.py @@ -16,9 +16,9 @@ import datetime from six.moves.urllib import parse as urllib -from tempest_lib import exceptions as lib_exc from tempest.api.compute import base +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/compute/admin/test_quotas_negative.py b/tempest/api/compute/admin/test_quotas_negative.py index bdbfde4215..d6aba5bc63 100644 --- a/tempest/api/compute/admin/test_quotas_negative.py +++ b/tempest/api/compute/admin/test_quotas_negative.py @@ -12,12 +12,11 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import decorators -from tempest_lib import exceptions as lib_exc - from tempest.api.compute import base from tempest.common.utils import data_utils from tempest import config +from tempest.lib import decorators +from tempest.lib import exceptions as lib_exc from tempest import test CONF = config.CONF diff --git a/tempest/api/compute/admin/test_security_group_default_rules.py b/tempest/api/compute/admin/test_security_group_default_rules.py index 74f3caa2da..ce350b699a 100644 --- a/tempest/api/compute/admin/test_security_group_default_rules.py +++ b/tempest/api/compute/admin/test_security_group_default_rules.py @@ -12,11 +12,11 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc import testtools from tempest.api.compute import base from tempest import config +from tempest.lib import exceptions as lib_exc from tempest import test CONF = config.CONF diff --git a/tempest/api/compute/admin/test_servers.py b/tempest/api/compute/admin/test_servers.py index 49c7318906..3eb6d947ee 100644 --- a/tempest/api/compute/admin/test_servers.py +++ b/tempest/api/compute/admin/test_servers.py @@ -12,13 +12,12 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import decorators - from tempest.api.compute import base from tempest.common import compute from tempest.common import fixed_network from tempest.common.utils import data_utils from tempest.common import waiters +from tempest.lib import decorators from tempest import test diff --git a/tempest/api/compute/admin/test_servers_negative.py b/tempest/api/compute/admin/test_servers_negative.py index 23b8a6caba..99effd7999 100644 --- a/tempest/api/compute/admin/test_servers_negative.py +++ b/tempest/api/compute/admin/test_servers_negative.py @@ -14,7 +14,6 @@ import uuid -from tempest_lib import exceptions as lib_exc import testtools from tempest.api.compute import base @@ -22,6 +21,7 @@ from tempest.common import tempest_fixtures as fixtures from tempest.common.utils import data_utils from tempest.common import waiters from tempest import config +from tempest.lib import exceptions as lib_exc from tempest import test CONF = config.CONF diff --git a/tempest/api/compute/admin/test_services_negative.py b/tempest/api/compute/admin/test_services_negative.py index e57401a817..710cac460f 100644 --- a/tempest/api/compute/admin/test_services_negative.py +++ b/tempest/api/compute/admin/test_services_negative.py @@ -12,9 +12,8 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.compute import base +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/compute/admin/test_simple_tenant_usage.py b/tempest/api/compute/admin/test_simple_tenant_usage.py index e5c17caf2a..8986db86a9 100644 --- a/tempest/api/compute/admin/test_simple_tenant_usage.py +++ b/tempest/api/compute/admin/test_simple_tenant_usage.py @@ -16,8 +16,8 @@ import datetime from tempest.api.compute import base +from tempest.lib import exceptions as e from tempest import test -from tempest_lib import exceptions as e # Time that waits for until returning valid response # TODO(takmatsu): Ideally this value would come from configuration. diff --git a/tempest/api/compute/admin/test_simple_tenant_usage_negative.py b/tempest/api/compute/admin/test_simple_tenant_usage_negative.py index e9b4ad45c1..315116ee75 100644 --- a/tempest/api/compute/admin/test_simple_tenant_usage_negative.py +++ b/tempest/api/compute/admin/test_simple_tenant_usage_negative.py @@ -14,9 +14,9 @@ # under the License. import datetime -from tempest_lib import exceptions as lib_exc from tempest.api.compute import base +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/compute/base.py b/tempest/api/compute/base.py index 96f32aa105..ee21284279 100644 --- a/tempest/api/compute/base.py +++ b/tempest/api/compute/base.py @@ -16,7 +16,6 @@ import time from oslo_log import log as logging -from tempest_lib import exceptions as lib_exc from tempest.api.compute import api_microversion_fixture from tempest.common import api_version_utils @@ -25,6 +24,7 @@ from tempest.common.utils import data_utils from tempest.common import waiters from tempest import config from tempest import exceptions +from tempest.lib import exceptions as lib_exc import tempest.test CONF = config.CONF diff --git a/tempest/api/compute/floating_ips/test_floating_ips_actions.py b/tempest/api/compute/floating_ips/test_floating_ips_actions.py index 5b906412d0..85fd4abfe5 100644 --- a/tempest/api/compute/floating_ips/test_floating_ips_actions.py +++ b/tempest/api/compute/floating_ips/test_floating_ips_actions.py @@ -13,11 +13,10 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.compute.floating_ips import base from tempest.common.utils import data_utils from tempest.common import waiters +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/compute/floating_ips/test_floating_ips_actions_negative.py b/tempest/api/compute/floating_ips/test_floating_ips_actions_negative.py index 0223c0da3b..105c4e3620 100644 --- a/tempest/api/compute/floating_ips/test_floating_ips_actions_negative.py +++ b/tempest/api/compute/floating_ips/test_floating_ips_actions_negative.py @@ -15,11 +15,10 @@ import uuid -from tempest_lib import exceptions as lib_exc - from tempest.api.compute.floating_ips import base from tempest.common.utils import data_utils from tempest import config +from tempest.lib import exceptions as lib_exc from tempest import test CONF = config.CONF diff --git a/tempest/api/compute/floating_ips/test_list_floating_ips_negative.py b/tempest/api/compute/floating_ips/test_list_floating_ips_negative.py index 75b6b552ac..c6c7347f31 100644 --- a/tempest/api/compute/floating_ips/test_list_floating_ips_negative.py +++ b/tempest/api/compute/floating_ips/test_list_floating_ips_negative.py @@ -15,11 +15,10 @@ import uuid -from tempest_lib import exceptions as lib_exc - from tempest.api.compute import base from tempest.common.utils import data_utils from tempest import config +from tempest.lib import exceptions as lib_exc from tempest import test CONF = config.CONF diff --git a/tempest/api/compute/images/test_image_metadata_negative.py b/tempest/api/compute/images/test_image_metadata_negative.py index 85d137b1ac..9cb9e03263 100644 --- a/tempest/api/compute/images/test_image_metadata_negative.py +++ b/tempest/api/compute/images/test_image_metadata_negative.py @@ -13,10 +13,9 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.compute import base from tempest.common.utils import data_utils +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/compute/images/test_images_negative.py b/tempest/api/compute/images/test_images_negative.py index 8706566ce7..63ba650b36 100644 --- a/tempest/api/compute/images/test_images_negative.py +++ b/tempest/api/compute/images/test_images_negative.py @@ -12,12 +12,11 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.compute import base from tempest.common.utils import data_utils from tempest.common import waiters from tempest import config +from tempest.lib import exceptions as lib_exc from tempest import test CONF = config.CONF diff --git a/tempest/api/compute/images/test_images_oneserver_negative.py b/tempest/api/compute/images/test_images_oneserver_negative.py index 2fc9ef8180..d9b80e16ea 100644 --- a/tempest/api/compute/images/test_images_oneserver_negative.py +++ b/tempest/api/compute/images/test_images_oneserver_negative.py @@ -15,12 +15,12 @@ # under the License. from oslo_log import log as logging -from tempest_lib import exceptions as lib_exc from tempest.api.compute import base from tempest.common.utils import data_utils from tempest.common import waiters from tempest import config +from tempest.lib import exceptions as lib_exc from tempest import test CONF = config.CONF diff --git a/tempest/api/compute/images/test_list_image_filters_negative.py b/tempest/api/compute/images/test_list_image_filters_negative.py index 34d26e2c6e..2689f8891b 100644 --- a/tempest/api/compute/images/test_list_image_filters_negative.py +++ b/tempest/api/compute/images/test_list_image_filters_negative.py @@ -12,11 +12,10 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.compute import base from tempest.common.utils import data_utils from tempest import config +from tempest.lib import exceptions as lib_exc from tempest import test CONF = config.CONF diff --git a/tempest/api/compute/keypairs/test_keypairs_negative.py b/tempest/api/compute/keypairs/test_keypairs_negative.py index 0ab78fbd84..2a6139b95c 100644 --- a/tempest/api/compute/keypairs/test_keypairs_negative.py +++ b/tempest/api/compute/keypairs/test_keypairs_negative.py @@ -14,10 +14,9 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.compute.keypairs import base from tempest.common.utils import data_utils +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/compute/limits/test_absolute_limits_negative.py b/tempest/api/compute/limits/test_absolute_limits_negative.py index 773bf238cb..66bc24198f 100644 --- a/tempest/api/compute/limits/test_absolute_limits_negative.py +++ b/tempest/api/compute/limits/test_absolute_limits_negative.py @@ -13,10 +13,9 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.compute import base from tempest.common import tempest_fixtures as fixtures +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/compute/security_groups/test_security_group_rules_negative.py b/tempest/api/compute/security_groups/test_security_group_rules_negative.py index 816038a3c1..853ef31612 100644 --- a/tempest/api/compute/security_groups/test_security_group_rules_negative.py +++ b/tempest/api/compute/security_groups/test_security_group_rules_negative.py @@ -13,11 +13,10 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.compute.security_groups import base from tempest.common.utils import data_utils from tempest import config +from tempest.lib import exceptions as lib_exc from tempest import test CONF = config.CONF diff --git a/tempest/api/compute/security_groups/test_security_groups.py b/tempest/api/compute/security_groups/test_security_groups.py index 81a02be92a..f6353c80c4 100644 --- a/tempest/api/compute/security_groups/test_security_groups.py +++ b/tempest/api/compute/security_groups/test_security_groups.py @@ -13,11 +13,10 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.compute.security_groups import base from tempest.common.utils import data_utils from tempest.common import waiters +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/compute/security_groups/test_security_groups_negative.py b/tempest/api/compute/security_groups/test_security_groups_negative.py index 120d327e3b..5125e2b2d5 100644 --- a/tempest/api/compute/security_groups/test_security_groups_negative.py +++ b/tempest/api/compute/security_groups/test_security_groups_negative.py @@ -13,13 +13,13 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import decorators -from tempest_lib import exceptions as lib_exc import testtools from tempest.api.compute.security_groups import base from tempest.common.utils import data_utils from tempest import config +from tempest.lib import decorators +from tempest.lib import exceptions as lib_exc from tempest import test CONF = config.CONF diff --git a/tempest/api/compute/servers/test_attach_interfaces.py b/tempest/api/compute/servers/test_attach_interfaces.py index be79163f3f..4fb4e9ad5d 100644 --- a/tempest/api/compute/servers/test_attach_interfaces.py +++ b/tempest/api/compute/servers/test_attach_interfaces.py @@ -15,11 +15,10 @@ import time -from tempest_lib import exceptions as lib_exc - from tempest.api.compute import base from tempest import config from tempest import exceptions +from tempest.lib import exceptions as lib_exc from tempest import test CONF = config.CONF diff --git a/tempest/api/compute/servers/test_instance_actions_negative.py b/tempest/api/compute/servers/test_instance_actions_negative.py index ac66d05e5b..54ec6aad50 100644 --- a/tempest/api/compute/servers/test_instance_actions_negative.py +++ b/tempest/api/compute/servers/test_instance_actions_negative.py @@ -13,10 +13,9 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.compute import base from tempest.common.utils import data_utils +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/compute/servers/test_list_server_filters.py b/tempest/api/compute/servers/test_list_server_filters.py index 37f322fd53..0b33d66559 100644 --- a/tempest/api/compute/servers/test_list_server_filters.py +++ b/tempest/api/compute/servers/test_list_server_filters.py @@ -13,15 +13,14 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import decorators -from tempest_lib import exceptions as lib_exc - from tempest.api.compute import base from tempest.api import utils from tempest.common import fixed_network from tempest.common.utils import data_utils from tempest.common import waiters from tempest import config +from tempest.lib import decorators +from tempest.lib import exceptions as lib_exc from tempest import test CONF = config.CONF diff --git a/tempest/api/compute/servers/test_list_servers_negative.py b/tempest/api/compute/servers/test_list_servers_negative.py index f205ddfb60..b18789eb88 100644 --- a/tempest/api/compute/servers/test_list_servers_negative.py +++ b/tempest/api/compute/servers/test_list_servers_negative.py @@ -14,10 +14,10 @@ # under the License. from six import moves -from tempest_lib import exceptions as lib_exc from tempest.api.compute import base from tempest.common import waiters +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/compute/servers/test_multiple_create_negative.py b/tempest/api/compute/servers/test_multiple_create_negative.py index 3d8a732e8b..e5b4f46311 100644 --- a/tempest/api/compute/servers/test_multiple_create_negative.py +++ b/tempest/api/compute/servers/test_multiple_create_negative.py @@ -13,10 +13,9 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.compute import base from tempest.common.utils import data_utils +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/compute/servers/test_server_actions.py b/tempest/api/compute/servers/test_server_actions.py index 66e85a6858..5b4417a0d0 100644 --- a/tempest/api/compute/servers/test_server_actions.py +++ b/tempest/api/compute/servers/test_server_actions.py @@ -16,8 +16,6 @@ import logging from six.moves.urllib import parse as urlparse -from tempest_lib import decorators -from tempest_lib import exceptions as lib_exc import testtools from tempest.api.compute import base @@ -25,6 +23,8 @@ from tempest.common.utils import data_utils from tempest.common.utils.linux import remote_client from tempest.common import waiters from tempest import config +from tempest.lib import decorators +from tempest.lib import exceptions as lib_exc from tempest import test CONF = config.CONF diff --git a/tempest/api/compute/servers/test_server_addresses_negative.py b/tempest/api/compute/servers/test_server_addresses_negative.py index 3503dc2a30..b4753e1d7a 100644 --- a/tempest/api/compute/servers/test_server_addresses_negative.py +++ b/tempest/api/compute/servers/test_server_addresses_negative.py @@ -13,9 +13,8 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.compute import base +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/compute/servers/test_server_metadata_negative.py b/tempest/api/compute/servers/test_server_metadata_negative.py index 18d80be471..cbe70e282f 100644 --- a/tempest/api/compute/servers/test_server_metadata_negative.py +++ b/tempest/api/compute/servers/test_server_metadata_negative.py @@ -13,10 +13,9 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.compute import base from tempest.common.utils import data_utils +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/compute/servers/test_server_personality.py b/tempest/api/compute/servers/test_server_personality.py index dad8e90203..74d34a22d9 100644 --- a/tempest/api/compute/servers/test_server_personality.py +++ b/tempest/api/compute/servers/test_server_personality.py @@ -14,13 +14,13 @@ # under the License. import base64 -from tempest_lib.common.utils import data_utils -from tempest_lib import exceptions as lib_exc from tempest.api.compute import base from tempest.common.utils.linux import remote_client from tempest.common import waiters from tempest import config +from tempest.lib.common.utils import data_utils +from tempest.lib import exceptions as lib_exc from tempest import test CONF = config.CONF diff --git a/tempest/api/compute/servers/test_server_rescue_negative.py b/tempest/api/compute/servers/test_server_rescue_negative.py index 5afb4d1277..8d63b6b81b 100644 --- a/tempest/api/compute/servers/test_server_rescue_negative.py +++ b/tempest/api/compute/servers/test_server_rescue_negative.py @@ -13,13 +13,13 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc import testtools from tempest.api.compute import base from tempest.common.utils import data_utils from tempest.common import waiters from tempest import config +from tempest.lib import exceptions as lib_exc from tempest import test CONF = config.CONF diff --git a/tempest/api/compute/servers/test_servers_negative.py b/tempest/api/compute/servers/test_servers_negative.py index 681b5dbc52..0df6eadb3a 100644 --- a/tempest/api/compute/servers/test_servers_negative.py +++ b/tempest/api/compute/servers/test_servers_negative.py @@ -15,13 +15,13 @@ import sys -from tempest_lib import exceptions as lib_exc import testtools from tempest.api.compute import base from tempest.common.utils import data_utils from tempest.common import waiters from tempest import config +from tempest.lib import exceptions as lib_exc from tempest import test CONF = config.CONF diff --git a/tempest/api/compute/servers/test_virtual_interfaces.py b/tempest/api/compute/servers/test_virtual_interfaces.py index 7aa6d34d94..b3e138f886 100644 --- a/tempest/api/compute/servers/test_virtual_interfaces.py +++ b/tempest/api/compute/servers/test_virtual_interfaces.py @@ -14,10 +14,10 @@ # under the License. import netaddr -from tempest_lib import decorators from tempest.api.compute import base from tempest import config +from tempest.lib import decorators from tempest import test CONF = config.CONF diff --git a/tempest/api/compute/servers/test_virtual_interfaces_negative.py b/tempest/api/compute/servers/test_virtual_interfaces_negative.py index 577a673a97..e038b8208a 100644 --- a/tempest/api/compute/servers/test_virtual_interfaces_negative.py +++ b/tempest/api/compute/servers/test_virtual_interfaces_negative.py @@ -15,9 +15,8 @@ import uuid -from tempest_lib import exceptions as lib_exc - from tempest.api.compute import base +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/compute/test_authorization.py b/tempest/api/compute/test_authorization.py index bf4396d571..133502cd66 100644 --- a/tempest/api/compute/test_authorization.py +++ b/tempest/api/compute/test_authorization.py @@ -16,11 +16,11 @@ import six from oslo_log import log as logging -from tempest_lib import exceptions as lib_exc from tempest.api.compute import base from tempest.common.utils import data_utils from tempest import config +from tempest.lib import exceptions as lib_exc from tempest import test CONF = config.CONF diff --git a/tempest/api/compute/test_live_block_migration_negative.py b/tempest/api/compute/test_live_block_migration_negative.py index 2cd85f2110..dc57396ddc 100644 --- a/tempest/api/compute/test_live_block_migration_negative.py +++ b/tempest/api/compute/test_live_block_migration_negative.py @@ -13,12 +13,11 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.compute import base from tempest.common.utils import data_utils from tempest.common import waiters from tempest import config +from tempest.lib import exceptions as lib_exc from tempest import test CONF = config.CONF diff --git a/tempest/api/compute/volumes/test_volumes_negative.py b/tempest/api/compute/volumes/test_volumes_negative.py index 01a0baf0a7..d1c48c4e95 100644 --- a/tempest/api/compute/volumes/test_volumes_negative.py +++ b/tempest/api/compute/volumes/test_volumes_negative.py @@ -15,11 +15,10 @@ import uuid -from tempest_lib import exceptions as lib_exc - from tempest.api.compute import base from tempest.common.utils import data_utils from tempest import config +from tempest.lib import exceptions as lib_exc from tempest import test CONF = config.CONF diff --git a/tempest/api/data_processing/base.py b/tempest/api/data_processing/base.py index 8424db0c2c..164caafae0 100644 --- a/tempest/api/data_processing/base.py +++ b/tempest/api/data_processing/base.py @@ -16,10 +16,10 @@ from collections import OrderedDict import copy import six -from tempest_lib import exceptions as lib_exc from tempest import config from tempest import exceptions +from tempest.lib import exceptions as lib_exc import tempest.test diff --git a/tempest/api/database/flavors/test_flavors_negative.py b/tempest/api/database/flavors/test_flavors_negative.py index 3dee96f09e..cd2981bd5d 100644 --- a/tempest/api/database/flavors/test_flavors_negative.py +++ b/tempest/api/database/flavors/test_flavors_negative.py @@ -13,9 +13,8 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.database import base +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/identity/admin/v2/test_roles_negative.py b/tempest/api/identity/admin/v2/test_roles_negative.py index 23a1958ff1..14f43066c9 100644 --- a/tempest/api/identity/admin/v2/test_roles_negative.py +++ b/tempest/api/identity/admin/v2/test_roles_negative.py @@ -15,10 +15,9 @@ import uuid -from tempest_lib import exceptions as lib_exc - from tempest.api.identity import base from tempest.common.utils import data_utils +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/identity/admin/v2/test_services.py b/tempest/api/identity/admin/v2/test_services.py index 5685922248..fe83759a8f 100644 --- a/tempest/api/identity/admin/v2/test_services.py +++ b/tempest/api/identity/admin/v2/test_services.py @@ -14,10 +14,10 @@ # under the License. from six import moves -from tempest_lib import exceptions as lib_exc from tempest.api.identity import base from tempest.common.utils import data_utils +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/identity/admin/v2/test_tenant_negative.py b/tempest/api/identity/admin/v2/test_tenant_negative.py index a02dbc1bb8..a4c1afc780 100644 --- a/tempest/api/identity/admin/v2/test_tenant_negative.py +++ b/tempest/api/identity/admin/v2/test_tenant_negative.py @@ -15,10 +15,9 @@ import uuid -from tempest_lib import exceptions as lib_exc - from tempest.api.identity import base from tempest.common.utils import data_utils +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/identity/admin/v2/test_users_negative.py b/tempest/api/identity/admin/v2/test_users_negative.py index 0a5d0c948d..dee42b708e 100644 --- a/tempest/api/identity/admin/v2/test_users_negative.py +++ b/tempest/api/identity/admin/v2/test_users_negative.py @@ -15,10 +15,9 @@ import uuid -from tempest_lib import exceptions as lib_exc - from tempest.api.identity import base from tempest.common.utils import data_utils +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/identity/admin/v3/test_default_project_id.py b/tempest/api/identity/admin/v3/test_default_project_id.py index b2bef6e17f..ff53187426 100644 --- a/tempest/api/identity/admin/v3/test_default_project_id.py +++ b/tempest/api/identity/admin/v3/test_default_project_id.py @@ -10,12 +10,11 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import auth - from tempest.api.identity import base from tempest import clients from tempest.common.utils import data_utils from tempest import config +from tempest.lib import auth from tempest import manager from tempest import test diff --git a/tempest/api/identity/admin/v3/test_domains_negative.py b/tempest/api/identity/admin/v3/test_domains_negative.py index 253aeca0c2..4330cab1a3 100644 --- a/tempest/api/identity/admin/v3/test_domains_negative.py +++ b/tempest/api/identity/admin/v3/test_domains_negative.py @@ -14,11 +14,10 @@ # under the License. from tempest.api.identity import base +from tempest.lib.common.utils import data_utils +from tempest.lib import exceptions as lib_exc from tempest import test -from tempest_lib.common.utils import data_utils -from tempest_lib import exceptions as lib_exc - class DomainsNegativeTestJSON(base.BaseIdentityV3AdminTest): _interface = 'json' diff --git a/tempest/api/identity/admin/v3/test_endpoints_negative.py b/tempest/api/identity/admin/v3/test_endpoints_negative.py index 372254f137..b16605e6af 100644 --- a/tempest/api/identity/admin/v3/test_endpoints_negative.py +++ b/tempest/api/identity/admin/v3/test_endpoints_negative.py @@ -14,10 +14,9 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.identity import base from tempest.common.utils import data_utils +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/identity/admin/v3/test_projects_negative.py b/tempest/api/identity/admin/v3/test_projects_negative.py index 79cfc9158f..fb4a8cf508 100644 --- a/tempest/api/identity/admin/v3/test_projects_negative.py +++ b/tempest/api/identity/admin/v3/test_projects_negative.py @@ -13,10 +13,9 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.identity import base from tempest.common.utils import data_utils +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/identity/admin/v3/test_regions.py b/tempest/api/identity/admin/v3/test_regions.py index 8bba3cbfc6..ece36b992d 100644 --- a/tempest/api/identity/admin/v3/test_regions.py +++ b/tempest/api/identity/admin/v3/test_regions.py @@ -13,10 +13,9 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.identity import base from tempest.common.utils import data_utils +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/identity/admin/v3/test_services.py b/tempest/api/identity/admin/v3/test_services.py index c6e3df4835..2c3cae512c 100644 --- a/tempest/api/identity/admin/v3/test_services.py +++ b/tempest/api/identity/admin/v3/test_services.py @@ -13,10 +13,9 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.identity import base from tempest.common.utils import data_utils +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/identity/admin/v3/test_tokens.py b/tempest/api/identity/admin/v3/test_tokens.py index 531ff56b63..63ba15813d 100644 --- a/tempest/api/identity/admin/v3/test_tokens.py +++ b/tempest/api/identity/admin/v3/test_tokens.py @@ -13,10 +13,9 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.identity import base from tempest.common.utils import data_utils +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/identity/admin/v3/test_trusts.py b/tempest/api/identity/admin/v3/test_trusts.py index da1f1551ee..d31514c889 100644 --- a/tempest/api/identity/admin/v3/test_trusts.py +++ b/tempest/api/identity/admin/v3/test_trusts.py @@ -14,13 +14,13 @@ import datetime import re from oslo_utils import timeutils -from tempest_lib import exceptions as lib_exc from tempest.api.identity import base from tempest import clients from tempest.common import credentials_factory as common_creds from tempest.common.utils import data_utils from tempest import config +from tempest.lib import exceptions as lib_exc from tempest import test CONF = config.CONF diff --git a/tempest/api/identity/admin/v3/test_users_negative.py b/tempest/api/identity/admin/v3/test_users_negative.py index 9dd477b487..f41ec3d071 100644 --- a/tempest/api/identity/admin/v3/test_users_negative.py +++ b/tempest/api/identity/admin/v3/test_users_negative.py @@ -13,10 +13,9 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.identity import base from tempest.common.utils import data_utils +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/identity/base.py b/tempest/api/identity/base.py index b209a824e1..c44ffb9c07 100644 --- a/tempest/api/identity/base.py +++ b/tempest/api/identity/base.py @@ -14,10 +14,10 @@ # under the License. from oslo_log import log as logging -from tempest_lib import exceptions as lib_exc from tempest.common.utils import data_utils from tempest import config +from tempest.lib import exceptions as lib_exc import tempest.test CONF = config.CONF diff --git a/tempest/api/identity/v2/test_ec2_credentials.py b/tempest/api/identity/v2/test_ec2_credentials.py index bd493267f3..8600980396 100644 --- a/tempest/api/identity/v2/test_ec2_credentials.py +++ b/tempest/api/identity/v2/test_ec2_credentials.py @@ -13,9 +13,8 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.identity import base +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/identity/v2/test_tenants.py b/tempest/api/identity/v2/test_tenants.py index 4e315570fa..b742e692d5 100644 --- a/tempest/api/identity/v2/test_tenants.py +++ b/tempest/api/identity/v2/test_tenants.py @@ -13,9 +13,8 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.identity import base +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/identity/v2/test_users.py b/tempest/api/identity/v2/test_users.py index a59a1a0313..ce4ee6939f 100644 --- a/tempest/api/identity/v2/test_users.py +++ b/tempest/api/identity/v2/test_users.py @@ -16,10 +16,9 @@ import copy import time -from tempest_lib.common.utils import data_utils -from tempest_lib import exceptions - from tempest.api.identity import base +from tempest.lib.common.utils import data_utils +from tempest.lib import exceptions from tempest import manager from tempest import test diff --git a/tempest/api/identity/v3/test_projects.py b/tempest/api/identity/v3/test_projects.py index b42cf4330b..7049bcff70 100644 --- a/tempest/api/identity/v3/test_projects.py +++ b/tempest/api/identity/v3/test_projects.py @@ -13,9 +13,8 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.identity import base +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/identity/v3/test_users.py b/tempest/api/identity/v3/test_users.py index 29396a8b64..ab48c07c87 100644 --- a/tempest/api/identity/v3/test_users.py +++ b/tempest/api/identity/v3/test_users.py @@ -16,10 +16,9 @@ import copy import time -from tempest_lib.common.utils import data_utils -from tempest_lib import exceptions - from tempest.api.identity import base +from tempest.lib.common.utils import data_utils +from tempest.lib import exceptions from tempest import manager from tempest import test diff --git a/tempest/api/image/admin/v2/test_images.py b/tempest/api/image/admin/v2/test_images.py index b171da3b18..80da7a13b4 100644 --- a/tempest/api/image/admin/v2/test_images.py +++ b/tempest/api/image/admin/v2/test_images.py @@ -14,13 +14,13 @@ # under the License. from six import moves -from tempest_lib.common.utils import data_utils import testtools from tempest.api.image import base from tempest import config +from tempest.lib.common.utils import data_utils +from tempest.lib import exceptions as lib_exc from tempest import test -from tempest_lib import exceptions as lib_exc CONF = config.CONF diff --git a/tempest/api/image/base.py b/tempest/api/image/base.py index ade7b6768d..06839367d5 100644 --- a/tempest/api/image/base.py +++ b/tempest/api/image/base.py @@ -13,10 +13,10 @@ # under the License. from six import moves -from tempest_lib import exceptions as lib_exc from tempest.common.utils import data_utils from tempest import config +from tempest.lib import exceptions as lib_exc import tempest.test CONF = config.CONF diff --git a/tempest/api/image/v1/test_image_members_negative.py b/tempest/api/image/v1/test_image_members_negative.py index 50f5048b2a..16a4ba677a 100644 --- a/tempest/api/image/v1/test_image_members_negative.py +++ b/tempest/api/image/v1/test_image_members_negative.py @@ -12,10 +12,9 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.image import base from tempest.common.utils import data_utils +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/image/v1/test_images_negative.py b/tempest/api/image/v1/test_images_negative.py index f16b80ed9e..babee74172 100644 --- a/tempest/api/image/v1/test_images_negative.py +++ b/tempest/api/image/v1/test_images_negative.py @@ -13,9 +13,9 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc from tempest.api.image import base +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/image/v2/test_images_member_negative.py b/tempest/api/image/v2/test_images_member_negative.py index eb90719df1..388eb083f5 100644 --- a/tempest/api/image/v2/test_images_member_negative.py +++ b/tempest/api/image/v2/test_images_member_negative.py @@ -10,9 +10,8 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.image import base +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/image/v2/test_images_metadefs_namespaces.py b/tempest/api/image/v2/test_images_metadefs_namespaces.py index efb7b8b0c0..de8299e41e 100644 --- a/tempest/api/image/v2/test_images_metadefs_namespaces.py +++ b/tempest/api/image/v2/test_images_metadefs_namespaces.py @@ -15,8 +15,8 @@ from tempest.api.image import base from tempest.common.utils import data_utils +from tempest.lib import exceptions as lib_exc from tempest import test -from tempest_lib import exceptions as lib_exc class MetadataNamespacesTest(base.BaseV2ImageTest): diff --git a/tempest/api/image/v2/test_images_negative.py b/tempest/api/image/v2/test_images_negative.py index 485942e952..fc743260ad 100644 --- a/tempest/api/image/v2/test_images_negative.py +++ b/tempest/api/image/v2/test_images_negative.py @@ -16,9 +16,8 @@ import uuid -from tempest_lib import exceptions as lib_exc - from tempest.api.image import base +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/image/v2/test_images_tags_negative.py b/tempest/api/image/v2/test_images_tags_negative.py index a3f4ca8fc9..1aa2d11c7c 100644 --- a/tempest/api/image/v2/test_images_tags_negative.py +++ b/tempest/api/image/v2/test_images_tags_negative.py @@ -14,10 +14,9 @@ import uuid -from tempest_lib import exceptions as lib_exc - from tempest.api.image import base from tempest.common.utils import data_utils +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/network/admin/test_external_networks_negative.py b/tempest/api/network/admin/test_external_networks_negative.py index d031108ed9..57b144ad0f 100644 --- a/tempest/api/network/admin/test_external_networks_negative.py +++ b/tempest/api/network/admin/test_external_networks_negative.py @@ -13,10 +13,9 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.network import base from tempest import config +from tempest.lib import exceptions as lib_exc from tempest import test CONF = config.CONF diff --git a/tempest/api/network/admin/test_negative_quotas.py b/tempest/api/network/admin/test_negative_quotas.py index 47da08cb91..a1a881d5f7 100644 --- a/tempest/api/network/admin/test_negative_quotas.py +++ b/tempest/api/network/admin/test_negative_quotas.py @@ -14,8 +14,8 @@ # under the License. from tempest.api.network import base +from tempest.lib import exceptions as lib_exc from tempest import test -from tempest_lib import exceptions as lib_exc class QuotasNegativeTest(base.BaseAdminNetworkTest): diff --git a/tempest/api/network/admin/test_quotas.py b/tempest/api/network/admin/test_quotas.py index 8b32a94899..d72e960d26 100644 --- a/tempest/api/network/admin/test_quotas.py +++ b/tempest/api/network/admin/test_quotas.py @@ -17,8 +17,8 @@ import six from tempest.api.network import base from tempest.common.utils import data_utils +from tempest.lib import exceptions as lib_exc from tempest import test -from tempest_lib import exceptions as lib_exc class QuotasTest(base.BaseAdminNetworkTest): diff --git a/tempest/api/network/base.py b/tempest/api/network/base.py index f209f89482..1e636f1ab1 100644 --- a/tempest/api/network/base.py +++ b/tempest/api/network/base.py @@ -14,11 +14,11 @@ # under the License. import netaddr -from tempest_lib import exceptions as lib_exc from tempest.common.utils import data_utils from tempest import config from tempest import exceptions +from tempest.lib import exceptions as lib_exc import tempest.test CONF = config.CONF diff --git a/tempest/api/network/test_dhcp_ipv6.py b/tempest/api/network/test_dhcp_ipv6.py index 3e261db865..f59ecffb1d 100644 --- a/tempest/api/network/test_dhcp_ipv6.py +++ b/tempest/api/network/test_dhcp_ipv6.py @@ -17,11 +17,11 @@ import netaddr import random import six -from tempest_lib import exceptions as lib_exc from tempest.api.network import base from tempest.common.utils import data_utils from tempest import config +from tempest.lib import exceptions as lib_exc from tempest import test CONF = config.CONF diff --git a/tempest/api/network/test_floating_ips_negative.py b/tempest/api/network/test_floating_ips_negative.py index f91561530d..963d99d3ed 100644 --- a/tempest/api/network/test_floating_ips_negative.py +++ b/tempest/api/network/test_floating_ips_negative.py @@ -14,11 +14,10 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.network import base from tempest.common.utils import data_utils from tempest import config +from tempest.lib import exceptions as lib_exc from tempest import test CONF = config.CONF diff --git a/tempest/api/network/test_networks.py b/tempest/api/network/test_networks.py index 1c446eff4e..ffe0336542 100644 --- a/tempest/api/network/test_networks.py +++ b/tempest/api/network/test_networks.py @@ -16,12 +16,12 @@ import itertools import netaddr import six -from tempest_lib import exceptions as lib_exc from tempest.api.network import base from tempest.common import custom_matchers from tempest.common.utils import data_utils from tempest import config +from tempest.lib import exceptions as lib_exc from tempest import test CONF = config.CONF diff --git a/tempest/api/network/test_networks_negative.py b/tempest/api/network/test_networks_negative.py index 0ef96a6637..d87c2b69c2 100644 --- a/tempest/api/network/test_networks_negative.py +++ b/tempest/api/network/test_networks_negative.py @@ -14,10 +14,9 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.network import base from tempest.common.utils import data_utils +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/network/test_routers_negative.py b/tempest/api/network/test_routers_negative.py index 7b07d42d02..84dbd8dd02 100644 --- a/tempest/api/network/test_routers_negative.py +++ b/tempest/api/network/test_routers_negative.py @@ -14,11 +14,11 @@ # under the License. import netaddr -from tempest_lib import exceptions as lib_exc from tempest.api.network import base_routers as base from tempest.common.utils import data_utils from tempest import config +from tempest.lib import exceptions as lib_exc from tempest import test CONF = config.CONF diff --git a/tempest/api/network/test_security_groups_negative.py b/tempest/api/network/test_security_groups_negative.py index ff38e9ec37..5213c18dc9 100644 --- a/tempest/api/network/test_security_groups_negative.py +++ b/tempest/api/network/test_security_groups_negative.py @@ -15,10 +15,9 @@ import uuid -from tempest_lib import exceptions as lib_exc - from tempest.api.network import base_security_groups as base from tempest import config +from tempest.lib import exceptions as lib_exc from tempest import test CONF = config.CONF diff --git a/tempest/api/network/test_service_type_management.py b/tempest/api/network/test_service_type_management.py index ad1ecc4158..f49f0824e6 100644 --- a/tempest/api/network/test_service_type_management.py +++ b/tempest/api/network/test_service_type_management.py @@ -10,9 +10,8 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import decorators - from tempest.api.network import base +from tempest.lib import decorators from tempest import test diff --git a/tempest/api/network/test_subnetpools_extensions.py b/tempest/api/network/test_subnetpools_extensions.py index e5d0462e0a..d02713287f 100644 --- a/tempest/api/network/test_subnetpools_extensions.py +++ b/tempest/api/network/test_subnetpools_extensions.py @@ -15,8 +15,8 @@ from tempest.api.network import base from tempest.common.utils import data_utils from tempest import config +from tempest.lib import exceptions as lib_exc from tempest import test -from tempest_lib import exceptions as lib_exc CONF = config.CONF diff --git a/tempest/api/object_storage/base.py b/tempest/api/object_storage/base.py index 2621581322..044e8c1e2c 100644 --- a/tempest/api/object_storage/base.py +++ b/tempest/api/object_storage/base.py @@ -13,10 +13,9 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.common import custom_matchers from tempest import config +from tempest.lib import exceptions as lib_exc import tempest.test CONF = config.CONF diff --git a/tempest/api/object_storage/test_account_quotas_negative.py b/tempest/api/object_storage/test_account_quotas_negative.py index aee17d36bb..546bb06030 100644 --- a/tempest/api/object_storage/test_account_quotas_negative.py +++ b/tempest/api/object_storage/test_account_quotas_negative.py @@ -12,12 +12,11 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import decorators -from tempest_lib import exceptions as lib_exc - from tempest.api.object_storage import base from tempest.common.utils import data_utils from tempest import config +from tempest.lib import decorators +from tempest.lib import exceptions as lib_exc from tempest import test CONF = config.CONF diff --git a/tempest/api/object_storage/test_account_services_negative.py b/tempest/api/object_storage/test_account_services_negative.py index 998c2bdc72..254a9b38fc 100644 --- a/tempest/api/object_storage/test_account_services_negative.py +++ b/tempest/api/object_storage/test_account_services_negative.py @@ -12,10 +12,9 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.object_storage import base from tempest import config +from tempest.lib import exceptions as lib_exc from tempest import test CONF = config.CONF diff --git a/tempest/api/object_storage/test_container_acl_negative.py b/tempest/api/object_storage/test_container_acl_negative.py index 3bb47f0773..0055bf9600 100644 --- a/tempest/api/object_storage/test_container_acl_negative.py +++ b/tempest/api/object_storage/test_container_acl_negative.py @@ -12,11 +12,10 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.object_storage import base from tempest.common.utils import data_utils from tempest import config +from tempest.lib import exceptions as lib_exc from tempest import test CONF = config.CONF diff --git a/tempest/api/object_storage/test_container_quotas.py b/tempest/api/object_storage/test_container_quotas.py index 896352bd2c..01e53892c6 100644 --- a/tempest/api/object_storage/test_container_quotas.py +++ b/tempest/api/object_storage/test_container_quotas.py @@ -13,11 +13,10 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.object_storage import base from tempest.common.utils import data_utils from tempest import config +from tempest.lib import exceptions as lib_exc from tempest import test CONF = config.CONF diff --git a/tempest/api/object_storage/test_container_services.py b/tempest/api/object_storage/test_container_services.py index 1cc9437fe1..9d043e55c5 100644 --- a/tempest/api/object_storage/test_container_services.py +++ b/tempest/api/object_storage/test_container_services.py @@ -13,9 +13,8 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib.common.utils import data_utils - from tempest.api.object_storage import base +from tempest.lib.common.utils import data_utils from tempest import test diff --git a/tempest/api/object_storage/test_container_staticweb.py b/tempest/api/object_storage/test_container_staticweb.py index 18593f3d1a..5b3ce79d98 100644 --- a/tempest/api/object_storage/test_container_staticweb.py +++ b/tempest/api/object_storage/test_container_staticweb.py @@ -12,11 +12,10 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.object_storage import base from tempest.common import custom_matchers from tempest.common.utils import data_utils +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/object_storage/test_container_sync.py b/tempest/api/object_storage/test_container_sync.py index 0e39b7e615..2a5cec6f66 100644 --- a/tempest/api/object_storage/test_container_sync.py +++ b/tempest/api/object_storage/test_container_sync.py @@ -16,13 +16,13 @@ import time from six.moves.urllib import parse as urlparse -from tempest_lib import decorators import testtools from tempest.api.object_storage import base from tempest.common.utils import data_utils from tempest import config +from tempest.lib import decorators from tempest import test CONF = config.CONF diff --git a/tempest/api/object_storage/test_object_expiry.py b/tempest/api/object_storage/test_object_expiry.py index 1c9d5829d5..9db8bde632 100644 --- a/tempest/api/object_storage/test_object_expiry.py +++ b/tempest/api/object_storage/test_object_expiry.py @@ -13,11 +13,11 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc import time from tempest.api.object_storage import base from tempest.common.utils import data_utils +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/object_storage/test_object_formpost_negative.py b/tempest/api/object_storage/test_object_formpost_negative.py index 7d9e115bfa..cb13271d75 100644 --- a/tempest/api/object_storage/test_object_formpost_negative.py +++ b/tempest/api/object_storage/test_object_formpost_negative.py @@ -17,10 +17,10 @@ import hmac import time from six.moves.urllib import parse as urlparse -from tempest_lib import exceptions as lib_exc from tempest.api.object_storage import base from tempest.common.utils import data_utils +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/object_storage/test_object_slo.py b/tempest/api/object_storage/test_object_slo.py index 5811cb8cac..752f0b41fd 100644 --- a/tempest/api/object_storage/test_object_slo.py +++ b/tempest/api/object_storage/test_object_slo.py @@ -15,11 +15,11 @@ import hashlib from oslo_serialization import jsonutils as json -from tempest_lib import exceptions as lib_exc from tempest.api.object_storage import base from tempest.common import custom_matchers from tempest.common.utils import data_utils +from tempest.lib import exceptions as lib_exc from tempest import test # Each segment, except for the final one, must be at least 1 megabyte diff --git a/tempest/api/object_storage/test_object_temp_url_negative.py b/tempest/api/object_storage/test_object_temp_url_negative.py index 6d06143d3b..38fe697c26 100644 --- a/tempest/api/object_storage/test_object_temp_url_negative.py +++ b/tempest/api/object_storage/test_object_temp_url_negative.py @@ -17,10 +17,10 @@ import hmac import time from six.moves.urllib import parse as urlparse -from tempest_lib import exceptions as lib_exc from tempest.api.object_storage import base from tempest.common.utils import data_utils +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/orchestration/base.py b/tempest/api/orchestration/base.py index c93b5eda7d..26ace81305 100644 --- a/tempest/api/orchestration/base.py +++ b/tempest/api/orchestration/base.py @@ -12,11 +12,11 @@ import os.path -from tempest_lib import exceptions as lib_exc import yaml from tempest.common.utils import data_utils from tempest import config +from tempest.lib import exceptions as lib_exc import tempest.test CONF = config.CONF diff --git a/tempest/api/orchestration/stacks/test_limits.py b/tempest/api/orchestration/stacks/test_limits.py index 315b3e077f..d85aa96e32 100644 --- a/tempest/api/orchestration/stacks/test_limits.py +++ b/tempest/api/orchestration/stacks/test_limits.py @@ -10,11 +10,10 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.orchestration import base from tempest.common.utils import data_utils from tempest import config +from tempest.lib import exceptions as lib_exc from tempest import test CONF = config.CONF diff --git a/tempest/api/orchestration/stacks/test_soft_conf.py b/tempest/api/orchestration/stacks/test_soft_conf.py index ab45929ccc..6a4e2b932e 100644 --- a/tempest/api/orchestration/stacks/test_soft_conf.py +++ b/tempest/api/orchestration/stacks/test_soft_conf.py @@ -10,11 +10,10 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.orchestration import base from tempest.common.utils import data_utils from tempest import config +from tempest.lib import exceptions as lib_exc from tempest import test CONF = config.CONF diff --git a/tempest/api/orchestration/stacks/test_templates_negative.py b/tempest/api/orchestration/stacks/test_templates_negative.py index 4bd0f333b8..24e10ddfaa 100644 --- a/tempest/api/orchestration/stacks/test_templates_negative.py +++ b/tempest/api/orchestration/stacks/test_templates_negative.py @@ -12,9 +12,8 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.orchestration import base +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/orchestration/stacks/test_volumes.py b/tempest/api/orchestration/stacks/test_volumes.py index e51551ba43..37e68ef7ec 100644 --- a/tempest/api/orchestration/stacks/test_volumes.py +++ b/tempest/api/orchestration/stacks/test_volumes.py @@ -10,11 +10,10 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.orchestration import base from tempest.common.utils import data_utils from tempest import config +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/telemetry/base.py b/tempest/api/telemetry/base.py index ff068108e3..7238098ae7 100644 --- a/tempest/api/telemetry/base.py +++ b/tempest/api/telemetry/base.py @@ -13,13 +13,13 @@ import time from oslo_utils import timeutils -from tempest_lib import exceptions as lib_exc from tempest.common import compute from tempest.common.utils import data_utils from tempest.common import waiters from tempest import config from tempest import exceptions +from tempest.lib import exceptions as lib_exc import tempest.test CONF = config.CONF diff --git a/tempest/api/telemetry/test_alarming_api.py b/tempest/api/telemetry/test_alarming_api.py index daa09394a4..586bb425d0 100644 --- a/tempest/api/telemetry/test_alarming_api.py +++ b/tempest/api/telemetry/test_alarming_api.py @@ -10,10 +10,9 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.telemetry import base from tempest.common.utils import data_utils +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/telemetry/test_alarming_api_negative.py b/tempest/api/telemetry/test_alarming_api_negative.py index e9455569d6..0701b54dcd 100644 --- a/tempest/api/telemetry/test_alarming_api_negative.py +++ b/tempest/api/telemetry/test_alarming_api_negative.py @@ -14,8 +14,8 @@ from tempest.api.telemetry import base from tempest.common.utils import data_utils +from tempest.lib import exceptions as lib_exc from tempest import test -from tempest_lib import exceptions as lib_exc import uuid diff --git a/tempest/api/telemetry/test_telemetry_notification_api.py b/tempest/api/telemetry/test_telemetry_notification_api.py index a575125723..53d457f292 100644 --- a/tempest/api/telemetry/test_telemetry_notification_api.py +++ b/tempest/api/telemetry/test_telemetry_notification_api.py @@ -10,11 +10,11 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import decorators import testtools from tempest.api.telemetry import base from tempest import config +from tempest.lib import decorators from tempest import test CONF = config.CONF diff --git a/tempest/api/volume/admin/test_volume_quotas_negative.py b/tempest/api/volume/admin/test_volume_quotas_negative.py index 9185553eb7..a43ee8e7c9 100644 --- a/tempest/api/volume/admin/test_volume_quotas_negative.py +++ b/tempest/api/volume/admin/test_volume_quotas_negative.py @@ -13,10 +13,9 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.volume import base from tempest import config +from tempest.lib import exceptions as lib_exc from tempest import test CONF = config.CONF diff --git a/tempest/api/volume/admin/test_volume_services.py b/tempest/api/volume/admin/test_volume_services.py index fb426334ed..47130def68 100644 --- a/tempest/api/volume/admin/test_volume_services.py +++ b/tempest/api/volume/admin/test_volume_services.py @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import decorators +from tempest.lib import decorators from tempest.api.volume import base from tempest import config diff --git a/tempest/api/volume/admin/test_volume_snapshot_quotas_negative.py b/tempest/api/volume/admin/test_volume_snapshot_quotas_negative.py index c66207fa02..b7f70ba0f5 100644 --- a/tempest/api/volume/admin/test_volume_snapshot_quotas_negative.py +++ b/tempest/api/volume/admin/test_volume_snapshot_quotas_negative.py @@ -13,10 +13,9 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.api.volume import base from tempest import config +from tempest.lib import exceptions as lib_exc from tempest import test CONF = config.CONF diff --git a/tempest/api/volume/admin/test_volume_types_extra_specs_negative.py b/tempest/api/volume/admin/test_volume_types_extra_specs_negative.py index 6483af3e90..29ce2e7f33 100644 --- a/tempest/api/volume/admin/test_volume_types_extra_specs_negative.py +++ b/tempest/api/volume/admin/test_volume_types_extra_specs_negative.py @@ -15,10 +15,9 @@ import uuid -from tempest_lib import exceptions as lib_exc - from tempest.api.volume import base from tempest.common.utils import data_utils +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/volume/admin/test_volume_types_negative.py b/tempest/api/volume/admin/test_volume_types_negative.py index bc32fc97a2..bccf20eeba 100644 --- a/tempest/api/volume/admin/test_volume_types_negative.py +++ b/tempest/api/volume/admin/test_volume_types_negative.py @@ -15,9 +15,8 @@ import uuid -from tempest_lib import exceptions as lib_exc - from tempest.api.volume import base +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/volume/admin/test_volumes_backup.py b/tempest/api/volume/admin/test_volumes_backup.py index 4b2d3f3ce2..30c6a15123 100644 --- a/tempest/api/volume/admin/test_volumes_backup.py +++ b/tempest/api/volume/admin/test_volumes_backup.py @@ -13,11 +13,10 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import decorators - from tempest.api.volume import base from tempest.common.utils import data_utils from tempest import config +from tempest.lib import decorators from tempest import test CONF = config.CONF diff --git a/tempest/api/volume/base.py b/tempest/api/volume/base.py index cc906e5808..82dc2c9687 100644 --- a/tempest/api/volume/base.py +++ b/tempest/api/volume/base.py @@ -13,12 +13,11 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.common import compute from tempest.common.utils import data_utils from tempest import config from tempest import exceptions +from tempest.lib import exceptions as lib_exc import tempest.test CONF = config.CONF diff --git a/tempest/api/volume/test_volumes_negative.py b/tempest/api/volume/test_volumes_negative.py index ad6f5564c8..1b5e72a928 100644 --- a/tempest/api/volume/test_volumes_negative.py +++ b/tempest/api/volume/test_volumes_negative.py @@ -15,11 +15,10 @@ import uuid -from tempest_lib import exceptions as lib_exc - from tempest.api.volume import base from tempest.common.utils import data_utils from tempest.common import waiters +from tempest.lib import exceptions as lib_exc from tempest import test diff --git a/tempest/api/volume/test_volumes_snapshots_negative.py b/tempest/api/volume/test_volumes_snapshots_negative.py index d46c9b5de6..54459ac1b3 100644 --- a/tempest/api/volume/test_volumes_snapshots_negative.py +++ b/tempest/api/volume/test_volumes_snapshots_negative.py @@ -12,11 +12,10 @@ import uuid -from tempest_lib import exceptions as lib_exc - from tempest.api.volume import base from tempest.common.utils import data_utils from tempest import config +from tempest.lib import exceptions as lib_exc from tempest import test CONF = config.CONF diff --git a/tempest/clients.py b/tempest/clients.py index b398493beb..e85a683b92 100644 --- a/tempest/clients.py +++ b/tempest/clients.py @@ -16,81 +16,81 @@ import copy from oslo_log import log as logging -from tempest_lib.services.compute.agents_client import AgentsClient -from tempest_lib.services.compute.aggregates_client import AggregatesClient -from tempest_lib.services.compute.availability_zone_client import \ - AvailabilityZoneClient -from tempest_lib.services.compute.baremetal_nodes_client import \ - BaremetalNodesClient -from tempest_lib.services.compute.certificates_client import \ - CertificatesClient -from tempest_lib.services.compute.extensions_client import \ - ExtensionsClient -from tempest_lib.services.compute.fixed_ips_client import FixedIPsClient -from tempest_lib.services.compute.flavors_client import FlavorsClient -from tempest_lib.services.compute.floating_ip_pools_client import \ - FloatingIPPoolsClient -from tempest_lib.services.compute.floating_ips_bulk_client import \ - FloatingIPsBulkClient -from tempest_lib.services.compute.floating_ips_client import \ - FloatingIPsClient as ComputeFloatingIPsClient -from tempest_lib.services.compute.hosts_client import HostsClient -from tempest_lib.services.compute.hypervisor_client import \ - HypervisorClient -from tempest_lib.services.compute.images_client import ImagesClient \ - as ComputeImagesClient -from tempest_lib.services.compute.instance_usage_audit_log_client import \ - InstanceUsagesAuditLogClient -from tempest_lib.services.compute.interfaces_client import InterfacesClient -from tempest_lib.services.compute.limits_client import LimitsClient -from tempest_lib.services.compute.migrations_client import MigrationsClient -from tempest_lib.services.compute.networks_client import NetworksClient \ - as ComputeNetworksClient -from tempest_lib.services.compute.quota_classes_client import \ - QuotaClassesClient -from tempest_lib.services.compute.quotas_client import QuotasClient -from tempest_lib.services.compute.security_group_default_rules_client import \ - SecurityGroupDefaultRulesClient -from tempest_lib.services.compute.security_group_rules_client import \ - SecurityGroupRulesClient as ComputeSecurityGroupRulesClient -from tempest_lib.services.compute.security_groups_client import \ - SecurityGroupsClient as ComputeSecurityGroupsClient -from tempest_lib.services.compute.server_groups_client import \ - ServerGroupsClient -from tempest_lib.services.compute.servers_client import ServersClient -from tempest_lib.services.compute.services_client import ServicesClient -from tempest_lib.services.compute.snapshots_client import \ - SnapshotsClient as ComputeSnapshotsClient -from tempest_lib.services.compute.tenant_networks_client import \ - TenantNetworksClient -from tempest_lib.services.compute.tenant_usages_client import \ - TenantUsagesClient -from tempest_lib.services.compute.versions_client import VersionsClient -from tempest_lib.services.compute.volumes_client import \ - VolumesClient as ComputeVolumesClient -from tempest_lib.services.identity.v2.token_client import TokenClient -from tempest_lib.services.identity.v3.token_client import V3TokenClient -from tempest_lib.services.network.agents_client import AgentsClient \ - as NetworkAgentsClient -from tempest_lib.services.network.extensions_client import \ - ExtensionsClient as NetworkExtensionsClient -from tempest_lib.services.network.floating_ips_client import FloatingIPsClient -from tempest_lib.services.network.metering_label_rules_client import \ - MeteringLabelRulesClient -from tempest_lib.services.network.metering_labels_client import \ - MeteringLabelsClient -from tempest_lib.services.network.networks_client import NetworksClient -from tempest_lib.services.network.ports_client import PortsClient -from tempest_lib.services.network.quotas_client import QuotasClient \ - as NetworkQuotasClient -from tempest_lib.services.network.security_groups_client import \ - SecurityGroupsClient -from tempest_lib.services.network.subnetpools_client import SubnetpoolsClient -from tempest_lib.services.network.subnets_client import SubnetsClient from tempest.common import negative_rest_client from tempest import config from tempest import exceptions +from tempest.lib.services.compute.agents_client import AgentsClient +from tempest.lib.services.compute.aggregates_client import AggregatesClient +from tempest.lib.services.compute.availability_zone_client import \ + AvailabilityZoneClient +from tempest.lib.services.compute.baremetal_nodes_client import \ + BaremetalNodesClient +from tempest.lib.services.compute.certificates_client import \ + CertificatesClient +from tempest.lib.services.compute.extensions_client import \ + ExtensionsClient +from tempest.lib.services.compute.fixed_ips_client import FixedIPsClient +from tempest.lib.services.compute.flavors_client import FlavorsClient +from tempest.lib.services.compute.floating_ip_pools_client import \ + FloatingIPPoolsClient +from tempest.lib.services.compute.floating_ips_bulk_client import \ + FloatingIPsBulkClient +from tempest.lib.services.compute.floating_ips_client import \ + FloatingIPsClient as ComputeFloatingIPsClient +from tempest.lib.services.compute.hosts_client import HostsClient +from tempest.lib.services.compute.hypervisor_client import \ + HypervisorClient +from tempest.lib.services.compute.images_client import ImagesClient \ + as ComputeImagesClient +from tempest.lib.services.compute.instance_usage_audit_log_client import \ + InstanceUsagesAuditLogClient +from tempest.lib.services.compute.interfaces_client import InterfacesClient +from tempest.lib.services.compute.limits_client import LimitsClient +from tempest.lib.services.compute.migrations_client import MigrationsClient +from tempest.lib.services.compute.networks_client import NetworksClient \ + as ComputeNetworksClient +from tempest.lib.services.compute.quota_classes_client import \ + QuotaClassesClient +from tempest.lib.services.compute.quotas_client import QuotasClient +from tempest.lib.services.compute.security_group_default_rules_client import \ + SecurityGroupDefaultRulesClient +from tempest.lib.services.compute.security_group_rules_client import \ + SecurityGroupRulesClient as ComputeSecurityGroupRulesClient +from tempest.lib.services.compute.security_groups_client import \ + SecurityGroupsClient as ComputeSecurityGroupsClient +from tempest.lib.services.compute.server_groups_client import \ + ServerGroupsClient +from tempest.lib.services.compute.servers_client import ServersClient +from tempest.lib.services.compute.services_client import ServicesClient +from tempest.lib.services.compute.snapshots_client import \ + SnapshotsClient as ComputeSnapshotsClient +from tempest.lib.services.compute.tenant_networks_client import \ + TenantNetworksClient +from tempest.lib.services.compute.tenant_usages_client import \ + TenantUsagesClient +from tempest.lib.services.compute.versions_client import VersionsClient +from tempest.lib.services.compute.volumes_client import \ + VolumesClient as ComputeVolumesClient +from tempest.lib.services.identity.v2.token_client import TokenClient +from tempest.lib.services.identity.v3.token_client import V3TokenClient +from tempest.lib.services.network.agents_client import AgentsClient \ + as NetworkAgentsClient +from tempest.lib.services.network.extensions_client import \ + ExtensionsClient as NetworkExtensionsClient +from tempest.lib.services.network.floating_ips_client import FloatingIPsClient +from tempest.lib.services.network.metering_label_rules_client import \ + MeteringLabelRulesClient +from tempest.lib.services.network.metering_labels_client import \ + MeteringLabelsClient +from tempest.lib.services.network.networks_client import NetworksClient +from tempest.lib.services.network.ports_client import PortsClient +from tempest.lib.services.network.quotas_client import QuotasClient \ + as NetworkQuotasClient +from tempest.lib.services.network.security_groups_client import \ + SecurityGroupsClient +from tempest.lib.services.network.subnetpools_client import SubnetpoolsClient +from tempest.lib.services.network.subnets_client import SubnetsClient from tempest import manager from tempest.services.baremetal.v1.json.baremetal_client import \ BaremetalClient diff --git a/tempest/cmd/account_generator.py b/tempest/cmd/account_generator.py index 9e98d90f55..df2d4b54dd 100755 --- a/tempest/cmd/account_generator.py +++ b/tempest/cmd/account_generator.py @@ -89,16 +89,16 @@ import traceback from cliff import command from oslo_log import log as logging -import tempest_lib.auth -from tempest_lib.common.utils import data_utils -import tempest_lib.exceptions -from tempest_lib.services.network import networks_client -from tempest_lib.services.network import subnets_client import yaml from tempest.common import identity from tempest import config from tempest import exceptions as exc +import tempest.lib.auth +from tempest.lib.common.utils import data_utils +import tempest.lib.exceptions +from tempest.lib.services.network import networks_client +from tempest.lib.services.network import subnets_client from tempest.services.identity.v2.json import identity_client from tempest.services.identity.v2.json import roles_client from tempest.services.identity.v2.json import tenants_client @@ -121,7 +121,7 @@ def setup_logging(): def get_admin_clients(opts): - _creds = tempest_lib.auth.KeystoneV2Credentials( + _creds = tempest.lib.auth.KeystoneV2Credentials( username=opts.os_username, password=opts.os_password, tenant_name=opts.os_tenant_name) @@ -131,7 +131,7 @@ def get_admin_clients(opts): 'ca_certs': CONF.identity.ca_certificates_file, 'trace_requests': CONF.debug.trace_requests } - _auth = tempest_lib.auth.KeystoneV2AuthProvider( + _auth = tempest.lib.auth.KeystoneV2AuthProvider( _creds, CONF.identity.uri, **auth_params) params = { 'disable_ssl_certificate_validation': @@ -223,14 +223,14 @@ def create_resources(opts, resources): for u in resources['users']: try: tenant = identity.get_tenant_by_name(tenants_admin, u['tenant']) - except tempest_lib.exceptions.NotFound: + except tempest.lib.exceptions.NotFound: LOG.error("Tenant: %s - not found" % u['tenant']) continue while True: try: identity.get_user_by_username(tenants_admin, tenant['id'], u['name']) - except tempest_lib.exceptions.NotFound: + except tempest.lib.exceptions.NotFound: users_admin.create_user( u['name'], u['pass'], tenant['id'], "%s@%s" % (u['name'], tenant['id']), @@ -254,19 +254,19 @@ def create_resources(opts, resources): for u in resources['users']: try: tenant = identity.get_tenant_by_name(tenants_admin, u['tenant']) - except tempest_lib.exceptions.NotFound: + except tempest.lib.exceptions.NotFound: LOG.error("Tenant: %s - not found" % u['tenant']) continue try: user = identity.get_user_by_username(tenants_admin, tenant['id'], u['name']) - except tempest_lib.exceptions.NotFound: + except tempest.lib.exceptions.NotFound: LOG.error("User: %s - not found" % u['user']) continue for r in u['role_ids']: try: roles_admin.assign_user_role(tenant['id'], user['id'], r) - except tempest_lib.exceptions.Conflict: + except tempest.lib.exceptions.Conflict: # don't care if it's already assigned pass LOG.info('Roles assigned') @@ -294,7 +294,7 @@ def create_network_resources(network_admin_client, networks_admin_client, enable_dhcp=True, ip_version=4) break - except tempest_lib.exceptions.BadRequest as e: + except tempest.lib.exceptions.BadRequest as e: if 'overlaps with another subnet' not in str(e): raise else: diff --git a/tempest/cmd/javelin.py b/tempest/cmd/javelin.py index e26a0147d3..e474d86091 100755 --- a/tempest/cmd/javelin.py +++ b/tempest/cmd/javelin.py @@ -115,19 +115,19 @@ import netaddr from oslo_log import log as logging from oslo_utils import timeutils import six -from tempest_lib import auth -from tempest_lib import exceptions as lib_exc -from tempest_lib.services.compute import flavors_client -from tempest_lib.services.compute import floating_ips_client -from tempest_lib.services.compute import security_group_rules_client -from tempest_lib.services.compute import security_groups_client -from tempest_lib.services.compute import servers_client -from tempest_lib.services.network import subnets_client import yaml from tempest.common import identity from tempest.common import waiters from tempest import config +from tempest.lib import auth +from tempest.lib import exceptions as lib_exc +from tempest.lib.services.compute import flavors_client +from tempest.lib.services.compute import floating_ips_client +from tempest.lib.services.compute import security_group_rules_client +from tempest.lib.services.compute import security_groups_client +from tempest.lib.services.compute import servers_client +from tempest.lib.services.network import subnets_client from tempest.services.identity.v2.json import identity_client from tempest.services.identity.v2.json import roles_client from tempest.services.identity.v2.json import tenants_client diff --git a/tempest/common/compute.py b/tempest/common/compute.py index 73505e6fdf..b14012efa3 100644 --- a/tempest/common/compute.py +++ b/tempest/common/compute.py @@ -15,12 +15,12 @@ from oslo_log import log as logging from oslo_utils import excutils -from tempest_lib.common.utils import data_utils from tempest.common import fixed_network from tempest.common import service_client from tempest.common import waiters from tempest import config +from tempest.lib.common.utils import data_utils CONF = config.CONF diff --git a/tempest/common/cred_client.py b/tempest/common/cred_client.py index 494bcee90f..edc51ca446 100644 --- a/tempest/common/cred_client.py +++ b/tempest/common/cred_client.py @@ -14,9 +14,9 @@ import abc from oslo_log import log as logging import six -from tempest_lib import auth -from tempest_lib import exceptions as lib_exc +from tempest.lib import auth +from tempest.lib import exceptions as lib_exc from tempest.services.identity.v2.json import identity_client as v2_identity LOG = logging.getLogger(__name__) diff --git a/tempest/common/cred_provider.py b/tempest/common/cred_provider.py index 9dd89ea348..a4b2ae8ff6 100644 --- a/tempest/common/cred_provider.py +++ b/tempest/common/cred_provider.py @@ -15,9 +15,9 @@ import abc import six -from tempest_lib import auth from tempest import exceptions +from tempest.lib import auth @six.add_metaclass(abc.ABCMeta) diff --git a/tempest/common/credentials_factory.py b/tempest/common/credentials_factory.py index 24c1198a16..0ca14a9b67 100644 --- a/tempest/common/credentials_factory.py +++ b/tempest/common/credentials_factory.py @@ -12,7 +12,6 @@ # limitations under the License. from oslo_concurrency import lockutils -from tempest_lib import auth from tempest import clients from tempest.common import cred_provider @@ -20,6 +19,7 @@ from tempest.common import dynamic_creds from tempest.common import preprov_creds from tempest import config from tempest import exceptions +from tempest.lib import auth CONF = config.CONF diff --git a/tempest/common/dynamic_creds.py b/tempest/common/dynamic_creds.py index a758a320c9..a254211010 100644 --- a/tempest/common/dynamic_creds.py +++ b/tempest/common/dynamic_creds.py @@ -15,7 +15,6 @@ import netaddr from oslo_log import log as logging import six -from tempest_lib import exceptions as lib_exc from tempest import clients from tempest.common import cred_client @@ -23,6 +22,7 @@ from tempest.common import cred_provider from tempest.common.utils import data_utils from tempest import config from tempest import exceptions +from tempest.lib import exceptions as lib_exc CONF = config.CONF LOG = logging.getLogger(__name__) diff --git a/tempest/common/fixed_network.py b/tempest/common/fixed_network.py index 3fc13657c4..5f0685ee99 100644 --- a/tempest/common/fixed_network.py +++ b/tempest/common/fixed_network.py @@ -13,9 +13,8 @@ import copy from oslo_log import log as logging -from tempest_lib.common.utils import misc as misc_utils - from tempest import exceptions +from tempest.lib.common.utils import misc as misc_utils LOG = logging.getLogger(__name__) diff --git a/tempest/common/identity.py b/tempest/common/identity.py index 2179363558..469defed35 100644 --- a/tempest/common/identity.py +++ b/tempest/common/identity.py @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc +from tempest.lib import exceptions as lib_exc def get_tenant_by_name(client, tenant_name): diff --git a/tempest/common/preprov_creds.py b/tempest/common/preprov_creds.py index 34af31e7c1..97cc2ec4b9 100644 --- a/tempest/common/preprov_creds.py +++ b/tempest/common/preprov_creds.py @@ -18,14 +18,14 @@ import os from oslo_concurrency import lockutils from oslo_log import log as logging import six -from tempest_lib import auth -from tempest_lib import exceptions as lib_exc import yaml from tempest import clients from tempest.common import cred_provider from tempest.common import fixed_network from tempest import exceptions +from tempest.lib import auth +from tempest.lib import exceptions as lib_exc LOG = logging.getLogger(__name__) diff --git a/tempest/common/service_client.py b/tempest/common/service_client.py index b3a5a093a6..14a3bd631b 100644 --- a/tempest/common/service_client.py +++ b/tempest/common/service_client.py @@ -12,7 +12,7 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib.common import rest_client +from tempest.lib.common import rest_client class ServiceClient(rest_client.RestClient): diff --git a/tempest/common/utils/__init__.py b/tempest/common/utils/__init__.py index aad63736ac..b6565d1f7e 100644 --- a/tempest/common/utils/__init__.py +++ b/tempest/common/utils/__init__.py @@ -15,8 +15,7 @@ from functools import partial from tempest import config - -from tempest_lib.common.utils import data_utils as lib_data_utils +from tempest.lib.common.utils import data_utils as lib_data_utils CONF = config.CONF diff --git a/tempest/common/utils/linux/remote_client.py b/tempest/common/utils/linux/remote_client.py index 8f5faef21c..cfd9df6d95 100644 --- a/tempest/common/utils/linux/remote_client.py +++ b/tempest/common/utils/linux/remote_client.py @@ -15,11 +15,11 @@ import re import time from oslo_log import log as logging -from tempest_lib.common import ssh -import tempest_lib.exceptions from tempest import config from tempest import exceptions +from tempest.lib.common import ssh +import tempest.lib.exceptions CONF = config.CONF @@ -181,7 +181,7 @@ class RemoteClient(object): cmd_mkfs = 'sudo /usr/sbin/mke2fs -t %s /dev/%s' % (fs, dev_name) try: self.exec_command(cmd_mkfs) - except tempest_lib.exceptions.SSHExecCommandFailed: + except tempest.lib.exceptions.SSHExecCommandFailed: LOG.error("Couldn't mke2fs") cmd_why = 'sudo ls -lR /dev' LOG.info("Contents of /dev: %s" % self.exec_command(cmd_why)) diff --git a/tempest/common/validation_resources.py b/tempest/common/validation_resources.py index 9457a6082b..84d014349b 100644 --- a/tempest/common/validation_resources.py +++ b/tempest/common/validation_resources.py @@ -14,9 +14,9 @@ from oslo_log import log as logging from tempest import config -from tempest_lib import exceptions as lib_exc from tempest.common.utils import data_utils +from tempest.lib import exceptions as lib_exc CONF = config.CONF LOG = logging.getLogger(__name__) diff --git a/tempest/common/waiters.py b/tempest/common/waiters.py index 867d3f6057..95305f3cbe 100644 --- a/tempest/common/waiters.py +++ b/tempest/common/waiters.py @@ -14,11 +14,11 @@ import time from oslo_log import log as logging -from tempest_lib.common.utils import misc as misc_utils -from tempest_lib import exceptions as lib_exc from tempest import config from tempest import exceptions +from tempest.lib.common.utils import misc as misc_utils +from tempest.lib import exceptions as lib_exc CONF = config.CONF LOG = logging.getLogger(__name__) diff --git a/tempest/manager.py b/tempest/manager.py index 6e86c78e1c..c97e0d1e62 100644 --- a/tempest/manager.py +++ b/tempest/manager.py @@ -13,11 +13,10 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import auth - from tempest.common import cred_provider from tempest import config from tempest import exceptions +from tempest.lib import auth CONF = config.CONF diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py index a996ffe02d..eb29176ec7 100644 --- a/tempest/scenario/manager.py +++ b/tempest/scenario/manager.py @@ -20,8 +20,6 @@ import netaddr from oslo_log import log from oslo_serialization import jsonutils as json import six -from tempest_lib.common.utils import misc as misc_utils -from tempest_lib import exceptions as lib_exc from tempest.common import compute from tempest.common.utils import data_utils @@ -29,6 +27,8 @@ from tempest.common.utils.linux import remote_client from tempest.common import waiters from tempest import config from tempest import exceptions +from tempest.lib.common.utils import misc as misc_utils +from tempest.lib import exceptions as lib_exc from tempest.services.network import resources as net_resources import tempest.test diff --git a/tempest/scenario/test_large_ops.py b/tempest/scenario/test_large_ops.py index 402077f3a2..9ed831cf20 100644 --- a/tempest/scenario/test_large_ops.py +++ b/tempest/scenario/test_large_ops.py @@ -13,12 +13,11 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions as lib_exc - from tempest.common import fixed_network from tempest.common.utils import data_utils from tempest.common import waiters from tempest import config +from tempest.lib import exceptions as lib_exc from tempest.scenario import manager from tempest import test diff --git a/tempest/scenario/test_stamp_pattern.py b/tempest/scenario/test_stamp_pattern.py index 1d09fe773a..6121a90b8f 100644 --- a/tempest/scenario/test_stamp_pattern.py +++ b/tempest/scenario/test_stamp_pattern.py @@ -16,13 +16,13 @@ import time from oslo_log import log as logging -from tempest_lib import decorators -from tempest_lib import exceptions as lib_exc import testtools from tempest.common.utils import data_utils from tempest import config from tempest import exceptions +from tempest.lib import decorators +from tempest.lib import exceptions as lib_exc from tempest.scenario import manager from tempest import test diff --git a/tempest/scenario/utils.py b/tempest/scenario/utils.py index 3cbb3bc116..75fd000368 100644 --- a/tempest/scenario/utils.py +++ b/tempest/scenario/utils.py @@ -18,14 +18,14 @@ import string import unicodedata from oslo_serialization import jsonutils as json -from tempest_lib.common.utils import misc -from tempest_lib import exceptions as exc_lib import testscenarios import testtools from tempest import clients from tempest.common import credentials_factory as credentials from tempest import config +from tempest.lib.common.utils import misc +from tempest.lib import exceptions as exc_lib CONF = config.CONF diff --git a/tempest/services/compute/json/base_compute_client.py b/tempest/services/compute/json/base_compute_client.py index 5ea289cd2f..8cfde4b34e 100644 --- a/tempest/services/compute/json/base_compute_client.py +++ b/tempest/services/compute/json/base_compute_client.py @@ -11,7 +11,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. -from tempest_lib.common import rest_client +from tempest.lib.common import rest_client from tempest.common import api_version_request from tempest.common import api_version_utils diff --git a/tempest/services/image/v1/json/images_client.py b/tempest/services/image/v1/json/images_client.py index af2e68ca75..b581203fdd 100644 --- a/tempest/services/image/v1/json/images_client.py +++ b/tempest/services/image/v1/json/images_client.py @@ -22,12 +22,12 @@ from oslo_log import log as logging from oslo_serialization import jsonutils as json import six from six.moves.urllib import parse as urllib -from tempest_lib.common.utils import misc as misc_utils -from tempest_lib import exceptions as lib_exc from tempest.common import glance_http from tempest.common import service_client from tempest import exceptions +from tempest.lib.common.utils import misc as misc_utils +from tempest.lib import exceptions as lib_exc LOG = logging.getLogger(__name__) diff --git a/tempest/services/image/v2/json/images_client.py b/tempest/services/image/v2/json/images_client.py index 72b203a27b..b4744e45de 100644 --- a/tempest/services/image/v2/json/images_client.py +++ b/tempest/services/image/v2/json/images_client.py @@ -15,10 +15,10 @@ from oslo_serialization import jsonutils as json from six.moves.urllib import parse as urllib -from tempest_lib import exceptions as lib_exc from tempest.common import glance_http from tempest.common import service_client +from tempest.lib import exceptions as lib_exc class ImagesClientV2(service_client.ServiceClient): diff --git a/tempest/services/network/json/network_client.py b/tempest/services/network/json/network_client.py index c6b22df6b3..5106b731e9 100644 --- a/tempest/services/network/json/network_client.py +++ b/tempest/services/network/json/network_client.py @@ -12,10 +12,9 @@ import time -from tempest_lib.common.utils import misc -from tempest_lib import exceptions as lib_exc - from tempest import exceptions +from tempest.lib.common.utils import misc +from tempest.lib import exceptions as lib_exc from tempest.services.network.json import base diff --git a/tempest/services/orchestration/json/orchestration_client.py b/tempest/services/orchestration/json/orchestration_client.py index 22e53f595e..c0f530917f 100644 --- a/tempest/services/orchestration/json/orchestration_client.py +++ b/tempest/services/orchestration/json/orchestration_client.py @@ -18,10 +18,10 @@ import time from oslo_serialization import jsonutils as json from six.moves.urllib import parse as urllib -from tempest_lib import exceptions as lib_exc from tempest.common import service_client from tempest import exceptions +from tempest.lib import exceptions as lib_exc class OrchestrationClient(service_client.ServiceClient): diff --git a/tempest/services/volume/base/admin/base_types_client.py b/tempest/services/volume/base/admin/base_types_client.py index 867273e639..f117f0a57e 100644 --- a/tempest/services/volume/base/admin/base_types_client.py +++ b/tempest/services/volume/base/admin/base_types_client.py @@ -15,9 +15,9 @@ from oslo_serialization import jsonutils as json from six.moves.urllib import parse as urllib -from tempest_lib import exceptions as lib_exc from tempest.common import service_client +from tempest.lib import exceptions as lib_exc class BaseTypesClient(service_client.ServiceClient): diff --git a/tempest/services/volume/base/base_backups_client.py b/tempest/services/volume/base/base_backups_client.py index fc9a40a306..d6f2a50fc5 100644 --- a/tempest/services/volume/base/base_backups_client.py +++ b/tempest/services/volume/base/base_backups_client.py @@ -16,10 +16,10 @@ import time from oslo_serialization import jsonutils as json -from tempest_lib import exceptions as lib_exc from tempest.common import service_client from tempest import exceptions +from tempest.lib import exceptions as lib_exc class BaseBackupsClient(service_client.ServiceClient): diff --git a/tempest/services/volume/base/base_qos_client.py b/tempest/services/volume/base/base_qos_client.py index 697e902311..f68f9aa417 100644 --- a/tempest/services/volume/base/base_qos_client.py +++ b/tempest/services/volume/base/base_qos_client.py @@ -15,10 +15,10 @@ import time from oslo_serialization import jsonutils as json -from tempest_lib import exceptions as lib_exc from tempest.common import service_client from tempest import exceptions +from tempest.lib import exceptions as lib_exc class BaseQosSpecsClient(service_client.ServiceClient): diff --git a/tempest/services/volume/base/base_snapshots_client.py b/tempest/services/volume/base/base_snapshots_client.py index 1388e9c099..ed2a64204a 100644 --- a/tempest/services/volume/base/base_snapshots_client.py +++ b/tempest/services/volume/base/base_snapshots_client.py @@ -15,10 +15,10 @@ import time from oslo_log import log as logging from oslo_serialization import jsonutils as json from six.moves.urllib import parse as urllib -from tempest_lib import exceptions as lib_exc from tempest.common import service_client from tempest import exceptions +from tempest.lib import exceptions as lib_exc LOG = logging.getLogger(__name__) diff --git a/tempest/services/volume/base/base_volumes_client.py b/tempest/services/volume/base/base_volumes_client.py index d4435bc49f..5c0c7f7a97 100644 --- a/tempest/services/volume/base/base_volumes_client.py +++ b/tempest/services/volume/base/base_volumes_client.py @@ -16,10 +16,10 @@ from oslo_serialization import jsonutils as json import six from six.moves.urllib import parse as urllib -from tempest_lib import exceptions as lib_exc from tempest.common import service_client from tempest.common import waiters +from tempest.lib import exceptions as lib_exc class BaseVolumesClient(service_client.ServiceClient): diff --git a/tempest/stress/driver.py b/tempest/stress/driver.py index 2ebb11d95e..468578d787 100644 --- a/tempest/stress/driver.py +++ b/tempest/stress/driver.py @@ -21,7 +21,6 @@ from oslo_log import log as logging from oslo_utils import importutils import six from six import moves -from tempest_lib.common import ssh from tempest import clients @@ -30,6 +29,7 @@ from tempest.common import credentials_factory as credentials from tempest.common.utils import data_utils from tempest import config from tempest import exceptions +from tempest.lib.common import ssh from tempest.stress import cleanup CONF = config.CONF diff --git a/tempest/test.py b/tempest/test.py index a93903e7e5..45b818f54a 100644 --- a/tempest/test.py +++ b/tempest/test.py @@ -27,7 +27,6 @@ from oslo_serialization import jsonutils as json from oslo_utils import importutils import six from six.moves import urllib -from tempest_lib import decorators import testscenarios import testtools @@ -39,6 +38,7 @@ import tempest.common.generator.valid_generator as valid import tempest.common.validation_resources as vresources from tempest import config from tempest import exceptions +from tempest.lib import decorators LOG = logging.getLogger(__name__) diff --git a/tempest/test_discover/plugins.py b/tempest/test_discover/plugins.py index 108b50df81..d604b286b5 100644 --- a/tempest/test_discover/plugins.py +++ b/tempest/test_discover/plugins.py @@ -17,8 +17,8 @@ import logging import six import stevedore -from tempest_lib.common.utils import misc +from tempest.lib.common.utils import misc LOG = logging.getLogger(__name__) diff --git a/tempest/tests/cmd/test_javelin.py b/tempest/tests/cmd/test_javelin.py index ab6a7a02ad..3380f84171 100644 --- a/tempest/tests/cmd/test_javelin.py +++ b/tempest/tests/cmd/test_javelin.py @@ -14,9 +14,9 @@ import mock from oslotest import mockpatch -from tempest_lib import exceptions as lib_exc from tempest.cmd import javelin +from tempest.lib import exceptions as lib_exc from tempest.tests import base diff --git a/tempest/tests/common/test_configured_creds.py b/tempest/tests/common/test_configured_creds.py index 96b75fdf5f..be24595680 100644 --- a/tempest/tests/common/test_configured_creds.py +++ b/tempest/tests/common/test_configured_creds.py @@ -13,14 +13,14 @@ # under the License. from oslo_config import cfg -from tempest_lib import auth -from tempest_lib import exceptions as lib_exc -from tempest_lib.services.identity.v2 import token_client as v2_client -from tempest_lib.services.identity.v3 import token_client as v3_client from tempest.common import credentials_factory as common_creds from tempest.common import tempest_fixtures as fixtures from tempest import config +from tempest.lib import auth +from tempest.lib import exceptions as lib_exc +from tempest.lib.services.identity.v2 import token_client as v2_client +from tempest.lib.services.identity.v3 import token_client as v3_client from tempest.tests import base from tempest.tests import fake_config from tempest.tests import fake_identity diff --git a/tempest/tests/common/test_dynamic_creds.py b/tempest/tests/common/test_dynamic_creds.py index 7a21d963bf..059269e711 100644 --- a/tempest/tests/common/test_dynamic_creds.py +++ b/tempest/tests/common/test_dynamic_creds.py @@ -15,13 +15,13 @@ import mock from oslo_config import cfg from oslotest import mockpatch -from tempest_lib.services.identity.v2 import token_client as json_token_client from tempest.common import credentials_factory as credentials from tempest.common import dynamic_creds from tempest.common import service_client from tempest import config from tempest import exceptions +from tempest.lib.services.identity.v2 import token_client as json_token_client from tempest.services.identity.v2.json import identity_client as \ json_iden_client from tempest.services.identity.v2.json import roles_client as \ @@ -159,7 +159,7 @@ class TestDynamicCredentialProvider(base.TestCase): return_value={'router': {'id': id, 'name': name}})) return router_fix - @mock.patch('tempest_lib.common.rest_client.RestClient') + @mock.patch('tempest.lib.common.rest_client.RestClient') def test_primary_creds(self, MockRestClient): cfg.CONF.set_default('neutron', False, 'service_available') creds = dynamic_creds.DynamicCredentialProvider(**self.fixed_params) @@ -174,7 +174,7 @@ class TestDynamicCredentialProvider(base.TestCase): self.assertEqual(primary_creds.tenant_id, '1234') self.assertEqual(primary_creds.user_id, '1234') - @mock.patch('tempest_lib.common.rest_client.RestClient') + @mock.patch('tempest.lib.common.rest_client.RestClient') def test_admin_creds(self, MockRestClient): cfg.CONF.set_default('neutron', False, 'service_available') creds = dynamic_creds.DynamicCredentialProvider(**self.fixed_params) @@ -197,7 +197,7 @@ class TestDynamicCredentialProvider(base.TestCase): self.assertEqual(admin_creds.tenant_id, '1234') self.assertEqual(admin_creds.user_id, '1234') - @mock.patch('tempest_lib.common.rest_client.RestClient') + @mock.patch('tempest.lib.common.rest_client.RestClient') def test_role_creds(self, MockRestClient): cfg.CONF.set_default('neutron', False, 'service_available') creds = dynamic_creds.DynamicCredentialProvider(**self.fixed_params) @@ -226,7 +226,7 @@ class TestDynamicCredentialProvider(base.TestCase): self.assertEqual(role_creds.tenant_id, '1234') self.assertEqual(role_creds.user_id, '1234') - @mock.patch('tempest_lib.common.rest_client.RestClient') + @mock.patch('tempest.lib.common.rest_client.RestClient') def test_all_cred_cleanup(self, MockRestClient): cfg.CONF.set_default('neutron', False, 'service_available') creds = dynamic_creds.DynamicCredentialProvider(**self.fixed_params) @@ -266,7 +266,7 @@ class TestDynamicCredentialProvider(base.TestCase): self.assertIn('12345', args) self.assertIn('123456', args) - @mock.patch('tempest_lib.common.rest_client.RestClient') + @mock.patch('tempest.lib.common.rest_client.RestClient') def test_alt_creds(self, MockRestClient): cfg.CONF.set_default('neutron', False, 'service_available') creds = dynamic_creds.DynamicCredentialProvider(**self.fixed_params) @@ -281,7 +281,7 @@ class TestDynamicCredentialProvider(base.TestCase): self.assertEqual(alt_creds.tenant_id, '1234') self.assertEqual(alt_creds.user_id, '1234') - @mock.patch('tempest_lib.common.rest_client.RestClient') + @mock.patch('tempest.lib.common.rest_client.RestClient') def test_no_network_creation_with_config_set(self, MockRestClient): cfg.CONF.set_default('create_isolated_networks', False, group='auth') creds = dynamic_creds.DynamicCredentialProvider(**self.fixed_params) @@ -310,7 +310,7 @@ class TestDynamicCredentialProvider(base.TestCase): self.assertIsNone(subnet) self.assertIsNone(router) - @mock.patch('tempest_lib.common.rest_client.RestClient') + @mock.patch('tempest.lib.common.rest_client.RestClient') def test_network_creation(self, MockRestClient): creds = dynamic_creds.DynamicCredentialProvider(**self.fixed_params) self._mock_assign_user_role() @@ -335,7 +335,7 @@ class TestDynamicCredentialProvider(base.TestCase): self.assertEqual(router['id'], '1234') self.assertEqual(router['name'], 'fake_router') - @mock.patch('tempest_lib.common.rest_client.RestClient') + @mock.patch('tempest.lib.common.rest_client.RestClient') def test_network_cleanup(self, MockRestClient): def side_effect(**args): return {"security_groups": [{"tenant_id": args['tenant_id'], @@ -406,7 +406,7 @@ class TestDynamicCredentialProvider(base.TestCase): return_values = (fake_http.fake_httplib({}, status=204), {}) remove_secgroup_mock = self.patch( - 'tempest_lib.services.network.security_groups_client.' + 'tempest.lib.services.network.security_groups_client.' 'SecurityGroupsClient.delete', return_value=return_values) creds.clear_creds() # Verify default security group delete @@ -450,7 +450,7 @@ class TestDynamicCredentialProvider(base.TestCase): self.assertIn('12345', args) self.assertIn('123456', args) - @mock.patch('tempest_lib.common.rest_client.RestClient') + @mock.patch('tempest.lib.common.rest_client.RestClient') def test_network_alt_creation(self, MockRestClient): creds = dynamic_creds.DynamicCredentialProvider(**self.fixed_params) self._mock_assign_user_role() @@ -475,7 +475,7 @@ class TestDynamicCredentialProvider(base.TestCase): self.assertEqual(router['id'], '1234') self.assertEqual(router['name'], 'fake_alt_router') - @mock.patch('tempest_lib.common.rest_client.RestClient') + @mock.patch('tempest.lib.common.rest_client.RestClient') def test_network_admin_creation(self, MockRestClient): creds = dynamic_creds.DynamicCredentialProvider(**self.fixed_params) self._mock_assign_user_role() @@ -500,7 +500,7 @@ class TestDynamicCredentialProvider(base.TestCase): self.assertEqual(router['id'], '1234') self.assertEqual(router['name'], 'fake_admin_router') - @mock.patch('tempest_lib.common.rest_client.RestClient') + @mock.patch('tempest.lib.common.rest_client.RestClient') def test_no_network_resources(self, MockRestClient): net_dict = { 'network': False, @@ -536,7 +536,7 @@ class TestDynamicCredentialProvider(base.TestCase): self.assertIsNone(subnet) self.assertIsNone(router) - @mock.patch('tempest_lib.common.rest_client.RestClient') + @mock.patch('tempest.lib.common.rest_client.RestClient') def test_router_without_network(self, MockRestClient): net_dict = { 'network': False, @@ -554,7 +554,7 @@ class TestDynamicCredentialProvider(base.TestCase): self.assertRaises(exceptions.InvalidConfiguration, creds.get_primary_creds) - @mock.patch('tempest_lib.common.rest_client.RestClient') + @mock.patch('tempest.lib.common.rest_client.RestClient') def test_subnet_without_network(self, MockRestClient): net_dict = { 'network': False, @@ -572,7 +572,7 @@ class TestDynamicCredentialProvider(base.TestCase): self.assertRaises(exceptions.InvalidConfiguration, creds.get_primary_creds) - @mock.patch('tempest_lib.common.rest_client.RestClient') + @mock.patch('tempest.lib.common.rest_client.RestClient') def test_dhcp_without_subnet(self, MockRestClient): net_dict = { 'network': False, diff --git a/tempest/tests/common/test_preprov_creds.py b/tempest/tests/common/test_preprov_creds.py index fd7df16ce7..7188e5fe43 100644 --- a/tempest/tests/common/test_preprov_creds.py +++ b/tempest/tests/common/test_preprov_creds.py @@ -21,13 +21,13 @@ from oslo_config import cfg from oslotest import mockpatch import shutil import six -from tempest_lib import auth -from tempest_lib import exceptions as lib_exc -from tempest_lib.services.identity.v2 import token_client from tempest.common import cred_provider from tempest.common import preprov_creds from tempest import config +from tempest.lib import auth +from tempest.lib import exceptions as lib_exc +from tempest.lib.services.identity.v2 import token_client from tempest.tests import base from tempest.tests import fake_config from tempest.tests import fake_http @@ -319,7 +319,7 @@ class TestPreProvisionedCredentials(base.TestCase): return_value=test_accounts)) test_accounts_class = preprov_creds.PreProvisionedCredentialProvider( **self.fixed_params) - with mock.patch('tempest_lib.services.compute.networks_client.' + with mock.patch('tempest.lib.services.compute.networks_client.' 'NetworksClient.list_networks', return_value={'networks': [{'name': 'network-2', 'id': 'fake-id', diff --git a/tempest/tests/common/test_service_clients.py b/tempest/tests/common/test_service_clients.py index 5a00a2bc8e..7e9ff9dbc6 100644 --- a/tempest/tests/common/test_service_clients.py +++ b/tempest/tests/common/test_service_clients.py @@ -78,7 +78,7 @@ from tempest.tests import base class TestServiceClient(base.TestCase): - @mock.patch('tempest_lib.common.rest_client.RestClient.__init__') + @mock.patch('tempest.lib.common.rest_client.RestClient.__init__') def test_service_client_creations_with_specified_args(self, mock_init): test_clients = [ baremetal_client.BaremetalClient, diff --git a/tempest/tests/services/compute/test_base_compute_client.py b/tempest/tests/services/compute/test_base_compute_client.py index 672ae33fbc..1a782471ba 100644 --- a/tempest/tests/services/compute/test_base_compute_client.py +++ b/tempest/tests/services/compute/test_base_compute_client.py @@ -15,10 +15,10 @@ import httplib2 import mock from oslotest import mockpatch -from tempest_lib.common import rest_client from tempest.api.compute import api_microversion_fixture from tempest import exceptions +from tempest.lib.common import rest_client from tempest.services.compute.json import base_compute_client from tempest.tests import fake_auth_provider from tempest.tests.services.compute import base diff --git a/tempest/tests/services/compute/test_keypairs_client.py b/tempest/tests/services/compute/test_keypairs_client.py index 03aee53244..e8f828014b 100644 --- a/tempest/tests/services/compute/test_keypairs_client.py +++ b/tempest/tests/services/compute/test_keypairs_client.py @@ -14,9 +14,8 @@ import copy -from tempest_lib.tests import fake_auth_provider - from tempest.services.compute.json import keypairs_client +from tempest.tests.lib import fake_auth_provider from tempest.tests.services.compute import base @@ -38,7 +37,7 @@ class TestKeyPairsClient(base.BaseComputeServiceTest): def _test_list_keypairs(self, bytes_body=False): self.check_service_client_function( self.client.list_keypairs, - 'tempest_lib.common.rest_client.RestClient.get', + 'tempest.lib.common.rest_client.RestClient.get', {"keypairs": []}, bytes_body) @@ -60,7 +59,7 @@ class TestKeyPairsClient(base.BaseComputeServiceTest): self.check_service_client_function( self.client.show_keypair, - 'tempest_lib.common.rest_client.RestClient.get', + 'tempest.lib.common.rest_client.RestClient.get', fake_keypair, bytes_body, keypair_name="test") @@ -77,7 +76,7 @@ class TestKeyPairsClient(base.BaseComputeServiceTest): self.check_service_client_function( self.client.create_keypair, - 'tempest_lib.common.rest_client.RestClient.post', + 'tempest.lib.common.rest_client.RestClient.post', fake_keypair, bytes_body, name="test") @@ -91,5 +90,5 @@ class TestKeyPairsClient(base.BaseComputeServiceTest): def test_delete_keypair(self): self.check_service_client_function( self.client.delete_keypair, - 'tempest_lib.common.rest_client.RestClient.delete', + 'tempest.lib.common.rest_client.RestClient.delete', {}, status=202, keypair_name='test') diff --git a/tempest/tests/stress/test_stress.py b/tempest/tests/stress/test_stress.py index 0ec2a5d59b..dfe029163f 100644 --- a/tempest/tests/stress/test_stress.py +++ b/tempest/tests/stress/test_stress.py @@ -16,9 +16,8 @@ import shlex import subprocess -from tempest_lib import exceptions - from oslo_log import log as logging +from tempest.lib import exceptions from tempest.tests import base LOG = logging.getLogger(__name__) diff --git a/tools/use_tempest_lib.sh b/tools/use_tempest_lib.sh deleted file mode 100755 index ca62c4ae25..0000000000 --- a/tools/use_tempest_lib.sh +++ /dev/null @@ -1,141 +0,0 @@ -#!/bin/bash -# -# Use this script to use interfaces/files from tempest-lib. -# Many files have been migrated to tempest-lib and tempest has -# its own copy too. -# This script helps to remove those from tempest and make use of tempest-lib. -# It adds the change-id of each file on which they were migrated in lib. -# This should only be done for files which were migrated to lib with -# "Migrated" in commit message as done by tempest-lib/tools/migrate_from_tempest.sh script. -# "Migrated" keyword is used to fetch the migration commit history from lib. -# To use: -# 1. Create a new branch in the tempest repo so not to destroy your current -# working branch -# 2. Run the script from the repo dir and specify the file paths relative to -# the root tempest dir(only code and unit tests): -# -# tools/use_tempest_lib.sh.sh tempest/file1.py tempest/file2.py - - -function usage { - echo "Usage: $0 [OPTION] file1 file2 .." - echo "Use files from tempest-lib" - echo -e "Input files should be tempest files with path. \n Example- tempest/file1.py tempest/file2.py .." - echo "" - echo "-s, --service_client Specify if files are service clients." - echo "-u, --tempest_lib_git_url Specify the repo to clone tempest-lib from." -} - -function check_all_files_valid { - failed=0 - for file in $files; do - # Get the latest change-id for each file - latest_commit_id=`git log -n1 -- $file | grep "^commit" | awk '{print $2}'` - cd $tmpdir - filename=`basename $file` - lib_path=`find ./ -name $filename` - if [ -z $lib_path ]; then - echo "ERROR: $filename does not exist in tempest-lib." - failed=$(( failed + 1)) - cd - > /dev/null - continue - fi - # Get the CHANGE_ID of tempest-lib patch where file was migrated - migration_change_id=`git log -n1 --grep "Migrated" -- $lib_path | grep "Change-Id: " | awk '{print $2}'` - MIGRATION_IDS=`echo -e "$MIGRATION_IDS\n * $filename: $migration_change_id"` - # Get tempest CHANGE_ID of file which was migrated to lib - migrated_change_id=`git log -n1 --grep "Migrated" -- $lib_path | grep "* $filename"` - migrated_change_id=${migrated_change_id#*:} - cd - > /dev/null - # Get the commit-id of tempest which was migrated to tempest-lib - migrated_commit_id=`git log --grep "$migrated_change_id" -- $file | grep "^commit" | awk '{print $2}'` - DIFF=$(git diff $latest_commit_id $migrated_commit_id $file) - if [ "$DIFF" != "" ]; then - echo "ERROR: $filename in tempest has been updated after migration to tempest-lib. First sync the file to tempest-lib." - failed=$(( failed + 1)) - fi - done - if [[ $failed -gt 0 ]]; then - echo "$failed files had issues" - exit $failed - fi -} - -set -e - -service_client=0 -file_list='' - -while [ $# -gt 0 ]; do - case "$1" in - -h|--help) usage; exit;; - -u|--tempest_lib_git_url) tempest_lib_git_url="$2"; shift;; - -s|--service_client) service_client=1;; - *) files="$files $1";; - esac - shift -done - -if [ -z "$files" ]; then - usage; exit -fi - -TEMPEST_LIB_GIT_URL=${tempest_lib_git_url:-git://git.openstack.org/openstack/tempest-lib} - -tmpdir=$(mktemp -d -t use-tempest-lib.XXXX) - -# Clone tempest-lib -git clone $TEMPEST_LIB_GIT_URL $tmpdir - -# Checks all provided files are present in lib and -# not updated in tempest after migration to lib. -check_all_files_valid - -for file in $files; do - rm -f $file - tempest_dir=`pwd` - tempest_dir="$tempest_dir/tempest/" - tempest_dirname=`dirname $file` - lib_dirname=`echo $tempest_dirname | sed s@tempest\/@tempest_lib/\@` - # Convert tempest dirname to import string - tempest_import="${tempest_dirname//\//.}" - tempest_import=${tempest_import:2:${#tempest_import}} - if [ $service_client -eq 1 ]; then - # Remove /json path because tempest-lib supports JSON only without XML - lib_dirname=`echo $lib_dirname | sed s@\/json@@` - fi - # Convert tempest-lib dirname to import string - tempest_lib_import="${lib_dirname//\//.}" - tempest_lib_import=${tempest_lib_import:2:${#tempest_lib_import}} - module_name=`basename $file .py` - tempest_import1="from $tempest_import.$module_name" - tempest_lib_import1="from $tempest_lib_import.$module_name" - tempest_import2="from $tempest_import import $module_name" - tempest_lib_import2="from $tempest_lib_import import $module_name" - set +e - grep -rl "$tempest_import1" $tempest_dir | xargs sed -i'' s/"$tempest_import1"/"$tempest_lib_import1"/g 2> /dev/null - grep -rl "$tempest_import2" $tempest_dir | xargs sed -i'' s/"$tempest_import2"/"$tempest_lib_import2"/g 2> /dev/null - set -e - if [[ -z "$file_list" ]]; then - file_list="$module_name" - else - tmp_file_list="$file_list, $module_name" - char_size=`echo $tmp_file_list | wc -c` - if [ $char_size -lt 27 ]; then - file_list="$file_list, $module_name" - fi - fi -done - -rm -rf $tmpdir -echo "Completed. Run pep8 and fix error if any" - -git add -A tempest/ -# Generate a migration commit -commit_message="Use $file_list from tempest-lib" -pre_list=$"The files below have been migrated to tempest-lib\n" -pre_list=`echo -e $pre_list` -post_list=$"Now Tempest-lib provides those as stable interfaces. So Tempest should\nstart using those from lib and remove its own copy." -post_list=`echo -e $post_list` - -git commit -m "$commit_message" -m "$pre_list" -m "$MIGRATION_IDS" -m "$post_list"