Commit Graph

183 Commits

Author SHA1 Message Date
elajkat 972f681851 tox: Drop envdir
tox now always recreates an env although the env is shared using envdir
options.
~~~
$ tox -e genpolicy
genpolicy: recreate env because env type changed from
{'name': 'genconfig', 'type': 'VirtualEnvRunner'} to
{'name': 'genpolicy', 'type': 'VirtualEnvRunner'}
~~~

According to the maintainer of tox, this functionality is not intended
to be supported.
https://github.com/tox-dev/tox/issues/425#issuecomment-1011944293

Change-Id: I16073e791defeb3bd454b1c9a4f533e66fe1a260
2024-02-06 11:48:36 +01:00
Rodolfo Alonso Hernandez 8f8b493a28 Bump pylint version to 2.17.4
This is the same version used in Neutron repository.

Change-Id: Icc5376162732b54e5abc8ef15daf06ef53bde8e9
2023-09-28 14:10:43 +00:00
Vasyl Saienko d34ff613d7 Fix pep8 and doc jobs for tox4
Add bash to allowlist_externals

Change-Id: Idb063586fa6e6e0d9c4ecc61fc661338f6759e08
2023-01-18 10:45:48 +00:00
likui 166949f968 Changed minversion in tox to 3.18.0
The patch bumps min version of tox to 3.18.0 in order to
replace tox's whitelist_externals by allowlist_externals option:
https://github.com/tox-dev/tox/blob/master/docs/changelog.rst#v3180-2020-07-23

Change-Id: I4bac7893751ee1c0548b7864d26774fed4f46a99
2022-05-17 18:41:43 +08:00
Zuul 516d31fc2d Merge "Use TOX_CONSTRAINTS_FILE" 2022-05-17 06:39:15 +00:00
Zuul 8422cbc689 Merge "Drop lower-constraints.txt and its testing" 2022-05-12 18:19:54 +00:00
Ghanshyam Mann 4f1f0f7263 Update python testing as per zed cycle teting runtime
In Zed cycle, we have dropped the python 3.6/3.7[1] testing
and its support. Add release notes and update the python
classifier for the same.

[1] https://governance.openstack.org/tc/reference/runtimes/zed.html

Change-Id: I68fded0366a3be3ef5459391982e80c570562735
2022-05-11 22:19:10 -05:00
Ghanshyam Mann 130d6ddf1b Drop lower-constraints.txt and its testing
As discussed in TC PTG[1] and TC resolution[2], we are
dropping the lower-constraints.txt file and its testing.
We will keep lower bounds in the requirements.txt file but
with a note that these are not tested lower bounds and we
try our best to keep them updated.

[1] https://etherpad.opendev.org/p/tc-zed-ptg#L326
[2] https://governance.openstack.org/tc/resolutions/20220414-drop-lower-constraints.html#proposal

Change-Id: Iddb575ef94f8162f8d07f650db4611a5fd07b258
2022-04-30 20:16:07 -05:00
shanyunfan33 c22e4c9215 Use TOX_CONSTRAINTS_FILE
UPPER_CONSTRAINTS_FILE is old name and deprecated
This allows to use upper-constraints file as more
readable way instead of UPPER_CONSTRAINTS_FILE=<lower-constraints file>.

Change-Id: I04ac905b0b01c5a717fc4b168982c8e1e0833264
2021-12-27 09:01:15 +08:00
Akihiro Motoki 7c8262cf50 Fix inconsistency in requirements
The latest pip resolver started to check requirements strictly
and it detects many inconsistencies in neutron-vpnaas requirements.
Also applies the practices discussed in the mailing list [1][2].

* Drop pyflakes from requirements.txt as it is not used.
* Move document dependencies to doc/requirements.txt [1]
  and drop them from lower-constriants.txt.
* Bump MarkupSafe lower-constraint to 1.1.1
  to make it work with newer setuptools.
* Bump the minimum neutron requirement to 17.0.0 (victoria release)
  as the previous min version 13.0.0.0b2 is too old.
  Wallaby and Victoria neutron are not different much, so I think
  it is no problem to use the latest released version here.
* Dependenicy related to neutron min version bump are updated
  in requirements and lower-constraints.
  Note that eventlet 0.22.0 is used as lower-constraints as 0.21.0
  (the min requirement in neutron 17.0.0) is blocked in several libs.
* Move linter dependencies to tox.ini and drop them from
  lower-constraints.txt (pylint, pyflakes, astroid, isort)
