Commit Graph

192 Commits

Author SHA1 Message Date
Zuul 293df0f63f Merge "tox: Drop envdir" 2024-02-13 19:30:59 +00:00
elajkat 625b6526ca Bump hacking
hacking 3.0.x is too old.
Try to synchronize pylint ignore and extension list with
other Networking projects.

With new pip the order of packages is not relevant, so the
related comment from requirements.txts is removed, see pip
documentation:
https://pip.pypa.io/en/stable/cli/pip_install/#installation-order

Change-Id: I99a2d30149088d3d71d56351d180e665c38686ef
2024-02-09 09:58:16 +00:00
elajkat fef2d9ee78 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: I069f590d873ea7a0e689936664c07843c2706fd5
2024-02-06 11:46:56 +01:00
elajkat 9c6df04c78 py311: Add py311 job and sqlalchemy-main job to weekly
As an extra rename dsvm-fullstack to dsvm-fullstack-gate

Change-Id: Ib9627a46f95dec0727ccba1d819b84f6ef00041a
2023-10-13 16:44:24 +00:00
yatinkarel f23379938e Use upper-constraints in docs job
Since we use usedevelop=True, as a result neutron-fwaas
installation happens at 'develop-inst' phase and it installs
requirements from requirements.txt without considering
tox constraints, This can lead to issue where broken
requirements are installed in docs job and as a result
it will fail.

In order to get constraints be considered for this case, add
requirements.txt to deps for docs env(same as [1]).

