use of com.sequenceiq.freeipa.api.v1.freeipa.upgrade.model.FreeIpaUpgradeOptions in project cloudbreak by hortonworks.
the class UpgradeService method collectUpgradeOptions.
public FreeIpaUpgradeOptions collectUpgradeOptions(String accountId, String environmentCrn, String catalog) {
Stack stack = stackService.getByEnvironmentCrnAndAccountIdWithListsAndMdcContext(environmentCrn, accountId);
ImageInfoResponse currentImage = imageService.fetchCurrentImage(stack);
String catalogForRequest = Optional.ofNullable(catalog).or(() -> Optional.ofNullable(currentImage.getCatalog())).orElse(currentImage.getCatalogName());
List<ImageInfoResponse> targetImages = getTargetImages(catalogForRequest, stack, currentImage);
return createFreeIpaUpgradeOptions(targetImages, currentImage);
}
Aggregations