'Verifies NFS share is eligible to host volume with given size.
First validation step: ratio of actual space (used_space / total_space)
is less than used_ratio. Second validation step: apparent space
allocated (differs from actual space used when using sparse files)
and compares the apparent available
space (total_available * oversub_ratio) to ensure enough space is
available for the new volume.
:param nfs_share: NFS share
:param volume_size_in_gib: int size in GB'

def _is_share_eligible(self, nfs_share, volume_size_in_gib, share_info=None):

    if (share_info is None):
        (total_size, total_available, total_allocated) = self._get_capacity_info(nfs_share)
        share_info = {'total_size': total_size, 'total_available': total_available, 'total_allocated': total_allocated}
    used_percentage = (100 - self.reserved_percentage)
    used_ratio = (used_percentage / 100.0)
    requested_volume_size = (volume_size_in_gib * units.Gi)
    apparent_size = max(0, (share_info['total_size'] * self.max_over_subscription_ratio))
    apparent_available = max(0, (apparent_size - share_info['total_allocated']))
    actual_used_ratio = ((share_info['total_size'] - share_info['total_available']) / float(share_info['total_size']))
    if (actual_used_ratio > used_ratio):
        LOG.debug('%s    is    not    eligible    -    used    ratio    exceeded.', nfs_share)
        return False
    if (apparent_available <= requested_volume_size):
        LOG.debug('%s    is    not    eligible    -    insufficient    (apparent)    available    space.', nfs_share)
        return False
    if ((share_info['total_allocated'] / share_info['total_size']) >= self.max_over_subscription_ratio):
        LOG.debug('%s    is    not    eligible    -    utilization    exceeds    max    over    subscription    ratio.', nfs_share)
        return False
    return True
