This reverts commit be63289c273fa02159a6958e0b456d5fda217431.
Yes, it's a third order revert. Ain't it cool?
Now that tox 2.3.1 is used in gate, and it is expected to fix the issue
that we originally hacked around here, let's revert to the previous
code.
For the least, it makes API target executable locally without the need
to set TEMPEST_CONFIG_DIR in the external environment.
Also bump minimal tox version to 2.3 to avoid users hitting the old
issue with their tox 2.2.* package.
Change-Id: Ic64cb466d117ad39436cb1d079c8f5657260da2c
Related-Bug: #1515335
Adds a test to Neutron to check object versions for any changes
to objects. It prompts the developer to update the version of the
changed object. It uses oslo.versionedobjects.
Change-Id: I99454b28ae0b5fa663354eeccdf709d4030a280b
Co-Authored-By: Ryan Rossiter <rlrossit@us.ibm.com>
In the functional tests we have 'functional' and 'dsvm-functional'
venvs. The difference is that dsvm-functional requires can run
rootwrap commands on the machine. In the fullstack context,
not running rootwrap commands doesn't make sense, as fullstack
tests are explicitly and solely integration tests.
Change-Id: I1e85537d137a1b773198facbb835a65b6d0ce9b4
- This does NOT break other projects that rely on neutron.i18n,
as this change includes a debtcollector shim to maintain those
older entry points, until they can migrate.
- Also updates _i18n.py to the latest pattern defined by oslo_i18n
- Guidance and template are from the reference:
http://docs.openstack.org/developer/oslo.i18n/usage.html
Partially-Closes-Bug: #1519493
Change-Id: I1aa3a5fd837d9156da4643a367013c869ed8bf9d
This adds a new tox environment, genconfig, which generates sample
neutron core configuration file using oslo-config-generator.
Updates to some configuration option help messages to reflect useful
details that were missing in the code but were present in config files.
It also adds details to devref on how to update config files.
Partially-Implements: blueprint autogen-neutron-conf-file
DocImpact
Change-Id: I1c6dc4e7d479f1b7c755597caded24a0f018c712
Closes-bug: #1199963
Co-Authored-By: Louis Taylor <louis@kragniz.eu>
Currently, API job skips all tests because TEMPEST_CONFIG_DIR is not set
properly. The environment variable was hardcoded to
/opt/stack/tempest/etc before, and since that's the location for tempest
configuration files that was used in gate, it worked fine there.
But after we were forced to remove the hardcoded value from the file due
to regression in tox 2.2.0+ (If3742b6eabe295a5aaeb4901c55909a70c451698),
it was neither hardcoded, nor passed from the external gate environment.
Note that since tox 2.0.0, the tool does not pass all envvars into tox
targets, but require explicit specification of the list of variables
that should be allowed into the target environment, using passenv
directive.
So that's what the patch does: it allows TEMPEST_CONFIG_DIR to get into
api tox target, which should be enough to make the API job avoid
skipping all tests.
Users are still required to set TEMPEST_CONFIG_DIR variable locally if
they want to execute the suite locally.
Closes-Bug: #1518632
Change-Id: Ia7dcc6785390a6012c7ba16a14573aa44f2b6fb5
This reverts commit a3154b03ac60df586bd8fd67f03c20327f2dde41.
The revert was merged too quickly, without waiting for tox project to fix us.
The gate passed for the revert only because infra folks removed images
that had new tox in them. We will be broken by the next images though.
Change-Id: I148c80e5b9512fee280ecbf3ca7498ddf1cfd96d
Setting TEMPEST_CONFIG_DIR in tox.ini is breaking the gate,
probably because of a tox bug [1].
Removing the line to unblock the gate. This implies that
for local execution of the tests TEMPEST_CONFIG_DIR
should be set manually.
[1] https://bitbucket.org/hpk42/tox/issues/285/tox-220-breaks-some-toxini-config-files
Change-Id: If3742b6eabe295a5aaeb4901c55909a70c451698
Closes-bug: #1515335
Using factors with sections is not a thing and likely will not be for
a while, as such we are going to have to duplicate sections to be able
to set the constraints based install_command.
Implements Blueprint: Requirements-Management
Change-Id: Ie679904330a83e4b7eb75c189b48afef127b0d22
This adds a pip install command to tox.ini that is only used when the
tox env is passed with the 'constraints' factor appended onto it.
As such this will not effect developer workflows or current unit tests.
The initial use of this will be in a non-voting job, to verify that the
constrained checks with tox are stable. DevStack is already running
constrained jobs, as such problems are no expected.
To run a tox with pip using constraints on a developer system a
developer should run the desired tox environment with -constraints.
For example: $(tox -epy27-constraints)
Pip will pull the current version of the upper-constraints.txt file down
from the git.openstack.org, however this method can be overriden to use
a local file setting the environment variable "UPPER_CONSTRAINTS_FILE"
to the local path or a different URL, it is passed directly to pip.
This is currently not enabled in the default tox run, however it is
possible to enable it as a default by adding it to 'envlist' in tox.ini
Change-Id: I13579599dfdf846d06d8c39f33265e8b46db6e68
Depends-On: I17ac389f78af241917b6da7f049085f2b13d30f2
Implements Blueprint: Requirements-Management
Enable neutron.tests.unit.db.test_ipam_pluggable_backend.
It was disabled after extending ipam tests to run db_base_plugin tests,
which are not py34 compatible yet.
Change-Id: I3ae491fa79d4c3311a86e98db3fb2f7d5926a0ba
Dictionaries are unorderable in py3K. This change defines the method
safe_sort_key[1] which could be used a sort function for list of
dictionaries and non-dictionaries.
[1] neutron.common.utils
Change-Id: I9c9fae53bb3ac5b8611c92164c9630c82c2d0ceb
Blueprint: neutron-python3
This doesn't use os-testr but it results in html reports built from
the subunit logs.
A note from amuller: tox -e py27 uses ostestr. The primary difference
between testr and ostestr (For my money) is that ostestr spits out
progression. After a conversation with mtreinish (The author of ostestr)
it doesn't seem to be possible to use tox with ostestr for our py34
tests because we use a long regex that is split on newlines. ostestr
supports the --regex flag as such (regex_a|regex_b), however it's not
possible to use that with newlines and to play nice with tox.
Since I think that we do want to use ostestr (Just like the py27 venv),
I'll work with mtreinish to introduce a white list regex file in to
ostestr. The file will be maintained in the repo and passed in to
ostestr via tox.
Change-Id: I1f1030cca4fd356e468d15126a730725ac9c099c
Prior to this patch, when I do:
tox -epy34 <my-test>
the argument is ignored and all whitelisted tests are executed.
This is not in line with the other testenv's. This patch ensures
that posargs are processed if available, and that we fall back on
the lot of tests when not specified.
Change-Id: I176d7bba690b1c7e0c64d11528d9c851472b503b
Current placing is confusing as in fact the tests have little to do
with ml2 and openvswitch.
This was triggered by discussion on https://review.openstack.org/199514
Next step should be to separate dhcp and l3 schedulers tests.
Change-Id: Ie05874fdc1c3070ed319e8f624c8217c5c0bb646
In Python 3, the error message returned when unpacking too many values is a bit
different from the one we see in Python 2:
Python 2:
ValueError: too many values to unpack
Python 3:
ValueError: too many values to unpack (expected <number of values>)
Blueprint: neutron-python3
Change-Id: Ib607a526c007567a370c521fd7e2e4f8b504b934
This patch does a simple fix to the quota DB driver in order
to ensure its compatibility with python3 and adds the quota
enforcement unit tests to the list of those executed as a part
of the py34 test environment.
Change-Id: I9b5601632866e1fb42f860d1cca5f77b5f14f2c8
Related-blueprint: better-quotas
In python 3, a format type 's' of struct.pack() requires a bytes object to an argument.
Change-Id: Ia4640b31c31b5b7454cd1582af46562fb1885726
Blueprint: neutron-python3
WebOb disallows in py3K to set webob.Response.body to a unicode object,
we should encode unicode bodies in such case.
Change-Id: Ie0dc57fbe3ed9b19dac2e958de14387bc4c1a260
Blueprint: neutron-python3
As a part of vendor driver decomposition,
this patch moves the remaining Arista specific
code to openstack/networking-arista
Change-Id: Ie16b5ed936b116043dea36ec967bb5ae9cdacbdf
Partial-Implements: blueprint core-vendor-decomposition
In Python3, binascii.crc32 must be given bytes. This commit does not change the
behaviour in Python 2.
Change-Id: I91607ced4ab26d1d2e3eb31a3e4b2a4b2131b7bd
Blueprint: neutron-python3