├── .gitignore ├── .gitmodules ├── .screenrc ├── .travis.yml ├── Dockerfile ├── LICENSE ├── README.md ├── api ├── build.gradle └── src │ ├── main │ └── java │ │ └── org │ │ └── openbaton │ │ └── nfvo │ │ └── api │ │ ├── admin │ │ ├── RestComponents.java │ │ ├── RestKeys.java │ │ ├── RestMain.java │ │ ├── RestPlugin.java │ │ ├── RestProject.java │ │ ├── RestQuota.java │ │ ├── RestUsers.java │ │ ├── RestVNFManager.java │ │ └── RestVimInstances.java │ │ ├── catalogue │ │ ├── RestNFVImage.java │ │ ├── RestNetworkServiceDescriptor.java │ │ ├── RestVNFComponent.java │ │ ├── RestVNFFG.java │ │ ├── RestVNFPackage.java │ │ ├── RestVirtualLink.java │ │ └── RestVirtualNetworkFunctionDescriptor.java │ │ ├── configuration │ │ ├── CustomDispatcherServlet.java │ │ ├── CustomHttpServletRequestWrapper.java │ │ ├── ErrorRequestHandler.java │ │ └── WebInitializer.java │ │ ├── exceptions │ │ ├── ExceptionResource.java │ │ └── GlobalExceptionHandler.java │ │ ├── interceptors │ │ ├── AuthorizeInterceptor.java │ │ ├── HistoryInterceptor.java │ │ ├── InterceptorConfiguration.java │ │ ├── LegacyInterceptor.java │ │ └── SchemaValidatorInterceptor.java │ │ ├── model │ │ └── DependencyObject.java │ │ ├── runtime │ │ ├── RestEvent.java │ │ ├── RestHistory.java │ │ ├── RestLogs.java │ │ └── RestNetworkServiceRecord.java │ │ ├── swagger │ │ └── SwaggerConfig.java │ │ ├── tosca │ │ ├── RestCSAR.java │ │ └── RestToscaNetworkServiceDescriptor.java │ │ └── utils │ │ └── Utils.java │ └── test │ └── java │ └── org │ └── openbaton │ └── nfvo │ └── core │ └── tests │ └── api │ ├── ApiRestBaseVimInstancesTest.java │ └── ApiRestNSDescriptorTest.java ├── build.gradle ├── catalogue ├── build.gradle └── src │ └── main │ └── java │ └── org │ └── openbaton │ └── catalogue │ ├── api │ ├── DeployNSRBody.java │ └── ServiceCreateBody.java │ ├── keys │ └── PopKeypair.java │ ├── mano │ ├── common │ │ ├── AbstractVirtualLink.java │ │ ├── AutoScalePolicy.java │ │ ├── ConnectionPoint.java │ │ ├── CostituentVDU.java │ │ ├── CostituentVNF.java │ │ ├── DeploymentFlavour.java │ │ ├── Event.java │ │ ├── HighAvailability.java │ │ ├── Ip.java │ │ ├── LifecycleEvent.java │ │ ├── NFVEntityDescriptor.java │ │ ├── NetworkServiceDeploymentFlavour.java │ │ ├── RedundancyModel.java │ │ ├── ResiliencyLevel.java │ │ ├── ScalingAction.java │ │ ├── ScalingActionType.java │ │ ├── ScalingAlarm.java │ │ ├── ScalingMode.java │ │ ├── ScalingType.java │ │ ├── Security.java │ │ ├── VNFDeploymentFlavour.java │ │ ├── faultmanagement │ │ │ ├── AbstractVNFAlarm.java │ │ │ ├── Criteria.java │ │ │ ├── FaultManagementAction.java │ │ │ ├── FaultManagementPolicy.java │ │ │ ├── Metric.java │ │ │ ├── MonitoringParameter.java │ │ │ ├── VNFAlarmNotification.java │ │ │ ├── VNFAlarmStateChangedNotification.java │ │ │ ├── VNFCSelector.java │ │ │ ├── VirtualizedResourceAlarmNotification.java │ │ │ └── VirtualizedResourceAlarmStateChangedNotification.java │ │ └── monitoring │ │ │ ├── AbstractVirtualizedResourceAlarm.java │ │ │ ├── Alarm.java │ │ │ ├── AlarmEndpoint.java │ │ │ ├── AlarmState.java │ │ │ ├── AlarmType.java │ │ │ ├── FaultType.java │ │ │ ├── ObjectSelection.java │ │ │ ├── PerceivedSeverity.java │ │ │ ├── ThresholdDetails.java │ │ │ ├── ThresholdType.java │ │ │ ├── VNFAlarm.java │ │ │ └── VRAlarm.java │ ├── descriptor │ │ ├── InternalVirtualLink.java │ │ ├── NetworkForwardingPath.java │ │ ├── NetworkServiceDescriptor.java │ │ ├── PhysicalNetworkFunctionDescriptor.java │ │ ├── Policy.java │ │ ├── VDUDependency.java │ │ ├── VNFComponent.java │ │ ├── VNFDConnectionPoint.java │ │ ├── VNFDependency.java │ │ ├── VNFForwardingGraphDescriptor.java │ │ ├── VirtualDeploymentUnit.java │ │ ├── VirtualLinkDescriptor.java │ │ └── VirtualNetworkFunctionDescriptor.java │ └── record │ │ ├── LinkStatus.java │ │ ├── NetworkServiceRecord.java │ │ ├── PhysicalNetworkFunctionRecord.java │ │ ├── Status.java │ │ ├── VNFCInstance.java │ │ ├── VNFForwardingGraphRecord.java │ │ ├── VNFRecordDependency.java │ │ ├── VirtualLinkRecord.java │ │ └── VirtualNetworkFunctionRecord.java │ ├── nfvo │ ├── Action.java │ ├── AdditionalRepoInfo.java │ ├── ApplicationEventNFVO.java │ ├── Configuration.java │ ├── ConfigurationParameter.java │ ├── CoreMessage.java │ ├── DependencyParameters.java │ ├── Endpoint.java │ ├── EndpointType.java │ ├── EventEndpoint.java │ ├── HistoryLifecycleEvent.java │ ├── ImageMetadata.java │ ├── ImageStatus.java │ ├── InstallPluginEvent.java │ ├── Item.java │ ├── Location.java │ ├── ManagerCredentials.java │ ├── PackageType.java │ ├── PluginAnswer.java │ ├── PluginEndpoint.java │ ├── PluginMessage.java │ ├── Quota.java │ ├── RequiresParameters.java │ ├── Script.java │ ├── Server.java │ ├── VDUMessage.java │ ├── VNFCDependencyParameters.java │ ├── VNFPackage.java │ ├── VNFPackageMetadata.java │ ├── VnfmManagerEndpoint.java │ ├── images │ │ ├── AWSImage.java │ │ ├── BaseNfvImage.java │ │ ├── DockerImage.java │ │ └── NFVImage.java │ ├── messages │ │ ├── Interfaces │ │ │ ├── NFVMessage.java │ │ │ ├── OrVnfmMessage.java │ │ │ └── VnfmOrMessage.java │ │ ├── OrVnfmAllocateResourcesMessage.java │ │ ├── OrVnfmErrorMessage.java │ │ ├── OrVnfmExecuteScriptMessage.java │ │ ├── OrVnfmGenericMessage.java │ │ ├── OrVnfmGrantLifecycleOperationMessage.java │ │ ├── OrVnfmHealVNFRequestMessage.java │ │ ├── OrVnfmInstantiateMessage.java │ │ ├── OrVnfmLogMessage.java │ │ ├── OrVnfmScalingMessage.java │ │ ├── OrVnfmStartStopMessage.java │ │ ├── OrVnfmUpdateMessage.java │ │ ├── VnfmOrAllocateResourcesMessage.java │ │ ├── VnfmOrErrorMessage.java │ │ ├── VnfmOrGenericMessage.java │ │ ├── VnfmOrGrantLifecycleOperationMessage.java │ │ ├── VnfmOrHealedMessage.java │ │ ├── VnfmOrInstantiateMessage.java │ │ ├── VnfmOrLogMessage.java │ │ ├── VnfmOrScaledMessage.java │ │ ├── VnfmOrScalingMessage.java │ │ └── VnfmOrStartStopMessage.java │ ├── networks │ │ ├── AWSNetwork.java │ │ ├── BaseNetwork.java │ │ ├── DockerNetwork.java │ │ ├── Network.java │ │ └── Subnet.java │ └── viminstances │ │ ├── AmazonVimInstance.java │ │ ├── AvailabilityZone.java │ │ ├── BaseVimInstance.java │ │ ├── DockerVimInstance.java │ │ ├── GenericVimInstance.java │ │ └── OpenstackVimInstance.java │ ├── security │ ├── BaseKey.java │ ├── BaseUser.java │ ├── HistoryEntity.java │ ├── Key.java │ ├── Project.java │ ├── Role.java │ ├── ServiceMetadata.java │ └── User.java │ └── util │ ├── BaseEntity.java │ ├── EventFinishEvent.java │ └── IdGenerator.java ├── cli ├── build.gradle ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── src │ └── main │ └── java │ └── org │ └── openbaton │ └── nfvo │ └── cli │ └── OpenbatonCLI.java ├── common ├── build.gradle └── src │ └── main │ └── java │ └── org │ └── openbaton │ └── nfvo │ └── common │ ├── configuration │ ├── GsonConfiguration.java │ ├── NfvoGsonDeserializerImage.java │ ├── NfvoGsonDeserializerNFVMessage.java │ ├── NfvoGsonDeserializerNetwork.java │ ├── NfvoGsonDeserializerVimInstance.java │ ├── NfvoGsonSerializerVimInstance.java │ ├── RabbitConfiguration.java │ └── VnfmGsonDeserializerNFVMessage.java │ ├── interfaces │ ├── Receiver.java │ └── Sender.java │ ├── internal │ └── model │ │ ├── EventFinishNFVO.java │ │ └── EventNFVO.java │ └── utils │ ├── key │ └── KeyHelper.java │ ├── rabbit │ └── RabbitManager.java │ ├── schema │ └── SchemaValidator.java │ └── viminstance │ └── VimInstanceUtils.java ├── copyrights ├── core ├── core-impl │ ├── build.gradle │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── openbaton │ │ │ └── nfvo │ │ │ └── core │ │ │ ├── api │ │ │ ├── ComponentManager.java │ │ │ ├── HistoryManagement.java │ │ │ ├── ImageChecker.java │ │ │ ├── KeyManagement.java │ │ │ ├── NetworkServiceDescriptorManagement.java │ │ │ ├── NetworkServiceRecordManagement.java │ │ │ ├── NfvImageRepoManagement.java │ │ │ ├── PluginManager.java │ │ │ ├── ProjectManagement.java │ │ │ ├── QuotaManagement.java │ │ │ ├── SecurityManagement.java │ │ │ ├── UserManagement.java │ │ │ ├── VNFComponentManagment.java │ │ │ ├── VNFFGManagement.java │ │ │ ├── VNFManagerManagement.java │ │ │ ├── VNFPackageManagement.java │ │ │ ├── VimManagement.java │ │ │ ├── VirtualLinkManagement.java │ │ │ └── VirtualNetworkFunctionManagement.java │ │ │ ├── core │ │ │ ├── DependencyManagement.java │ │ │ ├── DependencyQueuer.java │ │ │ ├── LogManagement.java │ │ │ ├── NetworkManagement.java │ │ │ ├── NetworkServiceFaultManagement.java │ │ │ ├── ResourceManagement.java │ │ │ ├── VNFLifecycleOperationGranting.java │ │ │ └── VnfPlacementManagement.java │ │ │ ├── events │ │ │ ├── EventDispatcher.java │ │ │ ├── EventManagement.java │ │ │ └── senders │ │ │ │ ├── RabbitEventSender.java │ │ │ │ └── RestEventSender.java │ │ │ └── utils │ │ │ ├── CheckVNFDescriptor.java │ │ │ ├── CheckVNFPackage.java │ │ │ ├── NSDUtils.java │ │ │ ├── NSRUtils.java │ │ │ └── Utils.java │ │ └── test │ │ └── java │ │ └── org │ │ └── openbaton │ │ └── nfvo │ │ └── core │ │ └── test │ │ ├── ApplicationTest.java │ │ ├── MyVim.java │ │ ├── NetworkManagementClassSuiteTest.java │ │ ├── NetworkServiceDescriptorManagementClassSuiteTest.java │ │ ├── NetworkServiceRecordManagementClassSuiteTest.java │ │ ├── NfvImageRepoManagementClassSuiteTest.java │ │ ├── TestUtils.java │ │ ├── VNFFGManagementClassSuiteTest.java │ │ ├── VNFLifecycleOperationGrantingClassSuiteTest.java │ │ ├── VimManagementClassSuiteTest.java │ │ └── VirtualLinkManagementClassSuiteTest.java └── core-int │ ├── build.gradle │ └── src │ └── main │ └── java │ └── org │ └── openbaton │ └── nfvo │ └── core │ └── interfaces │ ├── ComponentManager.java │ ├── DependencyManagement.java │ ├── DependencyQueuer.java │ ├── EventDispatcher.java │ ├── EventManagement.java │ ├── EventSender.java │ ├── HistoryManagement.java │ ├── KeyManagement.java │ ├── LogManagement.java │ ├── NetworkManagement.java │ ├── NetworkServiceDescriptorManagement.java │ ├── NetworkServiceFaultManagement.java │ ├── NetworkServiceLifecycleChangeNotification.java │ ├── NetworkServiceLifecycleManagement.java │ ├── NetworkServicePerformanceManagement.java │ ├── NetworkServiceRecordManagement.java │ ├── NfvImageRepoManagement.java │ ├── PluginManager.java │ ├── PolicyManagement.java │ ├── ProjectManagement.java │ ├── QuotaManagement.java │ ├── ResourceManagement.java │ ├── SecurityManagement.java │ ├── UserManagement.java │ ├── VNFComponentManagment.java │ ├── VNFFGManagement.java │ ├── VNFLifecycleChangeNotification.java │ ├── VNFLifecycleManagement.java │ ├── VNFLifecycleOperationGranting.java │ ├── VNFManagerManagement.java │ ├── VNFPackageManagement.java │ ├── VimManagement.java │ ├── VirtualLinkManagement.java │ ├── VirtualNetworkFunctionManagement.java │ └── VnfPlacementManagement.java ├── etc ├── cli.properties ├── descriptors │ ├── datacenters │ │ └── vim-instance.json │ └── network_service_descriptors │ │ └── sample-network-service-descriptor.json ├── diagrams │ ├── orv-nfm-generic-message.png │ ├── orv-nfm-instantiate-message.png │ ├── package-dependencies.png │ ├── vdu.png │ └── vim-instance.png ├── keystore.p12 └── rabbit-install.sh ├── exception ├── build.gradle └── src │ └── main │ └── java │ └── org │ └── openbaton │ └── exceptions │ ├── AlreadyExistingException.java │ ├── BadFormatException.java │ ├── BadRequestException.java │ ├── CyclicDependenciesException.java │ ├── DescriptorWrongFormat.java │ ├── EntityInUseException.java │ ├── EntityUnreachableException.java │ ├── ExistingVNFPackage.java │ ├── IncompatibleVNFPackage.java │ ├── MissingParameterException.java │ ├── MonitoringException.java │ ├── NetworkServiceIntegrityException.java │ ├── NotAllowedException.java │ ├── NotFoundException.java │ ├── NsrNotFoundException.java │ ├── PasswordWeakException.java │ ├── PluginException.java │ ├── QuotaExceededException.java │ ├── VNFPackageFormatException.java │ ├── VimDriverException.java │ ├── VimException.java │ ├── VnfmException.java │ ├── WrongAction.java │ └── WrongStatusException.java ├── gradle.properties ├── gradle ├── gradle │ ├── application.java.gradle │ ├── dependencies.updater.gradle │ ├── distribution.gradle │ ├── git.helpers.gradle │ ├── git.release.gradle │ ├── helpers.gradle │ ├── licenses.gradle │ ├── nexus.upload.plugin.gradle │ ├── packaging.nfvo.debian.gradle │ ├── packaging.nfvo.docker.gradle │ └── scripts │ │ ├── debian │ │ ├── postinst │ │ ├── postrm │ │ ├── preinst │ │ └── prerm │ │ ├── launch-script.pscript │ │ ├── openbaton-nfvo │ │ ├── openbaton-nfvo.conf │ │ └── systemd │ │ ├── openbaton-nfvo.env │ │ ├── openbaton-nfvo.preexecstart │ │ └── openbaton-nfvo.service └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── main ├── build.gradle └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── openbaton │ │ │ └── nfvo │ │ │ ├── main │ │ │ └── Application.java │ │ │ └── system │ │ │ ├── AsyncExecutorConfig.java │ │ │ ├── FlywayConfig.java │ │ │ ├── SystemConfiguration.java │ │ │ └── SystemStartup.java │ └── resources │ │ ├── application-mysql.properties │ │ ├── application.properties │ │ ├── banner.txt │ │ └── flyway │ │ ├── V2_1_3_1__Add_task.sql │ │ ├── V2_1_3_2__Populate_task.sql │ │ ├── V2_2_0_0__Add_nfvo_version_to_vnf_package.sql │ │ ├── V2_2_0_1__Add_history_entity.sql │ │ ├── V2_2_0_2__Increase_description_length.sql │ │ ├── V2_2_0_3__Increase_description_length_configuration.sql │ │ ├── V3_2_0_1__Add_createdAt_updatedAt_to_NSD_VNFD_NSR_NSD.sql │ │ ├── V3_2_0_2__Add_nfvo_version_to_NSD_VNFD.sql │ │ ├── V4_0_1_0__add_user_role_to_base_user.sql │ │ ├── V4_0_1_1__Change_source_target_id_nullable.sql │ │ ├── V4_1_0_0__fix_hibernate_version.sql │ │ ├── V4_1_0_1__fix_hibernate_version_2.sql │ │ ├── V4_1_0_2__fix_hibernate_version_fault_management.sql │ │ └── V5_0_0_0__rename_vim_instance_table.sql │ └── test │ └── java │ └── org │ └── openbaton │ └── nfvo │ └── core │ └── test │ └── IntegrationClassSuiteTest.java ├── monitoring ├── build.gradle └── src │ └── main │ └── java │ └── org │ └── openbaton │ └── monitoring │ └── interfaces │ ├── MonitoringPlugin.java │ ├── MonitoringPluginCaller.java │ ├── VirtualisedResourceFaultManagement.java │ └── VirtualisedResourcesPerformanceManagement.java ├── openbaton.sh ├── plugin ├── build.gradle └── src │ └── main │ └── java │ └── org │ └── openbaton │ └── plugin │ ├── interfaces │ └── Plugin.java │ ├── mgmt │ └── PluginStartup.java │ └── utils │ ├── PluginCaller.java │ ├── RabbitPluginBroker.java │ └── Utils.java ├── registration ├── build.gradle └── src │ └── main │ └── java │ └── org │ └── openbaton │ └── registration │ └── Registration.java ├── repository ├── build.gradle └── src │ ├── main │ └── java │ │ └── org │ │ └── openbaton │ │ └── nfvo │ │ └── repositories │ │ ├── EventEndpointRepository.java │ │ ├── HistoryEntityRepository.java │ │ ├── ImageRepository.java │ │ ├── KeyRepository.java │ │ ├── KeyRepositoryCustom.java │ │ ├── KeyRepositoryImpl.java │ │ ├── ManagerCredentialsRepository.java │ │ ├── NFVImageRepository.java │ │ ├── NetworkRepository.java │ │ ├── NetworkServiceDescriptorRepository.java │ │ ├── NetworkServiceDescriptorRepositoryCustom.java │ │ ├── NetworkServiceDescriptorRepositoryImpl.java │ │ ├── NetworkServiceRecordRepository.java │ │ ├── NetworkServiceRecordRepositoryCustom.java │ │ ├── NetworkServiceRecordRepositoryImpl.java │ │ ├── PhysicalNetworkFunctionDescriptorRepository.java │ │ ├── PluginEndpointRepository.java │ │ ├── ProjectRepository.java │ │ ├── ScriptRepository.java │ │ ├── SecurityRepository.java │ │ ├── ServiceRepository.java │ │ ├── UserRepository.java │ │ ├── VNFCInstanceRepository.java │ │ ├── VNFCRepository.java │ │ ├── VNFDRepository.java │ │ ├── VNFDependencyRepository.java │ │ ├── VNFFGDescriptorRepository.java │ │ ├── VNFPackageMetadataRepository.java │ │ ├── VNFPackageMetadataRepositoryCustom.java │ │ ├── VNFPackageMetadataRepositoryImpl.java │ │ ├── VNFRDependencyRepository.java │ │ ├── VNFRRepository.java │ │ ├── VNFRecordDependencyRepository.java │ │ ├── VduRepository.java │ │ ├── VimRepository.java │ │ ├── VimRepositoryCustom.java │ │ ├── VimRepositoryImpl.java │ │ ├── VirtualLinkDescriptorRepository.java │ │ ├── VirtualLinkRecordRepository.java │ │ ├── VnfPackageRepository.java │ │ └── VnfmEndpointRepository.java │ └── test │ └── java │ └── org │ └── openbaton │ └── nfvo │ └── repositories │ └── tests │ ├── ApplicationTest.java │ └── RepositoriesClassSuiteTest.java ├── screenrc ├── security ├── README.md ├── build.gradle └── src │ └── main │ └── java │ └── org │ └── openbaton │ └── nfvo │ └── security │ ├── authentication │ ├── CustomClientDetailsService.java │ ├── CustomUserDetailsService.java │ └── GsonSerializerOAuth2AccessToken.java │ └── config │ ├── OAuth2AuthorizationServerConfig.java │ ├── OAuth2ResourceServerConfig.java │ ├── SecurityConfig.java │ └── SecurityConfigurationGson.java ├── settings.gradle ├── tosca-parser ├── build.gradle └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── openbaton │ │ │ ├── tosca │ │ │ ├── exceptions │ │ │ │ └── NotFoundException.java │ │ │ ├── parser │ │ │ │ ├── CSARParser.java │ │ │ │ └── TOSCAParser.java │ │ │ └── templates │ │ │ │ ├── NSDTemplate.java │ │ │ │ ├── RelationshipsTemplate.java │ │ │ │ ├── TOSCAMetadata.java │ │ │ │ ├── TopologyTemplate │ │ │ │ ├── Nodes │ │ │ │ │ ├── CP │ │ │ │ │ │ ├── CPNodeTemplate.java │ │ │ │ │ │ ├── CPProperties.java │ │ │ │ │ │ └── CPRequirements.java │ │ │ │ │ ├── NodeTemplate.java │ │ │ │ │ ├── VDU │ │ │ │ │ │ ├── VDUArtifact.java │ │ │ │ │ │ ├── VDUFaultManagement.java │ │ │ │ │ │ ├── VDUNodeTemplate.java │ │ │ │ │ │ └── VDUProperties.java │ │ │ │ │ ├── VL │ │ │ │ │ │ └── VLNodeTemplate.java │ │ │ │ │ └── VNF │ │ │ │ │ │ ├── VNFAutoscaling.java │ │ │ │ │ │ ├── VNFConfigurations.java │ │ │ │ │ │ ├── VNFInterfaces.java │ │ │ │ │ │ ├── VNFNodeTemplate.java │ │ │ │ │ │ ├── VNFProperties.java │ │ │ │ │ │ └── VNFRequirements.java │ │ │ │ └── TopologyTemplate.java │ │ │ │ └── VNFDTemplate.java │ │ │ └── utils │ │ │ └── Utils.java │ └── resources │ │ ├── tosca_nsd.yaml │ │ ├── tosca_vnfd.yaml │ │ └── types.yaml │ └── test │ └── java │ └── org │ └── openbaton │ └── tosca │ └── tests │ └── ToscaTest.java ├── vim-drivers ├── build.gradle └── src │ └── main │ └── java │ └── org │ └── openbaton │ └── vim │ └── drivers │ ├── VimDriverCaller.java │ └── interfaces │ ├── ClientInterfaces.java │ └── VimDriver.java ├── vim-impl ├── build.gradle └── src │ ├── main │ └── java │ │ └── org │ │ └── openbaton │ │ └── vim_impl │ │ ├── monitoring │ │ ├── MonitoringManager.java │ │ └── broker │ │ │ └── MonitoringBroker.java │ │ └── vim │ │ ├── GenericVIM.java │ │ └── broker │ │ └── VimBroker.java │ └── test │ └── java │ └── org │ └── openbaton │ └── vim_impl │ └── vim │ └── test │ ├── ApplicationTest.java │ └── VimTestSuiteClass.java ├── vim-int ├── build.gradle └── src │ └── main │ └── java │ └── org │ └── openbaton │ └── nfvo │ └── vim_interfaces │ ├── flavor_management │ └── DeploymentFlavorManagement.java │ ├── image_management │ └── ImageManagement.java │ ├── monitoring │ └── MonitoringBroker.java │ ├── network_management │ ├── NetworkForwardingPathManagement.java │ └── NetworkManagement.java │ ├── policy_management │ └── PolicyManagement.java │ ├── resource_management │ ├── ResourceCapacityManagement.java │ ├── ResourceCatalogueMangement.java │ ├── ResourceFaultManagement.java │ └── ResourceManagement.java │ └── vim │ ├── Vim.java │ └── VimBroker.java └── vnfm ├── vnfm-impl ├── build.gradle └── src │ └── main │ └── java │ └── org │ └── openbaton │ └── nfvo │ └── vnfm_reg │ ├── VnfmManager.java │ ├── VnfmRegister.java │ ├── impl │ ├── receiver │ │ ├── RabbitVnfmReceiver.java │ │ └── VnfmReceiverRest.java │ ├── register │ │ ├── RabbitRegister.java │ │ └── RestRegister.java │ └── sender │ │ ├── RabbitVnfmSender.java │ │ └── RestVnfmSender.java │ ├── state │ ├── MessageGenerator.java │ └── VnfStateHandler.java │ └── tasks │ ├── AllocateresourcesTask.java │ ├── ErrorTask.java │ ├── GrantoperationTask.java │ ├── HealTask.java │ ├── InstantiateTask.java │ ├── ModifyTask.java │ ├── ReleaseresourcesTask.java │ ├── ScaledTask.java │ ├── ScalingTask.java │ ├── StartTask.java │ ├── StopTask.java │ ├── TaskExceptionHandler.java │ ├── UpdateTask.java │ ├── UpdatevnfrTask.java │ └── abstracts │ └── AbstractTask.java └── vnfm-int ├── build.gradle └── src └── main └── java └── org └── openbaton └── vnfm └── interfaces ├── manager ├── MessageGenerator.java ├── VnfmManager.java └── VnfmReceiver.java ├── register └── VnfmRegister.java ├── sender └── VnfmSender.java ├── state └── VnfStateHandler.java └── tasks └── AbstractTask.java /.gitignore: -------------------------------------------------------------------------------- 1 | *.class 2 | classes/ 3 | 4 | *.jar 5 | !gradle/wrapper/gradle-wrapper.jar 6 | 7 | *.zip 8 | *.java.hsp 9 | *.sonarj 10 | *.sw* 11 | *.log 12 | .DS_Store 13 | .settings 14 | .springBeans 15 | build/* 16 | bin 17 | build.sh 18 | integration-repo 19 | ivy-cache 20 | jxl.log 21 | jmx.log 22 | derby.log 23 | spring-test/test-output/ 24 | .gradl 25 | argfile* 26 | pom.xml 27 | activemq-data/ 28 | .gradle/ 29 | gradle/gradle/wrapper/ 30 | gradle/osx 31 | gradle/gradlew 32 | gradle/gradlew.bat 33 | 34 | */build/* 35 | build/* 36 | build 37 | buildSrc/build 38 | /spring-*/build 39 | /src/asciidoc/build 40 | target/* 41 | src/main/resources/static/.vscode 42 | # Eclipse artifacts, including WTP generated manifests 43 | .classpath 44 | .project 45 | spring-*/src/main/java/META-INF/MANIFEST.MF 46 | 47 | # IDEA artifacts and output dirs 48 | *.iml 49 | *.ipr 50 | *.iws 51 | .idea 52 | out 53 | src/main/dist/plugins 54 | test-output 55 | atlassian-ide-plugin.xml 56 | .gradletasknamecache 57 | 58 | plugins/* 59 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "dashboard"] 2 | path = dashboard 3 | url = https://github.com/openbaton/dashboard.git 4 | -------------------------------------------------------------------------------- /.screenrc: -------------------------------------------------------------------------------- 1 | # skip the startup message 2 | # startup_message off 3 | 4 | # go to home dir 5 | # chdir 6 | 7 | # Automatically detach on hangup. 8 | # autodetach on 9 | 10 | # Change default scrollback value for new windows 11 | defscrollback 100000 12 | 13 | # start with visual bell as default 14 | # vbell on 15 | # vbell_msg "bell on %t (%n)" 16 | 17 | # look and feel 18 | hardstatus alwayslastline 19 | hardstatus string "%{= KW} %H [%`] %{= Kw}|%{-} %-Lw%{= wB}%n%f %t%{-}%+Lw %=%C%a %Y-%M-%d" 20 | 21 | # activity "Activity in %t(%n)" 22 | 23 | # shelltitle "shell" 24 | # shell -$SHELL 25 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: java 2 | jdk: 3 | - oraclejdk8 4 | # - openjdk8 5 | before_install: 6 | - chmod +x gradlew 7 | notifications: 8 | slack: openbaton:0mU0eqEY8Dcm0sWeFiGrKvFe 9 | email: 10 | - notifications@openbaton.org 11 | cache: 12 | directories: 13 | - $HOME/.m2 14 | - $HOME/.gradle/wrapper/ 15 | script: 16 | - ./gradlew build 17 | after_success: 18 | - curl http://localhost:8080/ 19 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM openjdk:8-jdk as builder 2 | COPY . /project 3 | WORKDIR /project 4 | RUN ./gradlew clean build -x test 5 | 6 | FROM openjdk:8-jre-alpine 7 | COPY --from=builder /project/build/libs/*.jar /nfvo.jar 8 | ENTRYPOINT ["java", "-jar", "/nfvo.jar"] 9 | EXPOSE 8080 10 | -------------------------------------------------------------------------------- /api/src/main/java/org/openbaton/nfvo/api/configuration/CustomDispatcherServlet.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.api.configuration; 18 | 19 | import javax.servlet.http.HttpServletRequest; 20 | import javax.servlet.http.HttpServletResponse; 21 | import org.springframework.stereotype.Service; 22 | import org.springframework.web.servlet.DispatcherServlet; 23 | 24 | @Service 25 | public class CustomDispatcherServlet extends DispatcherServlet { 26 | 27 | @Override 28 | protected void doDispatch(HttpServletRequest request, HttpServletResponse response) 29 | throws Exception { 30 | 31 | CustomHttpServletRequestWrapper wrappedRequest = new CustomHttpServletRequestWrapper(request); 32 | 33 | super.doDispatch(wrappedRequest, response); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /api/src/main/java/org/openbaton/nfvo/api/configuration/WebInitializer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.api.configuration; 18 | 19 | import javax.servlet.ServletContext; 20 | import org.springframework.beans.factory.annotation.Autowired; 21 | import org.springframework.context.annotation.Configuration; 22 | import org.springframework.web.WebApplicationInitializer; 23 | 24 | @Configuration 25 | public class WebInitializer implements WebApplicationInitializer { 26 | 27 | @Autowired private CustomDispatcherServlet customDispatcherServlet; 28 | 29 | @Override 30 | public void onStartup(ServletContext servletContext) { 31 | 32 | servletContext.addServlet("dispatchServlet", customDispatcherServlet); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /api/src/main/java/org/openbaton/nfvo/api/exceptions/ExceptionResource.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.api.exceptions; 18 | 19 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 20 | 21 | /** Created by gca on 28/08/15. */ 22 | @JsonIgnoreProperties(ignoreUnknown = true) 23 | public class ExceptionResource { 24 | 25 | private String code; 26 | private String message; 27 | 28 | public ExceptionResource() {} 29 | 30 | public ExceptionResource(String code, String message) { 31 | this.code = code; 32 | this.message = message; 33 | } 34 | 35 | public String getCode() { 36 | return code; 37 | } 38 | 39 | public void setCode(String code) { 40 | this.code = code; 41 | } 42 | 43 | public String getMessage() { 44 | return message; 45 | } 46 | 47 | public void setMessage(String message) { 48 | this.message = message; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /api/src/main/java/org/openbaton/nfvo/api/model/DependencyObject.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.api.model; 18 | 19 | /** Created by mob on 12.04.16. */ 20 | public class DependencyObject { 21 | private String source; 22 | private String target; 23 | 24 | public DependencyObject() {} 25 | 26 | public String getSource() { 27 | return source; 28 | } 29 | 30 | public void setSource(String source) { 31 | this.source = source; 32 | } 33 | 34 | public String getTarget() { 35 | return target; 36 | } 37 | 38 | public void setTarget(String target) { 39 | this.target = target; 40 | } 41 | 42 | @Override 43 | public String toString() { 44 | return "DependencyObject{" + "source='" + source + '\'' + ", target='" + target + '\'' + '}'; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /catalogue/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | buildscript { 17 | repositories { 18 | //mavenLocal() 19 | mavenCentral() 20 | jcenter() 21 | } 22 | dependencies { 23 | classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1' 24 | } 25 | } 26 | 27 | apply plugin: 'com.bmuschko.nexus' 28 | apply from: '../gradle/gradle/nexus.upload.plugin.gradle' 29 | 30 | dependencies { 31 | compile 'org.springframework.boot:spring-boot-starter-security:'+ springBootVersion 32 | compile group: 'org.hibernate.javax.persistence', name: 'hibernate-jpa-2.1-api', version: '1.0.2.Final' 33 | 34 | compile 'com.fasterxml.jackson.core:jackson-annotations:2.8.6' 35 | compile 'org.hibernate:hibernate-validator:5.3.5.Final' 36 | runtime group: 'org.glassfish.web', name: 'javax.el', version: '2.2.6' 37 | runtime group: 'javax.el', name: 'javax.el-api', version: '3.0.0' 38 | } 39 | 40 | 41 | -------------------------------------------------------------------------------- /catalogue/src/main/java/org/openbaton/catalogue/api/ServiceCreateBody.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.catalogue.api; 18 | 19 | import java.util.List; 20 | import javax.validation.constraints.NotNull; 21 | import javax.validation.constraints.Size; 22 | 23 | public class ServiceCreateBody { 24 | 25 | @NotNull 26 | @Size(min = 1) 27 | private String name; 28 | 29 | public String getName() { 30 | return name; 31 | } 32 | 33 | public void setName(String name) { 34 | this.name = name; 35 | } 36 | 37 | @NotNull 38 | @Size(min = 1) 39 | private List roles; 40 | 41 | public List getRoles() { 42 | return roles; 43 | } 44 | 45 | public void setRoles(List roles) { 46 | this.roles = roles; 47 | } 48 | 49 | @Override 50 | public String toString() { 51 | return "ServiceCreateBody{" + "name='" + name + '\'' + ", roles=" + roles + '}'; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /catalogue/src/main/java/org/openbaton/catalogue/keys/PopKeypair.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.catalogue.keys; 18 | 19 | import javax.persistence.Entity; 20 | import org.openbaton.catalogue.security.BaseKey; 21 | 22 | @Entity 23 | public class PopKeypair extends BaseKey {} 24 | -------------------------------------------------------------------------------- /catalogue/src/main/java/org/openbaton/catalogue/mano/common/Event.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.catalogue.mano.common; 18 | 19 | /** Created by lto on 06/02/15. */ 20 | public enum Event { 21 | GRANTED, 22 | ALLOCATE, 23 | SCALE, 24 | RELEASE, 25 | ERROR, 26 | 27 | INSTANTIATE, 28 | TERMINATE, 29 | CONFIGURE, 30 | START, 31 | STOP, 32 | HEAL, 33 | SCALE_OUT, 34 | SCALE_IN, 35 | SCALE_UP, 36 | SCALE_DOWN, 37 | UPDATE, 38 | UPDATE_ROLLBACK, 39 | UPGRADE, 40 | UPGRADE_ROLLBACK, 41 | RESET, 42 | } 43 | -------------------------------------------------------------------------------- /catalogue/src/main/java/org/openbaton/catalogue/mano/common/Ip.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.catalogue.mano.common; 18 | 19 | import javax.persistence.Entity; 20 | import org.openbaton.catalogue.util.BaseEntity; 21 | 22 | /** Created by lto on 23/09/15. */ 23 | @Entity 24 | public class Ip extends BaseEntity { 25 | 26 | private String netName; 27 | private String ip; 28 | 29 | public String getIp() { 30 | return ip; 31 | } 32 | 33 | public void setIp(String ip) { 34 | this.ip = ip; 35 | } 36 | 37 | public String getNetName() { 38 | return netName; 39 | } 40 | 41 | public void setNetName(String netName) { 42 | this.netName = netName; 43 | } 44 | 45 | @Override 46 | public String toString() { 47 | return "Ip{" + "netName='" + netName + '\'' + ", ip='" + ip + '\'' + "} " + super.toString(); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /catalogue/src/main/java/org/openbaton/catalogue/mano/common/RedundancyModel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.catalogue.mano.common; 18 | 19 | /** 20 | * Created by lto on 06/02/15. 21 | * 22 | *

