Commit Graph

183 Commits

Author SHA1 Message Date
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
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
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
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
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
Yushiro FURUKAWA 4d7e586de0 Enable to set neutron's local repository for testing
This commit improves Ib8964fc029a2eab839c8022ad48ef40541e83780 .
You can specify 'NEUTRON_GIT_REPO' as an environmental value. In my
local env, a time for deploy reduced from 120s to 90s.

Ex. * Specify NEUTRON_GIT_REPO
        $ export NEUTRON_GIT_REPO=/path/to/neutron/repository
        $ tox -e py35 -r
    * Not to use local repository
        $ unset NEUTRON_GIT_REPO
        $ tox -e py35 -r

Change-Id: Ic1d727453038cb0112182c91a79a11ff0ec746f6
2017-05-26 21:18:03 +09:00
Akihiro Motoki 1fdee46b5c tox_install: speed up neutron repo clone
When installing neutron repo into tox venv, there is no need to
use full clone. Shallow clone like --depth 1 is sufficient.
It speeds up tox venv creation.

In my local env, the data volume transferred during neutron repo clone
was reduced from around 50MB to 3.6MB and the time take was reduced
from 60sec to 13sec. In slower network connection environments,
it would have an positive effect more.

Change-Id: Ib8964fc029a2eab839c8022ad48ef40541e83780
2017-05-22 12:58:34 +09:00
Ihar Hrachyshka 1db303e7d3 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:52:05 -07:00
Cedric Brandily b97825874b Enable to run rootwrap/privsep related functional tests
This change defines tools/deploy_rootwrap.sh. It builds neutron-rootwrap
config from neutron, neutron-fwaas and functests[1] filters. It's an
enabler to run functional tests which requires rootwrap/privsep
features.

An alternative was to build neutron-rootwrap config from neutron-fwaas
and functests filters[1] only. But it implies to add many filters from
neutron in functests filters in order to run FWaaS functional tests on
the long term.

Most of the logic in gate_hook.sh[2] has been removed because it's
now done by neutron tools/configure_for_func_testing.sh through
configure_for_fwaas_func_testing.sh[3].

post_test_hook.sh changes now neutron permissions in order to allow
stack user to run pip install neutron in /opt/stack/new/neutron.

This change defines the modules [5][6] to validate that we can run
privileged privsep process in functional tests. These modules will be
removed when "real" functional tests will be added.

[1] neutron_fwaas/tests/contrib/functional-testing.filters
[2] neutron_fwaas/tests/contrib/gate_hook.sh
[3] tools/configure_for_fwaas_func_testing.sh
[4] neutron_fwaas/tests/contrib/post_test_hook.sh
[5] neutron_fwaas.privileged.tests.functional.dummy
[6] neutron_fwaas.tests.functional.privileged.test_dummy

Change-Id: Ie077092c03efca3856c27c581bba5c5b84db3a2a
2017-02-28 10:18:03 +07:00
Margaret Frances e7ebbebb39 Update policy.json for FWaaS v2
This commit supports FWaaS v2 CLI as OSC plugin[1].
[1] http://specs.openstack.org/openstack/neutron-specs/specs/newton/fwaas-api-2.0.html

Added our policy to the DB unit tests
Amended tempest to avoid failure

Co-Authored-By: Yushiro Furukawa <y.furukawa_2@jp.fujitsu.com>
Co-Authored-By: German Eichberger <german.eichberger@rackspace.com>

Change-Id: I3d2ef99f60af2a05b5d38ebdc90f818541317e8c
Partial-Implements: blueprint fwaas-api-2.0
Depends-On: I7b4108772e8370e8f51971caf40ecd23e9f977e9
Depends-On: I57504f97ac39b5b7d301fd5cc88228a121f0677e
Closes-Bug: #1609686
2017-01-26 15:40:36 +09:00
Henry Gessau 4ae1c26894 Remove last vestiges of oslo-incubator
This is a community goal for Ocata.  We're already not using any of
the code, but there are some other files and references left over.

These files used to be installed from oslo-incubator:
  tools/install_venv.py
  tools/install_venv_common.py
  tools/with_venv.sh
They were meant to be used by the legacy run_tests.sh, which does not
exist in this repo.

Change-Id: I5523427aa3835cd732ec973dd2e821cac9363a12
Partial-Bug: #1639103
2016-11-03 22:34:49 -04:00
Nate Johnston 26a7f38952 Fix periodic-neutron-fwaas-pyXX-with-neutron-lib-master jobs
These jobs assume the existence of a tools/ostestr_compat_shim.sh file
that does not exist in the neutron-fwaas repository.  This change
creates it.

