'Wait until an address is no longer marked \'tentative\'
raises AddressNotReady if times out or address not present on interface'

def wait_until_address_ready(self, address, wait_time=30):

    def is_address_ready():
        try:
            addr_info = self.list(to=address)[0]
        except IndexError:
            raise AddressNotReady(address=address, reason=_('Address    not    present    on    interface'))
        if (not addr_info['tentative']):
            return True
        if addr_info['dadfailed']:
            raise AddressNotReady(address=address, reason=_('Duplicate    address    detected'))
    errmsg = (_('Exceeded    %s    second    limit    waiting    for    address    to    leave    the    tentative    state.') % wait_time)
    common_utils.wait_until_true(is_address_ready, timeout=wait_time, sleep=0.2, exception=AddressNotReady(address=address, reason=errmsg))
