Search in sources :

Example 1 with StackUpdate

use of org.openstack4j.model.heat.StackUpdate in project cloudbreak by hortonworks.

the class OpenStackResourceConnector method updateHeatStack.

private List<CloudResourceStatus> updateHeatStack(AuthenticatedContext authenticatedContext, List<CloudResource> resources, String heatTemplate, Map<String, String> parameters) {
    CloudResource resource = utils.getHeatResource(resources);
    String stackName = utils.getStackName(authenticatedContext);
    String heatStackId = resource.getName();
    OSClient<?> client = openStackClient.createOSClient(authenticatedContext);
    StackUpdate updateRequest = Builders.stackUpdate().template(heatTemplate).parameters(parameters).timeoutMins(OPERATION_TIMEOUT).build();
    client.heat().stacks().update(stackName, heatStackId, updateRequest);
    LOGGER.info("Heat stack update request sent with stack name: '{}' for Heat stack: '{}'", stackName, heatStackId);
    return check(authenticatedContext, resources);
}
Also used : CloudResource(com.sequenceiq.cloudbreak.cloud.model.CloudResource) StackUpdate(org.openstack4j.model.heat.StackUpdate)

Aggregations

CloudResource (com.sequenceiq.cloudbreak.cloud.model.CloudResource)1 StackUpdate (org.openstack4j.model.heat.StackUpdate)1