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;
}
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);
}
}
Aggregations