It's a nice wrapper spinned out recently from tempest-lib that should
cover all our needs that we currently fulfill with pretty_tox.sh.
Change-Id: I2268ed45ab628fe5dcab657d6287594847ab587c
Modify the script so that it can be used by the *aaS functional tests.
This is done by allowing callers, namely other *aaS repos, to override
information, like the project name and virtual environment used (for
example, VPNaaS has two functional jobs with different virtual env).
Change-Id: I450273036e938a4acc9a7bc1dc193a9c207b2d58
Closes-Bug: #1446807
Arbitrarily restricting ourselves from using bash because developers on
platforms like netbsd don't want to install bash from ports doesn't
make sense. Any non-trivial shell script is likely to use features
like arrays or string manipulation that are poorly supported (if at
all) by sh, and the continued bumping of the number of expected bash
scripts is an indication that the check is not serving its purpose
anyway.
Along with removing the check, all shebang references to /bin/bash
have been replaced with /usr/bin/env bash in an attempt to be more
compatible across different hosts.
Change-Id: Ief72dc380cc88af38959c330897e2c127e33c332
Closes-Bug: #1440824
This change moves plugin test modules to conform to the new rules on
unit test tree structure (see TESTING.rst).
Vendor plugin paths continue to be ignored, and unit test modules that
test features instead of modules are also ignored pending their
removal to the functional test tree.
Change-Id: I482c377ca72ffd58692ad84bd9692356513e4c98
Closes-Bug: #1440834
This change ensures that the structure of the unit test tree matches
that of the code tree to make it obvious where to find tests for a
given module. A check is added to the pep8 job to protect against
regressions.
The plugin test paths are relocated to neutron/tests/unit/plugins
but are otherwise ignored for now.
Change-Id: If307593259139171be21a71c58e3a34bf148cc7f
Partial-Bug: #1440834
To make api test development simpler, move the tests to
neutron.tests.api. The neutron.tests.tempest subtree will remain
while work continues to transition the required functionality to
tempest-lib.
Change-Id: Ie90671fbfe2f633e851da82728e152482133fd87
A recent change to devstack renamed lib/neutron to lib/neutron-legacy,
and this change updates the functional setup script to reflect the
change.
Change-Id: I5eb4b4052da4b0db128feb42feae50a8bc59f373
Closes-Bug: #1438426
etc/... may be non existent in some build environments. It's also pip
does not install those files under site-packages neutron module, so
paths relative to python files don't work.
So instead of using relative paths to etc/... contents, maintain our own
version of configuration files. It means we need to maintain tests only
policy.json file too, in addition to neutron.conf.test and
api-paste.ini.test.
Ideally, we would make etc/policy.json copied under site-packages in
addition to /etc/neutron/. In that way, we would not maintain a copy of
policy.json file in two places.
Though it seems that setuputils does not have a good way to install
files under site-packages that would consider all the differences
between python environments (specifically, different prefixes used in
different systems).
Note: it's not *absolutely* needed to update the test policy.json file
on each next policy update, though it will be needed in cases when we
want to test policy changes in unit tests. So adding a check to make
sure files are identical.
This partially reverts commit 1404f33b50452d4c0e0ef8c748011ce80303c2fd.
Conflicts:
neutron/policy.py
Related-Bug: #1433146
Change-Id: If1f5ebd981cf06558d5102524211799676068889
This patch introduces support for rootwrap daemon mode. It adds
a new config option, AGENT.root_helper_daemon with no default. To
enable, set to something like:
root_helper_daemon = sudo neutron-rootwrap-daemon /etc/neutron/rootwrap.conf
The patch currently assumes that the root_helper_daemon value, and specifically
the rootwrap config, will not change once calls to execute() happen. While it
would not be hard to generate a rootwrap daemon client for each new config, I
couldn't think of a legitimate reason to support it and left it out as YAGNI.
This patch does change the behavior of the addl_env argument to create_process
and execute. Previously, an environment dict would be passed to Popen. If
a root helper was used, this environemnt would actually be passed to 'sudo'
which would filter it before passing it to the underlying command. In the case
of daemon mode, this would cause a problem as the enviornment is filtered by
sudo only once, at daemon startup. Any environment variables added at execute
time would then just be passed directly to the underyling command unfiltered.
oslo.rootwrap 1.6.0 fixes this issue by denying the passing of environment
variables to the daemon altogether. Instead, anything using rootwrap and needing
to pass additional environment variables should define an EnvFilter and run the
command with env var=val cmd. utils.execute/create_process have been modified to
run code in this way (which netns.execute already did).
No code in neutron currently uses both run_as_root=True and addl_env, so this
change does not require any change in code or filters.
DocImpact
Implements: blueprint rootwrap-daemon-mode
Change-Id: I567334bb611253c7b9d830d50c5be308a5153baf
This change adds the identity v2 paths to the list of copied modules
and updates the identity client init.
Change-Id: Ic02ba41eabfb78c49b23c905f1c5cc1d033e2d72
This change adds a script to automate the copying of api tests from
tempest in the style of oslo_incubator. The target path will be
neutron/tests/tempest and no manual modifications should be made to
this path until such time as neutron api test development is frozen in
tempest and development can proceed in the neutron tree. Until that
occurs, a policy of manual once-daily synchronization is suggested.
The target path includes the name 'tempest' as a clear indication that
this is not part of neutron, and that once development is allowed to
proceed, its contents should be rewritten and removed until there is
nothing left.
So long as the tests exist in both the tempest and neutron trees,
testing effort will be duplicated. The larger goal is to have the
tests in question removed from tempest as per the qa guidelines [1],
so this should be temporary.
1: https://wiki.openstack.org/wiki/QA/Tempest-test-removal
Change-Id: I3cd55983e610a1d61aae565f88fe5017edba1090
Change c0aa0b fused pylint with the checks done with the pep8 testenv.
This has the drawback of increasing the execution time of the command
'tox -epep8' fourfold.
This change introduces the ability to execute the pylint check on just
the list of python files affected by a specific patch. For instance,
this can be done with the following command:
tox -epep8 HEAD~1
A kind reminder is added, so that folks who end up noticing the spike of
time execution when they run tox -epep8 without posargs, can learn how
they can get their precious minutes back.
Change-Id: Ie2a2b3a0171908d8d8aa8713baaa875adccb7efe
This change adds a new script, configure_for_func_testing.sh, that
automates configuration of a host to support functional testing. The
script's functionality is consumed by a refactored version of
gate_hook.sh, and both minimizes runtime and removes the previous
dependency on the devstack-gate repo.
Additionally, the dsvm-functional tox env is no longer dependent on
devstack to deploy neutron's rootwrap configuration system-wide.
Rootwrap configuration is now deployed to the target tox venv on each
tox invocation.
Change-Id: Iaf43be458bdf3c4535f95ee5a3a3b47a744020a0
Testing out I638ac2d35c33eef02e2c6872ea3bd4a3d644da58
So grenade,tempest,and rally should not run on this patch.
Change-Id: I3bdd9be8a6b2a23cdea527686e7ccc61d041f773
This adds the abandon_old_reviews.sh from the nova repository into
Neutron. This is handy for cleaning up the neutron review queues
by abandoning stale reviews stuck in the queue with a helpful
message.
Change-Id: I8920123217cb134c792dee35a5b06abde31be1d4
This patch provides further details related to importing stable branches,
as well as how to deal with backports.
Partially-implements: blueprint core-vendor-decomposition
Change-Id: I4ccde019ee9d86a93a956e42b866ff9b2dc5aedb
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.
Use ExternalLockFixture to set lock_path for unit testing.
Updated cache and cache/_backends module from oslo-incubator to use
oslo.concurrency and not incubator version of lockutils module.
Dropped lockutils incubator module that is now moved to oslo.concurrency. Not
dropping fixture module that includes lockutils fixture since other fixtures
are still used in the tree.
Closes-Bug: #1387092
Change-Id: I2ba2295f8f5d55f272a9d23555940586b25b5a1c
Some cleanups for commit 4fdda65a5b9f379af997e1e971865ccfa7a93156.
- Don't assume the path of mktemp command. It's /usr/bin/mktemp
for some platforms. eg. NetBSD. Also, always provide a template
as it's necessary for some platforms, eg. OS X. This snippet was
taken from the example in NetBSD's mktemp(1).
- Move a comment to the appropriate place.
- Improve a regex to ignore more comments.
- As the pattern for find -path is not a regex, no escape is necessary
for period.
Closes-Bug: #1405584
Change-Id: Ia8358f0f7ebe9bc445ce5aa3c4f340546f37db05
This is the initial step to provide documentation and
how-to for developers interested in contributing plugins and
drivers according to the core-vendor-decomp proposal.
Partially-implements: blueprint core-vendor-decomposition
Change-Id: Ib8b6cc5fd72eb1b8b4b4b2bdbda132062c81cbc1
Move the various checks done via shell into a single file;
this is cleaner and we'll have a lot more space to explain
what is going on.
Related-bug: #1404605
Change-Id: Ibb451c6a25217f37b73983c30891f55b35f143cd
This commit removes the local copy of subunit-trace and instead uses
the version packaged with tempest-lib.
Change-Id: Ia7b57c6fc092514d9fbe4e71f580a4b189dc68b0
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
Rename tools/pip-requires to requirements.txt and tools/test-requires
to test-requirements.txt. These are standard files, and tools in the
general world are growing intelligence about them.
Fixes: bug #1179008
Change-Id: I6f8a11988982133249d443403f63b4f8724e156e
The Modular L2 Plugin uses drivers to support separately extensible
sets of network types and of mechanisms for accessing networks of
those types. This is an initial implementation that has been tested
with the openvswitch and linuxbridge agents, and should also work with
the hyperv agent. See quantum/plugins/ml2/README for details.
Implements: blueprint modular-l2
Change-Id: Ia8cae480180f0990af7d5e5e56f29eaeac205e0e
Fixes bug #1185174
This reverts commit b8b2c4e, 2f13345, 362bd7f, 8da2fb7 and 956b873.
We don't yet have the infrastructure in place to use latest oslo.config
in the gate or even get the correct metadata for it in our packaging.
The gory details are here:
http://lists.openstack.org/pipermail/openstack-dev/2013-May/009586.html
Change-Id: Idf89ca418df158e6f94279c9c5fa44f23073a9d7
This oslo-incubator sync pulls in a new log.py which will make quantum's
default log output format the same as nova, glance and cinder (once
cinder's corresponding oslo sync merges). This common log format
simplifies log indexing as part of CI and makes lives easier for
deployers.
This sync does add a requirement on six as jsonutils depends on it. It
updates install_venv_common.py to be python26 compatible. It also brings
in a bunch of recent python3 compatibility that was added to oslo.
Fixes bug 1183144
Change-Id: Id0f196d7b5680e5950e4a27d66042bf00ccd49e6
Fixes bug #1182662
Commit 362bd7f switched us from using 'QUOTA' as a config file section
name to using 'quota'.
This broke backwards compatibility support for 'QUOTA' because the
version of oslo.config that has that compat support had not yet been
released. The gory details are summarized here:
http://lists.openstack.org/pipermail/openstack-dev/2013-May/009448.html
Change-Id: I7826087147e0713edaaea85a72283998295e2281
We are explicitly trying to get rid of scripts like this and flake8 makes
this one non-necessary.
Fix run_tests.sh to run flake8 properly.
This reverts commit 42243d6eb221d52bf6f62f835726cbe026e43447
Change-Id: I435e34b6acde7931a75f456ccc88da6476581643