class ImageBasedDefaultCDHEntries {

    public Map<String, ImageBasedDefaultCDHInfo> getEntries(Long workspaceId, String platform, String imageCatalogName) throws CloudbreakImageCatalogException {
        String catalogName = Optional.ofNullable(imageCatalogName).orElse(ImageCatalogService.CDP_DEFAULT_CATALOG_NAME);
        StatedImages images = imageCatalogService.getImages(workspaceId, catalogName, platform);
        if (images.getImages().getCdhImages().isEmpty()) {
            LOGGER.warn("Missing CDH images for cloud platform: {}. Falling back to AWS.", platform);
            images = imageCatalogService.getImages(workspaceId, catalogName, CloudPlatform.AWS.name());
        }

        return getEntries(images.getImages());
    }

}