Search in sources :

Example 1 with AmbariStackDetailsResponse

use of com.sequenceiq.cloudbreak.api.model.AmbariStackDetailsResponse in project cloudbreak by hortonworks.

the class StackRepoDetailsToAmbariStackDetailsResponseConverter method convert.

@Override
public AmbariStackDetailsResponse convert(StackRepoDetails source) {
    AmbariStackDetailsResponse ambariRepoDetailsJson = new AmbariStackDetailsResponse();
    ambariRepoDetailsJson.setHdpVersion(source.getHdpVersion());
    ambariRepoDetailsJson.setVerify(source.isVerify());
    ambariRepoDetailsJson.setKnox(source.getKnox());
    ambariRepoDetailsJson.setStack(source.getStack());
    ambariRepoDetailsJson.setUtil(source.getUtil());
    ambariRepoDetailsJson.setEnableGplRepo(source.isEnableGplRepo());
    return ambariRepoDetailsJson;
}
Also used : AmbariStackDetailsResponse(com.sequenceiq.cloudbreak.api.model.AmbariStackDetailsResponse)

Example 2 with AmbariStackDetailsResponse

use of com.sequenceiq.cloudbreak.api.model.AmbariStackDetailsResponse in project cloudbreak by hortonworks.

the class ClusterToClusterResponseConverter method convertComponentConfig.

private void convertComponentConfig(ClusterResponse response, Cluster source) {
    try {
        AmbariRepo ambariRepo = componentConfigProvider.getAmbariRepo(source.getComponents());
        if (ambariRepo != null) {
            AmbariRepoDetailsJson ambariRepoDetailsJson = getConversionService().convert(ambariRepo, AmbariRepoDetailsJson.class);
            response.setAmbariRepoDetailsJson(ambariRepoDetailsJson);
        }
        StackRepoDetails stackRepoDetails = componentConfigProvider.getStackRepo(source.getComponents());
        if (stackRepoDetails != null) {
            AmbariStackDetailsResponse ambariRepoDetailsJson = getConversionService().convert(stackRepoDetails, AmbariStackDetailsResponse.class);
            response.setAmbariStackDetails(ambariRepoDetailsJson);
        }
    } catch (RuntimeException e) {
        LOGGER.error("Failed to convert dynamic component.", e);
    }
}
Also used : StackRepoDetails(com.sequenceiq.cloudbreak.cloud.model.component.StackRepoDetails) AmbariStackDetailsResponse(com.sequenceiq.cloudbreak.api.model.AmbariStackDetailsResponse) AmbariRepo(com.sequenceiq.cloudbreak.cloud.model.AmbariRepo) AmbariRepoDetailsJson(com.sequenceiq.cloudbreak.api.model.AmbariRepoDetailsJson)

Aggregations

AmbariStackDetailsResponse (com.sequenceiq.cloudbreak.api.model.AmbariStackDetailsResponse)2 AmbariRepoDetailsJson (com.sequenceiq.cloudbreak.api.model.AmbariRepoDetailsJson)1 AmbariRepo (com.sequenceiq.cloudbreak.cloud.model.AmbariRepo)1 StackRepoDetails (com.sequenceiq.cloudbreak.cloud.model.component.StackRepoDetails)1