Commit Graph

89 Commits

Author SHA1 Message Date
Takashi Kajinami 2d93d2e1ed Bump hacking
hacking 3.0.x is too old.

This also pulls the hacking options from neutron.

Change-Id: Ic1a428a05131f98d5a9050b83613c5478904f202
2024-01-30 18:09:53 +09:00
Slawek Kaplonski 52653c95e0 Remove the CLI code from the Neutron client.
This project no longer provides CLI support. All code has been
removed. Please use openstack CLI instead

This patch removes entry point for neutron CLI too, bash completion
script and CLI related functional and unit tests but it
still keeps neutronclient/neutron/v2_0 module as this is used by e.g.
Nova.

Co-Authored-By: Slawek Kaplonski <skaplons@redhat.com>

Closes-Bug: #2003861
Change-Id: I5b6c735d1ff931d7991a42b262e7faa47b75edeb
2023-04-11 13:12:45 +02:00
elajkat 33f1c89a84 Tox4: add allowlist_externals where necessary
With tox4 allowlist_externals is more strictly checked, so
fix it where necessary and fix pylint version.

Depends-On: https://review.opendev.org/c/zuul/zuul-jobs/+/866943
Related-Bug: #1999558

Change-Id: Id115a436b95b3ede5a1f3102b4bb9e3ade75c970
2023-01-16 08:34:36 +00:00
Ghanshyam Mann 143db0177a 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: I9a985c439675dc3aa6120a0d9734b8cdeaedccf8
2022-04-30 20:28:29 -05:00
Rodolfo Alonso Hernandez 28628e8f96 Skip B105 pep8 error: hardcoded passwords
Skip B105 pep8 error:
* https://bandit.readthedocs.io/en/latest/plugins/b105_hardcoded_password_string.html
* https://cwe.mitre.org/data/definitions/259.html

Trivial-Fix

Change-Id: I8e58da2d88d727018c8d5af5949e34f8c0893c1f
2022-03-03 00:26:29 +00:00
dengzhaosen 517bef2c54 Update python testing classifier
Yoga testing runtime[1] has been updated to add py39
testing as voting. Unit tests update are handled by the
job template change in openstack-zuul-job

- https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/820286

this commit updates the classifier in setup.cfg file.

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

Change-Id: Iedb1c345df99ae9be5cce22ab930c6de7a5e7832
2021-12-24 09:36:50 +08:00
wu.shiming d6c211c139 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: I83717c5b2661df0d4288699903c38814cefb43d9
2021-06-03 07:00:38 +00:00
wu.shiming 1a1ee061e8 Dep's should be restricted by tox-constraints
Tox trying to install latest versions for building docs which may
not be supported by stable and lower branches, so should be
restricted by respective version's tox-constraints.txt

Change-Id: Iecd29788d1c94fd727072aa5dd7fe5d828dbf174
2020-11-20 14:36:46 +08:00
likui 49c8577d8b Update requirements URLs in tox config
Update the URL to the upper-constraints file to point to the redirect
rule on releases.openstack.org so will switch to the correct
upper-constraints list automatically when the requirements repository branches.

Change-Id: I496dfbc709ecd864f619618252ef5dc992216ca7
2020-11-02 16:11:10 +08:00
Sean McGinnis fdfa615b8e
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: I026ae0fae10114d9aed8bdb0ae7061b3dc2ff895
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-24 10:25:56 -05:00
Akihiro Motoki 010053df07 Drop python 2.7 support
We no longer support python 2.7 past Train.
Let's stop testings with python 2.7 and drop python 2.7 stuffs.

pypy in tox.ini is also dropped too. It is not used for long.

Change-Id: I8a07c007a129cd2141085a1a3cc7f81658c42db2
2019-12-17 14:46:06 +09:00
Akihiro Motoki d6c78a5d39 PDF documentation build
Change-Id: I0abc5df1dfde23756bc2fd78631141ba685dc6fe
Story: 2006099
Task: 35139
2019-09-05 12:27:30 +00:00
Akihiro Motoki 1a8fdf355d Switch functional job to python3
Change-Id: I7aa4566b8f2c81da6a00e664908506f5628cd0a1
2019-07-24 23:00:09 +09:00
Akihiro Motoki 6330cc1980 Convert legacy functional jobs to zuulv3
This commit merges the legacy functional test jobs (core and adv-svcs)
into neutronclient-functional. FWaaS v1 was dropped in Stein and
adv-svcs job now checks only VPNaaS, so it looks too much to have
a separate job for VPNaaS.

