Replace backoff looping call with oslo_service provided version

The code that comprises the backoff looping call moved to
oslo.service in 0.10.0 and IPA can use that version so remove
the local backoff code and just prefer the oslo.service maintained
and supported version instead.

Change-Id: Ifec3490f9e5c68859deff4a951dcdf59caa7ca3a
This commit is contained in:
Joshua Harlow
2016-02-03 17:27:31 -08:00
parent 3ce3b16803
commit df701c979c
4 changed files with 3 additions and 218 deletions

@ -18,7 +18,6 @@ from oslo_log import log
from oslo_service import loopingcall
import requests
from ironic_python_agent import backoff
from ironic_python_agent import encoding
from ironic_python_agent import errors
@ -80,14 +79,14 @@ class APIClient(object):
def lookup_node(self, hardware_info, timeout, starting_interval,
node_uuid=None):
timer = backoff.BackOffLoopingCall(
timer = loopingcall.BackOffLoopingCall(
self._do_lookup,
hardware_info=hardware_info,
node_uuid=node_uuid)
try:
node_content = timer.start(starting_interval=starting_interval,
timeout=timeout).wait()
except backoff.LoopingCallTimeOut:
except loopingcall.LoopingCallTimeOut:
raise errors.LookupNodeError('Could not look up node info. Check '
'logs for details.')
return node_content