Search in sources :

Example 96 with InstanceMetaData

use of com.sequenceiq.freeipa.entity.InstanceMetaData in project cloudbreak by hortonworks.

the class FreeIpaUpscaleActions method tlsSetupAction.

@Bean(name = "UPSCALE_TLS_SETUP_STATE")
public Action<?, ?> tlsSetupAction() {
    return new AbstractUpscaleAction<>(StackEvent.class) {

        @Override
        protected void doExecute(StackContext context, StackEvent payload, Map<Object, Object> variables) {
            Stack stack = context.getStack();
            stackUpdater.updateStackStatus(stack.getId(), getInProgressStatus(variables), "Setting up TLS");
            StackEvent event;
            try {
                if (!stack.getTunnel().useCcm()) {
                    Set<InstanceMetaData> newInstancesMetaData = stack.getInstanceGroups().stream().flatMap(instanceGroup -> instanceGroup.getAllInstanceMetaData().stream()).filter(this::isNewInstancesWithoutTlsCert).collect(Collectors.toSet());
                    for (InstanceMetaData gwInstance : newInstancesMetaData) {
                        tlsSetupService.setupTls(stack.getId(), gwInstance);
                    }
                }
                event = new StackEvent(UpscaleFlowEvent.UPSCALE_TLS_SETUP_FINISHED_EVENT.event(), stack.getId());
            } catch (Exception e) {
                LOGGER.error("Failed to setup TLS", e);
                event = new UpscaleFailureEvent(stack.getId(), "Setting ups TLS", Set.of(), Map.of(), e);
            }
            sendEvent(context, event.selector(), event);
        }

        private boolean isNewInstancesWithoutTlsCert(InstanceMetaData instanceMetaData) {
            return instanceMetaData.getInstanceStatus().equals(com.sequenceiq.freeipa.api.v1.freeipa.stack.model.common.instance.InstanceStatus.CREATED) && Objects.isNull(instanceMetaData.getServerCert());
        }
    };
}
Also used : InstanceMetaData(com.sequenceiq.freeipa.entity.InstanceMetaData) StackEvent(com.sequenceiq.freeipa.flow.stack.StackEvent) StackContext(com.sequenceiq.freeipa.flow.stack.StackContext) UpscaleFailureEvent(com.sequenceiq.freeipa.flow.freeipa.upscale.event.UpscaleFailureEvent) Map(java.util.Map) ClientErrorException(javax.ws.rs.ClientErrorException) OperationException(com.sequenceiq.cloudbreak.service.OperationException) Stack(com.sequenceiq.freeipa.entity.Stack) CloudStack(com.sequenceiq.cloudbreak.cloud.model.CloudStack) Bean(org.springframework.context.annotation.Bean)

Example 97 with InstanceMetaData

use of com.sequenceiq.freeipa.entity.InstanceMetaData in project cloudbreak by hortonworks.

the class FreeIpaUpscaleActions method updateClusterProxyRegistrationPreBootstrapAction.

@Bean(name = "UPSCALE_UPDATE_CLUSTERPROXY_REGISTRATION_PRE_BOOTSTRAP_STATE")
public Action<?, ?> updateClusterProxyRegistrationPreBootstrapAction() {
    return new AbstractUpscaleAction<>(StackEvent.class) {

        @Override
        protected void doExecute(StackContext context, StackEvent payload, Map<Object, Object> variables) {
            Stack stack = context.getStack();
            stackUpdater.updateStackStatus(stack.getId(), getInProgressStatus(variables), "Update cluster proxy registration before bootstrap");
            List<String> instanceIds = getInstanceIds(variables);
            Set<InstanceMetaData> newInstances = instanceMetaDataService.getByInstanceIds(stack.getId(), instanceIds);
            boolean allNewInstanceHasFqdn = newInstances.stream().allMatch(im -> StringUtils.isNotBlank(im.getDiscoveryFQDN()));
            Selectable event = allNewInstanceHasFqdn ? new ClusterProxyRegistrationRequest(stack.getId()) : new ClusterProxyRegistrationSuccess(stack.getId());
            sendEvent(context, event.selector(), event);
        }
    };
}
Also used : ClusterProxyRegistrationRequest(com.sequenceiq.freeipa.flow.stack.provision.event.clusterproxy.ClusterProxyRegistrationRequest) Stack(com.sequenceiq.freeipa.entity.Stack) CloudStack(com.sequenceiq.cloudbreak.cloud.model.CloudStack) InstanceMetaData(com.sequenceiq.freeipa.entity.InstanceMetaData) StackEvent(com.sequenceiq.freeipa.flow.stack.StackEvent) Selectable(com.sequenceiq.cloudbreak.common.event.Selectable) StackContext(com.sequenceiq.freeipa.flow.stack.StackContext) ClusterProxyRegistrationSuccess(com.sequenceiq.freeipa.flow.stack.provision.event.clusterproxy.ClusterProxyRegistrationSuccess) Map(java.util.Map) Bean(org.springframework.context.annotation.Bean)

