use of com.sequenceiq.cloudbreak.core.bootstrap.service.ClusterDeletionBasedExitCriteriaModel in project cloudbreak by hortonworks.
the class UpgradeCcmOrchestratorService method createStateParams.
private OrchestratorStateParams createStateParams(Long stackId, String saltState) {
Stack stack = stackService.getByIdWithListsInTransaction(stackId);
Set<Node> gatewayNodes = stackUtil.collectGatewayNodes(stack);
OrchestratorStateParams stateParams = new OrchestratorStateParams();
stateParams.setState(saltState);
stateParams.setPrimaryGatewayConfig(gatewayConfigService.getPrimaryGatewayConfig(stack));
stateParams.setTargetHostNames(gatewayNodes.stream().map(Node::getHostname).collect(Collectors.toSet()));
stateParams.setAllNodes(gatewayNodes);
stateParams.setExitCriteriaModel(new ClusterDeletionBasedExitCriteriaModel(stack.getId(), stack.getCluster().getId()));
return stateParams;
}
Aggregations