'Returns the share that is served by ip.
Multiple shares can have same dir path but
can be served using different ips. It finds the
share which is served by ip on same nfs server.'

def _share_match_for_ip(self, ip, shares):

    if (self._is_filer_ip(ip) and shares):
        for share in shares:
            ip_sh = share.split(':')[0]
            if self._is_filer_ip(ip_sh):
                LOG.debug('Share    match    found    for    ip    %s', ip)
                return share
    LOG.debug('No    share    match    found    for    ip    %s', ip)
    return None
