/** * Execute the update of a Virtual Network Function Record (VNFR) (The UPDATE is intended as the * execution of the scripts associated to the lifecycle UPDATE by the VNF provider) * * @param nsrId * @param vnfrId * @param projectId * @return * @throws NotFoundException */ @Override public VirtualNetworkFunctionRecord updateVnfr(String nsrId, String vnfrId, String projectId) throws NotFoundException, BadFormatException, ExecutionException, InterruptedException { VirtualNetworkFunctionRecord vnfr = vnfrRepository.findByIdAndParent_ns_idAndProjectId(vnfrId, nsrId, projectId); log.info("Updating VNFR: " + vnfr.getName()); vnfmManager.updateVnfr(nsrId, vnfrId, projectId); return vnfr; }
@Override public void updateVnfr(String nsrId, String vnfrId, String projectId) throws NotFoundException, BadFormatException, ExecutionException, InterruptedException { VirtualNetworkFunctionRecord vnfr = vnfrRepository.findByIdAndParent_ns_idAndProjectId(vnfrId, nsrId, projectId); OrVnfmUpdateMessage orVnfmUpdateMessage = new OrVnfmUpdateMessage(); orVnfmUpdateMessage.setScript(null); orVnfmUpdateMessage.setVnfr(vnfr); vnfStateHandler.sendMessageToVNFR(vnfr, orVnfmUpdateMessage); }
vnfrRepository.findByIdAndParent_ns_idAndProjectId(vnfrId, nsrId, projectId); log.info("Upgrading VNFR: " + vnfr.getName() + " - " + vnfr.getId());
vnfrRepository.findByIdAndParent_ns_idAndProjectId(vnfrId, nsr.getId(), projectId); if (vnfr == null) throw new NotFoundException(