This reverts commit caae7b6a6f5e8944dbe359b6472be2507bbf5e12.
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
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
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
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
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
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
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
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
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
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
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
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
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
The translations are done via the pep8 checks. This code is no
longer needed and very out of date.
TrivialFix
Change-Id: I8559189f33a5a333d25cdd3492cd99f6fbcbf8c7
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
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
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
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
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
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
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
This wrapper was needed until neutron BaseTestCase started using
ExternalLockFixture. Now it can be safely removed.
Change-Id: I2a82504ad19f6daddd24a3c2254e8feefc9399ca
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
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
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
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
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
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
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
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
This change renames everything to Neutron while providing backwards
compatible adjustments for Grizzly configuration files.
implements blueprint: remove-use-of-quantum
Change-Id: Ie7d07ba7c89857e13d4ddc8f0e9b68de020a3d19
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