From 667d3d32601fe5b0ffc7454f8af4fd4c93aa584f Mon Sep 17 00:00:00 2001 From: Chandan Kumar Date: Fri, 22 Sep 2017 12:24:06 +0530 Subject: [PATCH] Refactored Neutron tempest plugin directory structure * switch from neutron.tests.tempest to neutron_tempest_plugin * Cleaned up README.rst and setup.cfg * Use neutron_tempest_plugin as a tempest plugin package * Fixed gitreview * Keeping flake8 Ignores in tox.ini as tempest plugin is imported from neutron codebase. Change-Id: I42d389836e72813fdeebc797a577f4a8ac2ee603 --- .gitreview | 2 +- README.rst | 21 ++++++---------- .../tempest/services/network/__init__.py | 0 .../tempest/services/network/json/__init__.py | 0 .../README.rst | 4 +-- .../__init__.py | 0 .../api}/__init__.py | 0 .../api/admin}/__init__.py | 0 .../api/admin/test_agent_management.py | 4 +-- .../api/admin/test_dhcp_agent_scheduler.py | 4 +-- ...st_extension_driver_port_security_admin.py | 4 +-- .../admin/test_external_network_extension.py | 2 +- .../admin/test_floating_ips_admin_actions.py | 4 +-- .../api/admin/test_l3_agent_scheduler.py | 4 +-- .../api/admin/test_networks.py | 4 +-- .../api/admin/test_quotas.py | 4 +-- .../api/admin/test_quotas_negative.py | 4 +-- .../api/admin/test_routers_dvr.py | 2 +- .../api/admin/test_routers_flavors.py | 2 +- .../api/admin/test_routers_ha.py | 2 +- .../admin/test_shared_network_extension.py | 2 +- .../api/base.py | 10 ++++---- .../api/base_routers.py | 2 +- .../api/base_security_groups.py | 2 +- .../api/clients.py | 4 +-- .../api/test_address_scopes.py | 2 +- .../api/test_address_scopes_negative.py | 2 +- .../api/test_allowed_address_pair.py | 4 +-- .../api/test_auto_allocated_topology.py | 2 +- .../api/test_dhcp_ipv6.py | 4 +-- .../test_extension_driver_port_security.py | 4 +-- .../api/test_extensions.py | 2 +- .../api/test_extra_dhcp_options.py | 2 +- .../api/test_flavors_extensions.py | 2 +- .../api/test_floating_ips.py | 4 +-- .../api/test_floating_ips_negative.py | 4 +-- .../api/test_metering_extensions.py | 2 +- .../api/test_metering_negative.py | 2 +- .../api/test_network_ip_availability.py | 4 +-- .../test_network_ip_availability_negative.py | 2 +- .../api/test_networks.py | 4 +-- .../api/test_networks_negative.py | 2 +- .../api/test_ports.py | 2 +- .../api/test_qos.py | 4 +-- .../api/test_qos_negative.py | 2 +- .../api/test_revisions.py | 6 ++--- .../api/test_routers.py | 8 +++--- .../api/test_routers_negative.py | 2 +- .../api/test_security_groups.py | 2 +- .../api/test_security_groups_negative.py | 2 +- .../api/test_service_type_management.py | 2 +- .../api/test_subnetpools.py | 2 +- .../api/test_subnetpools_negative.py | 2 +- .../api/test_subnets.py | 2 +- .../api/test_tag.py | 2 +- .../api/test_timestamp.py | 8 +++--- .../api/test_trunk.py | 4 +-- .../api/test_trunk_details.py | 2 +- .../api/test_trunk_negative.py | 2 +- .../common}/__init__.py | 0 .../common/constants.py | 0 .../common/qos_consts.py | 0 .../common/ssh.py | 2 +- .../common/tempest_fixtures.py | 0 .../common/utils.py | 8 ++++-- .../config.py | 0 .../exceptions.py | 0 .../plugin.py | 6 ++--- .../scenario}/__init__.py | 0 .../scenario/base.py | 8 +++--- .../scenario/constants.py | 0 .../scenario/exceptions.py | 0 .../scenario/test_basic.py | 4 +-- .../scenario/test_dvr.py | 4 +-- .../scenario/test_floatingip.py | 8 +++--- .../scenario/test_migration.py | 4 +-- .../scenario/test_portsecurity.py | 4 +-- .../scenario/test_qos.py | 22 ++++++++-------- .../scenario/test_trunk.py | 10 ++++---- .../services}/__init__.py | 0 .../services/network}/__init__.py | 0 .../services/network/json}/__init__.py | 0 .../services/network/json/network_client.py | 2 +- setup.cfg | 16 ++++++------ tox.ini | 25 ++++++++++++++----- 85 files changed, 160 insertions(+), 152 deletions(-) delete mode 100644 neutron/tests/tempest/services/network/__init__.py delete mode 100644 neutron/tests/tempest/services/network/json/__init__.py rename {neutron/tests/tempest => neutron_tempest_plugin}/README.rst (68%) rename {neutron => neutron_tempest_plugin}/__init__.py (100%) rename {neutron/tests => neutron_tempest_plugin/api}/__init__.py (100%) rename {neutron/tests/tempest => neutron_tempest_plugin/api/admin}/__init__.py (100%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/admin/test_agent_management.py (97%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/admin/test_dhcp_agent_scheduler.py (97%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/admin/test_extension_driver_port_security_admin.py (91%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/admin/test_external_network_extension.py (99%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/admin/test_floating_ips_admin_actions.py (97%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/admin/test_l3_agent_scheduler.py (97%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/admin/test_networks.py (97%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/admin/test_quotas.py (98%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/admin/test_quotas_negative.py (98%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/admin/test_routers_dvr.py (98%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/admin/test_routers_flavors.py (98%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/admin/test_routers_ha.py (98%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/admin/test_shared_network_extension.py (99%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/base.py (99%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/base_routers.py (97%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/base_security_groups.py (97%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/clients.py (96%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/test_address_scopes.py (99%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/test_address_scopes_negative.py (98%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/test_allowed_address_pair.py (98%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/test_auto_allocated_topology.py (99%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/test_dhcp_ipv6.py (97%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/test_extension_driver_port_security.py (98%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/test_extensions.py (97%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/test_extra_dhcp_options.py (98%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/test_flavors_extensions.py (99%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/test_floating_ips.py (98%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/test_floating_ips_negative.py (97%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/test_metering_extensions.py (99%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/test_metering_negative.py (96%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/test_network_ip_availability.py (98%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/test_network_ip_availability_negative.py (93%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/test_networks.py (99%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/test_networks_negative.py (97%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/test_ports.py (99%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/test_qos.py (99%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/test_qos_negative.py (97%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/test_revisions.py (99%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/test_routers.py (98%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/test_routers_negative.py (98%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/test_security_groups.py (97%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/test_security_groups_negative.py (97%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/test_service_type_management.py (95%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/test_subnetpools.py (99%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/test_subnetpools_negative.py (99%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/test_subnets.py (98%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/test_tag.py (99%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/test_timestamp.py (98%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/test_trunk.py (99%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/test_trunk_details.py (98%) rename {neutron/tests/tempest => neutron_tempest_plugin}/api/test_trunk_negative.py (99%) rename {neutron/tests/tempest/api => neutron_tempest_plugin/common}/__init__.py (100%) rename {neutron/tests/tempest => neutron_tempest_plugin}/common/constants.py (100%) rename {neutron/tests/tempest => neutron_tempest_plugin}/common/qos_consts.py (100%) rename {neutron/tests/tempest => neutron_tempest_plugin}/common/ssh.py (95%) rename {neutron/tests/tempest => neutron_tempest_plugin}/common/tempest_fixtures.py (100%) rename {neutron/tests/tempest => neutron_tempest_plugin}/common/utils.py (97%) rename {neutron/tests/tempest => neutron_tempest_plugin}/config.py (100%) rename {neutron/tests/tempest => neutron_tempest_plugin}/exceptions.py (100%) rename {neutron/tests/tempest => neutron_tempest_plugin}/plugin.py (89%) rename {neutron/tests/tempest/api/admin => neutron_tempest_plugin/scenario}/__init__.py (100%) rename {neutron/tests/tempest => neutron_tempest_plugin}/scenario/base.py (98%) rename {neutron/tests/tempest => neutron_tempest_plugin}/scenario/constants.py (100%) rename {neutron/tests/tempest => neutron_tempest_plugin}/scenario/exceptions.py (100%) rename {neutron/tests/tempest => neutron_tempest_plugin}/scenario/test_basic.py (92%) rename {neutron/tests/tempest => neutron_tempest_plugin}/scenario/test_dvr.py (96%) rename {neutron/tests/tempest => neutron_tempest_plugin}/scenario/test_floatingip.py (96%) rename {neutron/tests/tempest => neutron_tempest_plugin}/scenario/test_migration.py (98%) rename {neutron/tests/tempest => neutron_tempest_plugin}/scenario/test_portsecurity.py (95%) rename {neutron/tests/tempest => neutron_tempest_plugin}/scenario/test_qos.py (91%) rename {neutron/tests/tempest => neutron_tempest_plugin}/scenario/test_trunk.py (97%) rename {neutron/tests/tempest/common => neutron_tempest_plugin/services}/__init__.py (100%) rename {neutron/tests/tempest/scenario => neutron_tempest_plugin/services/network}/__init__.py (100%) rename {neutron/tests/tempest/services => neutron_tempest_plugin/services/network/json}/__init__.py (100%) rename {neutron/tests/tempest => neutron_tempest_plugin}/services/network/json/network_client.py (99%) diff --git a/.gitreview b/.gitreview index 698048fc..64910a0b 100644 --- a/.gitreview +++ b/.gitreview @@ -1,4 +1,4 @@ [gerrit] host=review.openstack.org port=29418 -project=openstack/openstack.git +project=openstack/neutron-tempest-plugin.git diff --git a/README.rst b/README.rst index 2a9af7f6..e81ffbec 100644 --- a/README.rst +++ b/README.rst @@ -1,19 +1,12 @@ -=============================== +====================== Neutron Tempest Plugin -=============================== +====================== -Tempest plugin for Neutron +Tempest plugin for Neutron project. -Please fill here a long description which must be at least 3 lines wrapped on -80 cols, so that distribution package maintainers can use it in their packages. -Note that this is a hard requirement. +It contains the tempest plugin for the functional testing of Neutron Project. * Free software: Apache license -* Documentation: http://docs.openstack.org/developer/openstack -* Source: http://git.openstack.org/cgit/openstack/openstack -* Bugs: http://bugs.launchpad.net/neutron_tempest_plugin - -Features --------- - -* TODO +* Documentation: http://docs.openstack.org/developer/neutron +* Source: http://git.openstack.org/cgit/openstack/neutron-tempest-plugin +* Bugs: http://bugs.launchpad.net/neutron diff --git a/neutron/tests/tempest/services/network/__init__.py b/neutron/tests/tempest/services/network/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/neutron/tests/tempest/services/network/json/__init__.py b/neutron/tests/tempest/services/network/json/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/neutron/tests/tempest/README.rst b/neutron_tempest_plugin/README.rst similarity index 68% rename from neutron/tests/tempest/README.rst rename to neutron_tempest_plugin/README.rst index f27c34ee..0d52b021 100644 --- a/neutron/tests/tempest/README.rst +++ b/neutron_tempest_plugin/README.rst @@ -4,6 +4,6 @@ WARNING Some files under this path were copied from tempest as part of the move of the api tests, and they will be removed as required over time to minimize the dependency on the tempest testing framework. While it exists, only -neutron.tests.tempest.* should be importing files from this path. -neutron.tests.tempest.config uses the global cfg.CONF instance and importing it +neutron_tempest_plugin.* should be importing files from this path. +neutron_tempest_plugin.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/__init__.py b/neutron_tempest_plugin/__init__.py similarity index 100% rename from neutron/__init__.py rename to neutron_tempest_plugin/__init__.py diff --git a/neutron/tests/__init__.py b/neutron_tempest_plugin/api/__init__.py similarity index 100% rename from neutron/tests/__init__.py rename to neutron_tempest_plugin/api/__init__.py diff --git a/neutron/tests/tempest/__init__.py b/neutron_tempest_plugin/api/admin/__init__.py similarity index 100% rename from neutron/tests/tempest/__init__.py rename to neutron_tempest_plugin/api/admin/__init__.py diff --git a/neutron/tests/tempest/api/admin/test_agent_management.py b/neutron_tempest_plugin/api/admin/test_agent_management.py similarity index 97% rename from neutron/tests/tempest/api/admin/test_agent_management.py rename to neutron_tempest_plugin/api/admin/test_agent_management.py index ceda4605..72cba62c 100644 --- a/neutron/tests/tempest/api/admin/test_agent_management.py +++ b/neutron_tempest_plugin/api/admin/test_agent_management.py @@ -12,10 +12,10 @@ # License for the specific language governing permissions and limitations # under the License. -from neutron.tests.tempest.common import tempest_fixtures +from neutron_tempest_plugin.common import tempest_fixtures from tempest.lib import decorators -from neutron.tests.tempest.api import base +from neutron_tempest_plugin.api import base class AgentManagementTestJSON(base.BaseAdminNetworkTest): diff --git a/neutron/tests/tempest/api/admin/test_dhcp_agent_scheduler.py b/neutron_tempest_plugin/api/admin/test_dhcp_agent_scheduler.py similarity index 97% rename from neutron/tests/tempest/api/admin/test_dhcp_agent_scheduler.py rename to neutron_tempest_plugin/api/admin/test_dhcp_agent_scheduler.py index 1a8a0153..d0adcb89 100644 --- a/neutron/tests/tempest/api/admin/test_dhcp_agent_scheduler.py +++ b/neutron_tempest_plugin/api/admin/test_dhcp_agent_scheduler.py @@ -15,8 +15,8 @@ from neutron_lib import constants from tempest.lib import decorators -from neutron.tests.tempest.common import utils -from neutron.tests.tempest.api import base +from neutron_tempest_plugin.api import base +from neutron_tempest_plugin.common import utils class DHCPAgentSchedulersTestJSON(base.BaseAdminNetworkTest): diff --git a/neutron/tests/tempest/api/admin/test_extension_driver_port_security_admin.py b/neutron_tempest_plugin/api/admin/test_extension_driver_port_security_admin.py similarity index 91% rename from neutron/tests/tempest/api/admin/test_extension_driver_port_security_admin.py rename to neutron_tempest_plugin/api/admin/test_extension_driver_port_security_admin.py index e0bf1791..60af89eb 100644 --- a/neutron/tests/tempest/api/admin/test_extension_driver_port_security_admin.py +++ b/neutron_tempest_plugin/api/admin/test_extension_driver_port_security_admin.py @@ -16,8 +16,8 @@ from tempest.lib import decorators from tempest.lib import exceptions as lib_exc -from neutron.tests.tempest.api import base -from neutron.tests.tempest.api import base_security_groups as base_security +from neutron_tempest_plugin.api import base +from neutron_tempest_plugin.api import base_security_groups as base_security class PortSecurityAdminTests(base_security.BaseSecGroupTest, diff --git a/neutron/tests/tempest/api/admin/test_external_network_extension.py b/neutron_tempest_plugin/api/admin/test_external_network_extension.py similarity index 99% rename from neutron/tests/tempest/api/admin/test_external_network_extension.py rename to neutron_tempest_plugin/api/admin/test_external_network_extension.py index 6f6c94d9..cc1b2c21 100644 --- a/neutron/tests/tempest/api/admin/test_external_network_extension.py +++ b/neutron_tempest_plugin/api/admin/test_external_network_extension.py @@ -16,7 +16,7 @@ from tempest.lib import decorators from tempest.lib import exceptions as lib_exc import testtools -from neutron.tests.tempest.api import base +from neutron_tempest_plugin.api import base class ExternalNetworksRBACTestJSON(base.BaseAdminNetworkTest): diff --git a/neutron/tests/tempest/api/admin/test_floating_ips_admin_actions.py b/neutron_tempest_plugin/api/admin/test_floating_ips_admin_actions.py similarity index 97% rename from neutron/tests/tempest/api/admin/test_floating_ips_admin_actions.py rename to neutron_tempest_plugin/api/admin/test_floating_ips_admin_actions.py index 8fb8f66b..b0c5d41d 100644 --- a/neutron/tests/tempest/api/admin/test_floating_ips_admin_actions.py +++ b/neutron_tempest_plugin/api/admin/test_floating_ips_admin_actions.py @@ -18,8 +18,8 @@ from tempest.lib import decorators from tempest.lib import exceptions as lib_exc import testtools -from neutron.tests.tempest.api import base -from neutron.tests.tempest import config +from neutron_tempest_plugin.api import base +from neutron_tempest_plugin import config CONF = config.CONF diff --git a/neutron/tests/tempest/api/admin/test_l3_agent_scheduler.py b/neutron_tempest_plugin/api/admin/test_l3_agent_scheduler.py similarity index 97% rename from neutron/tests/tempest/api/admin/test_l3_agent_scheduler.py rename to neutron_tempest_plugin/api/admin/test_l3_agent_scheduler.py index 01d38464..3981dfbd 100644 --- a/neutron/tests/tempest/api/admin/test_l3_agent_scheduler.py +++ b/neutron_tempest_plugin/api/admin/test_l3_agent_scheduler.py @@ -15,8 +15,8 @@ from tempest.lib.common.utils import data_utils from tempest.lib import decorators -from neutron.tests.tempest.api import base -from neutron.tests.tempest import exceptions +from neutron_tempest_plugin.api import base +from neutron_tempest_plugin import exceptions AGENT_TYPE = 'L3 agent' AGENT_MODES = ( diff --git a/neutron/tests/tempest/api/admin/test_networks.py b/neutron_tempest_plugin/api/admin/test_networks.py similarity index 97% rename from neutron/tests/tempest/api/admin/test_networks.py rename to neutron_tempest_plugin/api/admin/test_networks.py index c7ea008c..e57a7e88 100644 --- a/neutron/tests/tempest/api/admin/test_networks.py +++ b/neutron_tempest_plugin/api/admin/test_networks.py @@ -16,8 +16,8 @@ from tempest.lib import decorators from tempest.lib import exceptions as lib_exc from tempest import test -from neutron.tests.tempest.api import base -from neutron.tests.tempest import config +from neutron_tempest_plugin.api import base +from neutron_tempest_plugin import config class NetworksTestAdmin(base.BaseAdminNetworkTest): diff --git a/neutron/tests/tempest/api/admin/test_quotas.py b/neutron_tempest_plugin/api/admin/test_quotas.py similarity index 98% rename from neutron/tests/tempest/api/admin/test_quotas.py rename to neutron_tempest_plugin/api/admin/test_quotas.py index 04ea4922..5c92be01 100644 --- a/neutron/tests/tempest/api/admin/test_quotas.py +++ b/neutron_tempest_plugin/api/admin/test_quotas.py @@ -19,8 +19,8 @@ from tempest.lib import decorators from tempest.lib import exceptions as lib_exc from tempest import test -from neutron.tests.tempest.api import base -from neutron.tests.tempest import config +from neutron_tempest_plugin.api import base +from neutron_tempest_plugin import config CONF = config.CONF diff --git a/neutron/tests/tempest/api/admin/test_quotas_negative.py b/neutron_tempest_plugin/api/admin/test_quotas_negative.py similarity index 98% rename from neutron/tests/tempest/api/admin/test_quotas_negative.py rename to neutron_tempest_plugin/api/admin/test_quotas_negative.py index 84cd4999..8960f5f8 100644 --- a/neutron/tests/tempest/api/admin/test_quotas_negative.py +++ b/neutron_tempest_plugin/api/admin/test_quotas_negative.py @@ -15,8 +15,8 @@ from tempest.lib import decorators from tempest.lib import exceptions as lib_exc from tempest import test -from neutron.tests.tempest.api.admin import test_quotas -from neutron.tests.tempest import config +from neutron_tempest_plugin.api.admin import test_quotas +from neutron_tempest_plugin import config CONF = config.CONF diff --git a/neutron/tests/tempest/api/admin/test_routers_dvr.py b/neutron_tempest_plugin/api/admin/test_routers_dvr.py similarity index 98% rename from neutron/tests/tempest/api/admin/test_routers_dvr.py rename to neutron_tempest_plugin/api/admin/test_routers_dvr.py index 8f03cc61..2313d1be 100644 --- a/neutron/tests/tempest/api/admin/test_routers_dvr.py +++ b/neutron_tempest_plugin/api/admin/test_routers_dvr.py @@ -16,7 +16,7 @@ from tempest.lib.common.utils import data_utils from tempest.lib import decorators -from neutron.tests.tempest.api import base_routers as base +from neutron_tempest_plugin.api import base_routers as base class RoutersTestDVR(base.BaseRouterTest): diff --git a/neutron/tests/tempest/api/admin/test_routers_flavors.py b/neutron_tempest_plugin/api/admin/test_routers_flavors.py similarity index 98% rename from neutron/tests/tempest/api/admin/test_routers_flavors.py rename to neutron_tempest_plugin/api/admin/test_routers_flavors.py index 4153c2d3..86a993a4 100644 --- a/neutron/tests/tempest/api/admin/test_routers_flavors.py +++ b/neutron_tempest_plugin/api/admin/test_routers_flavors.py @@ -16,7 +16,7 @@ from tempest.lib import decorators from tempest.lib import exceptions as lib_exc import testtools -from neutron.tests.tempest.api import base_routers as base +from neutron_tempest_plugin.api import base_routers as base class RoutersFlavorTestCase(base.BaseRouterTest): diff --git a/neutron/tests/tempest/api/admin/test_routers_ha.py b/neutron_tempest_plugin/api/admin/test_routers_ha.py similarity index 98% rename from neutron/tests/tempest/api/admin/test_routers_ha.py rename to neutron_tempest_plugin/api/admin/test_routers_ha.py index 644ac18f..fafe2097 100644 --- a/neutron/tests/tempest/api/admin/test_routers_ha.py +++ b/neutron_tempest_plugin/api/admin/test_routers_ha.py @@ -13,7 +13,7 @@ from tempest.lib.common.utils import data_utils from tempest.lib import decorators -from neutron.tests.tempest.api import base_routers as base +from neutron_tempest_plugin.api import base_routers as base class RoutersTestHA(base.BaseRouterTest): diff --git a/neutron/tests/tempest/api/admin/test_shared_network_extension.py b/neutron_tempest_plugin/api/admin/test_shared_network_extension.py similarity index 99% rename from neutron/tests/tempest/api/admin/test_shared_network_extension.py rename to neutron_tempest_plugin/api/admin/test_shared_network_extension.py index 2be0ea27..e2198bd1 100644 --- a/neutron/tests/tempest/api/admin/test_shared_network_extension.py +++ b/neutron_tempest_plugin/api/admin/test_shared_network_extension.py @@ -21,7 +21,7 @@ from tempest.lib import exceptions as lib_exc from tempest import test import testtools -from neutron.tests.tempest.api import base +from neutron_tempest_plugin.api import base class SharedNetworksTest(base.BaseAdminNetworkTest): diff --git a/neutron/tests/tempest/api/base.py b/neutron_tempest_plugin/api/base.py similarity index 99% rename from neutron/tests/tempest/api/base.py rename to neutron_tempest_plugin/api/base.py index d9ba6dcb..b122ce8b 100644 --- a/neutron/tests/tempest/api/base.py +++ b/neutron_tempest_plugin/api/base.py @@ -21,11 +21,11 @@ from tempest.lib.common.utils import data_utils from tempest.lib import exceptions as lib_exc from tempest import test -from neutron.tests.tempest.common import constants -from neutron.tests.tempest.common import utils -from neutron.tests.tempest.api import clients -from neutron.tests.tempest import config -from neutron.tests.tempest import exceptions +from neutron_tempest_plugin.api import clients +from neutron_tempest_plugin.common import constants +from neutron_tempest_plugin.common import utils +from neutron_tempest_plugin import config +from neutron_tempest_plugin import exceptions CONF = config.CONF diff --git a/neutron/tests/tempest/api/base_routers.py b/neutron_tempest_plugin/api/base_routers.py similarity index 97% rename from neutron/tests/tempest/api/base_routers.py rename to neutron_tempest_plugin/api/base_routers.py index 8b0b5a47..c8d37835 100644 --- a/neutron/tests/tempest/api/base_routers.py +++ b/neutron_tempest_plugin/api/base_routers.py @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. -from neutron.tests.tempest.api import base +from neutron_tempest_plugin.api import base class BaseRouterTest(base.BaseAdminNetworkTest): diff --git a/neutron/tests/tempest/api/base_security_groups.py b/neutron_tempest_plugin/api/base_security_groups.py similarity index 97% rename from neutron/tests/tempest/api/base_security_groups.py rename to neutron_tempest_plugin/api/base_security_groups.py index 5028ec12..e2736f36 100644 --- a/neutron/tests/tempest/api/base_security_groups.py +++ b/neutron_tempest_plugin/api/base_security_groups.py @@ -15,7 +15,7 @@ from tempest.lib.common.utils import data_utils -from neutron.tests.tempest.api import base +from neutron_tempest_plugin.api import base class BaseSecGroupTest(base.BaseNetworkTest): diff --git a/neutron/tests/tempest/api/clients.py b/neutron_tempest_plugin/api/clients.py similarity index 96% rename from neutron/tests/tempest/api/clients.py rename to neutron_tempest_plugin/api/clients.py index 949ce2ee..272f5bec 100644 --- a/neutron/tests/tempest/api/clients.py +++ b/neutron_tempest_plugin/api/clients.py @@ -19,8 +19,8 @@ from tempest.lib.services.identity.v2 import tenants_client from tempest.lib.services.identity.v3 import projects_client from tempest import manager -from neutron.tests.tempest import config -from neutron.tests.tempest.services.network.json import network_client +from neutron_tempest_plugin import config +from neutron_tempest_plugin.services.network.json import network_client CONF = config.CONF diff --git a/neutron/tests/tempest/api/test_address_scopes.py b/neutron_tempest_plugin/api/test_address_scopes.py similarity index 99% rename from neutron/tests/tempest/api/test_address_scopes.py rename to neutron_tempest_plugin/api/test_address_scopes.py index d4474e4f..e9575b4a 100644 --- a/neutron/tests/tempest/api/test_address_scopes.py +++ b/neutron_tempest_plugin/api/test_address_scopes.py @@ -17,7 +17,7 @@ from tempest.lib import decorators from tempest.lib import exceptions as lib_exc from tempest import test -from neutron.tests.tempest.api import base +from neutron_tempest_plugin.api import base ADDRESS_SCOPE_NAME = 'smoke-address-scope' diff --git a/neutron/tests/tempest/api/test_address_scopes_negative.py b/neutron_tempest_plugin/api/test_address_scopes_negative.py similarity index 98% rename from neutron/tests/tempest/api/test_address_scopes_negative.py rename to neutron_tempest_plugin/api/test_address_scopes_negative.py index 2e95f595..13c5aace 100644 --- a/neutron/tests/tempest/api/test_address_scopes_negative.py +++ b/neutron_tempest_plugin/api/test_address_scopes_negative.py @@ -16,7 +16,7 @@ from tempest.lib.common.utils import data_utils from tempest.lib import decorators from tempest.lib import exceptions as lib_exc -from neutron.tests.tempest.api import test_address_scopes +from neutron_tempest_plugin.api import test_address_scopes class AddressScopeTestNegative(test_address_scopes.AddressScopeTestBase): diff --git a/neutron/tests/tempest/api/test_allowed_address_pair.py b/neutron_tempest_plugin/api/test_allowed_address_pair.py similarity index 98% rename from neutron/tests/tempest/api/test_allowed_address_pair.py rename to neutron_tempest_plugin/api/test_allowed_address_pair.py index d339a263..1c6abcc3 100644 --- a/neutron/tests/tempest/api/test_allowed_address_pair.py +++ b/neutron_tempest_plugin/api/test_allowed_address_pair.py @@ -16,8 +16,8 @@ import netaddr from tempest.lib import decorators -from neutron.tests.tempest.api import base -from neutron.tests.tempest import config +from neutron_tempest_plugin.api import base +from neutron_tempest_plugin import config class AllowedAddressPairTestJSON(base.BaseNetworkTest): diff --git a/neutron/tests/tempest/api/test_auto_allocated_topology.py b/neutron_tempest_plugin/api/test_auto_allocated_topology.py similarity index 99% rename from neutron/tests/tempest/api/test_auto_allocated_topology.py rename to neutron_tempest_plugin/api/test_auto_allocated_topology.py index e7ebfa01..37f9ad1b 100644 --- a/neutron/tests/tempest/api/test_auto_allocated_topology.py +++ b/neutron_tempest_plugin/api/test_auto_allocated_topology.py @@ -17,7 +17,7 @@ from neutron_lib.api.definitions import auto_allocated_topology from oslo_config import cfg from tempest.lib import decorators -from neutron.tests.tempest.api import base +from neutron_tempest_plugin.api import base class TestAutoAllocatedTopology(base.BaseAdminNetworkTest): diff --git a/neutron/tests/tempest/api/test_dhcp_ipv6.py b/neutron_tempest_plugin/api/test_dhcp_ipv6.py similarity index 97% rename from neutron/tests/tempest/api/test_dhcp_ipv6.py rename to neutron_tempest_plugin/api/test_dhcp_ipv6.py index afe9c535..f408c979 100644 --- a/neutron/tests/tempest/api/test_dhcp_ipv6.py +++ b/neutron_tempest_plugin/api/test_dhcp_ipv6.py @@ -18,8 +18,8 @@ from neutron_lib import constants from tempest.lib import decorators from tempest.lib import exceptions as lib_exc -from neutron.tests.tempest.api import base -from neutron.tests.tempest import config +from neutron_tempest_plugin.api import base +from neutron_tempest_plugin import config CONF = config.CONF diff --git a/neutron/tests/tempest/api/test_extension_driver_port_security.py b/neutron_tempest_plugin/api/test_extension_driver_port_security.py similarity index 98% rename from neutron/tests/tempest/api/test_extension_driver_port_security.py rename to neutron_tempest_plugin/api/test_extension_driver_port_security.py index bd7d8013..7a8cf0e7 100644 --- a/neutron/tests/tempest/api/test_extension_driver_port_security.py +++ b/neutron_tempest_plugin/api/test_extension_driver_port_security.py @@ -18,8 +18,8 @@ from tempest.lib import decorators from tempest.lib import exceptions as lib_exc from tempest import test -from neutron.tests.tempest.api import base -from neutron.tests.tempest.api import base_security_groups as base_security +from neutron_tempest_plugin.api import base +from neutron_tempest_plugin.api import base_security_groups as base_security FAKE_IP = '10.0.0.1' FAKE_MAC = '00:25:64:e8:19:dd' diff --git a/neutron/tests/tempest/api/test_extensions.py b/neutron_tempest_plugin/api/test_extensions.py similarity index 97% rename from neutron/tests/tempest/api/test_extensions.py rename to neutron_tempest_plugin/api/test_extensions.py index 3809a934..4659ba9c 100644 --- a/neutron/tests/tempest/api/test_extensions.py +++ b/neutron_tempest_plugin/api/test_extensions.py @@ -13,7 +13,7 @@ from tempest.lib import decorators from tempest import test -from neutron.tests.tempest.api import base +from neutron_tempest_plugin.api import base class ExtensionsTest(base.BaseNetworkTest): diff --git a/neutron/tests/tempest/api/test_extra_dhcp_options.py b/neutron_tempest_plugin/api/test_extra_dhcp_options.py similarity index 98% rename from neutron/tests/tempest/api/test_extra_dhcp_options.py rename to neutron_tempest_plugin/api/test_extra_dhcp_options.py index eeb34872..e5f73b25 100644 --- a/neutron/tests/tempest/api/test_extra_dhcp_options.py +++ b/neutron_tempest_plugin/api/test_extra_dhcp_options.py @@ -16,7 +16,7 @@ from tempest.lib.common.utils import data_utils from tempest.lib import decorators -from neutron.tests.tempest.api import base +from neutron_tempest_plugin.api import base class ExtraDHCPOptionsTestJSON(base.BaseNetworkTest): diff --git a/neutron/tests/tempest/api/test_flavors_extensions.py b/neutron_tempest_plugin/api/test_flavors_extensions.py similarity index 99% rename from neutron/tests/tempest/api/test_flavors_extensions.py rename to neutron_tempest_plugin/api/test_flavors_extensions.py index 764f3edf..30f1eb6c 100644 --- a/neutron/tests/tempest/api/test_flavors_extensions.py +++ b/neutron_tempest_plugin/api/test_flavors_extensions.py @@ -15,7 +15,7 @@ from tempest.lib import decorators from tempest.lib import exceptions as lib_exc -from neutron.tests.tempest.api import base +from neutron_tempest_plugin.api import base class TestFlavorsJson(base.BaseAdminNetworkTest): diff --git a/neutron/tests/tempest/api/test_floating_ips.py b/neutron_tempest_plugin/api/test_floating_ips.py similarity index 98% rename from neutron/tests/tempest/api/test_floating_ips.py rename to neutron_tempest_plugin/api/test_floating_ips.py index 3e213566..3b283cb3 100644 --- a/neutron/tests/tempest/api/test_floating_ips.py +++ b/neutron_tempest_plugin/api/test_floating_ips.py @@ -17,8 +17,8 @@ from tempest.lib.common.utils import data_utils from tempest.lib import decorators from tempest import test -from neutron.tests.tempest.api import base -from neutron.tests.tempest import config +from neutron_tempest_plugin.api import base +from neutron_tempest_plugin import config CONF = config.CONF diff --git a/neutron/tests/tempest/api/test_floating_ips_negative.py b/neutron_tempest_plugin/api/test_floating_ips_negative.py similarity index 97% rename from neutron/tests/tempest/api/test_floating_ips_negative.py rename to neutron_tempest_plugin/api/test_floating_ips_negative.py index 84cd2ec7..453af717 100644 --- a/neutron/tests/tempest/api/test_floating_ips_negative.py +++ b/neutron_tempest_plugin/api/test_floating_ips_negative.py @@ -18,8 +18,8 @@ from tempest.lib.common.utils import data_utils from tempest.lib import decorators from tempest.lib import exceptions as lib_exc -from neutron.tests.tempest.api import base -from neutron.tests.tempest import config +from neutron_tempest_plugin.api import base +from neutron_tempest_plugin import config CONF = config.CONF diff --git a/neutron/tests/tempest/api/test_metering_extensions.py b/neutron_tempest_plugin/api/test_metering_extensions.py similarity index 99% rename from neutron/tests/tempest/api/test_metering_extensions.py rename to neutron_tempest_plugin/api/test_metering_extensions.py index 2d95072d..186b0245 100644 --- a/neutron/tests/tempest/api/test_metering_extensions.py +++ b/neutron_tempest_plugin/api/test_metering_extensions.py @@ -16,7 +16,7 @@ from neutron_lib.db import constants as db_const from tempest.lib.common.utils import data_utils from tempest.lib import decorators -from neutron.tests.tempest.api import base +from neutron_tempest_plugin.api import base LONG_NAME_OK = 'x' * db_const.NAME_FIELD_SIZE diff --git a/neutron/tests/tempest/api/test_metering_negative.py b/neutron_tempest_plugin/api/test_metering_negative.py similarity index 96% rename from neutron/tests/tempest/api/test_metering_negative.py rename to neutron_tempest_plugin/api/test_metering_negative.py index 4b705238..175f3143 100644 --- a/neutron/tests/tempest/api/test_metering_negative.py +++ b/neutron_tempest_plugin/api/test_metering_negative.py @@ -16,7 +16,7 @@ from neutron_lib.db import constants as db_const from tempest.lib import decorators from tempest.lib import exceptions as lib_exc -from neutron.tests.tempest.api import base +from neutron_tempest_plugin.api import base LONG_NAME_NG = 'x' * (db_const.NAME_FIELD_SIZE + 1) diff --git a/neutron/tests/tempest/api/test_network_ip_availability.py b/neutron_tempest_plugin/api/test_network_ip_availability.py similarity index 98% rename from neutron/tests/tempest/api/test_network_ip_availability.py rename to neutron_tempest_plugin/api/test_network_ip_availability.py index 416c38ef..fe83a772 100644 --- a/neutron/tests/tempest/api/test_network_ip_availability.py +++ b/neutron_tempest_plugin/api/test_network_ip_availability.py @@ -21,8 +21,8 @@ from tempest.lib import decorators from tempest.lib import exceptions as lib_exc from tempest import test -from neutron.tests.tempest.api import base -from neutron.tests.tempest import config +from neutron_tempest_plugin.api import base +from neutron_tempest_plugin import config from neutron_lib import constants as lib_constants diff --git a/neutron/tests/tempest/api/test_network_ip_availability_negative.py b/neutron_tempest_plugin/api/test_network_ip_availability_negative.py similarity index 93% rename from neutron/tests/tempest/api/test_network_ip_availability_negative.py rename to neutron_tempest_plugin/api/test_network_ip_availability_negative.py index 7e9b42b7..5ba49377 100644 --- a/neutron/tests/tempest/api/test_network_ip_availability_negative.py +++ b/neutron_tempest_plugin/api/test_network_ip_availability_negative.py @@ -16,7 +16,7 @@ from oslo_utils import uuidutils from tempest.lib import decorators from tempest.lib import exceptions as lib_exc -from neutron.tests.tempest.api import test_network_ip_availability as net_ip +from neutron_tempest_plugin.api import test_network_ip_availability as net_ip class NetworksIpAvailabilityNegativeTest(net_ip.NetworksIpAvailabilityTest): diff --git a/neutron/tests/tempest/api/test_networks.py b/neutron_tempest_plugin/api/test_networks.py similarity index 99% rename from neutron/tests/tempest/api/test_networks.py rename to neutron_tempest_plugin/api/test_networks.py index b350068e..b9919932 100644 --- a/neutron/tests/tempest/api/test_networks.py +++ b/neutron_tempest_plugin/api/test_networks.py @@ -17,8 +17,8 @@ from tempest.lib import decorators from tempest import test import testtools -from neutron.tests.tempest.api import base -from neutron.tests.tempest import config +from neutron_tempest_plugin.api import base +from neutron_tempest_plugin import config class NetworksTestJSON(base.BaseNetworkTest): diff --git a/neutron/tests/tempest/api/test_networks_negative.py b/neutron_tempest_plugin/api/test_networks_negative.py similarity index 97% rename from neutron/tests/tempest/api/test_networks_negative.py rename to neutron_tempest_plugin/api/test_networks_negative.py index 3aae9489..93f32f70 100644 --- a/neutron/tests/tempest/api/test_networks_negative.py +++ b/neutron_tempest_plugin/api/test_networks_negative.py @@ -14,7 +14,7 @@ from tempest.lib import decorators from tempest.lib import exceptions as lib_exc import testtools -from neutron.tests.tempest.api import base +from neutron_tempest_plugin.api import base class NetworksNegativeTest(base.BaseNetworkTest): diff --git a/neutron/tests/tempest/api/test_ports.py b/neutron_tempest_plugin/api/test_ports.py similarity index 99% rename from neutron/tests/tempest/api/test_ports.py rename to neutron_tempest_plugin/api/test_ports.py index acafa570..c68f4e38 100644 --- a/neutron/tests/tempest/api/test_ports.py +++ b/neutron_tempest_plugin/api/test_ports.py @@ -16,7 +16,7 @@ from tempest.lib import decorators from tempest import test -from neutron.tests.tempest.api import base +from neutron_tempest_plugin.api import base class PortsTestJSON(base.BaseNetworkTest): diff --git a/neutron/tests/tempest/api/test_qos.py b/neutron_tempest_plugin/api/test_qos.py similarity index 99% rename from neutron/tests/tempest/api/test_qos.py rename to neutron_tempest_plugin/api/test_qos.py index 3944dd7d..a075b679 100644 --- a/neutron/tests/tempest/api/test_qos.py +++ b/neutron_tempest_plugin/api/test_qos.py @@ -20,8 +20,8 @@ from tempest import test import testscenarios import testtools -from neutron.tests.tempest.common import qos_consts -from neutron.tests.tempest.api import base +from neutron_tempest_plugin.api import base +from neutron_tempest_plugin.common import qos_consts load_tests = testscenarios.load_tests_apply_scenarios diff --git a/neutron/tests/tempest/api/test_qos_negative.py b/neutron_tempest_plugin/api/test_qos_negative.py similarity index 97% rename from neutron/tests/tempest/api/test_qos_negative.py rename to neutron_tempest_plugin/api/test_qos_negative.py index 275fe058..e26a5368 100644 --- a/neutron/tests/tempest/api/test_qos_negative.py +++ b/neutron_tempest_plugin/api/test_qos_negative.py @@ -14,7 +14,7 @@ from neutron_lib.db import constants as db_const from tempest.lib import decorators from tempest.lib import exceptions as lib_exc -from neutron.tests.tempest.api import base +from neutron_tempest_plugin.api import base LONG_NAME_NG = 'z' * (db_const.NAME_FIELD_SIZE + 1) LONG_DESCRIPTION_NG = 'z' * (db_const.LONG_DESCRIPTION_FIELD_SIZE + 1) diff --git a/neutron/tests/tempest/api/test_revisions.py b/neutron_tempest_plugin/api/test_revisions.py similarity index 99% rename from neutron/tests/tempest/api/test_revisions.py rename to neutron_tempest_plugin/api/test_revisions.py index 83c84105..1d860ca9 100644 --- a/neutron/tests/tempest/api/test_revisions.py +++ b/neutron_tempest_plugin/api/test_revisions.py @@ -16,9 +16,9 @@ from tempest.lib import decorators from tempest.lib import exceptions from tempest import test -from neutron.tests.tempest.api import base -from neutron.tests.tempest.api import base_security_groups as bsg -from neutron.tests.tempest import config +from neutron_tempest_plugin.api import base +from neutron_tempest_plugin.api import base_security_groups as bsg +from neutron_tempest_plugin import config class TestRevisions(base.BaseAdminNetworkTest, bsg.BaseSecGroupTest): diff --git a/neutron/tests/tempest/api/test_routers.py b/neutron_tempest_plugin/api/test_routers.py similarity index 98% rename from neutron/tests/tempest/api/test_routers.py rename to neutron_tempest_plugin/api/test_routers.py index 9c915aa7..11fdecf2 100644 --- a/neutron/tests/tempest/api/test_routers.py +++ b/neutron_tempest_plugin/api/test_routers.py @@ -18,10 +18,10 @@ from tempest.lib.common.utils import data_utils from tempest.lib import decorators from tempest import test -from neutron.tests.tempest.common import utils -from neutron.tests.tempest.api import base -from neutron.tests.tempest.api import base_routers -from neutron.tests.tempest import config +from neutron_tempest_plugin.api import base +from neutron_tempest_plugin.api import base_routers +from neutron_tempest_plugin.common import utils +from neutron_tempest_plugin import config CONF = config.CONF diff --git a/neutron/tests/tempest/api/test_routers_negative.py b/neutron_tempest_plugin/api/test_routers_negative.py similarity index 98% rename from neutron/tests/tempest/api/test_routers_negative.py rename to neutron_tempest_plugin/api/test_routers_negative.py index b2b198d5..2f4ad44c 100644 --- a/neutron/tests/tempest/api/test_routers_negative.py +++ b/neutron_tempest_plugin/api/test_routers_negative.py @@ -18,7 +18,7 @@ from tempest.lib import decorators from tempest.lib import exceptions as lib_exc import testtools -from neutron.tests.tempest.api import base_routers as base +from neutron_tempest_plugin.api import base_routers as base class RoutersNegativeTestBase(base.BaseRouterTest): diff --git a/neutron/tests/tempest/api/test_security_groups.py b/neutron_tempest_plugin/api/test_security_groups.py similarity index 97% rename from neutron/tests/tempest/api/test_security_groups.py rename to neutron_tempest_plugin/api/test_security_groups.py index 5ff905db..46e00f77 100644 --- a/neutron/tests/tempest/api/test_security_groups.py +++ b/neutron_tempest_plugin/api/test_security_groups.py @@ -16,7 +16,7 @@ from tempest.lib.common.utils import data_utils from tempest.lib import decorators -from neutron.tests.tempest.api import base_security_groups as base +from neutron_tempest_plugin.api import base_security_groups as base class SecGroupTest(base.BaseSecGroupTest): diff --git a/neutron/tests/tempest/api/test_security_groups_negative.py b/neutron_tempest_plugin/api/test_security_groups_negative.py similarity index 97% rename from neutron/tests/tempest/api/test_security_groups_negative.py rename to neutron_tempest_plugin/api/test_security_groups_negative.py index 649f3750..fd54a5c6 100644 --- a/neutron/tests/tempest/api/test_security_groups_negative.py +++ b/neutron_tempest_plugin/api/test_security_groups_negative.py @@ -17,7 +17,7 @@ from neutron_lib.db import constants as db_const from tempest.lib import decorators from tempest.lib import exceptions as lib_exc -from neutron.tests.tempest.api import base_security_groups as base +from neutron_tempest_plugin.api import base_security_groups as base LONG_NAME_NG = 'x' * (db_const.NAME_FIELD_SIZE + 1) diff --git a/neutron/tests/tempest/api/test_service_type_management.py b/neutron_tempest_plugin/api/test_service_type_management.py similarity index 95% rename from neutron/tests/tempest/api/test_service_type_management.py rename to neutron_tempest_plugin/api/test_service_type_management.py index 3ca7250a..adcbb6c0 100644 --- a/neutron/tests/tempest/api/test_service_type_management.py +++ b/neutron_tempest_plugin/api/test_service_type_management.py @@ -12,7 +12,7 @@ from tempest.lib import decorators -from neutron.tests.tempest.api import base +from neutron_tempest_plugin.api import base class ServiceTypeManagementTest(base.BaseNetworkTest): diff --git a/neutron/tests/tempest/api/test_subnetpools.py b/neutron_tempest_plugin/api/test_subnetpools.py similarity index 99% rename from neutron/tests/tempest/api/test_subnetpools.py rename to neutron_tempest_plugin/api/test_subnetpools.py index e2fb3d65..5da0ad8e 100644 --- a/neutron/tests/tempest/api/test_subnetpools.py +++ b/neutron_tempest_plugin/api/test_subnetpools.py @@ -17,7 +17,7 @@ from tempest.lib.common.utils import data_utils from tempest.lib import decorators from tempest import test -from neutron.tests.tempest.api import base +from neutron_tempest_plugin.api import base SUBNETPOOL_NAME = 'smoke-subnetpool' SUBNET_NAME = 'smoke-subnet' diff --git a/neutron/tests/tempest/api/test_subnetpools_negative.py b/neutron_tempest_plugin/api/test_subnetpools_negative.py similarity index 99% rename from neutron/tests/tempest/api/test_subnetpools_negative.py rename to neutron_tempest_plugin/api/test_subnetpools_negative.py index 54676647..950b57ea 100644 --- a/neutron/tests/tempest/api/test_subnetpools_negative.py +++ b/neutron_tempest_plugin/api/test_subnetpools_negative.py @@ -20,7 +20,7 @@ from tempest.lib import decorators from tempest.lib import exceptions as lib_exc from tempest import test -from neutron.tests.tempest.api import test_subnetpools +from neutron_tempest_plugin.api import test_subnetpools SUBNETPOOL_NAME = 'smoke-subnetpool' diff --git a/neutron/tests/tempest/api/test_subnets.py b/neutron_tempest_plugin/api/test_subnets.py similarity index 98% rename from neutron/tests/tempest/api/test_subnets.py rename to neutron_tempest_plugin/api/test_subnets.py index 210dcdc6..fb2f4d6e 100644 --- a/neutron/tests/tempest/api/test_subnets.py +++ b/neutron_tempest_plugin/api/test_subnets.py @@ -12,7 +12,7 @@ from tempest.lib import decorators -from neutron.tests.tempest.api import base +from neutron_tempest_plugin.api import base class SubnetsSearchCriteriaTest(base.BaseSearchCriteriaTest): diff --git a/neutron/tests/tempest/api/test_tag.py b/neutron_tempest_plugin/api/test_tag.py similarity index 99% rename from neutron/tests/tempest/api/test_tag.py rename to neutron_tempest_plugin/api/test_tag.py index 08199514..c56d611e 100644 --- a/neutron/tests/tempest/api/test_tag.py +++ b/neutron_tempest_plugin/api/test_tag.py @@ -14,7 +14,7 @@ from tempest.lib import decorators from tempest.lib import exceptions as lib_exc from tempest import test -from neutron.tests.tempest.api import base +from neutron_tempest_plugin.api import base class TagTestJSON(base.BaseAdminNetworkTest): diff --git a/neutron/tests/tempest/api/test_timestamp.py b/neutron_tempest_plugin/api/test_timestamp.py similarity index 98% rename from neutron/tests/tempest/api/test_timestamp.py rename to neutron_tempest_plugin/api/test_timestamp.py index 24069225..20d57039 100644 --- a/neutron/tests/tempest/api/test_timestamp.py +++ b/neutron_tempest_plugin/api/test_timestamp.py @@ -15,10 +15,10 @@ import copy from tempest.lib.common.utils import data_utils from tempest.lib import decorators -from neutron.tests.tempest.api import base -from neutron.tests.tempest.api import base_routers -from neutron.tests.tempest.api import base_security_groups -from neutron.tests.tempest import config +from neutron_tempest_plugin.api import base +from neutron_tempest_plugin.api import base_routers +from neutron_tempest_plugin.api import base_security_groups +from neutron_tempest_plugin import config CONF = config.CONF diff --git a/neutron/tests/tempest/api/test_trunk.py b/neutron_tempest_plugin/api/test_trunk.py similarity index 99% rename from neutron/tests/tempest/api/test_trunk.py rename to neutron_tempest_plugin/api/test_trunk.py index aef82e7e..965b2483 100644 --- a/neutron/tests/tempest/api/test_trunk.py +++ b/neutron_tempest_plugin/api/test_trunk.py @@ -18,8 +18,8 @@ from tempest.lib import decorators from tempest.lib import exceptions as lib_exc from tempest import test -from neutron.tests.tempest.api import base -from neutron.tests.tempest import config +from neutron_tempest_plugin.api import base +from neutron_tempest_plugin import config def trunks_cleanup(client, trunks): diff --git a/neutron/tests/tempest/api/test_trunk_details.py b/neutron_tempest_plugin/api/test_trunk_details.py similarity index 98% rename from neutron/tests/tempest/api/test_trunk_details.py rename to neutron_tempest_plugin/api/test_trunk_details.py index b51025bb..972f2168 100644 --- a/neutron/tests/tempest/api/test_trunk_details.py +++ b/neutron_tempest_plugin/api/test_trunk_details.py @@ -14,7 +14,7 @@ from tempest.lib import decorators -from neutron.tests.tempest.api import test_trunk +from neutron_tempest_plugin.api import test_trunk class TestTrunkDetailsJSON(test_trunk.TrunkTestJSONBase): diff --git a/neutron/tests/tempest/api/test_trunk_negative.py b/neutron_tempest_plugin/api/test_trunk_negative.py similarity index 99% rename from neutron/tests/tempest/api/test_trunk_negative.py rename to neutron_tempest_plugin/api/test_trunk_negative.py index b34b5fd6..699b26f5 100644 --- a/neutron/tests/tempest/api/test_trunk_negative.py +++ b/neutron_tempest_plugin/api/test_trunk_negative.py @@ -17,7 +17,7 @@ from tempest.lib import decorators from tempest.lib import exceptions as lib_exc import testtools -from neutron.tests.tempest.api import test_trunk +from neutron_tempest_plugin.api import test_trunk class TrunkTestJSON(test_trunk.TrunkTestJSONBase): diff --git a/neutron/tests/tempest/api/__init__.py b/neutron_tempest_plugin/common/__init__.py similarity index 100% rename from neutron/tests/tempest/api/__init__.py rename to neutron_tempest_plugin/common/__init__.py diff --git a/neutron/tests/tempest/common/constants.py b/neutron_tempest_plugin/common/constants.py similarity index 100% rename from neutron/tests/tempest/common/constants.py rename to neutron_tempest_plugin/common/constants.py diff --git a/neutron/tests/tempest/common/qos_consts.py b/neutron_tempest_plugin/common/qos_consts.py similarity index 100% rename from neutron/tests/tempest/common/qos_consts.py rename to neutron_tempest_plugin/common/qos_consts.py diff --git a/neutron/tests/tempest/common/ssh.py b/neutron_tempest_plugin/common/ssh.py similarity index 95% rename from neutron/tests/tempest/common/ssh.py rename to neutron_tempest_plugin/common/ssh.py index 095a12de..b919b658 100644 --- a/neutron/tests/tempest/common/ssh.py +++ b/neutron_tempest_plugin/common/ssh.py @@ -14,7 +14,7 @@ from tempest.lib.common import ssh -from neutron.tests.tempest import config +from neutron_tempest_plugin import config class Client(ssh.Client): diff --git a/neutron/tests/tempest/common/tempest_fixtures.py b/neutron_tempest_plugin/common/tempest_fixtures.py similarity index 100% rename from neutron/tests/tempest/common/tempest_fixtures.py rename to neutron_tempest_plugin/common/tempest_fixtures.py diff --git a/neutron/tests/tempest/common/utils.py b/neutron_tempest_plugin/common/utils.py similarity index 97% rename from neutron/tests/tempest/common/utils.py rename to neutron_tempest_plugin/common/utils.py index 2e411fa5..ecccd187 100644 --- a/neutron/tests/tempest/common/utils.py +++ b/neutron_tempest_plugin/common/utils.py @@ -18,15 +18,18 @@ """Utilities and helper functions.""" -import threading import eventlet +import threading +import time + class classproperty(object): def __init__(self, f): self.func = f def __get__(self, obj, owner): - return self.func(owner) + return self.func(owner) + class WaitTimeout(Exception): """Default exception coming from wait_until_true() function.""" @@ -47,6 +50,7 @@ class LockWithTimer(object): def time_to_wait(self): return self.timestamp - time.time() + self._threshold + def wait_until_true(predicate, timeout=60, sleep=1, exception=None): """ Wait until callable predicate is evaluated as True diff --git a/neutron/tests/tempest/config.py b/neutron_tempest_plugin/config.py similarity index 100% rename from neutron/tests/tempest/config.py rename to neutron_tempest_plugin/config.py diff --git a/neutron/tests/tempest/exceptions.py b/neutron_tempest_plugin/exceptions.py similarity index 100% rename from neutron/tests/tempest/exceptions.py rename to neutron_tempest_plugin/exceptions.py diff --git a/neutron/tests/tempest/plugin.py b/neutron_tempest_plugin/plugin.py similarity index 89% rename from neutron/tests/tempest/plugin.py rename to neutron_tempest_plugin/plugin.py index 12a01ee5..fc41bdd5 100644 --- a/neutron/tests/tempest/plugin.py +++ b/neutron_tempest_plugin/plugin.py @@ -18,14 +18,12 @@ import os from tempest.test_discover import plugins -import neutron - class NeutronTempestPlugin(plugins.TempestPlugin): def load_tests(self): base_path = os.path.split(os.path.dirname( - os.path.abspath(neutron.__file__)))[0] - test_dir = "neutron/tests/tempest" + os.path.abspath(__file__)))[0] + test_dir = "neutron_tempest_plugin" full_test_dir = os.path.join(base_path, test_dir) return full_test_dir, base_path diff --git a/neutron/tests/tempest/api/admin/__init__.py b/neutron_tempest_plugin/scenario/__init__.py similarity index 100% rename from neutron/tests/tempest/api/admin/__init__.py rename to neutron_tempest_plugin/scenario/__init__.py diff --git a/neutron/tests/tempest/scenario/base.py b/neutron_tempest_plugin/scenario/base.py similarity index 98% rename from neutron/tests/tempest/scenario/base.py rename to neutron_tempest_plugin/scenario/base.py index 3c895868..e8104907 100644 --- a/neutron/tests/tempest/scenario/base.py +++ b/neutron_tempest_plugin/scenario/base.py @@ -21,10 +21,10 @@ from tempest.lib.common.utils import data_utils from tempest.lib.common.utils import test_utils from tempest.lib import exceptions as lib_exc -from neutron.tests.tempest.api import base as base_api -from neutron.tests.tempest.common import ssh -from neutron.tests.tempest import config -from neutron.tests.tempest.scenario import constants +from neutron_tempest_plugin.api import base as base_api +from neutron_tempest_plugin.common import ssh +from neutron_tempest_plugin import config +from neutron_tempest_plugin.scenario import constants CONF = config.CONF diff --git a/neutron/tests/tempest/scenario/constants.py b/neutron_tempest_plugin/scenario/constants.py similarity index 100% rename from neutron/tests/tempest/scenario/constants.py rename to neutron_tempest_plugin/scenario/constants.py diff --git a/neutron/tests/tempest/scenario/exceptions.py b/neutron_tempest_plugin/scenario/exceptions.py similarity index 100% rename from neutron/tests/tempest/scenario/exceptions.py rename to neutron_tempest_plugin/scenario/exceptions.py diff --git a/neutron/tests/tempest/scenario/test_basic.py b/neutron_tempest_plugin/scenario/test_basic.py similarity index 92% rename from neutron/tests/tempest/scenario/test_basic.py rename to neutron_tempest_plugin/scenario/test_basic.py index 9006c44d..d825e15e 100644 --- a/neutron/tests/tempest/scenario/test_basic.py +++ b/neutron_tempest_plugin/scenario/test_basic.py @@ -14,8 +14,8 @@ # under the License. from tempest.lib import decorators -from neutron.tests.tempest import config -from neutron.tests.tempest.scenario import base +from neutron_tempest_plugin import config +from neutron_tempest_plugin.scenario import base CONF = config.CONF diff --git a/neutron/tests/tempest/scenario/test_dvr.py b/neutron_tempest_plugin/scenario/test_dvr.py similarity index 96% rename from neutron/tests/tempest/scenario/test_dvr.py rename to neutron_tempest_plugin/scenario/test_dvr.py index 0b032764..3da06948 100644 --- a/neutron/tests/tempest/scenario/test_dvr.py +++ b/neutron_tempest_plugin/scenario/test_dvr.py @@ -15,9 +15,9 @@ from tempest.lib import decorators from tempest import test -from neutron.tests.tempest import config -from neutron.tests.tempest.scenario import base from neutron_lib import constants +from neutron_tempest_plugin import config +from neutron_tempest_plugin.scenario import base CONF = config.CONF diff --git a/neutron/tests/tempest/scenario/test_floatingip.py b/neutron_tempest_plugin/scenario/test_floatingip.py similarity index 96% rename from neutron/tests/tempest/scenario/test_floatingip.py rename to neutron_tempest_plugin/scenario/test_floatingip.py index fe6ce3ea..97bfcc5e 100644 --- a/neutron/tests/tempest/scenario/test_floatingip.py +++ b/neutron_tempest_plugin/scenario/test_floatingip.py @@ -21,10 +21,10 @@ from tempest import test import testscenarios from testscenarios.scenarios import multiply_scenarios -from neutron.tests.tempest.common import ssh -from neutron.tests.tempest import config -from neutron.tests.tempest.scenario import base -from neutron.tests.tempest.scenario import constants +from neutron_tempest_plugin.common import ssh +from neutron_tempest_plugin import config +from neutron_tempest_plugin.scenario import base +from neutron_tempest_plugin.scenario import constants CONF = config.CONF diff --git a/neutron/tests/tempest/scenario/test_migration.py b/neutron_tempest_plugin/scenario/test_migration.py similarity index 98% rename from neutron/tests/tempest/scenario/test_migration.py rename to neutron_tempest_plugin/scenario/test_migration.py index 4951c619..291611c3 100644 --- a/neutron/tests/tempest/scenario/test_migration.py +++ b/neutron_tempest_plugin/scenario/test_migration.py @@ -16,8 +16,8 @@ from tempest.lib import decorators from tempest import test -from neutron.tests.tempest.scenario import base -from neutron.tests.tempest.scenario import test_dvr +from neutron_tempest_plugin.scenario import base +from neutron_tempest_plugin.scenario import test_dvr class NetworkMigrationTestBase(base.BaseTempestTestCase, diff --git a/neutron/tests/tempest/scenario/test_portsecurity.py b/neutron_tempest_plugin/scenario/test_portsecurity.py similarity index 95% rename from neutron/tests/tempest/scenario/test_portsecurity.py rename to neutron_tempest_plugin/scenario/test_portsecurity.py index 76b23a41..257627c6 100644 --- a/neutron/tests/tempest/scenario/test_portsecurity.py +++ b/neutron_tempest_plugin/scenario/test_portsecurity.py @@ -14,8 +14,8 @@ from tempest.lib import decorators -from neutron.tests.tempest import config -from neutron.tests.tempest.scenario import base +from neutron_tempest_plugin import config +from neutron_tempest_plugin.scenario import base CONF = config.CONF diff --git a/neutron/tests/tempest/scenario/test_qos.py b/neutron_tempest_plugin/scenario/test_qos.py similarity index 91% rename from neutron/tests/tempest/scenario/test_qos.py rename to neutron_tempest_plugin/scenario/test_qos.py index 772996fa..d93f57fc 100644 --- a/neutron/tests/tempest/scenario/test_qos.py +++ b/neutron_tempest_plugin/scenario/test_qos.py @@ -21,14 +21,14 @@ from tempest.lib import decorators from tempest.lib import exceptions from tempest import test -from neutron.tests.tempest.common import utils -from neutron.tests.tempest.common import qos_consts -from neutron.tests.tempest.api import base as base_api -from neutron.tests.tempest.common import ssh -from neutron.tests.tempest import config -from neutron.tests.tempest.scenario import base -from neutron.tests.tempest.scenario import constants -from neutron.tests.tempest.scenario import exceptions as sc_exceptions +from neutron_tempest_plugin.api import base as base_api +from neutron_tempest_plugin.common import qos_consts +from neutron_tempest_plugin.common import ssh +from neutron_tempest_plugin.common import utils +from neutron_tempest_plugin import config +from neutron_tempest_plugin.scenario import base +from neutron_tempest_plugin.scenario import constants +from neutron_tempest_plugin.scenario import exceptions as sc_exceptions CONF = config.CONF LOG = logging.getLogger(__name__) @@ -154,9 +154,9 @@ class QoSTest(base.BaseTempestTestCase): CONF.validation.image_ssh_user, pkey=self.keypair['private_key']) policy = self.os_admin.network_client.create_qos_policy( - name='test-policy', - description='test-qos-policy', - shared=True) + name='test-policy', + description='test-qos-policy', + shared=True) policy_id = policy['policy']['id'] self.os_admin.network_client.create_bandwidth_limit_rule( policy_id, max_kbps=constants.LIMIT_KILO_BITS_PER_SECOND, diff --git a/neutron/tests/tempest/scenario/test_trunk.py b/neutron_tempest_plugin/scenario/test_trunk.py similarity index 97% rename from neutron/tests/tempest/scenario/test_trunk.py rename to neutron_tempest_plugin/scenario/test_trunk.py index 1c6cd5e1..95906a0e 100644 --- a/neutron/tests/tempest/scenario/test_trunk.py +++ b/neutron_tempest_plugin/scenario/test_trunk.py @@ -20,11 +20,11 @@ from tempest.lib import decorators from tempest import test import testtools -from neutron.tests.tempest.common import utils -from neutron.tests.tempest.common import ssh -from neutron.tests.tempest import config -from neutron.tests.tempest.scenario import base -from neutron.tests.tempest.scenario import constants +from neutron_tempest_plugin.common import ssh +from neutron_tempest_plugin.common import utils +from neutron_tempest_plugin import config +from neutron_tempest_plugin.scenario import base +from neutron_tempest_plugin.scenario import constants LOG = logging.getLogger(__name__) CONF = config.CONF diff --git a/neutron/tests/tempest/common/__init__.py b/neutron_tempest_plugin/services/__init__.py similarity index 100% rename from neutron/tests/tempest/common/__init__.py rename to neutron_tempest_plugin/services/__init__.py diff --git a/neutron/tests/tempest/scenario/__init__.py b/neutron_tempest_plugin/services/network/__init__.py similarity index 100% rename from neutron/tests/tempest/scenario/__init__.py rename to neutron_tempest_plugin/services/network/__init__.py diff --git a/neutron/tests/tempest/services/__init__.py b/neutron_tempest_plugin/services/network/json/__init__.py similarity index 100% rename from neutron/tests/tempest/services/__init__.py rename to neutron_tempest_plugin/services/network/json/__init__.py diff --git a/neutron/tests/tempest/services/network/json/network_client.py b/neutron_tempest_plugin/services/network/json/network_client.py similarity index 99% rename from neutron/tests/tempest/services/network/json/network_client.py rename to neutron_tempest_plugin/services/network/json/network_client.py index 358dd64d..48b537dd 100644 --- a/neutron/tests/tempest/services/network/json/network_client.py +++ b/neutron_tempest_plugin/services/network/json/network_client.py @@ -17,7 +17,7 @@ from six.moves.urllib import parse as urlparse from tempest.lib.common import rest_client as service_client from tempest.lib import exceptions as lib_exc -from neutron.tests.tempest import exceptions +from neutron_tempest_plugin import exceptions class NetworkClientJSON(service_client.RestClient): diff --git a/setup.cfg b/setup.cfg index 2fb5c94f..b0b7405c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] -name = openstack -summary = Tempest plugin neutron_tempest_plugin +name = neutron_tempest_plugin +summary = Tempest plugin for Neutron Project description-file = README.rst author = OpenStack @@ -21,7 +21,7 @@ classifier = [files] packages = - neutron + neutron_tempest_plugin [build_sphinx] all-files = 1 @@ -37,15 +37,15 @@ directory = neutron/locale domain = neutron [update_catalog] -domain = neutron -output_dir = neutron/locale -input_file = neutron/locale/neutron_tempest_plugin.pot +domain = neutron_tempest_plugin +output_dir = neutron_tempest_plugin/locale +input_file = neutron_tempest_plugin/locale/neutron_tempest_plugin.pot [extract_messages] keywords = _ gettext ngettext l_ lazy_gettext mapping_file = babel.cfg -output_file = neutron/locale/neutron_tempest_plugin.pot +output_file = neutron_tempest_plugin/locale/neutron_tempest_plugin.pot [entry_points] tempest.test_plugins = - neutron_tests = neutron.tests.tempest.plugin:NeutronTempestPlugin + neutron_tests = neutron_tempest_plugin.plugin:NeutronTempestPlugin diff --git a/tox.ini b/tox.ini index c8889926..74c85e55 100644 --- a/tox.ini +++ b/tox.ini @@ -32,9 +32,22 @@ commands = commands = oslo_debug_helper {posargs} [flake8] -# E123, E125 skipped as they are invalid PEP-8. - -show-source = True -ignore = E123,E125 -builtins = _ -exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build +# E125 continuation line does not distinguish itself from next logical line +# E126 continuation line over-indented for hanging indent +# E128 continuation line under-indented for visual indent +# E129 visually indented line with same indent as next logical line +# E265 block comment should start with '# ' +# H404 multi line docstring should start with a summary +# H405 multi line docstring summary not separated with an empty line +# N530 direct neutron imports not allowed +# TODO(ihrachys) figure out what to do with N534 and N536 +# N534 Untranslated exception message +# N536 Use assertIsNone rather than assertEqual to check for None values +ignore = E125,E126,E128,E129,E265,H404,H405,N530,N534,N536 +# H106: Don't put vim configuration in source files +# H203: Use assertIs(Not)None to check for None +# H904: Delay string interpolations at logging calls +enable-extensions=H106,H203,H904 +show-source = true +exclude = ./.*,build,dist,doc +import-order-style = pep8