[1 https://review.opendev.org/q/Ic8f6472fe708d12f8fc129729465367083e1095a

Change-Id: Iea9556f6f025ad2f3dfa38fd401aa64414bd561f
2023-02-16 13:51:11 +05:30
elajkat e7518f6fcf tox4: Add ignore_basepython_conflict = True to tox.ini
With latest tox (>4.0.15) python version conflicted with base
python. Adding ignore_basepython_conflict = True solves this
issue.

Change-Id: I4711cdb1741c0348bc81049be53a5480945e7e12
2023-01-09 11:15:36 +01:00
sunxifa e5b3ca7924 Fix tox.ini with tox4
skipsdist setting breaks the docs environment

Change-Id: I191efbec1240ebadee2f030ea45fe09d03fde99e
2022-12-24 05:52:05 +01:00
elajkat 553e6b6411 Adopt to latest VlanManager and oslo.db changes
The work for making routed networks work with multiple segments per
host, introduced new signature for VlanManager.get, requesting
segmentation_id, make neutron-fwaas code compatible with it.

With oslo.db 12.1.0 some unit tests started to fail, with using the
CONTEXT_R/W session we can fix it.

Adopt dsvm-functional target name as [0] changed in Neutron, so the new
name of the target is dsvm-functional-gate.

[0]: https://review.opendev.org/c/openstack/neutron/+/856262

Change-Id: Ie7459974f6f2358c8d9c37e66aa9cda530ecefc0
Related-Bug: #1956435
Related-Bug: #1764738
2022-09-09 17:10:00 +02:00
likui 3bbcc5f8bb 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: Ice25307cb403768f3a7909395773ee38154f46ec
2022-05-17 18:36:10 +08:00
Ghanshyam Mann 1b4a84527c 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: Ib04b560408ccf22c86e899e15fbcbe86b53f636e
2022-05-11 22:18:19 -05:00
Ghanshyam Mann 216df5cf82 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: Icfceba7407e7c775b29e281bdf940653f84f5340
2022-04-30 20:09:59 -05:00
ZhouHeng a9f26b81e2 revive neutron-fwaas project
This reverts commit caae7b6a6f.

Reason for revert:
Many users still need L3 firewalls and Inspur team wants to maintain
this project.
Neutron drivers team discussed the topic of the maintenance of
neutron-fwaas, and agreed to include neutron-fwaas again to Neutron
stadium[1].

Some updates have been made:
Remove use "autonested_transaction" method, see more [2]
Replace "neutron_lib.callbacks.registry.notify" with "registry.publish"
Replace rootwrap execution with privsep context execution.
Ensure db Models and migration scripts are sync, set table
firewall_group_port_associations_v2's two columns nullable=False

[1] https://meetings.opendev.org/meetings/neutron_drivers/2022/neutron_drivers.2022-01-28-14.00.log.html#l-14
[2] https://review.opendev.org/c/openstack/neutron-lib/+/761728

Change-Id: I14f551c199d9badcf25b9e65c954c012326d27cd
2022-03-01 01:01:47 +00:00
Slawek Kaplonski caae7b6a6f Retire neutron-fwaas project
Governance change is proposed at [1] and project config patch is
proposed at [2]

[1] https://review.opendev.org/735828
[2] https://review.opendev.org/#/c/735812/

Change-Id: I561504160e5548c54d1af31821c3366ab34cf0ec
2020-06-16 12:38:31 +02:00
Zuul d9ac7173f1 Merge "Drop Python 2 Support" 2020-01-24 00:10:26 +00:00
caoyuan feb290fa19 Drop Python 2 Support
1. It's Ussuri. We can *finally* stop testing Python 2 [1]. Time to party.
We don't attempt any cleanup but simply stop testing with Python 2,
indicate that we only support Python 3 via 'setup.cfg' and remove any
Python 2 only dependencies.

This should free up a significant amount of resources from the gate and
let us start using Python 3 idioms in our code. Win-win.

2. Cleanup basepython from individual testenv sections

3. From this point on the codebase will be incompatible with python2

[1] https://governance.openstack.org/tc/resolutions/20180529-python2-deprecation-timeline.html#python2-deprecation-timeline

Change-Id: Ia08c363263aaa406d0bf55e10ce8258695387578
2020-01-22 10:53:44 -05:00
Slawek Kaplonski a88d23c797 Remove os-testr leftovers
All projects should be switched to use stestr already. In
neutron-fwaas it is already done but there were some leftovers
after os-testr and this commit removes them.

Change-Id: I7d0c72d1327eedcfd309ec4c346064d0adad6008
2019-11-27 22:30:31 +01:00
Akihiro Motoki 201a2abebe PDF documentation build
The module reference in PDF doc is not easy to read
and the HTML version is much better, so I decided to show
the module reference in HTML doc only.

Change-Id: I914d26ce1b430573020c78af54a38598ae96886b
Story: 2006099
Task: 35129
2019-09-24 16:29:04 +00:00
Zuul e6e5599876 Merge "Add Python 3 Train unit tests" 2019-07-23 21:40:59 +00:00
Slawek Kaplonski 3b7edce284 Switch functional tests to be run using python3
Change-Id: Ia9daa3e7ed6b690bd168eabceb0a380d351f38bf
2019-07-08 23:20:47 +02:00
Slawek Kaplonski e351f264ef Migrate functional tests job to zuul v3
Job is also renamed from "legacy-neutron-fwaas-dsvm-functional" to
"neutron-fwaas-functional"

Change-Id: I2c8cef73df67f13e65ce14e6c5f1192a6bb994b0
2019-07-08 12:20:08 +02:00
Corey Bryant 9f990bf566 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: I41a3562284d472408cbcfb7f6c3b1d261ea385b0
Story: #2005924
Task: #34225
2019-07-05 13:52:31 -04:00
zhulingjie 45a36b8ba8 Update hacking version
Use latest release 1.1.0 and compatible changes w.r.t pep8

Change-Id: Ia5454a92a46fc4fab981fd0b7730244f692504d6
2019-05-31 14:43:39 +08:00
Slawek Kaplonski 9f78072ccc Switch neutron-fwaas-fullstack job to zuulv3 syntax
This patch switches neutron-fwaas-fullstack to Zuul v3 syntax
and to inherits from neutron-fullstack job definition.

It also removed neutron-fwaas-fullstack-python35 job definition as
this job wasn't run anywhere and now as neutron-fwaas-fullstack will
inherits from neutron-fullstack it will run on python 3.

Depends-On: https://review.opendev.org/#/c/647931/

Change-Id: I4c08367d7e0670b3f8219b281af22632d53fcdae
Related-Bug: #1804844
2019-05-24 21:56:57 +02:00
Zuul a662f2e69b Merge "Dropping the py35 testing" 2019-05-22 23:42:33 +00:00
Ghanshyam Mann d93801789e 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: If1cf1c73bf695ed89c5ec4a2107a722fa9d26d3a
2019-05-22 09:06:45 -06:00
caoyuan b81d6cb110 Replace git.openstack.org URLs with opendev.org URLs
Change-Id: Ie69065452e56de091dee39c0eabdf735a9f04095
2019-05-22 13:47:56 +00:00
Yushiro FURUKAWA 0a2bef43e3 Migrate to stestr as unit tests runner
Recent update brought os-testr 1.0.0 that already uses stestr test [1]
runner instead of testrepository. This patch migrates those places using
testrepository to using stestr.

[1] http://lists.openstack.org/pipermail/openstack-dev/2017-September/122135.html

Co-Authored-By: Nate Johnston <nate.johnston@redhat.com>
Change-Id: I36f922799fa5a0ed75f412999922f7d5bab180cc
2019-03-08 12:33:20 +09:00
Akihiro Motoki 68e25e05ce 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.

NOTE: legacy-neutron-fwaas-dsvm-functional is failing.
This needs to be fixed in a separate patch.

Change-Id: I71dc6449c64b9a9f974d83e51423a7c67a42c551
2019-02-20 15:36:08 -05:00
Nate Johnston 36ca752e80 Fix gate issues on master
We recently removed nenutron.common.rpc [1] as the rpc module lives in
neutron-lib now. This project was missed because I didn't find
neutron.common.rpc as an import. This patch switches rpc uses over to
neutron-lib.

This also addresses an issue where toxenv fails when it encounters a
non-empty __pycache__ directory. This adjusts the options passed to
find so that it is tolerant of this scenario and allows tox runs to
proceed.

"rm -rf .tox/lower-constraints/*" in testenv command in tox.ini
is unnecessary, so it is dropped too.

[1] https://review.openstack.org/#/c/634790/

Change-Id: I95490cba503d3f3a61bdc28ef63edc82a3ae1be3
2019-02-19 17:38:28 +09:00
Akihiro Motoki 3288743827 Convert policy.json into policy-in-code
This commit converts the existing neutron-fwaas policy.json
into policy-in-code.

policy.json for testing is also removed. As a result, setup_config()
in neutron_fwaas.tests.base.NeutronDbPluginV2TestCase is no longer
required now (as the content of setup_config() is now same as that
in neutron).

Partially Implements: blueprint neutron-policy-in-code
Change-Id: I67be3a21f19e3f793312d64d358452ee4531c080
2018-12-27 15:31:04 +00:00
Nguyen Hai Truong c0d28ecc2b Add python 3.6 unit test job
This is a mechanically generated patch to add a unit test job running
under Python 3.6 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

Change-Id: I57b0799ad3ee590fe3026734259556717a5e57b9
2018-11-06 22:00:53 +07:00
wanghui 2b685096d0 Update tox minversion to 2.0
Change-Id: I5865c18f587edaa583eca47ce30a648f566ae5b9
2018-10-25 20:07:27 +08:00
Zuul af63d2f481 Merge "Add dependency for generating reno" 2018-10-20 15:03:52 +00:00
Boden R fb14c43da8 add local tox targets for pep8 and py3
This patch adds local tox targets for pep8 and python 3 as per [1]
that will install dependencies in editable mode.
To run them use the pep8-dev and py3-dev targets respectively.

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

Change-Id: Ia4dc72581e4c0bce7c452969078c7abf18abdd4c
2018-09-24 15:23:46 -06:00
Yushiro FURUKAWA 14822da40c Add dependency for generating reno
Change-Id: I5aad88ba631a580aea31427220e48e7a818050be
2018-08-10 17:32:35 +00:00
Szymon Datko ca1c3b76c1 Exclude requirements from doc8
Change-Id: I316c5964c35cfe9129cd8914f229dfc37c7aba10
2018-07-10 20:05:59 +09:00
Zuul 9bff39620b Merge "Check pep8 without ignoring D000" 2018-07-07 05:09:03 +00:00
Zuul cf85e710a6 Merge "Add fullstack testing for neutron-fwaas" 2018-07-06 19:55:38 +00:00
Nguyen Van Trung 1f3bfe2f6f [Gate] Avoid sphinx_build error and fix functional test
Sphinx version 1.7.5 is raised doc build failures. Maybe deps are not
suitable with current sphinx version.

This patch fixes functional test, due to neutron out of date
version and setns() of pynetns doesn't return any open FD anymore [2].

[1] http://lists.openstack.org/pipermail/openstack-dev/2018-April/128986.html
[2] 2e7964f498

Co-Authored-By: Nguyen Phuong An <AnNP@vn.fujitsu.com>
Change-Id: I44c89a4637a6c6b10f374f83ff76fb1225b603b7
2018-07-06 06:24:30 +00:00
Dao Cong Tien b3a0f3bfe4 Check pep8 without ignoring D000
Currently, pep8 ignores D000 check because of error:
"D000 Cannot analyze code. Pygments package not found."

Pygments is supported from:
https://review.openstack.org/#/c/568729/

This patch also changed code-block type from "none" to "ini"
as D000 check does not allow the "none" type.

Change-Id: I05d1d41160ad86589308912ff81c4294983069ff
2018-05-30 09:12:27 +00:00
Nate Johnston 1f971199f1 Add fullstack testing for neutron-fwaas
Add a fullstack testing framework for neutron-fwaas.  This is a basic
first pass just to get the framework deployed; detailed non-plagiaristic
tests will be added after.  For more information on what fullstack
testing is, see:

http://git.openstack.org/cgit/openstack/neutron/tree/TESTING.rst#n213

Includes definition of fullstack job in new zuul syntax.

Co-Authored-By: Reedip Banerjee <reedip14@gmail.com>
Change-Id: I16cd2432606ef9aa6b7bf3e08efe82882e5585d9
2018-05-22 13:12:59 +00:00
Nguyen Hai e4b6f60b53 Follow the new PTI for document build
- Follow new PTI for docs build
- Add sphinxcontrib.apidoc to replace pbr autodoc

REF:
[1] https://governance.openstack.org/tc/reference/project-testing-interface.html
[2] http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html
[3] http://lists.openstack.org/pipermail/openstack-dev/2018-March/128594.html

Depends-On: https://review.openstack.org/#/c/559330/
Change-Id: I36051485854bdf88719335f280f5562c3a0dbd4a
2018-04-06 14:34:41 +00:00
Doug Hellmann 449568c440 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: I2d6ce9ddd15e5816be5c888daa907039c66507fa
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-03-22 16:29:53 -04:00
Andreas Jaeger 4b315e1027 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: I29c17d51f2648e4bdef1a8c9799ca5e785aa3423
2018-03-15 19:57:52 +00:00
Luong Anh Tuan b120784f7f Enable hacking-extensions H204, H205
This patch enable extensions:
-[H204] Use assert(Not)Equal to check for equality.
-[H205] Use assert(Greater|Less)(Equal) for comparison.

Change-Id: I375c61e09a76e8b195b19c962b1c561fcbe5ffb0
2018-02-07 16:05:31 +00:00
Nguyen Van Trung 4eefecf4f0 Add doc8 to pep8 check for neutron-fwaas project
This patch adds a doc8 check of .rst files to the current pep8 check.
It includes fixes to the .rst files that didn't pass the check.

Change-Id: I9d6d604e7a21540728c4f44afc9be5577d02805f
2017-12-20 03:48:10 +00:00
Nguyen Van Trung d75663961d Replace jsonutils by common json package
This PS is going to following item:

- Remove dependency oslo.serialization which only use at one test-case
  and use build-in python package that is json[1] in the code-base.
- Ignore N521 check in the flake which no longer need to check when we
  change into json.

[1] https://docs.python.org/3.6/library/json.html

Change-Id: I22cf66d1ea5666a072a06456213a7964c5deced8
2017-12-15 04:09:50 +00:00
Armando Migliaccio 562e00fa1b Use shim tool for ostestr
So that individual tests can be run using the old syntax.

Change-Id: Ibe2ce7f88e7fb97d74968f98b6bc047fcd91972b
2017-09-13 13:51:44 -07:00
Yushiro FURUKAWA 6a53316cbe Remove log translations
Log messages are no longer being translated. This removes all use of
the _LE, _LI, and _LW translation markers from this repository
(including _ in test codes) to simplify logging and to avoid confusion
with new contributions.[1][2][3] This commit also removes N537 for
flake8 ignore list.

[1]http://lists.openstack.org/pipermail/openstack-i18n/2016-November/002574.html
[2]http://lists.openstack.org/pipermail/openstack-dev/2017-March/113365.html
[3]https://docs.openstack.org/developer/oslo.i18n/guidelines.html#choosing-a-marker-function

Change-Id: Ie0a8a2d9b3eec27608e5efcecd09455ef3024c38
2017-08-28 18:01:48 +09:00
Jenkins f12d6d9086 Merge "Enable some off-by-default checks" 2017-08-26 15:04:08 +00:00