Change-Id: Iaeaa2067ed4deb1e4c778b562359cc8713aa2a52
2016-09-30 20:57:06 +00:00
Andreas Jaeger 3e4fa75b83 Add special handling for functional tests
This file had for some time diverged from the copy in the neutron-vpnaas
repository. Let's keep those two the same, there's no need for any
differences. The change brings us an important change that was done
a year ago to neutron-vpnaas.

Import changes for this file from neutron-vpnaas to allow to run
functional tests against neutron: We need to install the proper version
of neutron when testing neutron changes with functional tests from this
repo.
Otherwise those tests install neutron HEAD.

Change-Id: Iafcbd07b2f04fd3462d7f6030defc02a97c5021f
2016-08-29 20:00:12 +00:00
Andreas Jaeger 82473d3d93 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 which are bash features, so change
she-bang.

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

Move over some changes from neutron-lbaas so that these two are in sync.

Change-Id: I894cf28910c0969a8f7920f5b34c34ca0d5658b2
2016-08-28 19:11:15 +02:00
Ihar Hrachyshka 39d40b2c20 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-19 16:42:13 +01:00
Jenkins 03c33e6da6 Merge "Remove check_i18n files" 2016-07-08 20:55:07 +00:00
Gary Kotton 9363b9c080 Fix subunit trace help
Fixes a typo.

proccesed => processed

TrivialFix

Change-Id: Id9ec8363497641a0f0c978ea5b9c0f1518b55ddc
2016-06-18 07:07:02 +00:00
Gary Kotton 0a4d218bf2 Remove check_i18n files
The translations are done via the pep8 checks. This code is no
longer needed and very out of date.

TrivialFix

Change-Id: I8559189f33a5a333d25cdd3492cd99f6fbcbf8c7
2016-06-08 10:23:58 -07:00
Jenkins 22e5e7da8f Merge "Fixed typo in subunit-trace.py" 2016-03-15 07:25:43 +00:00
Ihar Hrachyshka db029ff867 Make all tox targets constrained
Since fwaas gate has not switched to -constraints targets yet, we can
remove them right away.

Note: override install_command for releasenotes and cover targets since
corresponding gate jobs do not provide constraints file yet.

Change-Id: If3c143153d0a09378092791e76f1a728fb978aed
2016-03-07 13:19:28 +00:00
Yi Zhao a9c97eac89 Fixed typo in subunit-trace.py
Change-Id: Iab613cc14074c9d2b3a17b9b2efe248160300b4a
2016-02-29 15:23:05 +08:00
Tony Breeds 7fa0e92a95 Add an explicit BRANCH_NAME to tox_install.sh
tools/tox_install.sh exists to deal with installing neutron without
neutron existing as a pypi package.

The way this operates causes problems in the periodic jobs on the stable
branches.  Make it explicit which branch to install in the gate
(zuul-cloner) and via pip.

This is done with a BRANCH_NAME variable to make it trivial to change
once "master" is tagged as stable.

Change-Id: I6a5b63fa82a6a7480adadd2f65463619fd077f7f
2016-02-05 17:53:10 +11:00
Jenkins 2d8b8db589 Merge "Added constraints tox targets" 2015-12-12 00:12:08 +00:00
Ihar Hrachyshka f8e9f8bf84 Added constraints tox targets
These are eventually going to be used in gate instead of unconstrained
jobs. There is some code duplication in commands definitions, but tox
does not allow to inherit definitions with {posargs} substitution.

Made tox_install.sh use constraints file to install both the project
and neutron dependency, if the first argument is 'constrained'.

Change-Id: I699022b285594edf3c5db10fbdac2f904dc42928
Partial-Bug: #1522503
Depends-On: I7d43cf950ec9c337da991b1e765b13743c4e18c2
2015-12-07 15:27:31 -05:00
Martin Hickey 93883c17db Automatically generate neutron FWaaS configuration files
This adds a new tox environment, genconfig, which generates sample
neutron FWaaS configuration file using oslo-config-generator.

Partially-Implements: blueprint autogen-neutron-conf-file

Change-Id: I8e9113dfb88e5290f6eedd012d1a52fc35c3c88c
Partial-bug: #1199963
2015-12-07 10:50:11 +00:00
Ihar Hrachyshka 18793f62c3 Set ZUUL_BRANCH using BRANCH if not available
In most cases, ZUUL_BRANCH is set in gate, but not all the time. One
exception is e.g. periodic stable jobs, where there is no actual patch
to validate, hence no ZUUL_REF or ZUUL_BRANCH is set. In that case, we
need to help zuul-cloner to determine the proper branch to fetch
neutron.