Note that tls-proxy is disabled as the base class for functional tests
(neutronclient.tests.functional.base.ClientTestBase) does not support
HTTPS endpoints. This can be tackled separately.

Change-Id: I714efd1bc14cbba85f7b4caf6834ce375ff89547
2019-07-24 22:42:54 +09:00
Corey Bryant cf95be3ea5 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: If79694b32ece897c93d1889da28daff641e46f1c
Story: #2005924
Task: #34225
2019-07-08 08:14:07 +00:00
Zuul 209e1801ac Merge "Replace git.openstack.org URLs with opendev.org URLs" 2019-05-02 04:23:04 +00:00
jacky06 9a91b4ad38 Replace git.openstack.org URLs with opendev.org URLs
Change-Id: I3cc418bd8219a3d4f3ab5c018adf06b66ef36b46
2019-04-28 14:25:39 +08:00
Ghanshyam Mann da62ba3029 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: I612c7c40e07f23afa920c92bf4b51b278282dd9d
2019-04-15 16:33:41 +00:00
Akihiro Motoki c2ac394a88 Remove basepython from [flake8] section
basepython is not a valid option for flake8 and
it is complaned when running tox -e pep8.
It seems to have been added accidentally.

Change-Id: Ia5d093bab0c175b2693e7ae47a6bc29c1d44db36
2019-01-31 10:47:44 +09:00
huang.zhiping da7e2916bc Update min tox version to 2.3.2
The commands used by constraints need at least tox 2.3.2.  Update to
reflect reality, which should help with local running of constraints
targets.

Change-Id: I22dec4ff510123520a2c035c3fa1c80f18ce4cdd
Closes-Bug:  #1801360
2018-11-12 06:33:17 +00:00
Vieri 5f69719096 Don't quote {posargs} in tox.ini
Quotes around {posargs} cause the entire string to be combined into one
arg that gets passed to stestr. This prevents passing multiple args
(e.g. '--concurrency=16 some-regex')

Change-Id: I30687b4bcdacb167599b54b6f07e018363980fc7
2018-10-09 13:59:43 +00:00
Vu Cong Tuan 259c386d42
Switch to stestr
According to Openstack summit session [1],
stestr is maintained project to which all Openstack projects should migrate.
Let's switch to stestr as other projects have already moved to it.

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

Change-Id: Ib58745d5c0d98fb79eb3cf7278c2cbfb5160efcd
2018-09-06 01:09:28 +02:00
Doug Hellmann f0640571d1 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.

Co-Authored-By: Nguyen Hai <nguyentrihai93@gmail.com>
Change-Id: I6f4a539c68b036474be4ba433cb28293c0ce94e2
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-08-29 04:30:08 +00:00
Kim Bao Long bcf895cbe3 Add B303 into list of skipped bandit plugins
Blacklist call of hashlib.sha1 was blacklisted in bandit
with [1] and it is now added to list of skipped tests in
Neutron Client.

[1] PyCQA/bandit@35e3544

Change-Id: I8322d0666528323df8b1214306be4b80c4b0777a
2018-08-23 17:24:37 +07:00
jessegler 834ad176ea Add bandit to pep8 gate
Neutron uses bandit to detect security issues. This patch adds bandit
to the pep8 gate to automatically lint for security issues in
python-neutronclient.

Change-Id: Ifd8caf65cc89e7d6d6ebc8f58539741cfbab839b
2018-06-13 15:05:52 -05:00
Nguyen Hai 1dcd1f83d2 Follow the new PTI for document build
For compliance with the Project Testing Interface as described in:
https://governance.openstack.org/tc/reference/project-testing-interface.html
http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html
http://lists.openstack.org/pipermail/openstack-dev/2018-March/128594.html

Depends-On: https://review.openstack.org/#/c/559315/
Depends-On: https://review.openstack.org/#/c/559332/

