return image == null ? null : new ImageInZone(image, zoneAndId.getZone());
}
@Override
public void destroyNode(String id) {
ZoneAndId zoneAndId = ZoneAndId.fromSlashEncoded(id);
if (novaApi.getFloatingIPExtensionForZone(zoneAndId.getZone()).isPresent()) {
try {
removeFloatingIpFromNodeAndDeallocate.apply(zoneAndId);
} catch (RuntimeException e) {
logger.warn(e, "<< error removing and deallocating ip from node(%s): %s", id, e.getMessage());
}
}
novaApi.getServerApiForZone(zoneAndId.getZone()).delete(zoneAndId.getId());
}