@Override
      public Void invoke() throws AmbariException {
        Comparable deletedCluster = ((EqualsPredicate) predicate).getValue();
        String toDelete = deletedCluster.toString();
        RemoteAmbariClusterEntity clusterEntity = remoteAmbariClusterDAO.findByName(toDelete);
        if(clusterEntity == null){
          throw new IllegalArgumentException("The Cluster "+ toDelete +" does not exist");
        }

        remoteAmbariClusterRegistry.delete(clusterEntity);
        return null;
      }
Get the command to delete the Cluster
@param predicate
@return The delete command
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RemoteClusterResourceProvider.java