* Drop psutil from neutron_vpnaas/tests/functional/requirements.txt
  as the specified version of psutil is too old and psutil is a dependency
  of neutron so we don't need to install it explicitly here.

In addition, hacking version is updated as hacking 0.12.0 is not compatible
with python 3.8. W504 and I202 are ignored as we do in the neutron repo.
Other new flake8 violations are fixed.

[1] http://lists.openstack.org/pipermail/openstack-discuss/2021-January/019611.html
[2] http://lists.openstack.org/pipermail/openstack-discuss/2020-December/019362.html

Change-Id: I47f6d39379b68c4d71fc4d85ebb06d97cb5a6ce2
2021-01-07 05:13:34 +09:00
Sean McGinnis f1c68ac9c0
Bump default tox env from py37 to py38
Python 3.8 is now our highest level supported python runtime.
This updates the default tox target environments to swap out
py37 for py38 to make sure local development testing is
covering this version.

This does not impact zuul jobs in any way, nor prevent local
tests against py37. It just changes the default if none is
explicitly provided.

Change-Id: Ic9f2f0b044a8ab6e6974447dc2d710b3b328bf84
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-24 10:25:46 -05:00
Slawek Kaplonski 5da7b0176b Migrate functional tests job to the zuul v3 syntax
It migrates neutron-vpnaas-dsvm-functional-sswan job to the native
Zuulv3 syntax and renames it to be "neutron-vpnaas-functional-sswan".

Change-Id: Ibe6ac8677ace52e08edb7e47f3365616a3e6b29a
2020-03-04 11:43:35 +01:00
Bernard Cafarelli 7d851c6401
Drop python 2 support and testing
This is part of Ussuri goal tracked for Neutron stadium at:
https://etherpad.openstack.org/p/neutron-train-zuulv3-py27drop

Change-Id: Idcbecc3ee3e2140cdff45a58cd4628064f17181f
2019-12-17 15:04:40 +01:00
Zuul 06605a2282 Merge "PDF documentation build" 2019-09-30 04:39:17 +00:00
Akihiro Motoki 811602c374 PDF documentation build
Change-Id: I72ae5388b5f51d0072cd1b529562965433d1a139
Story: 2006099
Task: 35135
2019-09-26 15:24:59 +09:00
Corey Bryant 5f23fa809c Add Python 3 Train unit tests
This is a mechanically generated patch to ensure unit testing is in place
for all of the Tested Runtimes for Train.

See the Train python3-updates goal document for details:
https://governance.openstack.org/tc/goals/train/python3-updates.html

Change-Id: I1094b5f7c166b30e210c540c2e420d8e86894046
Story: #2005924
Task: #34225
2019-07-05 13:54:27 -04:00
Slawek Kaplonski 6b8d0a438e Switch functional tests jobs to python3
This commit changes default python used in dsvm-functional and
dsvm-functional-sswan jobs.

Change-Id: Ic5132f828a44f4b5474abf60519c7d7e4a731fc6
2019-06-11 10:43:41 +00:00
Zuul 58813f5306 Merge "Replace git.openstack.org URLs with opendev.org URLs" 2019-05-11 12:24:04 +00:00
caoyuan e69c508770 Replace git.openstack.org URLs with opendev.org URLs
Change-Id: Idf2aeff4939079743dfae567ea15193b971af464
2019-05-11 12:49:37 +08:00
Ghanshyam Mann 5b5b063519 Dropping the py35 testing
All the integration testing has been moved to
Bionic now[1] and py3.5 is not tested runtime for
Train or stable/stein[2].

As per below ML thread, we are good to drop the py35
testing now:
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/005097.html

[1] http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004647.html
[2]
https://governance.openstack.org/tc/reference/runtimes/stein.html
https://governance.openstack.org/tc/reference/runtimes/train.html

Change-Id: If536a6a251145a3923dfa692b3477d23797bf132
2019-04-15 02:36:26 +00:00
Akihiro Motoki b0c4a6aefb Convert policy.json into policy-in-code
This commit defines the default policies in code. VPNaaS has
no policy.json so far, so all policy definitions are newly created.

Partially Implements: blueprint neutron-policy-in-code

Change-Id: Ic0bf99b69a792197399e38ace6d23ea18874892a
2019-01-07 16:38:16 +00:00
Nguyen Hai Truong c7a6017d40 Update min tox version to 2.3.2
After latest changes on tox.ini, the minimum
version of tox need to be changed to 2.3.2.

