From e3210bc880c1cda8a883cb5da05b279cd87aecd4 Mon Sep 17 00:00:00 2001 From: Armando Migliaccio Date: Thu, 25 Feb 2016 12:21:24 -0800 Subject: [PATCH] Switch to using in-tree tempest lib As a result of change db9672e3473cd, tempest_lib is no longer a thing we should be using. Change-Id: I47f368fdce477d7419cc8fc23eb17264df42932d --- .../api/admin/test_extension_driver_port_security_admin.py | 2 +- neutron/tests/api/admin/test_external_network_extension.py | 2 +- neutron/tests/api/admin/test_external_networks_negative.py | 2 +- neutron/tests/api/admin/test_floating_ips_admin_actions.py | 4 ++-- neutron/tests/api/admin/test_l3_agent_scheduler.py | 2 +- neutron/tests/api/admin/test_quotas.py | 2 +- neutron/tests/api/admin/test_routers_dvr.py | 2 +- neutron/tests/api/admin/test_shared_network_extension.py | 4 ++-- neutron/tests/api/base.py | 4 ++-- neutron/tests/api/base_security_groups.py | 2 +- neutron/tests/api/test_address_scopes.py | 4 ++-- neutron/tests/api/test_address_scopes_negative.py | 4 ++-- neutron/tests/api/test_bgp_speaker_extensions.py | 2 +- neutron/tests/api/test_bgp_speaker_extensions_negative.py | 2 +- neutron/tests/api/test_dhcp_ipv6.py | 4 ++-- neutron/tests/api/test_extension_driver_port_security.py | 2 +- neutron/tests/api/test_extra_dhcp_options.py | 2 +- neutron/tests/api/test_flavors_extensions.py | 2 +- neutron/tests/api/test_floating_ips.py | 2 +- neutron/tests/api/test_floating_ips_negative.py | 4 ++-- neutron/tests/api/test_metering_extensions.py | 2 +- neutron/tests/api/test_networks.py | 4 ++-- neutron/tests/api/test_networks_negative.py | 4 ++-- neutron/tests/api/test_ports.py | 2 +- neutron/tests/api/test_qos.py | 4 ++-- neutron/tests/api/test_routers.py | 2 +- neutron/tests/api/test_routers_negative.py | 4 ++-- neutron/tests/api/test_security_groups.py | 2 +- neutron/tests/api/test_security_groups_negative.py | 2 +- neutron/tests/api/test_subnetpools.py | 2 +- neutron/tests/api/test_subnetpools_negative.py | 4 ++-- neutron/tests/retargetable/rest_fixture.py | 2 +- neutron/tests/tempest/README.rst | 6 +++--- neutron/tests/tempest/exceptions.py | 2 +- .../tests/tempest/services/network/json/network_client.py | 2 +- test-requirements.txt | 1 - 36 files changed, 49 insertions(+), 50 deletions(-) diff --git a/neutron/tests/api/admin/test_extension_driver_port_security_admin.py b/neutron/tests/api/admin/test_extension_driver_port_security_admin.py index 5e7ab29343a..db9627f59a9 100644 --- a/neutron/tests/api/admin/test_extension_driver_port_security_admin.py +++ b/neutron/tests/api/admin/test_extension_driver_port_security_admin.py @@ -13,8 +13,8 @@ # License for the specific language governing permissions and limitations # under the License. +from tempest.lib import exceptions as lib_exc from tempest import test -from tempest_lib import exceptions as lib_exc from neutron.tests.api import base from neutron.tests.api import base_security_groups as base_security diff --git a/neutron/tests/api/admin/test_external_network_extension.py b/neutron/tests/api/admin/test_external_network_extension.py index b784bc90c19..8dc236bf298 100644 --- a/neutron/tests/api/admin/test_external_network_extension.py +++ b/neutron/tests/api/admin/test_external_network_extension.py @@ -10,8 +10,8 @@ # License for the specific language governing permissions and limitations # under the License. +from tempest.lib.common.utils import data_utils from tempest import test -from tempest_lib.common.utils import data_utils from neutron.tests.api import base diff --git a/neutron/tests/api/admin/test_external_networks_negative.py b/neutron/tests/api/admin/test_external_networks_negative.py index b7918d5859c..81f9b0e0c69 100644 --- a/neutron/tests/api/admin/test_external_networks_negative.py +++ b/neutron/tests/api/admin/test_external_networks_negative.py @@ -13,8 +13,8 @@ # License for the specific language governing permissions and limitations # under the License. +from tempest.lib import exceptions as lib_exc from tempest import test -from tempest_lib import exceptions as lib_exc from neutron.tests.api import base from neutron.tests.tempest import config diff --git a/neutron/tests/api/admin/test_floating_ips_admin_actions.py b/neutron/tests/api/admin/test_floating_ips_admin_actions.py index e18ca55adeb..533ef3614a1 100644 --- a/neutron/tests/api/admin/test_floating_ips_admin_actions.py +++ b/neutron/tests/api/admin/test_floating_ips_admin_actions.py @@ -13,9 +13,9 @@ # License for the specific language governing permissions and limitations # under the License. +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 import testtools from neutron.tests.api import base diff --git a/neutron/tests/api/admin/test_l3_agent_scheduler.py b/neutron/tests/api/admin/test_l3_agent_scheduler.py index 1ead043fadf..fe5fd44143e 100644 --- a/neutron/tests/api/admin/test_l3_agent_scheduler.py +++ b/neutron/tests/api/admin/test_l3_agent_scheduler.py @@ -12,8 +12,8 @@ # License for the specific language governing permissions and limitations # under the License. +from tempest.lib.common.utils import data_utils from tempest import test -from tempest_lib.common.utils import data_utils from neutron.tests.api import base from neutron.tests.tempest import exceptions diff --git a/neutron/tests/api/admin/test_quotas.py b/neutron/tests/api/admin/test_quotas.py index a17eca070a1..62281a5e1eb 100644 --- a/neutron/tests/api/admin/test_quotas.py +++ b/neutron/tests/api/admin/test_quotas.py @@ -14,8 +14,8 @@ # under the License. import six +from tempest.lib.common.utils import data_utils from tempest import test -from tempest_lib.common.utils import data_utils from neutron.tests.api import base diff --git a/neutron/tests/api/admin/test_routers_dvr.py b/neutron/tests/api/admin/test_routers_dvr.py index 1f03be53000..41d1b33859a 100644 --- a/neutron/tests/api/admin/test_routers_dvr.py +++ b/neutron/tests/api/admin/test_routers_dvr.py @@ -13,8 +13,8 @@ # License for the specific language governing permissions and limitations # under the License. +from tempest.lib.common.utils import data_utils from tempest import test -from tempest_lib.common.utils import data_utils from neutron.tests.api import base_routers as base diff --git a/neutron/tests/api/admin/test_shared_network_extension.py b/neutron/tests/api/admin/test_shared_network_extension.py index 8f107e37f38..999026da0be 100644 --- a/neutron/tests/api/admin/test_shared_network_extension.py +++ b/neutron/tests/api/admin/test_shared_network_extension.py @@ -16,9 +16,9 @@ import uuid +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 import testtools from neutron.tests.api import base diff --git a/neutron/tests/api/base.py b/neutron/tests/api/base.py index 2b80c051310..2bc83306eef 100644 --- a/neutron/tests/api/base.py +++ b/neutron/tests/api/base.py @@ -14,9 +14,9 @@ # under the License. import netaddr +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 from neutron.tests.api import clients from neutron.tests.tempest import config diff --git a/neutron/tests/api/base_security_groups.py b/neutron/tests/api/base_security_groups.py index 37b0aaa853f..c11e353b0a1 100644 --- a/neutron/tests/api/base_security_groups.py +++ b/neutron/tests/api/base_security_groups.py @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib.common.utils import data_utils +from tempest.lib.common.utils import data_utils from neutron.tests.api import base diff --git a/neutron/tests/api/test_address_scopes.py b/neutron/tests/api/test_address_scopes.py index 1b78ca0e399..b138a11b2e8 100644 --- a/neutron/tests/api/test_address_scopes.py +++ b/neutron/tests/api/test_address_scopes.py @@ -12,9 +12,9 @@ # License for the specific language governing permissions and limitations # under the License. +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 from neutron.tests.api import base diff --git a/neutron/tests/api/test_address_scopes_negative.py b/neutron/tests/api/test_address_scopes_negative.py index 677b9c6f375..d2f1f23fbd6 100644 --- a/neutron/tests/api/test_address_scopes_negative.py +++ b/neutron/tests/api/test_address_scopes_negative.py @@ -12,9 +12,9 @@ # License for the specific language governing permissions and limitations # under the License. +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 from neutron.tests.api import test_address_scopes diff --git a/neutron/tests/api/test_bgp_speaker_extensions.py b/neutron/tests/api/test_bgp_speaker_extensions.py index 8851e81127f..ddb47ccbfe2 100644 --- a/neutron/tests/api/test_bgp_speaker_extensions.py +++ b/neutron/tests/api/test_bgp_speaker_extensions.py @@ -13,8 +13,8 @@ # under the License. from tempest import config +from tempest.lib import exceptions as lib_exc from tempest import test -from tempest_lib import exceptions as lib_exc from neutron.tests.api import base from tempest.common import tempest_fixtures as fixtures diff --git a/neutron/tests/api/test_bgp_speaker_extensions_negative.py b/neutron/tests/api/test_bgp_speaker_extensions_negative.py index 1a1c64c4b4b..51968b732c2 100644 --- a/neutron/tests/api/test_bgp_speaker_extensions_negative.py +++ b/neutron/tests/api/test_bgp_speaker_extensions_negative.py @@ -12,7 +12,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 from neutron.tests.api import test_bgp_speaker_extensions as test_base from tempest import test diff --git a/neutron/tests/api/test_dhcp_ipv6.py b/neutron/tests/api/test_dhcp_ipv6.py index 209ef92fd67..3b9f2e4199a 100644 --- a/neutron/tests/api/test_dhcp_ipv6.py +++ b/neutron/tests/api/test_dhcp_ipv6.py @@ -17,9 +17,9 @@ import random import netaddr import six +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 from neutron.common import constants from neutron.tests.api import base diff --git a/neutron/tests/api/test_extension_driver_port_security.py b/neutron/tests/api/test_extension_driver_port_security.py index 4a01403583d..7880fb78a3e 100644 --- a/neutron/tests/api/test_extension_driver_port_security.py +++ b/neutron/tests/api/test_extension_driver_port_security.py @@ -14,8 +14,8 @@ # under the License. import ddt +from tempest.lib import exceptions as lib_exc from tempest import test -from tempest_lib import exceptions as lib_exc from neutron.tests.api import base from neutron.tests.api import base_security_groups as base_security diff --git a/neutron/tests/api/test_extra_dhcp_options.py b/neutron/tests/api/test_extra_dhcp_options.py index 85bd5c6985e..24883ce8827 100644 --- a/neutron/tests/api/test_extra_dhcp_options.py +++ b/neutron/tests/api/test_extra_dhcp_options.py @@ -13,8 +13,8 @@ # License for the specific language governing permissions and limitations # under the License. +from tempest.lib.common.utils import data_utils from tempest import test -from tempest_lib.common.utils import data_utils from neutron.tests.api import base diff --git a/neutron/tests/api/test_flavors_extensions.py b/neutron/tests/api/test_flavors_extensions.py index 92e1c2b4e2e..a5a3d27b24d 100644 --- a/neutron/tests/api/test_flavors_extensions.py +++ b/neutron/tests/api/test_flavors_extensions.py @@ -12,8 +12,8 @@ # License for the specific language governing permissions and limitations # under the License. +from tempest.lib import exceptions as lib_exc from tempest import test -from tempest_lib import exceptions as lib_exc from neutron.tests.api import base diff --git a/neutron/tests/api/test_floating_ips.py b/neutron/tests/api/test_floating_ips.py index a7f89e7d24c..8ee8b31df36 100644 --- a/neutron/tests/api/test_floating_ips.py +++ b/neutron/tests/api/test_floating_ips.py @@ -14,8 +14,8 @@ # under the License. import netaddr +from tempest.lib.common.utils import data_utils from tempest import test -from tempest_lib.common.utils import data_utils from neutron.tests.api import base from neutron.tests.tempest import config diff --git a/neutron/tests/api/test_floating_ips_negative.py b/neutron/tests/api/test_floating_ips_negative.py index 692a2bc4679..e66997c76a3 100644 --- a/neutron/tests/api/test_floating_ips_negative.py +++ b/neutron/tests/api/test_floating_ips_negative.py @@ -14,9 +14,9 @@ # License for the specific language governing permissions and limitations # under the License. +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 from neutron.tests.api import base from neutron.tests.tempest import config diff --git a/neutron/tests/api/test_metering_extensions.py b/neutron/tests/api/test_metering_extensions.py index f98bcbeeada..a9ddcc9c2ef 100644 --- a/neutron/tests/api/test_metering_extensions.py +++ b/neutron/tests/api/test_metering_extensions.py @@ -12,8 +12,8 @@ # License for the specific language governing permissions and limitations # under the License. +from tempest.lib.common.utils import data_utils from tempest import test -from tempest_lib.common.utils import data_utils from neutron.tests.api import base diff --git a/neutron/tests/api/test_networks.py b/neutron/tests/api/test_networks.py index b364e21438a..78366065984 100644 --- a/neutron/tests/api/test_networks.py +++ b/neutron/tests/api/test_networks.py @@ -18,9 +18,9 @@ import itertools import netaddr import six from tempest.common import custom_matchers +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 from neutron.tests.api import base from neutron.tests.tempest import config diff --git a/neutron/tests/api/test_networks_negative.py b/neutron/tests/api/test_networks_negative.py index 1e8463c0097..c77d4c34a38 100644 --- a/neutron/tests/api/test_networks_negative.py +++ b/neutron/tests/api/test_networks_negative.py @@ -14,9 +14,9 @@ # License for the specific language governing permissions and limitations # under the License. +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 from neutron.tests.api import base diff --git a/neutron/tests/api/test_ports.py b/neutron/tests/api/test_ports.py index c866ff3edb5..2de3a744953 100644 --- a/neutron/tests/api/test_ports.py +++ b/neutron/tests/api/test_ports.py @@ -17,8 +17,8 @@ import socket import netaddr from tempest.common import custom_matchers +from tempest.lib.common.utils import data_utils from tempest import test -from tempest_lib.common.utils import data_utils from neutron.tests.api import base from neutron.tests.api import base_security_groups as sec_base diff --git a/neutron/tests/api/test_qos.py b/neutron/tests/api/test_qos.py index 27784532a39..81a10d824b4 100644 --- a/neutron/tests/api/test_qos.py +++ b/neutron/tests/api/test_qos.py @@ -12,8 +12,8 @@ # License for the specific language governing permissions and limitations # under the License. +from tempest.lib import exceptions from tempest import test -from tempest_lib import exceptions import testtools from neutron.services.qos import qos_consts @@ -112,7 +112,7 @@ class QosTestJSON(base.BaseAdminNetworkTest): # In theory, we could make the test conditional on which ml2 drivers # are enabled in gate (or more specifically, on which supported qos # rules are claimed by core plugin), but that option doesn't seem to be - # available thru tempest_lib framework + # available thru tempest.lib framework expected_rule_types = [] expected_rule_details = ['type'] diff --git a/neutron/tests/api/test_routers.py b/neutron/tests/api/test_routers.py index ecc575f1c83..514b5b02930 100644 --- a/neutron/tests/api/test_routers.py +++ b/neutron/tests/api/test_routers.py @@ -15,8 +15,8 @@ import netaddr import six +from tempest.lib.common.utils import data_utils from tempest import test -from tempest_lib.common.utils import data_utils from neutron.tests.api import base_routers as base from neutron.tests.tempest import config diff --git a/neutron/tests/api/test_routers_negative.py b/neutron/tests/api/test_routers_negative.py index 4ff0e77179a..1aa79dd40b5 100644 --- a/neutron/tests/api/test_routers_negative.py +++ b/neutron/tests/api/test_routers_negative.py @@ -14,9 +14,9 @@ # under the License. import netaddr +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 import testtools from neutron.tests.api import base_routers as base diff --git a/neutron/tests/api/test_security_groups.py b/neutron/tests/api/test_security_groups.py index 6e22cb17103..73c92432aaa 100644 --- a/neutron/tests/api/test_security_groups.py +++ b/neutron/tests/api/test_security_groups.py @@ -14,8 +14,8 @@ # under the License. import six +from tempest.lib.common.utils import data_utils from tempest import test -from tempest_lib.common.utils import data_utils from neutron.tests.api import base_security_groups as base from neutron.tests.tempest import config diff --git a/neutron/tests/api/test_security_groups_negative.py b/neutron/tests/api/test_security_groups_negative.py index 514b29e5f1d..777de18c8ec 100644 --- a/neutron/tests/api/test_security_groups_negative.py +++ b/neutron/tests/api/test_security_groups_negative.py @@ -15,8 +15,8 @@ import uuid +from tempest.lib import exceptions as lib_exc from tempest import test -from tempest_lib import exceptions as lib_exc from neutron.tests.api import base_security_groups as base from neutron.tests.tempest import config diff --git a/neutron/tests/api/test_subnetpools.py b/neutron/tests/api/test_subnetpools.py index c758897b62d..d2aeadb68b9 100644 --- a/neutron/tests/api/test_subnetpools.py +++ b/neutron/tests/api/test_subnetpools.py @@ -13,8 +13,8 @@ # License for the specific language governing permissions and limitations # under the License. +from tempest.lib.common.utils import data_utils from tempest import test -from tempest_lib.common.utils import data_utils from neutron.tests.api import base diff --git a/neutron/tests/api/test_subnetpools_negative.py b/neutron/tests/api/test_subnetpools_negative.py index c47544138a6..618bd98784a 100644 --- a/neutron/tests/api/test_subnetpools_negative.py +++ b/neutron/tests/api/test_subnetpools_negative.py @@ -16,9 +16,9 @@ import uuid import netaddr +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 from neutron.tests.api import test_subnetpools diff --git a/neutron/tests/retargetable/rest_fixture.py b/neutron/tests/retargetable/rest_fixture.py index 4da913bfb75..4ecf0c1c3e7 100644 --- a/neutron/tests/retargetable/rest_fixture.py +++ b/neutron/tests/retargetable/rest_fixture.py @@ -17,7 +17,7 @@ configuration and Neutron configuration requires that neutron.tests.tempest imports be isolated in this module for now. """ -from tempest_lib import exceptions as tlib_exceptions +from tempest.lib import exceptions as tlib_exceptions from neutron.tests import base from neutron.tests.retargetable import client_fixtures diff --git a/neutron/tests/tempest/README.rst b/neutron/tests/tempest/README.rst index 5b3600a95ad..05ea9989bfb 100644 --- a/neutron/tests/tempest/README.rst +++ b/neutron/tests/tempest/README.rst @@ -2,9 +2,9 @@ WARNING ======= The files under this path were copied from tempest as part of the move -of the api tests, and they will be removed as the required -functionality is transitioned from tempest to tempest-lib. While it -exists, only neutron.tests.api and neutron.tests.retargetable should +of the api tests, and they will be removed as required over time to +minimize the depedency on the tempest testing framework. +While it exists, only neutron.tests.api and neutron.tests.retargetable should be importing files from this path. neutron.tests.tempest.config uses the global cfg.CONF instance and importing it outside of the api tests has the potential to break Neutron's use of cfg.CONF. diff --git a/neutron/tests/tempest/exceptions.py b/neutron/tests/tempest/exceptions.py index bdc3b8d45e5..c9264ca1816 100644 --- a/neutron/tests/tempest/exceptions.py +++ b/neutron/tests/tempest/exceptions.py @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib import exceptions +from tempest.lib import exceptions TempestException = exceptions.TempestException diff --git a/neutron/tests/tempest/services/network/json/network_client.py b/neutron/tests/tempest/services/network/json/network_client.py index 01429ab9757..9f6ad7a058c 100644 --- a/neutron/tests/tempest/services/network/json/network_client.py +++ b/neutron/tests/tempest/services/network/json/network_client.py @@ -15,7 +15,7 @@ import time from oslo_serialization import jsonutils as json from six.moves.urllib import parse as urlparse from tempest.common import service_client -from tempest_lib import exceptions as lib_exc +from tempest.lib import exceptions as lib_exc from neutron.tests.tempest import exceptions diff --git a/test-requirements.txt b/test-requirements.txt index 90cbcb7e0bd..abe6023dc34 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -18,7 +18,6 @@ testscenarios>=0.4 # Apache-2.0/BSD WebTest>=2.0 # MIT oslotest>=1.10.0 # Apache-2.0 os-testr>=0.4.1 # Apache-2.0 -tempest-lib>=0.14.0 # Apache-2.0 ddt>=1.0.1 # MIT pylint==1.4.5 # GNU GPL v2 reno>=0.1.1 # Apache2