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

def _is_share_in_use(self, conn, dr):

    try:
        if conn:
            host = conn.split(':')[0]
            ip = self._resolve_hostname(host)
            for sh in (self._mounted_shares + self._mounted_image_shares):
                sh_ip = self._resolve_hostname(sh.split(':')[0])
                sh_exp = sh.split(':')[1]
                if ((sh_ip == ip) and (sh_exp == dr)):
                    LOG.debug('Found    share    match    %s', sh)
                    return sh
    except Exception:
        LOG.warning('Unexpected    exception    while    listing    used    share.')
