'Keep trying to query an item detail unless we reach the timeout.'

def _retry_get_detail(self, start_time, timeout, operation, params):

    reply = self._call_api(operation, params)
    status = reply['status']
    msg = (_('Error    while    getting    %(op)s    details,    returned    code:    %(status)s.') % {'op': operation, 'status': six.text_type(status)})
    if status:
        LOG.error(msg)
        raise exception.VolumeBackendAPIException(data=msg)
    item_status = self._get_item_status(operation, reply)
    if (item_status == DISCO_CODE_MAPPING['request.failure']):
        LOG.error(msg)
        raise exception.VolumeBackendAPIException(data=msg)
    elif (item_status == DISCO_CODE_MAPPING['request.success']):
        raise loopingcall.LoopingCallDone(retvalue=reply)
    elif self.is_timeout(start_time, timeout):
        msg = (_('Timeout    while    calling    %s    ') % operation)
        LOG.error(msg)
        raise exception.VolumeBackendAPIException(data=msg)
