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

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 .