'Checks if share is cinder mounted and returns it.'

def _check_share_in_use(self, conn, dir):

    try:
        if conn:
            host = conn.split(':')[0]
            ip = na_utils.resolve_hostname(host)
            share_candidates = []
            for sh in self._mounted_shares:
                sh_exp = sh.split(':')[1]
                if (sh_exp == dir):
                    share_candidates.append(sh)
            if share_candidates:
                LOG.debug('Found    possible    share    matches    %s', share_candidates)
                return self._share_match_for_ip(ip, share_candidates)
    except Exception:
        LOG.warning('Unexpected    exception    while    short    listing    used    share.')
    return None
