use of com.sequenceiq.cloudbreak.cloud.model.component.RepositoryInfo in project cloudbreak by hortonworks.
the class StackMatrixService method getImageBasedCMStackDescriptor.
private ClouderaManagerStackDescriptorV4Response getImageBasedCMStackDescriptor(DefaultCDHInfo stackInfo, Image image) {
ClouderaManagerStackDescriptorV4Response stackDescriptorV4 = stackInfoToClouderaManagerStackDescriptorV4ResponseConverter.convert(stackInfo);
RepositoryInfo cmInfo = new RepositoryInfo();
cmInfo.setVersion(image.getPackageVersion(ImagePackageVersion.CM));
cmInfo.setRepo(image.getRepo().entrySet().stream().collect(Collectors.toMap(Entry::getKey, e -> {
RepositoryDetails repo = new RepositoryDetails();
repo.setBaseurl(e.getValue());
return repo;
})));
ClouderaManagerInfoV4Response cmInfoJson = repositoryInfoToClouderaManagerInfoV4ResponseConverter.convert(cmInfo);
stackDescriptorV4.setClouderaManager(cmInfoJson);
for (ClouderaManagerProduct parcel : stackInfo.getParcels()) {
stackDescriptorV4.getProducts().add(ClouderaManagerProductToClouderaManagerProductV4Response.convert(parcel));
}
stackDescriptorV4.setProductDefinitions(stackInfo.getCsd());
return stackDescriptorV4;
}
use of com.sequenceiq.cloudbreak.cloud.model.component.RepositoryInfo in project cloudbreak by hortonworks.
the class RepoTestUtil method getClouderaManagerInfo.
public static RepositoryInfo getClouderaManagerInfo(String version) {
RepositoryInfo cmInfo = new RepositoryInfo();
cmInfo.setVersion(version);
cmInfo.setRepo(getCMRepo(version));
return cmInfo;
}
Aggregations