It could be achieved by e.g. hardcoding the branch using --zuul_branch
CLI argument passed into zuul-cloner. In this patch, I instead set
ZUUL_BRANCH to BRANCH that seems to be always present in all kinds of
jobs. It is then used by zuul-cloner to choose the correct branch.

This will be needed in the future when we spin out stable/mitaka and run
stable periodic jobs for neutron-fwaas.

Change-Id: I360239a1443f8d4e16210a1ef743912e1bf85f41
2015-11-10 17:54:23 +01:00
Ihar Hrachyshka 55bfec7bfd Stop doing any magic cloning of neutron during CI
Change-Id: Iee43c68b4cc954b9780de02625de7e053ebd27b3
2015-09-25 14:42:46 +02:00
Paul Michali 7d175a9ba9 FWaaS: Remove check for bash usage
Like Neutron, removing the check for bash script usage and
changed bash scripts to use '#!/usr/bin/env bash'.

Change-Id: Id0a74c1a976c06c66ebb370d0d9e17de17dc5231
Closes-Bug: #1441632
2015-04-14 08:37:02 -04:00
Paul Michali 96dc29350d FWaaS: Reorganize unit test tree
Similar to what is happening in Neutron, this commit renames and moves unit
test files so that they match the directory structure of the code tree.
Since the FWaaS repo's test files have imports from Neutron, there are import
changes as well, to the imports to match the Neutron test file organization.
A check script is added to monitor the test file naming and locations (to
ensure consistency).

Note: In the future the Neutron check_unit_test_structure.sh should be made
configurable, and duplicate files removed from *aaS repos.

Change-Id: I4cf1093eac88f62bbe1303233bfd37058db3821a
Closes-Bug: #1441501
2015-04-08 14:18:06 +00:00
Ihar Hrachyshka 1ad5beb7c5 Removed lockutils-wrapper from tox targets
This wrapper was needed until neutron BaseTestCase started using
ExternalLockFixture. Now it can be safely removed.

Change-Id: I2a82504ad19f6daddd24a3c2254e8feefc9399ca
2015-02-27 16:43:48 +01:00
Ihar Hrachyshka 8b83163d6a Migrate to oslo.concurrency
Namespaces are not used anymore, so imports are for oslo_concurrency,
not oslo.concurrency.

lockutils direct call is not supported anymore, so using shipped
lockutils-wrapper instead.

Closes-Bug: #1387092
Change-Id: I2ba2295f8f5d55f272a9d23555940586b25b5a1c
2015-01-14 17:57:29 +01:00
Doug Wiegley 2c2d704b07 Split fwaas services code into neutron-fwaas
Change-Id: I5d3c6c1eda30803862b4ef2bf4e53600b49dc6c2
2014-12-08 13:38:07 -07:00
YAMAMOTO Takashi 91184f586d tox.ini: Prevent casual addition of bash dependency
While bash is not available on every environments, there seems to be
a tendency to introduce more bash dependency very casually.  This check
is intended to be a reminder to give people a chance to consider
alternatives.

Related-Bug: #1398266
Change-Id: I5103e0d7c111880d9a02dd93de56c567066ed14c
2014-12-05 03:25:47 +00:00
YAMAMOTO Takashi 70947a4c9e pretty_tox.sh: Portablity improvement
A recent change (commit 0d5a11d9c722870f9c5e31a993219c7e240b4e19)
introduced bash dependency.  It broke my environment, where bash
is not available.  This change aims to restore it.

As far as I undestand, the change in question requires bash for
the "pipefail" feature.  Fortunately there's a more portable
well-known trick for the purpose.

Closes-Bug: #1398266
Change-Id: Id3561d81462923d20ad39584ba4cf8e1a294a8a8
2014-12-02 13:27:46 +09:00
Russell Bryant b78dbeb9ab Show progress output while running unit tests
This patch imports some magic to enable showing test output as the
tests run.  Seeing output showing tests as they execute is reassuring
that the test run is continuing to make progress.  This originated in
tempest and was then brought over to Nova in this commit:

  https://review.openstack.org/#/c/121914/

Note the justification in that commit to just copy it instead of move
it to a shared repo.

To get the old behavior where you only get output when something
fails, you can set the TRACE_FAILONLY env var.  That originated in
this commit in Nova:

  https://review.openstack.org/#/c/123801/

