use of com.sequenceiq.cloudbreak.cloud.model.component.RepositoryDetails 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.RepositoryDetails in project cloudbreak by hortonworks.
the class RepoTestUtil method getCMRepo.
public static Map<String, RepositoryDetails> getCMRepo(String version) {
Map<String, RepositoryDetails> cmRepo = new HashMap<>();
RepositoryDetails redhat7RepositoryDetails = new RepositoryDetails();
redhat7RepositoryDetails.setBaseurl("http://redhat7-base/" + version);
redhat7RepositoryDetails.setGpgkey("http://redhat7-gpg/" + version);
cmRepo.put("redhat7", redhat7RepositoryDetails);
return cmRepo;
}
Aggregations