public Cluster execute(ClusterSpec clusterSpec, Cluster cluster)
throws IOException, InterruptedException {
LOG.info("Destroying " + clusterSpec.getClusterName() + " cluster");
ComputeService computeService =
ComputeServiceContextBuilder.build(clusterSpec).getComputeService();
computeService.destroyNodesMatching(withTag(clusterSpec.getClusterName()));
LOG.info("Cluster {} destroyed", clusterSpec.getClusterName());
return null;
}
}