Example 98 with InstanceMetaData

use of com.sequenceiq.freeipa.entity.InstanceMetaData in project cloudbreak by hortonworks.

the class RebootActions method rebootAction.

@Bean(name = "REBOOT_STATE")
public Action<?, ?> rebootAction() {
    return new AbstractRebootAction<>(RebootInstanceEvent.class) {

        @Override
        protected void doExecute(RebootContext context, RebootInstanceEvent payload, Map<Object, Object> variables) {
            setOperationId(variables, payload.getOperationId());
            LOGGER.info("Starting reboot for {}", context.getInstanceIds());
            rebootService.startInstanceReboot(context);
            sendEvent(context);
        }

        @Override
        protected Object getFailurePayload(RebootInstanceEvent payload, Optional<RebootContext> flowContext, Exception ex) {
            return new InstanceFailureEvent(payload.getResourceId(), ex, payload.getInstanceIds());
        }

        @Override
        protected Selectable createRequest(RebootContext context) {
            List<CloudInstance> cloudInstances = context.getInstanceMetaDataList().stream().map(instanceMetaData -> instanceMetaDataToCloudInstanceConverter.convert(instanceMetaData)).collect(Collectors.toList());
            List<CloudResource> cloudResources = getCloudResources(context.getStack().getId());
            return new RebootInstancesRequest<>(context.getCloudContext(), context.getCloudCredential(), cloudResources, cloudInstances);
        }

        @Override
        protected RebootContext createFlowContext(FlowParameters flowParameters, StateContext<RebootState, RebootEvent> stateContext, RebootInstanceEvent payload) {
            Long stackId = payload.getResourceId();
            Stack stack = stackService.getStackById(stackId);
            MDCBuilder.buildMdcContext(stack);
            List<InstanceMetaData> instances = instanceMetaDataService.findNotTerminatedForStack(stackId).stream().filter(instanceMetaData -> payload.getInstanceIds().contains(instanceMetaData.getInstanceId())).collect(Collectors.toList());
            CloudContext cloudContext = getCloudContext(stack);
            Credential credential = credentialService.getCredentialByEnvCrn(stack.getEnvironmentCrn());
            CloudCredential cloudCredential = credentialConverter.convert(credential);
            return new RebootContext(flowParameters, stack, instances, cloudContext, cloudCredential);
        }
    };
}
Also used : Action(org.springframework.statemachine.action.Action) InstanceMetaDataToCloudInstanceConverter(com.sequenceiq.freeipa.converter.cloud.InstanceMetaDataToCloudInstanceConverter) CloudContext(com.sequenceiq.cloudbreak.cloud.context.CloudContext) RebootInstancesRequest(com.sequenceiq.cloudbreak.cloud.event.instance.RebootInstancesRequest) LoggerFactory(org.slf4j.LoggerFactory) MDCBuilder(com.sequenceiq.cloudbreak.logger.MDCBuilder) CloudInstance(com.sequenceiq.cloudbreak.cloud.model.CloudInstance) Selectable(com.sequenceiq.cloudbreak.common.event.Selectable) RebootInstanceEvent(com.sequenceiq.freeipa.flow.instance.reboot.RebootInstanceEvent) ResourceToCloudResourceConverter(com.sequenceiq.freeipa.converter.cloud.ResourceToCloudResourceConverter) InstanceEvent(com.sequenceiq.freeipa.flow.instance.InstanceEvent) Inject(javax.inject.Inject) HealthCheckRequest(com.sequenceiq.freeipa.flow.stack.HealthCheckRequest) StateContext(org.springframework.statemachine.StateContext) Credential(com.sequenceiq.freeipa.dto.Credential) ResourceService(com.sequenceiq.freeipa.service.resource.ResourceService) InstanceFailureEvent(com.sequenceiq.freeipa.flow.instance.InstanceFailureEvent) Map(java.util.Map) Resource(com.sequenceiq.freeipa.entity.Resource) StackService(com.sequenceiq.freeipa.service.stack.StackService) RebootEvent(com.sequenceiq.freeipa.flow.instance.reboot.RebootEvent) InstanceMetaData(com.sequenceiq.freeipa.entity.InstanceMetaData) Stack(com.sequenceiq.freeipa.entity.Stack) RebootInstancesResultToCleanupFailureEventConverter(com.sequenceiq.freeipa.flow.freeipa.cleanup.event.failure.RebootInstancesResultToCleanupFailureEventConverter) RebootState(com.sequenceiq.freeipa.flow.instance.reboot.RebootState) PayloadConverter(com.sequenceiq.flow.core.PayloadConverter) InstanceMetaDataService(com.sequenceiq.freeipa.service.stack.instance.InstanceMetaDataService) Logger(org.slf4j.Logger) CloudResource(com.sequenceiq.cloudbreak.cloud.model.CloudResource) FailureDetails(com.sequenceiq.freeipa.api.v1.freeipa.user.model.FailureDetails) FlowParameters(com.sequenceiq.flow.core.FlowParameters) CredentialToCloudCredentialConverter(com.sequenceiq.freeipa.converter.cloud.CredentialToCloudCredentialConverter) CloudCredential(com.sequenceiq.cloudbreak.cloud.model.CloudCredential) Collectors(java.util.stream.Collectors) HealthCheckSuccess(com.sequenceiq.freeipa.flow.stack.HealthCheckSuccess) OperationService(com.sequenceiq.freeipa.service.operation.OperationService) Configuration(org.springframework.context.annotation.Configuration) List(java.util.List) RebootContext(com.sequenceiq.freeipa.flow.instance.reboot.RebootContext) RebootService(com.sequenceiq.freeipa.flow.instance.reboot.RebootService) RebootInstancesResult(com.sequenceiq.cloudbreak.cloud.event.instance.RebootInstancesResult) WaitUntilAvailableFailedToInstanceFailureEventConverter(com.sequenceiq.freeipa.flow.instance.reboot.failure.WaitUntilAvailableFailedToInstanceFailureEventConverter) Optional(java.util.Optional) SuccessDetails(com.sequenceiq.freeipa.api.v1.freeipa.user.model.SuccessDetails) Bean(org.springframework.context.annotation.Bean) Collections(java.util.Collections) CredentialService(com.sequenceiq.freeipa.service.CredentialService) Credential(com.sequenceiq.freeipa.dto.Credential) CloudCredential(com.sequenceiq.cloudbreak.cloud.model.CloudCredential) InstanceFailureEvent(com.sequenceiq.freeipa.flow.instance.InstanceFailureEvent) Optional(java.util.Optional) CloudCredential(com.sequenceiq.cloudbreak.cloud.model.CloudCredential) CloudContext(com.sequenceiq.cloudbreak.cloud.context.CloudContext) StateContext(org.springframework.statemachine.StateContext) CloudInstance(com.sequenceiq.cloudbreak.cloud.model.CloudInstance) Stack(com.sequenceiq.freeipa.entity.Stack) RebootInstancesRequest(com.sequenceiq.cloudbreak.cloud.event.instance.RebootInstancesRequest) InstanceMetaData(com.sequenceiq.freeipa.entity.InstanceMetaData) FlowParameters(com.sequenceiq.flow.core.FlowParameters) RebootInstanceEvent(com.sequenceiq.freeipa.flow.instance.reboot.RebootInstanceEvent) CloudResource(com.sequenceiq.cloudbreak.cloud.model.CloudResource) RebootContext(com.sequenceiq.freeipa.flow.instance.reboot.RebootContext) Map(java.util.Map) Bean(org.springframework.context.annotation.Bean)

