@Override
public BaseNfvImage addImage(String id, BaseNfvImage image, String projectId)
throws VimException, PluginException, EntityUnreachableException, IOException,
NotFoundException {
BaseVimInstance vimInstance = vimRepository.findFirstByIdAndProjectId(id, projectId);
if (vimInstance == null) throw new NotFoundException("No VIMInstance found with ID " + id);
if (!vimInstance.isActive()) {
throw new EntityUnreachableException(
"VimInstance " + vimInstance.getName() + " is not reachable");
}
image = vimRepository.addImage(id, image);
refresh(vimInstance, true);
return image;
}