def get_cluster_ref_by_name(session, cluster_name):
    all_clusters = get_all_cluster_mors(session)
    for cluster in all_clusters:
        if (hasattr(cluster, 'propSet') and
                    cluster.propSet[0].val == cluster_name):
            return cluster.obj
Get reference to the vCenter cluster with the specified name.
dataset/ETHPy150Open openstack/nova/nova/virt/vmwareapi/vm_util.py/get_cluster_ref_by_name