Example 99 with InstanceMetaData

use of com.sequenceiq.freeipa.entity.InstanceMetaData in project cloudbreak by hortonworks.

the class RebootActions method rebootFinishedAction.

@Bean(name = "REBOOT_FINISHED_STATE")
public Action<?, ?> rebootFinishedAction() {
    return new AbstractRebootAction<>(HealthCheckSuccess.class) {

        @Inject
        private OperationService operationService;

        @Override
        protected void doExecute(RebootContext context, HealthCheckSuccess payload, Map<Object, Object> variables) {
            addMdcOperationId(variables);
            rebootService.finishInstanceReboot(context);
            LOGGER.info("Finished rebooting {}.", context.getInstanceIds());
            Stack stack = context.getStack();
            SuccessDetails successDetails = new SuccessDetails(stack.getEnvironmentCrn());
            successDetails.getAdditionalDetails().put("InstanceIds", context.getInstanceIdList());
            operationService.completeOperation(stack.getAccountId(), getOperationId(variables), List.of(successDetails), Collections.emptyList());
            sendEvent(context);
        }

        @Override
        protected Object getFailurePayload(HealthCheckSuccess payload, Optional<RebootContext> flowContext, Exception ex) {
            return new InstanceFailureEvent(payload.getResourceId(), ex, payload.getInstanceIds());
        }

        @Override
        protected Selectable createRequest(RebootContext context) {
            return new InstanceEvent(RebootEvent.REBOOT_FINALIZED_EVENT.event(), context.getStack().getId(), context.getInstanceIdList());
        }

        @Override
        protected RebootContext createFlowContext(FlowParameters flowParameters, StateContext<RebootState, RebootEvent> stateContext, HealthCheckSuccess payload) {
            Long stackId = payload.getResourceId();
            Stack stack = stackService.getByIdWithListsInTransaction(stackId);
            MDCBuilder.buildMdcContext(stack);
            List<InstanceMetaData> instances = instanceMetaDataService.findNotTerminatedForStack(stackId).stream().filter(instanceMetaData -> payload.getInstanceIds().contains(instanceMetaData.getInstanceId())).collect(Collectors.toList());
            return new RebootContext(flowParameters, stack, instances, null, null);
        }
    };
}
Also used : Action(org.springframework.statemachine.action.Action) InstanceMetaDataToCloudInstanceConverter(com.sequenceiq.freeipa.converter.cloud.InstanceMetaDataToCloudInstanceConverter) CloudContext(com.sequenceiq.cloudbreak.cloud.context.CloudContext) RebootInstancesRequest(com.sequenceiq.cloudbreak.cloud.event.instance.RebootInstancesRequest) LoggerFactory(org.slf4j.LoggerFactory) MDCBuilder(com.sequenceiq.cloudbreak.logger.MDCBuilder) CloudInstance(com.sequenceiq.cloudbreak.cloud.model.CloudInstance) Selectable(com.sequenceiq.cloudbreak.common.event.Selectable) RebootInstanceEvent(com.sequenceiq.freeipa.flow.instance.reboot.RebootInstanceEvent) ResourceToCloudResourceConverter(com.sequenceiq.freeipa.converter.cloud.ResourceToCloudResourceConverter) InstanceEvent(com.sequenceiq.freeipa.flow.instance.InstanceEvent) Inject(javax.inject.Inject) HealthCheckRequest(com.sequenceiq.freeipa.flow.stack.HealthCheckRequest) StateContext(org.springframework.statemachine.StateContext) Credential(com.sequenceiq.freeipa.dto.Credential) ResourceService(com.sequenceiq.freeipa.service.resource.ResourceService) InstanceFailureEvent(com.sequenceiq.freeipa.flow.instance.InstanceFailureEvent) Map(java.util.Map) Resource(com.sequenceiq.freeipa.entity.Resource) StackService(com.sequenceiq.freeipa.service.stack.StackService) RebootEvent(com.sequenceiq.freeipa.flow.instance.reboot.RebootEvent) InstanceMetaData(com.sequenceiq.freeipa.entity.InstanceMetaData) Stack(com.sequenceiq.freeipa.entity.Stack) RebootInstancesResultToCleanupFailureEventConverter(com.sequenceiq.freeipa.flow.freeipa.cleanup.event.failure.RebootInstancesResultToCleanupFailureEventConverter) RebootState(com.sequenceiq.freeipa.flow.instance.reboot.RebootState) PayloadConverter(com.sequenceiq.flow.core.PayloadConverter) InstanceMetaDataService(com.sequenceiq.freeipa.service.stack.instance.InstanceMetaDataService) Logger(org.slf4j.Logger) CloudResource(com.sequenceiq.cloudbreak.cloud.model.CloudResource) FailureDetails(com.sequenceiq.freeipa.api.v1.freeipa.user.model.FailureDetails) FlowParameters(com.sequenceiq.flow.core.FlowParameters) CredentialToCloudCredentialConverter(com.sequenceiq.freeipa.converter.cloud.CredentialToCloudCredentialConverter) CloudCredential(com.sequenceiq.cloudbreak.cloud.model.CloudCredential) Collectors(java.util.stream.Collectors) HealthCheckSuccess(com.sequenceiq.freeipa.flow.stack.HealthCheckSuccess) OperationService(com.sequenceiq.freeipa.service.operation.OperationService) Configuration(org.springframework.context.annotation.Configuration) List(java.util.List) RebootContext(com.sequenceiq.freeipa.flow.instance.reboot.RebootContext) RebootService(com.sequenceiq.freeipa.flow.instance.reboot.RebootService) RebootInstancesResult(com.sequenceiq.cloudbreak.cloud.event.instance.RebootInstancesResult) WaitUntilAvailableFailedToInstanceFailureEventConverter(com.sequenceiq.freeipa.flow.instance.reboot.failure.WaitUntilAvailableFailedToInstanceFailureEventConverter) Optional(java.util.Optional) SuccessDetails(com.sequenceiq.freeipa.api.v1.freeipa.user.model.SuccessDetails) Bean(org.springframework.context.annotation.Bean) Collections(java.util.Collections) CredentialService(com.sequenceiq.freeipa.service.CredentialService) SuccessDetails(com.sequenceiq.freeipa.api.v1.freeipa.user.model.SuccessDetails) InstanceFailureEvent(com.sequenceiq.freeipa.flow.instance.InstanceFailureEvent) Optional(java.util.Optional) HealthCheckSuccess(com.sequenceiq.freeipa.flow.stack.HealthCheckSuccess) StateContext(org.springframework.statemachine.StateContext) Stack(com.sequenceiq.freeipa.entity.Stack) RebootInstanceEvent(com.sequenceiq.freeipa.flow.instance.reboot.RebootInstanceEvent) InstanceEvent(com.sequenceiq.freeipa.flow.instance.InstanceEvent) InstanceMetaData(com.sequenceiq.freeipa.entity.InstanceMetaData) FlowParameters(com.sequenceiq.flow.core.FlowParameters) OperationService(com.sequenceiq.freeipa.service.operation.OperationService) RebootContext(com.sequenceiq.freeipa.flow.instance.reboot.RebootContext) Map(java.util.Map) Bean(org.springframework.context.annotation.Bean)

