Search in sources :

Example 6 with Credential

use of com.sequenceiq.freeipa.dto.Credential 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 7 with Credential

use of com.sequenceiq.freeipa.dto.Credential 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)

Example 8 with Credential

use of com.sequenceiq.freeipa.dto.Credential in project cloudbreak by hortonworks.

the class AbstractStackStartAction method createFlowContext.

@Override
protected StackStartContext createFlowContext(FlowParameters flowParameters, StateContext<StackStartState, StackStartEvent> stateContext, P payload) {
    Long stackId = payload.getResourceId();
    Stack stack = stackService.getByIdWithListsInTransaction(stackId);
    MDCBuilder.buildMdcContext(stack);
    List<InstanceMetaData> instances = stack.getNotDeletedInstanceMetaDataList();
    Location location = location(region(stack.getRegion()), availabilityZone(stack.getAvailabilityZone()));
    CloudContext cloudContext = CloudContext.Builder.builder().withId(stack.getId()).withName(stack.getName()).withCrn(stack.getResourceCrn()).withPlatform(stack.getCloudPlatform()).withVariant(stack.getPlatformvariant()).withLocation(location).withUserName(stack.getOwner()).withAccountId(stack.getAccountId()).build();
    Credential credential = credentialService.getCredentialByEnvCrn(stack.getEnvironmentCrn());
    CloudCredential cloudCredential = credentialConverter.convert(credential);
    return new StackStartContext(flowParameters, stack, instances, cloudContext, cloudCredential);
}
Also used : InstanceMetaData(com.sequenceiq.freeipa.entity.InstanceMetaData) CloudCredential(com.sequenceiq.cloudbreak.cloud.model.CloudCredential) Credential(com.sequenceiq.freeipa.dto.Credential) StackStartContext(com.sequenceiq.freeipa.flow.stack.start.StackStartContext) CloudCredential(com.sequenceiq.cloudbreak.cloud.model.CloudCredential) CloudContext(com.sequenceiq.cloudbreak.cloud.context.CloudContext) Stack(com.sequenceiq.freeipa.entity.Stack) Location(com.sequenceiq.cloudbreak.cloud.model.Location)

Example 9 with Credential

use of com.sequenceiq.freeipa.dto.Credential in project cloudbreak by hortonworks.

the class AbstractStackTerminationAction method createFlowContext.