Change-Id: Icbdc67dab1853162b1a877891195cc26b4873cb0
2018-04-06 14:29:05 +00:00
Doug Hellmann 5614348844 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: I4616b8e1472a6f95e245abe79faaa5669ac2496a
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-03-22 17:56:57 -04:00
Andreas Jaeger 96f5b3bbfc Avoid tox_install.sh for constraints support
We do not need tox_install.sh, pip can handle constraints itself
and install the project correctly. Thus update tox.ini and remove
the now obsolete tools/tox_install.sh file.

This follows https://review.openstack.org/#/c/508061 to remove
tools/tox_install.sh.

Change-Id: I1e72cf7084ed0b6fcd3c5df1f31b3fa6c7734d31
2017-12-02 17:07:47 +00:00
Cao Xuan Hoang f4c0468b36 Use flake8-import-order plugin
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.

Change-Id: I61e683ab0119e4ae90b7107f0690528d789e3875
2017-07-06 16:47:49 +07:00
Jenkins 196474f6f3 Merge "Handle log message interpolation by the logger" 2017-04-16 12:10:50 +00:00
Gábor Antal 6df0b27ee4 Handle log message interpolation by the logger
According to OpenStack Guideline[1], logged string message
should be interpolated by the logger.

[1]: http://docs.openstack.org/developer/oslo.i18n/guidelines.html#adding-variables-to-log-messages

Change-Id: I5146c62cfd7e05270c5bf8ebc3ebab3908f1f1ca
Closes-Bug: #1661262
Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
2017-03-06 05:43:07 +09:00
kavithahr 49710e71f7 Python 3.4 support is removed
In setup.cfg and tox.ini the python 3.4 is removed
beacuse python 3.5 is available.

Change-Id: I176d7fce4778aa7a1d4d93924d4c8785233fa7ef
2017-03-08 17:24:48 +05:30
Jenkins caf4cb8820 Merge "Enable DeprecationWarning in test environments" 2016-08-30 09:19:54 +00:00
AvnishPal 41701862fd Use upper constraints for all jobs in tox.ini
Openstack infra now supports upper constraints for
all jobs. Updated tox.ini to use upper constraints
for all jobs.

Change-Id: I94f57e294a7de91d45c26b1f90caad67b0974718
Closes-Bug: #1614361
2016-08-22 15:15:36 +05:30
Henry Gessau bca532b674 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.

Depends-On: Ibeabf474194b2d38273d76117a3a2f3bee5f7286
Change-Id: Iab8171ac0943c774be0d2117ac442f2e153b3c7f
2016-08-17 16:06:38 +00:00
zheng yin 9f78b6320d Add Python 3.5 classifier and venv
There is a passing gate job, we can claim support for Python 3.5
in the classifier. This patch also adds the convenience py35 venv.

Change-Id: I595320fb8b8e97951b8d445a14eb4f5a311a151f
2016-08-03 12:02:42 +08:00
xiaosheng bbb7a88df4 Trivial: ignore openstack/common in flake8 exclude list
The directory openstack/common doesn't exist any more.
So remove it from flake8 exclude list.

Change-Id: I04da2e6b9ed81a82bcee5e0e2510fd451dd2cb07
2016-05-28 16:29:39 +08:00
Ihar Hrachyshka 78d778cdec Constraint tox targets with upper-constraints.txt
Client version pin is maintained in upper-constraints.txt file, so we
should replace it in the file with source based specifier before
applying it to pip install, otherwise pip fails with:

Could not satisfy constraints for 'python-neutronclient': installation
from path or url cannot be constrained to a version

Change-Id: I33302cdcab980a42c39dc9ec1e430add459615ff
Closes-Bug: #1583050
2016-05-19 09:49:36 +00:00
Jenkins 2fc5ed63a0 Merge "Delete python bytecode before every test run" 2016-01-08 22:31:13 +00:00
Jenkins c8af63d793 Merge "improve tox -e cover" 2015-12-30 05:47:47 +00:00
Manjeet Singh Bhatia 177d8a581f improve tox -e cover
add coverage report to see test coverage after running tox -e cover.

