Search in sources :

Example 1 with StackType

use of com.sequenceiq.cloudbreak.cloud.model.component.StackType in project cloudbreak by hortonworks.

the class ImageService method addCmRepo.

private void addCmRepo(Stack stack, Set<Component> components, com.sequenceiq.cloudbreak.cloud.model.catalog.Image catalogBasedImage) throws CloudbreakImageCatalogException {
    if (catalogBasedImage.getStackDetails() != null) {
        ImageStackDetails stackDetails = catalogBasedImage.getStackDetails();
        StackType stackType = determineStackType(stackDetails);
        ClouderaManagerRepo clouderaManagerRepo = getClouderaManagerRepo(catalogBasedImage, stackType);
        components.add(new Component(CM_REPO_DETAILS, CM_REPO_DETAILS.name(), new Json(clouderaManagerRepo), stack));
    } else {
        LOGGER.debug("There are no stackDetails for stack {}, cannot determine CM repo version.", stack.getName());
    }
}
Also used : StackType(com.sequenceiq.cloudbreak.cloud.model.component.StackType) ClouderaManagerRepo(com.sequenceiq.cloudbreak.cloud.model.ClouderaManagerRepo) ImageStackDetails(com.sequenceiq.cloudbreak.cloud.model.catalog.ImageStackDetails) Json(com.sequenceiq.cloudbreak.common.json.Json) Component(com.sequenceiq.cloudbreak.domain.stack.Component)

Example 2 with StackType

use of com.sequenceiq.cloudbreak.cloud.model.component.StackType in project cloudbreak by hortonworks.

the class ImageService method addStackRepo.

private void addStackRepo(Stack stack, Set<Component> components, com.sequenceiq.cloudbreak.cloud.model.catalog.Image catalogBasedImage) throws CloudbreakImageCatalogException {
    if (catalogBasedImage.getStackDetails() != null) {
        ImageStackDetails stackDetails = catalogBasedImage.getStackDetails();
        StackType stackType = determineStackType(stackDetails);
        Component stackRepoComponent = getStackComponent(stack, stackDetails, stackType, catalogBasedImage.getOsType());
        components.add(stackRepoComponent);
    }
}
Also used : StackType(com.sequenceiq.cloudbreak.cloud.model.component.StackType) ImageStackDetails(com.sequenceiq.cloudbreak.cloud.model.catalog.ImageStackDetails) Component(com.sequenceiq.cloudbreak.domain.stack.Component)

Aggregations

ImageStackDetails (com.sequenceiq.cloudbreak.cloud.model.catalog.ImageStackDetails)2 StackType (com.sequenceiq.cloudbreak.cloud.model.component.StackType)2 Component (com.sequenceiq.cloudbreak.domain.stack.Component)2 ClouderaManagerRepo (com.sequenceiq.cloudbreak.cloud.model.ClouderaManagerRepo)1 Json (com.sequenceiq.cloudbreak.common.json.Json)1