Based on ETSI GS NFV-MAN 001 V1.1.1 (2014-12) 23 | */ 24 | /** 25 | * Represents the redundancy of instances, for example, "active" or "standby". TODO to be increased 26 | */ 27 | public enum RedundancyModel { 28 | ACTIVE, 29 | STANDBY 30 | } 31 | -------------------------------------------------------------------------------- /catalogue/src/main/java/org/openbaton/catalogue/mano/common/ResiliencyLevel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.catalogue.mano.common; 18 | 19 | /** Created by mob on 11.01.16. */ 20 | public enum ResiliencyLevel { 21 | ACTIVE_STANDBY_STATELESS, 22 | ACTIVE_STANDBY_STATEFUL 23 | } 24 | -------------------------------------------------------------------------------- /catalogue/src/main/java/org/openbaton/catalogue/mano/common/ScalingActionType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.catalogue.mano.common; 18 | 19 | /** Created by mpa on 15/12/15. */ 20 | public enum ScalingActionType { 21 | SCALE_OUT, 22 | SCALE_OUT_TO, 23 | SCALE_OUT_TO_FLAVOUR, 24 | SCALE_IN, 25 | SCALE_IN_TO, 26 | SCALE_IN_TO_FLAVOUR 27 | } 28 | -------------------------------------------------------------------------------- /catalogue/src/main/java/org/openbaton/catalogue/mano/common/ScalingMode.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.catalogue.mano.common; 18 | 19 | /** Created by mpa on 15/12/15. */ 20 | public enum ScalingMode { 21 | REACTIVE, 22 | PROACTIVE, 23 | PREDICTIVE 24 | } 25 | -------------------------------------------------------------------------------- /catalogue/src/main/java/org/openbaton/catalogue/mano/common/ScalingType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.catalogue.mano.common; 18 | 19 | /** Created by mpa on 15/12/15. */ 20 | public enum ScalingType { 21 | SINGLE, 22 | VOTED, 23 | WEIGHTED 24 | } 25 | -------------------------------------------------------------------------------- /catalogue/src/main/java/org/openbaton/catalogue/mano/common/Security.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.catalogue.mano.common; 18 | 19 | import javax.persistence.Entity; 20 | import org.openbaton.catalogue.util.BaseEntity; 21 | 22 | /** 23 | * Created by lto on 06/02/15. 24 | * 25 | *

Based on ETSI GS NFV-MAN 001 V1.1.1 (2014-12) 26 | */ 27 | @Entity 28 | public class Security extends BaseEntity { 29 | @Override 30 | public String toString() { 31 | return "Security{} " + super.toString(); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /catalogue/src/main/java/org/openbaton/catalogue/mano/common/faultmanagement/AbstractVNFAlarm.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.catalogue.mano.common.faultmanagement; 18 | 19 | /** Created by mob on 27.10.15. */ 20 | public abstract class AbstractVNFAlarm { 21 | private String resourceId, fmPolicyId; 22 | 23 | public AbstractVNFAlarm(String vnfrId, String faultManagementPolicyId) { 24 | this.resourceId = vnfrId; 25 | this.fmPolicyId = faultManagementPolicyId; 26 | } 27 | 28 | public String getResourceId() { 29 | return resourceId; 30 | } 31 | 32 | public void setResourceId(String resourceId) { 33 | this.resourceId = resourceId; 34 | } 35 | 36 | public String getFmPolicyId() { 37 | return fmPolicyId; 38 | } 39 | 40 | public void setFmPolicyId(String fmPolicyId) { 41 | this.fmPolicyId = fmPolicyId; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /catalogue/src/main/java/org/openbaton/catalogue/mano/common/faultmanagement/FaultManagementAction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.catalogue.mano.common.faultmanagement; 18 | 19 | /** Created by mob on 29.10.15. */ 20 | public enum FaultManagementAction { 21 | RESTART, 22 | REINSTANTIATE_SERVICE, 23 | HEAL, 24 | REINSTANTIATE, 25 | SWITCH_TO_STANDBY, 26 | SWITCH_TO_ACTIVE 27 | } 28 | -------------------------------------------------------------------------------- /catalogue/src/main/java/org/openbaton/catalogue/mano/common/faultmanagement/VNFAlarmNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.catalogue.mano.common.faultmanagement; 18 | 19 | import org.openbaton.catalogue.mano.common.monitoring.Alarm; 20 | import org.openbaton.catalogue.mano.common.monitoring.VNFAlarm; 21 | 22 | /** Created by mob on 27.10.15. */ 23 | public class VNFAlarmNotification extends AbstractVNFAlarm { 24 | private VNFAlarm vnfAlarm; 25 | 26 | public VNFAlarmNotification(String vnfrId, String faultManagementPolicyId, VNFAlarm vnfAlarm) { 27 | 28 | super(vnfrId, faultManagementPolicyId); 29 | this.vnfAlarm = vnfAlarm; 30 | } 31 | 32 | public Alarm getAlarm() { 33 | return vnfAlarm; 34 | } 35 | 36 | @Override 37 | public String toString() { 38 | return "VNFAlarmNotification{" + "vnfAlarm=" + vnfAlarm + "} " + super.toString(); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /catalogue/src/main/java/org/openbaton/catalogue/mano/common/faultmanagement/VNFCSelector.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.catalogue.mano.common.faultmanagement; 18 | 19 | /** Created by mob on 05.12.15. */ 20 | public enum VNFCSelector { 21 | at_least_one, 22 | all 23 | } 24 | -------------------------------------------------------------------------------- /catalogue/src/main/java/org/openbaton/catalogue/mano/common/monitoring/AbstractVirtualizedResourceAlarm.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.catalogue.mano.common.monitoring; 18 | 19 | /** Created by mob on 27.10.15. */ 20 | public abstract class AbstractVirtualizedResourceAlarm { 21 | private String triggerId; 22 | 23 | public AbstractVirtualizedResourceAlarm() {} 24 | 25 | public AbstractVirtualizedResourceAlarm(String triggerId) { 26 | this.triggerId = triggerId; 27 | } 28 | 29 | public String getTriggerId() { 30 | return triggerId; 31 | } 32 | 33 | public void setTriggerId(String triggerId) { 34 | this.triggerId = triggerId; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /catalogue/src/main/java/org/openbaton/catalogue/mano/common/monitoring/AlarmState.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.catalogue.mano.common.monitoring; 18 | 19 | /** Created by mob on 26.10.15. */ 20 | public enum AlarmState { 21 | FIRED, 22 | UPDATED, 23 | CLEARED 24 | } 25 | -------------------------------------------------------------------------------- /catalogue/src/main/java/org/openbaton/catalogue/mano/common/monitoring/AlarmType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.catalogue.mano.common.monitoring; 18 | 19 | /** Created by mob on 15.01.16. */ 20 | public enum AlarmType { 21 | VIRTUALIZED_RESOURCE, 22 | VIRTUAL_NETWORK_FUNCTION 23 | } 24 | -------------------------------------------------------------------------------- /catalogue/src/main/java/org/openbaton/catalogue/mano/common/monitoring/PerceivedSeverity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.catalogue.mano.common.monitoring; 18 | 19 | /** Created by mob on 26.10.15. */ 20 | public enum PerceivedSeverity { 21 | INDETERMINATE, // ordinal value: 0 22 | WARNING, // ordinal value: 1 23 | MINOR, // ordinal value: 2 24 | MAJOR, // ordinal value: 3 25 | CRITICAL // ordinal value: 4 26 | } 27 | -------------------------------------------------------------------------------- /catalogue/src/main/java/org/openbaton/catalogue/mano/common/monitoring/ThresholdType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.catalogue.mano.common.monitoring; 18 | 19 | /** Created by mob on 25.11.15. */ 20 | public enum ThresholdType { 21 | SINGLE_VALUE 22 | } 23 | -------------------------------------------------------------------------------- /catalogue/src/main/java/org/openbaton/catalogue/mano/descriptor/Policy.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.catalogue.mano.descriptor; 18 | 19 | import javax.persistence.Entity; 20 | import org.openbaton.catalogue.util.BaseEntity; 21 | 22 | /** 23 | * Created by lto on 06/02/15. 24 | * 25 | *

Based on ETSI GS NFV-MAN 001 V1.1.1 (2014-12) 26 | * 27 | *

A policy or rule to apply to the NFP 28 | */ 29 | @Entity 30 | public class Policy extends BaseEntity { 31 | @Override 32 | public String toString() { 33 | return "Policy{} " + super.toString(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /catalogue/src/main/java/org/openbaton/catalogue/mano/record/LinkStatus.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.catalogue.mano.record; 18 | 19 | /** 20 | * Created by lto on 06/02/15. 21 | * 22 | *

Based on ETSI GS NFV-MAN 001 V1.1.1 (2014-12) 23 | * 24 | *

Flag to report status of the VL (e.g. 0=Link down, 1= normal operation, 2= degraded operation, 25 | * 3= Offline through management action) 26 | */ 27 | public enum LinkStatus { 28 | LINKDOWN, 29 | NORMALOPERATION, 30 | DEGRADEDOPERATION, 31 | OFFLINETHROUGHMANAGEMENTACTION 32 | } 33 | -------------------------------------------------------------------------------- /catalogue/src/main/java/org/openbaton/catalogue/mano/record/Status.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.catalogue.mano.record; 18 | 19 | /** 20 | * Created by lto on 06/02/15. 21 | * 22 | *

Based on ETSI GS NFV-MAN 001 V1.1.1 (2014-12) 23 | */ 24 | public enum Status { 25 | 26 | /** Error */ 27 | ERROR(0), 28 | /** Null - */ 29 | NULL(1), 30 | /** Instantiated - Not Configured */ 31 | INITIALIZED(2), 32 | 33 | /** Inactive - Configured */ 34 | INACTIVE(3), 35 | 36 | /* 37 | * Scaling 38 | */ 39 | SCALING(4), 40 | 41 | /** Active - Configured */ 42 | ACTIVE(5), 43 | 44 | /** Terminated */ 45 | TERMINATED(6), 46 | 47 | /** Terminated */ 48 | RESUMING(7); 49 | 50 | private int value; 51 | 52 | Status(int value) { 53 | this.value = value; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /catalogue/src/main/java/org/openbaton/catalogue/nfvo/Action.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.catalogue.nfvo; 18 | 19 | /** Created by lorenzo on 5/30/15. */ 20 | public enum Action { 21 | GRANT_OPERATION, 22 | ALLOCATE_RESOURCES, 23 | SCALE_IN, 24 | SCALE_OUT, 25 | SCALING, 26 | ERROR, 27 | RELEASE_RESOURCES, 28 | INSTANTIATE, 29 | MODIFY, 30 | HEAL, 31 | UPDATEVNFR, 32 | UPDATE, 33 | SCALED, 34 | RELEASE_RESOURCES_FINISH, 35 | INSTANTIATE_FINISH, 36 | CONFIGURE, 37 | START, 38 | STOP, 39 | LOG_REQUEST, 40 | RESUME, 41 | EXECUTE 42 | } 43 | -------------------------------------------------------------------------------- /catalogue/src/main/java/org/openbaton/catalogue/nfvo/DependencyParameters.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.catalogue.nfvo; 18 | 19 | import java.util.Map; 20 | import javax.persistence.ElementCollection; 21 | import javax.persistence.Entity; 22 | import javax.persistence.FetchType; 23 | import org.openbaton.catalogue.util.BaseEntity; 24 | 25 | /** Created by lto on 21/08/15. */ 26 | @Entity 27 | public class DependencyParameters extends BaseEntity { 28 | 29 | @ElementCollection(fetch = FetchType.EAGER) 30 | private Map parameters; 31 | 32 | @Override 33 | public String toString() { 34 | return "DependencyParameters{" + "parameters=" + parameters + "} " + super.toString(); 35 | } 36 | 37 | public Map getParameters() { 38 | return parameters; 39 | } 40 | 41 | public void setParameters(Map parameters) { 42 | this.parameters = parameters; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /catalogue/src/main/java/org/openbaton/catalogue/nfvo/EndpointType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.catalogue.nfvo; 18 | 19 | /** Created by lto on 01/07/15. */ 20 | public enum EndpointType { 21 | JMS, 22 | RABBIT, 23 | REST 24 | } 25 | -------------------------------------------------------------------------------- /catalogue/src/main/java/org/openbaton/catalogue/nfvo/ImageStatus.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.catalogue.nfvo; 18 | 19 | /** Created by rvl on 16.05.17. */ 20 | public enum ImageStatus { 21 | UNRECOGNIZED, 22 | ACTIVE, 23 | SAVING, 24 | QUEUED, 25 | KILLED, 26 | PENDING_DELETE, 27 | DELETED; 28 | } 29 | -------------------------------------------------------------------------------- /catalogue/src/main/java/org/openbaton/catalogue/nfvo/PackageType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.catalogue.nfvo; 18 | 19 | /** Created by mob on 03.05.17. */ 20 | public enum PackageType { 21 | RPM, 22 | DEB 23 | } 24 | -------------------------------------------------------------------------------- /catalogue/src/main/java/org/openbaton/catalogue/nfvo/Script.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.catalogue.nfvo; 18 | 19 | import javax.persistence.Entity; 20 | import javax.persistence.Lob; 21 | import org.openbaton.catalogue.util.BaseEntity; 22 | 23 | /** Created by lto on 23/07/15. */ 24 | @Entity 25 | public class Script extends BaseEntity { 26 | private String name; 27 | 28 | @Lob private byte[] payload; 29 | 30 | public Script() {} 31 | 32 | @Override 33 | public String toString() { 34 | return "Script{" + "name='" + name + '\'' + "} " + super.toString(); 35 | } 36 | 37 | public String getName() { 38 | return name; 39 | } 40 | 41 | public void setName(String name) { 42 | this.name = name; 43 | } 44 | 45 | public byte[] getPayload() { 46 | return payload; 47 | } 48 | 49 | public void setPayload(byte[] payload) { 50 | this.payload = payload; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /catalogue/src/main/java/org/openbaton/catalogue/nfvo/VnfmManagerEndpoint.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.catalogue.nfvo; 18 | 19 | import javax.persistence.Entity; 20 | 21 | @Entity 22 | public class VnfmManagerEndpoint extends Endpoint { 23 | 24 | @Override 25 | public String toString() { 26 | return "VnfmManagerEndpoint{} " + super.toString(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /catalogue/src/main/java/org/openbaton/catalogue/nfvo/images/DockerImage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.catalogue.nfvo.images; 18 | 19 | import java.util.Set; 20 | import javax.persistence.ElementCollection; 21 | import javax.persistence.Entity; 22 | import javax.persistence.FetchType; 23 | 24 | @Entity 25 | public class DockerImage extends BaseNfvImage { 26 | 27 | @ElementCollection(fetch = FetchType.EAGER) 28 | private Set tags; 29 | 30 | public Set getTags() { 31 | return tags; 32 | } 33 | 34 | public void setTags(Set tags) { 35 | this.tags = tags; 36 | } 37 | 38 | @Override 39 | public String toString() { 40 | return "DockerImage{" + "tags=" + tags + "} " + super.toString(); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /catalogue/src/main/java/org/openbaton/catalogue/nfvo/messages/Interfaces/NFVMessage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.catalogue.nfvo.messages.Interfaces; 18 | 19 | import java.io.Serializable; 20 | import org.openbaton.catalogue.nfvo.Action; 21 | 22 | /** Created by mob on 14.09.15. */ 23 | public abstract class NFVMessage implements Serializable { 24 | public Action getAction() { 25 | return action; 26 | } 27 | 28 | public void setAction(Action action) { 29 | this.action = action; 30 | } 31 | 32 | protected Action action; 33 | } 34 | -------------------------------------------------------------------------------- /catalogue/src/main/java/org/openbaton/catalogue/nfvo/messages/Interfaces/OrVnfmMessage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.catalogue.nfvo.messages.Interfaces; 18 | 19 | /** Created by mob on 14.09.15. */ 20 | public abstract class OrVnfmMessage extends NFVMessage {} 21 | -------------------------------------------------------------------------------- /catalogue/src/main/java/org/openbaton/catalogue/nfvo/messages/Interfaces/VnfmOrMessage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.catalogue.nfvo.messages.Interfaces; 18 | 19 | /** Created by mob on 14.09.15. */ 20 | public abstract class VnfmOrMessage extends NFVMessage {} 21 | -------------------------------------------------------------------------------- /catalogue/src/main/java/org/openbaton/catalogue/security/BaseUser.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.catalogue.security; 18 | 19 | import java.util.Set; 20 | import javax.persistence.CascadeType; 21 | import javax.persistence.Entity; 22 | import javax.persistence.FetchType; 23 | import javax.persistence.OneToMany; 24 | import org.openbaton.catalogue.util.BaseEntity; 25 | 26 | @Entity 27 | public class BaseUser extends BaseEntity { 28 | 29 | @OneToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL) 30 | protected Set roles; 31 | 32 | public Set getRoles() { 33 | return roles; 34 | } 35 | 36 | public void setRoles(Set roles) { 37 | this.roles = roles; 38 | } 39 | 40 | @Override 41 | public String toString() { 42 | return "BaseUser{" + "roles=" + roles + "} " + super.toString(); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /catalogue/src/main/java/org/openbaton/catalogue/security/Key.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.catalogue.security; 18 | 19 | import javax.persistence.Entity; 20 | import javax.persistence.Table; 21 | import javax.persistence.UniqueConstraint; 22 | 23 | @Entity 24 | @Table( 25 | name = "PublicKeys", 26 | uniqueConstraints = @UniqueConstraint(columnNames = {"name", "projectId"})) 27 | public class Key extends BaseKey {} 28 | -------------------------------------------------------------------------------- /catalogue/src/main/java/org/openbaton/catalogue/util/IdGenerator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.openbaton.catalogue.util; 17 | 18 | import java.math.BigInteger; 19 | import java.security.SecureRandom; 20 | import java.util.UUID; 21 | 22 | public class IdGenerator { 23 | 24 | private static SecureRandom random = new SecureRandom(); 25 | 26 | public static String createId() { 27 | return new BigInteger(32, random).toString(); 28 | } 29 | 30 | public static String createUUID() { 31 | UUID uuid = UUID.randomUUID(); 32 | return uuid.toString(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /cli/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | dependencies { 18 | 19 | compile project(':repository') 20 | compile project(':plugin') 21 | compile project(':core-int') 22 | compile 'commons-io:commons-io:2.5' 23 | compile 'org.springframework.shell:spring-shell:1.2.0.RELEASE' 24 | 25 | runtime project(':core-impl') 26 | } 27 | 28 | -------------------------------------------------------------------------------- /cli/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | #Wed Jun 03 10:21:33 CEST 2015 18 | distributionBase=GRADLE_USER_HOME 19 | distributionPath=wrapper/dists 20 | zipStoreBase=GRADLE_USER_HOME 21 | zipStorePath=wrapper/dists 22 | distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-bin.zip 23 | -------------------------------------------------------------------------------- /common/src/main/java/org/openbaton/nfvo/common/interfaces/Receiver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.common.interfaces; 18 | 19 | /** Created by tce on 14.08.15. */ 20 | public interface Receiver { 21 | Object receive(String destination); 22 | } 23 | -------------------------------------------------------------------------------- /common/src/main/java/org/openbaton/nfvo/common/interfaces/Sender.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.common.interfaces; 18 | 19 | import java.io.Serializable; 20 | 21 | public interface Sender { 22 | 23 | void send(String destination, Serializable message); 24 | 25 | Object receiveObject(String destination); 26 | 27 | String receiveText(String destination); 28 | } 29 | -------------------------------------------------------------------------------- /common/src/main/java/org/openbaton/nfvo/common/internal/model/EventFinishNFVO.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.common.internal.model; 18 | 19 | import org.openbaton.catalogue.util.EventFinishEvent; 20 | import org.springframework.context.ApplicationEvent; 21 | 22 | /** Created by lto on 30/09/15. */ 23 | public class EventFinishNFVO extends ApplicationEvent { 24 | private EventFinishEvent eventNFVO; 25 | 26 | /** 27 | * Create a new ApplicationEvent. 28 | * 29 | * @param source the object on which the event initially occurred (never {@code null}) 30 | */ 31 | public EventFinishNFVO(Object source) { 32 | super(source); 33 | } 34 | 35 | public EventFinishEvent getEventNFVO() { 36 | return eventNFVO; 37 | } 38 | 39 | public void setEventNFVO(EventFinishEvent eventNFVO) { 40 | this.eventNFVO = eventNFVO; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /common/src/main/java/org/openbaton/nfvo/common/internal/model/EventNFVO.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.common.internal.model; 18 | 19 | import org.openbaton.catalogue.nfvo.ApplicationEventNFVO; 20 | import org.springframework.context.ApplicationEvent; 21 | 22 | /** Created by lto on 30/09/15. */ 23 | public class EventNFVO extends ApplicationEvent { 24 | private ApplicationEventNFVO eventNFVO; 25 | 26 | /** 27 | * Create a new ApplicationEvent. 28 | * 29 | * @param source the object on which the event initially occurred (never {@code null}) 30 | */ 31 | public EventNFVO(Object source) { 32 | super(source); 33 | } 34 | 35 | public ApplicationEventNFVO getEventNFVO() { 36 | return eventNFVO; 37 | } 38 | 39 | public void setEventNFVO(ApplicationEventNFVO eventNFVO) { 40 | this.eventNFVO = eventNFVO; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /copyrights: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | -------------------------------------------------------------------------------- /core/core-impl/src/main/java/org/openbaton/nfvo/core/api/SecurityManagement.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.core.api; 18 | 19 | import org.springframework.context.annotation.Scope; 20 | import org.springframework.stereotype.Service; 21 | 22 | /** Created by lto on 09/09/15. */ 23 | @Service 24 | @Scope 25 | public class SecurityManagement implements org.openbaton.nfvo.core.interfaces.SecurityManagement {} 26 | -------------------------------------------------------------------------------- /core/core-impl/src/main/java/org/openbaton/nfvo/core/core/NetworkServiceFaultManagement.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.core.core; 18 | 19 | import org.springframework.context.annotation.Scope; 20 | import org.springframework.stereotype.Service; 21 | 22 | /** Created by lto on 11/05/15. */ 23 | @Service 24 | @Scope 25 | public class NetworkServiceFaultManagement 26 | implements org.openbaton.nfvo.core.interfaces.NetworkServiceFaultManagement { 27 | @Override 28 | public void notifyFault() { 29 | throw new UnsupportedOperationException(); 30 | } 31 | 32 | @Override 33 | public void getFaultInformation() { 34 | throw new UnsupportedOperationException(); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /core/core-impl/src/test/java/org/openbaton/nfvo/core/test/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.core.test; 18 | 19 | import org.springframework.boot.SpringApplication; 20 | import org.springframework.context.ConfigurableApplicationContext; 21 | import org.springframework.context.annotation.ComponentScan; 22 | import org.springframework.context.annotation.Configuration; 23 | 24 | /** Created by lto on 20/04/15. */ 25 | @Configuration 26 | @ComponentScan(basePackages = "org.openbaton.nfvo") 27 | public class ApplicationTest { 28 | 29 | public static void main(String[] argv) { 30 | ConfigurableApplicationContext context = SpringApplication.run(ApplicationTest.class); 31 | for (String s : context.getBeanDefinitionNames()) System.out.println(s); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /core/core-int/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | dependencies { 18 | compile project(':catalogue') 19 | compile project(':common') 20 | compile project(':vim-int') 21 | compile project(':vnfm-int') 22 | } -------------------------------------------------------------------------------- /core/core-int/src/main/java/org/openbaton/nfvo/core/interfaces/DependencyQueuer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.core.interfaces; 18 | 19 | import java.util.Set; 20 | import java.util.concurrent.ExecutionException; 21 | import org.openbaton.catalogue.mano.record.NetworkServiceRecord; 22 | import org.openbaton.exceptions.BadFormatException; 23 | import org.openbaton.exceptions.NotFoundException; 24 | 25 | /** Created by lto on 19/08/15. */ 26 | public interface DependencyQueuer { 27 | void waitForVNFR(String targetDependencyId, Set sourceNames); 28 | 29 | void releaseVNFR(String vnfrId, NetworkServiceRecord nsr) 30 | throws NotFoundException, BadFormatException, ExecutionException, InterruptedException; 31 | } 32 | -------------------------------------------------------------------------------- /core/core-int/src/main/java/org/openbaton/nfvo/core/interfaces/EventDispatcher.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.core.interfaces; 18 | 19 | import org.openbaton.catalogue.nfvo.EventEndpoint; 20 | import org.openbaton.exceptions.MissingParameterException; 21 | import org.openbaton.exceptions.NotFoundException; 22 | import org.openbaton.nfvo.common.internal.model.EventNFVO; 23 | 24 | /** Created by lto on 01/07/15. */ 25 | 26 | /** 27 | * This class is in charge of registering and deregistering endpoint for event dispatching. 28 | * 29 | *

An external application can register to a specific event sending an EndpointEvent through JMS 30 | * or Rest. 31 | */ 32 | public interface EventDispatcher { 33 | EventEndpoint register(String endpoint_json) throws MissingParameterException; 34 | 35 | void dispatchEvent(EventNFVO event); 36 | 37 | void unregister(String id) throws NotFoundException; 38 | } 39 | -------------------------------------------------------------------------------- /core/core-int/src/main/java/org/openbaton/nfvo/core/interfaces/EventManagement.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.core.interfaces; 18 | 19 | import java.util.concurrent.Future; 20 | import org.openbaton.catalogue.nfvo.EventEndpoint; 21 | import org.openbaton.exceptions.NotFoundException; 22 | import org.springframework.scheduling.annotation.Async; 23 | 24 | /** Created by lto on 10/03/16. */ 25 | public interface EventManagement { 26 | @Async 27 | Future removeUnreachableEndpoints(); 28 | 29 | Iterable query(String projectId); 30 | 31 | EventEndpoint query(String id, String projectId) throws NotFoundException; 32 | 33 | Iterable queryByProjectId(String projectId); 34 | } 35 | -------------------------------------------------------------------------------- /core/core-int/src/main/java/org/openbaton/nfvo/core/interfaces/EventSender.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.core.interfaces; 18 | 19 | import java.util.concurrent.Future; 20 | import org.openbaton.catalogue.nfvo.ApplicationEventNFVO; 21 | import org.openbaton.catalogue.nfvo.EventEndpoint; 22 | 23 | /** Created by lto on 01/07/15. */ 24 | public interface EventSender { 25 | Future send(EventEndpoint endpoint, ApplicationEventNFVO event); 26 | } 27 | -------------------------------------------------------------------------------- /core/core-int/src/main/java/org/openbaton/nfvo/core/interfaces/HistoryManagement.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.core.interfaces; 18 | 19 | import org.openbaton.catalogue.security.HistoryEntity; 20 | 21 | /** Created by lto on 17/10/16. */ 22 | public interface HistoryManagement { 23 | 24 | void addAction(String method, String path, String result); 25 | 26 | HistoryEntity[] getAll(); 27 | 28 | HistoryEntity[] getAll(int actions); 29 | } 30 | -------------------------------------------------------------------------------- /core/core-int/src/main/java/org/openbaton/nfvo/core/interfaces/NetworkServiceFaultManagement.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.core.interfaces; 18 | 19 | /** Created by mpa on 30/04/15. */ 20 | public interface NetworkServiceFaultManagement { 21 | 22 | /** This operation allows providing fault notifications on Network Services. */ 23 | void notifyFault(); 24 | 25 | /** This operation allows collecting Network Service fault information. */ 26 | void getFaultInformation(); 27 | } 28 | -------------------------------------------------------------------------------- /core/core-int/src/main/java/org/openbaton/nfvo/core/interfaces/NetworkServiceLifecycleChangeNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.core.interfaces; 18 | 19 | /** Created by mpa on 30/04/15. */ 20 | public interface NetworkServiceLifecycleChangeNotification { 21 | 22 | /** This operation allows providing lifecycle change notifications on Network Services. */ 23 | void notifyChange(); 24 | } 25 | -------------------------------------------------------------------------------- /core/core-int/src/main/java/org/openbaton/nfvo/core/interfaces/NetworkServicePerformanceManagement.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.core.interfaces; 18 | 19 | /** Created by mpa on 30/04/15. */ 20 | public interface NetworkServicePerformanceManagement { 21 | 22 | /** 23 | * This operation allows collecting performance measurement results generated on Network Services. 24 | */ 25 | void getPerformanceMeasurementResults(); 26 | 27 | /** This operation allows providing performance notifications on Network Services. */ 28 | void notifyPerformance(); 29 | } 30 | -------------------------------------------------------------------------------- /core/core-int/src/main/java/org/openbaton/nfvo/core/interfaces/PluginManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.core.interfaces; 18 | 19 | import java.io.IOException; 20 | import java.util.Set; 21 | import org.openbaton.exceptions.AlreadyExistingException; 22 | 23 | /** Created by rvl on 19.10.16. */ 24 | public interface PluginManager { 25 | 26 | void downloadPlugin(String type, String name, String versio) 27 | throws IOException, AlreadyExistingException; 28 | 29 | void startPlugin(String path, String name) throws IOException; 30 | 31 | Set listInstalledVimDrivers() throws IOException; 32 | } 33 | -------------------------------------------------------------------------------- /core/core-int/src/main/java/org/openbaton/nfvo/core/interfaces/QuotaManagement.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.core.interfaces; 18 | 19 | import org.openbaton.catalogue.nfvo.Quota; 20 | import org.openbaton.exceptions.PluginException; 21 | import org.openbaton.exceptions.VimException; 22 | 23 | /** Created by lto on 19/09/16. */ 24 | public interface QuotaManagement { 25 | Quota getAllQuota(String projectId) throws PluginException, VimException; 26 | 27 | Quota getLeftQuota(String projectId) throws VimException, PluginException; 28 | } 29 | -------------------------------------------------------------------------------- /core/core-int/src/main/java/org/openbaton/nfvo/core/interfaces/SecurityManagement.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.core.interfaces; 18 | 19 | /** Created by lto on 09/09/15. */ 20 | public interface SecurityManagement {} 21 | -------------------------------------------------------------------------------- /core/core-int/src/main/java/org/openbaton/nfvo/core/interfaces/VNFComponentManagment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.core.interfaces; 18 | 19 | import org.openbaton.catalogue.mano.descriptor.VNFComponent; 20 | 21 | /** Created by dbo on 26/10/15. */ 22 | public interface VNFComponentManagment { 23 | 24 | /** 25 | * Returns the list of VNFComponents 26 | * 27 | * @return the VNFComponents as an Iterable 28 | */ 29 | Iterable query(); 30 | 31 | /** 32 | * Returns the VNFComponent selected by id 33 | * 34 | * @param id ID of VNFComponent 35 | * @return the VNFComponent 36 | */ 37 | VNFComponent query(String id); 38 | } 39 | -------------------------------------------------------------------------------- /core/core-int/src/main/java/org/openbaton/nfvo/core/interfaces/VNFFGManagement.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.core.interfaces; 18 | 19 | import org.openbaton.catalogue.mano.descriptor.VNFForwardingGraphDescriptor; 20 | 21 | /** Created by lto on 16/06/15. */ 22 | public interface VNFFGManagement { 23 | VNFForwardingGraphDescriptor add(VNFForwardingGraphDescriptor vnfForwardingGraphDescriptor); 24 | 25 | void delete(String id); 26 | 27 | Iterable query(); 28 | 29 | VNFForwardingGraphDescriptor query(String id); 30 | 31 | VNFForwardingGraphDescriptor update( 32 | VNFForwardingGraphDescriptor vnfForwardingGraphDescriptor, String id); 33 | } 34 | -------------------------------------------------------------------------------- /core/core-int/src/main/java/org/openbaton/nfvo/core/interfaces/VNFLifecycleChangeNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.core.interfaces; 18 | 19 | /** Created by mpa on 05/05/15. */ 20 | public interface VNFLifecycleChangeNotification { 21 | 22 | /** 23 | * This operation allows providing notifications on state changes of a VNF instance, related to 24 | * the VNF Lifecycle. 25 | */ 26 | void NotifyChange(); 27 | } 28 | -------------------------------------------------------------------------------- /core/core-int/src/main/java/org/openbaton/nfvo/core/interfaces/VNFManagerManagement.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.core.interfaces; 18 | 19 | import org.openbaton.catalogue.nfvo.VnfmManagerEndpoint; 20 | 21 | public interface VNFManagerManagement { 22 | /** 23 | * Returns the list of VNFManagers registered 24 | * 25 | * @return the VnfmManagerEndpoints 26 | */ 27 | Iterable query(); 28 | 29 | /** 30 | * Returns the VnfmManagerEndpoint selected by id 31 | * 32 | * @param id of VnfmManagerEndpoint 33 | * @return the VnfmManagerEndpoint 34 | */ 35 | VnfmManagerEndpoint query(String id); 36 | 37 | /** 38 | * Delete the Vnfm selected by id 39 | * 40 | * @param id of the Vnfm 41 | */ 42 | void delete(String id); 43 | } 44 | -------------------------------------------------------------------------------- /core/core-int/src/main/java/org/openbaton/nfvo/core/interfaces/VnfPlacementManagement.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.core.interfaces; 18 | 19 | import java.util.List; 20 | import java.util.Set; 21 | import org.openbaton.catalogue.mano.descriptor.VirtualNetworkFunctionDescriptor; 22 | import org.openbaton.catalogue.nfvo.viminstances.BaseVimInstance; 23 | import org.openbaton.exceptions.NotFoundException; 24 | 25 | /** Created by lto on 10/03/16. */ 26 | public interface VnfPlacementManagement { 27 | BaseVimInstance choseRandom(Set vimInstanceName, String projectId) 28 | throws NotFoundException; 29 | 30 | List chose( 31 | VirtualNetworkFunctionDescriptor virtualNetworkFunctionDescriptor, 32 | Set vimTypes, 33 | String projectId) 34 | throws NotFoundException; 35 | } 36 | -------------------------------------------------------------------------------- /etc/cli.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | #cli 18 | nfvo-usr = 19 | nfvo-pwd = 20 | nfvo-ip = 127.0.0.1 21 | nfvo-port = 8080 22 | nfvo-version = 1 -------------------------------------------------------------------------------- /etc/descriptors/datacenters/vim-instance.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vim-instance", 3 | "authUrl": "http://the.ip.address.here/v2", 4 | "tenant": "test_tenant", 5 | "username": "test_username", 6 | "password": "test_password", 7 | "keyPair": "test_keyPair", 8 | "securityGroups": [ 9 | "test_security_group1", 10 | "test_security_group2", 11 | "test_security_group3" 12 | ], 13 | "type": "test", 14 | "location": { 15 | "name": "Berlin", 16 | "latitude": "52.525876", 17 | "longitude": "13.314400" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /etc/diagrams/orv-nfm-generic-message.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbaton/NFVO/6a209393dca9af72d56b3e36f753e2118b678190/etc/diagrams/orv-nfm-generic-message.png -------------------------------------------------------------------------------- /etc/diagrams/orv-nfm-instantiate-message.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbaton/NFVO/6a209393dca9af72d56b3e36f753e2118b678190/etc/diagrams/orv-nfm-instantiate-message.png -------------------------------------------------------------------------------- /etc/diagrams/package-dependencies.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbaton/NFVO/6a209393dca9af72d56b3e36f753e2118b678190/etc/diagrams/package-dependencies.png -------------------------------------------------------------------------------- /etc/diagrams/vdu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbaton/NFVO/6a209393dca9af72d56b3e36f753e2118b678190/etc/diagrams/vdu.png -------------------------------------------------------------------------------- /etc/diagrams/vim-instance.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbaton/NFVO/6a209393dca9af72d56b3e36f753e2118b678190/etc/diagrams/vim-instance.png -------------------------------------------------------------------------------- /etc/keystore.p12: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbaton/NFVO/6a209393dca9af72d56b3e36f753e2118b678190/etc/keystore.p12 -------------------------------------------------------------------------------- /etc/rabbit-install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | sudo apt-get install rabbitmq-server 4 | rabbitmqctl add_user admin openbaton 5 | rabbitmqctl set_user_tags admin administrator 6 | rabbitmqctl set_permissions -p / admin ".*" ".*" ".*" 7 | sudo service rabbitmq-server restart 8 | -------------------------------------------------------------------------------- /exception/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | buildscript { 17 | repositories { 18 | //mavenLocal() 19 | mavenCentral() 20 | jcenter() 21 | } 22 | dependencies { 23 | classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1' 24 | } 25 | } 26 | 27 | apply plugin: 'com.bmuschko.nexus' 28 | apply from: '../gradle/gradle/nexus.upload.plugin.gradle' 29 | 30 | dependencies { 31 | compile project(":catalogue") 32 | } -------------------------------------------------------------------------------- /exception/src/main/java/org/openbaton/exceptions/AlreadyExistingException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.exceptions; 18 | 19 | /** Created by lto on 16/02/16. */ 20 | public class AlreadyExistingException extends Exception { 21 | public AlreadyExistingException(Throwable cause) { 22 | super(cause); 23 | } 24 | 25 | public AlreadyExistingException(String message) { 26 | super(message); 27 | } 28 | 29 | public AlreadyExistingException(String message, Throwable cause) { 30 | super(message, cause); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /exception/src/main/java/org/openbaton/exceptions/BadFormatException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.exceptions; 18 | 19 | /** Created by lto on 08/06/15. */ 20 | public class BadFormatException extends Exception { 21 | public BadFormatException(String s) { 22 | super(s); 23 | } 24 | 25 | public BadFormatException(Throwable t) { 26 | super(t); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /exception/src/main/java/org/openbaton/exceptions/BadRequestException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.exceptions; 18 | 19 | /** Created by lto on 26/05/15. */ 20 | public class BadRequestException extends Exception { 21 | public BadRequestException(String msg) { 22 | super(msg); 23 | } 24 | 25 | public BadRequestException(Throwable e) { 26 | super(e); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /exception/src/main/java/org/openbaton/exceptions/CyclicDependenciesException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.exceptions; 18 | 19 | /** Created by lto on 15/01/16. */ 20 | public class CyclicDependenciesException extends Exception { 21 | public CyclicDependenciesException(Throwable cause) { 22 | super(cause); 23 | } 24 | 25 | public CyclicDependenciesException(String message) { 26 | super(message); 27 | } 28 | 29 | public CyclicDependenciesException(String message, Throwable cause) { 30 | super(message, cause); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /exception/src/main/java/org/openbaton/exceptions/DescriptorWrongFormat.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.exceptions; 18 | 19 | /** Created by rvl on 29.09.16. */ 20 | public class DescriptorWrongFormat extends Exception { 21 | 22 | public DescriptorWrongFormat(String message) { 23 | super(message); 24 | } 25 | 26 | public DescriptorWrongFormat(String message, Throwable cause) { 27 | super(message, cause); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /exception/src/main/java/org/openbaton/exceptions/EntityInUseException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.exceptions; 18 | 19 | /** Created by lto on 13/06/16. */ 20 | public class EntityInUseException extends Exception { 21 | public EntityInUseException(String message) { 22 | super(message); 23 | } 24 | 25 | public EntityInUseException(String message, Throwable cause) { 26 | super(message, cause); 27 | } 28 | 29 | public EntityInUseException(Throwable cause) { 30 | super(cause); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /exception/src/main/java/org/openbaton/exceptions/EntityUnreachableException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.exceptions; 18 | 19 | /** Created by lto on 13/06/16. */ 20 | public class EntityUnreachableException extends Exception { 21 | public EntityUnreachableException(String message) { 22 | super(message); 23 | } 24 | 25 | public EntityUnreachableException(String message, Throwable cause) { 26 | super(message, cause); 27 | } 28 | 29 | public EntityUnreachableException(Throwable cause) { 30 | super(cause); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /exception/src/main/java/org/openbaton/exceptions/ExistingVNFPackage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.exceptions; 18 | 19 | /** Created by rvl on 11.10.16. */ 20 | public class ExistingVNFPackage extends Exception { 21 | 22 | public ExistingVNFPackage(String message) { 23 | super(message); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /exception/src/main/java/org/openbaton/exceptions/IncompatibleVNFPackage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.exceptions; 18 | 19 | /** Created by rvl on 05.10.16. */ 20 | public class IncompatibleVNFPackage extends Exception { 21 | 22 | public IncompatibleVNFPackage(String message) { 23 | super(message); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /exception/src/main/java/org/openbaton/exceptions/MissingParameterException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.exceptions; 18 | 19 | /** Created by lto on 26/11/15. */ 20 | public class MissingParameterException extends Exception { 21 | public MissingParameterException(Throwable cause) { 22 | super(cause); 23 | } 24 | 25 | public MissingParameterException(String message) { 26 | super(message); 27 | } 28 | 29 | public MissingParameterException(String message, Throwable cause) { 30 | super(message, cause); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /exception/src/main/java/org/openbaton/exceptions/MonitoringException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.exceptions; 18 | 19 | /** Created by lto on 26/11/15. */ 20 | public class MonitoringException extends Exception { 21 | public MonitoringException(Throwable cause) { 22 | super(cause); 23 | } 24 | 25 | public MonitoringException(String message) { 26 | super(message); 27 | } 28 | 29 | public MonitoringException(String message, Throwable cause) { 30 | super(message, cause); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /exception/src/main/java/org/openbaton/exceptions/NetworkServiceIntegrityException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.exceptions; 18 | 19 | /** Created by lto on 25/09/15. */ 20 | public class NetworkServiceIntegrityException extends Exception { 21 | public NetworkServiceIntegrityException() {} 22 | 23 | public NetworkServiceIntegrityException(Throwable cause) { 24 | super(cause); 25 | } 26 | 27 | public NetworkServiceIntegrityException(String message) { 28 | super(message); 29 | } 30 | 31 | public NetworkServiceIntegrityException(String message, Throwable cause) { 32 | super(message, cause); 33 | } 34 | 35 | public NetworkServiceIntegrityException( 36 | String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { 37 | super(message, cause, enableSuppression, writableStackTrace); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /exception/src/main/java/org/openbaton/exceptions/NotAllowedException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.exceptions; 18 | 19 | /** Created by lto on 25/05/16. */ 20 | public class NotAllowedException extends Exception { 21 | public NotAllowedException(String message) { 22 | super(message); 23 | } 24 | 25 | public NotAllowedException(String message, Throwable cause) { 26 | super(message, cause); 27 | } 28 | 29 | public NotAllowedException(Throwable cause) { 30 | super(cause); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /exception/src/main/java/org/openbaton/exceptions/NotFoundException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.exceptions; 18 | 19 | public class NotFoundException extends Exception { 20 | public NotFoundException(String msg) { 21 | super(msg); 22 | } 23 | 24 | public NotFoundException(Throwable e) { 25 | super(e); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /exception/src/main/java/org/openbaton/exceptions/NsrNotFoundException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.exceptions; 18 | 19 | public class NsrNotFoundException extends NotFoundException { 20 | public NsrNotFoundException(String msg) { 21 | super(msg); 22 | } 23 | 24 | public NsrNotFoundException(Throwable e) { 25 | super(e); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /exception/src/main/java/org/openbaton/exceptions/PasswordWeakException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.exceptions; 18 | 19 | /** Created by lto on 03/06/16. */ 20 | public class PasswordWeakException extends Exception { 21 | public PasswordWeakException() {} 22 | 23 | public PasswordWeakException(String message) { 24 | super(message); 25 | } 26 | 27 | public PasswordWeakException(String message, Throwable cause) { 28 | super(message, cause); 29 | } 30 | 31 | public PasswordWeakException(Throwable cause) { 32 | super(cause); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /exception/src/main/java/org/openbaton/exceptions/PluginException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.exceptions; 18 | 19 | /** Created by lto on 26/11/15. */ 20 | public class PluginException extends Exception { 21 | public PluginException(Throwable cause) { 22 | super(cause); 23 | } 24 | 25 | public PluginException(String message) { 26 | super(message); 27 | } 28 | 29 | public PluginException(String message, Throwable cause) { 30 | super(message, cause); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /exception/src/main/java/org/openbaton/exceptions/QuotaExceededException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.exceptions; 18 | 19 | /** Created by lto on 08/06/15. */ 20 | public class QuotaExceededException extends Throwable { 21 | public QuotaExceededException(String s) { 22 | super(s); 23 | } 24 | 25 | public QuotaExceededException(Throwable t) { 26 | super(t); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /exception/src/main/java/org/openbaton/exceptions/VNFPackageFormatException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.exceptions; 18 | 19 | /** Created by mob on 05/04/2017. */ 20 | public class VNFPackageFormatException extends Exception { 21 | 22 | public VNFPackageFormatException() {} 23 | 24 | public VNFPackageFormatException(String message) { 25 | super(message); 26 | } 27 | 28 | public VNFPackageFormatException(String message, Throwable cause) { 29 | super(message, cause); 30 | } 31 | 32 | public VNFPackageFormatException(Throwable cause) { 33 | super(cause); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /exception/src/main/java/org/openbaton/exceptions/VimDriverException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.exceptions; 18 | 19 | import org.openbaton.catalogue.nfvo.Server; 20 | 21 | /** Created by lto on 13/07/15. */ 22 | public class VimDriverException extends Exception { 23 | 24 | public Server getServer() { 25 | return server; 26 | } 27 | 28 | public void setServer(Server server) { 29 | this.server = server; 30 | } 31 | 32 | private Server server; 33 | 34 | public VimDriverException() {} 35 | 36 | public VimDriverException(String message) { 37 | super(message); 38 | } 39 | 40 | public VimDriverException(String message, Throwable cause) { 41 | super(message, cause); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /exception/src/main/java/org/openbaton/exceptions/VnfmException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.exceptions; 18 | 19 | /** Created by lto on 23/06/15. */ 20 | public class VnfmException extends Exception { 21 | public VnfmException() { 22 | super(); 23 | } 24 | 25 | public VnfmException(String message) { 26 | super(message); 27 | } 28 | 29 | public VnfmException(String message, Throwable cause) { 30 | super(message, cause); 31 | } 32 | 33 | public VnfmException(Throwable cause) { 34 | super(cause); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /exception/src/main/java/org/openbaton/exceptions/WrongAction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.exceptions; 18 | 19 | /** Created by lto on 22/02/16. */ 20 | public class WrongAction extends Exception { 21 | public WrongAction(Throwable cause) { 22 | super(cause); 23 | } 24 | 25 | public WrongAction(String message) { 26 | super(message); 27 | } 28 | 29 | public WrongAction(String message, Throwable cause) { 30 | super(message, cause); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /exception/src/main/java/org/openbaton/exceptions/WrongStatusException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.exceptions; 18 | 19 | /** Created by lto on 04/08/15. */ 20 | public class WrongStatusException extends Exception { 21 | public WrongStatusException(String s) { 22 | super(s); 23 | } 24 | 25 | public WrongStatusException() {} 26 | 27 | public WrongStatusException(String message, Throwable cause) { 28 | super(message, cause); 29 | } 30 | 31 | public WrongStatusException(Throwable cause) { 32 | super(cause); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | version=6.0.1-SNAPSHOT 18 | group=org.openbaton 19 | -------------------------------------------------------------------------------- /gradle/gradle/application.java.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Java related stuff 19 | */ 20 | subprojects { 21 | 22 | apply plugin: 'java' 23 | apply plugin: 'maven' 24 | 25 | group = 'org.openbaton' 26 | 27 | sourceCompatibility = 1.8 28 | targetCompatibility = 1.8 29 | 30 | repositories { 31 | mavenCentral() 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /gradle/gradle/git.helpers.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | rootProject.ext.getRevision = { 18 | String commit = execAndGetOutput("git rev-parse --short HEAD") 19 | return (commit != null) ? commit : "UNKNOWN" 20 | } 21 | 22 | rootProject.ext.isApplicationRelease = { 23 | return ! "${version}".contains("-SNAPSHOT") 24 | } 25 | -------------------------------------------------------------------------------- /gradle/gradle/git.release.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | release { 18 | failOnCommitNeeded = true 19 | failOnPublishNeeded = true 20 | failOnSnapshotDependencies = true 21 | failOnUnversionedFiles = true 22 | failOnUpdateNeeded = true 23 | revertOnFail = true 24 | preCommitText = '' 25 | preTagCommitMessage = 'Pre-tag commit: ' 26 | tagCommitMessage = 'Creating tag: ' 27 | newVersionCommitMessage = 'New version commit: ' 28 | tagTemplate = '${version}' 29 | versionPropertyFile = 'gradle.properties' 30 | versionProperties = [] 31 | git { 32 | requireBranch = '' 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /gradle/gradle/helpers.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | // Global Helpers ////////////////////////////////////////////////////////////// 18 | 19 | import java.text.SimpleDateFormat 20 | 21 | rootProject.ext.execAndGetOutput = { String command -> 22 | try { 23 | def stdout = new ByteArrayOutputStream() 24 | 25 | exec { 26 | workingDir rootProject.projectDir 27 | commandLine command.split() 28 | errorOutput = new ByteArrayOutputStream() 29 | standardOutput = stdout 30 | } 31 | 32 | return stdout.toString().trim() 33 | } 34 | catch (Exception e) { 35 | return null 36 | } 37 | } 38 | 39 | rootProject.ext.asUTC = { Date date, String format -> 40 | def snapshotDateFormat = new SimpleDateFormat(format) 41 | snapshotDateFormat.setTimeZone(TimeZone.getTimeZone('UTC')) 42 | return snapshotDateFormat.format(date) 43 | } 44 | 45 | 46 | -------------------------------------------------------------------------------- /gradle/gradle/scripts/systemd/openbaton-nfvo.env: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2016 Open Baton (http://www.openbaton.org) 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | 16 | OPENBATON_COMPONENT_NAME_FANCY="NFV Orchestrator (NFVO)" 17 | OPENBATON_COMPONENT_NAME=nfvo 18 | OPENBATON_COMPONENT_RELATIVE_SUBPATH=nfvo 19 | 20 | # Expansion of variable like that does not work 21 | #OPENBATON_COMPONENT_CONFIG_FILE=/etc/openbaton/openbaton-${OPENBATON_COMPONENT_NAME}.properties 22 | #OPENBATON_COMPONENT_JAR_INSTALL_DIR=/usr/lib/openbaton/${OPENBATON_COMPONENT_RELATIVE_SUBPATH} 23 | #OPENBATON_COMPONENT_JAR_FILE_NAME=openbaton-${OPENBATON_COMPONENT_NAME} 24 | #OPENBATON_COMPONENT_JAR_FILE_NAME_VERSIONED= 25 | 26 | OPENBATON_COMPONENT_CONFIG_FILE=/etc/openbaton/openbaton-nfvo.properties 27 | OPENBATON_COMPONENT_JAR_INSTALL_DIR=/usr/lib/openbaton/nfvo 28 | OPENBATON_COMPONENT_JAR_FILE_NAME=openbaton-nfvo 29 | OPENBATON_COMPONENT_JAR_FILE_NAME_VERSIONED= 30 | -------------------------------------------------------------------------------- /gradle/gradle/scripts/systemd/openbaton-nfvo.service: -------------------------------------------------------------------------------- 1 | # Open Baton init script for the 'Systemd' System and Service Manager 2 | 3 | # Copyright (c) 2016 Open Baton (http://www.openbaton.org) 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | 18 | [Unit] 19 | Description=Open Baton NFV Orchestrator Systemd Unit 20 | After=network.target 21 | 22 | [Service] 23 | Type=simple 24 | EnvironmentFile=/usr/lib/openbaton/systemd/env/openbaton-nfvo.env 25 | ExecStartPre=/usr/lib/openbaton/systemd/preexecstart/openbaton-nfvo.preexecstart 26 | ExecStart=/usr/bin/java -jar ${OPENBATON_COMPONENT_JAR_INSTALL_DIR}/${OPENBATON_COMPONENT_JAR_FILE_NAME_VERSIONED} --spring.config.location=file:${OPENBATON_COMPONENT_CONFIG_FILE} --no-console 27 | Restart=on-failure 28 | RestartSec=60s 29 | 30 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbaton/NFVO/6a209393dca9af72d56b3e36f753e2118b678190/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | #Thu Jan 18 13:09:58 CET 2018 18 | distributionBase=GRADLE_USER_HOME 19 | distributionPath=wrapper/dists 20 | zipStoreBase=GRADLE_USER_HOME 21 | zipStorePath=wrapper/dists 22 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip 23 | -------------------------------------------------------------------------------- /main/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | dependencies { 17 | compile project(':repository') 18 | compile project(':catalogue') 19 | compile project(':plugin') 20 | compile project(':core-int') 21 | compile project(':security') 22 | 23 | runtime project(':dashboard') 24 | runtime project(':core-impl') 25 | runtime project(':api') 26 | runtime project(':cli') 27 | runtime project(':vim-impl') 28 | runtime project(':repository') 29 | runtime project(':vnfm-impl') 30 | 31 | compile 'org.flywaydb:flyway-core:4.2.0' 32 | 33 | testCompile 'junit:junit:'+junitVersion 34 | testCompile 'org.springframework.boot:spring-boot-starter-test:'+ springBootVersion 35 | } 36 | -------------------------------------------------------------------------------- /main/src/main/resources/application-mysql.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | # Launch the Application with --spring.profiles.active=mysql to enable this configuration 18 | 19 | spring.datasource.username=admin 20 | spring.datasource.password=changeme 21 | 22 | spring.datasource.url=jdbc:mysql://localhost:3306/openbaton?useSSL=false 23 | spring.datasource.driver-class-name=org.mariadb.jdbc.Driver 24 | spring.jpa.database-platform=org.hibernate.dialect.MySQLDialect 25 | spring.jpa.show-sql=false 26 | spring.jpa.hibernate.ddl-auto=update 27 | 28 | spring.datasource.validationQuery=SELECT 1 29 | spring.datasource.testOnBorrow=true -------------------------------------------------------------------------------- /main/src/main/resources/banner.txt: -------------------------------------------------------------------------------- 1 | _______ ________ _____ 2 | __ __ \___________________ ___ __ )_____ __ /_____________ 3 | _ / / /__ __ \ _ \_ __ \ __ __ | __ `/ __/ __ \_ __ \ 4 | / /_/ /__ /_/ / __/ / / / _ /_/ // /_/ // /_ / /_/ / / / / 5 | \____/ _ .___/\___//_/ /_/ /_____/ \__,_/ \__/ \____//_/ /_/ 6 | /_/ ${application.formatted-version} 7 | 8 | < > with ❤ by the Open Baton Team 9 | -------------------------------------------------------------------------------- /main/src/main/resources/flyway/V2_1_3_1__Add_task.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE network_service_record ADD task varchar(255); -------------------------------------------------------------------------------- /main/src/main/resources/flyway/V2_1_3_2__Populate_task.sql: -------------------------------------------------------------------------------- 1 | UPDATE network_service_record SET task = 'Onboarded' WHERE (task = '' OR task is NULL) AND status = 'ACTIVE'; 2 | UPDATE network_service_record SET task = 'Onboarding' WHERE (task = '' OR task IS NULL) AND (status = 'INACTIVE' OR status IS NULL OR status = 'NULL'); -------------------------------------------------------------------------------- /main/src/main/resources/flyway/V2_2_0_0__Add_nfvo_version_to_vnf_package.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE vnfpackage ADD nfvo_version varchar(255); 2 | UPDATE vnfpackage SET nfvo_version = '2.2.1' WHERE (nfvo_version = '' OR nfvo_version is NULL); 3 | -------------------------------------------------------------------------------- /main/src/main/resources/flyway/V2_2_0_1__Add_history_entity.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS virtual_network_function_record_lifecycle_event_history; 2 | -------------------------------------------------------------------------------- /main/src/main/resources/flyway/V2_2_0_2__Increase_description_length.sql: -------------------------------------------------------------------------------- 1 | 2 | -- ALTER TABLE history_lifecycle_event MODIFY description VARCHAR(1024); 3 | -------------------------------------------------------------------------------- /main/src/main/resources/flyway/V2_2_0_3__Increase_description_length_configuration.sql: -------------------------------------------------------------------------------- 1 | 2 | ALTER TABLE configuration_parameter MODIFY description varchar(1024); -------------------------------------------------------------------------------- /main/src/main/resources/flyway/V3_2_0_1__Add_createdAt_updatedAt_to_NSD_VNFD_NSR_NSD.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE network_service_descriptor ADD created_at varchar(255); 2 | ALTER TABLE network_service_descriptor ADD updated_at varchar(255); 3 | ALTER TABLE virtual_network_function_descriptor ADD created_at varchar(255); 4 | ALTER TABLE virtual_network_function_descriptor ADD updated_at varchar(255); 5 | ALTER TABLE network_service_record ADD updated_at varchar(255); 6 | ALTER TABLE virtual_network_function_record ADD created_at varchar(255); 7 | ALTER TABLE virtual_network_function_record ADD updated_at varchar(255); 8 | -------------------------------------------------------------------------------- /main/src/main/resources/flyway/V3_2_0_2__Add_nfvo_version_to_NSD_VNFD.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE network_service_descriptor ADD nfvo_version varchar(255); 2 | ALTER TABLE virtual_network_function_descriptor ADD nfvo_version varchar(255); 3 | UPDATE network_service_descriptor SET nfvo_version = '3.2.0' WHERE (nfvo_version = '' OR nfvo_version is NULL); 4 | UPDATE virtual_network_function_descriptor SET nfvo_version = '3.2.0' WHERE (nfvo_version = '' OR nfvo_version is NULL); 5 | -------------------------------------------------------------------------------- /main/src/main/resources/flyway/V4_0_1_0__add_user_role_to_base_user.sql: -------------------------------------------------------------------------------- 1 | use openbaton; 2 | 3 | CREATE TABLE IF NOT EXISTS base_user_roles ( 4 | base_user_id varchar(255), 5 | roles_id VARCHAR(255), 6 | primary key (base_user_id , roles_id)); 7 | 8 | 9 | DROP PROCEDURE IF EXISTS ReeBAR; 10 | DELIMITER ;; 11 | 12 | 13 | CREATE PROCEDURE ReeBAR() 14 | BEGIN 15 | DECLARE done INT DEFAULT FALSE; 16 | DECLARE usr_id VARCHAR(255); 17 | DECLARE rl_id VARCHAR(255); 18 | DECLARE cursor_i CURSOR FOR SELECT users_id, roles_id FROM users_roles; 19 | DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE; 20 | 21 | OPEN cursor_i; 22 | 23 | read_loop: LOOP 24 | FETCH cursor_i INTO usr_id, rl_id; 25 | IF done THEN 26 | LEAVE read_loop; 27 | END IF; 28 | insert into base_user_roles(base_user_id, roles_id) values(usr_id,rl_id); 29 | 30 | END LOOP; 31 | CLOSE cursor_i; 32 | END; 33 | ;; 34 | DELIMITER ; 35 | 36 | CALL ReeBAR(); 37 | -- 38 | -- SET usr_id := (SELECT users_id INTO usr_id FROM users_roles); 39 | -- SET rl_id := (SELECT roles_id INTO rl_id FROM users_roles); 40 | -- insert into base_user_roles(base_user_id, roles_id) values(usr_id,rl_id); 41 | -------------------------------------------------------------------------------- /main/src/main/resources/flyway/V4_0_1_1__Change_source_target_id_nullable.sql: -------------------------------------------------------------------------------- 1 | 2 | ALTER TABLE vnfdependency ADD source varchar(255); 3 | ALTER TABLE vnfdependency ADD target varchar(255); 4 | 5 | DROP PROCEDURE IF EXISTS dependency; 6 | DELIMITER ;; 7 | 8 | 9 | CREATE PROCEDURE dependency() 10 | BEGIN 11 | DECLARE done INT DEFAULT FALSE; 12 | DECLARE dep_id VARCHAR(255); 13 | DECLARE src_id VARCHAR(255); 14 | DECLARE trg_id VARCHAR(255); 15 | 16 | DECLARE cursor_i CURSOR FOR SELECT id, source_id, target_id FROM vnfdependency; 17 | DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE; 18 | 19 | OPEN cursor_i; 20 | 21 | read_loop: LOOP 22 | FETCH cursor_i INTO dep_id, src_id, trg_id; 23 | IF done THEN 24 | LEAVE read_loop; 25 | END IF; 26 | 27 | SET @source_name = (select name from virtual_network_function_descriptor where id=src_id); 28 | SET @target_name = (select name from virtual_network_function_descriptor where id=trg_id); 29 | 30 | # SELECT @source_name; 31 | 32 | UPDATE vnfdependency SET source=@source_name,target=@target_name where id=dep_id; 33 | 34 | END LOOP; 35 | CLOSE cursor_i; 36 | END; 37 | ;; 38 | DELIMITER ; 39 | 40 | CALL dependency(); 41 | 42 | ALTER TABLE vnfdependency MODIFY source_id varchar(255) NULL; 43 | ALTER TABLE vnfdependency MODIFY target_id varchar(255) NULL; -------------------------------------------------------------------------------- /main/src/main/resources/flyway/V4_1_0_0__fix_hibernate_version.sql: -------------------------------------------------------------------------------- 1 | alter table vnfm_manager_endpoint drop column version; 2 | 3 | ALTER TABLE network ADD COLUMN ext_shared BOOL; 4 | 5 | DROP PROCEDURE IF EXISTS sharedChange; 6 | DELIMITER ;; 7 | 8 | 9 | CREATE PROCEDURE sharedChange() 10 | BEGIN 11 | DECLARE done INT DEFAULT FALSE; 12 | DECLARE oldShared BOOL; 13 | DECLARE net_id VARCHAR(255); 14 | 15 | DECLARE cursor_i CURSOR FOR SELECT id, shared FROM network; 16 | DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE; 17 | 18 | OPEN cursor_i; 19 | 20 | read_loop: LOOP 21 | FETCH cursor_i INTO net_id, oldShared; 22 | IF done THEN 23 | LEAVE read_loop; 24 | END IF; 25 | 26 | UPDATE network SET ext_shared=oldShared where id=net_id; 27 | UPDATE network SET shared=false where id=net_id; 28 | 29 | END LOOP; 30 | CLOSE cursor_i; 31 | END; 32 | ;; 33 | DELIMITER ; 34 | 35 | CALL sharedChange(); -------------------------------------------------------------------------------- /main/src/main/resources/flyway/V4_1_0_2__fix_hibernate_version_fault_management.sql: -------------------------------------------------------------------------------- 1 | DROP PROCEDURE IF EXISTS `?`; 2 | DELIMITER // 3 | CREATE PROCEDURE `?` 4 | ( 5 | ) 6 | BEGIN 7 | DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END; 8 | 9 | 10 | ALTER TABLE criteria DROP COLUMN version; 11 | ALTER TABLE monitoring_parameter DROP COLUMN version; 12 | ALTER TABLE fault_management_policy DROP COLUMN version; 13 | ALTER TABLE fault_management_policy DROP COLUMN dtype; 14 | ALTER TABLE high_availability DROP COLUMN geo_redundancy; 15 | 16 | END // 17 | DELIMITER ; 18 | CALL `?`(); 19 | DROP PROCEDURE `?`; 20 | -------------------------------------------------------------------------------- /main/src/main/resources/flyway/V5_0_0_0__rename_vim_instance_table.sql: -------------------------------------------------------------------------------- 1 | 2 | CREATE TABLE IF NOT EXISTS openstack_vim_instance LIKE vim_instance; 3 | CREATE TABLE IF NOT EXISTS docker_vim_instance LIKE vim_instance; 4 | CREATE TABLE IF NOT EXISTS generic_vim_instance LIKE vim_instance; 5 | 6 | ALTER TABLE generic_vim_instance DROP COLUMN key_pair; 7 | ALTER TABLE generic_vim_instance DROP COLUMN password; 8 | ALTER TABLE generic_vim_instance DROP COLUMN tenant; 9 | ALTER TABLE generic_vim_instance DROP COLUMN username; 10 | 11 | INSERT openstack_vim_instance SELECT * FROM vim_instance where type="openstack"; 12 | INSERT docker_vim_instance SELECT * FROM vim_instance where type="docker"; 13 | INSERT generic_vim_instance SELECT id, hb_version, project_id, shared, active, auth_url, name, type, location_id FROM vim_instance where type!="docker" AND type!="openstack"; 14 | 15 | DROP TABLE IF EXISTS vim_instance_flavours, vim_instance_images, vim_instance_networks, vim_instance_security_groups; 16 | DROP TABLE IF EXISTS vim_instance; -------------------------------------------------------------------------------- /monitoring/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | buildscript { 17 | repositories { 18 | //mavenLocal() 19 | mavenCentral() 20 | jcenter() 21 | } 22 | dependencies { 23 | classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1' 24 | } 25 | } 26 | 27 | apply plugin: 'com.bmuschko.nexus' 28 | apply from: '../gradle/gradle/nexus.upload.plugin.gradle' 29 | 30 | dependencies { 31 | compile project(':catalogue') 32 | compile project(':plugin') 33 | } -------------------------------------------------------------------------------- /monitoring/src/main/java/org/openbaton/monitoring/interfaces/MonitoringPlugin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.monitoring.interfaces; 18 | 19 | import org.openbaton.plugin.interfaces.Plugin; 20 | 21 | /** Created by lto on 15/10/15. */ 22 | public abstract class MonitoringPlugin extends Plugin 23 | implements VirtualisedResourceFaultManagement, VirtualisedResourcesPerformanceManagement { 24 | 25 | protected MonitoringPlugin() { 26 | super(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /plugin/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | buildscript { 18 | repositories { 19 | //mavenLocal() 20 | mavenCentral() 21 | jcenter() 22 | } 23 | dependencies { 24 | classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1' 25 | } 26 | } 27 | 28 | apply plugin: 'com.bmuschko.nexus' 29 | apply from: '../gradle/gradle/nexus.upload.plugin.gradle' 30 | 31 | dependencies { 32 | compile project(":catalogue") 33 | compile project(":common") 34 | } 35 | -------------------------------------------------------------------------------- /registration/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | buildscript { 17 | repositories { 18 | //mavenLocal() 19 | mavenCentral() 20 | jcenter() 21 | } 22 | dependencies { 23 | classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1' 24 | } 25 | } 26 | 27 | apply plugin: 'com.bmuschko.nexus' 28 | apply from: '../gradle/gradle/nexus.upload.plugin.gradle' 29 | 30 | dependencies { 31 | 32 | compile project(":catalogue") 33 | compile project(":common") 34 | 35 | compile 'org.springframework.boot:spring-boot-starter-amqp:' + springBootVersion 36 | 37 | testCompile 'junit:junit:4.11' 38 | } 39 | -------------------------------------------------------------------------------- /repository/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | dependencies { 18 | compile project(':catalogue') 19 | compile project(':exception') 20 | 21 | compile 'org.springframework.boot:spring-boot-starter-data-jpa:' + springBootVersion 22 | compile 'commons-io:commons-io:2.6' 23 | 24 | testCompile 'org.springframework.boot:spring-boot-starter-data-jpa:' + springBootVersion 25 | testCompile 'org.springframework.boot:spring-boot-starter-test:' + springBootVersion 26 | testCompile 'org.hsqldb:hsqldb:2.3.4' 27 | testCompile 'junit:junit:'+junitVersion 28 | } -------------------------------------------------------------------------------- /repository/src/main/java/org/openbaton/nfvo/repositories/EventEndpointRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.repositories; 18 | 19 | import java.util.List; 20 | import org.openbaton.catalogue.nfvo.EventEndpoint; 21 | import org.springframework.data.repository.CrudRepository; 22 | 23 | /** Created by lto on 06/05/15. */ 24 | public interface EventEndpointRepository extends CrudRepository { 25 | EventEndpoint findFirstById(String id); 26 | 27 | EventEndpoint findFirstByIdAndProjectId(String id, String projectId); 28 | 29 | List findByProjectId(String projectId); 30 | } 31 | -------------------------------------------------------------------------------- /repository/src/main/java/org/openbaton/nfvo/repositories/HistoryEntityRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.repositories; 18 | 19 | import org.openbaton.catalogue.security.HistoryEntity; 20 | import org.springframework.data.domain.Sort; 21 | import org.springframework.data.repository.CrudRepository; 22 | 23 | /** Created by lto on 17/10/16. */ 24 | public interface HistoryEntityRepository extends CrudRepository { 25 | HistoryEntity[] findByUsername(String username); 26 | 27 | HistoryEntity[] findAll(Sort sort); 28 | } 29 | -------------------------------------------------------------------------------- /repository/src/main/java/org/openbaton/nfvo/repositories/ImageRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.repositories; 18 | 19 | import org.openbaton.catalogue.nfvo.images.BaseNfvImage; 20 | import org.springframework.data.repository.CrudRepository; 21 | 22 | /** Created by lto on 06/05/15. */ 23 | public interface ImageRepository extends CrudRepository { 24 | // List findByProjectId(String projectId); 25 | } 26 | -------------------------------------------------------------------------------- /repository/src/main/java/org/openbaton/nfvo/repositories/KeyRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.repositories; 18 | 19 | import org.openbaton.catalogue.security.Key; 20 | import org.springframework.data.repository.CrudRepository; 21 | 22 | /** Created by mpa on 09/08/16. */ 23 | public interface KeyRepository extends CrudRepository, KeyRepositoryCustom { 24 | Iterable findByProjectId(String projectId); 25 | 26 | Key findFirstById(String id); 27 | 28 | Key findFirstByIdAndProjectId(String id, String projectId); 29 | 30 | Key findKey(String projectId, String name); 31 | } 32 | -------------------------------------------------------------------------------- /repository/src/main/java/org/openbaton/nfvo/repositories/KeyRepositoryCustom.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.repositories; 18 | 19 | import org.openbaton.catalogue.security.Key; 20 | 21 | /** Created by mpa on 09/08/16. */ 22 | public interface KeyRepositoryCustom { 23 | Key findKey(String projectId, String name); 24 | } 25 | -------------------------------------------------------------------------------- /repository/src/main/java/org/openbaton/nfvo/repositories/KeyRepositoryImpl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.repositories; 18 | 19 | import org.openbaton.catalogue.security.Key; 20 | import org.springframework.beans.factory.annotation.Autowired; 21 | 22 | /** Created by mpa on 09/08/16. */ 23 | public class KeyRepositoryImpl implements KeyRepositoryCustom { 24 | 25 | @Autowired private KeyRepository keyRepository; 26 | 27 | @Override 28 | public Key findKey(String projectId, String name) { 29 | Iterable keys = keyRepository.findByProjectId(projectId); 30 | for (Key key : keys) { 31 | if (key.getName().equals(name)) return key; 32 | } 33 | return null; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /repository/src/main/java/org/openbaton/nfvo/repositories/ManagerCredentialsRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.repositories; 18 | 19 | import org.openbaton.catalogue.nfvo.ManagerCredentials; 20 | import org.springframework.data.repository.CrudRepository; 21 | 22 | /** Created by lto on 25.04.17. */ 23 | public interface ManagerCredentialsRepository extends CrudRepository { 24 | ManagerCredentials findFirstById(String id); 25 | 26 | ManagerCredentials findFirstByRabbitUsername(String username); 27 | } 28 | -------------------------------------------------------------------------------- /repository/src/main/java/org/openbaton/nfvo/repositories/NFVImageRepository.java: -------------------------------------------------------------------------------- 1 | package org.openbaton.nfvo.repositories; 2 | 3 | import java.util.List; 4 | import org.openbaton.catalogue.nfvo.images.NFVImage; 5 | import org.springframework.data.repository.CrudRepository; 6 | 7 | /** 8 | * This repository interface is used for dealing with NFVImages, which correspond to images used by 9 | * OpenStack. Do not confuse this interface with the general ImageRepository which works on all 10 | * types of images. 11 | */ 12 | public interface NFVImageRepository extends CrudRepository { 13 | List findAllByProjectIdAndIsInImageRepoIsTrue(String projectId); 14 | 15 | NFVImage findOneByNameAndProjectIdAndIsInImageRepoIsTrue(String name, String projectId); 16 | 17 | NFVImage findOneByIdAndProjectIdAndIsInImageRepoIsTrue(String id, String projectId); 18 | 19 | List isInImageRepoIsTrue(); 20 | 21 | NFVImage findOneByIdAndIsInImageRepoIsTrue(String id); 22 | } 23 | -------------------------------------------------------------------------------- /repository/src/main/java/org/openbaton/nfvo/repositories/NetworkRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.repositories; 18 | 19 | import org.openbaton.catalogue.nfvo.networks.BaseNetwork; 20 | import org.springframework.data.repository.CrudRepository; 21 | 22 | /** Created by lto on 06/05/15. */ 23 | public interface NetworkRepository extends CrudRepository { 24 | // List findByProjectId(String projectId); 25 | } 26 | -------------------------------------------------------------------------------- /repository/src/main/java/org/openbaton/nfvo/repositories/NetworkServiceDescriptorRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.repositories; 18 | 19 | import java.util.List; 20 | import org.openbaton.catalogue.mano.descriptor.NetworkServiceDescriptor; 21 | import org.springframework.data.repository.CrudRepository; 22 | 23 | public interface NetworkServiceDescriptorRepository 24 | extends CrudRepository, 25 | NetworkServiceDescriptorRepositoryCustom { 26 | NetworkServiceDescriptor findFirstById(String id); 27 | 28 | // Finds the NSDs that contains the VNFD with the given id 29 | List findByVnfd_idAndProjectId(String id, String projectId); 30 | 31 | NetworkServiceDescriptor findFirstByIdAndProjectId(String id, String projectId); 32 | 33 | List findByProjectId(String projectId); 34 | } 35 | -------------------------------------------------------------------------------- /repository/src/main/java/org/openbaton/nfvo/repositories/PhysicalNetworkFunctionDescriptorRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.repositories; 18 | 19 | import org.openbaton.catalogue.mano.descriptor.PhysicalNetworkFunctionDescriptor; 20 | import org.springframework.data.repository.CrudRepository; 21 | 22 | /** Created by dbo on 14.09.15. */ 23 | public interface PhysicalNetworkFunctionDescriptorRepository 24 | extends CrudRepository { 25 | // List findByProjectId(String projectId); 26 | } 27 | -------------------------------------------------------------------------------- /repository/src/main/java/org/openbaton/nfvo/repositories/PluginEndpointRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.repositories; 18 | 19 | import org.openbaton.catalogue.nfvo.PluginEndpoint; 20 | import org.springframework.data.repository.CrudRepository; 21 | 22 | /** Created by lto on 30/04/15. */ 23 | public interface PluginEndpointRepository extends CrudRepository { 24 | // List findByProjectId(String projectId); 25 | } 26 | -------------------------------------------------------------------------------- /repository/src/main/java/org/openbaton/nfvo/repositories/ProjectRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.repositories; 18 | 19 | import org.openbaton.catalogue.security.Project; 20 | import org.springframework.data.repository.CrudRepository; 21 | 22 | /** Created by lto on 06/05/15. */ 23 | public interface ProjectRepository extends CrudRepository { 24 | Project findFirstById(String id); 25 | 26 | Project findFirstByName(String name); 27 | } 28 | -------------------------------------------------------------------------------- /repository/src/main/java/org/openbaton/nfvo/repositories/ScriptRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.repositories; 18 | 19 | import org.openbaton.catalogue.nfvo.Script; 20 | import org.springframework.data.repository.CrudRepository; 21 | 22 | /** Created by lto on 21/01/16. */ 23 | public interface ScriptRepository extends CrudRepository {} 24 | -------------------------------------------------------------------------------- /repository/src/main/java/org/openbaton/nfvo/repositories/SecurityRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.repositories; 18 | 19 | import org.openbaton.catalogue.mano.common.Security; 20 | import org.springframework.data.repository.CrudRepository; 21 | 22 | /** Created by lto on 06/05/15. */ 23 | public interface SecurityRepository extends CrudRepository {} 24 | -------------------------------------------------------------------------------- /repository/src/main/java/org/openbaton/nfvo/repositories/ServiceRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.repositories; 18 | 19 | import org.openbaton.catalogue.security.ServiceMetadata; 20 | import org.springframework.data.repository.CrudRepository; 21 | 22 | /** Created by lto on 04/04/2017. */ 23 | public interface ServiceRepository extends CrudRepository { 24 | ServiceMetadata findByName(String name); 25 | 26 | ServiceMetadata findById(String id); 27 | } 28 | -------------------------------------------------------------------------------- /repository/src/main/java/org/openbaton/nfvo/repositories/UserRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.repositories; 18 | 19 | import org.openbaton.catalogue.security.User; 20 | import org.springframework.data.repository.CrudRepository; 21 | 22 | /** Created by gca on 25/09/15. */ 23 | public interface UserRepository extends CrudRepository { 24 | User findFirstByUsername(String username); 25 | 26 | User findFirstById(String id); 27 | } 28 | -------------------------------------------------------------------------------- /repository/src/main/java/org/openbaton/nfvo/repositories/VNFCInstanceRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.repositories; 18 | 19 | import org.openbaton.catalogue.mano.record.VNFCInstance; 20 | import org.springframework.data.repository.CrudRepository; 21 | 22 | /** Created by lto on 22/10/15. */ 23 | public interface VNFCInstanceRepository extends CrudRepository {} 24 | -------------------------------------------------------------------------------- /repository/src/main/java/org/openbaton/nfvo/repositories/VNFCRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.repositories; 18 | 19 | import org.openbaton.catalogue.mano.descriptor.VNFComponent; 20 | import org.springframework.data.repository.CrudRepository; 21 | 22 | public interface VNFCRepository extends CrudRepository { 23 | VNFComponent findFirstById(String id); 24 | } 25 | -------------------------------------------------------------------------------- /repository/src/main/java/org/openbaton/nfvo/repositories/VNFDependencyRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.repositories; 18 | 19 | import org.openbaton.catalogue.mano.descriptor.VNFDependency; 20 | import org.springframework.data.repository.CrudRepository; 21 | 22 | /** Created by lto on 06/05/15. */ 23 | public interface VNFDependencyRepository extends CrudRepository {} 24 | -------------------------------------------------------------------------------- /repository/src/main/java/org/openbaton/nfvo/repositories/VNFFGDescriptorRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.repositories; 18 | 19 | import org.openbaton.catalogue.mano.descriptor.VNFForwardingGraphDescriptor; 20 | import org.springframework.data.repository.CrudRepository; 21 | 22 | /** Created by lto on 06/05/15. */ 23 | public interface VNFFGDescriptorRepository 24 | extends CrudRepository {} 25 | -------------------------------------------------------------------------------- /repository/src/main/java/org/openbaton/nfvo/repositories/VNFPackageMetadataRepositoryCustom.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.repositories; 18 | 19 | import org.openbaton.catalogue.nfvo.VNFPackageMetadata; 20 | 21 | /** Created by mob on 24.05.17. */ 22 | public interface VNFPackageMetadataRepositoryCustom { 23 | 24 | VNFPackageMetadata setVNFPackageId(String vnfPackageId); 25 | } 26 | -------------------------------------------------------------------------------- /repository/src/main/java/org/openbaton/nfvo/repositories/VNFRDependencyRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.repositories; 18 | 19 | import org.openbaton.catalogue.mano.record.VNFRecordDependency; 20 | import org.springframework.data.repository.CrudRepository; 21 | 22 | /** Created by lto on 06/05/15. */ 23 | public interface VNFRDependencyRepository extends CrudRepository { 24 | VNFRecordDependency findFirstById(String id); 25 | } 26 | -------------------------------------------------------------------------------- /repository/src/main/java/org/openbaton/nfvo/repositories/VNFRecordDependencyRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.repositories; 18 | 19 | import org.openbaton.catalogue.mano.record.VNFRecordDependency; 20 | import org.springframework.data.repository.CrudRepository; 21 | 22 | public interface VNFRecordDependencyRepository extends CrudRepository { 23 | VNFRecordDependency findFirstById(String id); 24 | } 25 | -------------------------------------------------------------------------------- /repository/src/main/java/org/openbaton/nfvo/repositories/VduRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.repositories; 18 | 19 | import java.util.List; 20 | import org.openbaton.catalogue.mano.descriptor.VirtualDeploymentUnit; 21 | import org.springframework.data.repository.CrudRepository; 22 | 23 | /** Created by lto on 13/10/15. */ 24 | public interface VduRepository extends CrudRepository { 25 | List findByProjectId(String projectId); 26 | } 27 | -------------------------------------------------------------------------------- /repository/src/main/java/org/openbaton/nfvo/repositories/VimRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.repositories; 18 | 19 | import java.util.List; 20 | import org.openbaton.catalogue.nfvo.viminstances.BaseVimInstance; 21 | import org.springframework.data.repository.CrudRepository; 22 | 23 | public interface VimRepository 24 | extends CrudRepository, VimRepositoryCustom { 25 | BaseVimInstance findFirstById(String id); 26 | 27 | BaseVimInstance findFirstByIdAndProjectId(String id, String projectId); 28 | 29 | List findByProjectId(String projectId); 30 | 31 | BaseVimInstance findByProjectIdAndName(String projectId, String name); 32 | 33 | List findByType(String type); 34 | } 35 | -------------------------------------------------------------------------------- /repository/src/main/java/org/openbaton/nfvo/repositories/VimRepositoryCustom.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.repositories; 18 | 19 | import org.openbaton.catalogue.nfvo.images.BaseNfvImage; 20 | 21 | public interface VimRepositoryCustom { 22 | BaseNfvImage addImage(String id, BaseNfvImage image); 23 | 24 | void deleteImage(String idVim, String idImage); 25 | } 26 | -------------------------------------------------------------------------------- /repository/src/main/java/org/openbaton/nfvo/repositories/VirtualLinkDescriptorRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.repositories; 18 | 19 | import org.openbaton.catalogue.mano.descriptor.VirtualLinkDescriptor; 20 | import org.springframework.data.repository.CrudRepository; 21 | 22 | /** Created by lto on 06/05/15. */ 23 | public interface VirtualLinkDescriptorRepository 24 | extends CrudRepository {} 25 | -------------------------------------------------------------------------------- /repository/src/main/java/org/openbaton/nfvo/repositories/VirtualLinkRecordRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.repositories; 18 | 19 | import java.util.List; 20 | import org.openbaton.catalogue.mano.record.VirtualLinkRecord; 21 | import org.springframework.data.repository.CrudRepository; 22 | 23 | public interface VirtualLinkRecordRepository extends CrudRepository { 24 | List findByExtId(String extId); 25 | } 26 | -------------------------------------------------------------------------------- /repository/src/main/java/org/openbaton/nfvo/repositories/VnfPackageRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.repositories; 18 | 19 | import java.util.List; 20 | import org.openbaton.catalogue.nfvo.VNFPackage; 21 | import org.springframework.data.repository.CrudRepository; 22 | 23 | /** Created by lto on 30/04/15. */ 24 | public interface VnfPackageRepository extends CrudRepository { 25 | 26 | VNFPackage findFirstById(String id); 27 | 28 | VNFPackage findFirstByIdAndProjectId(String id, String projectId); 29 | 30 | List findByProjectId(String id); 31 | } 32 | -------------------------------------------------------------------------------- /repository/src/main/java/org/openbaton/nfvo/repositories/VnfmEndpointRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.repositories; 18 | 19 | import org.openbaton.catalogue.nfvo.VnfmManagerEndpoint; 20 | import org.springframework.data.repository.CrudRepository; 21 | 22 | /** Created by lto on 06/05/15. */ 23 | public interface VnfmEndpointRepository extends CrudRepository { 24 | VnfmManagerEndpoint findFirstById(String id); 25 | } 26 | -------------------------------------------------------------------------------- /screenrc: -------------------------------------------------------------------------------- 1 | # skip the startup message 2 | # startup_message off 3 | 4 | # go to home dir 5 | # chdir 6 | 7 | # Automatically detach on hangup. 8 | # autodetach on 9 | 10 | # Change default scrollback value for new windows 11 | defscrollback 100000 12 | 13 | # start with visual bell as default 14 | # vbell on 15 | # vbell_msg "bell on %t (%n)" 16 | 17 | # look and feel 18 | hardstatus alwayslastline 19 | hardstatus string "%{= KW} %H [%`] %{= Kw}|%{-} %-Lw%{= wB}%n%f %t%{-}%+Lw %=%C%a %Y-%M-%d" 20 | 21 | # activity "Activity in %t(%n)" 22 | 23 | # shelltitle "shell" 24 | # shell -$SHELL 25 | -------------------------------------------------------------------------------- /security/README.md: -------------------------------------------------------------------------------- 1 | # Security 2 | 3 | The Security in Openbaton is based on Outh2 provided by [Spring Security]. 4 | 5 | # How to get a token 6 | >For making any request over the rest API you shoul find a token. The request for retrieving a token is: 7 | 8 | ```sh 9 | curl -v -u openbatonOSClient:secret -X POST http://localhost:8080/oauth/token -H "Accept:application/json" -d "username=admin&password=admin&grant_type=password" 10 | ``` 11 | 12 | >the answer from the orchestrator is: 13 | 14 | ```sh 15 | {"access_token":"d36b4941-5070-406e-a420-9ae7d16b5ddb","token_type":"bearer","refresh_token":"438edd63-190a-4afb-bb00-c0a5aed6a892","expires_in":43199,"scope":"read write"} 16 | ``` 17 | 18 | >Well now you can make a real request to the Rest API: 19 | 20 | ```sh 21 | curl POST -d@vim-instance.json -v -H "Content-type: application/json" -H "Authorization: Bearer d36b4941-5070-406e-a420-9ae7d16b5ddb" localhost:8080/api/v1/datacenters 22 | ``` 23 | 24 | 25 | 26 | ### Version 27 | 5.0.0 28 | 29 | ### Disable Security 30 | 31 | If you won't waste your time making this two calls every new deploy, you can remove the Security commenting the row in the file **settings.gradle** in the main project **nfvo**: 32 | >include 'security' 33 | 34 | and in the module **main** in the file **build.gradle**: 35 | 36 | >runtime project(':security') 37 | 38 | 39 | 40 | [Spring Security]:http://projects.spring.io/spring-security-oauth/ -------------------------------------------------------------------------------- /security/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | dependencies { 18 | compile project(':repository') 19 | compile project(':common') 20 | 21 | compile 'org.springframework.boot:spring-boot-starter-web:' + springBootVersion 22 | compile 'org.springframework.boot:spring-boot-starter-security:'+ springBootVersion 23 | compile 'org.springframework.security.oauth:spring-security-oauth2:2.2.0.RELEASE' 24 | compile 'org.apache.directory.studio:org.apache.commons.lang:2.6' 25 | // This is for enabling spring endpoints (e.g. /health) 26 | runtime 'org.springframework.boot:spring-boot-starter-actuator:'+ springBootVersion 27 | compile 'com.fasterxml.jackson.core:jackson-databind:2.8.7' 28 | compile 'com.google.code.gson:gson:2.8.0' 29 | } 30 | -------------------------------------------------------------------------------- /security/src/main/java/org/openbaton/nfvo/security/authentication/CustomClientDetailsService.java: -------------------------------------------------------------------------------- 1 | package org.openbaton.nfvo.security.authentication; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | import org.springframework.security.oauth2.provider.ClientDetails; 6 | import org.springframework.security.oauth2.provider.ClientDetailsService; 7 | import org.springframework.security.oauth2.provider.ClientRegistrationException; 8 | import org.springframework.security.oauth2.provider.client.BaseClientDetails; 9 | 10 | public class CustomClientDetailsService implements ClientDetailsService { 11 | 12 | private List clientDetailsRepo; 13 | 14 | public CustomClientDetailsService() { 15 | clientDetailsRepo = new ArrayList<>(); 16 | } 17 | 18 | @Override 19 | public ClientDetails loadClientByClientId(String clientId) throws ClientRegistrationException { 20 | for (BaseClientDetails baseClientDetails : clientDetailsRepo) 21 | if (baseClientDetails.getClientId().equals(clientId)) return baseClientDetails; 22 | throw new ClientRegistrationException("Invalid clientId: " + clientId); 23 | } 24 | 25 | public void addclientDetails(BaseClientDetails baseClientDetails) { 26 | clientDetailsRepo.add(baseClientDetails); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | rootProject.projectDir = file('.') 18 | rootProject.name = 'openbaton-nfvo' 19 | 20 | include 'api' 21 | include 'cli' 22 | include 'common' 23 | include 'core-impl', 'core-int' 24 | include 'main' 25 | include 'vim-impl', 'vim-int' 26 | include 'vnfm-int', 'vnfm-impl' 27 | include 'repository' 28 | include 'catalogue' 29 | include 'monitoring' 30 | include 'exception' 31 | include 'vim-drivers' 32 | include 'dashboard' 33 | include 'plugin' 34 | include 'security' 35 | include 'tosca-parser' 36 | include 'registration' 37 | 38 | 39 | project(':core-impl').projectDir = file('core/core-impl') 40 | project(':core-int').projectDir = file('core/core-int') 41 | 42 | project(':vnfm-impl').projectDir = file('vnfm/vnfm-impl') 43 | project(':vnfm-int').projectDir = file('vnfm/vnfm-int') 44 | 45 | -------------------------------------------------------------------------------- /tosca-parser/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | dependencies { 18 | compile project(':catalogue') 19 | compile project(':repository') 20 | compile project(':core-int') 21 | compile project(':repository') 22 | compile project(":core-impl") 23 | 24 | compile 'org.yaml:snakeyaml:1.19' 25 | compile 'com.google.code.gson:gson:2.8.0' 26 | compile 'commons-io:commons-io:2.5' 27 | compile 'org.springframework.boot:spring-boot-starter-amqp' 28 | 29 | testCompile 'org.mockito:mockito-all:2.0.2-beta' 30 | testCompile 'junit:junit:' + junitVersion 31 | testCompile 'org.springframework.boot:spring-boot-starter-test:'+ springBootVersion 32 | } 33 | -------------------------------------------------------------------------------- /tosca-parser/src/main/java/org/openbaton/tosca/exceptions/NotFoundException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.tosca.exceptions; 18 | 19 | /** Created by dbo on 01/02/16. */ 20 | public class NotFoundException extends Exception { 21 | public NotFoundException(String exc) { 22 | super(exc); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /tosca-parser/src/main/java/org/openbaton/tosca/templates/TOSCAMetadata.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.tosca.templates; 18 | 19 | /** Created by rvl on 17.08.16. */ 20 | public class TOSCAMetadata { 21 | 22 | private String ID; 23 | private String vendor; 24 | private String version; 25 | 26 | public String getID() { 27 | return ID; 28 | } 29 | 30 | public void setID(String ID) { 31 | this.ID = ID; 32 | } 33 | 34 | public String getVendor() { 35 | return vendor; 36 | } 37 | 38 | public void setVendor(String vendor) { 39 | this.vendor = vendor; 40 | } 41 | 42 | public String getVersion() { 43 | return version; 44 | } 45 | 46 | public void setVersion(String version) { 47 | this.version = version; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /tosca-parser/src/main/resources/types.yaml: -------------------------------------------------------------------------------- 1 | ################################################################################## 2 | # 3 | # Here we define all of the high level types 4 | # 5 | ################################################################################## 6 | 7 | node_types: 8 | 9 | 10 | openbaton.type.VNF: 11 | properties: 12 | vendor: 13 | type: string 14 | version: 15 | type: string 16 | endpoint: 17 | type: string 18 | vnfPackageLocation: 19 | type: string 20 | type: 21 | type: string 22 | deploymentFlavour: 23 | type: list 24 | configurations: 25 | type: {} 26 | requirements: 27 | type: list 28 | interfaces: 29 | type: {} 30 | 31 | 32 | tosca.nodes.nfv.VDU: 33 | properties: 34 | scale_in_out: 35 | type: int 36 | vim_instance_name: 37 | type: list 38 | artifacts: 39 | type: {} 40 | 41 | tosca.nodes.nfv.CP: 42 | properties: 43 | floatingIP: 44 | type: string 45 | requirements: 46 | type: list 47 | 48 | tosca.nodes.nfv.VL: 49 | properties: 50 | vendor: 51 | type: string 52 | 53 | 54 | tosca.nodes.relationships.ConnectsTo: 55 | source: 56 | type: string 57 | target: 58 | type: string 59 | parameters: 60 | type: list 61 | -------------------------------------------------------------------------------- /vim-drivers/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | buildscript { 17 | repositories { 18 | //mavenLocal() 19 | mavenCentral() 20 | jcenter() 21 | } 22 | dependencies { 23 | classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1' 24 | } 25 | } 26 | 27 | apply plugin: 'com.bmuschko.nexus' 28 | apply from: '../gradle/gradle/nexus.upload.plugin.gradle' 29 | 30 | dependencies { 31 | compile project(':catalogue') 32 | compile project(':plugin') 33 | 34 | compile 'org.slf4j:slf4j-api:1.7.22' 35 | } 36 | -------------------------------------------------------------------------------- /vim-drivers/src/main/java/org/openbaton/vim/drivers/interfaces/VimDriver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.vim.drivers.interfaces; 18 | 19 | import org.openbaton.plugin.interfaces.Plugin; 20 | 21 | /** Created by lto on 15/10/15. */ 22 | public abstract class VimDriver extends Plugin implements ClientInterfaces { 23 | 24 | protected VimDriver() { 25 | loadProperties(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /vim-impl/src/test/java/org/openbaton/vim_impl/vim/test/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.vim_impl.vim.test; 18 | 19 | import org.openbaton.vim.drivers.VimDriverCaller; 20 | import org.openbaton.vim_impl.vim.broker.VimBroker; 21 | import org.powermock.api.mockito.PowerMockito; 22 | import org.springframework.context.annotation.Bean; 23 | import org.springframework.context.annotation.ComponentScan; 24 | import org.springframework.context.annotation.Configuration; 25 | 26 | /** Created by lto on 30/04/15. */ 27 | @Configuration 28 | @ComponentScan( 29 | basePackages = {"org.openbaton.vim_impl"}, 30 | basePackageClasses = VimBroker.class) 31 | public class ApplicationTest { 32 | 33 | @Bean 34 | VimDriverCaller vimDriverCaller() { 35 | return PowerMockito.mock(VimDriverCaller.class); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /vim-int/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | buildscript { 17 | repositories { 18 | //mavenLocal() 19 | mavenCentral() 20 | jcenter() 21 | } 22 | dependencies { 23 | classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1' 24 | } 25 | } 26 | 27 | apply plugin: 'com.bmuschko.nexus' 28 | apply from: '../gradle/gradle/nexus.upload.plugin.gradle' 29 | 30 | dependencies { 31 | compile project(':plugin') 32 | compile project(':catalogue') 33 | 34 | compile project(':exception') 35 | compile project(':monitoring') 36 | compile project(':vim-drivers') 37 | 38 | testCompile 'junit:junit:' + junitVersion 39 | } -------------------------------------------------------------------------------- /vim-int/src/main/java/org/openbaton/nfvo/vim_interfaces/monitoring/MonitoringBroker.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.vim_interfaces.monitoring; 18 | 19 | import org.openbaton.monitoring.interfaces.VirtualisedResourcesPerformanceManagement; 20 | 21 | /** Created by lto on 05/08/15. */ 22 | public interface MonitoringBroker { 23 | void addAgent( 24 | VirtualisedResourcesPerformanceManagement virtualisedResourcesPerformanceManagement, 25 | String type); 26 | 27 | VirtualisedResourcesPerformanceManagement getAvailableMonitoringAgent(); 28 | } 29 | -------------------------------------------------------------------------------- /vim-int/src/main/java/org/openbaton/nfvo/vim_interfaces/network_management/NetworkForwardingPathManagement.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.vim_interfaces.network_management; 18 | 19 | import org.openbaton.catalogue.mano.descriptor.NetworkForwardingPath; 20 | 21 | public interface NetworkForwardingPathManagement { 22 | 23 | /** 24 | * This operation allows creating a Network Forwarding Path. 25 | * 26 | * @return the {@link NetworkForwardingPath} created 27 | */ 28 | NetworkForwardingPath create(); 29 | 30 | /** 31 | * This operation allows updating the information associated with a Network Forwarding Path. 32 | * 33 | * @return the {@link NetworkForwardingPath} updated 34 | */ 35 | NetworkForwardingPath update(); 36 | 37 | void delete(); 38 | 39 | NetworkForwardingPath query(); 40 | 41 | void notifyInformation(); 42 | } 43 | -------------------------------------------------------------------------------- /vim-int/src/main/java/org/openbaton/nfvo/vim_interfaces/resource_management/ResourceCapacityManagement.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.vim_interfaces.resource_management; 18 | 19 | /** Created by mpa on 30/04/15. */ 20 | public interface ResourceCapacityManagement { 21 | 22 | /** 23 | * This operation allows querying the capacity usage of an NFVI-PoP. The operation can be used to 24 | * gather information at different levels, from specific virtualised partition capacity usage, to 25 | * total capacity availability in the NFVI-PoP. 26 | * 27 | * @param pop the PoP to query 28 | * @return the capacity information queried 29 | */ 30 | String query(String pop); 31 | 32 | /** 33 | * This operation allows notifying about capacity changes in the NFVI-PoP. 34 | * 35 | * @param notification the notification to fire 36 | */ 37 | void notifyChanges(String notification); 38 | } 39 | -------------------------------------------------------------------------------- /vim-int/src/main/java/org/openbaton/nfvo/vim_interfaces/resource_management/ResourceCatalogueMangement.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.vim_interfaces.resource_management; 18 | 19 | /** Created by mpa on 30/04/15. */ 20 | public interface ResourceCatalogueMangement { 21 | 22 | /** 23 | * This operation allows retrieving the list of catalogued virtualised resources, and/or a 24 | * specific catalogued resource on which the consumer is allowed to perform subsequent operations. 25 | */ 26 | void query(); 27 | 28 | /** 29 | * This operation provides change notifications on virtualised resources catalogues managed by the 30 | * producer functional block. 31 | */ 32 | void notifyChange(); 33 | } 34 | -------------------------------------------------------------------------------- /vnfm/vnfm-impl/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | dependencies { 18 | compile project(':catalogue') 19 | 20 | compile project(':common') 21 | compile project(':exception') 22 | compile project(':repository') 23 | compile project(':core-int') 24 | compile project(':vnfm-int') 25 | 26 | compile 'org.springframework.boot:spring-boot-starter-amqp:' + springBootVersion 27 | compile 'org.springframework.boot:spring-boot-starter-web:' + springBootVersion 28 | 29 | compile 'com.google.code.gson:gson:2.8.0' 30 | 31 | compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.8.7' 32 | 33 | } 34 | -------------------------------------------------------------------------------- /vnfm/vnfm-impl/src/main/java/org/openbaton/nfvo/vnfm_reg/tasks/TaskExceptionHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.nfvo.vnfm_reg.tasks; 18 | 19 | /** Created by lto on 12/04/16. */ 20 | import java.lang.reflect.Method; 21 | import org.slf4j.Logger; 22 | import org.slf4j.LoggerFactory; 23 | import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler; 24 | 25 | public class TaskExceptionHandler implements AsyncUncaughtExceptionHandler { 26 | 27 | private Logger log = LoggerFactory.getLogger(this.getClass()); 28 | 29 | @Override 30 | public void handleUncaughtException(Throwable ex, Method method, Object... params) { 31 | log.error("Method Name::" + method.getName()); 32 | log.error("Exception occurred::" + ex); 33 | ex.printStackTrace(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /vnfm/vnfm-int/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | dependencies { 18 | compile project(':catalogue') 19 | compile project(':exception') 20 | compile project(':common') 21 | 22 | compile 'org.springframework.boot:spring-boot-starter-amqp:' + springBootVersion 23 | 24 | testCompile 'junit:junit:'+junitVersion 25 | } -------------------------------------------------------------------------------- /vnfm/vnfm-int/src/main/java/org/openbaton/vnfm/interfaces/manager/VnfmReceiver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.vnfm.interfaces.manager; 18 | 19 | import java.util.concurrent.ExecutionException; 20 | 21 | public interface VnfmReceiver { 22 | 23 | String actionFinished(String nfvMessage) throws ExecutionException, InterruptedException; 24 | 25 | void actionFinishedVoid(String nfvMessage) throws ExecutionException, InterruptedException; 26 | } 27 | -------------------------------------------------------------------------------- /vnfm/vnfm-int/src/main/java/org/openbaton/vnfm/interfaces/register/VnfmRegister.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.vnfm.interfaces.register; 18 | 19 | import org.openbaton.catalogue.nfvo.VnfmManagerEndpoint; 20 | import org.openbaton.exceptions.AlreadyExistingException; 21 | import org.openbaton.exceptions.NotFoundException; 22 | 23 | /** Created by lto on 26/05/15. */ 24 | public interface VnfmRegister { 25 | 26 | Iterable listVnfm(); 27 | 28 | void addManagerEndpoint(String endpoint); 29 | 30 | VnfmManagerEndpoint getVnfm(String type) throws NotFoundException; 31 | 32 | void register(VnfmManagerEndpoint vnfmManagerEndpoint) throws AlreadyExistingException; 33 | 34 | void unregister(VnfmManagerEndpoint endpoint); 35 | } 36 | -------------------------------------------------------------------------------- /vnfm/vnfm-int/src/main/java/org/openbaton/vnfm/interfaces/sender/VnfmSender.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.vnfm.interfaces.sender; 18 | 19 | import java.util.concurrent.Future; 20 | import org.openbaton.catalogue.nfvo.Endpoint; 21 | import org.openbaton.catalogue.nfvo.messages.Interfaces.NFVMessage; 22 | import org.openbaton.exceptions.BadFormatException; 23 | 24 | /** Created by lto on 03/06/15. */ 25 | public interface VnfmSender { 26 | Future sendCommand(final NFVMessage nfvMessage, Endpoint endpoint) 27 | throws BadFormatException; 28 | } 29 | -------------------------------------------------------------------------------- /vnfm/vnfm-int/src/main/java/org/openbaton/vnfm/interfaces/tasks/AbstractTask.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2018 Open Baton (http://openbaton.org) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.openbaton.vnfm.interfaces.tasks; 18 | 19 | import java.util.concurrent.Callable; 20 | import org.openbaton.catalogue.mano.record.VirtualNetworkFunctionRecord; 21 | import org.openbaton.catalogue.nfvo.Action; 22 | import org.openbaton.catalogue.nfvo.messages.Interfaces.NFVMessage; 23 | import org.springframework.context.ApplicationEventPublisherAware; 24 | 25 | /** Created by lto on 29.05.17. */ 26 | public interface AbstractTask extends Callable, ApplicationEventPublisherAware { 27 | Action getAction(); 28 | 29 | void setAction(Action action); 30 | 31 | VirtualNetworkFunctionRecord getVirtualNetworkFunctionRecord(); 32 | 33 | void setVirtualNetworkFunctionRecord(VirtualNetworkFunctionRecord virtualNetworkFunctionRecord); 34 | } 35 | --------------------------------------------------------------------------------