> return > Objects.firstNonNull(api.getImageApiForProject(userProject.get()).get(id), > - > Objects.firstNonNull(api.getImageApiForProject(DEBIAN_PROJECT).get(id), > - > api.getImageApiForProject(CENTOS_PROJECT).get(id))); > - > + Iterables.tryFind(listImages(), new Predicate<Image>() { > + @Override > + public boolean apply(Image input) { > + return input.getName().equalsIgnoreCase(id); > + }
Is there a risk that this approach is **significantly** more expensive? The previous approach queries each ImageApiForProject once. Here, we first get _all_ APIs to list _all_ images, then search through them. Am I understanding that correctly? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-google/pull/23/files#r11544354