Package com.sequenceiq.cloudbreak.service.stack.event

Examples of com.sequenceiq.cloudbreak.service.stack.event.ProvisionRequest


    @Autowired
    private StackRepository stackRepository;

    @Override
    public void accept(Event<ProvisionRequest> event) {
        ProvisionRequest provisionRequest = event.getData();
        CloudPlatform cloudPlatform = provisionRequest.getCloudPlatform();
        Long stackId = provisionRequest.getStackId();
        Stack stack = stackRepository.findById(stackId);
        MDCBuilder.buildMdcContext(stack);
        LOGGER.info("Accepted {} event.", ReactorConfig.PROVISION_REQUEST_EVENT, stackId);
        provisionSetupContext.setupProvisioning(cloudPlatform, stackId);
    }
View Full Code Here


        stack.setAccount(user.getAccount());
        stack.setHash(generateHash(stack));
        try {
            savedStack = stackRepository.save(stack);
            LOGGER.info("Publishing {} event [StackId: '{}']", ReactorConfig.PROVISION_REQUEST_EVENT, stack.getId());
            reactor.notify(ReactorConfig.PROVISION_REQUEST_EVENT, Event.wrap(new ProvisionRequest(template.cloudPlatform(), stack.getId())));
        } catch (DataIntegrityViolationException ex) {
            throw new DuplicateKeyValueException(stack.getName(), ex);
        }
        return savedStack;
    }
View Full Code Here

        // THEN
        verify(provisionSetupContext, times(1)).setupProvisioning(any(CloudPlatform.class), anyLong());
    }

    private Event<ProvisionRequest> createEvent() {
        return new Event<ProvisionRequest>(new ProvisionRequest(CloudPlatform.AZURE, 1L));
    }
View Full Code Here

TOP

Related Classes of com.sequenceiq.cloudbreak.service.stack.event.ProvisionRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.