https://bugs.launchpad.net/neutron/+bug/1695888
I458cf0d5e8927cf11a44b49ecfb5178a228aafaf

Change-Id: I62991679465a52710b8c24af80fdb311c1e26969
2018-11-09 01:03:04 +07:00
Zuul ad936755d9 Merge "fix tox python3 overrides" 2018-10-05 17:07:36 +00:00
Doug Hellmann f55e503dc8 fix tox python3 overrides
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.

We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.

We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.

Change-Id: Iccd8b6a73946d841a383ac9558fec3ae031373cd
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-09-26 18:58:30 -04:00
Boden R d1d60b93bc add local pep8 tox target
This patch adds the pep8-dev tox target for running pep8 locally as per
[1]. In addition it updates the pylint version to work with python 3.x
and addresses some pylint errors in the code.

[1] https://etherpad.openstack.org/p/neutron-sibling-setup

Change-Id: I7bd4d8e75601a7291692d6256925f46fb4fa5464
2018-09-26 09:18:01 -06:00
Doug Hellmann eaa2d1a4eb switch documentation job to new PTI
This is a mechanically generated patch to switch the documentation
jobs to use the new PTI versions of the jobs as part of the
python3-first goal.

See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html

Fix tox.ini html files in right place.

Change-Id: I8493a3ef704b1da458153a8da3f9b26145f5bff2
Story: #2002586
Task: #24314
2018-09-12 14:58:09 +02:00
Boden R bb165298e0 add py3-dev tox target and update lower constraints zuul job
This patch adds a py3-dev tox target for running py3 UTs locally.
It also updates the local .zuul.yaml for a neutron-vpnaas specific
lower constraints job that ensure neutron/master is installed.

Change-Id: Iab9f134b17b56d765d5ac523d9b5a4b4d4e00fb7
Partial-Bug: #1779335
2018-07-24 04:11:04 +00:00
Slawek Kaplonski 83db537dc6 Switch to stestr
According to Openstack summit session [1] stestr is
maintained project to which all Openstack projects
should migrate.
Let's switch it then.

[1] https://etherpad.openstack.org/p/YVR-python-pti

Change-Id: Ia4c71631e4c51ec814bcefc115d4f5690c11e37b
2018-06-28 13:07:54 +00:00
Akihiro Motoki 38d53da188 Improve docs to follow the standard structure
neutron-vpnaas documentation needed to be updated to the document
structure recommended by the docs team.
This commits add several sections and reorganizes the existing docs.

Change-Id: Iae2704f3d0653e00c18cf1fccdbcb8b926a5b15c
2018-04-02 02:19:04 +00:00
Doug Hellmann 9233ac27f8 add lower-constraints job
Create a tox environment for running the unit tests against the lower
bounds of the dependencies.

Create a lower-constraints.txt to be used to enforce the lower bounds
in those tests.

Add openstack-tox-lower-constraints job to the zuul configuration.

See http://lists.openstack.org/pipermail/openstack-dev/2018-March/128352.html
for more details.

Change-Id: I312f591a68fa30636502eadb563de5656faca3e9
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-03-22 16:37:09 -04:00
Andreas Jaeger 3b5018e793 Avoid tox-install.sh
Instead of using tox-install.sh, we can install horizon and neutron
now directly from pypi - or use the current branch in CI system using
tox-siblings.

Update tox.ini for this change and add neutron to requirements file.

