def _ofport_retry(fn):
 @six.wraps(fn)
 def wrapped(*args, **kwargs):
  self = args[0]
  new_fn = tenacity.retry(reraise=True, retry=tenacity.retry_if_result(_ofport_result_pending), wait=tenacity.wait_exponential(multiplier=0.01, max=1), stop=tenacity.stop_after_delay(self.vsctl_timeout))(fn)
  return new_fn(*args, **kwargs)
 return wrapped

def _ofport_retry ( fn ) : @ six . wraps ( fn ) def wrapped ( * args , ** kwargs ) : self = args [ 0 ] new_fn = tenacity . retry ( reraise = True , retry = tenacity . retry_if_result ( _ofport_result_pending ) , wait = tenacity . wait_exponential ( multiplier = 0.01 , max = 1 ) , stop = tenacity . stop_after_delay ( self . vsctl_timeout ) ) ( fn ) return new_fn ( * args , ** kwargs ) return wrapped
decorator for retrying when ovs has yet to assign an ofport .