private String getVnfcId() { for (VirtualDeploymentUnit vdu : virtualNetworkFunctionRecord.getVdu()) { for (VNFCInstance vnfcInstance : vdu.getVnfc_instance()) { if (this.vnfcInstance.getVc_id().equals(vnfcInstance.getVc_id())) { return vnfcInstance.getId(); } } if (vnfcInstance.getId() != null) { return vnfcInstance.getId(); } } return null; }
private String getVNFCHostname(NetworkServiceRecord nsr, String vnfcId) { for (VirtualNetworkFunctionRecord vnfr : nsr.getVnfr()) { for (VirtualDeploymentUnit vdu : vnfr.getVdu()) { for (VNFCInstance vnfcInstance : vdu.getVnfc_instance()) { if (vnfcInstance.getId().equals(vnfcId)) { return vnfcInstance.getHostname(); } } } } return null; }
if (vnfcInstance_manager.getId() == null) { instances.add(vnfcInstance_manager); log.debug("Update: added new VNFC instance " + vnfcInstance_manager); if (vnfcInstance_nfvo.getId().equals(vnfcInstance_manager.getId())) { log.debug("Update: Updating existing VNFCInstance " + vnfcInstance_nfvo.getId()); found = true; log.debug("Update: Added new Component " + vnfcInstance_manager.getId());
if (vnfcDependencyParameters.getParameters().get(vnfcInstance.getId()) == null) { DependencyParameters dependencyParameters = new DependencyParameters(); dependencyParameters.setParameters(new HashMap<>()); if (vnfcInstance.getId() == null) { vnfcInstance = vnfcInstanceRepository.save(vnfcInstance); vnfcDependencyParameters.getParameters().put(vnfcInstance.getId(), dependencyParameters); + ip.getIp() + ". VNFCInstance ID: " + vnfcInstance.getId()); vnfcDependencyParameters .getParameters() .get(vnfcInstance.getId()) .getParameters() .put(ip.getNetName(), ip.getIp()); + ip.getIp() + ". VNFCInstance ID: " + vnfcInstance.getId()); vnfcDependencyParameters .getParameters() .get(vnfcInstance.getId()) .getParameters() .put(ip.getNetName() + "_floatingIp", ip.getIp()); vnfcDependencyParameters .getParameters() .get(vnfcInstance.getId())
/** * Returns the VNFCInstance with the passed ID from a specific VDU. If null is passed for the * VNFCInstance ID, the first VNFCInstance in the VDU is returned. * * @param virtualDeploymentUnit the VDU holding the VNFCinstance * @param idVNFCI the id of the VNFCInstance * @return the VNFCinstance * @throws NotFoundException if not found */ private VNFCInstance getVNFCInstance(VirtualDeploymentUnit virtualDeploymentUnit, String idVNFCI) throws NotFoundException { for (VNFCInstance vnfcInstance : virtualDeploymentUnit.getVnfc_instance()) { if (idVNFCI == null || idVNFCI.equals(vnfcInstance.getId())) { return vnfcInstance; } } if (idVNFCI != null) { throw new NotFoundException( "VNFCInstance with ID " + idVNFCI + " was not found in VDU with ID " + virtualDeploymentUnit.getId()); } else { throw new NotFoundException( "No VNFCInstance found in VDU with ID " + virtualDeploymentUnit.getId()); } }
log.debug( "VNFCInstance: (ID: " + vnfcInstance.getId() + " - HOSTNAME: " + vnfcInstance.getHostname() + vnfcInstance.getState() + ")"); if (vnfcInstance.getId().equals(idVNFCI)) { vnfcInstanceToStartStop = vnfcInstance; switch (action) { log.debug( "VNFCInstance to be started: " + vnfcInstanceToStartStop.getId() + " - " + vnfcInstanceToStartStop.getHostname()); log.debug( "VNFCInstance to be stopped: " + vnfcInstanceToStartStop.getId() + " - " + vnfcInstanceToStartStop.getHostname());
log.debug( "Saving VNFC instance " + vnfcInstance.getId() + ". Status of unsaved VNFC instance is: " + vnfcInstance.getState()); + vnfcInstance.getId() + ") is: " + vnfcInstance.getState()); for (VNFCInstance vnfcInstance1 : vdu.getVnfc_instance()) { if (vnfcInstance.getVc_id().equals(vnfcInstance1.getVc_id())) { vnfcId = vnfcInstance1.getId(); break; if (vnfcInstance.getId() != null) { break; log.debug("Saving VNFC instance " + vnfcInstance.getId()); vnfcInstanceRepository.save(vnfcInstance); } catch (Exception e) {
.get(virtualNetworkFunctionRecord.getType()) .getParameters() .remove(failedVnfc.getId()); log.debug( "Current dependency without failed vnfc: "
log.debug("Parameter: " + parametersEntry); if (parametersEntry.getValue() != null) { parametersEntry.getValue().getParameters().remove(vnfcInstance.getId());