'Return the size available in path based on ansible_mounts.'

@staticmethod
def free_bytes(path, ansible_mounts):

    mount_point = path
    max_depth = 32
    while ((mount_point not in ansible_mounts) and (max_depth > 0)):
        mount_point = os.path.dirname(mount_point)
        max_depth -= 1
    try:
        free_bytes = ansible_mounts[mount_point]['size_available']
    except KeyError:
        known_mounts = (',    '.join(('"{}"'.format(mount) for mount in sorted(ansible_mounts))) or 'none')
        msg = 'Unable    to    determine    disk    availability    for    "{}".    Known    mount    points:    {}.'
        raise OpenShiftCheckException(msg.format(path, known_mounts))
    return free_bytes