@Override
protected StackTerminationContext createFlowContext(FlowParameters flowParameters, StateContext<StackTerminationState, StackTerminationEvent> stateContext, P payload) {
    Stack stack = stackService.getByIdWithListsInTransaction(payload.getResourceId());
    MDCBuilder.buildMdcContext(stack);
    Location location = location(region(stack.getRegion()), availabilityZone(stack.getAvailabilityZone()));
    CloudContext cloudContext = CloudContext.Builder.builder().withId(stack.getId()).withName(stack.getName()).withCrn(stack.getResourceCrn()).withPlatform(stack.getCloudPlatform()).withVariant(stack.getPlatformvariant()).withLocation(location).withUserName(stack.getOwner()).withAccountId(stack.getAccountId()).build();
    Credential credential = credentialService.getCredentialByEnvCrn(stack.getEnvironmentCrn());
    CloudCredential cloudCredential = credentialConverter.convert(credential);
    CloudStack cloudStack = cloudStackConverter.convert(stack);
    List<Resource> resourceList = resourceService.findAllByStackId(stack.getId());
    List<CloudResource> resources = resourceList.stream().map(r -> resourceConverter.convert(r)).collect(Collectors.toList());
    return new StackTerminationContext(flowParameters, stack, cloudContext, cloudCredential, cloudStack, resources);
}
Also used : CloudContext(com.sequenceiq.cloudbreak.cloud.context.CloudContext) Payload(com.sequenceiq.cloudbreak.common.event.Payload) AvailabilityZone.availabilityZone(com.sequenceiq.cloudbreak.cloud.model.AvailabilityZone.availabilityZone) Location.location(com.sequenceiq.cloudbreak.cloud.model.Location.location) MDCBuilder(com.sequenceiq.cloudbreak.logger.MDCBuilder) ResourceToCloudResourceConverter(com.sequenceiq.freeipa.converter.cloud.ResourceToCloudResourceConverter) Inject(javax.inject.Inject) StackTerminationEvent(com.sequenceiq.freeipa.flow.stack.termination.StackTerminationEvent) StateContext(org.springframework.statemachine.StateContext) Credential(com.sequenceiq.freeipa.dto.Credential) ResourceService(com.sequenceiq.freeipa.service.resource.ResourceService) Resource(com.sequenceiq.freeipa.entity.Resource) Location(com.sequenceiq.cloudbreak.cloud.model.Location) StackService(com.sequenceiq.freeipa.service.stack.StackService) AbstractStackAction(com.sequenceiq.freeipa.flow.stack.AbstractStackAction) Stack(com.sequenceiq.freeipa.entity.Stack) StackFailureEvent(com.sequenceiq.freeipa.flow.stack.StackFailureEvent) CloudResource(com.sequenceiq.cloudbreak.cloud.model.CloudResource) StackTerminationState(com.sequenceiq.freeipa.flow.stack.termination.StackTerminationState) Region.region(com.sequenceiq.cloudbreak.cloud.model.Region.region) 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) StackTerminationContext(com.sequenceiq.freeipa.flow.stack.termination.StackTerminationContext) CloudStack(com.sequenceiq.cloudbreak.cloud.model.CloudStack) List(java.util.List) StackToCloudStackConverter(com.sequenceiq.freeipa.converter.cloud.StackToCloudStackConverter) Optional(java.util.Optional) CredentialService(com.sequenceiq.freeipa.service.CredentialService) Credential(com.sequenceiq.freeipa.dto.Credential) CloudCredential(com.sequenceiq.cloudbreak.cloud.model.CloudCredential) CloudCredential(com.sequenceiq.cloudbreak.cloud.model.CloudCredential) CloudContext(com.sequenceiq.cloudbreak.cloud.context.CloudContext) StackTerminationContext(com.sequenceiq.freeipa.flow.stack.termination.StackTerminationContext) Resource(com.sequenceiq.freeipa.entity.Resource) CloudResource(com.sequenceiq.cloudbreak.cloud.model.CloudResource) CloudResource(com.sequenceiq.cloudbreak.cloud.model.CloudResource) CloudStack(com.sequenceiq.cloudbreak.cloud.model.CloudStack) Stack(com.sequenceiq.freeipa.entity.Stack) CloudStack(com.sequenceiq.cloudbreak.cloud.model.CloudStack) Location(com.sequenceiq.cloudbreak.cloud.model.Location)

Example 10 with Credential

use of com.sequenceiq.freeipa.dto.Credential in project cloudbreak by hortonworks.

the class NetworkServiceTest method testFiltering.

