Search in sources :

Example 1 with DestroyInstanceCommand

use of org.apache.whirr.cli.command.DestroyInstanceCommand in project whirr by apache.

the class DestroyInstance method doExecute.

@Override
protected Object doExecute() throws Exception {
    DestroyInstanceCommand command = new DestroyInstanceCommand(clusterControllerFactory);
    ClusterSpec clusterSpec = getClusterSpec();
    if (clusterSpec != null) {
        command.run(System.in, System.out, System.err, clusterSpec, instance);
    }
    return null;
}
Also used : ClusterSpec(org.apache.whirr.ClusterSpec) DestroyInstanceCommand(org.apache.whirr.cli.command.DestroyInstanceCommand)

Aggregations

ClusterSpec (org.apache.whirr.ClusterSpec)1 DestroyInstanceCommand (org.apache.whirr.cli.command.DestroyInstanceCommand)1