Change-Id: I435297ada6cdeb53a9bd8da8b88714f2c6a838a2
2018-03-16 02:48:57 +00:00
Cao Xuan Hoang 4dc446542d Enable some off-by-default checks
Some of the available checks are disabled by default, like:
[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

Change-Id: I7450cd259fffa2a97fcb28cc61727532478eeccb
2017-07-21 09:57:46 +07:00
Cao Xuan Hoang d8ba5b7a81 Use flake8-import-order plugin and clean up exceptions
1. In reviews we usually check import grouping but it is boring.
By using flake8-import-order plugin, we can avoid this.
It enforces loose checking so it sounds good to use it.
This flake8 plugin is already used in tempest.

Note that flake8-import-order version is pinned to avoid unexpected
breakage of pep8 job.

Setup for unit tests of hacking rules is tweaked to disable
flake8-import-order checks. This extension assumes an actual file
exists and causes hacking rule unit tests.

2. This patch is also intend to clean up exceptions to avoid
confusing for other developers and the maintenance-ability as well.

Change-Id: I032892f08e073feb5b822d27d092f041b17d57e1
2017-07-11 15:49:52 +07:00
Cao Xuan Hoang 6170ea0c28 Updated comments in tox.ini [flake8]
Change-Id: If768bb26683870491d6414168213e40a95832ec6
2017-05-29 11:31:11 +07:00
Jenkins fa11d99add Merge "Remove log translations from neutron-vpnaas" 2017-04-17 05:49:58 +00:00
Ihar Hrachyshka 6cfc527fc6 Remove subunit-trace fork
This makes tox use the latest version of the tool from os-testr repo,
which contains some valuable changes, like the one making the gate fail
if for some reason no tests are executed because all of them are
skipped.

Change-Id: If88be4b310d746ccc885e3d0c1db8a4dfabb2a28
2017-04-06 11:53:09 -07:00
liuyamin e70f1b02cd Remove log translations from neutron-vpnaas
Log messages are no longer being translated. This removes all use of the
_LE, _LI, and _LW translation markers to simplify logging and to avoid
confusion with new contributions.

See:
http://lists.openstack.org/pipermail/openstack-i18n/2016-November/002574.html
http://lists.openstack.org/pipermail/openstack-dev/2017-March/113365.html

Change-Id: I83e9ab88b0e7084ff828b1c6afaa11bebf532e50
2017-03-24 15:05:28 +08:00
Cao Xuan Hoang 772c4e18b7 Update a py35 environment to tox and classifier
Infra has been running python35 jobs, replaced the python34 jobs.
This is due to the change from Ubuntu Trusty to Xenial, where only
python3.5 is available.

So we update a py35 environment with the same definitions for
skipping not-yet-working checks as we have in place for py34 already.

Change-Id: I3e7fc720ca6bd9df80620d609e9a9603a644673a
2017-02-27 11:49:20 +07:00
Andreas Jaeger c26a4f665a Use temporary directory for neutron install
Do not install in /tmp/openstack/neutron and leave the git repository
there after the script is run - if zuul-cloner is used.

We run jobs on long lived workers and also on developers machines, let's
cleanup afterwards.

Install into a temporary directory that can be removed with "git clean"
afterwards. Add this directory to ignore list of pep8.

Simplify with using pushd/popd.

Also, remove setup of ZUUL_BRANCH, this is not needed with current zuul
anymore.

Sync file with neutron-lbaas.

Change-Id: Id56b9b70fb9c4113f4641e5b3f35ab63cfff6d4e
2016-08-28 18:02:50 +02:00
Ihar Hrachyshka 2941611807 Constrain remaining tox targets
As per [1], we now can constrain targets that are executed in post
queue too.

[1] http://lists.openstack.org/pipermail/openstack-dev/2016-August/101474.html

Change-Id: I02b28d3b354c3b175147c5be36eea4dc7e05f2a3
2016-08-12 11:43:36 +02:00
Henry Gessau 6017a356b7 Enable DeprecationWarning in test environments
Many deprecations are triggered early (on imports, for example)
before the warnings are enabled by the WarningsFixture in the
base test class.

To make sure all DeprecationWarning messages are emitted we enable
them via the PYTHONWARNINGS environment variable.

Change-Id: I1a8c6e305ccb9244eb7c690a93921d0982b3ecbe
2016-08-09 18:58:07 -04:00
chen-li 113c39a75d Fix API Tests
Currently, when we run api tests with command: "tox -e api",
tests are failing with errors.

This change first fixes errors, make api tests pass. Then refactor
the neutron-vpnaas api tests tree to fit the tempest plugin.

As a tempest plugin, the steps to run tests by hands are:

1. Setup a local working environment for running tempest
    tempest init ${your_tempest_dir}

2. Enter ${your_tempest_dir}
    cd ${your_tempest_dir}

3. Check neutron_vpnaas_tests exist in tempest plugins:
    tempest list-plugins
    +----------------------+------------------------------------------------------+
    |         Name         |                      EntryPoint                      |
    +----------------------+------------------------------------------------------+
    |    neutron_tests     |  neutron.tests.tempest.plugin:NeutronTempestPlugin   |
    | neutron_vpnaas_tests | neutron_vpnaas.tests.tempest.plugin:VPNTempestPlugin |
    +----------------------+------------------------------------------------------+

4. Run neutron_vpnaas tests:
    tempest run --regex "^neutron_vpnaas.tests.tempest.api\."

In the jenkins gate,  devstack-gate/devstack-vm-gate-wrap.sh will invoke tempest
with proper configurations, such as:
    DEVSTACK_GATE_TEMPEST=1
    DEVSTACK_GATE_TEMPEST_ALL_PLUGINS=1
    DEVSTACK_GATE_TEMPEST_REGEX="^neutron_vpnaas.tests.tempest.api\."
The actual raw command in gate running under the tempest code directory is:
    tox -eall-plugin -- "^neutron_vpnaas.tests.tempest.api\."

This is a part of activate the API job:
https://review.openstack.org/#/c/337011/

Change-Id: Icdc946bccb77b4c78d161a590de1aa15e0a57139
2016-07-28 20:23:28 -05:00
Doug Wiegley 393d4c6bb8 Switch to using hacking checks from neutron-lib
Temporarily comment out the 'no neutron' check.

Change-Id: I4521132b14e924df76418fe0053ef0be0a3c4c60
Partially-Implements: blueprint neutron-lib
2016-04-24 23:21:53 -05:00
Doug Wiegley 40ca087f58 Don't use zuul-cloner for venv env, for periodic jobs
Partial-Bug: #1568708
Change-Id: I95e8c3818d364f27486411700ad6ab186260e076
2016-04-15 09:20:51 -06:00
Andreas Jaeger cf9e80a16f Fix tox.ini constraints for post jobs
Post jobs are currently failing since constraints are not available but
required by this tox.ini file. Change venv environment to work without
constraints.

Change-Id: I736be6a49f919302c31fc7ebd8251cb0a0d73853
2016-03-05 19:59:21 +01:00
Ihar Hrachyshka b4b22a1f37 Put py34 first in the env order of tox
To solve the problem of "db type could not be determined" on py34 we
have to run first the py34 env, then, run py27. This patch puts py34
first on the tox.ini list of envs to avoid this problem to happen.

Change-Id: I9457f7e05adb77d4b034ef01e7e51d95fc066013
Closes-bug: #1489059
2016-03-03 14:57:55 +01:00
Paul Michali ad122cf23c VPNaaS: Cleanup constraints in tox.ini
Missed changing the envlist to not specify constraints based target
names for master (where constraints are used by default). This
simple commit cleans that up.

Change-Id: I9d11cfd47adae3f49d33e5db8c916ebd983a8f96
Related-Bug: #1522503
2016-02-29 12:47:50 -05:00
Paul Michali 73a6ad9a13 Use constraints on all targets.
The neutron-vpnaas repo already has converted to using constraints for
targets. However, the TC recommendation is to use constraints on the
original job names (pep8, py27,...), instead of using the constrained
names (e.g. pep8-constraints).

A separate commit (I34f0b355703fe0133f160afd4e32f2272d41ecaa) restored
the use of the non-constraint NAMED jobs for Liberty and newer.

This commit modifies those non-constraints targets so that they use
constraints. A manual check was made that each target used the same
package versions for both constraints and non-constraints targets.

Then, after both constraints and non-constraints jobs passed in Jenkins
(before and after the project-config commit was upstreamed), the constraints
based targets were removed from tox.ini.

Note: Found out that infra doesn't support constraints based cover and
releasenotes. Added TODO to these targets so that they can be updated,
if and when constraints are supported.

Note: In the gate hook, config_for_vpn_func_testing.sh calls Neutron's
config_for_func_testing.sh, which will setup files in the venv. To prevent
that script from modifying the VENV variable to have -constraints suffix
and store files in the wrong venv, we turn off USE_CONSTRAINT_ENV, prior
to calling the Neutron script.

Once this is upstreamed, we can backport this fix to Liberty to complete
the effort for this repo.

Change-Id: I4a2410ab80e6018f1b65b2288ae66312eb49cb27
Depends-On: I34f0b355703fe0133f160afd4e32f2272d41ecaa
Partial-Bug: #1522503
2016-02-20 08:27:37 -05:00
Jenkins bac5f45a34 Merge "Switch from testr to ostestr" 2016-02-18 20:49:53 +00:00
Paul Michali 7689ea4ac6 Switch from testr to ostestr
Was seeing py34 (and DSVM) tests failing with an Invocation error, even
though the test passed. Switched to ostestr, as is done in Neutron under
commit 240facf9e67aa5b205679f397107abfe059a869a, and the test passes
(not sure what the root cause is here).

Change-Id: If85987865e0393892c52f319d7cef526c021e0df
2016-02-17 12:43:33 +00:00