def get_all_cluster_mors(session):
 try:
  results = session._call_method(vim_util, 'get_objects', 'ClusterComputeResource', ['name'])
  session._call_method(vutil, 'cancel_retrieval', results)
  if (results.objects is None):
   return []
  else:
   return results.objects
 except Exception as excep:
  LOG.warning(_LW('Failed to get cluster references %s'), excep)

def get_all_cluster_mors ( session ) : try : results = session . _call_method ( vim_util , 'get_objects' , 'ClusterComputeResource' , [ 'name' ] ) session . _call_method ( vutil , 'cancel_retrieval' , results ) if ( results . objects is None ) : return [ ] else : return results . objects except Exception as excep : LOG . warning ( _LW ( 'Failed to get cluster references %s' ) , excep )
get all the clusters in the vcenter .