One of the bandit checks is to attempt to use the system random
library (which is better at producing randomness) vs using the
default random class, this change uses the system random where
applicable.
See: https://wiki.openstack.org/wiki/Security/Projects/Bandit
Change-Id: I15ae3c99267b2dd9dc9ceccd427f6c0aef6ae8da
This codebase can now be updated to use the refactored
base class to avoid duplicating alot of the same code.
Eventually we should also just move this to oslo if
when/this review is accepted since that seems like a better
home for this code in general.
Change-Id: I387d60667f427824a64d52544638792429887ebf
This does a few things:
* Update hacking to the version in global-requirements. Old hacking was
installing a version of pbr that was breaking other packages.
* Fix all the hacking/pep8 rules that updating hacking raised.
* Do some general docstring cleanup, while already in there cleaning up
a bunch of docstrings due to H405 violations.
Change-Id: I1fc1e59d4c3d7b14631f8b576e3f3854bc452188
Closes-Bug: #1461717
The docstrings here were all giving WARNINGs or ERRORs during the docs
build, and were generally making unappealing looking developer
documentation. I corrected the syntax and did what was neccessary to
make the build come out clean.
Change-Id: I74b00a7f125770b0468cff3bdf26d0d52cd054d7
(cherry picked from commit c0921cdff372ce1fd6df1c4ab4eb5463e2cba0e4)
Using DynamicLoopingCall involved a few hacks to make it work properly. This
new BackOffLoopingCall will start an exponential backoff (with a configurable
jitter) when there is a failure. The backoff will continue until the given
function returns True or timeout is about to be exceeded. The function will
run indefinitely until either an exception is raised or timeout is reached.
I plan to merge this into oslo loopingcall and switch the heartbeat to this.
Change-Id: I1482348e98c6b68c34b3003645029e08135b1341