'Query pool information.'

def _get_pool_info(self, poolid):

    (ret, output) = self.dpl.get_pool(poolid)
    if (ret == errno.EAGAIN):
        (ret, event_uuid) = self._get_event_uuid(output)
        if (ret == 0):
            status = self._wait_event(self.dpl.get_pool_status, poolid, event_uuid)
            if (status['state'] != 'available'):
                msg = (_('Flexvisor    failed    to    get    pool    info    %(id)s:    %(status)s.') % {'id': poolid, 'status': ret})
                raise exception.VolumeBackendAPIException(data=msg)
            else:
                ret = 0
                output = status.get('output', {})
        else:
            LOG.error('Flexvisor    failed    to    get    pool    %(id)s    info.', {'id': poolid})
            raise exception.VolumeBackendAPIException(data='failed    to    get    event')
    elif (ret != 0):
        msg = (_('Flexvisor    failed    to    get    pool    info    %(id)s:    %(status)s.') % {'id': poolid, 'status': ret})
        raise exception.VolumeBackendAPIException(data=msg)
    else:
        LOG.debug('Flexvisor    succeeded    to    get    pool    info.')
    return (ret, output)
