class NovaLauncher extends Launcher {

  @Override
  public void cleanup(JsonCluster definition, ClusterRuntime runtime) throws KaramelException {
    runtime.resolveFailures();
    List<GroupRuntime> groups = runtime.getGroups();
    Set<String> allNovaVms = new HashSet<>();
    Set<String> allNovaVmsIds = new HashSet<>();
    Map<String, String> groupRegion = new HashMap<>();
    for (GroupRuntime group : groups) {
      group.getCluster().resolveFailures();
      Provider provider = UserClusterDataExtractor.getGroupProvider(definition, group.getName());
      if (provider instanceof Nova) {
        for (MachineRuntime machine : group.getMachines()) {
          if (machine.getVmId() != null) {
            allNovaVmsIds.add(machine.getVmId());
          }
        }
        JsonGroup jg = UserClusterDataExtractor.findGroup(definition, group.getName());
        List<String> vmNames = NovaSetting.NOVA_UNIQUE_VM_NAMES(group.getCluster().getName(), group.getName(),
                jg.getSize());
        allNovaVms.addAll(vmNames);
        groupRegion.put(group.getName(), novaContext.getNovaCredentials().getRegion());
      }
    }
    cleanup(definition.getName(), allNovaVmsIds, allNovaVms, groupRegion);
  }

  public  NovaLauncher(NovaContext novaContext, SshKeyPair sshKeyPair);

}