def get_cluster_ref_from_name(session, cluster_name):
 cls = session._call_method(vim_util, 'get_objects', 'ClusterComputeResource', ['name'])
 for cluster in cls:
  if (cluster.propSet[0].val == cluster_name):
   return cluster.obj
 return None

def get_cluster_ref_from_name ( session , cluster_name ) : cls = session . _call_method ( vim_util , 'get_objects' , 'ClusterComputeResource' , [ 'name' ] ) for cluster in cls : if ( cluster . propSet [ 0 ] . val == cluster_name ) : return cluster . obj return None
get reference to the cluster with the name specified .