NetworkServiceRecord networkServiceRecord = networkServiceRecordRepository.findFirstById(nsrId); networkServiceRecord.setStatus(Status.ERROR); log.debug("Setting the NSR " + networkServiceRecord.getName() + " in state ERROR"); networkServiceRecordRepository.save(networkServiceRecord);
"A new VNFCInstance will be added to the VDU with ID " + virtualDeploymentUnit.getId()); networkServiceRecord.setStatus(Status.SCALING); networkServiceRecord = nsrRepository.saveCascade(networkServiceRecord); scaleOUT(
networkServiceRecord.setStatus(Status.SCALING); networkServiceRecord = nsrRepository.saveCascade(networkServiceRecord); scaleIn(
networkServiceRecord.setStatus(Status.SCALING); networkServiceRecord = nsrRepository.saveCascade(networkServiceRecord); scaleIn(
networkServiceRecord.setStatus(Status.NULL); networkServiceRecord.setVnffgr(new HashSet<>()); networkServiceRecord.setVersion(networkServiceDescriptor.getVersion());
networkServiceRecord.setStatus(Status.SCALING); networkServiceRecord = nsrRepository.saveCascade(networkServiceRecord); scaleIn(
networkServiceRecord.setStatus(Status.SCALING); networkServiceRecord.setTask("Scaling out"); if (body != null && body.getKeys() != null && !body.getKeys().isEmpty()) {
public void deleteVNFRecord(String idNsr, String idVnf, String projectId) throws NotFoundException { // TODO the logic of this request for the moment deletes only the VNFR from the DB, need to be // removed from the // running NetworkServiceRecord VirtualNetworkFunctionRecord vnfr = vnfrRepository.findOne(idVnf); if (vnfr == null) { throw new NotFoundException("Not found VNFR with ID: " + idVnf); } if (!vnfr.getParent_ns_id().equals(idNsr)) { throw new NotFoundException("Not found VNFR " + idVnf + " in the given NSR " + idNsr); } if (!vnfr.getProjectId().equals(projectId)) { throw new UnauthorizedUserException("VNFR not contained in the chosen project."); } nsrRepository.deleteVNFRecord(idNsr, idVnf); NetworkServiceRecord nsr = query(idNsr, projectId); if (nsr != null) { for (VirtualNetworkFunctionRecord virtualNetworkFunctionRecord : nsr.getVnfr()) { if (nsr.getStatus().ordinal() > virtualNetworkFunctionRecord.getStatus().ordinal()) { nsr.setStatus(vnfr.getStatus()); } } nsrRepository.saveCascade(nsr); } else { log.warn("Parent NS does not exist anymore..."); } }
networkServiceRecord.setStatus(status); SimpleDateFormat format = new SimpleDateFormat("yyyy.MM.dd 'at' HH:mm:ss z"); networkServiceRecord.setUpdatedAt(format.format(new Date()));
networkServiceRecord.setStatus(Status.RESUMING);
"A new VNFCInstance will be added to the VDU with id " + virtualDeploymentUnit.getId()); networkServiceRecord.setStatus(Status.SCALING); networkServiceRecord = nsrRepository.saveCascade(networkServiceRecord); scaleOUT(
networkServiceRecord.setStatus(Status.TERMINATED); // TODO maybe terminating? for (VirtualNetworkFunctionRecord vnfr : networkServiceRecord.getVnfr()) { vnfmManager.release(vnfr);
nsr.setVendor("FOKUS"); nsr.setProjectId(projectId); nsr.setStatus(Status.ACTIVE); nsr.setMonitoring_parameter(new HashSet<>()); nsr.getMonitoring_parameter().add("monitor1");