@Override public Set<? extends Image> get() { final Set<Image> images = Sets.newHashSet(); logger.debug(">> providing images"); for (org.jclouds.rimuhosting.miro.domain.Image from : sync.getImageList()) { ImageBuilder builder = new ImageBuilder(); builder.ids(from.getId() + ""); builder.name(from.getDescription()); builder.description(from.getDescription()); builder.operatingSystem(parseOs(from)); builder.status(Status.AVAILABLE); images.add(builder.build()); } logger.debug("<< images(%d)", images.size()); return images; }
@Override public NodeMetadata getNode(String id) { long serverId = Long.parseLong(id); Server server = client.getServer(serverId); return server == null ? null : serverToNodeMetadata.apply(server); }