Change-Id: I6a079ad5f630383650c0f9dee09e04250d0e2c5a
2014-11-20 21:05:32 +00:00
liu-sheng e57e5f82af Remove the useless vim modelines
Change-Id: I41286e0b8f74c90b7078c3d3fb041b6586d95ab0
Closes-Bug: #1229324
2014-06-21 15:07:31 +08:00
Jenkins 844787fbbc Merge "Corrects broken format strings in check_i18n.py" 2014-01-07 14:11:59 +00:00
Wu Wenxiang d49ea6a111 Remove unused imports
Remove unused imports in tools/install_venv.py

Change-Id: Ia2fbb4ece5c8bcdee96503f0f853f826ae4f3dfa
Closes-Bug: #1265267
2014-01-01 22:01:27 +08:00
Jay Pipes b6573b9a97 Corrects broken format strings in check_i18n.py
In tools/check_i18n.py, the error messages printed out
had format strings that included 5 interpolations, but only
four variables were supplied. This patch simply corrects that
mismatch by including the name of the predicate or checker
that failed.

Closes-Bug: #1263813
Change-Id: I5cacee9ea000f56a9ef45f07367e85f20fa333c7
2013-12-24 08:14:48 -05:00
Mark McLoughlin 3f472c3c4e Remove obsolete redhat-eventlet.patch
See I62ce43a330d7ae94eda4c7498782a655e63747fa for the gorey details on
why this exists.

As of this fix:

  https://github.com/eventlet/eventlet/pull/34

which was released in eventlet 0.13, we no longer need the patch.

This has now been removed from oslo-incubator, so this is really just
syncing that removal.

Change-Id: I84267f3c6726cb2e750f615e107c48b12c6ed353
2013-10-09 21:47:48 +01:00
Chang Bo Guo 264f1f612e Use built-in print() instead of print statement
In python 3 print statement is not supported, so we should use
only print() functions.

This patch also removes print in unit test, left by accident

Fixes bug 1226943

Change-Id: I5ace50cb9e149682344b4c986ef9318f8dc50f72
2013-09-21 07:30:33 -07:00
ZhiQiang Fan 70a95b3ecf Fix message i18n error
Partial-Bug: #1217100

Using tools/check_i18n.py to scan source directory, and fix most of
the errors.

- Message internationalization
- First letter must be capital
- Using comma instead of percent in LOG.xxx

Note: all extension's description are not touched in this patch,
can be fixed after discussing.
Note: all nicira/check_nvp_config.py print messages are not fixed.

Change-Id: I79ef06fd42f6780beb5019c592662536c2a51864
2013-09-08 15:58:12 +08:00
ZhiQiang Fan 0c4f109dba Enclose command args in with_venv.sh
Change-Id: I6d2ca2f8fca951fe2d90265da8728438dd7d7567
Closes-Bug: #1220937
2013-09-05 06:14:18 +08:00
Mark McClain 8ad0692276 git remove old non-working packaging files
implements bug: 1198774

Change-Id: Iebd3eb22dd7e3b93131c298e01ac4bcf1fea004e
2013-07-07 22:18:45 -04:00
Jenkins b141edd3db Merge "Sync install_venv_common from oslo" 2013-07-07 04:11:31 +00:00
Mark McClain ee576e2921 Rename Quantum to Neutron
This change renames everything to Neutron while providing backwards
compatible adjustments for Grizzly configuration files.

implements blueprint: remove-use-of-quantum

Change-Id: Ie7d07ba7c89857e13d4ddc8f0e9b68de020a3d19
2013-07-06 15:02:43 -04:00
Monty Taylor 3f0ddaf703 Sync install_venv_common from oslo
Change-Id: I4c14c9907d6195ab4f50ab9351ab14e4d93c4ec2
2013-07-05 22:18:02 -04:00
HenryVIII b2ce0e48c2 Remove unit tests that are no longer run.
A long time ago, quantum/tests/unit became the home for all unit
tests, but these ones in the Cisco plugin directory got left
behind. They have suffered bit-rot and need to be removed.

Also:
- Move the fake Nexus driver to new home.
- Filed new bugs to track the task of improving unit test coverage of
  Cisco plugin code.

Fixes: bug #1174311
Change-Id: I372e24aebbe1804e5b6ce62984bfd76b030a44b1
2013-06-13 20:48:45 -04:00
Gary Kotton 54f20a0807 Update with latest OSLO code
Change-Id: I54c0f6fa0489f0ef20187adf87f720e48ce1626c
2013-06-12 13:22:31 +00:00