@Override public String toString() { return "VnfmManagerEndpoint{} " + super.toString(); } }
@Override public String toString() { String result = "OrVnfmInstantiateMessage{" + "vnfd=" + vnfd + ", vnfr=" + vnfr + ", vnfdf=" + vnfdf + ", vnfInstanceName='" + vnfInstanceName + '\'' + ", vlrs=" + vlrs + ", vimInstances=" + vimInstances; if (vnfPackage != null) { result += ", vnfPackage=" + vnfPackage.getName(); } else { result += ", vnfPackage=" + vnfPackage; } result += ", extension=" + extension + '}'; return result; } }
private Configuration updateConfiguration( Configuration configuration_nfvo, Configuration configuration_manager) { configuration_nfvo.setName(configuration_manager.getName()); configuration_nfvo.setConfigurationParameters( updateConfigurationParameters( configuration_nfvo.getConfigurationParameters(), configuration_manager.getConfigurationParameters())); return configuration_nfvo; }
public static Quota createQuota() { Quota quota = new Quota(); quota.setInstances(Integer.MAX_VALUE); quota.setRam(Integer.MAX_VALUE); quota.setCores(Integer.MAX_VALUE); return quota; }
public void register(String type, String endpoint, EndpointType endpointType) { VnfmManagerEndpoint vnfmManagerEndpoint = new VnfmManagerEndpoint(); vnfmManagerEndpoint.setType(type); vnfmManagerEndpoint.setEndpoint(endpoint); vnfmManagerEndpoint.setEndpointType(endpointType); this.vnfmEndpointRepository.save(vnfmManagerEndpoint); }
@Override public void register(VnfmManagerEndpoint endpoint) throws AlreadyExistingException { log.debug("Persisting: " + endpoint); for (VnfmManagerEndpoint endpointExisting : vnfmEndpointRepository.findAll()) { // TODO: decide whether the type or the endpoint (or both) is the unique identifier. strategy // here is different than in unregister function if (endpointExisting.getEndpoint().equals(endpoint.getEndpoint()) && endpointExisting.getType().equals(endpoint.getType()) && endpointExisting.getEndpointType().equals(endpoint.getEndpointType())) throw new AlreadyExistingException( "VnfmManagerEndpoint " + endpoint + " already exists in the DB"); } endpoint.setActive(true); this.vnfmEndpointRepository.save(endpoint); }
@Override public VNFPackage update(String id, VNFPackage pack_new, String projectId) throws NotFoundException { VNFPackage old = vnfPackageRepository.findFirstByIdAndProjectId(id, projectId); if (old == null) throw new NotFoundException("No VNFPackage found with ID " + id); old.setName(pack_new.getName()); old.setImage(pack_new.getImage()); vnfPackageRepository.save(old); return old; }
private VNFPackage createVNFPackage() { VNFPackage vnfPackage = new VNFPackage(); LinkedHashSet<String> vimTypes = new LinkedHashSet<>(); vimTypes.add("test"); vnfPackage.setVimTypes(vimTypes); return vnfPackage; }
public boolean isOsIdAndVersionCompatible() { boolean result = false; if (getOsId() != null && getOsVersion() != null) { for (String supportedOsId : OS_ID_LIST) { if (supportedOsId.equals("Ubuntu")) { for (String supportedOsVersion : UBUNTU_VERSION_LIST) if (supportedOsVersion.equals(osVersion)) result = true; } else if (supportedOsId.equals("CentOs")) { for (String supportedOsVersion : CENTOS_VERSION_LIST) if (supportedOsVersion.equals(osVersion)) result = true; } } } else result = true; return result; }
@Override public VnfmSender getVnfmSender(EndpointType endpointType) throws BeansException { String senderName = endpointType.toString().toLowerCase() + "VnfmSender"; return (VnfmSender) this.context.getBean(senderName); }
@Override @Transactional public VNFPackageMetadata setVNFPackageId(String vnfPackageId) { VNFPackage vnfPackage = vnfPackageRepository.findFirstById(vnfPackageId); VNFPackageMetadata vnfPackageMetadata = vnfPackage.getVnfPackageMetadata(); vnfPackageMetadata.setVnfPackageFatherId(vnfPackageId); return vnfPackageMetadata; } }
@RequestMapping( value = "/actions", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public Action[] getAvailableEvents() { return Action.values(); } }
public void setStatus(String status) { if (status == null) this.status = ImageStatus.UNRECOGNIZED; else { try { this.status = ImageStatus.valueOf(status.toUpperCase()); } catch (IllegalArgumentException e) { this.status = ImageStatus.UNRECOGNIZED; } } }
private boolean isModifyHasBeenExecuted(VirtualNetworkFunctionRecord vnfr) { for (HistoryLifecycleEvent historyLifecycleEvent : vnfr.getLifecycle_event_history()) { if (historyLifecycleEvent.getEvent().equalsIgnoreCase("MODIFY") || historyLifecycleEvent.getEvent().equalsIgnoreCase("CONFIGURE")) { return true; } } return false; }
@Override public Future<NFVMessage> sendCommand(final NFVMessage nfvMessage, Endpoint endpoint) { return this.sendToVnfm(nfvMessage, endpoint.getEndpoint()); }
@PrePersist public void ensureId() { setId(IdGenerator.createUUID()); }
public static Quota createMaxQuota() { Quota quota = new Quota(); quota.setInstances(100); quota.setRam(50000); quota.setCores(400); return quota; }
protected VnfmSender getVnfmSender(EndpointType endpointType) throws BeansException { String senderName = endpointType.toString().toLowerCase() + "VnfmSender"; return (VnfmSender) this.context.getBean(senderName); }
@Override public String toString() { return "PluginEndpoint{" + "interfaceClass='" + interfaceClass + '\'' + ", interfaceVersion='" + interfaceVersion + '\'' + "} " + super.toString(); }
public static Quota createMinQuota() { Quota quota = new Quota(); quota.setInstances(1); quota.setRam(256); quota.setCores(1); return quota; } }