'find Instance or InstanceName of pool by pool name on ETERNUS.'

def _find_pool(self, eternus_pool, detail=False):

    LOG.debug('_find_pool,    pool    name:    %s.', eternus_pool)
    tppoollist = []
    rgpoollist = []
    try:
        tppoollist = self._enum_eternus_instances('FUJITSU_ThinProvisioningPool')
        rgpoollist = self._enum_eternus_instances('FUJITSU_RAIDStoragePool')
    except Exception:
        msg = (_('_find_pool,    eternus_pool:%(eternus_pool)s,    EnumerateInstances,    cannot    connect    to    ETERNUS.') % {'eternus_pool': eternus_pool})
        LOG.error(msg)
        raise exception.VolumeBackendAPIException(data=msg)
    poollist = (tppoollist + rgpoollist)
    for pool in poollist:
        if (pool['ElementName'] == eternus_pool):
            poolinstance = pool
            break
    else:
        poolinstance = None
    if (poolinstance is None):
        ret = None
    elif (detail is True):
        ret = poolinstance
    else:
        ret = poolinstance.path
    LOG.debug('_find_pool,    pool:    %s.', ret)
    return ret