Example 100 with InstanceMetaData

use of com.sequenceiq.freeipa.entity.InstanceMetaData in project cloudbreak by hortonworks.

the class RebootActions method rebootWaitUntilAvailableAction.

@Bean(name = "REBOOT_WAIT_UNTIL_AVAILABLE_STATE")
public Action<?, ?> rebootWaitUntilAvailableAction() {
    return new AbstractRebootAction<>(RebootInstancesResult.class) {

        @Override
        protected void doExecute(RebootContext context, RebootInstancesResult payload, Map<Object, Object> variables) {
            LOGGER.info("Starting reboot polling FreeIpa until it is available for {}", context.getInstanceIds());
            rebootService.waitForAvailableStatus(context);
            sendEvent(context);
        }

        @Override
        protected Object getFailurePayload(RebootInstancesResult payload, Optional<RebootContext> flowContext, Exception ex) {
            return new InstanceFailureEvent(payload.getResourceId(), ex, payload.getInstanceIds());
        }

        @Override
        protected Selectable createRequest(RebootContext context) {
            return new HealthCheckRequest(context.getStack().getId(), true, context.getInstanceIdList());
        }

        @Override
        protected RebootContext createFlowContext(FlowParameters flowParameters, StateContext<RebootState, RebootEvent> stateContext, RebootInstancesResult payload) {
            Long stackId = payload.getResourceId();
            Stack stack = stackService.getStackById(stackId);
            MDCBuilder.buildMdcContext(stack);
            List<InstanceMetaData> instances = instanceMetaDataService.findNotTerminatedForStack(stackId).stream().filter(instanceMetaData -> payload.getInstanceIds().contains(instanceMetaData.getInstanceId())).collect(Collectors.toList());
            CloudContext cloudContext = getCloudContext(stack);
            Credential credential = credentialService.getCredentialByEnvCrn(stack.getEnvironmentCrn());
            CloudCredential cloudCredential = credentialConverter.convert(credential);
            return new RebootContext(flowParameters, stack, instances, cloudContext, cloudCredential);
        }
    };
}
Also used : Action(org.springframework.statemachine.action.Action) InstanceMetaDataToCloudInstanceConverter(com.sequenceiq.freeipa.converter.cloud.InstanceMetaDataToCloudInstanceConverter) CloudContext(com.sequenceiq.cloudbreak.cloud.context.CloudContext) RebootInstancesRequest(com.sequenceiq.cloudbreak.cloud.event.instance.RebootInstancesRequest) LoggerFactory(org.slf4j.LoggerFactory) MDCBuilder(com.sequenceiq.cloudbreak.logger.MDCBuilder) CloudInstance(com.sequenceiq.cloudbreak.cloud.model.CloudInstance) Selectable(com.sequenceiq.cloudbreak.common.event.Selectable) RebootInstanceEvent(com.sequenceiq.freeipa.flow.instance.reboot.RebootInstanceEvent) ResourceToCloudResourceConverter(com.sequenceiq.freeipa.converter.cloud.ResourceToCloudResourceConverter) InstanceEvent(com.sequenceiq.freeipa.flow.instance.InstanceEvent) Inject(javax.inject.Inject) HealthCheckRequest(com.sequenceiq.freeipa.flow.stack.HealthCheckRequest) StateContext(org.springframework.statemachine.StateContext) Credential(com.sequenceiq.freeipa.dto.Credential) ResourceService(com.sequenceiq.freeipa.service.resource.ResourceService) InstanceFailureEvent(com.sequenceiq.freeipa.flow.instance.InstanceFailureEvent) Map(java.util.Map) Resource(com.sequenceiq.freeipa.entity.Resource) StackService(com.sequenceiq.freeipa.service.stack.StackService) RebootEvent(com.sequenceiq.freeipa.flow.instance.reboot.RebootEvent) InstanceMetaData(com.sequenceiq.freeipa.entity.InstanceMetaData) Stack(com.sequenceiq.freeipa.entity.Stack) RebootInstancesResultToCleanupFailureEventConverter(com.sequenceiq.freeipa.flow.freeipa.cleanup.event.failure.RebootInstancesResultToCleanupFailureEventConverter) RebootState(com.sequenceiq.freeipa.flow.instance.reboot.RebootState) PayloadConverter(com.sequenceiq.flow.core.PayloadConverter) InstanceMetaDataService(com.sequenceiq.freeipa.service.stack.instance.InstanceMetaDataService) Logger(org.slf4j.Logger) CloudResource(com.sequenceiq.cloudbreak.cloud.model.CloudResource) FailureDetails(com.sequenceiq.freeipa.api.v1.freeipa.user.model.FailureDetails) FlowParameters(com.sequenceiq.flow.core.FlowParameters) CredentialToCloudCredentialConverter(com.sequenceiq.freeipa.converter.cloud.CredentialToCloudCredentialConverter) CloudCredential(com.sequenceiq.cloudbreak.cloud.model.CloudCredential) Collectors(java.util.stream.Collectors) HealthCheckSuccess(com.sequenceiq.freeipa.flow.stack.HealthCheckSuccess) OperationService(com.sequenceiq.freeipa.service.operation.OperationService) Configuration(org.springframework.context.annotation.Configuration) List(java.util.List) RebootContext(com.sequenceiq.freeipa.flow.instance.reboot.RebootContext) RebootService(com.sequenceiq.freeipa.flow.instance.reboot.RebootService) RebootInstancesResult(com.sequenceiq.cloudbreak.cloud.event.instance.RebootInstancesResult) WaitUntilAvailableFailedToInstanceFailureEventConverter(com.sequenceiq.freeipa.flow.instance.reboot.failure.WaitUntilAvailableFailedToInstanceFailureEventConverter) Optional(java.util.Optional) SuccessDetails(com.sequenceiq.freeipa.api.v1.freeipa.user.model.SuccessDetails) Bean(org.springframework.context.annotation.Bean) Collections(java.util.Collections) CredentialService(com.sequenceiq.freeipa.service.CredentialService) Credential(com.sequenceiq.freeipa.dto.Credential) CloudCredential(com.sequenceiq.cloudbreak.cloud.model.CloudCredential) InstanceFailureEvent(com.sequenceiq.freeipa.flow.instance.InstanceFailureEvent) Optional(java.util.Optional) CloudCredential(com.sequenceiq.cloudbreak.cloud.model.CloudCredential) CloudContext(com.sequenceiq.cloudbreak.cloud.context.CloudContext) StateContext(org.springframework.statemachine.StateContext) Stack(com.sequenceiq.freeipa.entity.Stack) InstanceMetaData(com.sequenceiq.freeipa.entity.InstanceMetaData) FlowParameters(com.sequenceiq.flow.core.FlowParameters) RebootInstancesResult(com.sequenceiq.cloudbreak.cloud.event.instance.RebootInstancesResult) HealthCheckRequest(com.sequenceiq.freeipa.flow.stack.HealthCheckRequest) RebootContext(com.sequenceiq.freeipa.flow.instance.reboot.RebootContext) Map(java.util.Map) Bean(org.springframework.context.annotation.Bean)

