Search in sources :

Example 1 with HostMetadataSetupRequest

use of com.sequenceiq.freeipa.flow.freeipa.provision.event.hostmetadatasetup.HostMetadataSetupRequest in project cloudbreak by hortonworks.

the class FreeIpaUpscaleActions method collectingHostMetadataAction.

@Bean(name = "UPSCALE_COLLECTING_HOST_METADATA_STATE")
public Action<?, ?> collectingHostMetadataAction() {
    return new AbstractUpscaleAction<>(BootstrapMachinesSuccess.class) {

        @Override
        protected void doExecute(StackContext context, BootstrapMachinesSuccess payload, Map<Object, Object> variables) {
            Stack stack = context.getStack();
            stackUpdater.updateStackStatus(stack.getId(), getInProgressStatus(variables), "Collecting host metadata");
            HostMetadataSetupRequest request = new HostMetadataSetupRequest(stack.getId());
            sendEvent(context, request.selector(), request);
        }
    };
}
Also used : StackContext(com.sequenceiq.freeipa.flow.stack.StackContext) BootstrapMachinesSuccess(com.sequenceiq.freeipa.flow.freeipa.provision.event.bootstrap.BootstrapMachinesSuccess) HostMetadataSetupRequest(com.sequenceiq.freeipa.flow.freeipa.provision.event.hostmetadatasetup.HostMetadataSetupRequest) Map(java.util.Map) Stack(com.sequenceiq.freeipa.entity.Stack) CloudStack(com.sequenceiq.cloudbreak.cloud.model.CloudStack) Bean(org.springframework.context.annotation.Bean)

Aggregations

CloudStack (com.sequenceiq.cloudbreak.cloud.model.CloudStack)1 Stack (com.sequenceiq.freeipa.entity.Stack)1 BootstrapMachinesSuccess (com.sequenceiq.freeipa.flow.freeipa.provision.event.bootstrap.BootstrapMachinesSuccess)1 HostMetadataSetupRequest (com.sequenceiq.freeipa.flow.freeipa.provision.event.hostmetadatasetup.HostMetadataSetupRequest)1 StackContext (com.sequenceiq.freeipa.flow.stack.StackContext)1 Map (java.util.Map)1 Bean (org.springframework.context.annotation.Bean)1