Currently it pulls in upper-constraints from the base testenv definition.
Change-Id: I2f02efb3e5be8b9e497a793b5d0b62fdbe6f6969
Story: #2002900
Task: #22865
This change will help to check the function _() is
used but not imported. And the gates will check this missing
in the next time.
Co-authored-By: Nguyen Van Trung <trungnv@vn.fujitsu.com>
Change-Id: Icb40b3af9922e551f06cfd18de26dfcce9960d5a
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.
Change-Id: I6c11da63a69121680db525ffdd350cfdde89b1f8
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
The F405 errors that were present in our
repository are a common pattern for ansible
modules. As such, They have been marked for
noqa.
Change-Id: Ie161bf38b00f5e798a470b16700925f9ef7b322d
Story: #2001985
Also a few related errors based on some earlier investigation
may have been pulled in along the lines of E305.
Story: #2001985
Change-Id: Ifb2d3b481202fbd8cbb472e02de0f14f4d0809fd
Since blocking the package doesn't seem to be a good
solution to unblock the gate, lets go ahead and ingore
the errors until we are able to fix the issues in the
code.
Change-Id: I72496493359fa11eb122368479ee1ae9b87d82f2
Story: #2001985
Task: #19603
Although reno was once moved from test-requirements to doc/requirement
for introducing the new TPI, it is also necessary for creating a
releasenote with 'tox -e venv'. This patch adds doc/requirements to
venv for installing reno.
Change-Id: Ic9c755ef98b71448457560c78ae69571d1f4bd00
Fix the pep8 E402 (Module level import not at top of file) errors.
For the Alembic files move the definitions of 'revision' and
'down_revision' below the imports. This is now done in Alembic [1]
For other files fix as needed by moving the imports or lines before
the imports.
In a few cases add a "# noqa E402" to whitelist the issue.
[1] dc2aae0374
Change-Id: I48c96d5da0cb747b3ca3fceea9b4ffa85a9ebe22
Rather than pinning pycodestyle, ignore the E402 and W503 error. Fix
issue with E731 (Do not assign a lambda expression, use a def).
W503 is something we will likely never enable as it is a personal
style decision and can change depending on the code. There is no one
right answer. Interestingly there is also a W504 which is the opposite
check.
E402 is one we should most likely fix. But it can be done in a follow
patch or patches.
List of various error codes:
https://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes
Change-Id: Ie2c31a8a3c75beeef22453cab5878cf0094bdf3f
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: I50af6344c8de6fae3602e6d0f5267623ce492dc9
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
The 'releasenotes' gate job does not run our tox section. This allowed a
releasenote to land that had a filename in an incorrect format because
it was not created with 'reno new'.
Move the running of 'tools/check-releasenotes.py' to the pep8 section
and whitelist the releasenote that got merged.
Change-Id: Id5bd8e0cbc9186c89f682224088a8f23998d59c3
Remove I202 (Additional newline in a group of imports) from the ignore
list. I202 is a check from the flake8-import-order [1] package.
There was a note to remove this check once the tempest plugin was
removed. As the tempest plugin has been removed we can now remove the
exclusion of this check.
Update files which failed this test.
[1] https://github.com/PyCQA/flake8-import-order
Change-Id: I6018d5a90174b3d4b6b8d8e05cee1c1104ccfde9
They are autogenerated, and the updates are submitted automatically.
There is no much value in validating them. Also the recent translation
update https://review.openstack.org/#/c/542609/ removes the last pot
file and this validation starts failing.
Change-Id: I08a5c6acf4312df307aee4ba66f3d957191c8708
Adds API methods to support rescue and unrescue.
After rescuing a node, it will be left running a rescue ramdisk,
configured with the rescue_password, and listening with ssh on the
specified network interfaces.
Unrescuing a node will return the node to Active.
Change-Id: I3953ff0b1ca000f8ae83fb7b3c663f848a149345
Partial-bug: #1526449
Co-Authored-By: Jay Faulkner <jay@jvf.cc>
Co-Authored-By: Josh Gachnang <josh@pcsforeducation.com>
Co-Authored-By: Jesse J. Cook <jesse.j.cook@member.fsf.org>
Co-Authored-By: Mario Villaplana <mario.villaplana@gmail.com>
Co-Authored-By: Aparna <aparnavtce@gmail.com>
Co-Authored-By: Shivanand Tendulker <stendulker@gmail.com>
When running the tox tests, use the default version of Python 3. Instead
of having to update the Python 3 version as we move from
py34 -> py35 -> py36 -> py37 -> py38
Just use the default version of Python 3 on the system.
This will not affect what gets run in the gate, as the version is
explicitly specified when it runs there. This is for developers who run
the tests locally.
Change-Id: Iab9cd250dafb42f775f50bec2c69eaa2daaab574
Pep8 job currently fails complaining about I202 in a bunch of
modules. This change fixes the genuine errors in the module
import order, and adds I202 to the skip list so that we don't
have to add noqa comments everywhere we can not satisfy the
check. After we split out the tempest plugin, we'll remove
I202 from the ignore list and add noqa comments in the places
where it will still be needed.
Change-Id: Ia170a41d35dea8c9eda2b36c907dbc518169a824
Recent update brought os-testr 1.0.0 that already uses stestr test
runner instead of testrepository.
This patch migrates those places using testrepository to using stestr.
Change-Id: I793617e042b38aea4cb177b51b6a7ba4a9268f3c
Update test-requirements.txt to use latest versions of:
* flake8-import-order
* hacking
Enable the following off-by-default checks:
* [H204] Use assert(Not)Equal to check for equality.
* [H205] Use assert(Greater|Less)(Equal) for comparison.
Fix code that failed H204 and H205. In this case the fix was to add:
# noqa
As we want to ensure that these particular tests are calling the
desired comparison operators.
Change-Id: If9cba62c832e301ac81320f9142e91319f0e40a9
When Python 3.6 is used by default (the case for F26), the build fails:
TypeError: '<' not supported between instances of 'NoneType' and 'str'
It is reported as bug 1714025, let's use Python 2 until it's fixed.
Change-Id: I8c2ba5b587b2919a22ff1d0f078c511d90de0f91
Related-Bug: #1714025
Newer operating systems, like Fedora 26, ship with Python 3.6 now. So
they can do a Python 3 test, add 'py36' to the default envlist.
Change-Id: I9bbca0d18c346fe0cfcb9878cd35632dbd998fb0
This patch does the following:
* Adds a configuration folder to contain automated generated config
files for Ironic.
* Adds `oslo_config.sphinxconfiggen` to the extensions list.
* Adds `oslo_policy.sphinxpolicygen` to the extensions list.
* Adds ironic-policy-generator.conf
This is important for Ironic to be included in the list of services
on https://docs.openstack.org/pike/configuration/
Change-Id: I51a7204ce00be2588e427c1951e8be7dc7a22647
Closes-bug: #1706176
It is a long known issue that tests for py3 can not be run after the
tests for py2 were, unless times.dbm is removed.
Related-Bug: #1229445
Change-Id: I32b62e6d870364554ec20c1acce88fa59b85881d
Specify 'ironic' as the name of the application for the flake8-import-order
plugin. That way it knows that imports of ironic should come after external
libraries.
Change-Id: I3e6fb237b9846e8de1a071f3a659c23c44bc7f75
Use the flake8 plugin flake8-import-order to check import ordering. It
can do it automatically and don't need reviewers to check it.
Change-Id: I821fd7467f6c5cc1487149297f26e4ad539cf25d
We mock out driver libraries in unit tests if they are not installed,
which leads to a periodic break in unit tests when they are actually
installed in the environment. This is sometimes a real break and
sometimes just a bad test, but at any rate it slows down packagers
and actual users.
Add a new tox target that runs unit tests with these installed,
so that we can put something in CI and stop breaking this.
Partial-Bug: #1626106
Change-Id: I81ce147c8958bb89b316c3c28fc9bce172f93873
The gating on python 3.4 is restricted to <= Mitaka. This is due to
the change from Ubuntu Trusty to Xenial, where only python3.5 is
available. So we can drop py34 environment from tox.
Change-Id: I5e4ed5b4e8e90266813c047d6502d2e7f9b7eb59
Use hacking 0.12.0
Use the new checks that are available:
[H106] Don’t put vim configuration in source files.
[H203] Use assertIs(Not)None to check for None.
[H904] Delay string interpolations at logging calls.
Fix code so tests pass.
Change-Id: I902e999687b066800e18fafd091571bf718b15f4
Depends-On: I2aa44b62f900d4dfd67701b01eadd0523fbfaf07
Many deprecations are triggered early (on imports, for example).
To make sure all DeprecationWarning messages are emitted we enable
them via the PYTHONWARNINGS environment variable.
Note: this copy from 1be35ff039d67c50866f2556ef847b048cbf3578
Change-Id: Iac2fc6fdbf9596209ab44fa2274bd66620043a49
Before bashate was only running on the devstack/ directory. Have it
now run on the entire project for *.sh files.
Fix issues detected by bashate.
Also check the files:
devstack/files/hooks/qemu
devstack/lib/ironic
These files were located by doing:
$ find openstack/ironic/ -not \( -type d -name .?\* -prune \) \
-type f -not -name '*.sh' | xargs file | grep -i "shell script"
Change-Id: I238b7ab650781143fe8231e01250ab56120ff94f
This installs the basic directories and content pointing to the current
Ironic Installation Guide. Simply having this in our repo will not lead
to it being published, this is only the first step. Having these items
in our repository is a good first step to building out our install
guide.
Change-Id: I6a0e69bd3b6f5074ae61505f82f27bcf9df84bab
Partial-bug: #1612278