Aggregations

InstanceMetaData (com.sequenceiq.freeipa.entity.InstanceMetaData)163 Stack (com.sequenceiq.freeipa.entity.Stack)104 Test (org.junit.jupiter.api.Test)77 InstanceGroup (com.sequenceiq.freeipa.entity.InstanceGroup)30 List (java.util.List)19 Logger (org.slf4j.Logger)19 LoggerFactory (org.slf4j.LoggerFactory)19 Map (java.util.Map)18 Collectors (java.util.stream.Collectors)18 Inject (javax.inject.Inject)18 Set (java.util.Set)16 CloudInstance (com.sequenceiq.cloudbreak.cloud.model.CloudInstance)13 GatewayConfig (com.sequenceiq.cloudbreak.orchestrator.model.GatewayConfig)13 Node (com.sequenceiq.cloudbreak.common.orchestration.Node)12 BadRequestException (com.sequenceiq.cloudbreak.common.exception.BadRequestException)11 StackService (com.sequenceiq.freeipa.service.stack.StackService)10 ArrayList (java.util.ArrayList)10 Selectable (com.sequenceiq.cloudbreak.common.event.Selectable)9 HealthDetailsFreeIpaResponse (com.sequenceiq.freeipa.api.v1.freeipa.stack.model.health.HealthDetailsFreeIpaResponse)9 Operation (com.sequenceiq.freeipa.entity.Operation)9