According to Openstack summit session [1] stestr is maintained project
to which all Openstack projects should migrate.
Let's switch it then.
Also adjust requirements to pass the gate.
[1] https://etherpad.openstack.org/p/YVR-python-pti
Change-Id: I79b2220c20a04e2e33360bc330b5b4b4124caf71
Signed-off-by: Chuck Short <chucks@redhat.com>
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: Ic87686868f784f0e1b514d6b899cc16240d88d61
This fixes the warning/errors except for the C901 Function is
too complex in the ironic_inspector/rules.py's create method.
Bump's max-complexity to 18 in tox.ini to workaround the C901.
Story: 2001985
Task: 19604
Change-Id: I6c76a43353b1beb572dbde78dba4b4a839d45ea7
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: I8a5c47cb8e4d623776cd4335754184f6f7f0d398
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
different distros already come with different minor versions of Python3,
so let's use general 'py3' tox env when invoking tox without specific
env.
This is just a convenience for developers and will not affect gates,
as they use specific tox envs, all of them pre-generated by tox by
default.
Change-Id: Ife1d1b66e5ebf698f16a5b830604117a6e111107
Instead of a legacy tox job, use the already defined functional jobs
that do the same. Note that those jobs are named "functional", so update
tox.ini as well.
Remove unused playbooks.
Change-Id: Icdb1b94b0e69ffb55007e166705871010e8943c5
Enable the following off-by-default checks:
* [H204] Use assert(Not)Equal to check for equality.
* [H205] Use assert(Greater|Less)(Equal) for comparison.
Increase the version of hacking in test-requirements so that can use new
off-by-default checks.
No changes to code were required.
Change-Id: I7fe394d99eee980e90768902b9fc264a8be3fe15
The Zuul v3 job is looking for the log files from the release notes
in: .tox/releasenotes/log/ but we had then in .tox/venv/log/
Fix it to where they Zuul v3 job expects it to be.
Change-Id: Ic0810a681efefe2be4656bc66e2477710a8b15dd
this patch introduces an oslo.policy-based API access policy
enforcement engine to ironic-inspector.
As part of implementation, a proper oslo.context-based request
context is also generated and assigned to each request.
Short overview of changes:
- added custom RequestContext class
- extends oslo.context to handle of "is_public_api" flag
(False by default)
- added context to request in each API route
- '/continue' api sets the "is_public_api" flag to True
- added documented definitions for API access policies and their
defaults
- added enforcement of these policies on API requests
- added oslo.policy-specific entry points to setup.cfg
- added autogenerated policy sample file with defaults
- added documentation with autogenerated policies
Change-Id: Iff6f98fa9950d78608f0a7c325d132c11a1383b3
Closes-Bug: #1719812
This patch moves ironic-inspector to use 'stestr' test runner
via 'ostestr' wrapper.
Effective changes:
- unit tests are now being run in parallel by default
- 'py*' jobs are not running code coverage measurements,
which is left for 'cover' job only
- 'cover' job now also produces html reports consumable by upstream CI,
and fails under 90% of code coverage
- users can leverage all the ostestr/stestr features
Change-Id: I75f539457dbb1d811fdee69de52d1bcee4c6ebe6
Depends-On: Ica838db23b5714c2da1e4313e1a7ece0ca241d44
Closes-Bug: #1666232
pydot2 is incompatible with python3[1]. Bumping the pydot release (through
the test-requirements.txt) rather than pinning basepython to fix this.
Also updating the states.svg with the tox -egenstates result of running
pydot3
[1] https://github.com/erocarrera/pydot/issues/107
Change-Id: I9aa0e701af3915b39e1a5681c2105a6afb687dd2
Depends-On: I82e3651eefd3186c9e131b0db29a328967fb3161
When the timezone of an ironic-inspector develop environment is CST,
tox test will fail. So we should set TZ to UTC by default.
Change-Id: Icebef00efe029d793e04e1aec81132805009bde0
Closes-Bug: #1669699
Add a tool which generates dot diagram from inspector state machine
using atomaton pydot convertor.
Also add generated svg diagram to docs.
Change-Id: I021812288f1833a6ebad2f90cbe862d40bd8d503
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: I9ced9c297273db0eec6ab3995b663b1e8dffe87d
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: I7b1cd98aeb3bb8f4f01dd1d69d1afcd839749074
Openstack infra now supports upper constraints for
all jobs. Updated tox.ini to use upper constraints
for all jobs.
Change-Id: Ibb49105fea5f119d181e7fd6f78ca6cf72ada33f
Closes-Bug: #1614361
This will force pip install to use the upper-constraints.txt specified
version of pip modules. When you don't do this, you are out on the
bleeding edge and become unstable everytime some python library in the
wide world changes in a way that you don't expect.
Post jobs are not yet compatible with the upper-constraints file, so
override the install_command there to skip upper-constraints.
Credit to the equivalent Ironic patch
https://review.openstack.org/#/c/300146/
Change-Id: Ica668afedf622a0be8e8566ac88e1d0020ed9bc7
Closes-Bug: #1563038
This refoctor is needed for tempest test work as tempest tests
will placed in test dir. So move unit tests to separate directory
"unit" under test.
Change-Id: Ic99df6111ef30947148a9e38b9435a54f3d37064
Add new node_not_found_hook - enroll_node_not_found hook,
which allows to enroll unknown nodes to Ironic automatically.
Change-Id: If1528688504e4be4b2369b985bc576544d96868d
Related-Bug: #1524753
To solve the problem of "db type could
not be determined" on py34 we have to run first the py34 env to, then, run
py27. This patch puts py34 first on the tox.ini list of envs to avoid this
problem to happen.
Change-Id: I088ae4e71bfa2e673743193751410693d533153b
Closes-bug: #1489059
* Flatten the directory structure (we don't have that many doc files)
* Dropped HTTP-API from the root so that we don't maintain 2 copies
* Fixed links all over the place
* Leave one copy of README text in the root and include it in docs
* Update 'tox -epep8' to also check docs
Change-Id: Ic14cb73668544be27c6b96b384f93b239e49acfd
Shameless copy-paste from Ic700d719242b17532b0b43a68b7eff507cb3a43c
and Iaef8b78802c04ec8306dd6f1da02d6c6a50697d8 with minimal changes.
Change-Id: I604136b72e2cf6b2bbbc3f9dc46ea3b419e495df
This creates a seperate target splitting out the coverage from the other
tests. The test directory and project names are different, overriding with
passed package name. Since testr is not used, coverage is called separately.
Change-Id: I32c132414a8b7e702b65617b95236397f4a471c2
It's the same as func, but runs functional tests with Python 3.
One issue was fixed in ironic_inspector.test.functional.
Change-Id: I6a081ad2ca8857018c6b531ed82182aab0ccca4d
Currently, Ironic-inspector uses SQLite as database.
We should migrate to oslo.db.
In this patch, make database connect operations to oslo_db.
Change-Id: Ibd0f787b570bc101eab9fbd0b59d8a775a95e2e0
Implements: blueprint migrate-to-oslodb
With integration tests on the radar we no longer need to do
integration checking between ramdisk code and inspector here.
Also copy integration test script from functest to devstack.
Once we update the gate to use the new script, the whole functest
directory should be deleted.
Change-Id: Ic29e954fac1c535cb4f83d46ccea9ebfb80f840c
Closes-Bug: #1468748
New home will be IPA, patch is already being worked on:
https://review.openstack.org/#/c/194116/
Anyway, we have to get rid of the ramdisk code before release.
Change-Id: I1b71a466059e70fd249712eaaf325efd459addcf
Closes-Bug: #1464708
Also creates a required "venv" environment, drops version handling
from __init__.py and updates requirements.
Closes-Bug: #1466477
Change-Id: I57ce71ee52cc48e0239cdecb69fd2272fc99ea41
When a development environment is under a proxy, tox is failed even if
environment variables of the proxy are set.
This patch fix this problem.
Change-Id: I24ca2f991832e5a0689c1051b60caf949d8225a1