def update_cluster(cluster_ref, cluster_spec):
 cluster_name = get_managed_object_name(cluster_ref)
 log.trace("Updating cluster '{0}'".format(cluster_name))
 try:
  task = cluster_ref.ReconfigureComputeResource_Task(cluster_spec, modify=True)
 except vim.fault.VimFault as exc:
  raise salt.exceptions.VMwareApiError(exc.msg)
 except vmodl.RuntimeFault as exc:
  raise salt.exceptions.VMwareRuntimeError(exc.msg)
 wait_for_task(task, cluster_name, 'ClusterUpdateTask')

def update_cluster ( cluster_ref , cluster_spec ) : cluster_name = get_managed_object_name ( cluster_ref ) log . trace ( "Updating cluster '{0}'" . format ( cluster_name ) ) try : task = cluster_ref . ReconfigureComputeResource_Task ( cluster_spec , modify = True ) except vim . fault . VimFault as exc : raise salt . exceptions . VMwareApiError ( exc . msg ) except vmodl . RuntimeFault as exc : raise salt . exceptions . VMwareRuntimeError ( exc . msg ) wait_for_task ( task , cluster_name , 'ClusterUpdateTask' )
updates a cluster in a datacenter .