@Test
public void testFiltering() {
    Stack stack = new Stack();
    stack.setCloudPlatform(PLATFORM);
    stack.setRegion(REGION);
    stack.setPlatformvariant(PLATFORM);
    Credential credential = new Credential(PLATFORM, "", "", "", "acc");
    ExtendedCloudCredential extendedCred = new ExtendedCloudCredential(new CloudCredential(), PLATFORM, "", "", "", new ArrayList<>());
    CloudSubnet subnet1 = new CloudSubnet(SUBNET_1, SUBNET_1, "", "10.1.0.0/24");
    CloudSubnet subnet2 = new CloudSubnet(SUBNET_2, SUBNET_2, "", "10.1.1.0/24");
    CloudSubnet subnet3 = new CloudSubnet("indifferent", "indifferent", "", "10.1.2.0/24");
    CloudNetwork cloudNetwork1 = new CloudNetwork(NETWORK_ID, NETWORK_ID, Set.of(subnet1, subnet2, subnet3), Map.of());
    CloudNetwork cloudNetwork2 = new CloudNetwork("other", "other", Set.of(new CloudSubnet(SUBNET_1, SUBNET_1), new CloudSubnet("test", "test")), Map.of());
    Map<String, Set<CloudNetwork>> cloudNets = Map.of(REGION, Set.of(cloudNetwork1, cloudNetwork2));
    CloudNetworks cloudNetworks = new CloudNetworks(cloudNets);
    when(credentialService.getCredentialByEnvCrn(ENV_CRN)).thenReturn(credential);
    when(extendedCloudCredentialConverter.convert(credential)).thenReturn(extendedCred);
    when(cloudParameterService.getCloudNetworks(eq(extendedCred), eq(REGION), eq(PLATFORM), any())).thenReturn(cloudNetworks);
    when(networkFilterProviderMap.get(any())).thenReturn(null);
    Multimap<String, String> filteredSubnetWithCidr = underTest.getFilteredSubnetWithCidr(ENV_CRN, stack, NETWORK_ID, List.of(SUBNET_1, SUBNET_2));
    assertEquals(2, filteredSubnetWithCidr.size());
    assertEquals(1, filteredSubnetWithCidr.get(subnet1.getId()).size());
    assertEquals(subnet1.getCidr(), filteredSubnetWithCidr.get(subnet1.getId()).stream().findFirst().get());
    assertEquals(1, filteredSubnetWithCidr.get(subnet2.getId()).size());
    assertEquals(subnet2.getCidr(), filteredSubnetWithCidr.get(subnet2.getId()).stream().findFirst().get());
}
Also used : ExtendedCloudCredential(com.sequenceiq.cloudbreak.cloud.model.ExtendedCloudCredential) ExtendedCloudCredential(com.sequenceiq.cloudbreak.cloud.model.ExtendedCloudCredential) Credential(com.sequenceiq.freeipa.dto.Credential) CloudCredential(com.sequenceiq.cloudbreak.cloud.model.CloudCredential) Set(java.util.Set) ExtendedCloudCredential(com.sequenceiq.cloudbreak.cloud.model.ExtendedCloudCredential) CloudCredential(com.sequenceiq.cloudbreak.cloud.model.CloudCredential) CloudNetworks(com.sequenceiq.cloudbreak.cloud.model.CloudNetworks) CloudSubnet(com.sequenceiq.cloudbreak.cloud.model.CloudSubnet) CloudNetwork(com.sequenceiq.cloudbreak.cloud.model.CloudNetwork) Stack(com.sequenceiq.freeipa.entity.Stack) Test(org.junit.jupiter.api.Test)

Aggregations

Credential (com.sequenceiq.freeipa.dto.Credential)17 Stack (com.sequenceiq.freeipa.entity.Stack)9 CloudCredential (com.sequenceiq.cloudbreak.cloud.model.CloudCredential)7 CloudContext (com.sequenceiq.cloudbreak.cloud.context.CloudContext)5 BadRequestException (com.sequenceiq.cloudbreak.common.exception.BadRequestException)4 InstanceMetaData (com.sequenceiq.freeipa.entity.InstanceMetaData)4 CredentialService (com.sequenceiq.freeipa.service.CredentialService)4 Optional (java.util.Optional)4 Collectors (java.util.stream.Collectors)4 Inject (javax.inject.Inject)4 CloudNetworks (com.sequenceiq.cloudbreak.cloud.model.CloudNetworks)3 CloudResource (com.sequenceiq.cloudbreak.cloud.model.CloudResource)3 ExtendedCloudCredential (com.sequenceiq.cloudbreak.cloud.model.ExtendedCloudCredential)3 Location (com.sequenceiq.cloudbreak.cloud.model.Location)3 MDCBuilder (com.sequenceiq.cloudbreak.logger.MDCBuilder)3 FlowParameters (com.sequenceiq.flow.core.FlowParameters)3 FreeIpaRecommendationResponse (com.sequenceiq.freeipa.api.v1.freeipa.stack.model.create.FreeIpaRecommendationResponse)3 VmTypeResponse (com.sequenceiq.freeipa.api.v1.freeipa.stack.model.create.VmTypeResponse)3 CredentialToCloudCredentialConverter (com.sequenceiq.freeipa.converter.cloud.CredentialToCloudCredentialConverter)3 ResourceToCloudResourceConverter (com.sequenceiq.freeipa.converter.cloud.ResourceToCloudResourceConverter)3