The pysnmp library is not maintained since 4 years now and it's
incompatible with recent libraries like pyasn1.
Its fork pysnmp-lextudio is regularly maintained, we should move
to that.
Change-Id: I3b7b5c0cf2f7d669b265669d27e0eaca0dd1fc2a
Any version of testtools lower than 2.5.0 fails if the
attribute 'result_supports_subtests' is present on any
test object because of old unittest support.
See also https://github.com/testing-cabal/testtools/issues/235
and 38fc9a9e30
for more info.
Change-Id: I23a1ca789f4ea4ffd981e1071f3c2c6c333ac330
Update minimum required versions of python packages.
The updates is based on crosscheck requirements from required
packages:
oslo-log 4.3.0 depends on oslo.context>=2.20.0
oslo-config 6.8.0 depends on rfc3986>=1.2.0
oslo-config 6.8.0 depends on requests>=2.18.0
oslo-log 4.3.0 depends on pbr>=3.1.1
oslo-log 4.3.0 depends on oslo.serialization>=2.25.0
oslo-policy 3.7.0 depends on oslo.context>=2.22.0
Also update minimum versions of ddt and stestr to avoid compatibility
issues with recent Python versions (3.8 and higher).
Change-Id: I34b558f4e7b93618130af1ba2250f6ab8575d4d6
* move pep8 dependencies from test-requirements to tox.ini,
they're not needed there and are hard to constraint properly.
* add oslo.cache to l-c to avoid bump of dependencies
Change-Id: Ia5330f3d5778ee62811da081c28a16965e512b55
This commit fixes getting MAC address while inspection for iRMC driver.
To remove ord() in retrieving MAC address, it can avoid the following
exception:
TypeError: ord() expected string of length 1, but int found
Also, this commit sets the following type of mock for UT. So, I add
'pysnmp'[1] into test-requirements.txt and lower-constraints.txt.
* pysnmp.proto.rfc1902.OctetString
* pysnmp.proto.rfc1902.Integer32
[1] https://bit.ly/3bDeTCH
Change-Id: I1e013a93854e01a7060e1fc48aac091e7e9b74cb
flake8 new release 3.8.0 added new checks and gate pep8
job start failing. hacking 3.0.1 fix the pinning of flake8 to
avoid bringing in a new version with new checks.
Though it is fixed in latest hacking but 2.0 and 3.0 has cap for
flake8 as <4.0.0 which mean flake8 new version 3.9.0 can also
break the pep8 job if new check are added.
To avoid similar gate break in future, we need to bump the hacking min
version.
- http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014828.html
Change-Id: Idb45c6b09980c6850b1acf05a03c9be59fb254bc
The 2.6.0 version introduces some checks that cause failures
with the current code. hacking and flake8 cap could have solve
the pycodestyle compatible version but flake8-import-order which
does not cap the pycodestyle pulled its latest version and break
things.
Also remove the flake8 from test-requirements and let hacking
handle the flake8 version otherwise ironic will still pull the
latest flake8 which can break things in future.
To make it work, we need to explicitly cap pycodestyle itself
so that no other package pull the new checks in.
Change-Id: Ia4b6f5aa8fe45d08a1563160e585947f35501ef2
This should help slowly enabling H210 test everywhere.
Also fixing H210 enforced autospec in some places.
Change-Id: Ibbc00b528265f8b86bc2fe45e078d56d36381c5d
Neither of these are really used. They have likely been cargo-culted.
Also removing mock from doc/requirements, not sure how it got there.
Change-Id: I8d242d86af4c6ded215e0bc4cf61da346f21e46c
Python3 have a standard library for mock in the unittest module,
let's drop the mock requirement and switch tests to unittest mock.
Change-Id: I4f1b3e25c8adbc24cdda51c73da3b66967f7ef23
Full py3 compatible version.
Add all Python3 modules to stdlib list.
Also includes fix to an enum34 dependency bug.
Change-Id: I6163317368ed9281ad600f47aaa64cbcf44d9a13
GMR requires configuring a path for storing the report via [oslo_reports]log_dir,
this is empty by default, and currently there is no means to specify this option,
thus doesn't respond with SIGUSR2.
Though gmr is optional, test requirement is still required so that we can
generate proper configuration sample for it.
Story: 2007570
Task: 39467
Change-Id: I0f03e9d01a3c4e42a4fc8bf2d8ceb2d1a587056c
The new version enables a lot of standard flake8 checks. Some of them
are temporary disabled to reduce the scope of this patch:
* Complexity check requires a few functions to be rewritten (apparently,
it was not enabled previously).
* Indentation check failures are numerous and potentially contradictive.
These checks will be enabled in follow-ups.
W606 is removed from excludes since we no longer hit it.
Change-Id: I1e5a6f8e5e90c55cfc6f740b26c30196512d3be3
Add power state change callbacks of an instance to nova by
performing API requests. Whenever there is a change in the
power state of a physical instance (example a "power on"
or "power off" IPMI command is issued or the periodic
``_sync_power_states`` task detects a change in power state)
ironic will create and send a ``power-update`` external event
to nova using which nova will update the power state of the
instance in its database. By conveying the power state changes
to nova, ironic becomes the source of truth thus preventing
nova from forcing wrong power states on the instance during
the nova-ironic periodic sync. It also adds the possibility of
bringing up/down a physical instance through the ironic API
even if it was put down/up through the nova API.
Note that ironic only sends requests to nova if the target
power state is either "power on" or "power off". Other error
states will be ignored. In cases where the power state change
is originally coming from nova, the event will still be
created and sent to nova and on the nova side it will be a
no-op with a debug log saying the node is already powering on/off.
NOTE: Although an exclusive lock (task_manager.upgrade_lock()
method) is used when calling the nova API to send events,
there can still be a race condition if the nova-ironic power sync
happens to happen a nano-second before the power state change
event is received from ironic in which case the nova state will
be forced on the node.
Credit for introducing ksa adapter: Eric Fried <openstack@fried.cc>
Depends-On: https://review.opendev.org/#/c/645611/
Part of blueprint nova-support-instance-power-update
Story: 2004969
Task: 29424
Change-Id: I6d105524e1645d9a40dfeae2850c33cf2d110826
This issue will occurs when they validate with test-requirements in
constraints.
issue logs:
| ubuntu-xenial | Validating test-requirements.txt
| ubuntu-xenial | Requirement for package stestr has no lower bound
Change-Id: I61a25bc6ccbc97006443db8f9086bec41506e940
hacking is not capped in g-r and it is in
blacklist for requirement as hacking new version
can break the gate jobs.
Hacking can break gate jobs because of various
reasons:
- There might be new rule addition in hacking
- Some rules becomes default from non-default
- Updates in pycodestyle etc
That was the main reason it was not added in g-r
auto sync also. Most of the project maintained the
compatible and cap the hacking version in
test-requirements.txt and update to new version when
project is ready. Bumping new version might need code
fix also on project side depends on what new in that
version.
If project does not have cap the hacking version then,
there is possibility of gate failure whenever new hacking
version is released by QA team.
Example of such failure in recent release of hacking 1.1.0
- http://lists.openstack.org/pipermail/openstack-dev/2018-May/130282.html
Change-Id: I688a5f322bba52ae3b9fa5ecab5bed4f58fec542
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
- python-subunit is not used directly anywhere
and it is dependency of both testrepository and os-testr
(probably was used by some tox wrapper script before)
- python-ironicclient is not used anywhere
(probably should've been used by functional tests,
but we still have none of those).
Change-Id: I42aeb75dab18d90d60792f070599532fd3d9af10
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
Since pbr already landed and the old version of hacking seems not
work very well with pbr>=2, we should update it to match global
requirement.
Partial-Bug: #1668848
Change-Id: I635dbf199bad59c72401a4de1de5200132746f6f