Change-Id: I9d440f8c2f38893a98a1665009b0bb93ce079edb
2015-12-29 19:14:17 +00:00
shu-mutou 83d61566ce Delete python bytecode before every test run
Because python creates pyc|pyo files and __pycache__
directories during tox runs, certain changes in the tree,
like deletes of files, or switching branches, can create
spurious errors.

The target bytecodes for deletion are in normal directories,
but not in dot started directory.

Change-Id: Iee36c67d2e5e4d9e78b1b1b493030761e0f46e3c
Closes-Bug: #1368661
2015-12-16 17:25:53 +09:00
shu-mutou 8d1990a694 Drop py33 support
"Python 3.3 support is being dropped since OpenStack Liberty."
written in following URL.
https://wiki.openstack.org/wiki/Python3

And already the infra team and the oslo team are dropping py33
support from their projects.

Since we rely on oslo for a lot of our work, and depend on infra
for our CI, we should drop py33 support too.

Change-Id: Ic3bfd32822a5e55d6d056af163075d9b3bdaabd4
Closes-Bug: #1526170
2015-12-15 16:28:20 +09:00
Jenkins d6b9def3b0 Merge "Deprecated tox -downloadcache option removed" 2015-12-14 17:53:41 +00:00
shu-mutou ec4e482731 Fix H405 violations
There are a lot of H405 violation codes.
We need to fix the code for avoiding more violations.

Change-Id: Iaa83626b81a3d8369b16e2b4f394e2bc4628998a
Closes-Bug: #1521899
2015-12-13 05:48:42 +09:00
Ondřej Nový 35e7093243 Deprecated tox -downloadcache option removed
Caching is enabled by default from pip version 6.0

More info:
https://testrun.org/tox/latest/config.html#confval-downloadcache=path
https://pip.pypa.io/en/stable/reference/pip_install/#caching

Change-Id: I25b5b1d463060e821bdc15be03100347cc5f4889
2015-12-11 23:29:15 +01:00
shu-mutou 7ff7e76d21 Remove py26 support
as of mitaka, the infra team won't have the resources available to
reasonably test py26, also the oslo team is dropping py26 support
from their libraries. sine we rely on oslo for a lot of our work,
and depend on infra for our CI, we should drop py26 support too.

Change-Id: I62db55ee1a9e7564a10a7284bd0e401b2cdbc580
Closes-Bug: 1519510
Depends-On: I4a2f860e8138bddb032418ee555e07a6fa0a3f3e
2015-12-02 18:08:23 +09:00
Akihiro Motoki a14a5f9a27 Use sphinx-build -W in [docs] target
Even though [pbr] warnerrors = true is specified,
somehow sphinx warnings are not treated as errors.
If we use sphinx-build, -W option detects document warnings
and it leads to better documentation quality.

Fix a warning in the existing document too.

Change-Id: Icbb39686c7a24f0040d998fb14e14c63613da190
2015-11-28 06:20:48 +09:00
Akihiro Motoki 66b03a8167 Add reno for release notes management
In addition to the convention of releasenotes/source directory
which used in most OpenStack project, we have the release notes
in our developer documents.

Change-Id: Ied07af5ee5c8929e639e17a34b559cebfe419dc4
2015-11-24 07:39:23 +09:00
Paul Michali b915201dbf Enable VPN test cases
With the gate hook changes from Ieeaca1375d68705509f4e05f10cb35c0fa0b9582 and
new jobs from I2db939bf99288c0cdec06cdd49fec3bdc72e5253, this commit does
several things:

    * Moves test modules to tests/functional/core/
    * Moves VPN test cases to new module & places in tests/functional/adv-svcs
    * Modifies tox.ini to support 'functional' and 'functional-adv-svcs' test

This commit will be used to test the experimental jobs, one that runs the
same tests as before, one that runs VPN tests using the VPN DevStack plugin
via the gate-hook.sh.

Modified post test hook so that test results are properly created (was not
seeing results from testr, prior to this).

Goal is to place all advanced services into tests/functional/adv-svcs/ and
use plugins, as needed in the gate hook.

Change-Id: I1e3d19e51a1cbd1bc947bbf9927260cd4d73841a
Depends-On: I2db939bf99288c0cdec06cdd49fec3bdc72e5253
Partial-Bug: 1484148
2015-09-23 09:28:06 -04:00