neutron/neutron/agent/common
Boden R e8bd6424e9 Replace retrying with tenacity
We are replacing all usages of the 'retrying' package with
'tenacity' as the author of retrying is not actively maintaining
the project. Tenacity is a fork of retrying, but has improved the
interface and extensibility (see [1] for more details). Our end
goal here is removing the retrying package from our requirements.

Tenacity provides the same functionality as retrying, but has the
following major differences to account for:
- Tenacity uses seconds rather than ms as retrying did.
- Tenacity has different kwargs for the decorator and
Retrying class itself.
- Tenacity has a different approach for retrying args by
using classes for its stop/wait/retry kwargs.
- By default tenacity raises a RetryError if a retried callable
times out; retrying raises the last exception from the callable.
Tenacity provides backwards compatibility here by offering
the 'reraise' kwarg.
- Tenacity defines 'time.sleep' as a default value for a kwarg.
That said consumers who need to mock patch time.sleep
need to account for this via mocking of time.sleep before
tenacity is imported.
- For retries that check a result, tenacity will raise if the retried
function raises, whereas retrying retried on all exceptions.

This patch updates all usages of retrying with tenacity.
Unit tests will be included where applicable.

Note: This change is not newton critical so projects are welcome
to hold off on committing until post-newton. Ideally this change
will merge by the first part of Ocata so dependant functionality
can land and have time to solidify for Ocata.

[1] https://github.com/jd/tenacity

Closes-Bug: #1635395

Change-Id: I1c0620894d07d58efbba5226b5244fec950354ca
2016-10-20 13:43:40 -06:00
..
__init__.py Empty files should not contain copyright or license 2014-10-20 00:50:32 +00:00
base_polling.py OVS agent support on Hyper-V 2015-03-25 13:48:33 -07:00
config.py Merge "Add debug option to verify iptables rules" 2016-08-15 18:04:23 +00:00
ip_lib.py Ovs agent can't start on Windows because of validate_local_ip 2016-03-19 12:22:59 -07:00
ovs_lib.py Replace retrying with tenacity 2016-10-20 13:43:40 -06:00
polling.py Fixes "OVS Agent doesn't start on Windows" 2016-03-15 03:14:05 +00:00
utils.py Relocate Agent DB model 2016-10-07 14:18:19 -04:00