aboutsummaryrefslogtreecommitdiffstats
path: root/adapters
diff options
context:
space:
mode:
Diffstat (limited to 'adapters')
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-adapter-application/Readme.txt132
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-adapter-application/pom.xml86
-rwxr-xr-xadapters/etsi-sol003-adapter/etsi-sol003-adapter-application/src/main/java/org/onap/so/adapters/etsisol003adapter/Application.java57
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-adapter-application/src/main/java/org/onap/so/adapters/etsisol003adapter/EtsiSol003AdapterBasicHttpSecurityConfigurer.java63
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-adapter-application/src/main/resources/application-aaf.yaml0
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-adapter-application/src/main/resources/application-basic.yaml0
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-adapter-application/src/main/resources/application.yaml63
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-adapter-application/src/main/resources/org.onap.so.trust.jksbin3202 -> 0 bytes
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-adapter-application/src/main/resources/so-vnfm-adapter.p12bin5834 -> 0 bytes
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-adapter-common/pom.xml24
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-adapter-common/src/main/java/org/onap/so/adapters/etsi/sol003/adapter/common/CommonConstants.java47
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-adapter-common/src/main/java/org/onap/so/adapters/etsi/sol003/adapter/common/VnfmAdapterUrlProvider.java105
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-adapter-common/src/main/java/org/onap/so/adapters/etsi/sol003/adapter/common/configuration/AbstractServiceProviderConfiguration.java50
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-adapter-common/src/main/java/org/onap/so/adapters/etsi/sol003/adapter/common/configuration/MessageConverterConfiguration.java49
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-adapter-common/src/main/java/org/onap/so/adapters/etsi/sol003/adapter/oauth/configuration/AuthorizationServerConfig.java55
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-adapter-common/src/main/java/org/onap/so/adapters/etsi/sol003/adapter/oauth/configuration/OAuth2AccessTokenAdapter.java51
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-adapter-common/src/main/java/org/onap/so/adapters/etsi/sol003/adapter/oauth/configuration/OAuth2ResourceServer.java53
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/pom.xml114
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/LifeCycleManagementConstants.java33
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/NvfmAdapterUtils.java68
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/EtsiPackageProvider.java164
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/aai/AaiClientProvider.java34
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/aai/AaiHelper.java217
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/aai/AaiPropertiesImpl.java75
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/aai/AaiServiceProvider.java148
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/aai/AaiServiceProviderImpl.java164
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/aai/OamIpAddressSource.java57
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/vim/model/AccessInfo.java107
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/vim/model/InterfaceInfo.java74
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/vim/model/VimCredentials.java85
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/vnfm/VnfmHelper.java228
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/vnfm/VnfmRestTemplateConfiguration.java56
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/vnfm/VnfmServiceProvider.java104
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/vnfm/VnfmServiceProviderConfiguration.java160
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/vnfm/VnfmServiceProviderImpl.java203
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/vnfm/VnfmUrlProvider.java95
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/jobmanagement/JobManager.java174
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/jobmanagement/VnfmOperation.java122
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/lifecycle/LifecycleManager.java276
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/notificationhandling/NotificationHandler.java276
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/EtsiSol003AdapterController.java163
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/Sol003GrantController.java114
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/Sol003LcnContoller.java131
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/exceptions/JobNotFoundException.java38
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/exceptions/TenantNotFoundException.java35
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/exceptions/VnfNotFoundException.java38
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/exceptions/VnfmNotFoundException.java38
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/exceptions/VnfmRequestFailureException.java38
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/resources/META-INF/services/org.onap.so.client.RestProperties1
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/EtsiSol003AdapterControllerTest.java563
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/HealthCheckTest.java54
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/Sol003GrantControllerTest.java252
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/Sol003LcnControllerTest.java414
-rwxr-xr-xadapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/TestApplication.java38
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/test/resources/application.yaml61
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-api/pom.xml221
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-api/src/main/resources/SOL003-VNFLifecycleManagementNotification-API.json1897
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-api/src/main/resources/SOL003-VNFLifecycleOperationGranting-API.json2774
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-api/src/main/resources/etsisol003adapter.yaml525
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-ext-clients/pom.xml173
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-ext-clients/src/main/resources/SOL003-VNFLifecycleManagement-API.json8143
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/pom.xml17
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/pom.xml109
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/ConversionServiceConfiguration.java55
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/PackageManagementConstants.java39
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/cache/AbstractCacheServiceProvider.java47
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/cache/CacheManagerConfiguration.java50
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/cache/CacheNotFoundException.java37
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/cache/PkgmCacheServiceProvider.java74
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/cache/PkgmCacheServiceProviderImpl.java118
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/converters/etsicatalog/sol003/AbstractPkgNotificationConverter.java63
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/converters/etsicatalog/sol003/PkgChangeNotificationConverter.java85
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/converters/etsicatalog/sol003/PkgOnboardingNotificationConverter.java76
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/converters/etsicatalog/sol003/VnfPkgInfoConverter.java198
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/converters/sol003/etsicatalog/PkgmSubscriptionRequestConverter.java198
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/extclients/etsicatalog/EtsiCatalogPackageManagementServiceProvider.java72
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/extclients/etsicatalog/EtsiCatalogServiceProvider.java32
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/extclients/etsicatalog/EtsiCatalogServiceProviderConfiguration.java176
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/extclients/etsicatalog/EtsiCatalogServiceProviderImpl.java281
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/extclients/etsicatalog/EtsiCatalogSubscriptionServiceProvider.java55
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/extclients/etsicatalog/EtsiCatalogUrlProvider.java113
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/extclients/vnfm/VnfmHttpServiceProviderConfiguration.java64
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/EtsiSubscriptionNotificationController.java166
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/Sol003PackageManagementController.java176
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/Sol003PackageManagementSubscriptionController.java172
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/AuthenticationTypeNotSupportedException.java44
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/ConversionFailedException.java44
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/EtsiCatalogManagerBadRequestException.java43
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/EtsiCatalogManagerRequestFailureException.java47
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/EtsiSubscriptionNotificationControllerExceptionHandler.java112
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/InternalServerErrorException.java43
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/NotificationTypeNotSupportedException.java44
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/Sol003PackageManagementControllerExceptionHandler.java94
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/SubscriptionNotFoundException.java43
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/VnfPkgBadRequestException.java43
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/VnfPkgConflictException.java43
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/VnfPkgNotFoundException.java43
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/subscriptionmgmt/AbstractNotificationServiceProvider.java59
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/subscriptionmgmt/BasicAuthNotificationServiceProvider.java68
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/subscriptionmgmt/NotificationManager.java137
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/subscriptionmgmt/NotificationServiceProvider.java51
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/subscriptionmgmt/NotificationServiceProviderFactory.java67
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/subscriptionmgmt/OAuthNotificationServiceProvider.java104
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/subscriptionmgmt/OAuthTokenResponse.java56
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/subscriptionmgmt/SubscriptionManager.java209
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/subscriptionmgmt/TlsNotificationServiceProvider.java57
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/EtsiSubscriptionNotificationControllerTest.java591
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/Sol003PackageManagementControllerTest.java677
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/Sol003PackageManagementSubscriptionControllerTest.java403
-rwxr-xr-xadapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/TestApplication.java38
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/test/resources/application.yaml61
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/test/resources/requests/SubscriptionRequest.json45
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-api/pom.xml191
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-api/src/main/resources/ETSI-Catalog-Notification-API.json279
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-api/src/main/resources/SOL003-VNFPackageManagement-API.json7352
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-ext-clients/pom.xml192
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-ext-clients/src/main/resources/ETSI-Catalog-API.json3121
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-ext-clients/src/main/resources/SOL003-VNFPackageManagement-Notification-API.json1778
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-pkgm/pom.xml17
-rw-r--r--adapters/etsi-sol003-adapter/pom.xml35
-rw-r--r--adapters/mso-adapter-utils/pom.xml4
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java2
-rw-r--r--adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsTest.java1
-rw-r--r--adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsWithUpdateTest.java3
-rw-r--r--adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoMulticloudUtilsTest.java6
-rw-r--r--adapters/mso-adapters-rest-interface/pom.xml2
-rw-r--r--adapters/mso-catalog-db-adapter/pom.xml4
-rw-r--r--adapters/mso-catalog-db-adapter/src/main/java/db/migration/R__CloudConfigMigration.java33
-rw-r--r--adapters/mso-cnf-adapter/pom.xml153
-rw-r--r--adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/MSOCnfApplication.java52
-rw-r--r--adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/WebSecurityConfig.java35
-rw-r--r--adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/exceptions/ApplicationException.java66
-rw-r--r--adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/BpmnInstanceRequest.java87
-rw-r--r--adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/Config.java31
-rw-r--r--adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/ConfigTemplateEntity.java42
-rw-r--r--adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/ConfigurationEntity.java54
-rw-r--r--adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/ConfigurationRollbackEntity.java22
-rw-r--r--adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/ConnectivityInfo.java53
-rw-r--r--adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/ConnectivityRecords.java23
-rw-r--r--adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/ErrorResponse.java63
-rw-r--r--adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/GroupVersionKind.java66
-rw-r--r--adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/InstanceMiniResponse.java62
-rw-r--r--adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/InstanceMiniResponseList.java45
-rw-r--r--adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/InstanceResponse.java99
-rw-r--r--adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/InstanceStatusResponse.java84
-rw-r--r--adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/MulticloudInstanceRequest.java87
-rw-r--r--adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/OtherConnectivityListEntity.java23
-rw-r--r--adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/PodStatus.java71
-rw-r--r--adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/ProfileEntity.java74
-rw-r--r--adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/Resource.java54
-rw-r--r--adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/ResourceBundleEntity.java65
-rw-r--r--adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/Response.java39
-rw-r--r--adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/Tag.java20
-rw-r--r--adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/rest/CnfAdapterRest.java677
-rw-r--r--adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/service/CnfAdapterService.java251
-rw-r--r--adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/util/CNfAdapterUtil.java94
-rw-r--r--adapters/mso-cnf-adapter/src/main/resources/META-INF/services/org.onap.so.client.RestProperties1
-rw-r--r--adapters/mso-cnf-adapter/src/main/resources/application.yaml61
-rw-r--r--adapters/mso-cnf-adapter/src/test/java/org/onap/so/adapters/cnf/CnfAdapterRestTest.java63
-rw-r--r--adapters/mso-cnf-adapter/src/test/java/org/onap/so/adapters/cnf/rest/CnfAdapterRestTest.java106
-rw-r--r--adapters/mso-cnf-adapter/src/test/java/org/onap/so/adapters/cnf/service/CnfAdapterServiceTest.java104
-rw-r--r--adapters/mso-nssmf-adapter/pom.xml164
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/MSONssmfApplication.java33
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/annotation/RequestLogger.java31
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/annotation/ServiceLogger.java36
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/config/NssmfAdapterConfig.java36
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/config/RequestDbConfig.java68
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/consts/NssmfAdapterConsts.java186
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/controller/NssmfAdapterController.java59
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/entity/ErrorResponse.java63
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/entity/NssmfInfo.java41
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/entity/NssmfUrlInfo.java17
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/entity/RestResponse.java92
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/entity/TokenRequest.java33
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/entity/TokenResponse.java32
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/enums/ActionType.java67
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/enums/ExecutorType.java25
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/enums/HttpMethod.java41
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/enums/JobStatus.java42
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/enums/SelectionType.java27
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/exceptions/ApplicationException.java66
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/extclients/aai/AaiClientPropertiesImpl.java69
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/extclients/aai/AaiClientProvider.java34
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/extclients/aai/AaiServiceProvider.java42
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/extclients/aai/AaiServiceProviderImpl.java106
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/interceptor/LoggerInterceptor.java55
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/interceptor/RequestLogAspect.java227
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/NssmfManager.java44
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/NssmfManagerBuilder.java131
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/BaseNssmfManager.java282
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/ExternalNssmfManager.java243
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/InternalNssmfManager.java130
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/external/ExternalAnNssmfManager.java175
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/external/ExternalCnNssmfManager.java73
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/external/RanSliceProfile.java70
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/internal/InternalAnNssmfManager.java54
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/internal/InternalCnNssmfManager.java56
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/internal/InternalTnNssmfManager.java42
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/rest/NssmfAdapterRest.java145
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/rest/NssmfManager.java549
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/rest/TrustAllHostNameVerifier.java33
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/service/NssmfManagerService.java45
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/service/impl/NssmfManagerServiceImpl.java143
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/util/NssmfAdapterUtil.java123
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/util/RestUtil.java358
-rw-r--r--adapters/mso-nssmf-adapter/src/main/resources/META-INF/services/org.onap.so.client.RestProperties1
-rw-r--r--adapters/mso-nssmf-adapter/src/main/resources/application-aaf.yaml0
-rw-r--r--adapters/mso-nssmf-adapter/src/main/resources/application-basic.yaml0
-rw-r--r--adapters/mso-nssmf-adapter/src/main/resources/application-test.yaml60
-rw-r--r--adapters/mso-nssmf-adapter/src/main/resources/application.yaml77
-rw-r--r--adapters/mso-nssmf-adapter/src/main/resources/org.onap.so.p12bin4095 -> 0 bytes
-rw-r--r--adapters/mso-nssmf-adapter/src/main/resources/org.onap.so.trust.jksbin1413 -> 0 bytes
-rw-r--r--adapters/mso-nssmf-adapter/src/main/resources/subnetCapability.json10
-rw-r--r--adapters/mso-nssmf-adapter/src/test/java/org/onap/so/adapters/nssmf/NssmfAdapterRestTest.java400
-rw-r--r--adapters/mso-nssmf-adapter/src/test/java/org/onap/so/adapters/nssmf/service/impl/NssmfManagerServiceImplTest.java442
-rw-r--r--adapters/mso-nssmf-adapter/src/test/resources/application-test.yaml60
-rw-r--r--adapters/mso-oof-adapter/.gitignore33
-rw-r--r--adapters/mso-oof-adapter/pom.xml118
-rw-r--r--adapters/mso-oof-adapter/src/main/java/org/onap/so/adapters/oof/MsoOofAdapterApplication.java32
-rw-r--r--adapters/mso-oof-adapter/src/main/java/org/onap/so/adapters/oof/OofAdapterClientConfig.java76
-rw-r--r--adapters/mso-oof-adapter/src/main/java/org/onap/so/adapters/oof/WebSecurityConfig.java37
-rw-r--r--adapters/mso-oof-adapter/src/main/java/org/onap/so/adapters/oof/constants/Constants.java31
-rw-r--r--adapters/mso-oof-adapter/src/main/java/org/onap/so/adapters/oof/exceptions/OofAdapterException.java39
-rw-r--r--adapters/mso-oof-adapter/src/main/java/org/onap/so/adapters/oof/model/OofRequest.java52
-rw-r--r--adapters/mso-oof-adapter/src/main/java/org/onap/so/adapters/oof/rest/OofCallbackHandler.java71
-rw-r--r--adapters/mso-oof-adapter/src/main/java/org/onap/so/adapters/oof/rest/OofClient.java67
-rw-r--r--adapters/mso-oof-adapter/src/main/java/org/onap/so/adapters/oof/utils/OofUtils.java110
-rw-r--r--adapters/mso-oof-adapter/src/test/java/org/onap/so/adapters/oof/rest/OofCallbackHandlerTest.java85
-rw-r--r--adapters/mso-oof-adapter/src/test/java/org/onap/so/adapters/oof/rest/OofClientTest.java86
-rw-r--r--adapters/mso-oof-adapter/src/test/java/org/onap/so/adapters/oof/utils/OofUtilsTest.java76
-rw-r--r--adapters/mso-oof-adapter/src/test/resources/testInputs/NsiSelectionOofRequest.json84
-rw-r--r--adapters/mso-oof-adapter/src/test/resources/testInputs/NsiSelectionResponse.json20
-rw-r--r--adapters/mso-openstack-adapters/pom.xml44
-rw-r--r--adapters/mso-requests-db-adapter/pom.xml20
-rw-r--r--adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java4
-rw-r--r--adapters/mso-sdnc-adapter/pom.xml37
-rw-r--r--adapters/mso-sdnc-adapter/src/test/resources/application-test.properties13
-rw-r--r--adapters/mso-vfc-adapter/.springBeans16
-rw-r--r--adapters/mso-vfc-adapter/README1
-rw-r--r--adapters/mso-vfc-adapter/pom.xml113
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/CXFConfiguration.java84
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/MSOVfcApplication.java37
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/RequestDBConfig.java69
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/constant/CommonConstant.java157
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/constant/DriverExceptionID.java62
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/constant/HttpCode.java92
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/exceptions/ApplicationException.java75
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/AddPnfData.java68
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/AddressRange.java33
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/AffectedNs.java40
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/AffectedPnf.java67
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/AffectedSap.java49
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/AffectedVirtualLink.java49
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/AffectedVnf.java78
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/AffectedVnffg.java40
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/AffinityOrAntiAffinityRule.java51
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ChangedInfo.java33
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/CivicAddressElement.java33
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/CpProtocolData.java33
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/CpProtocolInfo.java31
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/CreateNsRequest.java53
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/CustomerModel.java69
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ExtCpInfo.java27
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ExtLinkPortInfo.java33
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ExtManagedVirtualLinkInfo.java57
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ExtVirtualLinkInfo.java42
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/InstantiateNsRequest.java207
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/InstantiatedVnfInfo.java116
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/IpAddresses.java63
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/IpOverEthernetAddressData.java35
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/Link.java24
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/Links.java78
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/LocationConstraint.java73
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/LocationConstraints.java33
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/Mask.java47
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ModifyVnfInfoData.java80
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NSResourceInputParameter.java154
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NfpInfo.java89
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NfpRule.java108
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsCpHandle.java69
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsCreateReq.java102
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsInstance.java166
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsInstanceLinks.java82
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsInstantiateReq.java50
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsLcmOpOcc.java125
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsLinkPortInfo.java46
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsOperationKey.java140
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsParameters.java70
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsProgressStatus.java84
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsScaleInfo.java37
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsScaleParameters.java66
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsScaleReq.java49
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsVirtualLinkInfo.java57
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ParamsForVnf.java35
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/PnfExtCpData.java44
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/PnfExtCpInfo.java48
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/PnfInfo.java74
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/PortRange.java37
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ProblemDetails.java62
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ResourceChanges.java71
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ResourceHandle.java51
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ResponseDescriptor.java114
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/RestfulResponse.java100
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/SapData.java56
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/SapInfo.java68
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ScaleNsByStepsData.java88
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ScaleNsData.java48
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/VFCScaleData.java84
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/VimLocation.java51
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/VnfInstance.java156
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/VnfInstanceData.java33
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/VnfLinkPortInfo.java46
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/VnfLocationConstraint.java33
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/VnfScaleInfo.java38
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/VnfVirtualLinkResourceInfo.java76
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/VnfcCpInfo.java65
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/VnfcResourceInfo.java85
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/VnffgInfo.java87
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/rest/AaiUtil.java47
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/rest/HealthCheckHandler.java58
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/rest/VfcAdapterRest.java265
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/rest/VfcManager.java492
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/rest/VfcManagerSol005.java620
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/JsonUtil.java137
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/RestfulUtil.java393
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/ValidateUtil.java86
-rw-r--r--adapters/mso-vfc-adapter/src/main/resources/application-aaf.yaml0
-rw-r--r--adapters/mso-vfc-adapter/src/main/resources/application-basic.yaml0
-rw-r--r--adapters/mso-vfc-adapter/src/main/resources/application.yaml37
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/exceptions/ApplicationExceptionTest.java36
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/AddPnfDataTest.java189
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/AddressRangeTest.java39
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/AffectedNsTest.java40
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/AffectedPnfTest.java69
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/AffectedSapTest.java49
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/AffectedVirtualLinkTest.java49
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/AffectedVnfTest.java69
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/AffectedVnffgTest.java39
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/AffinityOrAntiAffinityRuleTest.java283
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/ChangedInfoTest.java39
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/CivicAddressElementTest.java39
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/CpProtocolDataTest.java39
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/CreateNsRequestTest.java49
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/CustomerModelTest.java49
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/ExtLinkPortInfoTest.java40
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/ExtVirtualLinkInfoTest.java49
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/InstantiateNsRequestTest.java413
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/IpAddressesTest.java188
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/IpOverEthernetAddressDataTest.java158
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/LinkTest.java29
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/LinksTest.java89
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/LocationConstraintTest.java49
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/LocationConstraintsTest.java40
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/ModifyVnfInfoDataTest.java90
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/NSResourceInputParameterTest.java69
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/NsCreateReqTest.java69
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/NsInstantiateReqTest.java39
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/NsLcmOpOccTest.java142
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/NsOperationKeyTest.java79
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/NsParametersTest.java51
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/NsProgressStatusTest.java60
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/ParamsForVnfTest.java41
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/PnfExtCpDataTest.java168
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/ProblemDetailsTest.java69
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/ResourceChangesTest.java773
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/ResourceHandleTest.java59
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/ResponseDescriptorTest.java79
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/RestfulResponseTest.java75
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/SapDataTest.java179
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/VimLocationTest.java39
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/VnfInstanceDataTest.java39
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/VnfLocationConstraintTest.java39
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/rest/EmbeddedMariaDbConfig.java86
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/rest/HealthCheckHandlerTest.java67
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/rest/VfcManagerSol005Test.java221
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/rest/VfcManagerTest.java156
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/util/RestfulUtilTest.java164
-rw-r--r--adapters/mso-vfc-adapter/src/test/resources/application-test.yaml64
-rw-r--r--adapters/mso-vfc-adapter/src/test/resources/json/LICENSE.txt19
-rw-r--r--adapters/mso-vfc-adapter/src/test/resources/json/aainfvoResponse.json10
-rw-r--r--adapters/mso-vfc-adapter/src/test/resources/json/createNsReq.json56
-rw-r--r--adapters/mso-vfc-adapter/src/test/resources/json/createNsRsp.json3
-rw-r--r--adapters/mso-vfc-adapter/src/test/resources/json/createNsSol005Response.json210
-rw-r--r--adapters/mso-vfc-adapter/src/test/resources/json/deleteNsReq.json7
-rw-r--r--adapters/mso-vfc-adapter/src/test/resources/json/instantiateNsReq.json32
-rw-r--r--adapters/mso-vfc-adapter/src/test/resources/json/instantiateNsRsp.json3
-rw-r--r--adapters/mso-vfc-adapter/src/test/resources/json/lcmOperRsp.json7
-rw-r--r--adapters/mso-vfc-adapter/src/test/resources/json/queryJobReq.json7
-rw-r--r--adapters/mso-vfc-adapter/src/test/resources/json/queryJobRsp.json10
-rw-r--r--adapters/mso-vfc-adapter/src/test/resources/json/terminateNsReq.json7
-rw-r--r--adapters/mso-vfc-adapter/src/test/resources/json/terminateNsRsp.json3
-rw-r--r--adapters/mso-vfc-adapter/src/test/resources/logback-test.xml42
-rw-r--r--adapters/pom.xml7
-rw-r--r--adapters/so-appc-orchestrator/pom.xml25
394 files changed, 62 insertions, 60801 deletions
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-adapter-application/Readme.txt b/adapters/etsi-sol003-adapter/etsi-sol003-adapter-application/Readme.txt
deleted file mode 100644
index aaad60320d..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-adapter-application/Readme.txt
+++ /dev/null
@@ -1,132 +0,0 @@
-The following describes how to configure authentication for the VNFM adapter.
-
-TLS should always be configured to ensure secure communication between the VNFM-adapter <-> BPMN infra and VNFM-adapter <-> VNFM
-If two-way TLS is configured then there is no need for any further authentication (i.e. no need for token or basic auth).
-If two-way TLS is NOT configured then authentication is REQUIRED. Oauth token based authentication must be used for requests, while for notifications either oauth tokens or basic auth can be used.
-
-
-==========================================
-To confgure TLS
-==========================================
-
----------------
-VNFM Adapter
----------------
-The following parameters can be set to configure the certificate for the VNFM adapter
-server:
- ssl:
- key-alias: so@so.onap.org
- key--store-password: 'ywsqCy:EEo#j}HJHM7z^Rk[L'
- key-store: classpath:so-vnfm-adapter.p12
- key-store-type: PKCS12
-The values shown above relate to the certificate included in the VNFM adapter jar which has been generated from AAF. If a different certificate is to be used then these values should be changed accordingly.
-
-The following paramters can be set to configure the trust store for the VNFM adapter:
-http:
- client:
- ssl:
- trust-store: classpath:org.onap.so.trust.jks
- trust-store-password: ',sx#.C*W)]wVgJC6ccFHI#:H'
-The values shown above relate to the trust store included in the VNFM adapter jar which has been generated from AAI. If a different trust store is to be used then these values should be changed accordingly.
-
-Ensure the value for the below parameter uses https instead of http
-vnfmadapter:
- endpoint: http://so-vnfm-adapter.onap:9092
-
----------------
-bpmn-infra
----------------
-For bpmn-infra, ensure the value for the below parameter uses https instead of http
-so:
- vnfm:
- adapter:
- url: https://so-vnfm-adapter.onap:9092/so/vnfm-adapter/v1/
-
-
-==========================================
-To use two way TLS
-==========================================
-
-Ensure the value for username and password are empty in the AAI entry for the VNFM (The VNFM adapter will use oauth instead of two way TLS if the username/password is set).
-Ensure TLS has been configuered as detailed above.
-
----------------
-VNFM adapter
----------------
-Set the following parameter for the VNFM adapter:
-server:
- ssl:
- client-auth: need
-
----------------
-bpmn-infra:
----------------
-Set the following paramters for bpmn-infra:
-rest:
- http:
- client:
- configuration:
- ssl:
- keyStore: classpath:org.onap.so.p12
- keyStorePassword: 'RLe5ExMWW;Kd6GTSt0WQz;.Y'
- trustStore: classpath:org.onap.so.trust.jks
- trustStorePassword: '6V%8oSU$,%WbYp3IUe;^mWt4'
-Ensure the value for the below parameter uses https instead of http
-so:
- vnfm:
- adapter:
- url: https://so-vnfm-adapter.onap:9092/so/vnfm-adapter/v1/
-
----------------
-VNFM simulator:
----------------
-Set the following parameters for the VNFM simulator (if used):
-server:
- ssl:
- client-auth: need
- request:
- grant:
- auth: twowaytls
-
-==========================================
-To use oauth token base authentication
-==========================================
-
----------------
-VNFM adapter:
----------------
-Ensure the value for username and password set set in the AAI entry for the VNFM. The VNFM adapter will use this username/password as the client credentials in the request for a token for the VNFM. The token endpoint
-for the VNFM will by default will be derived from the service url for the VNFM in AAI as follows: <base of service url>/oauth/token, e.g. if the service url is https://so-vnfm-simulator.onap/vnflcm/v1 then the token url will
-be taken to be https://so-vnfm-simulator.onap/oauth/token. This can be overriden using the following parameter for the VNFM adapter:
-vnfmadapter:
- temp:
- vnfm:
- oauth:
- endpoint:
-
-The VNFM adapter exposes a token point at url: https://<hostname>:<port>/oauth/token e.g. https://so-vnfm-adapter.onap:9092/oauth/token. The VNFM can request a token from this endpoint for use in grant requests and notifications
-to the VNFM adapter. The username/password to be used in the token request are passed to the VNFM in a subscription request. The username/password sent by the VNFM adpater in the subscription request can be configuered using the
-following parameter:
-vnfmadapter:
- auth: <encoded value>
-where <encoded value> is '<username>:<password>' encoded using org.onap.so.utils.CryptoUtils with the key set by the paramter:
-mso:
- key: <key>
-The default username:password is vnfm-adapter:123456 when vnfm-adapter.auth is not set.
-
----------------
-VNFM simulator:
----------------
-Set the following parameters for the simulator:
-spring:
- profiles:
- active: oauth-authentication
-server:
- request:
- grant:
- auth: oauth
-
-==========================================
-To use basic auth for notifications
-==========================================
-The same username/password is used as for oauth token requests as describe above and passed to the VNFM in the subscription request. \ No newline at end of file
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-adapter-application/pom.xml b/adapters/etsi-sol003-adapter/etsi-sol003-adapter-application/pom.xml
deleted file mode 100644
index e8b1fd08e6..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-adapter-application/pom.xml
+++ /dev/null
@@ -1,86 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.onap.so.adapters</groupId>
- <artifactId>etsi-sol003-adapter</artifactId>
- <version>1.7.1-SNAPSHOT</version>
- </parent>
- <artifactId>etsi-sol003-adapter-application</artifactId>
- <name>ETSI SOL003 Application Jar</name>
- <build>
- <finalName>${project.artifactId}-${project.version}</finalName>
- <plugins>
- <plugin>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-maven-plugin</artifactId>
- <configuration>
- <mainClass>org.onap.so.adapters.etsisol003adapter.Application</mainClass>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>repackage</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <executions>
- <execution>
- <id>original</id>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.jacoco</groupId>
- <artifactId>jacoco-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <systemPropertyVariables>
- <so.log.level>DEBUG</so.log.level>
- </systemPropertyVariables>
- <rerunFailingTestsCount>2</rerunFailingTestsCount>
- <parallel>suites</parallel>
- <useUnlimitedThreads>false</useUnlimitedThreads>
- <threadCount>1</threadCount>
- </configuration>
- </plugin>
- </plugins>
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- <filtering>true</filtering>
- <excludes>
- <exclude>**/*.p12</exclude>
- <exclude>**/*.jks</exclude>
- </excludes>
- </resource>
- <resource>
- <directory>src/main/resources</directory>
- <filtering>false</filtering>
- <includes>
- <include>**/*.p12</include>
- <include>**/*.jks</include>
- </includes>
- </resource>
- </resources>
- </build>
- <dependencies>
- <dependency>
- <groupId>org.onap.so.adapters</groupId>
- <artifactId>etsi-sol003-lcm-adapter</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.so.adapters</groupId>
- <artifactId>etsi-sol003-pkgm-adapter</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-</project> \ No newline at end of file
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-adapter-application/src/main/java/org/onap/so/adapters/etsisol003adapter/Application.java b/adapters/etsi-sol003-adapter/etsi-sol003-adapter-application/src/main/java/org/onap/so/adapters/etsisol003adapter/Application.java
deleted file mode 100755
index 261d2244d7..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-adapter-application/src/main/java/org/onap/so/adapters/etsisol003adapter/Application.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter;
-
-import static org.slf4j.LoggerFactory.getLogger;
-import org.onap.so.adapters.etsisol003adapter.lcm.rest.EtsiSol003AdapterController;
-import org.slf4j.Logger;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration;
-import org.springframework.cache.annotation.EnableCaching;
-
-/**
- * The spring boot application for the ETSI SOL003 Adapter.
- * <p>
- * The ETSI SOL003 Adapter receives requests through its REST API {@link EtsiSol003AdapterController} which it adapts
- * into ETSI SOL003 compliant LCM (Life Cycle Management) calls towards an ETSI compliant VNFM.
- *
- * @see <a href= "https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/003/02.05.01_60/gs_nfv-sol003v020501p.pdf">ETSI
- * SOL003 v2.5.1</a>
- */
-@EnableCaching
-@SpringBootApplication(scanBasePackages = {"org.onap.so"})
-@EnableAutoConfiguration(exclude = {JacksonAutoConfiguration.class})
-public class Application {
- private static final Logger logger = getLogger(Application.class);
-
- /**
- * Entry point for the Spring boot application
- *
- * @param args arguments for the application
- */
- public static void main(final String[] args) {
- new SpringApplication(Application.class).run(args);
- logger.info("VnfmAdapterApplication started!");
- }
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-adapter-application/src/main/java/org/onap/so/adapters/etsisol003adapter/EtsiSol003AdapterBasicHttpSecurityConfigurer.java b/adapters/etsi-sol003-adapter/etsi-sol003-adapter-application/src/main/java/org/onap/so/adapters/etsisol003adapter/EtsiSol003AdapterBasicHttpSecurityConfigurer.java
deleted file mode 100644
index 618b4f6116..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-adapter-application/src/main/java/org/onap/so/adapters/etsisol003adapter/EtsiSol003AdapterBasicHttpSecurityConfigurer.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Modifications Copyright (c) 2019 Samsung
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter;
-
-import org.onap.so.adapters.etsi.sol003.adapter.common.CommonConstants;
-import org.onap.so.security.HttpSecurityConfigurer;
-import org.onap.so.security.SoUserCredentialConfiguration;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.context.annotation.Primary;
-import org.springframework.http.HttpMethod;
-import org.springframework.security.config.annotation.web.builders.HttpSecurity;
-import org.springframework.stereotype.Component;
-import org.springframework.util.StringUtils;
-
-/**
- * @author Waqas Ikram (waqas.ikram@est.tech)
- * @author Gareth Roper (gareth.roper@est.tech)
- */
-@Primary
-@Component
-public class EtsiSol003AdapterBasicHttpSecurityConfigurer implements HttpSecurityConfigurer {
-
- @Autowired
- private SoUserCredentialConfiguration soUserCredentialConfiguration;
-
- @Value("${server.ssl.client-auth:none}")
- private String clientAuth;
-
- @Override
- public void configure(final HttpSecurity http) throws Exception {
- if (("need").equalsIgnoreCase(clientAuth)) {
- http.csrf().disable().authorizeRequests().anyRequest().permitAll();
- } else {
- http.csrf().disable().authorizeRequests().antMatchers("/manage/health", "/manage/info").permitAll()
- .antMatchers(HttpMethod.GET, CommonConstants.ETSI_SUBSCRIPTION_NOTIFICATION_BASE_URL).permitAll()
- .antMatchers("/**")
- .hasAnyRole(StringUtils.collectionToDelimitedString(soUserCredentialConfiguration.getRoles(), ","))
- .and().httpBasic();
- }
- }
-}
-
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-adapter-application/src/main/resources/application-aaf.yaml b/adapters/etsi-sol003-adapter/etsi-sol003-adapter-application/src/main/resources/application-aaf.yaml
deleted file mode 100644
index e69de29bb2..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-adapter-application/src/main/resources/application-aaf.yaml
+++ /dev/null
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-adapter-application/src/main/resources/application-basic.yaml b/adapters/etsi-sol003-adapter/etsi-sol003-adapter-application/src/main/resources/application-basic.yaml
deleted file mode 100644
index e69de29bb2..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-adapter-application/src/main/resources/application-basic.yaml
+++ /dev/null
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-adapter-application/src/main/resources/application.yaml b/adapters/etsi-sol003-adapter/etsi-sol003-adapter-application/src/main/resources/application.yaml
deleted file mode 100644
index 57dc08f3b5..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-adapter-application/src/main/resources/application.yaml
+++ /dev/null
@@ -1,63 +0,0 @@
-# Copyright © 2019 Nordix Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-spring:
- security:
- usercredentials:
- - username: test
- password: '$2a$12$Zi3AuYcZoZO/gBQyUtST2.F5N6HqcTtaNci2Et.ufsQhski56srIu'
- role: BPEL-Client
- - username: vnfm
- password: '$2a$10$Fh9ffgPw2vnmsghsRD3ZauBL1aKXebigbq3BB1RPWtE62UDILsjke'
- role: BPEL-Client
- http:
- converters:
- preferred-json-mapper: gson
- main:
- allow-bean-definition-overriding: true
-
-server:
- port: 9092
- tomcat:
- max-threads: 50
-
-mso:
- key: 07a7159d3bf51a0e53be7a8f89699be7
-
-aai:
- auth: 2A11B07DB6214A839394AA1EC5844695F5114FC407FF5422625FB00175A3DCB8A1FF745F22867EFA72D5369D599BBD88DA8BED4233CF5586
- version: v15
- endpoint: https://aai.onap:8443
-
-sdc:
- username: sdcUser
- password: sdcPassword
- key: adadadadad
- endpoint: http://sdc.onap/1234A
-
-vnfmadapter:
- endpoint: http://so-vnfm-adapter.onap:9092
-
-#Actuator
-management:
- endpoints:
- web:
- base-path: /manage
- exposure:
- include: "*"
- metrics:
- se-global-registry: false
- export:
- prometheus:
- enabled: true # Whether exporting of metrics to Prometheus is enabled.
- step: 1m # Step size (i.e. reporting frequency) to use.
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-adapter-application/src/main/resources/org.onap.so.trust.jks b/adapters/etsi-sol003-adapter/etsi-sol003-adapter-application/src/main/resources/org.onap.so.trust.jks
deleted file mode 100644
index 4605a24f4c..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-adapter-application/src/main/resources/org.onap.so.trust.jks
+++ /dev/null
Binary files differ
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-adapter-application/src/main/resources/so-vnfm-adapter.p12 b/adapters/etsi-sol003-adapter/etsi-sol003-adapter-application/src/main/resources/so-vnfm-adapter.p12
deleted file mode 100644
index 6bd786d596..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-adapter-application/src/main/resources/so-vnfm-adapter.p12
+++ /dev/null
Binary files differ
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-adapter-common/pom.xml b/adapters/etsi-sol003-adapter/etsi-sol003-adapter-common/pom.xml
deleted file mode 100644
index 391a5c622d..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-adapter-common/pom.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.onap.so.adapters</groupId>
- <artifactId>etsi-sol003-adapter</artifactId>
- <version>1.7.1-SNAPSHOT</version>
- </parent>
- <artifactId>etsi-sol003-adapter-common</artifactId>
- <name>ETSI SOL003 Adapter Common</name>
-
- <dependencies>
- <dependency>
- <groupId>org.springframework.security.oauth</groupId>
- <artifactId>spring-security-oauth2</artifactId>
- <version>${spring-security-oauth2-version}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.so</groupId>
- <artifactId>common</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-</project> \ No newline at end of file
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-adapter-common/src/main/java/org/onap/so/adapters/etsi/sol003/adapter/common/CommonConstants.java b/adapters/etsi-sol003-adapter/etsi-sol003-adapter-common/src/main/java/org/onap/so/adapters/etsi/sol003/adapter/common/CommonConstants.java
deleted file mode 100644
index dbe4dac321..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-adapter-common/src/main/java/org/onap/so/adapters/etsi/sol003/adapter/common/CommonConstants.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsi.sol003.adapter.common;
-
-/**
- * VNFM Adapter Common constants
- *
- * @author Waqas Ikram (waqas.ikram@est.tech)
- * @author Gareth Roper (gareth.roper@est.tech)
- */
-public class CommonConstants {
-
- public static final String SERVICE_NAME = "vnfm-adapter";
- public static final String SERVICE_VERSION = "v1";
- public static final String BASE_URL = "/so/" + SERVICE_NAME + "/" + SERVICE_VERSION;
-
- public static final String PACKAGE_MANAGEMENT_BASE_URL = BASE_URL + "/vnfpkgm/v1";
-
- public static final String ETSI_CATALOG_MANAGER_BASE_ENDPOINT = "/etsicatalogmanager";
- public static final String ETSI_SUBSCRIPTION_NOTIFICATION_ENDPOINT = "/notification";
- public static final String ETSI_SUBSCRIPTION_NOTIFICATION_CONTROLLER_BASE_URL =
- BASE_URL + ETSI_CATALOG_MANAGER_BASE_ENDPOINT;
- public static final String ETSI_SUBSCRIPTION_NOTIFICATION_BASE_URL =
- ETSI_SUBSCRIPTION_NOTIFICATION_CONTROLLER_BASE_URL + ETSI_SUBSCRIPTION_NOTIFICATION_ENDPOINT;
-
- public static final String OPERATION_NOTIFICATION_ENDPOINT = "/lcn/VnfLcmOperationOccurrenceNotification";
-
- private CommonConstants() {}
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-adapter-common/src/main/java/org/onap/so/adapters/etsi/sol003/adapter/common/VnfmAdapterUrlProvider.java b/adapters/etsi-sol003-adapter/etsi-sol003-adapter-common/src/main/java/org/onap/so/adapters/etsi/sol003/adapter/common/VnfmAdapterUrlProvider.java
deleted file mode 100644
index 855b5a454f..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-adapter-common/src/main/java/org/onap/so/adapters/etsi/sol003/adapter/common/VnfmAdapterUrlProvider.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2020 Ericsson. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.adapters.etsi.sol003.adapter.common;
-
-import static org.onap.so.adapters.etsi.sol003.adapter.common.CommonConstants.BASE_URL;
-import static org.onap.so.adapters.etsi.sol003.adapter.common.CommonConstants.ETSI_SUBSCRIPTION_NOTIFICATION_BASE_URL;
-import static org.onap.so.adapters.etsi.sol003.adapter.common.CommonConstants.OPERATION_NOTIFICATION_ENDPOINT;
-import static org.onap.so.adapters.etsi.sol003.adapter.common.CommonConstants.PACKAGE_MANAGEMENT_BASE_URL;
-import static org.slf4j.LoggerFactory.getLogger;
-import java.net.URI;
-import java.security.GeneralSecurityException;
-import org.apache.commons.lang3.tuple.ImmutablePair;
-import org.onap.so.utils.CryptoUtils;
-import org.slf4j.Logger;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.context.annotation.Configuration;
-
-
-/**
- * Provides VNFM Adapter endpoint URLs
- *
- * @author Waqas Ikram (waqas.ikram@est.tech)
- *
- */
-@Configuration
-public class VnfmAdapterUrlProvider {
-
- private static final Logger logger = getLogger(VnfmAdapterUrlProvider.class);
- private static final String COLON = ":";
- private static final int LIMIT = 2;
-
- private final String vnfmAdapterEndpoint;
- private final String msoKeyString;
- private final String vnfmAdapterAuth;
-
- @Autowired
- public VnfmAdapterUrlProvider(@Value("${vnfmadapter.endpoint}") final String vnfmAdapterEndpoint,
- @Value("${mso.key}") final String msoKeyString,
- @Value("${vnfmadapter.auth:BF29BA36F0CFE1C05507781F6B97EFBCA7EFAC9F595954D465FC43F646883EF585C20A58CBB02528A6FAAC}") final String vnfmAdapterAuth) {
- this.vnfmAdapterEndpoint = vnfmAdapterEndpoint;
- this.msoKeyString = msoKeyString;
- this.vnfmAdapterAuth = vnfmAdapterAuth;
- }
-
- public String getEtsiSubscriptionNotificationBaseUrl() {
- return vnfmAdapterEndpoint + ETSI_SUBSCRIPTION_NOTIFICATION_BASE_URL;
- }
-
- public URI getSubscriptionUri(final String subscriptionId) {
- return URI.create(getSubscriptionUriString(subscriptionId));
- }
-
- public ImmutablePair<String, String> getDecryptAuth() throws GeneralSecurityException {
- final String decryptedAuth = CryptoUtils.decrypt(vnfmAdapterAuth, msoKeyString);
- final String[] auth = decryptedAuth.split(COLON, LIMIT);
- if (auth.length > 1) {
- return ImmutablePair.of(auth[0], auth[1]);
- }
- logger.error("Unexpected auth value: {}", vnfmAdapterAuth);
- return ImmutablePair.nullPair();
- }
-
- public String getSubscriptionUriString(final String subscriptionId) {
- return vnfmAdapterEndpoint + PACKAGE_MANAGEMENT_BASE_URL + "/subscriptions/" + subscriptionId;
- }
-
- public String getVnfLcmOperationOccurrenceNotificationUrl() {
- return vnfmAdapterEndpoint + BASE_URL + OPERATION_NOTIFICATION_ENDPOINT;
- }
-
- public String getVnfPackageUrl(final String vnfPkgId) {
- return vnfmAdapterEndpoint + PACKAGE_MANAGEMENT_BASE_URL + "/vnf_packages/" + vnfPkgId;
- }
-
- public String getVnfPackageVnfdUrl(final String vnfPkgId) {
- return getVnfPackageUrl(vnfPkgId) + "/vnfd";
- }
-
- public String getVnfPackageContentUrl(final String vnfPkgId) {
- return getVnfPackageUrl(vnfPkgId) + "/package_content";
- }
-
- public String getOauthTokenUrl() {
- return vnfmAdapterEndpoint + "/oauth/token";
- }
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-adapter-common/src/main/java/org/onap/so/adapters/etsi/sol003/adapter/common/configuration/AbstractServiceProviderConfiguration.java b/adapters/etsi-sol003-adapter/etsi-sol003-adapter-common/src/main/java/org/onap/so/adapters/etsi/sol003/adapter/common/configuration/AbstractServiceProviderConfiguration.java
deleted file mode 100644
index 6161fa60f9..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-adapter-common/src/main/java/org/onap/so/adapters/etsi/sol003/adapter/common/configuration/AbstractServiceProviderConfiguration.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2020 Ericsson. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.adapters.etsi.sol003.adapter.common.configuration;
-
-import java.util.Iterator;
-import org.springframework.http.converter.HttpMessageConverter;
-import org.springframework.http.converter.json.GsonHttpMessageConverter;
-import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
-import org.springframework.web.client.RestTemplate;
-import com.google.gson.Gson;
-
-/**
- * A base class that can be extended by classes for configuring HttpRestServiceProvider classes. Provides common methods
- * that will be useful to some such classes.
- *
- * @author gareth.roper@est.tech
- * @author Waqas Ikram (waqas.ikram@est.tech)
- */
-public abstract class AbstractServiceProviderConfiguration {
-
- public void setGsonMessageConverter(final RestTemplate restTemplate) {
- final Iterator<HttpMessageConverter<?>> iterator = restTemplate.getMessageConverters().iterator();
- while (iterator.hasNext()) {
- if (iterator.next() instanceof MappingJackson2HttpMessageConverter) {
- iterator.remove();
- }
- }
- restTemplate.getMessageConverters().add(new GsonHttpMessageConverter(getGson()));
- }
-
- protected abstract Gson getGson();
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-adapter-common/src/main/java/org/onap/so/adapters/etsi/sol003/adapter/common/configuration/MessageConverterConfiguration.java b/adapters/etsi-sol003-adapter/etsi-sol003-adapter-common/src/main/java/org/onap/so/adapters/etsi/sol003/adapter/common/configuration/MessageConverterConfiguration.java
deleted file mode 100644
index 25c37b9016..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-adapter-common/src/main/java/org/onap/so/adapters/etsi/sol003/adapter/common/configuration/MessageConverterConfiguration.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.adapters.etsi.sol003.adapter.common.configuration;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import org.onap.so.adapters.etsi.sol003.adapter.oauth.configuration.OAuth2AccessTokenAdapter;
-import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.http.converter.HttpMessageConverter;
-import org.springframework.http.converter.json.GsonHttpMessageConverter;
-import org.springframework.security.oauth2.common.OAuth2AccessToken;
-import com.google.gson.Gson;
-import com.google.gson.GsonBuilder;
-
-/**
- * Configures message converter
- */
-@Configuration
-public class MessageConverterConfiguration {
-
- @Bean
- public HttpMessageConverters customConverters() {
- final Collection<HttpMessageConverter<?>> messageConverters = new ArrayList<>();
- final Gson gson = new GsonBuilder()
- .registerTypeHierarchyAdapter(OAuth2AccessToken.class, new OAuth2AccessTokenAdapter()).create();
- final GsonHttpMessageConverter gsonHttpMessageConverter = new GsonHttpMessageConverter(gson);
- messageConverters.add(gsonHttpMessageConverter);
- return new HttpMessageConverters(true, messageConverters);
- }
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-adapter-common/src/main/java/org/onap/so/adapters/etsi/sol003/adapter/oauth/configuration/AuthorizationServerConfig.java b/adapters/etsi-sol003-adapter/etsi-sol003-adapter-common/src/main/java/org/onap/so/adapters/etsi/sol003/adapter/oauth/configuration/AuthorizationServerConfig.java
deleted file mode 100644
index 3a3287535e..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-adapter-common/src/main/java/org/onap/so/adapters/etsi/sol003/adapter/oauth/configuration/AuthorizationServerConfig.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsi.sol003.adapter.oauth.configuration;
-
-import org.onap.so.utils.CryptoUtils;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
-import org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer;
-import org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerConfigurerAdapter;
-import org.springframework.security.oauth2.config.annotation.web.configuration.EnableAuthorizationServer;
-
-@Configuration
-@EnableAuthorizationServer
-/**
- * Configures the authorization server for oauth token based authentication.
- */
-public class AuthorizationServerConfig extends AuthorizationServerConfigurerAdapter {
-
- private static final int ONE_DAY = 60 * 60 * 24;
-
- @Value("${vnfmadapter.auth:E39823AAB2739CC654C4E92B52C05BC34149342D0A46451B00CA508C8EDC62242CE4E9DA9445D3C01A3F13}")
- private String vnfmAdapterAuth;
-
- @Value("${mso.key}")
- private String msoEncryptionKey;
-
- @Override
- public void configure(final ClientDetailsServiceConfigurer clients) throws Exception {
- final String[] decrypedAuth = CryptoUtils.decrypt(vnfmAdapterAuth, msoEncryptionKey).split(":");
- final BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder();
- clients.inMemory().withClient(decrypedAuth[0]).secret(passwordEncoder.encode(decrypedAuth[1]))
- .authorizedGrantTypes("client_credentials").scopes("write").accessTokenValiditySeconds(ONE_DAY)
- .refreshTokenValiditySeconds(ONE_DAY);
- }
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-adapter-common/src/main/java/org/onap/so/adapters/etsi/sol003/adapter/oauth/configuration/OAuth2AccessTokenAdapter.java b/adapters/etsi-sol003-adapter/etsi-sol003-adapter-common/src/main/java/org/onap/so/adapters/etsi/sol003/adapter/oauth/configuration/OAuth2AccessTokenAdapter.java
deleted file mode 100644
index 4be5b8a86a..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-adapter-common/src/main/java/org/onap/so/adapters/etsi/sol003/adapter/oauth/configuration/OAuth2AccessTokenAdapter.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsi.sol003.adapter.oauth.configuration;
-
-import com.google.gson.JsonArray;
-import com.google.gson.JsonElement;
-import com.google.gson.JsonObject;
-import com.google.gson.JsonSerializationContext;
-import com.google.gson.JsonSerializer;
-import java.lang.reflect.Type;
-import org.springframework.security.oauth2.common.OAuth2AccessToken;
-
-public class OAuth2AccessTokenAdapter implements JsonSerializer<OAuth2AccessToken> {
-
- @Override
- public JsonElement serialize(final OAuth2AccessToken src, final Type typeOfSrc,
- final JsonSerializationContext context) {
- final JsonObject obj = new JsonObject();
- obj.addProperty(OAuth2AccessToken.ACCESS_TOKEN, src.getValue());
- obj.addProperty(OAuth2AccessToken.TOKEN_TYPE, src.getTokenType());
- if (src.getRefreshToken() != null) {
- obj.addProperty(OAuth2AccessToken.REFRESH_TOKEN, src.getRefreshToken().getValue());
- }
- obj.addProperty(OAuth2AccessToken.EXPIRES_IN, src.getExpiresIn());
- final JsonArray scopeObj = new JsonArray();
- for (final String scope : src.getScope()) {
- scopeObj.add(scope);
- }
- obj.add(OAuth2AccessToken.SCOPE, scopeObj);
-
- return obj;
- }
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-adapter-common/src/main/java/org/onap/so/adapters/etsi/sol003/adapter/oauth/configuration/OAuth2ResourceServer.java b/adapters/etsi-sol003-adapter/etsi-sol003-adapter-common/src/main/java/org/onap/so/adapters/etsi/sol003/adapter/oauth/configuration/OAuth2ResourceServer.java
deleted file mode 100644
index 2dcfea4045..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-adapter-common/src/main/java/org/onap/so/adapters/etsi/sol003/adapter/oauth/configuration/OAuth2ResourceServer.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsi.sol003.adapter.oauth.configuration;
-
-import javax.servlet.http.HttpServletRequest;
-import org.onap.so.adapters.etsi.sol003.adapter.common.CommonConstants;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.security.config.annotation.web.builders.HttpSecurity;
-import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;
-import org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfigurerAdapter;
-import org.springframework.security.web.util.matcher.RequestMatcher;
-
-@Configuration
-@EnableResourceServer
-/**
- * Enforces oauth token based authentication when a token is provided in the request.
- */
-public class OAuth2ResourceServer extends ResourceServerConfigurerAdapter {
-
- @Override
- public void configure(final HttpSecurity http) throws Exception {
- http.requestMatcher(new OAuth2ResourceServerRequestMatcher()).authorizeRequests()
- .antMatchers(CommonConstants.BASE_URL + "/grants/**", CommonConstants.BASE_URL + "/lcn/**")
- .authenticated();
- }
-
- private static class OAuth2ResourceServerRequestMatcher implements RequestMatcher {
- @Override
- public boolean matches(HttpServletRequest request) {
- String auth = request.getHeader("Authorization");
- String uri = request.getRequestURI();
- return (auth != null && auth.startsWith("Bearer") && (uri.contains("/grants") || uri.contains("/lcn/")));
- }
- }
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/pom.xml b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/pom.xml
deleted file mode 100644
index 6ed9afcc75..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/pom.xml
+++ /dev/null
@@ -1,114 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.onap.so.adapters</groupId>
- <artifactId>etsi-sol003-lcm</artifactId>
- <version>1.7.1-SNAPSHOT</version>
- </parent>
- <artifactId>etsi-sol003-lcm-adapter</artifactId>
- <name>ETSI SOL003 Life Cycle Management Adapter</name>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.jacoco</groupId>
- <artifactId>jacoco-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <systemPropertyVariables>
- <so.log.level>DEBUG</so.log.level>
- </systemPropertyVariables>
- <rerunFailingTestsCount>2</rerunFailingTestsCount>
- <parallel>suites</parallel>
- <useUnlimitedThreads>false</useUnlimitedThreads>
- <threadCount>1</threadCount>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-web</artifactId>
- <exclusions>
- <exclusion>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-databind</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-security</artifactId>
- <exclusions>
- <exclusion>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-tomcat</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-actuator</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-test</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.onap.so</groupId>
- <artifactId>common</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.so.adapters</groupId>
- <artifactId>etsi-sol003-adapter-common</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.so.adapters</groupId>
- <artifactId>etsi-sol003-lcm-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.so.adapters</groupId>
- <artifactId>etsi-sol003-lcm-ext-clients</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.glassfish.jersey.core</groupId>
- <artifactId>jersey-client</artifactId>
- </dependency>
- <dependency>
- <groupId>org.glassfish.jersey.core</groupId>
- <artifactId>jersey-common</artifactId>
- </dependency>
- <dependency>
- <groupId>org.glassfish.jersey.inject</groupId>
- <artifactId>jersey-hk2</artifactId>
- </dependency>
- <dependency>
- <groupId>org.glassfish.jersey.media</groupId>
- <artifactId>jersey-media-json-jackson</artifactId>
- </dependency>
- <dependency>
- <groupId>org.yaml</groupId>
- <artifactId>snakeyaml</artifactId>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.onap.so.adapters</groupId>
- <artifactId>etsi-sol003-pkgm-adapter</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-</project>
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/LifeCycleManagementConstants.java b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/LifeCycleManagementConstants.java
deleted file mode 100644
index d9804072b7..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/LifeCycleManagementConstants.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.lcm;
-
-/**
- * ETSI SOL003 Life Cycle Management Adapter constants
- *
- * @author Waqas Ikram (waqas.ikram@est.tech)
- */
-public class LifeCycleManagementConstants {
-
- public static final String OPERATION_NOTIFICATION_ENDPOINT = "/lcn/VnfLcmOperationOccurrenceNotification";
-
- private LifeCycleManagementConstants() {}
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/NvfmAdapterUtils.java b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/NvfmAdapterUtils.java
deleted file mode 100644
index 367d8b244f..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/NvfmAdapterUtils.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.lcm;
-
-import static org.slf4j.LoggerFactory.getLogger;
-import java.util.ArrayList;
-import java.util.Collection;
-import org.slf4j.Logger;
-import com.google.gson.JsonElement;
-import com.google.gson.JsonObject;
-
-public final class NvfmAdapterUtils {
- private static Logger logger = getLogger(NvfmAdapterUtils.class);
-
- private NvfmAdapterUtils() {
- throw new IllegalStateException("Utility class");
- }
-
- public static JsonObject child(final JsonObject parent, final String name) {
- return childElement(parent, name).getAsJsonObject();
- }
-
- public static JsonElement childElement(final JsonObject parent, final String name) {
- final JsonElement child = parent.get(name);
- if (child == null) {
- throw abortOperation("Missing child " + name);
- }
- return child;
- }
-
- public static Collection<JsonObject> children(final JsonObject parent) {
- final ArrayList<JsonObject> childElements = new ArrayList<>();
- for (final String childKey : parent.keySet()) {
- if (parent.get(childKey).isJsonObject()) {
- childElements.add(parent.get(childKey).getAsJsonObject());
- }
- }
- return childElements;
- }
-
- public static RuntimeException abortOperation(final String msg, final Exception e) {
- logger.error(msg, e);
- return new RuntimeException(msg, e);
- }
-
- public static RuntimeException abortOperation(final String msg) {
- logger.error(msg);
- return new RuntimeException(msg);
- }
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/EtsiPackageProvider.java b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/EtsiPackageProvider.java
deleted file mode 100644
index ec46af45cd..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/EtsiPackageProvider.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Modifications Copyright (c) 2019 Samsung
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.lcm.extclients;
-
-import static com.google.common.base.Splitter.on;
-import static com.google.common.collect.Iterables.filter;
-import static org.onap.so.adapters.etsisol003adapter.lcm.NvfmAdapterUtils.abortOperation;
-import static org.onap.so.adapters.etsisol003adapter.lcm.NvfmAdapterUtils.child;
-import static org.onap.so.adapters.etsisol003adapter.lcm.NvfmAdapterUtils.childElement;
-import static org.onap.so.adapters.etsisol003adapter.lcm.NvfmAdapterUtils.children;
-import static org.slf4j.LoggerFactory.getLogger;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.HashSet;
-import java.util.NoSuchElementException;
-import java.util.Optional;
-import java.util.Set;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipInputStream;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.EtsiCatalogServiceProviderImpl;
-import org.onap.so.adapters.etsisol003adapter.pkgm.rest.exceptions.EtsiCatalogManagerRequestFailureException;
-import org.slf4j.Logger;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-import org.yaml.snakeyaml.Yaml;
-import com.google.common.io.ByteStreams;
-import com.google.gson.Gson;
-import com.google.gson.JsonObject;
-
-@Component
-public class EtsiPackageProvider {
- private static final String TOCSA_METADATA_FILE_PATH = "TOSCA-Metadata/TOSCA.meta";
- private static final String TOSCA_VNFD_KEY = "Entry-Definitions";
- private static Logger logger = getLogger(EtsiPackageProvider.class);
-
- @Autowired
- private EtsiCatalogServiceProviderImpl etsiCatalogServiceProviderImpl;
-
- public String getVnfdId(final String csarId) {
- return getVnfNodeProperty(csarId, "descriptor_id");
- }
-
- private String getVnfNodeProperty(final String csarId, final String propertyName) {
- logger.debug("Getting {} from {}", propertyName, csarId);
- final byte[] onapPackage = getPackage(csarId);
-
- try {
- final String vnfdLocation = getVnfdLocation(new ByteArrayInputStream(onapPackage));
- final String onapVnfdContent = getFileInZip(new ByteArrayInputStream(onapPackage), vnfdLocation).toString();
- logger.debug("VNFD CONTENTS: {}", onapVnfdContent);
- final JsonObject root = new Gson().toJsonTree(new Yaml().load(onapVnfdContent)).getAsJsonObject();
-
- final JsonObject topologyTemplates = child(root, "topology_template");
- final JsonObject nodeTemplates = child(topologyTemplates, "node_templates");
- for (final JsonObject child : children(nodeTemplates)) {
- final String type = childElement(child, "type").getAsString();
- String propertyValue = null;
- if ("tosca.nodes.nfv.VNF".equals(type)) {
- final JsonObject properties = child(child, "properties");
- logger.debug("properties: {}", properties);
- propertyValue = properties.get(propertyName).getAsJsonPrimitive().getAsString();
- if (propertyValue == null) {
- propertyValue = getValueFromNodeTypeDefinition(root, type, propertyName);
- }
- return propertyValue;
- }
-
- }
-
- } catch (final Exception e) {
- throw new IllegalArgumentException("Unable to extract " + propertyName + " from ONAP package", e);
- }
- throw new IllegalArgumentException("Unable to extract " + propertyName + " from ONAP package");
- }
-
- private String getValueFromNodeTypeDefinition(final JsonObject root, final String nodeTypeName,
- final String propertyName) {
- final JsonObject nodeTypes = child(root, "node_types");
- final JsonObject nodeType = child(nodeTypes, nodeTypeName);
-
- if ("tosca.nodes.nfv.VNF".equals(childElement(nodeType, "derived_from").getAsString())) {
- final JsonObject properties = child(nodeType, "properties");
- logger.debug("properties: {}", properties);
- final JsonObject property = child(properties, propertyName);
- logger.debug("property: {}", property);
- logger.debug("property default: {}", childElement(property, "default"));
- return childElement(property, "default").getAsJsonPrimitive().getAsString();
- }
- return null;
- }
-
- private byte[] getPackage(final String csarId) {
- try {
- final Optional<byte[]> optional = etsiCatalogServiceProviderImpl.getVnfPackageContent(csarId);
- if (optional.isPresent()) {
- return optional.get();
- }
- } catch (final Exception exception) {
- logger.error("Unable to retrieve package from ETSI Catalog Manager using pkgId: {}", csarId);
- throw new EtsiCatalogManagerRequestFailureException("Value is not present", exception);
- }
- logger.error("Unable to retrieve package from ETSI Catalog Manager using pkgId: {}", csarId);
- throw new EtsiCatalogManagerRequestFailureException("Value is not present");
- }
-
- private String getVnfdLocation(final InputStream stream) throws IOException {
- final String toscaMetadata = new String(getFileInZip(stream, TOCSA_METADATA_FILE_PATH).toByteArray());
- if (!toscaMetadata.isEmpty()) {
- final String toscaVnfdLine =
- filter(on("\n").split(toscaMetadata), line -> line.contains(TOSCA_VNFD_KEY)).iterator().next();
- return toscaVnfdLine.replace(TOSCA_VNFD_KEY + ":", "").trim();
- }
- throw abortOperation("Unable to find valid Tosca Path");
- }
-
- private static ByteArrayOutputStream getFileInZip(final InputStream zip, final String path) throws IOException {
- final ZipInputStream zipInputStream = new ZipInputStream(zip);
- final ByteArrayOutputStream fileContent = getFileInZip(zipInputStream, path);
- zipInputStream.close();
- return fileContent;
- }
-
- private static ByteArrayOutputStream getFileInZip(final ZipInputStream zipInputStream, final String path)
- throws IOException {
- ZipEntry zipEntry;
- final Set<String> items = new HashSet<>();
- while ((zipEntry = zipInputStream.getNextEntry()) != null) {
- items.add(zipEntry.getName());
- if (zipEntry.getName().matches(path)) {
- final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
- ByteStreams.copy(zipInputStream, byteArrayOutputStream);
- return byteArrayOutputStream;
- }
- }
- logger.error("Unable to find the {} in archive found: {}", path, items);
- throw new NoSuchElementException("Unable to find the " + path + " in archive found: " + items);
- }
-
- public String getFlavourId(final String csarId) {
- return getVnfNodeProperty(csarId, "flavour_id");
- }
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/aai/AaiClientProvider.java b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/aai/AaiClientProvider.java
deleted file mode 100644
index 529be0eb2e..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/aai/AaiClientProvider.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.lcm.extclients.aai;
-
-import org.onap.aaiclient.client.aai.AAIResourcesClient;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-@Configuration
-public class AaiClientProvider {
-
- @Bean
- public AAIResourcesClient getAaiClient() {
- return new AAIResourcesClient();
- }
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/aai/AaiHelper.java b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/aai/AaiHelper.java
deleted file mode 100644
index 958d2ebca8..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/aai/AaiHelper.java
+++ /dev/null
@@ -1,217 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.lcm.extclients.aai;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import org.onap.aai.domain.yang.EsrSystemInfo;
-import org.onap.aai.domain.yang.EsrSystemInfoList;
-import org.onap.aai.domain.yang.EsrVnfm;
-import org.onap.aai.domain.yang.EsrVnfmList;
-import org.onap.aai.domain.yang.GenericVnf;
-import org.onap.aai.domain.yang.Relationship;
-import org.onap.aai.domain.yang.RelationshipData;
-import org.onap.aai.domain.yang.Vserver;
-import org.onap.so.adapters.etsisol003adapter.lcm.lcn.model.LcnVnfLcmOperationOccurrenceNotificationAffectedVnfcs;
-import org.onap.so.adapters.etsisol003adapter.lcm.rest.exceptions.TenantNotFoundException;
-import org.onap.so.adapters.etsisol003adapter.lcm.rest.exceptions.VnfmNotFoundException;
-import org.onap.so.adapters.etsisol003adapter.lcm.v1.model.Tenant;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-/**
- * Provides helper methods for interactions with AAI.
- */
-@Service
-public class AaiHelper {
-
- private static final Logger logger = LoggerFactory.getLogger(AaiHelper.class);
- private final AaiServiceProvider aaiServiceProvider;
- private final Map<String, OamIpAddressSource> mapOfVnfIdToOamIpAddressHolder = new HashMap<>();
-
- @Autowired
- public AaiHelper(final AaiServiceProvider aaiServiceProvider) {
- this.aaiServiceProvider = aaiServiceProvider;
- }
-
- /**
- * Get the VNFM assigned for use for the given generic VNF.
- *
- * @param vnf the generic VNF
- * @return the VNFM to use, or <code>null</code> if no VNFM has been assigned yet
- */
- public EsrVnfm getAssignedVnfm(final GenericVnf vnf) {
- final String vnfmId = getIdOfAssignedVnfm(vnf);
- return vnfmId == null ? null : aaiServiceProvider.invokeGetVnfm(vnfmId);
- }
-
- /**
- * Get the ID of the VNFM assigned for use for the given generic VNF.
- *
- * @param vnf the generic VNF
- * @return the ID of the VNFM to use, or <code>null</code> if no VNFM has been assigned yet
- */
- public String getIdOfAssignedVnfm(final GenericVnf vnf) {
- final Relationship relationship = getRelationship(vnf, "esr-vnfm");
- return getRelationshipData(relationship, "esr-vnfm.vnfm-id");
- }
-
- /**
- * Get the tenant assigned for use for the given generic VNF.
- *
- * @param vnf the generic VNF
- * @return the tenant to use, or <code>null</code> if no tenant has been assigned yet
- */
- public Tenant getAssignedTenant(final GenericVnf vnf) {
- final Relationship relationship = getRelationship(vnf, "tenant");
- final String cloudOwner = getRelationshipData(relationship, "cloud-region.cloud-owner");
- final String cloudRegion = getRelationshipData(relationship, "cloud-region.cloud-region-id");
- final String tenantId = getRelationshipData(relationship, "tenant.tenant-id");
- if (cloudOwner == null || cloudRegion == null || tenantId == null) {
- throw new TenantNotFoundException("No matching Tenant found in AAI. VNFID: " + vnf.getVnfId());
- } else {
- return new Tenant().cloudOwner(cloudOwner).regionName(cloudRegion).tenantId(tenantId);
- }
- }
-
- private Relationship getRelationship(final GenericVnf vnf, final String relationshipRelatedToValue) {
- for (final Relationship relationship : vnf.getRelationshipList() == null ? Collections.<Relationship>emptyList()
- : vnf.getRelationshipList().getRelationship()) {
- if (relationship.getRelatedTo().equals(relationshipRelatedToValue)) {
- return relationship;
- }
- }
- return null;
- }
-
- /**
- * Get the value of the relationship data with the given key in the given relationship.
- *
- * @param relationship the relationship
- * @param relationshipDataKey the key for the relationship data
- * @return the value of the relationship data for the given key
- */
- public String getRelationshipData(final Relationship relationship, final String relationshipDataKey) {
- if (relationship != null) {
- for (final RelationshipData relationshipData : relationship.getRelationshipData()) {
- if (relationshipData.getRelationshipKey().equals(relationshipDataKey)) {
- return relationshipData.getRelationshipValue();
- }
- }
- }
- return null;
- }
-
- /**
- * Delete from the given VNF the relationship matching the given criteria.
- *
- * @param vnf the VNF
- * @param relationshipRelatedToValue the related-to value for the relationship
- * @param dataKey the relationship data key to match on
- * @param dataValue the value the relationship data with the given key must match
- * @return the deleted relationship or <code>null</code> if none found matching the given criteria
- */
- public Relationship deleteRelationshipWithDataValue(final GenericVnf vnf, final String relationshipRelatedToValue,
- final String dataKey, final String dataValue) {
- final Iterator<Relationship> relationships =
- vnf.getRelationshipList() == null ? Collections.<Relationship>emptyList().iterator()
- : vnf.getRelationshipList().getRelationship().iterator();
-
- while (relationships.hasNext()) {
- final Relationship relationship = relationships.next();
- if (relationship.getRelatedTo().equals(relationshipRelatedToValue)
- && dataValue.equals(getRelationshipData(relationship, dataKey))) {
- relationships.remove();
- return relationship;
- }
- }
- return null;
- }
-
- /**
- * Select a VNFM to use for the given generic VNF. Should only be used when no VNFM has already been assigned to the
- * VNF.
- *
- * @param vnf the generic VNF
- * @return the VNFM to use
- */
- public EsrVnfm selectVnfm(final GenericVnf vnf) {
- final EsrVnfmList vnfmsInEsr = aaiServiceProvider.invokeGetVnfms();
-
- if (vnfmsInEsr == null) {
- throw new VnfmNotFoundException("No VNFMs found in AAI ESR");
- }
- logger.debug("VNFMs in ESR: " + vnfmsInEsr);
-
- for (final EsrVnfm vnfm : vnfmsInEsr.getEsrVnfm()) {
- final EsrSystemInfoList systemInfolist =
- aaiServiceProvider.invokeGetVnfmEsrSystemInfoList(vnfm.getVnfmId());
- vnfm.setEsrSystemInfoList(systemInfolist);
- if (vnfmHasMatchingEsrSystemInfoType(vnfm, vnf.getNfType())) {
- return vnfm;
- }
- }
- throw new VnfmNotFoundException("No matching VNFM found in AAI ESR");
- }
-
- private boolean vnfmHasMatchingEsrSystemInfoType(final EsrVnfm vnfm, final String type) {
- logger.debug("Checking VNFM ID: " + vnfm + ": " + vnfm.getVnfmId());
-
- final EsrSystemInfoList systemInfolist = vnfm.getEsrSystemInfoList();
- if (systemInfolist != null) {
- for (final EsrSystemInfo esrSystemInfo : systemInfolist.getEsrSystemInfo()) {
- if (esrSystemInfo.getType().equals(type)) {
- logger.debug("Matched VNFM ID: " + vnfm + ", based on type");
- return true;
- }
- }
- }
- return false;
- }
-
- /**
- * Create a vserver.
- *
- * @param vnfc the VNFC to base the vserver on
- * @return the vserver
- */
- public Vserver createVserver(final LcnVnfLcmOperationOccurrenceNotificationAffectedVnfcs vnfc) {
- final Vserver vserver = new Vserver();
- vserver.setVserverId(vnfc.getComputeResource().getResourceId());
- vserver.setVserverName(vnfc.getId());
- vserver.setProvStatus("active");
- vserver.setVserverSelflink("Not available");
- return vserver;
- }
-
- public void setOamIpAddressSource(final String vnfId, final OamIpAddressSource oamIpAddressSource) {
- mapOfVnfIdToOamIpAddressHolder.put(vnfId, oamIpAddressSource);
- }
-
- public OamIpAddressSource getOamIpAddressSource(final String vnfId) {
- return mapOfVnfIdToOamIpAddressHolder.get(vnfId);
- }
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/aai/AaiPropertiesImpl.java b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/aai/AaiPropertiesImpl.java
deleted file mode 100644
index 9e08cda354..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/aai/AaiPropertiesImpl.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.lcm.extclients.aai;
-
-import org.onap.aaiclient.client.aai.AAIProperties;
-import org.onap.aaiclient.client.aai.AAIVersion;
-import org.onap.so.spring.SpringContextHelper;
-import org.springframework.context.ApplicationContext;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-public class AaiPropertiesImpl implements AAIProperties {
-
- private final String endpoint;
- private final String encryptedBasicAuth;
- private final String encrytptionKey;
- private final String aaiVersion;
-
- public AaiPropertiesImpl() {
- final ApplicationContext context = SpringContextHelper.getAppContext();
- this.endpoint = context.getEnvironment().getProperty("aai.endpoint");
- this.encryptedBasicAuth = context.getEnvironment().getProperty("aai.auth");
- this.encrytptionKey = context.getEnvironment().getProperty("mso.key");
- this.aaiVersion = context.getEnvironment().getProperty("aai.version");
-
- }
-
- @Override
- public URL getEndpoint() throws MalformedURLException {
- return new URL(endpoint);
- }
-
- @Override
- public String getSystemName() {
- return "MSO";
- }
-
- @Override
- public AAIVersion getDefaultVersion() {
- for (final AAIVersion version : AAIVersion.values()) {
- if (version.toString().equalsIgnoreCase(this.aaiVersion)) {
- return version;
- }
- }
- return AAIVersion.LATEST;
- }
-
- @Override
- public String getAuth() {
- return encryptedBasicAuth;
- }
-
- @Override
- public String getKey() {
- return encrytptionKey;
- }
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/aai/AaiServiceProvider.java b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/aai/AaiServiceProvider.java
deleted file mode 100644
index f527b6cd97..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/aai/AaiServiceProvider.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.lcm.extclients.aai;
-
-import org.onap.aai.domain.yang.EsrSystemInfoList;
-import org.onap.aai.domain.yang.EsrVnfm;
-import org.onap.aai.domain.yang.EsrVnfmList;
-import org.onap.aai.domain.yang.GenericVnf;
-import org.onap.aai.domain.yang.GenericVnfs;
-import org.onap.aai.domain.yang.Vserver;
-import org.onap.so.adapters.etsisol003adapter.lcm.v1.model.Tenant;
-
-/**
- * Provides methods for invoking REST calls to AAI.
- */
-public interface AaiServiceProvider {
-
- /**
- * Invoke a get request for a generic VNF.
- *
- * @param vnfId the VNF id
- * @return the generic VNF
- */
- GenericVnf invokeGetGenericVnf(final String vnfId);
-
- /**
- * Invoke a query for a generic VNF with the given selfLink
- *
- * @param selfLink the selfLink
- * @return the matching generic vnfs
- */
- GenericVnfs invokeQueryGenericVnf(final String selfLink);
-
- /**
- * Invoke a GET request for the VNFMs.
- *
- * @return the VNFMs
- */
- EsrVnfmList invokeGetVnfms();
-
- /**
- * Invoke a GET request for the esr system info list for a VNFM.
- *
- * @return the esr system info list for the VNFM
- */
- EsrSystemInfoList invokeGetVnfmEsrSystemInfoList(final String vnfmId);
-
- /**
- * Invoke a GET request for the a VNFM.
- *
- * @param vnfmId the ID of the VNFM
- * @return the VNFM
- */
- EsrVnfm invokeGetVnfm(final String vnfmId);
-
- /**
- * Invoke a PATCH request for a generic vnf.
- *
- * @param vnf the generic vnf
- * @return
- */
- void invokePatchGenericVnf(GenericVnf vnf);
-
- /**
- * Invoke a PUT request for a relationship from a generic vnf to a VNFM.
- *
- * @param vnf the generic vnf
- * @param vnfmId the ID of the VNFM
- * @return
- */
- void invokePutGenericVnfToVnfmRelationship(GenericVnf vnf, final String vnfmId);
-
-
- /**
- * Invoke a PUT request for a vserver.
- *
- * @param cloudOwner the cloud owner
- * @param cloudRegion the cloud region
- * @param tenantId the ID of the tenant
- * @param vserver the vserver
- * @return
- */
- void invokePutVserver(final String cloudOwner, final String cloudRegion, final String tenantId,
- final Vserver vserver);
-
- /**
- * Invoke a PUT request for a relationship from a vserver to a generic vnf.
- *
- * @param cloudOwner the cloud owner
- * @param cloudRegion the cloud region the vserver is deployed on
- * @param tenantId the ID of the tenant the vserver is deployed on
- * @param vserver the vserver
- * @param vnfId the ID of the generic vnf
- * @return
- */
- void invokePutVserverToVnfRelationship(final String cloudOwner, final String cloudRegion, final String tenantId,
- final Vserver vserver, final String vnfId);
-
- /**
- * Invoke a DELETE request for a vserver.
- *
- * @param cloudOwner the cloud owner
- * @param cloudRegion the cloud region
- * @param tenantId the ID of the tenant
- * @param vserverId the ID of the vserver
- * @return
- */
- void invokeDeleteVserver(final String cloudOwner, final String cloudRegion, final String tenantId,
- final String vserverId);
-
- /**
- * Invoke a GET request for the a tenant.
- *
- * @param cloudOwner the cloud owner
- * @param cloudRegion the cloud region
- * @param tenantId the ID of the tenant
- * @return the tenant
- */
- Tenant invokeGetTenant(final String cloudOwner, final String cloudRegion, final String tenantId);
-
- /**
- * Invoke a GET request for the esr system info list for a cloud region.
- *
- * @param cloudOwner the cloud owner
- * @param cloudRegion the cloud region
- * @return the esr system info list for the VNFM
- */
- EsrSystemInfoList invokeGetCloudRegionEsrSystemInfoList(final String cloudOwner, final String cloudRegion);
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/aai/AaiServiceProviderImpl.java b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/aai/AaiServiceProviderImpl.java
deleted file mode 100644
index 8f95d8ab85..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/aai/AaiServiceProviderImpl.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.lcm.extclients.aai;
-
-import org.onap.aai.domain.yang.EsrSystemInfoList;
-import org.onap.aai.domain.yang.EsrVnfm;
-import org.onap.aai.domain.yang.EsrVnfmList;
-import org.onap.aai.domain.yang.GenericVnf;
-import org.onap.aai.domain.yang.GenericVnfs;
-import org.onap.aai.domain.yang.Vserver;
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
-import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
-import org.onap.aaiclient.client.graphinventory.entities.uri.Depth;
-import org.onap.so.adapters.etsisol003adapter.lcm.v1.model.Tenant;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-@Service
-public class AaiServiceProviderImpl implements AaiServiceProvider {
-
- private static final Logger logger = LoggerFactory.getLogger(AaiServiceProviderImpl.class);
- private final AaiClientProvider aaiClientProvider;
-
- @Autowired
- public AaiServiceProviderImpl(final AaiClientProvider aaiClientProvider) {
- this.aaiClientProvider = aaiClientProvider;
- }
-
- @Override
- public GenericVnf invokeGetGenericVnf(final String vnfId) {
- return aaiClientProvider.getAaiClient()
- .get(GenericVnf.class,
- AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId)))
- .orElseGet(() -> {
- logger.debug("No vnf found in AAI with ID: {}", vnfId);
- return null;
- });
- }
-
- @Override
- public GenericVnfs invokeQueryGenericVnf(final String selfLink) {
- return aaiClientProvider.getAaiClient().get(GenericVnfs.class, AAIUriFactory
- .createResourceUri(AAIFluentTypeBuilder.network().genericVnfs()).queryParam("selflink", selfLink))
- .orElseGet(() -> {
- logger.debug("No vnf found in AAI with selflink: {}", selfLink);
- return null;
- });
- }
-
- @Override
- public EsrVnfmList invokeGetVnfms() {
- return aaiClientProvider.getAaiClient()
- .get(EsrVnfmList.class,
- AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.externalSystem().esrVnfmList()))
- .orElseGet(() -> {
- logger.debug("No VNFMs in AAI");
- return null;
- });
- }
-
- @Override
- public EsrVnfm invokeGetVnfm(final String vnfmId) {
- return aaiClientProvider.getAaiClient()
- .get(EsrVnfm.class, AAIUriFactory
- .createResourceUri(AAIFluentTypeBuilder.externalSystem().esrVnfm(vnfmId)).depth(Depth.ONE))
- .orElseGet(() -> {
- logger.debug("VNFM not found in AAI");
- return null;
- });
- }
-
- @Override
- public EsrSystemInfoList invokeGetVnfmEsrSystemInfoList(final String vnfmId) {
- return aaiClientProvider.getAaiClient()
- .get(EsrSystemInfoList.class,
- AAIUriFactory.createResourceUri(
- AAIFluentTypeBuilder.externalSystem().esrVnfm(vnfmId).esrSystemInfoList()))
- .orElseGet(() -> {
- logger.debug("VNFM ESR system info list not found in AAI");
- return null;
- });
- }
-
- @Override
- public void invokePatchGenericVnf(final GenericVnf vnf) {
- aaiClientProvider.getAaiClient().update(
- AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnf.getVnfId())), vnf);
- }
-
- @Override
- public void invokePutGenericVnfToVnfmRelationship(final GenericVnf vnf, final String vnfmId) {
- aaiClientProvider.getAaiClient().connect(
- AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.externalSystem().esrVnfm(vnfmId)),
- AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnf.getVnfId())));
- }
-
- @Override
- public void invokePutVserver(final String cloudOwner, final String cloudRegion, final String tenant,
- final Vserver vserver) {
- aaiClientProvider
- .getAaiClient().create(
- AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
- .cloudRegion(cloudOwner, cloudRegion).tenant(tenant).vserver(vserver.getVserverId())),
- vserver);
- }
-
- @Override
- public void invokePutVserverToVnfRelationship(final String cloudOwner, final String cloudRegion,
- final String tenant, final Vserver vserver, final String vnfId) {
- aaiClientProvider.getAaiClient().connect(
- AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
- .cloudRegion(cloudOwner, cloudRegion).tenant(tenant).vserver(vserver.getVserverId())),
- AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId)));
- }
-
- @Override
- public void invokeDeleteVserver(final String cloudOwner, final String cloudRegion, final String tenant,
- final String vserverId) {
- aaiClientProvider.getAaiClient().delete(AAIUriFactory.createResourceUri(AAIFluentTypeBuilder
- .cloudInfrastructure().cloudRegion(cloudOwner, cloudRegion).tenant(tenant).vserver(vserverId)));
- }
-
- @Override
- public Tenant invokeGetTenant(final String cloudOwner, final String cloudRegion, final String tenantId) {
- return aaiClientProvider.getAaiClient().get(Tenant.class, AAIUriFactory.createResourceUri(
- AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(cloudOwner, cloudRegion).tenant(tenantId)))
- .orElseGet(() -> {
- logger.debug("Tenant not found in AAI");
- return null;
- });
- }
-
- @Override
- public EsrSystemInfoList invokeGetCloudRegionEsrSystemInfoList(final String cloudOwner, final String cloudRegion) {
- return aaiClientProvider
- .getAaiClient().get(EsrSystemInfoList.class, AAIUriFactory.createResourceUri(AAIFluentTypeBuilder
- .cloudInfrastructure().cloudRegion(cloudOwner, cloudRegion).esrSystemInfoList()))
- .orElseGet(() -> {
- logger.debug("Cloud esr system info list not found in AAI");
- return null;
- });
- }
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/aai/OamIpAddressSource.java b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/aai/OamIpAddressSource.java
deleted file mode 100644
index b81925241c..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/aai/OamIpAddressSource.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.lcm.extclients.aai;
-
-/**
- * Represents the source of the value to use as the AAI OAM IP address of a VNF
- */
-public class OamIpAddressSource {
-
- private final OamIpAddressType type;
- private final String value;
-
- public OamIpAddressSource(final OamIpAddressType type, final String value) {
- this.type = type;
- this.value = value;
- }
-
- public OamIpAddressType getType() {
- return type;
- }
-
- public String getValue() {
- return value;
- }
-
- public enum OamIpAddressType {
- /**
- * The value passed in {@link OamIpAddress#OamIpAddress(OamIpAddressType, String)} is to be used directly as the
- * OAM IP address
- */
- LITERAL,
- /**
- * The OAM IP address is to be retrieved from the vnfConfigurableProperties returned from the VNFM using the
- * value passed in {@link OamIpAddress#OamIpAddress(OamIpAddressType, String)} as the name of a property
- */
- CONFIGURABLE_PROPERTY
- }
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/vim/model/AccessInfo.java b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/vim/model/AccessInfo.java
deleted file mode 100644
index 139df248d4..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/vim/model/AccessInfo.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.lcm.extclients.vim.model;
-
-import java.util.Objects;
-
-public class AccessInfo {
-
- protected String projectId;
- protected String projectName;
- protected String domainName;
- protected VimCredentials credentials;
-
- public String getProjectId() {
- return projectId;
- }
-
- public void setProjectId(final String value) {
- projectId = value;
- }
-
- public String getProjectName() {
- return projectName;
- }
-
- public void setProjectName(final String value) {
- projectName = value;
- }
-
- public String getDomainName() {
- return domainName;
- }
-
- public void setDomainName(final String value) {
- domainName = value;
- }
-
- public VimCredentials getCredentials() {
- return credentials;
- }
-
- public void setCredentials(final VimCredentials value) {
- credentials = value;
- }
-
- @Override
- public boolean equals(final java.lang.Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- final AccessInfo accessInfo = (AccessInfo) o;
- return Objects.equals(this.projectId, accessInfo.projectId)
- && Objects.equals(this.projectName, accessInfo.projectName)
- && Objects.equals(this.domainName, accessInfo.domainName)
- && Objects.equals(this.credentials, accessInfo.credentials);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(projectId, projectName, domainName, credentials);
- }
-
- @Override
- public String toString() {
- final StringBuilder sb = new StringBuilder();
- sb.append("class AccessInfo {\n");
-
- sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n");
- sb.append(" projectName: ").append(toIndentedString(projectName)).append("\n");
- sb.append(" domainName: ").append(toIndentedString(domainName)).append("\n");
- sb.append(" credentials: ").append(toIndentedString(credentials)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(final java.lang.Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/vim/model/InterfaceInfo.java b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/vim/model/InterfaceInfo.java
deleted file mode 100644
index 9d4355a0c4..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/vim/model/InterfaceInfo.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.lcm.extclients.vim.model;
-
-import java.util.Objects;
-
-public class InterfaceInfo {
-
- protected String identityEndPoint;
-
- public String getIdentityEndPoint() {
- return identityEndPoint;
- }
-
- public void setIdentityEndPoint(final String value) {
- identityEndPoint = value;
- }
-
- @Override
- public boolean equals(final java.lang.Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- final InterfaceInfo interfaceInfo = (InterfaceInfo) o;
- return Objects.equals(this.identityEndPoint, interfaceInfo.identityEndPoint);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(identityEndPoint);
- }
-
- @Override
- public String toString() {
- final StringBuilder sb = new StringBuilder();
- sb.append("class InterfaceInfo {\n");
-
- sb.append(" identityEndPoint: ").append(toIndentedString(identityEndPoint)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(final java.lang.Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/vim/model/VimCredentials.java b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/vim/model/VimCredentials.java
deleted file mode 100644
index fd1a9078bb..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/vim/model/VimCredentials.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.lcm.extclients.vim.model;
-
-import java.util.Objects;
-
-public class VimCredentials {
-
- protected String username;
-
- protected String password;
-
- public String getUsername() {
- return username;
- }
-
- public void setUsername(final String value) {
- username = value;
- }
-
- public String getPassword() {
- return password;
- }
-
- public void setPassword(final String password) {
- this.password = password;
- }
-
- @Override
- public boolean equals(final java.lang.Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- final VimCredentials vimCredentials = (VimCredentials) o;
- return Objects.equals(this.username, vimCredentials.username)
- && Objects.equals(this.password, vimCredentials.password);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(username, password);
- }
-
- @Override
- public String toString() {
- final StringBuilder sb = new StringBuilder();
- sb.append("class AccessInfo {\n");
-
- sb.append(" username: ").append(toIndentedString(username)).append("\n");
- sb.append(" password: ").append(toIndentedString(password)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(final java.lang.Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/vnfm/VnfmHelper.java b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/vnfm/VnfmHelper.java
deleted file mode 100644
index 9155261bd2..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/vnfm/VnfmHelper.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm;
-
-import java.security.GeneralSecurityException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import org.apache.commons.lang3.tuple.ImmutablePair;
-import org.onap.aai.domain.yang.EsrSystemInfo;
-import org.onap.so.adapters.etsi.sol003.adapter.common.VnfmAdapterUrlProvider;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.aai.AaiServiceProvider;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vim.model.AccessInfo;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vim.model.InterfaceInfo;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vim.model.VimCredentials;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.InstantiateVnfRequest;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.LccnSubscriptionRequest;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.SubscriptionsAuthentication;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.SubscriptionsAuthentication.AuthTypeEnum;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.SubscriptionsAuthenticationParamsBasic;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.SubscriptionsAuthenticationParamsOauth2ClientCredentials;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.SubscriptionsFilter;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.SubscriptionsFilter.NotificationTypesEnum;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.SubscriptionsFilterVnfInstanceSubscriptionFilter;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.VnfInstancesvnfInstanceIdinstantiateExtVirtualLinks;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.VnfInstancesvnfInstanceIdinstantiateVimConnectionInfo;
-import org.onap.so.adapters.etsisol003adapter.lcm.grant.model.InlineResponse201VimConnections;
-import org.onap.so.adapters.etsisol003adapter.lcm.v1.model.CreateVnfRequest;
-import org.onap.so.adapters.etsisol003adapter.lcm.v1.model.ExternalVirtualLink;
-import org.onap.so.adapters.etsisol003adapter.lcm.v1.model.Tenant;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.google.common.reflect.TypeToken;
-import com.google.gson.Gson;
-import com.google.gson.JsonElement;
-import com.google.gson.JsonObject;
-
-/**
- * Provides helper methods for interactions with VNFM.
- */
-@Service
-public class VnfmHelper {
-
- private static final Logger logger = LoggerFactory.getLogger(VnfmHelper.class);
- private static final String SEPARATOR = "_";
- private final AaiServiceProvider aaiServiceProvider;
- private final VnfmAdapterUrlProvider vnfmAdapterUrlProvider;
-
- @Autowired
- public VnfmHelper(final AaiServiceProvider aaiServiceProvider,
- final VnfmAdapterUrlProvider vnfmAdapterUrlProvider) {
- this.aaiServiceProvider = aaiServiceProvider;
- this.vnfmAdapterUrlProvider = vnfmAdapterUrlProvider;
- }
-
- /**
- * Create an {@link InstantiateVnfRequest} to send in an instantiation request to a VNFM.
- *
- * @param tenant the tenant the request is to be fulfilled on
- * @param createVnfRequest the request received by the VNFM adapter
- */
- public InstantiateVnfRequest createInstantiateRequest(final Tenant tenant, final CreateVnfRequest createVnfRequest,
- final String flavourId) {
- final InstantiateVnfRequest instantiateVnfRequest = new InstantiateVnfRequest();
- instantiateVnfRequest.setFlavourId(flavourId);
- instantiateVnfRequest.setVimConnectionInfo(getVimConnectionInfos(tenant));
- instantiateVnfRequest
- .setAdditionalParams(getAdditionalParametersAsJsonObject(createVnfRequest.getAdditionalParams()));
- instantiateVnfRequest.setExtVirtualLinks(getExternalVirtualLinks(createVnfRequest.getExternalVirtualLinks()));
- createVnfRequest.getExternalVirtualLinks();
- return instantiateVnfRequest;
- }
-
- private List<VnfInstancesvnfInstanceIdinstantiateVimConnectionInfo> getVimConnectionInfos(final Tenant tenant) {
- final List<VnfInstancesvnfInstanceIdinstantiateVimConnectionInfo> connectionInfos = new ArrayList<>();
- connectionInfos.add(getVimConnectionInfo(tenant));
- return connectionInfos;
- }
-
- private VnfInstancesvnfInstanceIdinstantiateVimConnectionInfo getVimConnectionInfo(final Tenant tenant) {
- final EsrSystemInfo esrSystemInfo =
- aaiServiceProvider.invokeGetCloudRegionEsrSystemInfoList(tenant.getCloudOwner(), tenant.getRegionName())
- .getEsrSystemInfo().iterator().next();
-
- final VnfInstancesvnfInstanceIdinstantiateVimConnectionInfo vnfInstancesVimConnectionInfo =
- new VnfInstancesvnfInstanceIdinstantiateVimConnectionInfo();
- final String vimId = createVimId(tenant.getCloudOwner(), tenant.getRegionName());
- vnfInstancesVimConnectionInfo.setId(vimId);
- vnfInstancesVimConnectionInfo.setVimId(vimId);
- vnfInstancesVimConnectionInfo.setVimType(esrSystemInfo.getType());
- vnfInstancesVimConnectionInfo.setInterfaceInfo(getInterfaceInfo(esrSystemInfo.getServiceUrl()));
- vnfInstancesVimConnectionInfo.setAccessInfo(getAccessInfo(esrSystemInfo, tenant.getTenantId()));
- return vnfInstancesVimConnectionInfo;
- }
-
- private InterfaceInfo getInterfaceInfo(final String url) {
- final InterfaceInfo interfaceInfo = new InterfaceInfo();
- interfaceInfo.setIdentityEndPoint(url);
- return interfaceInfo;
- }
-
- private AccessInfo getAccessInfo(final EsrSystemInfo esrSystemInfo, final String tenantId) {
- final AccessInfo accessInfo = new AccessInfo();
- accessInfo.setProjectId(tenantId);
- accessInfo.setDomainName(esrSystemInfo.getCloudDomain());
-
- final VimCredentials vimCredentials = new VimCredentials();
- vimCredentials.setUsername(esrSystemInfo.getUserName());
- vimCredentials.setPassword(esrSystemInfo.getPassword());
- accessInfo.setCredentials(vimCredentials);
- return accessInfo;
- }
-
- private String createVimId(final String cloudOwner, final String cloudRegion) {
- return cloudOwner + SEPARATOR + cloudRegion;
- }
-
- private JsonObject getAdditionalParametersAsJsonObject(final Map<String, String> additionalParameters) {
- final JsonObject additionalParametersJsonObject = new JsonObject();
- if (additionalParameters != null) {
- for (final Map.Entry<String, JsonElement> item : new Gson().toJsonTree(additionalParameters)
- .getAsJsonObject().entrySet()) {
- additionalParametersJsonObject.add(item.getKey(), item.getValue());
- }
- } else {
- logger.warn("No additional parameters were specified for the operation");
- }
- return additionalParametersJsonObject;
- }
-
- private List<VnfInstancesvnfInstanceIdinstantiateExtVirtualLinks> getExternalVirtualLinks(
- final List<ExternalVirtualLink> extVirtualLinks) {
- if (extVirtualLinks != null) {
- final String extVirtualLinksJsonObject =
- new Gson().toJson(extVirtualLinks, new TypeToken<List<ExternalVirtualLink>>() {}.getType());
- return new Gson().fromJson(extVirtualLinksJsonObject,
- new TypeToken<List<VnfInstancesvnfInstanceIdinstantiateExtVirtualLinks>>() {}.getType());
- }
- return null;
- }
-
- /**
- * Create a {@link LccnSubscriptionRequest} to send in an notification subscription request to a VNFM.
- *
- * @param the ID of the VNF notifications are required for
- * @return the request
- * @throws GeneralSecurityException
- */
- public LccnSubscriptionRequest createNotificationSubscriptionRequest(final String vnfId)
- throws GeneralSecurityException {
- final LccnSubscriptionRequest lccnSubscriptionRequest = new LccnSubscriptionRequest();
- lccnSubscriptionRequest.setAuthentication(getSubscriptionsAuthentication());
- lccnSubscriptionRequest.setCallbackUri(vnfmAdapterUrlProvider.getVnfLcmOperationOccurrenceNotificationUrl());
- final SubscriptionsFilter filter = new SubscriptionsFilter();
- filter.addNotificationTypesItem(NotificationTypesEnum.VNFLCMOPERATIONOCCURRENCENOTIFICATION);
- final SubscriptionsFilterVnfInstanceSubscriptionFilter vnfInstanceSubscriptionFilter =
- new SubscriptionsFilterVnfInstanceSubscriptionFilter();
- vnfInstanceSubscriptionFilter.addVnfInstanceIdsItem(vnfId);
- filter.setVnfInstanceSubscriptionFilter(vnfInstanceSubscriptionFilter);
- lccnSubscriptionRequest.setFilter(filter);
- return lccnSubscriptionRequest;
- }
-
- private SubscriptionsAuthentication getSubscriptionsAuthentication() throws GeneralSecurityException {
- final SubscriptionsAuthentication authentication = new SubscriptionsAuthentication();
-
- final ImmutablePair<String, String> decrypedAuth = vnfmAdapterUrlProvider.getDecryptAuth();
-
- final SubscriptionsAuthenticationParamsOauth2ClientCredentials oauthParams =
- new SubscriptionsAuthenticationParamsOauth2ClientCredentials();
- oauthParams.setTokenEndpoint(vnfmAdapterUrlProvider.getOauthTokenUrl());
- oauthParams.clientId(decrypedAuth.getLeft());
- oauthParams.setClientPassword(decrypedAuth.getRight());
- authentication.addAuthTypeItem(AuthTypeEnum.OAUTH2_CLIENT_CREDENTIALS);
- authentication.paramsOauth2ClientCredentials(oauthParams);
-
- final SubscriptionsAuthenticationParamsBasic basicAuthParams = new SubscriptionsAuthenticationParamsBasic();
- basicAuthParams.setUserName(decrypedAuth.getLeft());
- basicAuthParams.setPassword(decrypedAuth.getRight());
- authentication.addAuthTypeItem(AuthTypeEnum.BASIC);
- authentication.paramsBasic(basicAuthParams);
-
- authentication.addAuthTypeItem(AuthTypeEnum.TLS_CERT);
- return authentication;
- }
-
- /**
- * Get the VIM connections for a tenant
- *
- * @param tenant the tenant
- * @return the VIM connections
- */
- public InlineResponse201VimConnections getVimConnections(final Tenant tenant) {
- final EsrSystemInfo esrSystemInfo =
- aaiServiceProvider.invokeGetCloudRegionEsrSystemInfoList(tenant.getCloudOwner(), tenant.getRegionName())
- .getEsrSystemInfo().iterator().next();
-
- final InlineResponse201VimConnections vimConnection = new InlineResponse201VimConnections();
- vimConnection.setId(createVimId(tenant.getCloudOwner(), tenant.getRegionName()));
- vimConnection.setVimId(vimConnection.getId());
- vimConnection.setVimType(esrSystemInfo.getType());
- vimConnection.setInterfaceInfo(getInterfaceInfo(esrSystemInfo.getServiceUrl()));
- vimConnection.setAccessInfo(getAccessInfo(esrSystemInfo, tenant.getTenantId()));
- return vimConnection;
- }
-
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/vnfm/VnfmRestTemplateConfiguration.java b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/vnfm/VnfmRestTemplateConfiguration.java
deleted file mode 100644
index 2c7ddd1d49..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/vnfm/VnfmRestTemplateConfiguration.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2020 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm;
-
-import org.onap.logging.filter.spring.SpringClientPayloadFilter;
-import org.onap.so.configuration.rest.HttpComponentsClientConfiguration;
-import org.onap.so.logging.jaxrs.filter.SOSpringClientFilter;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.http.client.BufferingClientHttpRequestFactory;
-import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
-import org.springframework.web.client.RestTemplate;
-
-/**
- * @author Waqas Ikram (waqas.ikram@est.tech)
- *
- */
-@Configuration
-public class VnfmRestTemplateConfiguration {
-
- public static final String SOL003_LCM_REST_TEMPLATE = "Sol003LcmRestTemplate";
-
- @Autowired
- private HttpComponentsClientConfiguration httpComponentsClientConfiguration;
-
- @Bean
- @Qualifier(SOL003_LCM_REST_TEMPLATE)
- public RestTemplate sol003LcmRestTemplate() {
- final HttpComponentsClientHttpRequestFactory clientHttpRequestFactory =
- httpComponentsClientConfiguration.httpComponentsClientHttpRequestFactory();
- final RestTemplate restTemplate =
- new RestTemplate(new BufferingClientHttpRequestFactory(clientHttpRequestFactory));
- restTemplate.getInterceptors().add(new SOSpringClientFilter());
- restTemplate.getInterceptors().add((new SpringClientPayloadFilter()));
- return restTemplate;
- }
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/vnfm/VnfmServiceProvider.java b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/vnfm/VnfmServiceProvider.java
deleted file mode 100644
index a6c6740235..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/vnfm/VnfmServiceProvider.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm;
-
-import org.onap.aai.domain.yang.EsrVnfm;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.CreateVnfRequest;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.InlineResponse200;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.InlineResponse2001;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.InlineResponse201;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.InstantiateVnfRequest;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.LccnSubscriptionRequest;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.TerminateVnfRequest;
-import com.google.common.base.Optional;
-
-/**
- * Provides methods for invoking REST calls to a VNFM.
- */
-public interface VnfmServiceProvider {
-
- /**
- * Invoke a get request for a VNF.
- *
- * @param vnfm the VNFM in AAI
- * @param vnfSelfLink the link to the VNF in the VNFM
- * @return the VNF from the VNFM
- */
- Optional<InlineResponse201> getVnf(final EsrVnfm vnfm, final String vnfSelfLink);
-
- /**
- * Invoke an instantiate request for a VNF.
- *
- * @param vnfm the VNFM in AAI
- * @param vnfSelfLink the link to he VNF on the VNFM
- * @param instantiateVnfRequest the instantiate request
- * @return the operation ID of the instantiation operation
- */
- String instantiateVnf(final EsrVnfm vnfm, final String vnfSelfLink,
- final InstantiateVnfRequest instantiateVnfRequest);
-
- /**
- * Invoke a notification subscription request to a VNFM.
- *
- * @param vnfm the VNFM in AAI
- * @param subscriptionRequest
- * @return the response to the subscription request
- */
- InlineResponse2001 subscribeForNotifications(final EsrVnfm vnfm, final LccnSubscriptionRequest subscriptionRequest);
-
- /**
- * Invoke a terminate request for a VNF.
- *
- * @param vnfm the VNFM in AAI
- * @param vnfSelfLink the link to he VNF on the VNFM
- * @param terminateVnfRequest the terminate request
- * @return the operation ID of the termination operation
- */
- String terminateVnf(final EsrVnfm vnfm, final String vnfSelfLink, final TerminateVnfRequest terminateVnfRequest);
-
- /**
- * Invoke a delete request for a VNF.
- *
- * @param vnfm the VNFM in AAI
- * @param vnfSelfLink the link to he VNF on the VNFM
- * @return the operation ID of the instantiation operation
- */
- void deleteVnf(final EsrVnfm vnfm, final String vnfSelfLink);
-
- /**
- * Invoke a get request for a VNFM operation.
- *
- * @param vnfm the VNFM in AAI
- * @param operationId the id of the operation on the VNFM
- * @return the operation from the VNFM
- */
- Optional<InlineResponse200> getOperation(final EsrVnfm vnfm, final String operationId);
-
- /**
- * Invoke a create request to a VNFM
- *
- * @param vnfm the VNFM in AAI
- * @param createVnfRequest the parameters for creating a VNF
- * @return the newly created VNF
- */
- Optional<InlineResponse201> createVnf(final EsrVnfm vnfm, final CreateVnfRequest createVnfRequest);
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/vnfm/VnfmServiceProviderConfiguration.java b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/vnfm/VnfmServiceProviderConfiguration.java
deleted file mode 100644
index 1ed3ec9ff2..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/vnfm/VnfmServiceProviderConfiguration.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm;
-
-import java.io.IOException;
-import java.security.KeyManagementException;
-import java.security.KeyStore;
-import java.security.KeyStoreException;
-import java.security.NoSuchAlgorithmException;
-import java.security.UnrecoverableKeyException;
-import java.security.cert.CertificateException;
-import java.util.Map;
-import java.util.UUID;
-import java.util.concurrent.ConcurrentHashMap;
-import javax.net.ssl.SSLContext;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.http.client.HttpClient;
-import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
-import org.apache.http.impl.client.HttpClients;
-import org.apache.http.ssl.SSLContextBuilder;
-import org.onap.aai.domain.yang.EsrSystemInfo;
-import org.onap.aai.domain.yang.EsrVnfm;
-import org.onap.so.adapters.etsi.sol003.adapter.common.configuration.AbstractServiceProviderConfiguration;
-import org.onap.so.adapters.etsisol003adapter.lcm.v1.JSON;
-import org.onap.so.configuration.rest.BasicHttpHeadersProvider;
-import org.onap.so.rest.service.HttpRestServiceProvider;
-import org.onap.so.rest.service.HttpRestServiceProviderImpl;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.core.io.Resource;
-import org.springframework.http.client.BufferingClientHttpRequestFactory;
-import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
-import org.springframework.security.oauth2.client.OAuth2RestTemplate;
-import org.springframework.security.oauth2.client.token.grant.client.ClientCredentialsResourceDetails;
-import org.springframework.web.client.RestTemplate;
-import com.google.gson.Gson;
-
-/**
- * Configures the HttpRestServiceProvider for REST call to a VNFM.
- */
-@Configuration
-public class VnfmServiceProviderConfiguration extends AbstractServiceProviderConfiguration {
-
- private static final Logger logger = LoggerFactory.getLogger(VnfmServiceProviderConfiguration.class);
- private final Map<String, HttpRestServiceProvider> mapOfVnfmIdToHttpRestServiceProvider = new ConcurrentHashMap<>();
-
- @Value("${http.client.ssl.trust-store:#{null}}")
- private Resource trustStore;
- @Value("${http.client.ssl.trust-store-password:#{null}}")
- private String trustStorePassword;
-
- @Value("${server.ssl.key-store:#{null}}")
- private Resource keyStoreResource;
- @Value("${server.ssl.key--store-password:#{null}}")
- private String keyStorePassword;
-
- /**
- * This property is only intended to be temporary until the AAI schema is updated to support setting the endpoint
- */
- @Value("${vnfmadapter.temp.vnfm.oauth.endpoint:#{null}}")
- private String oauthEndpoint;
-
- @Qualifier(VnfmRestTemplateConfiguration.SOL003_LCM_REST_TEMPLATE)
- @Autowired
- private RestTemplate defaultRestTemplate;
-
- public HttpRestServiceProvider getHttpRestServiceProvider(final EsrVnfm vnfm) {
- if (!mapOfVnfmIdToHttpRestServiceProvider.containsKey(vnfm.getVnfmId())) {
- mapOfVnfmIdToHttpRestServiceProvider.put(vnfm.getVnfmId(), createHttpRestServiceProvider(vnfm));
- }
- return mapOfVnfmIdToHttpRestServiceProvider.get(vnfm.getVnfmId());
- }
-
- private HttpRestServiceProvider createHttpRestServiceProvider(final EsrVnfm vnfm) {
- final RestTemplate restTemplate = createRestTemplate(vnfm);
- setGsonMessageConverter(restTemplate);
- if (trustStore != null) {
- setTrustStore(restTemplate);
- }
- return new HttpRestServiceProviderImpl(restTemplate, new BasicHttpHeadersProvider().getHttpHeaders());
- }
-
- private RestTemplate createRestTemplate(final EsrVnfm vnfm) {
- if (vnfm != null) {
- for (final EsrSystemInfo esrSystemInfo : vnfm.getEsrSystemInfoList().getEsrSystemInfo()) {
- if (!StringUtils.isEmpty(esrSystemInfo.getUserName())
- && !StringUtils.isEmpty(esrSystemInfo.getPassword())) {
- return createOAuth2RestTemplate(esrSystemInfo);
- }
- }
- }
- return defaultRestTemplate;
- }
-
- private OAuth2RestTemplate createOAuth2RestTemplate(final EsrSystemInfo esrSystemInfo) {
- logger.debug("Getting OAuth2RestTemplate ...");
- final ClientCredentialsResourceDetails resourceDetails = new ClientCredentialsResourceDetails();
- resourceDetails.setId(UUID.randomUUID().toString());
- resourceDetails.setClientId(esrSystemInfo.getUserName());
- resourceDetails.setClientSecret(esrSystemInfo.getPassword());
- resourceDetails.setAccessTokenUri(
- oauthEndpoint == null ? esrSystemInfo.getServiceUrl().replace("vnflcm/v1", "oauth/token")
- : oauthEndpoint);
- resourceDetails.setGrantType("client_credentials");
- return new OAuth2RestTemplate(resourceDetails);
- }
-
- private void setTrustStore(final RestTemplate restTemplate) {
- SSLContext sslContext;
- try {
- if (keyStoreResource != null) {
- final KeyStore keystore = KeyStore.getInstance("pkcs12");
- keystore.load(keyStoreResource.getInputStream(), keyStorePassword.toCharArray());
- sslContext =
- new SSLContextBuilder().loadTrustMaterial(trustStore.getURL(), trustStorePassword.toCharArray())
- .loadKeyMaterial(keystore, keyStorePassword.toCharArray()).build();
- } else {
- sslContext = new SSLContextBuilder()
- .loadTrustMaterial(trustStore.getURL(), trustStorePassword.toCharArray()).build();
- }
- logger.info("Setting truststore: {}", trustStore.getURL());
- final SSLConnectionSocketFactory socketFactory = new SSLConnectionSocketFactory(sslContext);
- final HttpClient httpClient = HttpClients.custom().setSSLSocketFactory(socketFactory).build();
- final HttpComponentsClientHttpRequestFactory factory =
- new HttpComponentsClientHttpRequestFactory(httpClient);
- restTemplate.setRequestFactory(new BufferingClientHttpRequestFactory(factory));
- } catch (KeyManagementException | NoSuchAlgorithmException | KeyStoreException | CertificateException
- | IOException | UnrecoverableKeyException exception) {
- logger.error("Error reading truststore, TLS connection to VNFM will fail.", exception);
- }
- }
-
- @Override
- protected Gson getGson() {
- return new JSON().getGson();
- }
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/vnfm/VnfmServiceProviderImpl.java b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/vnfm/VnfmServiceProviderImpl.java
deleted file mode 100644
index 6e0978a106..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/vnfm/VnfmServiceProviderImpl.java
+++ /dev/null
@@ -1,203 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm;
-
-import org.onap.aai.domain.yang.EsrVnfm;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.CreateVnfRequest;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.InlineResponse200;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.InlineResponse2001;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.InlineResponse201;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.InlineResponse201.InstantiationStateEnum;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.InstantiateVnfRequest;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.LccnSubscriptionRequest;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.TerminateVnfRequest;
-import org.onap.so.adapters.etsisol003adapter.lcm.jobmanagement.JobManager;
-import org.onap.so.adapters.etsisol003adapter.lcm.rest.exceptions.VnfmRequestFailureException;
-import org.onap.so.rest.exceptions.RestProcessingException;
-import org.onap.so.rest.service.HttpRestServiceProvider;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
-import org.springframework.stereotype.Service;
-import com.google.common.base.Optional;
-import java.util.List;
-
-@Service
-public class VnfmServiceProviderImpl implements VnfmServiceProvider {
- private static final Logger logger = LoggerFactory.getLogger(VnfmServiceProviderImpl.class);
- private static final String MESSAGE_RESULTED_IN_EXCEPTION = " resulted in exception";
- private static final String MESSAGE_REQUEST = ", request: ";
- private static final String MESSAGE_TERMINATE_REQUEST_TO = "Terminate request to ";
-
- private final VnfmServiceProviderConfiguration vnfmServiceProviderConfiguration;
- private final VnfmUrlProvider urlProvider;
-
- @Autowired
- public VnfmServiceProviderImpl(final VnfmUrlProvider urlProvider,
- final VnfmServiceProviderConfiguration vnfmServiceProviderConfiguration) {
- this.vnfmServiceProviderConfiguration = vnfmServiceProviderConfiguration;
- this.urlProvider = urlProvider;
- }
-
- @Override
- public Optional<InlineResponse201> getVnf(final EsrVnfm vnfm, final String vnfSelfLink) {
- return getHttpServiceProvider(vnfm).get(vnfSelfLink, InlineResponse201.class);
- }
-
- @Override
- public String instantiateVnf(final EsrVnfm vnfm, final String vnfSelfLink,
- final InstantiateVnfRequest instantiateVnfRequest) {
- logger.debug("Sending instantiate request {} to : {}", instantiateVnfRequest, vnfSelfLink);
- ResponseEntity<Void> response = null;
- try {
- response = getHttpServiceProvider(vnfm).postHttpRequest(instantiateVnfRequest, vnfSelfLink + "/instantiate",
- Void.class);
- } catch (final Exception exception) {
- final String errorMessage =
- "Instantiate request to " + vnfSelfLink + MESSAGE_RESULTED_IN_EXCEPTION + instantiateVnfRequest;
- logger.error(errorMessage);
- throw new VnfmRequestFailureException(errorMessage, exception);
- }
- if (response.getStatusCode() != HttpStatus.ACCEPTED) {
- final String errorMessage = "Instantiate request to " + vnfSelfLink + " returned status code: "
- + response.getStatusCode() + MESSAGE_REQUEST + instantiateVnfRequest;
- logger.error(errorMessage);
- throw new VnfmRequestFailureException(errorMessage);
- }
- String locationHeader = getLocationHeader(response);
- return locationHeader.substring(locationHeader.lastIndexOf("/") + 1);
- }
-
- @Override
- public InlineResponse2001 subscribeForNotifications(final EsrVnfm vnfm,
- final LccnSubscriptionRequest subscriptionRequest) {
- logger.info("Subscribing for notifications {}", subscriptionRequest);
- final String url = urlProvider.getSubscriptionsUrl(vnfm.getVnfmId());
- ResponseEntity<InlineResponse2001> response = null;
- try {
- response = getHttpServiceProvider(vnfm).postHttpRequest(subscriptionRequest, url, InlineResponse2001.class);
- logger.info("Subscribing for notifications response {}", response);
- } catch (final Exception exception) {
- final String errorMessage =
- "Subscription to VNFM " + vnfm.getVnfmId() + MESSAGE_RESULTED_IN_EXCEPTION + subscriptionRequest;
- logger.error(errorMessage);
- throw new VnfmRequestFailureException(errorMessage, exception);
- }
- if (response.getStatusCode() != HttpStatus.CREATED) {
- final String errorMessage = "Subscription to VNFM " + vnfm.getVnfmId() + " returned status code: "
- + response.getStatusCode() + MESSAGE_REQUEST + subscriptionRequest;
- logger.error(errorMessage);
- throw new VnfmRequestFailureException(errorMessage);
- }
- return response.getBody();
- }
-
- @Override
- public String terminateVnf(final EsrVnfm vnfm, final String vnfSelfLink,
- final TerminateVnfRequest terminateVnfRequest) {
- logger.debug("Sending terminate request {} to : {}", terminateVnfRequest, vnfSelfLink);
- ResponseEntity<Void> response = null;
- try {
- response = getHttpServiceProvider(vnfm).postHttpRequest(terminateVnfRequest, vnfSelfLink + "/terminate",
- Void.class);
- } catch (final RestProcessingException restProcessingException) {
- if (restProcessingException.getStatusCode() == HttpStatus.CONFLICT.value()) {
- final InlineResponse201 vnf = getVnf(vnfm, vnfSelfLink).get();
- if (vnf.getInstantiationState().equals(InstantiationStateEnum.NOT_INSTANTIATED)) {
- return JobManager.ALREADY_COMPLETED_OPERATION_ID;
- } else {
- final String errorMessage = MESSAGE_TERMINATE_REQUEST_TO + vnfSelfLink
- + MESSAGE_RESULTED_IN_EXCEPTION + terminateVnfRequest;
- logger.error(errorMessage, restProcessingException);
- throw new VnfmRequestFailureException(errorMessage, restProcessingException);
- }
- }
- } catch (final Exception exception) {
- final String errorMessage =
- MESSAGE_TERMINATE_REQUEST_TO + vnfSelfLink + MESSAGE_RESULTED_IN_EXCEPTION + terminateVnfRequest;
- logger.error(errorMessage);
- throw new VnfmRequestFailureException(errorMessage, exception);
- }
- checkIfResponseIsAcceptable(response, vnfSelfLink, terminateVnfRequest);
- String locationHeader = getLocationHeader(response);
- return locationHeader.substring(locationHeader.lastIndexOf("/") + 1);
- }
-
- @Override
- public void deleteVnf(final EsrVnfm vnfm, final String vnfSelfLink) {
- logger.debug("Sending delete request to : {}", vnfSelfLink);
- final ResponseEntity<Void> response = getHttpServiceProvider(vnfm).deleteHttpRequest(vnfSelfLink, Void.class);
- if (response.getStatusCode() != HttpStatus.NO_CONTENT) {
- throw new VnfmRequestFailureException(
- "Delete request to " + vnfSelfLink + " return status code: " + response.getStatusCode());
- }
- }
-
- @Override
- public Optional<InlineResponse200> getOperation(final EsrVnfm vnfm, final String operationId) {
- final String url = urlProvider.getOperationUrl(vnfm.getVnfmId(), operationId);
- return getHttpServiceProvider(vnfm).get(url, InlineResponse200.class);
- }
-
- @Override
- public Optional<InlineResponse201> createVnf(final EsrVnfm vnfm, final CreateVnfRequest createVnfRequest) {
- final String url = urlProvider.getCreationUrl(vnfm.getVnfmId());
- logger.debug("Sending create request {} to : {}", createVnfRequest, url);
- try {
- return getHttpServiceProvider(vnfm).post(createVnfRequest, url, InlineResponse201.class);
- } catch (final Exception exception) {
- final String errorMessage =
- "Create request to vnfm:" + vnfm.getVnfmId() + MESSAGE_RESULTED_IN_EXCEPTION + createVnfRequest;
- logger.error(errorMessage);
- throw new VnfmRequestFailureException(errorMessage, exception);
- }
- }
-
- private void checkIfResponseIsAcceptable(final ResponseEntity<Void> response, final String vnfSelfLink,
- final TerminateVnfRequest terminateVnfRequest) {
- if (response == null) {
- final String errorMessage = MESSAGE_TERMINATE_REQUEST_TO + vnfSelfLink + ", response is null, "
- + "request: " + terminateVnfRequest;
- logger.error(errorMessage);
- throw new VnfmRequestFailureException(errorMessage);
- }
- if (response.getStatusCode() != HttpStatus.ACCEPTED) {
- final String errorMessage = MESSAGE_TERMINATE_REQUEST_TO + vnfSelfLink + ", returned status code: "
- + response.getStatusCode() + MESSAGE_REQUEST + terminateVnfRequest;
- logger.error(errorMessage);
- throw new VnfmRequestFailureException(errorMessage);
- }
- }
-
- private HttpRestServiceProvider getHttpServiceProvider(final EsrVnfm vnfm) {
- return vnfmServiceProviderConfiguration.getHttpRestServiceProvider(vnfm);
- }
-
- private String getLocationHeader(ResponseEntity<Void> response) {
- List<String> headers = response.getHeaders().get("Location");
- if ((headers == null) || (headers.isEmpty())) {
- throw new VnfmRequestFailureException("No headers found in response");
- }
- return headers.iterator().next();
- }
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/vnfm/VnfmUrlProvider.java b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/vnfm/VnfmUrlProvider.java
deleted file mode 100644
index a9319c07fe..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/vnfm/VnfmUrlProvider.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm;
-
-import static org.slf4j.LoggerFactory.getLogger;
-import java.net.URI;
-import org.onap.aai.domain.yang.EsrSystemInfo;
-import org.onap.aai.domain.yang.EsrSystemInfoList;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.aai.AaiServiceProvider;
-import org.onap.so.adapters.etsisol003adapter.lcm.rest.exceptions.VnfmNotFoundException;
-import org.slf4j.Logger;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.web.util.UriComponentsBuilder;
-
-/**
- * Provides URLs for REST calls to a VNFM.
- */
-@Service
-public class VnfmUrlProvider {
-
- private static Logger logger = getLogger(VnfmUrlProvider.class);
- private final AaiServiceProvider aaiServiceProvider;
-
- @Autowired
- public VnfmUrlProvider(final AaiServiceProvider aaiServiceProvider) {
- this.aaiServiceProvider = aaiServiceProvider;
- }
-
- /**
- * Get the URL for an operation on a VNFM.
- *
- * @param vnfmId The ID of the VNFM
- * @return the URL of the operation
- */
- public String getOperationUrl(final String vnfmId, final String operationId) {
- final String url = UriComponentsBuilder.fromUri(getBaseUri(vnfmId)).pathSegment("vnf_lcm_op_occs")
- .pathSegment(operationId).build().toString();
- logger.debug("getOperationUrl:" + url);
-
- return url;
- }
-
- /**
- * Get the URL for the subscriptions on a VNFM.
- *
- * @param vnfmId The ID of the VNFM
- * @return the URL of the subscriptions
- */
- public String getSubscriptionsUrl(final String vnfmId) {
- final String url =
- UriComponentsBuilder.fromUri(getBaseUri(vnfmId)).pathSegment("subscriptions").build().toString();
- logger.debug("getSubscriptionUrl:" + url);
-
- return url;
- }
-
- public String getCreationUrl(final String vnfmId) {
- final String url =
- UriComponentsBuilder.fromUri(getBaseUri(vnfmId)).pathSegment("vnf_instances").build().toString();
- logger.debug("getCreationUrl:" + url);
-
- return url;
- }
-
- private URI getBaseUri(final String vnfmId) {
- final EsrSystemInfoList vnfmEsrSystemInfoList = aaiServiceProvider.invokeGetVnfmEsrSystemInfoList(vnfmId);
-
- if (vnfmEsrSystemInfoList != null) {
- for (final EsrSystemInfo esrSystemInfo : vnfmEsrSystemInfoList.getEsrSystemInfo()) {
- return UriComponentsBuilder.fromHttpUrl(esrSystemInfo.getServiceUrl()).build().toUri();
- }
- }
-
- throw new VnfmNotFoundException("VNFM, or Service URL for VNFM, not found for VNFM " + vnfmId);
- }
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/jobmanagement/JobManager.java b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/jobmanagement/JobManager.java
deleted file mode 100644
index 5ac0179176..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/jobmanagement/JobManager.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.lcm.jobmanagement;
-
-import static org.slf4j.LoggerFactory.getLogger;
-import java.util.Map;
-import java.util.UUID;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.aai.AaiServiceProvider;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.VnfmServiceProvider;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.InlineResponse200;
-import org.onap.so.adapters.etsisol003adapter.lcm.rest.exceptions.JobNotFoundException;
-import org.onap.so.adapters.etsisol003adapter.lcm.v1.model.OperationEnum;
-import org.onap.so.adapters.etsisol003adapter.lcm.v1.model.OperationStateEnum;
-import org.onap.so.adapters.etsisol003adapter.lcm.v1.model.OperationStatusRetrievalStatusEnum;
-import org.onap.so.adapters.etsisol003adapter.lcm.v1.model.QueryJobResponse;
-import org.onap.so.rest.exceptions.HttpResouceNotFoundException;
-import org.slf4j.Logger;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-import com.google.common.base.Optional;
-import com.google.common.collect.Maps;
-
-/**
- * Manages jobs enabling the status of jobs to be queried. A job is associated with an operation on a VNFM.
- */
-@Component
-public class JobManager {
- public static final String ALREADY_COMPLETED_OPERATION_ID = "alreadyCompleted";
- private static final String SEPARATOR = "_";
- private static Logger logger = getLogger(JobManager.class);
- private final Map<String, VnfmOperation> mapOfJobIdToVnfmOperation = Maps.newConcurrentMap();
- private final VnfmServiceProvider vnfmServiceProvider;
- private final AaiServiceProvider aaiServiceProvider;
-
- @Autowired
- JobManager(final VnfmServiceProvider vnfmServiceProvider, final AaiServiceProvider aaiServiceProvider) {
- this.vnfmServiceProvider = vnfmServiceProvider;
- this.aaiServiceProvider = aaiServiceProvider;
- }
-
- /**
- * Create a job associated with an operation on a VNFM.
- *
- * @param vnfmId the VNFM the operation relates to
- * @param operationId the ID of the associated VNFM operation
- * @param waitForNotificationForSuccess if set to <code>true</code> the {@link QueryJobResponse#getOperationState()}
- * shall not return {@link org.onap.vnfmadapter.v1.model.OperationStateEnum#COMPLETED} unless a required
- * notification has been processed
- * @return the ID of the job. Can be used to query the job using {@link #getVnfmOperation(String)}
- */
- public String createJob(final String vnfmId, final String operationId,
- final boolean waitForNotificationForSuccess) {
- final String jobId = vnfmId + SEPARATOR + UUID.randomUUID().toString();
- final VnfmOperation vnfmOperation = new VnfmOperation(vnfmId, operationId, waitForNotificationForSuccess);
- mapOfJobIdToVnfmOperation.put(jobId, vnfmOperation);
- return jobId;
- }
-
- /**
- * Get the operation, associated with the given job ID, from the VNFM.
- *
- * @param jobId the job ID
- * @return the associated operation from the VNFM, or <code>null</code> of no operation is associated with the given
- * job ID
- */
- public QueryJobResponse getVnfmOperation(final String jobId) {
- final VnfmOperation vnfmOperation = mapOfJobIdToVnfmOperation.get(jobId);
- final QueryJobResponse response = new QueryJobResponse();
-
- if (vnfmOperation == null) {
- throw new JobNotFoundException("No job found with ID: " + jobId);
- }
-
- if (vnfmOperation.getOperationId().equals(ALREADY_COMPLETED_OPERATION_ID)) {
- response.setOperationStatusRetrievalStatus(OperationStatusRetrievalStatusEnum.STATUS_FOUND);
- return response.operationState(OperationStateEnum.COMPLETED);
- }
-
- if (vnfmOperation.isVnfDeleted()) {
- response.setOperationStatusRetrievalStatus(OperationStatusRetrievalStatusEnum.STATUS_FOUND);
- return response.operationState(getOperationState(vnfmOperation, null));
- }
-
- try {
- final Optional<InlineResponse200> operationOptional = vnfmServiceProvider.getOperation(
- aaiServiceProvider.invokeGetVnfm(vnfmOperation.getVnfmId()), vnfmOperation.getOperationId());
-
- if (!operationOptional.isPresent()) {
- return response.operationStatusRetrievalStatus(OperationStatusRetrievalStatusEnum.OPERATION_NOT_FOUND);
- }
- final InlineResponse200 operation = operationOptional.get();
-
- logger.debug("Job Id: {} operationId: {} operation details: {} ", jobId, operation.getId(), operation);
-
- if (operation.getOperationState() == null) {
- return response.operationStatusRetrievalStatus(OperationStatusRetrievalStatusEnum.WAITING_FOR_STATUS);
- }
-
- response.setOperationStatusRetrievalStatus(OperationStatusRetrievalStatusEnum.STATUS_FOUND);
- response.setId(operation.getId());
- response.setOperation(OperationEnum.fromValue(operation.getOperation().getValue()));
- response.setOperationState(getOperationState(vnfmOperation, operation));
- response.setStartTime(operation.getStartTime());
- response.setStateEnteredTime(operation.getStateEnteredTime());
- response.setVnfInstanceId(operation.getVnfInstanceId());
-
- return response;
- } catch (final HttpResouceNotFoundException exception) {
- logger.error("Exception encountered trying to get operation status for operation id "
- + vnfmOperation.getOperationId(), exception);
- return response.operationStatusRetrievalStatus(OperationStatusRetrievalStatusEnum.WAITING_FOR_STATUS);
- }
- }
-
- private OperationStateEnum getOperationState(final VnfmOperation vnfmOperation,
- final InlineResponse200 operationResponse) {
- switch (vnfmOperation.getNotificationStatus()) {
- case NOTIFICATION_PROCESSING_PENDING:
- return org.onap.so.adapters.etsisol003adapter.lcm.v1.model.OperationStateEnum.PROCESSING;
- case NOTIFICATION_PROCEESING_SUCCESSFUL:
- return org.onap.so.adapters.etsisol003adapter.lcm.v1.model.OperationStateEnum.COMPLETED;
- case NOTIFICATION_PROCESSING_FAILED:
- return org.onap.so.adapters.etsisol003adapter.lcm.v1.model.OperationStateEnum.FAILED;
- default:
- if (operationResponse == null || operationResponse.getOperationState() == null)
- return null;
- return OperationStateEnum.fromValue(operationResponse.getOperationState().getValue());
- }
- }
-
- public void notificationProcessedForOperation(final String operationId,
- final boolean notificationProcessingWasSuccessful) {
- logger.debug("Notification processed for operation ID {} success?: {}", operationId,
- notificationProcessingWasSuccessful);
- final java.util.Optional<VnfmOperation> relatedOperation = mapOfJobIdToVnfmOperation.values().stream()
- .filter(operation -> operation.getOperationId().equals(operationId)).findFirst();
- if (relatedOperation.isPresent()) {
- relatedOperation.get().setNotificationProcessed(notificationProcessingWasSuccessful);
- } else {
- logger.debug("No operation found for operation ID {} ", operationId);
-
- }
- }
-
- public void vnfDeleted(final String operationId) {
- logger.debug("VNF deleyed for operation ID {}", operationId);
- final java.util.Optional<VnfmOperation> relatedOperation = mapOfJobIdToVnfmOperation.values().stream()
- .filter(operation -> operation.getOperationId().equals(operationId)).findFirst();
- if (relatedOperation.isPresent()) {
- relatedOperation.get().setVnfDeleted();
- } else {
- logger.debug("No operation found for operation ID {} ", operationId);
- }
- }
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/jobmanagement/VnfmOperation.java b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/jobmanagement/VnfmOperation.java
deleted file mode 100644
index 8cb9197d44..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/jobmanagement/VnfmOperation.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.lcm.jobmanagement;
-
-/**
- * Represents an operation on a VNFM.
- */
-public class VnfmOperation {
-
- private final String vnfmId;
- private final String operationId;
- private NotificationStatus notificationStatus;
- private boolean vnfDeleted;
-
- public VnfmOperation(final String vnfmId, final String operationId, final boolean waitForNotificationForSuccess) {
- this.vnfmId = vnfmId;
- this.operationId = operationId;
- this.notificationStatus = waitForNotificationForSuccess ? NotificationStatus.NOTIFICATION_PROCESSING_PENDING
- : NotificationStatus.NOTIFICATION_PROCESSING_NOT_REQUIRED;
- }
-
- /**
- * Get the ID of the operation on the VNFM.
- *
- * @return the ID of the operation on the VNFM
- */
- public String getOperationId() {
- return operationId;
- }
-
- /**
- * Get the ID of the VNFM the operation is carried out by.
- *
- * @return the ID of the VNFM
- */
- public String getVnfmId() {
- return vnfmId;
- }
-
- /**
- * Set the required notification has been processed for the operation.
- *
- * @param notificationProcessingWasSuccessful <code>true</code> if the notification processing was successful,
- * <code>false<code> otherwise
- */
- public void setNotificationProcessed(final boolean notificationProcessingWasSuccessful) {
- this.notificationStatus =
- notificationProcessingWasSuccessful ? NotificationStatus.NOTIFICATION_PROCEESING_SUCCESSFUL
- : NotificationStatus.NOTIFICATION_PROCESSING_FAILED;
- }
-
- /**
- * Get the notification status for the operation.
- *
- * @return the notification status
- */
- public NotificationStatus getNotificationStatus() {
- return notificationStatus;
- }
-
- /**
- * Set the VNF has been deleted from the VNFM.
- */
- public void setVnfDeleted() {
- this.vnfDeleted = true;
- }
-
- /**
- * Check if the VNF has been deleted from the VNFM
- *
- * @return <code>true</code> of the VNF has been deleted from the VNFM, <code>false</code> otherwise
- */
- public boolean isVnfDeleted() {
- return vnfDeleted;
- }
-
-
- public enum NotificationStatus {
- /**
- * No notification handling is required to determine the status of the operation
- */
- NOTIFICATION_PROCESSING_NOT_REQUIRED,
- /**
- * A notification must be processed before the notification can be considered to be completed
- */
- NOTIFICATION_PROCESSING_PENDING,
- /**
- * A notification has been successfully handled for the operation
- */
- NOTIFICATION_PROCEESING_SUCCESSFUL,
- /**
- * An error occurred processing a notification for the operation
- */
- NOTIFICATION_PROCESSING_FAILED;
- }
-
- @Override
- public String toString() {
- return "VnfmOperation [vnfmId=" + vnfmId + ", operationId=" + operationId + ", notificationStatus="
- + notificationStatus + "]";
- }
-
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/lifecycle/LifecycleManager.java b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/lifecycle/LifecycleManager.java
deleted file mode 100644
index 4a8e95ff07..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/lifecycle/LifecycleManager.java
+++ /dev/null
@@ -1,276 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.lcm.lifecycle;
-
-import java.util.Map;
-import org.onap.aai.domain.yang.EsrVnfm;
-import org.onap.aai.domain.yang.GenericVnf;
-import org.onap.aai.domain.yang.Relationship;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.EtsiPackageProvider;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.aai.AaiHelper;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.aai.AaiServiceProvider;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.aai.OamIpAddressSource;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.aai.OamIpAddressSource.OamIpAddressType;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.VnfmHelper;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.VnfmServiceProvider;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.InlineResponse201;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.InstantiateVnfRequest;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.LccnSubscriptionRequest;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.TerminateVnfRequest;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.TerminateVnfRequest.TerminationTypeEnum;
-import org.onap.so.adapters.etsisol003adapter.lcm.jobmanagement.JobManager;
-import org.onap.so.adapters.etsisol003adapter.lcm.rest.exceptions.VnfNotFoundException;
-import org.onap.so.adapters.etsisol003adapter.lcm.rest.exceptions.VnfmNotFoundException;
-import org.onap.so.adapters.etsisol003adapter.lcm.rest.exceptions.VnfmRequestFailureException;
-import org.onap.so.adapters.etsisol003adapter.lcm.v1.model.CreateVnfRequest;
-import org.onap.so.adapters.etsisol003adapter.lcm.v1.model.CreateVnfResponse;
-import org.onap.so.adapters.etsisol003adapter.lcm.v1.model.DeleteVnfResponse;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-import com.google.common.base.Optional;
-import static org.apache.commons.lang3.StringUtils.isNotBlank;
-
-/**
- * Manages lifecycle operations towards the VNFMs.
- */
-@Component
-public class LifecycleManager {
- private static final Logger logger = LoggerFactory.getLogger(LifecycleManager.class);
- private final AaiServiceProvider aaiServiceProvider;
- private final VnfmServiceProvider vnfmServiceProvider;
- private final AaiHelper aaiHelper;
- private final VnfmHelper vnfmHelper;
- private final JobManager jobManager;
- private final EtsiPackageProvider packageProvider;
-
- @Autowired
- LifecycleManager(final AaiServiceProvider aaiServiceProvider, final AaiHelper aaiHelper,
- final VnfmHelper vnfmHelper, final VnfmServiceProvider vnfmServiceProvider, final JobManager jobManager,
- final EtsiPackageProvider packageProvider) {
- this.aaiServiceProvider = aaiServiceProvider;
- this.vnfmServiceProvider = vnfmServiceProvider;
- this.aaiHelper = aaiHelper;
- this.vnfmHelper = vnfmHelper;
- this.jobManager = jobManager;
- this.packageProvider = packageProvider;
- }
-
- /**
- * Create a VNF on a VNFM.
- *
- * @param vnfIdInAai the ID of the VNF in AAI
- * @param request the create request
- * @return the response to the request
- */
- public CreateVnfResponse createVnf(final String vnfIdInAai, final CreateVnfRequest request) {
- final GenericVnf genericVnf = getGenericVnfFromAai(vnfIdInAai);
- EsrVnfm vnfm = aaiHelper.getAssignedVnfm(genericVnf);
- checkIfVnfAlreadyExistsInVnfm(vnfm, genericVnf);
-
- if (vnfm == null) {
- vnfm = aaiHelper.selectVnfm(genericVnf);
- aaiServiceProvider.invokePutGenericVnfToVnfmRelationship(genericVnf, vnfm.getVnfmId());
- }
- final InlineResponse201 vnfmResponse = sendCreateRequestToVnfm(request, genericVnf, vnfIdInAai, vnfm);
-
- logger.info("Create response: {}", vnfmResponse);
-
- genericVnf.setSelflink(getSelfLink(vnfmResponse, vnfm));
-
- final GenericVnf genericVnfPatch = new GenericVnf();
- genericVnfPatch.setVnfId(genericVnf.getVnfId());
- genericVnfPatch.setSelflink(genericVnf.getSelflink());
- aaiServiceProvider.invokePatchGenericVnf(genericVnfPatch);
-
- final String vnfIdInVnfm = vnfmResponse.getId();
-
- final OamIpAddressSource oamIpAddressSource = extractOamIpAddressSource(request);
- aaiHelper.setOamIpAddressSource(vnfIdInVnfm, oamIpAddressSource);
-
- createNotificationSubscription(vnfm, vnfIdInVnfm);
- final String operationId = sendInstantiateRequestToVnfm(vnfm, genericVnf, request);
-
- final String jobId = jobManager.createJob(vnfm.getVnfmId(), operationId, false);
- final CreateVnfResponse response = new CreateVnfResponse();
- response.setJobId(jobId);
- return response;
- }
-
- private String getSelfLink(final InlineResponse201 vnfmResponse, final EsrVnfm vnfm) {
- if (vnfmResponse.getLinks() != null && vnfmResponse.getLinks().getSelf() != null
- && vnfmResponse.getLinks().getSelf().getHref() != null) {
- return vnfmResponse.getLinks().getSelf().getHref();
- }
- return vnfm.getEsrSystemInfoList().getEsrSystemInfo().iterator().next().getServiceUrl() + "/vnf_instances/"
- + vnfmResponse.getId();
- }
-
- private OamIpAddressSource extractOamIpAddressSource(final CreateVnfRequest request) {
- final Map<String, String> additionalParams = request.getAdditionalParams();
- try {
- final String sourceType = additionalParams.remove("oamIpAddressSourceType");
- final String sourceValue = additionalParams.remove("oamIpAddressSourceValue");
- final OamIpAddressType oamIpAddressType = OamIpAddressType.valueOf(sourceType.toUpperCase());
- return new OamIpAddressSource(oamIpAddressType, sourceValue);
- } catch (final NullPointerException | IllegalArgumentException exception) {
- logger.debug("Additional Params not set for OAM IP address source", exception);
- return null;
- }
- }
-
- private void checkIfVnfAlreadyExistsInVnfm(final EsrVnfm vnfm, final GenericVnf genericVnf) {
- if (genericVnf.getSelflink() != null && !genericVnf.getSelflink().isEmpty() && vnfm != null) {
- Optional<InlineResponse201> response = Optional.absent();
- try {
- response = vnfmServiceProvider.getVnf(vnfm, genericVnf.getSelflink());
- } catch (final Exception exception) {
- logger.debug("Ignoring invalid self link in generic vnf", exception);
- }
- if (response.isPresent()) {
- throw new IllegalArgumentException("VNF " + genericVnf.getVnfId()
- + " is already defined on the VNFM, self link: " + genericVnf.getSelflink());
- }
- }
- }
-
- private InlineResponse201 sendCreateRequestToVnfm(final CreateVnfRequest createVnfRequest,
- final GenericVnf genericVnf, final String vnfIdInAai, final EsrVnfm vnfm) {
- logger.debug("Sending a create request to SVNFM {}", createVnfRequest);
- final org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.CreateVnfRequest vnfmRequest =
- new org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.CreateVnfRequest();
-
- final String pkgId = getPackageId(createVnfRequest, genericVnf);
- final String vnfdId = packageProvider.getVnfdId(pkgId);
- vnfmRequest.setVnfdId(vnfdId);
- vnfmRequest.setVnfInstanceName(createVnfRequest.getName().replaceAll(" ", "_"));
- vnfmRequest.setVnfInstanceDescription(vnfIdInAai);
-
- final Optional<InlineResponse201> optionalResponse = vnfmServiceProvider.createVnf(vnfm, vnfmRequest);
-
- try {
- return optionalResponse.get();
- } catch (final Exception exception) {
- final String errorMessage = "Unable to return response from VNFM";
- logger.error(errorMessage, exception);
- throw new VnfmRequestFailureException(errorMessage, exception);
- }
- }
-
- private String getPackageId(final CreateVnfRequest createVnfRequest, final GenericVnf genericVnf) {
- if (isNotBlank(createVnfRequest.getPkgId())) {
- logger.info("Found createVnfRequest pkgId: {}", createVnfRequest.getPkgId());
- return createVnfRequest.getPkgId();
- }
- logger.info("Found genericVnf modelVersionId: {}", genericVnf.getModelVersionId());
- return genericVnf.getModelVersionId();
- }
-
- private void createNotificationSubscription(final EsrVnfm vnfm, final String vnfId) {
- try {
- final LccnSubscriptionRequest subscriptionRequest = vnfmHelper.createNotificationSubscriptionRequest(vnfId);
- vnfmServiceProvider.subscribeForNotifications(vnfm, subscriptionRequest);
- } catch (final Exception exception) {
- logger.warn("Subscription for notifications to VNFM: " + vnfm.getVnfmId() + " for VNF " + vnfId
- + " failed. AAI will not be updated unless the VNFM is configured by other means to send notifications relating to this VNF",
- exception);
- }
- }
-
- private String sendInstantiateRequestToVnfm(final EsrVnfm vnfm, final GenericVnf genericVnf,
- final CreateVnfRequest createVnfRequest) {
-
- final String pkgId = getPackageId(createVnfRequest, genericVnf);
- final InstantiateVnfRequest instantiateVnfRequest = vnfmHelper.createInstantiateRequest(
- createVnfRequest.getTenant(), createVnfRequest, packageProvider.getFlavourId(pkgId));
- final String jobId = vnfmServiceProvider.instantiateVnf(vnfm, genericVnf.getSelflink(), instantiateVnfRequest);
-
- logger.info("Instantiate VNF request successfully sent to " + genericVnf.getSelflink());
- return jobId;
- }
-
- /**
- * Delete a VNF on a VNFM.
- *
- * @param vnfIdInAai the ID of the VNF in AAI
- * @return the response to the request
- */
- public DeleteVnfResponse deleteVnf(final String vnfIdInAai) {
- final GenericVnf genericVnf = getGenericVnfFromAai(vnfIdInAai);
- final EsrVnfm vnfm = getAssignedVnfm(genericVnf);
-
- final String operationId = sendTerminateRequestToVnfm(vnfm, genericVnf);
-
- if (operationId.equals(JobManager.ALREADY_COMPLETED_OPERATION_ID)) {
- sendDeleteRequestToVnfm(genericVnf);
- }
- final String jobId = jobManager.createJob(vnfm.getVnfmId(), operationId, true);
-
- return new DeleteVnfResponse().jobId(jobId);
- }
-
- private String sendTerminateRequestToVnfm(final EsrVnfm vnfm, final GenericVnf genericVnf) {
- final TerminateVnfRequest terminateVnfRequest = new TerminateVnfRequest();
- terminateVnfRequest.setTerminationType(TerminationTypeEnum.FORCEFUL);
- return vnfmServiceProvider.terminateVnf(vnfm, genericVnf.getSelflink(), terminateVnfRequest);
- }
-
- private GenericVnf getGenericVnfFromAai(final String vnfIdInAai) {
- final GenericVnf genericVnf = aaiServiceProvider.invokeGetGenericVnf(vnfIdInAai);
- if (genericVnf == null) {
- throw new VnfNotFoundException("VNF not found in AAI: " + vnfIdInAai);
- }
- logger.debug("Retrieved generic VNF from AAI: " + genericVnf);
- return genericVnf;
- }
-
- private EsrVnfm getAssignedVnfm(final GenericVnf genericVnf) {
- final EsrVnfm vnfm = aaiHelper.getAssignedVnfm(genericVnf);
- if (vnfm == null) {
- throw new VnfmNotFoundException("No VNFM found in AAI for VNF " + genericVnf.getVnfId());
- }
- return vnfm;
- }
-
- private void sendDeleteRequestToVnfm(final GenericVnf genericVnf) {
-
- vnfmServiceProvider.deleteVnf(aaiHelper.getAssignedVnfm(genericVnf), genericVnf.getSelflink());
-
- final GenericVnf genericVnfPatch = new GenericVnf();
- genericVnfPatch.setVnfId(genericVnf.getVnfId());
- genericVnfPatch.setOrchestrationStatus("Assigned");
- genericVnfPatch.setSelflink("");
- aaiServiceProvider.invokePatchGenericVnf(genericVnfPatch);
-
- for (final Relationship relationship : genericVnf.getRelationshipList().getRelationship()) {
- if (relationship.getRelatedTo().equals("vserver")) {
- aaiServiceProvider.invokeDeleteVserver(
- aaiHelper.getRelationshipData(relationship, "cloud-region.cloud-owner"),
- aaiHelper.getRelationshipData(relationship, "cloud-region.cloud-region-id"),
- aaiHelper.getRelationshipData(relationship, "tenant.tenant-id"),
- aaiHelper.getRelationshipData(relationship, "vserver.vserver-id"));
- }
- }
-
-
- }
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/notificationhandling/NotificationHandler.java b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/notificationhandling/NotificationHandler.java
deleted file mode 100644
index f23fac8115..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/notificationhandling/NotificationHandler.java
+++ /dev/null
@@ -1,276 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.lcm.notificationhandling;
-
-import static org.slf4j.LoggerFactory.getLogger;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import org.json.JSONException;
-import org.json.JSONObject;
-import org.onap.aai.domain.yang.GenericVnf;
-import org.onap.aai.domain.yang.Relationship;
-import org.onap.aai.domain.yang.Vserver;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.aai.AaiHelper;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.aai.AaiServiceProvider;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.aai.OamIpAddressSource;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.aai.OamIpAddressSource.OamIpAddressType;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.VnfmServiceProvider;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.InlineResponse201;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.InlineResponse201VimConnectionInfo;
-import org.onap.so.adapters.etsisol003adapter.lcm.jobmanagement.JobManager;
-import org.onap.so.adapters.etsisol003adapter.lcm.lcn.model.LcnVnfLcmOperationOccurrenceNotificationAffectedVnfcs;
-import org.onap.so.adapters.etsisol003adapter.lcm.lcn.model.LcnVnfLcmOperationOccurrenceNotificationAffectedVnfcs.ChangeTypeEnum;
-import org.onap.so.adapters.etsisol003adapter.lcm.lcn.model.VnfLcmOperationOccurrenceNotification;
-import org.onap.so.adapters.etsisol003adapter.lcm.lcn.model.VnfLcmOperationOccurrenceNotification.OperationStateEnum;
-import org.slf4j.Logger;
-
-/**
- * Performs updates to AAI based on a received notification. The updates are executed in a separate thread so as the
- * notification response to the VNFM is not delayed.
- */
-public class NotificationHandler implements Runnable {
- private static Logger logger = getLogger(NotificationHandler.class);
- private final VnfLcmOperationOccurrenceNotification vnfLcmOperationOccurrenceNotification;
- private final AaiHelper aaiHelper;
- private final AaiServiceProvider aaiServiceProvider;
- private final VnfmServiceProvider vnfmServiceProvider;
- private final JobManager jobManager;
- private final InlineResponse201 vnfInstance;
-
- public NotificationHandler(final VnfLcmOperationOccurrenceNotification vnfLcmOperationOccurrenceNotification,
- final AaiHelper aaiHelper, final AaiServiceProvider aaiServiceProvider,
- final VnfmServiceProvider vnfmServiceProvider, final JobManager jobManager,
- final InlineResponse201 vnfInstance) {
- this.vnfLcmOperationOccurrenceNotification = vnfLcmOperationOccurrenceNotification;
- this.aaiHelper = aaiHelper;
- this.aaiServiceProvider = aaiServiceProvider;
- this.vnfmServiceProvider = vnfmServiceProvider;
- this.jobManager = jobManager;
- this.vnfInstance = vnfInstance;
- }
-
- @Override
- public void run() {
- try {
- if (vnfLcmOperationOccurrenceNotification.getOperationState().equals(OperationStateEnum.COMPLETED)) {
- switch (vnfLcmOperationOccurrenceNotification.getOperation()) {
- case INSTANTIATE:
- handleVnfInstantiate();
- break;
- case TERMINATE:
- handleVnfTerminate();
- break;
- default:
- }
- }
- } catch (final Exception exception) {
- logger.error("Error encountered handling notification, AAI may not be updated correctly "
- + vnfLcmOperationOccurrenceNotification, exception);
- }
- }
-
- private void handleVnfInstantiate() {
- if (vnfLcmOperationOccurrenceNotification.getOperationState().equals(OperationStateEnum.COMPLETED)) {
- handleVnfInstantiateCompleted();
- }
- }
-
- private void handleVnfInstantiateCompleted() {
- final GenericVnf genericVnf = aaiServiceProvider
- .invokeQueryGenericVnf(vnfInstance.getLinks().getSelf().getHref()).getGenericVnf().get(0);
-
- final GenericVnf genericVnfPatch = new GenericVnf();
- genericVnfPatch.setVnfId(genericVnf.getVnfId());
- setOamIpAddress(genericVnfPatch, vnfInstance);
- genericVnfPatch.setOrchestrationStatus("Created");
- aaiServiceProvider.invokePatchGenericVnf(genericVnfPatch);
-
- addVservers(vnfLcmOperationOccurrenceNotification, genericVnf.getVnfId(), vnfInstance.getVimConnectionInfo());
-
- logger.debug("Finished handling notification for vnfm: " + vnfInstance.getId());
- }
-
- private void setOamIpAddress(final GenericVnf genericVnf, final InlineResponse201 vnfInstance) {
- final OamIpAddressSource oamIpAddressSource = aaiHelper.getOamIpAddressSource(vnfInstance.getId());
- if (oamIpAddressSource == null) {
- logger.warn("No source indicated for OAM IP address, no value will be set in AAI");
- return;
- }
- if (oamIpAddressSource.getType().equals(OamIpAddressType.LITERAL)) {
- genericVnf.setIpv4OamAddress(oamIpAddressSource.getValue());
- } else {
- try {
- logger.debug("ConfigurableProperties: " + vnfInstance.getVnfConfigurableProperties());
- if (vnfInstance.getVnfConfigurableProperties() == null) {
- logger.warn("No ConfigurableProperties, cannot set OAM IP Address");
- }
- final JSONObject properties = new JSONObject((Map) vnfInstance.getVnfConfigurableProperties());
- genericVnf.setIpv4OamAddress(properties.get(oamIpAddressSource.getValue()).toString());
- } catch (final JSONException jsonException) {
- logger.error("Error getting vnfIpAddress", jsonException);
- }
- }
- }
-
- private void handleVnfTerminate() {
- switch (vnfLcmOperationOccurrenceNotification.getOperationState()) {
- case COMPLETED:
- handleVnfTerminateCompleted();
- break;
- case FAILED:
- case ROLLING_BACK:
- handleVnfTerminateFailed();
- break;
- default:
- }
- }
-
- private void handleVnfTerminateFailed() {
- try {
- final GenericVnf genericVnf = aaiServiceProvider
- .invokeQueryGenericVnf(vnfInstance.getLinks().getSelf().getHref()).getGenericVnf().get(0);
- deleteVserversFromAai(vnfLcmOperationOccurrenceNotification, genericVnf);
- } finally {
- jobManager.notificationProcessedForOperation(vnfLcmOperationOccurrenceNotification.getVnfLcmOpOccId(),
- false);
- }
- }
-
- private void handleVnfTerminateCompleted() {
- GenericVnf genericVnf = null;
- boolean vServersDeletedFromAai = false;
- boolean identifierDeletedFromVnfm = false;
- boolean genericVnfUpdated = false;
- try {
- genericVnf = aaiServiceProvider.invokeQueryGenericVnf(vnfInstance.getLinks().getSelf().getHref())
- .getGenericVnf().get(0);
- vServersDeletedFromAai = deleteVserversFromAai(vnfLcmOperationOccurrenceNotification, genericVnf);
- identifierDeletedFromVnfm = deleteVnfIdentifierOnVnfm(genericVnf);
- genericVnfUpdated = patchVnfInAai(genericVnf.getVnfId(), "Assigned", identifierDeletedFromVnfm ? "" : null);
- } finally {
- jobManager.notificationProcessedForOperation(vnfLcmOperationOccurrenceNotification.getVnfLcmOpOccId(),
- vServersDeletedFromAai && identifierDeletedFromVnfm && genericVnfUpdated);
- jobManager.vnfDeleted(vnfLcmOperationOccurrenceNotification.getVnfLcmOpOccId());
- }
- }
-
- private void addVservers(final VnfLcmOperationOccurrenceNotification notification, final String vnfId,
- final List<InlineResponse201VimConnectionInfo> vnfInstancesVimConnectionInfo) {
- final Map<String, InlineResponse201VimConnectionInfo> vimConnectionIdToVimConnectionInfo = new HashMap<>();
- for (final InlineResponse201VimConnectionInfo vimConnectionInfo : vnfInstancesVimConnectionInfo) {
- vimConnectionIdToVimConnectionInfo.put(vimConnectionInfo.getId(), vimConnectionInfo);
- }
-
- for (final LcnVnfLcmOperationOccurrenceNotificationAffectedVnfcs vnfc : notification.getAffectedVnfcs()) {
- final InlineResponse201VimConnectionInfo vimConnectionInfo =
- getVimConnectionInfo(vimConnectionIdToVimConnectionInfo, vnfc);
- if (ChangeTypeEnum.ADDED.equals(vnfc.getChangeType())) {
- final Vserver vserver = aaiHelper.createVserver(vnfc);
- aaiServiceProvider.invokePutVserver(getCloudOwner(vimConnectionInfo), getCloudRegion(vimConnectionInfo),
- getTenant(vimConnectionInfo), vserver);
-
- aaiServiceProvider.invokePutVserverToVnfRelationship(getCloudOwner(vimConnectionInfo),
- getCloudRegion(vimConnectionInfo), getTenant(vimConnectionInfo), vserver, vnfId);
- }
- }
- }
-
- private boolean deleteVserversFromAai(final VnfLcmOperationOccurrenceNotification notification,
- final GenericVnf vnf) {
- try {
- for (final LcnVnfLcmOperationOccurrenceNotificationAffectedVnfcs vnfc : notification.getAffectedVnfcs()) {
- if (ChangeTypeEnum.REMOVED.equals(vnfc.getChangeType())) {
-
- final Relationship relationshipToVserver = aaiHelper.deleteRelationshipWithDataValue(vnf, "vserver",
- "vserver.vserver-id", vnfc.getComputeResource().getResourceId());
-
- aaiServiceProvider.invokeDeleteVserver(
- aaiHelper.getRelationshipData(relationshipToVserver, "cloud-region.cloud-owner"),
- aaiHelper.getRelationshipData(relationshipToVserver, "cloud-region.cloud-region-id"),
- aaiHelper.getRelationshipData(relationshipToVserver, "tenant.tenant-id"),
- vnfc.getComputeResource().getResourceId());
- }
- }
- return true;
- } catch (final Exception exception) {
- logger.error(
- "Error encountered deleting vservers based on received notification, AAI may not be updated correctly "
- + vnfLcmOperationOccurrenceNotification,
- exception);
- return false;
- }
- }
-
- private boolean deleteVnfIdentifierOnVnfm(final GenericVnf genericVnf) {
- try {
- vnfmServiceProvider.deleteVnf(aaiHelper.getAssignedVnfm(genericVnf), genericVnf.getSelflink());
- return true;
- } catch (final Exception exception) {
- logger.error("Exception deleting the identifier " + genericVnf.getSelflink()
- + " from the VNFM. The VNF has been terminated successfully but the identifier will remain on the VNFM.",
- exception);
- return false;
- }
- }
-
- private boolean patchVnfInAai(final String vnfId, final String orchestrationStatus, final String selfLink) {
- try {
- final GenericVnf genericVnfPatch = new GenericVnf();
- genericVnfPatch.setVnfId(vnfId);
- genericVnfPatch.setOrchestrationStatus(orchestrationStatus);
- if (selfLink != null) {
- genericVnfPatch.setSelflink(selfLink);
- }
- aaiServiceProvider.invokePatchGenericVnf(genericVnfPatch);
- return true;
- } catch (final Exception exception) {
- logger.error(
- "Error encountered setting orchestration status and/or self link based on received notification, AAI may not be updated correctly "
- + vnfLcmOperationOccurrenceNotification,
- exception);
- return false;
- }
- }
-
- private InlineResponse201VimConnectionInfo getVimConnectionInfo(
- final Map<String, InlineResponse201VimConnectionInfo> vimConnectionIdToVimConnectionInfo,
- final LcnVnfLcmOperationOccurrenceNotificationAffectedVnfcs vnfc) {
- final String vimConnectionId = vnfc.getComputeResource().getVimConnectionId();
- return vimConnectionIdToVimConnectionInfo.get(vimConnectionId);
- }
-
- private String getCloudOwner(final InlineResponse201VimConnectionInfo vimConnectionInfo) {
- final String vimId = vimConnectionInfo.getVimId();
- return vimId.substring(0, vimId.indexOf("_"));
- }
-
- private String getCloudRegion(final InlineResponse201VimConnectionInfo vimConnectionInfo) {
- final String vimId = vimConnectionInfo.getVimId();
- return vimId.substring(vimId.indexOf("_") + 1);
- }
-
- private String getTenant(final InlineResponse201VimConnectionInfo vimConnectionInfo) {
- final JSONObject vimConnectionJsonObject = new JSONObject(vimConnectionInfo);
- return vimConnectionJsonObject.getJSONObject("accessInfo").get("projectId").toString();
- }
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/EtsiSol003AdapterController.java b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/EtsiSol003AdapterController.java
deleted file mode 100644
index 70131c89a5..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/EtsiSol003AdapterController.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.lcm.rest;
-
-import static org.onap.so.adapters.etsi.sol003.adapter.common.CommonConstants.BASE_URL;
-import javax.validation.Valid;
-import javax.ws.rs.core.MediaType;
-import org.onap.logging.ref.slf4j.ONAPLogConstants;
-import org.onap.so.adapters.etsisol003adapter.lcm.jobmanagement.JobManager;
-import org.onap.so.adapters.etsisol003adapter.lcm.lifecycle.LifecycleManager;
-import org.onap.so.adapters.etsisol003adapter.lcm.v1.model.CreateVnfRequest;
-import org.onap.so.adapters.etsisol003adapter.lcm.v1.model.CreateVnfResponse;
-import org.onap.so.adapters.etsisol003adapter.lcm.v1.model.DeleteVnfResponse;
-import org.onap.so.adapters.etsisol003adapter.lcm.v1.model.QueryJobResponse;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.slf4j.MDC;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestHeader;
-import org.springframework.web.bind.annotation.RequestMapping;
-import io.swagger.annotations.ApiParam;
-
-/**
- * Controller for handling requests to the VNFM (Virtual Network Function Manager) adapter REST API.
- */
-@Controller
-@RequestMapping(value = BASE_URL, produces = {MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML},
- consumes = {MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
-public class EtsiSol003AdapterController {
-
- private static final Logger logger = LoggerFactory.getLogger(EtsiSol003AdapterController.class);
- private final LifecycleManager lifecycleManager;
- private final JobManager jobManager;
-
- @Autowired
- EtsiSol003AdapterController(final LifecycleManager lifecycleManager, final JobManager jobManager) {
- this.lifecycleManager = lifecycleManager;
- this.jobManager = jobManager;
- }
-
- @PostMapping(value = "/vnfs/{vnfId}")
- public ResponseEntity<CreateVnfResponse> vnfCreate(
- @ApiParam(value = "The identifier of the VNF. This must be the vnf-id of an existing generic-vnf in AAI.",
- required = true) @PathVariable("vnfId") final String vnfId,
- @ApiParam(value = "VNF creation parameters",
- required = true) @Valid @RequestBody final CreateVnfRequest createVnfRequest,
- @ApiParam(
- value = "Used to track REST requests for logging purposes. Identifies a single top level invocation of ONAP",
- required = false) @RequestHeader(value = ONAPLogConstants.Headers.REQUEST_ID,
- required = false) final String requestId,
- @ApiParam(
- value = "Used to track REST requests for logging purposes. Identifies the client application user agent or user invoking the API",
- required = false) @RequestHeader(value = ONAPLogConstants.Headers.PARTNER_NAME,
- required = false) final String partnerName,
- @ApiParam(
- value = "Used to track REST requests for logging purposes. Identifies a single invocation of a single component",
- required = false) @RequestHeader(value = ONAPLogConstants.Headers.INVOCATION_ID,
- required = false) final String invocationId) {
-
- setLoggingMDCs(requestId, partnerName, invocationId);
-
- logger.info("REST request vnfCreate with body: {}", createVnfRequest);
-
- try {
- final CreateVnfResponse createVnfResponse = lifecycleManager.createVnf(vnfId, createVnfRequest);
- return new ResponseEntity<>(createVnfResponse, HttpStatus.ACCEPTED);
- } finally {
- clearLoggingMDCs();
- }
- }
-
- @DeleteMapping(value = "/vnfs/{vnfId}")
- public ResponseEntity<DeleteVnfResponse> vnfDelete(
- @ApiParam(value = "The identifier of the VNF. This must be the vnf-id of an existing generic-vnf in AAI.",
- required = true) @PathVariable("vnfId") final String vnfId,
- @ApiParam(
- value = "Used to track REST requests for logging purposes. Identifies a single top level invocation of ONAP",
- required = false) @RequestHeader(value = ONAPLogConstants.Headers.REQUEST_ID,
- required = false) final String requestId,
- @ApiParam(
- value = "Used to track REST requests for logging purposes. Identifies the client application user agent or user invoking the API",
- required = false) @RequestHeader(value = ONAPLogConstants.Headers.PARTNER_NAME,
- required = false) final String partnerName,
- @ApiParam(
- value = "Used to track REST requests for logging purposes. Identifies a single invocation of a single component",
- required = false) @RequestHeader(value = ONAPLogConstants.Headers.INVOCATION_ID,
- required = false) final String invocationId) {
-
- setLoggingMDCs(requestId, partnerName, invocationId);
-
- logger.info("REST request vnfDelete for VNF: {}", vnfId);
-
- try {
- final DeleteVnfResponse response = lifecycleManager.deleteVnf(vnfId);
- return new ResponseEntity<>(response, HttpStatus.ACCEPTED);
- } finally {
- clearLoggingMDCs();
- }
- }
-
- @GetMapping(value = "/jobs/{jobId}")
- public ResponseEntity<QueryJobResponse> jobQuery(
- @ApiParam(value = "The identifier of the Job.", required = true) @PathVariable("jobId") final String jobId,
- @ApiParam(
- value = "Used to track REST requests for logging purposes. Identifies a single top level invocation of ONAP",
- required = false) @RequestHeader(value = ONAPLogConstants.Headers.REQUEST_ID,
- required = false) final String requestId,
- @ApiParam(
- value = "Used to track REST requests for logging purposes. Identifies the client application user agent or user invoking the API",
- required = false) @RequestHeader(value = ONAPLogConstants.Headers.PARTNER_NAME,
- required = false) final String partnerName,
- @ApiParam(
- value = "Used to track REST requests for logging purposes. Identifies a single invocation of a single component",
- required = false) @RequestHeader(value = ONAPLogConstants.Headers.INVOCATION_ID,
- required = false) final String invocationId) {
-
- setLoggingMDCs(requestId, partnerName, invocationId);
-
- try {
- final QueryJobResponse response = jobManager.getVnfmOperation(jobId);
- return new ResponseEntity<>(response, HttpStatus.OK);
- } finally {
- clearLoggingMDCs();
- }
- }
-
- private void setLoggingMDCs(final String requestId, final String partnerName, final String invocationId) {
- MDC.put(ONAPLogConstants.MDCs.REQUEST_ID, requestId);
- MDC.put(ONAPLogConstants.MDCs.PARTNER_NAME, partnerName);
- MDC.put(ONAPLogConstants.MDCs.INVOCATION_ID, invocationId);
- }
-
- private void clearLoggingMDCs() {
- MDC.clear();
- }
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/Sol003GrantController.java b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/Sol003GrantController.java
deleted file mode 100644
index 8a17b68fae..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/Sol003GrantController.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.lcm.rest;
-
-import static org.onap.so.adapters.etsi.sol003.adapter.common.CommonConstants.BASE_URL;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.UUID;
-import javax.ws.rs.core.MediaType;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.aai.AaiHelper;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.aai.AaiServiceProvider;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.VnfmHelper;
-import org.onap.so.adapters.etsisol003adapter.lcm.grant.model.GrantRequest;
-import org.onap.so.adapters.etsisol003adapter.lcm.grant.model.GrantsAddResources;
-import org.onap.so.adapters.etsisol003adapter.lcm.grant.model.InlineResponse201;
-import org.onap.so.adapters.etsisol003adapter.lcm.grant.model.InlineResponse201AddResources;
-import org.onap.so.adapters.etsisol003adapter.lcm.grant.model.InlineResponse201VimConnections;
-import org.onap.so.adapters.etsisol003adapter.lcm.v1.model.Tenant;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-
-@Controller
-@RequestMapping(value = BASE_URL, produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON)
-public class Sol003GrantController {
-
- private static final Logger logger = LoggerFactory.getLogger(Sol003GrantController.class);
- public final AaiServiceProvider aaiServiceProvider;
- public final AaiHelper aaiHelper;
- public final VnfmHelper vnfmHelper;
-
- @Autowired
- public Sol003GrantController(final AaiServiceProvider aaiServiceProvider, final AaiHelper aaiHelper,
- final VnfmHelper vnfmHelper) {
- this.aaiServiceProvider = aaiServiceProvider;
- this.aaiHelper = aaiHelper;
- this.vnfmHelper = vnfmHelper;
- }
-
- @GetMapping(value = "/grants/{grantId}")
- public ResponseEntity<InlineResponse201> grantsGrantIdGet(@PathVariable("grantId") final String grantId) {
- logger.info("Get grant received from VNFM, grant id: " + grantId);
- return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
- }
-
- @PostMapping(value = "/grants")
- public ResponseEntity<InlineResponse201> grantsPost(@RequestBody final GrantRequest grantRequest) {
- logger.info("Grant request received from VNFM: " + grantRequest);
-
- final InlineResponse201 grantResponse = createGrantResponse(grantRequest);
- logger.info("Grant request returning to VNFM: " + grantResponse);
- return new ResponseEntity<>(grantResponse, HttpStatus.CREATED);
- }
-
- private InlineResponse201 createGrantResponse(final GrantRequest grantRequest) {
- final InlineResponse201 grantResponse = new InlineResponse201();
- grantResponse.setId(UUID.randomUUID().toString());
- grantResponse.setVnfInstanceId(grantRequest.getVnfInstanceId());
- grantResponse.setVnfLcmOpOccId(grantRequest.getVnfLcmOpOccId());
- final String vnfSelfLink = grantRequest.getLinks().getVnfInstance().getHref();
- final Tenant tenant = aaiHelper
- .getAssignedTenant(aaiServiceProvider.invokeQueryGenericVnf(vnfSelfLink).getGenericVnf().get(0));
-
- String vimConnectionId = "";
- final InlineResponse201VimConnections vimConnection = vnfmHelper.getVimConnections(tenant);
- grantResponse.addVimConnectionsItem(vimConnection);
- vimConnectionId = vimConnection.getId();
-
- if (grantRequest.getOperation().equals(GrantRequest.OperationEnum.INSTANTIATE)) {
- grantResponse.addResources(getResources(grantRequest.getAddResources(), vimConnectionId));
- } else if (grantRequest.getOperation().equals(GrantRequest.OperationEnum.TERMINATE)) {
- grantResponse.removeResources(getResources(grantRequest.getRemoveResources(), vimConnectionId));
- }
- return grantResponse;
- }
-
- private List<InlineResponse201AddResources> getResources(final List<GrantsAddResources> requestResources,
- final String vimId) {
- final List<InlineResponse201AddResources> resources = new ArrayList<>();
- for (final GrantsAddResources requestResource : requestResources) {
- final InlineResponse201AddResources responseResource = new InlineResponse201AddResources();
- responseResource.setResourceDefinitionId(requestResource.getId());
- responseResource.setVimConnectionId(vimId);
- resources.add(responseResource);
- }
- return resources;
- }
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/Sol003LcnContoller.java b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/Sol003LcnContoller.java
deleted file mode 100644
index 784fb8efa6..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/Sol003LcnContoller.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.lcm.rest;
-
-import static org.onap.so.adapters.etsi.sol003.adapter.common.CommonConstants.BASE_URL;
-import static org.onap.so.adapters.etsisol003adapter.lcm.LifeCycleManagementConstants.OPERATION_NOTIFICATION_ENDPOINT;
-import static org.slf4j.LoggerFactory.getLogger;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import javax.ws.rs.core.MediaType;
-import org.onap.aai.domain.yang.EsrVnfm;
-import org.onap.aai.domain.yang.GenericVnf;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.aai.AaiHelper;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.aai.AaiServiceProvider;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.VnfmServiceProvider;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.InlineResponse201;
-import org.onap.so.adapters.etsisol003adapter.lcm.jobmanagement.JobManager;
-import org.onap.so.adapters.etsisol003adapter.lcm.lcn.model.VnfIdentifierCreationNotification;
-import org.onap.so.adapters.etsisol003adapter.lcm.lcn.model.VnfIdentifierDeletionNotification;
-import org.onap.so.adapters.etsisol003adapter.lcm.lcn.model.VnfLcmOperationOccurrenceNotification;
-import org.onap.so.adapters.etsisol003adapter.lcm.lcn.model.VnfLcmOperationOccurrenceNotification.OperationEnum;
-import org.onap.so.adapters.etsisol003adapter.lcm.lcn.model.VnfLcmOperationOccurrenceNotification.OperationStateEnum;
-import org.onap.so.adapters.etsisol003adapter.lcm.notificationhandling.NotificationHandler;
-import org.slf4j.Logger;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-
-/**
- * Controller for handling notifications from the VNFM (Virtual Network Function Manager).
- */
-@Controller
-@RequestMapping(value = BASE_URL, produces = {MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML},
- consumes = {MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
-public class Sol003LcnContoller {
- private static Logger logger = getLogger(Sol003LcnContoller.class);
- private static final String LOG_LCN_RECEIVED = "LCN received from VNFM: ";
- private final AaiServiceProvider aaiServiceProvider;
- private final AaiHelper aaiHelper;
- private final VnfmServiceProvider vnfmServiceProvider;
- private final JobManager jobManager;
- private final ExecutorService executor = Executors.newCachedThreadPool();
-
- @Autowired
- Sol003LcnContoller(final AaiServiceProvider aaiServiceProvider, final AaiHelper aaiHelper,
- final VnfmServiceProvider vnfmServiceProvider, final JobManager jobManager) {
- this.aaiServiceProvider = aaiServiceProvider;
- this.aaiHelper = aaiHelper;
- this.vnfmServiceProvider = vnfmServiceProvider;
- this.jobManager = jobManager;
- }
-
- @PostMapping(value = "/lcn/VnfIdentifierCreationNotification")
- public ResponseEntity<Void> lcnVnfIdentifierCreationNotificationPost(
- @RequestBody final VnfIdentifierCreationNotification vnfIdentifierCreationNotification) {
- logger.info(LOG_LCN_RECEIVED + vnfIdentifierCreationNotification);
- return new ResponseEntity<>(HttpStatus.NO_CONTENT);
- }
-
- @PostMapping(value = "/lcn/VnfIdentifierDeletionNotification")
- public ResponseEntity<Void> lcnVnfIdentifierDeletionNotificationPost(
- @RequestBody final VnfIdentifierDeletionNotification vnfIdentifierDeletionNotification) {
- logger.info(LOG_LCN_RECEIVED + vnfIdentifierDeletionNotification);
- return new ResponseEntity<>(HttpStatus.NO_CONTENT);
- }
-
- @PostMapping(value = OPERATION_NOTIFICATION_ENDPOINT)
- public ResponseEntity<Void> lcnVnfLcmOperationOccurrenceNotificationPost(
- @RequestBody final VnfLcmOperationOccurrenceNotification vnfLcmOperationOccurrenceNotification) {
- logger.info(LOG_LCN_RECEIVED + vnfLcmOperationOccurrenceNotification);
-
- if (isANotificationOfInterest(vnfLcmOperationOccurrenceNotification)) {
- final InlineResponse201 vnfInstance = getVnfInstance(vnfLcmOperationOccurrenceNotification);
- final NotificationHandler handler = new NotificationHandler(vnfLcmOperationOccurrenceNotification,
- aaiHelper, aaiServiceProvider, vnfmServiceProvider, jobManager, vnfInstance);
- executor.execute(handler);
- }
-
- logger.info("Sending notification response");
- return new ResponseEntity<>(HttpStatus.NO_CONTENT);
- }
-
- private boolean isANotificationOfInterest(final VnfLcmOperationOccurrenceNotification notification) {
- return isInstanitiateCompleted(notification) || isTerminateTerminalState(notification);
- }
-
- private boolean isInstanitiateCompleted(final VnfLcmOperationOccurrenceNotification notification) {
- return notification.getOperation().equals(OperationEnum.INSTANTIATE)
- && notification.getOperationState().equals(OperationStateEnum.COMPLETED);
- }
-
- private boolean isTerminateTerminalState(final VnfLcmOperationOccurrenceNotification notification) {
- return notification.getOperation().equals(OperationEnum.TERMINATE)
- && (notification.getOperationState().equals(OperationStateEnum.COMPLETED)
- || notification.getOperationState().equals(OperationStateEnum.FAILED)
- || notification.getOperationState().equals(OperationStateEnum.ROLLED_BACK));
- }
-
- private InlineResponse201 getVnfInstance(
- final VnfLcmOperationOccurrenceNotification vnfLcmOperationOccurrenceNotification) {
- final GenericVnf vnfInAai = aaiServiceProvider
- .invokeQueryGenericVnf(vnfLcmOperationOccurrenceNotification.getLinks().getVnfInstance().getHref())
- .getGenericVnf().get(0);
- final EsrVnfm vnfm = aaiHelper.getAssignedVnfm(vnfInAai);
- return vnfmServiceProvider
- .getVnf(vnfm, vnfLcmOperationOccurrenceNotification.getLinks().getVnfInstance().getHref()).get();
- }
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/exceptions/JobNotFoundException.java b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/exceptions/JobNotFoundException.java
deleted file mode 100644
index 2461631bc4..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/exceptions/JobNotFoundException.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.lcm.rest.exceptions;
-
-import org.springframework.http.HttpStatus;
-import org.springframework.web.bind.annotation.ResponseStatus;
-
-/**
- * Exception for job not found.
- */
-@ResponseStatus(HttpStatus.NOT_FOUND)
-public class JobNotFoundException extends RuntimeException {
-
- private static final long serialVersionUID = 6398018034431666933L;
-
- public JobNotFoundException(final String message) {
- super(message);
- }
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/exceptions/TenantNotFoundException.java b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/exceptions/TenantNotFoundException.java
deleted file mode 100644
index b7911c82e7..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/exceptions/TenantNotFoundException.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.lcm.rest.exceptions;
-
-/**
- * Exception for Tenant not found.
- */
-
-public class TenantNotFoundException extends RuntimeException {
-
- private static final long serialVersionUID = 6398018034431666933L;
-
- public TenantNotFoundException(final String message) {
- super(message);
- }
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/exceptions/VnfNotFoundException.java b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/exceptions/VnfNotFoundException.java
deleted file mode 100644
index 78232e2622..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/exceptions/VnfNotFoundException.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.lcm.rest.exceptions;
-
-import org.springframework.http.HttpStatus;
-import org.springframework.web.bind.annotation.ResponseStatus;
-
-/**
- * Exception for VNF not found.
- */
-@ResponseStatus(HttpStatus.NOT_FOUND)
-public class VnfNotFoundException extends RuntimeException {
-
- private static final long serialVersionUID = 6398018034431666933L;
-
- public VnfNotFoundException(final String message) {
- super(message);
- }
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/exceptions/VnfmNotFoundException.java b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/exceptions/VnfmNotFoundException.java
deleted file mode 100644
index 6720d0bd92..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/exceptions/VnfmNotFoundException.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.lcm.rest.exceptions;
-
-import org.springframework.http.HttpStatus;
-import org.springframework.web.bind.annotation.ResponseStatus;
-
-/**
- * Exception for VNFM not found.
- */
-@ResponseStatus(HttpStatus.BAD_REQUEST)
-public class VnfmNotFoundException extends RuntimeException {
-
- private static final long serialVersionUID = 6398018034431666933L;
-
- public VnfmNotFoundException(final String message) {
- super(message);
- }
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/exceptions/VnfmRequestFailureException.java b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/exceptions/VnfmRequestFailureException.java
deleted file mode 100644
index 10ada7ce18..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/exceptions/VnfmRequestFailureException.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.lcm.rest.exceptions;
-
-/**
- * Exception indicating a request to a VNFM failed.
- */
-public class VnfmRequestFailureException extends RuntimeException {
-
- private static final long serialVersionUID = 6398018034431666933L;
-
- public VnfmRequestFailureException(final String message) {
- super(message);
- }
-
- public VnfmRequestFailureException(final String message, final Throwable throwable) {
- super(message, throwable);
- }
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/resources/META-INF/services/org.onap.so.client.RestProperties b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/resources/META-INF/services/org.onap.so.client.RestProperties
deleted file mode 100644
index bc6ef94f42..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/resources/META-INF/services/org.onap.so.client.RestProperties
+++ /dev/null
@@ -1 +0,0 @@
-org.onap.so.adapters.etsisol003adapter.lcm.extclients.aai.AaiPropertiesImpl \ No newline at end of file
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/EtsiSol003AdapterControllerTest.java b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/EtsiSol003AdapterControllerTest.java
deleted file mode 100644
index 5bc4daac42..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/EtsiSol003AdapterControllerTest.java
+++ /dev/null
@@ -1,563 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.lcm.rest;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.timeout;
-import static org.mockito.Mockito.verify;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.VnfmRestTemplateConfiguration;
-import static org.springframework.test.web.client.match.MockRestRequestMatchers.content;
-import static org.springframework.test.web.client.match.MockRestRequestMatchers.requestTo;
-import static org.springframework.test.web.client.response.MockRestResponseCreators.withBadRequest;
-import static org.springframework.test.web.client.response.MockRestResponseCreators.withStatus;
-import static org.springframework.test.web.client.response.MockRestResponseCreators.withSuccess;
-import java.net.URI;
-import java.util.Optional;
-import org.hamcrest.BaseMatcher;
-import org.hamcrest.Description;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.ArgumentCaptor;
-import org.mockito.hamcrest.MockitoHamcrest;
-import org.onap.aai.domain.yang.EsrSystemInfo;
-import org.onap.aai.domain.yang.EsrSystemInfoList;
-import org.onap.aai.domain.yang.EsrVnfm;
-import org.onap.aai.domain.yang.EsrVnfmList;
-import org.onap.aai.domain.yang.GenericVnf;
-import org.onap.aai.domain.yang.Relationship;
-import org.onap.aai.domain.yang.RelationshipData;
-import org.onap.aai.domain.yang.RelationshipList;
-import org.onap.aaiclient.client.aai.AAIResourcesClient;
-import org.onap.aaiclient.client.aai.AAIVersion;
-import org.onap.aaiclient.client.aai.entities.uri.AAIBaseResourceUri;
-import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.EtsiPackageProvider;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.VnfmRestTemplateConfiguration;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.InlineResponse200;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.InlineResponse2001;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.InlineResponse201;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.InlineResponse201.InstantiationStateEnum;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.InlineResponse201Links;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.InlineResponse201LinksSelf;
-import org.onap.so.adapters.etsisol003adapter.lcm.lcn.JSON;
-import org.onap.so.adapters.etsisol003adapter.lcm.rest.exceptions.VnfmNotFoundException;
-import org.onap.so.adapters.etsisol003adapter.lcm.v1.model.CreateVnfRequest;
-import org.onap.so.adapters.etsisol003adapter.lcm.v1.model.CreateVnfResponse;
-import org.onap.so.adapters.etsisol003adapter.lcm.v1.model.DeleteVnfResponse;
-import org.onap.so.adapters.etsisol003adapter.lcm.v1.model.OperationEnum;
-import org.onap.so.adapters.etsisol003adapter.lcm.v1.model.OperationStateEnum;
-import org.onap.so.adapters.etsisol003adapter.lcm.v1.model.QueryJobResponse;
-import org.onap.so.adapters.etsisol003adapter.lcm.v1.model.Tenant;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
-import org.springframework.boot.test.mock.mockito.MockBean;
-import org.springframework.boot.test.web.client.TestRestTemplate;
-import org.springframework.boot.web.server.LocalServerPort;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.MediaType;
-import org.springframework.http.RequestEntity;
-import org.springframework.http.ResponseEntity;
-import org.springframework.test.context.ActiveProfiles;
-import org.springframework.test.context.junit4.SpringRunner;
-import org.springframework.test.web.client.MockRestServiceServer;
-import org.springframework.web.client.RestTemplate;
-import org.threeten.bp.LocalDateTime;
-import org.threeten.bp.OffsetDateTime;
-import org.threeten.bp.ZoneOffset;
-import com.google.gson.Gson;
-
-@RunWith(SpringRunner.class)
-@SpringBootTest(classes = TestApplication.class, webEnvironment = WebEnvironment.RANDOM_PORT)
-@ActiveProfiles("test")
-public class EtsiSol003AdapterControllerTest {
-
- private static final OffsetDateTime JAN_1_2019_12_00 =
- OffsetDateTime.of(LocalDateTime.of(2019, 1, 1, 12, 0), ZoneOffset.UTC);
- private static final OffsetDateTime JAN_1_2019_1_00 =
- OffsetDateTime.of(LocalDateTime.of(2019, 1, 1, 1, 0), ZoneOffset.UTC);
- private static final String CLOUD_OWNER = "myTestCloudOwner";
- private static final String REGION = "myTestRegion";
- private static final String TENANT_ID = "myTestTenantId";
-
- @LocalServerPort
- private int port;
- @Autowired
- @Qualifier(VnfmRestTemplateConfiguration.SOL003_LCM_REST_TEMPLATE)
- private RestTemplate testRestTemplate;
- private MockRestServiceServer mockRestServer;
-
- @MockBean
- AAIResourcesClient aaiResourcesClient;
-
- @MockBean
- EtsiPackageProvider etsiPackageProvider;
-
- @Autowired
- EtsiSol003AdapterController controller;
- Gson gson = new JSON().getGson();
-
- @Before
- public void setUp() throws Exception {
- mockRestServer = MockRestServiceServer.bindTo(testRestTemplate).build();
- }
-
- @Test
- public void createVnf_ValidRequest_Returns202AndJobId() throws Exception {
- final Tenant tenant = new Tenant().cloudOwner(CLOUD_OWNER).regionName(REGION).tenantId(TENANT_ID);
- final CreateVnfRequest createVnfRequest = new CreateVnfRequest().name("myTestName").tenant(tenant);
-
- setUpGenericVnfInMockAai("vnfmType2");
- setUpVnfmsInMockAai();
- setUpVimInMockAai();
-
- final String expectedsubscriptionRequest =
- "{\"filter\":{\"vnfInstanceSubscriptionFilter\":{\"vnfInstanceIds\":[\"vnfId\"]},\"notificationTypes\":[\"VnfLcmOperationOccurrenceNotification\"]},\"callbackUri\":\"https://so-vnfm-adapter.onap:30406/so/vnfm-adapter/v1/lcn/VnfLcmOperationOccurrenceNotification\",\"authentication\":{\"authType\":[\"OAUTH2_CLIENT_CREDENTIALS\", \"BASIC\", \"TLS_CERT\"],\"paramsOauth2ClientCredentials\":{\"clientId\":\"vnfm\",\"clientPassword\":\"password1$\",\"tokenEndpoint\":\"https://so-vnfm-adapter.onap:30406/oauth/token\"},\"paramsBasic\":{\"userName\":\"vnfm\",\"password\":\"password1$\"}}}";
- final InlineResponse2001 subscriptionResponse = new InlineResponse2001();
-
- final InlineResponse201 createResponse = createCreateResponse();
- mockRestServer.expect(requestTo("http://vnfm2:8080/vnf_instances"))
- .andRespond(withSuccess(gson.toJson(createResponse), MediaType.APPLICATION_JSON));
-
- mockRestServer.expect(requestTo("http://vnfm2:8080/subscriptions"))
- .andExpect(content().json(expectedsubscriptionRequest))
- .andRespond(withSuccess(gson.toJson(subscriptionResponse), MediaType.APPLICATION_JSON));
-
- mockRestServer.expect(requestTo("http://vnfm2:8080/vnf_instances/vnfId/instantiate"))
- .andRespond(withStatus(HttpStatus.ACCEPTED).contentType(MediaType.APPLICATION_JSON)
- .location(new URI("http://vnfm2:8080/vnf_lcm_op_occs/123456")));
-
- final InlineResponse200 firstOperationQueryResponse = createOperationQueryResponse(
- org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.InlineResponse200.OperationEnum.INSTANTIATE,
- org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.InlineResponse200.OperationStateEnum.PROCESSING);
- mockRestServer.expect(requestTo("http://vnfm2:8080/vnf_lcm_op_occs/123456"))
- .andRespond(withSuccess(gson.toJson(firstOperationQueryResponse), MediaType.APPLICATION_JSON));
-
- final InlineResponse200 secondOperationQueryReponse = createOperationQueryResponse(
- org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.InlineResponse200.OperationEnum.INSTANTIATE,
- org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.InlineResponse200.OperationStateEnum.COMPLETED);
- mockRestServer.expect(requestTo("http://vnfm2:8080/vnf_lcm_op_occs/123456"))
- .andRespond(withSuccess(gson.toJson(secondOperationQueryReponse), MediaType.APPLICATION_JSON));
-
- // Invoke the create request
-
- final ResponseEntity<CreateVnfResponse> createVnfResponse =
- controller.vnfCreate("myTestVnfId", createVnfRequest, "asadas", "so", "1213");
- assertEquals(HttpStatus.ACCEPTED, createVnfResponse.getStatusCode());
- assertNotNull(createVnfResponse.getBody().getJobId());
-
- final ArgumentCaptor<GenericVnf> genericVnfArgument = ArgumentCaptor.forClass(GenericVnf.class);
- final ArgumentCaptor<AAIResourceUri> uriArgument = ArgumentCaptor.forClass(AAIResourceUri.class);
-
- verify(aaiResourcesClient).update(uriArgument.capture(), genericVnfArgument.capture());
-
- assertEquals("/network/generic-vnfs/generic-vnf/myTestVnfId", uriArgument.getValue().build().toString());
-
- assertEquals("myTestVnfId", genericVnfArgument.getValue().getVnfId());
-
- final ArgumentCaptor<AAIResourceUri> uriArgument1Connect = ArgumentCaptor.forClass(AAIResourceUri.class);
- final ArgumentCaptor<AAIResourceUri> uriArgument2Connect = ArgumentCaptor.forClass(AAIResourceUri.class);
- verify(aaiResourcesClient, timeout(1000)).connect(uriArgument1Connect.capture(), uriArgument2Connect.capture());
- assertEquals("/external-system/esr-vnfm-list/esr-vnfm/vnfm2",
- uriArgument1Connect.getAllValues().get(0).build().toString());
- assertEquals("/network/generic-vnfs/generic-vnf/myTestVnfId",
- uriArgument2Connect.getAllValues().get(0).build().toString());
-
- // check the job status
-
- final ResponseEntity<QueryJobResponse> firstJobQueryResponse =
- controller.jobQuery(createVnfResponse.getBody().getJobId(), "", "so", "1213");
- assertEquals(OperationEnum.INSTANTIATE, firstJobQueryResponse.getBody().getOperation());
- assertEquals(OperationStateEnum.PROCESSING, firstJobQueryResponse.getBody().getOperationState());
- assertEquals(JAN_1_2019_12_00, firstJobQueryResponse.getBody().getStartTime());
- assertEquals(JAN_1_2019_1_00, firstJobQueryResponse.getBody().getStateEnteredTime());
-
- final ResponseEntity<QueryJobResponse> secondJobQueryResponse =
- controller.jobQuery(createVnfResponse.getBody().getJobId(), "", "so", "1213");
- assertEquals(OperationEnum.INSTANTIATE, secondJobQueryResponse.getBody().getOperation());
- assertEquals(OperationStateEnum.COMPLETED, secondJobQueryResponse.getBody().getOperationState());
- assertEquals(JAN_1_2019_12_00, secondJobQueryResponse.getBody().getStartTime());
- assertEquals(JAN_1_2019_1_00, secondJobQueryResponse.getBody().getStateEnteredTime());
- }
-
- @Test(expected = IllegalArgumentException.class)
- public void createVnf_VnfAlreadyExistsOnVnfm_ThrowsIllegalArgumentException() throws Exception {
- final Tenant tenant = new Tenant().cloudOwner(CLOUD_OWNER).regionName(REGION).tenantId(TENANT_ID);
- final CreateVnfRequest createVnfRequest = new CreateVnfRequest().name("myTestName").tenant(tenant);
-
- final GenericVnf genericVnf = setUpGenericVnfInMockAai("vnfmType1");
- addSelfLinkToGenericVnf(genericVnf);
- addRelationshipFromGenericVnfToVnfm(genericVnf, "vnfm1");
- setUpVnfmsInMockAai();
-
- final InlineResponse201 reponse = new InlineResponse201();
- mockRestServer.expect(requestTo(new URI("http://vnfm:8080/vnfs/myTestVnfIdOnVnfm")))
- .andRespond(withSuccess(gson.toJson(reponse), MediaType.APPLICATION_JSON));
-
- controller.vnfCreate("myTestVnfId", createVnfRequest, "asadas", "so", "1213");
- }
-
- @Test(expected = VnfmNotFoundException.class)
- public void createVnf_NoMatchingVnfmFound_ThrowsException() throws Exception {
- final Tenant tenant = new Tenant().cloudOwner(CLOUD_OWNER).regionName(REGION).tenantId(TENANT_ID);
- final CreateVnfRequest createVnfRequest = new CreateVnfRequest().name("myTestName").tenant(tenant);
-
- setUpGenericVnfInMockAai("anotherType");
- setUpVnfmsInMockAai();
-
- controller.vnfCreate("myTestVnfId", createVnfRequest, "asadas", "so", "1213");
- }
-
- @Test
- public void createVnf_VnfmAlreadyAssociatedWithVnf_Returns202AndJobId() throws Exception {
- final Tenant tenant = new Tenant().cloudOwner(CLOUD_OWNER).regionName(REGION).tenantId(TENANT_ID);
- final CreateVnfRequest createVnfRequest = new CreateVnfRequest().name("myTestName").tenant(tenant);
-
- final GenericVnf genericVnf = setUpGenericVnfInMockAai("vnfmType2");
- addRelationshipFromGenericVnfToVnfm(genericVnf, "vnfm2");
- setUpVnfmsInMockAai();
- setUpVimInMockAai();
-
- final InlineResponse201 createResponse = createCreateResponse();
- mockRestServer.expect(requestTo("http://vnfm2:8080/vnf_instances"))
- .andRespond(withSuccess(gson.toJson(createResponse), MediaType.APPLICATION_JSON));
-
- mockRestServer.expect(requestTo("http://vnfm2:8080/subscriptions")).andRespond(withBadRequest());
-
- mockRestServer.expect(requestTo("http://vnfm2:8080/vnf_instances/vnfId/instantiate"))
- .andRespond(withStatus(HttpStatus.ACCEPTED).contentType(MediaType.APPLICATION_JSON)
- .location(new URI("http://vnfm2:8080/vnf_lcm_op_occs/123456")));
-
- final ResponseEntity<CreateVnfResponse> response =
- controller.vnfCreate("myTestVnfId", createVnfRequest, "asadas", "so", "1213");
- assertEquals(HttpStatus.ACCEPTED, response.getStatusCode());
- assertNotNull(response.getBody().getJobId());
- }
-
- @Test
- @Ignore
- public void createVnf_UnauthorizedUser_Returns401() throws Exception {
- final TestRestTemplate restTemplateWrongPassword = new TestRestTemplate("test", "wrongPassword");
- final Tenant tenant = new Tenant().cloudOwner(CLOUD_OWNER).regionName(REGION).tenantId(TENANT_ID);
- final CreateVnfRequest createVnfRequest = new CreateVnfRequest().name("myTestName").tenant(tenant);
-
- final RequestEntity<CreateVnfRequest> request =
- RequestEntity.post(new URI("http://localhost:" + port + "/so/vnfm-adapter/v1/vnfs/myVnfId"))
- .accept(MediaType.APPLICATION_JSON).contentType(MediaType.APPLICATION_JSON)
- .header("X-ONAP-RequestId", "myRequestId").header("X-ONAP-InvocationID", "myInvocationId")
- .body(createVnfRequest);
- final ResponseEntity<CreateVnfResponse> response =
- restTemplateWrongPassword.exchange(request, CreateVnfResponse.class);
- assertEquals(401, response.getStatusCode().value());
- }
-
- @Test
- public void deleteVnf_ValidRequest_Returns202AndJobId() throws Exception {
- final TestRestTemplate restTemplate = new TestRestTemplate("test", "test");
-
- final GenericVnf genericVnf = setUpGenericVnfInMockAai("vnfmType1");
- addSelfLinkToGenericVnf(genericVnf);
- addRelationshipFromGenericVnfToVnfm(genericVnf, "vnfm1");
- setUpVnfmsInMockAai();
-
- mockRestServer.expect(requestTo("http://vnfm:8080/vnfs/myTestVnfIdOnVnfm/terminate"))
- .andRespond(withStatus(HttpStatus.ACCEPTED).contentType(MediaType.APPLICATION_JSON)
- .location(new URI("http://vnfm1:8080/vnf_lcm_op_occs/1234567")));
-
- final InlineResponse200 firstOperationQueryResponse = createOperationQueryResponse(
- org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.InlineResponse200.OperationEnum.TERMINATE,
- org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.InlineResponse200.OperationStateEnum.PROCESSING);
- mockRestServer.expect(requestTo("http://vnfm1:8080/vnf_lcm_op_occs/1234567"))
- .andRespond(withSuccess(gson.toJson(firstOperationQueryResponse), MediaType.APPLICATION_JSON));
-
- final InlineResponse200 secondOperationQueryReponse = createOperationQueryResponse(
- org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.InlineResponse200.OperationEnum.TERMINATE,
- org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.InlineResponse200.OperationStateEnum.COMPLETED);
- mockRestServer.expect(requestTo("http://vnfm1:8080/vnf_lcm_op_occs/1234567"))
- .andRespond(withSuccess(gson.toJson(secondOperationQueryReponse), MediaType.APPLICATION_JSON));
-
- final RequestEntity<Void> request = RequestEntity
- .delete(new URI("http://localhost:" + port + "/so/vnfm-adapter/v1/vnfs/myTestVnfId"))
- .accept(MediaType.APPLICATION_JSON).header("X-ONAP-RequestId", "myRequestId")
- .header("X-ONAP-InvocationID", "myInvocationId").header("Content-Type", "application/json").build();
- final ResponseEntity<DeleteVnfResponse> deleteVnfResponse =
- restTemplate.exchange(request, DeleteVnfResponse.class);
- assertEquals(202, deleteVnfResponse.getStatusCode().value());
- assertNotNull(deleteVnfResponse.getBody().getJobId());
-
- final ResponseEntity<QueryJobResponse> firstJobQueryResponse =
- controller.jobQuery(deleteVnfResponse.getBody().getJobId(), "", "so", "1213");
- assertEquals(OperationEnum.TERMINATE, firstJobQueryResponse.getBody().getOperation());
- assertEquals(OperationStateEnum.PROCESSING, firstJobQueryResponse.getBody().getOperationState());
- assertEquals(JAN_1_2019_12_00, firstJobQueryResponse.getBody().getStartTime());
- assertEquals(JAN_1_2019_1_00, firstJobQueryResponse.getBody().getStateEnteredTime());
-
- final ResponseEntity<QueryJobResponse> secondJobQueryResponse =
- controller.jobQuery(deleteVnfResponse.getBody().getJobId(), "", "so", "1213");
- assertEquals(OperationEnum.TERMINATE, secondJobQueryResponse.getBody().getOperation());
- assertEquals(OperationStateEnum.PROCESSING, secondJobQueryResponse.getBody().getOperationState());
- assertEquals(JAN_1_2019_12_00, secondJobQueryResponse.getBody().getStartTime());
- assertEquals(JAN_1_2019_1_00, secondJobQueryResponse.getBody().getStateEnteredTime());
- }
-
- @Test
- public void deleteVnf_VnfAlreadyTerminated_Returns202AndJobId() throws Exception {
- final TestRestTemplate restTemplate = new TestRestTemplate("test", "test");
-
- final GenericVnf genericVnf = setUpGenericVnfInMockAai("vnfmType1");
- addSelfLinkToGenericVnf(genericVnf);
- addRelationshipFromGenericVnfToVnfm(genericVnf, "vnfm1");
- setUpVnfmsInMockAai();
-
- mockRestServer.expect(requestTo("http://vnfm:8080/vnfs/myTestVnfIdOnVnfm/terminate"))
- .andRespond(withStatus(HttpStatus.CONFLICT).contentType(MediaType.APPLICATION_JSON));
-
- final InlineResponse201 reponse = new InlineResponse201();
- reponse.setInstantiationState(InstantiationStateEnum.NOT_INSTANTIATED);
- mockRestServer.expect(requestTo(new URI("http://vnfm:8080/vnfs/myTestVnfIdOnVnfm")))
- .andRespond(withSuccess(gson.toJson(reponse), MediaType.APPLICATION_JSON));
-
- mockRestServer.expect(requestTo("http://vnfm:8080/vnfs/myTestVnfIdOnVnfm"))
- .andRespond(withStatus(HttpStatus.NO_CONTENT).contentType(MediaType.APPLICATION_JSON));
-
- final RequestEntity<Void> request = RequestEntity
- .delete(new URI("http://localhost:" + port + "/so/vnfm-adapter/v1/vnfs/myTestVnfId"))
- .accept(MediaType.APPLICATION_JSON).header("X-ONAP-RequestId", "myRequestId")
- .header("X-ONAP-InvocationID", "myInvocationId").header("Content-Type", "application/json").build();
- final ResponseEntity<DeleteVnfResponse> deleteVnfResponse =
- restTemplate.exchange(request, DeleteVnfResponse.class);
- assertEquals(202, deleteVnfResponse.getStatusCode().value());
- assertNotNull(deleteVnfResponse.getBody().getJobId());
-
- final ResponseEntity<QueryJobResponse> jobQueryResponse =
- controller.jobQuery(deleteVnfResponse.getBody().getJobId(), "", "so", "1213");
- assertEquals(OperationStateEnum.COMPLETED, jobQueryResponse.getBody().getOperationState());
- }
-
- @Test
- public void deleteVnf_GenericVnfNotFound_Returns404() throws Exception {
- final TestRestTemplate restTemplate = new TestRestTemplate("test", "test");
-
- final RequestEntity<Void> request = RequestEntity
- .delete(new URI("http://localhost:" + port + "/so/vnfm-adapter/v1/vnfs/myNonExistingVnfId"))
- .accept(MediaType.APPLICATION_JSON).header("X-ONAP-RequestId", "myRequestId")
- .header("X-ONAP-InvocationID", "myInvocationId").header("Content-Type", "application/json").build();
- final ResponseEntity<DeleteVnfResponse> deleteVnfResponse =
- restTemplate.exchange(request, DeleteVnfResponse.class);
- assertEquals(404, deleteVnfResponse.getStatusCode().value());
- assertNull(deleteVnfResponse.getBody().getJobId());
- }
-
- @Test
- public void deleteVnf_NoAssignedVnfm_Returns400() throws Exception {
- final TestRestTemplate restTemplate = new TestRestTemplate("test", "test");
-
- setUpGenericVnfInMockAai("vnfmType");
-
- final RequestEntity<Void> request = RequestEntity
- .delete(new URI("http://localhost:" + port + "/so/vnfm-adapter/v1/vnfs/myTestVnfId"))
- .accept(MediaType.APPLICATION_JSON).header("X-ONAP-RequestId", "myRequestId")
- .header("X-ONAP-InvocationID", "myInvocationId").header("Content-Type", "application/json").build();
- final ResponseEntity<DeleteVnfResponse> deleteVnfResponse =
- restTemplate.exchange(request, DeleteVnfResponse.class);
- assertEquals(400, deleteVnfResponse.getStatusCode().value());
- assertNull(deleteVnfResponse.getBody().getJobId());
- }
-
- @Test
- public void deleteVnf_ErrorStatusCodeFromVnfm_Returns500() throws Exception {
- final TestRestTemplate restTemplate = new TestRestTemplate("test", "test");
-
- final GenericVnf genericVnf = setUpGenericVnfInMockAai("vnfmType1");
- addSelfLinkToGenericVnf(genericVnf);
- addRelationshipFromGenericVnfToVnfm(genericVnf, "vnfm1");
- setUpVnfmsInMockAai();
-
- mockRestServer.expect(requestTo("http://vnfm:8080/vnfs/myTestVnfIdOnVnfm/terminate"))
- .andRespond(withStatus(HttpStatus.BAD_REQUEST).contentType(MediaType.APPLICATION_JSON));
-
- final RequestEntity<Void> request = RequestEntity
- .delete(new URI("http://localhost:" + port + "/so/vnfm-adapter/v1/vnfs/myTestVnfId"))
- .accept(MediaType.APPLICATION_JSON).header("X-ONAP-RequestId", "myRequestId")
- .header("X-ONAP-InvocationID", "myInvocationId").header("Content-Type", "application/json").build();
- final ResponseEntity<DeleteVnfResponse> deleteVnfResponse =
- restTemplate.exchange(request, DeleteVnfResponse.class);
- assertEquals(500, deleteVnfResponse.getStatusCode().value());
- assertNull(deleteVnfResponse.getBody().getJobId());
-
- }
-
- private InlineResponse200 createOperationQueryResponse(
- final org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.InlineResponse200.OperationEnum operation,
- final org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.InlineResponse200.OperationStateEnum operationState) {
- final InlineResponse200 response = new InlineResponse200();
- response.setId("9876");
- response.setOperation(operation);
- response.setOperationState(operationState);
- response.setStartTime(JAN_1_2019_12_00);
- response.setStateEnteredTime(JAN_1_2019_1_00);
- response.setVnfInstanceId("myVnfInstanceId");
- return response;
- }
-
- private GenericVnf createGenericVnf(final String type) {
- final GenericVnf genericVnf = new GenericVnf();
- genericVnf.setVnfId("myTestVnfId");
- genericVnf.setNfType(type);
- return genericVnf;
- }
-
- private GenericVnf setUpGenericVnfInMockAai(final String type) {
- final GenericVnf genericVnf = createGenericVnf(type);
-
- doReturn(Optional.of(genericVnf)).when(aaiResourcesClient).get(eq(GenericVnf.class),
- MockitoHamcrest.argThat(new AaiResourceUriMatcher("/network/generic-vnfs/generic-vnf/myTestVnfId")));
- return genericVnf;
- }
-
- private void addSelfLinkToGenericVnf(final GenericVnf vnf) {
- vnf.setSelflink("http://vnfm:8080/vnfs/myTestVnfIdOnVnfm");
- }
-
- private void addRelationshipFromGenericVnfToVnfm(final GenericVnf genericVnf, final String vnfmId) {
- final Relationship relationshipToVnfm = new Relationship();
- relationshipToVnfm
- .setRelatedLink("/aai/" + AAIVersion.LATEST + "/external-system/esr-vnfm-list/esr-vnfm/" + vnfmId);
- relationshipToVnfm.setRelatedTo("esr-vnfm");
- final RelationshipData relationshipData = new RelationshipData();
- relationshipData.setRelationshipKey("esr-vnfm.vnfm-id");
- relationshipData.setRelationshipValue(vnfmId);
- relationshipToVnfm.getRelationshipData().add(relationshipData);
-
- final RelationshipList relationshipList = new RelationshipList();
- relationshipList.getRelationship().add(relationshipToVnfm);
- genericVnf.setRelationshipList(relationshipList);
- }
-
- private void setUpVnfmsInMockAai() {
- final EsrSystemInfo esrSystemInfo1 = new EsrSystemInfo();
- esrSystemInfo1.setServiceUrl("http://vnfm1:8080");
- esrSystemInfo1.setType("vnfmType1");
- esrSystemInfo1.setSystemType("VNFM");
- final EsrSystemInfoList esrSystemInfoList1 = new EsrSystemInfoList();
- esrSystemInfoList1.getEsrSystemInfo().add(esrSystemInfo1);
-
- final EsrVnfm esrVnfm1 = new EsrVnfm();
- esrVnfm1.setVnfmId("vnfm1");
- esrVnfm1.setEsrSystemInfoList(esrSystemInfoList1);
- esrVnfm1.setResourceVersion("1234");
-
- final EsrSystemInfo esrSystemInfo2 = new EsrSystemInfo();
- esrSystemInfo2.setServiceUrl("http://vnfm2:8080");
- esrSystemInfo2.setType("vnfmType2");
- esrSystemInfo2.setSystemType("VNFM");
- final EsrSystemInfoList esrSystemInfoList2 = new EsrSystemInfoList();
- esrSystemInfoList2.getEsrSystemInfo().add(esrSystemInfo2);
-
- final EsrVnfm esrVnfm2 = new EsrVnfm();
- esrVnfm2.setVnfmId("vnfm2");
- esrVnfm2.setEsrSystemInfoList(esrSystemInfoList2);
- esrVnfm2.setResourceVersion("1234");
-
- final EsrVnfmList esrVnfmList = new EsrVnfmList();
- esrVnfmList.getEsrVnfm().add(esrVnfm1);
- esrVnfmList.getEsrVnfm().add(esrVnfm2);
-
- doReturn(Optional.of(esrVnfm1)).when(aaiResourcesClient).get(eq(EsrVnfm.class), MockitoHamcrest
- .argThat(new AaiResourceUriMatcher("/external-system/esr-vnfm-list/esr-vnfm/vnfm1?depth=1")));
-
- doReturn(Optional.of(esrVnfm2)).when(aaiResourcesClient).get(eq(EsrVnfm.class), MockitoHamcrest
- .argThat(new AaiResourceUriMatcher("/external-system/esr-vnfm-list/esr-vnfm/vnfm2?depth=1")));
-
- doReturn(Optional.of(esrVnfmList)).when(aaiResourcesClient).get(eq(EsrVnfmList.class),
- MockitoHamcrest.argThat(new AaiResourceUriMatcher("/external-system/esr-vnfm-list")));
-
- doReturn(Optional.of(esrSystemInfoList1)).when(aaiResourcesClient).get(eq(EsrSystemInfoList.class),
- MockitoHamcrest.argThat(new AaiResourceUriMatcher(
- "/external-system/esr-vnfm-list/esr-vnfm/vnfm1/esr-system-info-list")));
- doReturn(Optional.of(esrSystemInfoList2)).when(aaiResourcesClient).get(eq(EsrSystemInfoList.class),
- MockitoHamcrest.argThat(new AaiResourceUriMatcher(
- "/external-system/esr-vnfm-list/esr-vnfm/vnfm2/esr-system-info-list")));
- }
-
- private void setUpVimInMockAai() {
- final EsrSystemInfo esrSystemInfo = new EsrSystemInfo();
- esrSystemInfo.setServiceUrl("http://myVim:8080");
- esrSystemInfo.setType("openstack");
- esrSystemInfo.setSystemType("VIM");
- esrSystemInfo.setCloudDomain("myDomain");
- esrSystemInfo.setUserName("myUser");
- esrSystemInfo.setPassword("myPassword");
-
- final EsrSystemInfoList esrSystemInfoList = new EsrSystemInfoList();
- esrSystemInfoList.getEsrSystemInfo().add(esrSystemInfo);
-
- doReturn(Optional.of(esrSystemInfoList)).when(aaiResourcesClient).get(eq(EsrSystemInfoList.class),
- MockitoHamcrest.argThat(new AaiResourceUriMatcher("/cloud-infrastructure/cloud-regions/cloud-region/"
- + CLOUD_OWNER + "/" + REGION + "/esr-system-info-list")));
- }
-
- private InlineResponse201 createCreateResponse() {
- final InlineResponse201 createResponse = new InlineResponse201();
- createResponse.setVnfdId("myTestVnfd");
- final InlineResponse201Links links = new InlineResponse201Links();
- final InlineResponse201LinksSelf self = new InlineResponse201LinksSelf();
- self.setHref("http://vnfm2:8080/vnf_instances/vnfId");
- links.setSelf(self);
- createResponse.setLinks(links);
- createResponse.setId("vnfId");
- return createResponse;
- }
-
-
- private class AaiResourceUriMatcher extends BaseMatcher<AAIBaseResourceUri<?, ?>> {
-
- final String uriAsString;
-
- public AaiResourceUriMatcher(final String uriAsString) {
- this.uriAsString = uriAsString;
- }
-
- @Override
- public boolean matches(final Object item) {
- if (item instanceof AAIBaseResourceUri<?, ?>) {
- if (uriAsString.endsWith("...")) {
- return ((AAIBaseResourceUri<?, ?>) item).build().toString()
- .startsWith(uriAsString.substring(0, uriAsString.indexOf("...")));
- }
- return ((AAIBaseResourceUri<?, ?>) item).build().toString().equals(uriAsString);
- }
- return false;
- }
-
- @Override
- public void describeTo(final Description description) {}
-
- }
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/HealthCheckTest.java b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/HealthCheckTest.java
deleted file mode 100644
index 9fa16b5551..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/HealthCheckTest.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.lcm.rest;
-
-import static org.junit.Assert.assertEquals;
-import java.net.URI;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
-import org.springframework.boot.test.web.client.TestRestTemplate;
-import org.springframework.boot.web.server.LocalServerPort;
-import org.springframework.http.RequestEntity;
-import org.springframework.http.ResponseEntity;
-import org.springframework.test.context.ActiveProfiles;
-import org.springframework.test.context.junit4.SpringRunner;
-
-@RunWith(SpringRunner.class)
-@SpringBootTest(classes = TestApplication.class, webEnvironment = WebEnvironment.RANDOM_PORT)
-@ActiveProfiles("test")
-public class HealthCheckTest {
-
- @LocalServerPort
- private int port;
-
- private final TestRestTemplate restTemplate = new TestRestTemplate("test", "test");
-
- @Test
- public void testHealthcheck() throws Exception {
- final RequestEntity<Void> request =
- RequestEntity.get(new URI("http://localhost:" + port + "/manage/health")).build();
- final ResponseEntity<Void> response = restTemplate.exchange(request, Void.class);
- assertEquals(200, response.getStatusCode().value());
- }
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/Sol003GrantControllerTest.java b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/Sol003GrantControllerTest.java
deleted file mode 100644
index 99b8c71764..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/Sol003GrantControllerTest.java
+++ /dev/null
@@ -1,252 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.lcm.rest;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.doReturn;
-import static org.onap.so.client.RestTemplateConfig.CONFIGURABLE_REST_TEMPLATE;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Optional;
-import org.hamcrest.BaseMatcher;
-import org.hamcrest.Description;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.hamcrest.MockitoHamcrest;
-import org.onap.aai.domain.yang.EsrSystemInfo;
-import org.onap.aai.domain.yang.EsrSystemInfoList;
-import org.onap.aai.domain.yang.GenericVnf;
-import org.onap.aai.domain.yang.GenericVnfs;
-import org.onap.aai.domain.yang.Relationship;
-import org.onap.aai.domain.yang.RelationshipData;
-import org.onap.aai.domain.yang.RelationshipList;
-import org.onap.aaiclient.client.aai.AAIResourcesClient;
-import org.onap.aaiclient.client.aai.entities.uri.AAIBaseResourceUri;
-import org.onap.so.adapters.etsisol003adapter.lcm.grant.model.GrantRequest;
-import org.onap.so.adapters.etsisol003adapter.lcm.grant.model.GrantRequest.OperationEnum;
-import org.onap.so.adapters.etsisol003adapter.lcm.grant.model.GrantsAddResources;
-import org.onap.so.adapters.etsisol003adapter.lcm.grant.model.GrantsAddResources.TypeEnum;
-import org.onap.so.adapters.etsisol003adapter.lcm.grant.model.GrantsLinks;
-import org.onap.so.adapters.etsisol003adapter.lcm.grant.model.GrantsLinksVnfLcmOpOcc;
-import org.onap.so.adapters.etsisol003adapter.lcm.grant.model.InlineResponse201;
-import org.onap.so.adapters.etsisol003adapter.lcm.grant.model.InlineResponse201VimConnections;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
-import org.springframework.boot.test.mock.mockito.MockBean;
-import org.springframework.boot.web.server.LocalServerPort;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
-import org.springframework.test.context.ActiveProfiles;
-import org.springframework.test.context.junit4.SpringRunner;
-import org.springframework.web.client.RestTemplate;
-
-@RunWith(SpringRunner.class)
-@SpringBootTest(classes = TestApplication.class, webEnvironment = WebEnvironment.RANDOM_PORT)
-@ActiveProfiles("test")
-public class Sol003GrantControllerTest {
-
- private static final String CLOUD_OWNER = "myTestCloudOwner";
- private static final String REGION = "myTestRegion";
- private static final String TENANT_ID = "myTestTenantId";
- private static final String SEPARATOR = "_";
- private static final String vimConnectionId = CLOUD_OWNER + SEPARATOR + REGION;
-
- @LocalServerPort
- private int port;
- @Autowired
- @Qualifier(CONFIGURABLE_REST_TEMPLATE)
- private RestTemplate testRestTemplate;
-
- @MockBean
- private AAIResourcesClient aaiResourcesClient;
-
- @Autowired
- private Sol003GrantController controller;
-
- @Before
- public void setUp() throws Exception {
- setUpVimInMockAai();
- }
-
- @Test
- public void grantRequest_ValidRequestInstantiate_GrantApproved() {
- final GrantRequest grantRequest = createGrantRequest("INSTANTIATE");
- setUpGenericVnfWithVnfmRelationshipInMockAai("vnfmType", "vnfm1");
- final ResponseEntity<InlineResponse201> response = controller.grantsPost(grantRequest);
- assertEquals(HttpStatus.CREATED, response.getStatusCode());
- assertEquals(1, response.getBody().getAddResources().size());
- assertNull(response.getBody().getRemoveResources());
-
- assertEquals(vimConnectionId, response.getBody().getAddResources().get(0).getVimConnectionId());
- assertEquals("myTestVnfIdOnVnfm", response.getBody().getVnfInstanceId());
- assertEquals("123456", response.getBody().getVnfLcmOpOccId());
-
- final InlineResponse201VimConnections vimConnections = response.getBody().getVimConnections().get(0);
- assertEquals(vimConnectionId, vimConnections.getVimId());
- assertEquals("OPENSTACK", vimConnections.getVimType());
- assertNotNull(vimConnections.getAccessInfo());
- assertNotNull(vimConnections.getInterfaceInfo());
- assertEquals("INSTANTIATE", grantRequest.getOperation().toString());
- }
-
- @Test
- public void getGrant_notSupported_returns501() {
- final ResponseEntity<InlineResponse201> response2 = controller.grantsGrantIdGet("myTestGrantId");
- assertEquals(HttpStatus.NOT_IMPLEMENTED, response2.getStatusCode());
- }
-
- @Test
- public void grantRequest_ValidRequestTerminate_GrantApproved() {
- final GrantRequest grantRequest = createGrantRequest("TERMINATE");
- setUpGenericVnfWithVnfmRelationshipInMockAai("vnfmType", "vnfm1");
- final ResponseEntity<InlineResponse201> response = controller.grantsPost(grantRequest);
-
- assertEquals(HttpStatus.CREATED, response.getStatusCode());
- assertNull(response.getBody().getAddResources());
- assertEquals(1, response.getBody().getRemoveResources().size());
- assertEquals(vimConnectionId, response.getBody().getRemoveResources().get(0).getVimConnectionId());
- assertEquals("myTestVnfIdOnVnfm", response.getBody().getVnfInstanceId());
- assertEquals("123456", response.getBody().getVnfLcmOpOccId());
-
- final InlineResponse201VimConnections vimConnections = response.getBody().getVimConnections().get(0);
- assertEquals(vimConnectionId, vimConnections.getVimId());
- assertEquals("OPENSTACK", vimConnections.getVimType());
- assertNotNull(vimConnections.getAccessInfo());
- assertNotNull(vimConnections.getInterfaceInfo());
- assertEquals("TERMINATE", grantRequest.getOperation().toString());
-
- }
-
- private GrantRequest createGrantRequest(final String operation) {
- final GrantRequest grantRequest = new GrantRequest();
- grantRequest.setVnfInstanceId("myTestVnfIdOnVnfm");
- grantRequest.setVnfLcmOpOccId("123456");
- grantRequest.links(new GrantsLinks()
- .vnfInstance(new GrantsLinksVnfLcmOpOcc().href("http://vnfm:8080/vnfs/myTestVnfIdOnVnfm")));
- if (operation == "INSTANTIATE") {
- grantRequest.setOperation(OperationEnum.INSTANTIATE);
- final GrantsAddResources resource = new GrantsAddResources();
- resource.setId("123");
- resource.setType(TypeEnum.COMPUTE);
- grantRequest.addAddResourcesItem(resource);
- } else if (operation == "TERMINATE") {
- grantRequest.setOperation(OperationEnum.TERMINATE);
- final GrantsAddResources resource = new GrantsAddResources();
- resource.setId("123");
- resource.setType(TypeEnum.COMPUTE);
- grantRequest.addRemoveResourcesItem(resource);
- }
-
- return grantRequest;
- }
-
- private void setUpVimInMockAai() {
- final EsrSystemInfo esrSystemInfo = new EsrSystemInfo();
- esrSystemInfo.setServiceUrl("http://myVim:8080");
- esrSystemInfo.setType("OPENSTACK");
- esrSystemInfo.setSystemType("VIM");
- esrSystemInfo.setCloudDomain("myDomain");
- esrSystemInfo.setUserName("myUser");
- esrSystemInfo.setPassword("myPassword");
-
- final EsrSystemInfoList esrSystemInfoList = new EsrSystemInfoList();
- esrSystemInfoList.getEsrSystemInfo().add(esrSystemInfo);
-
- doReturn(Optional.of(esrSystemInfoList)).when(aaiResourcesClient).get(eq(EsrSystemInfoList.class),
- MockitoHamcrest.argThat(new AaiResourceUriMatcher("/cloud-infrastructure/cloud-regions/cloud-region/"
- + CLOUD_OWNER + "/" + REGION + "/esr-system-info-list")));
- }
-
- private GenericVnf createGenericVnf(final String type) {
- final GenericVnf genericVnf = new GenericVnf();
- genericVnf.setVnfId("myTestVnfId");
- genericVnf.setNfType(type);
- return genericVnf;
- }
-
- private void setUpGenericVnfWithVnfmRelationshipInMockAai(final String type, final String vnfmId) {
- final GenericVnf genericVnf = createGenericVnf(type);
-
- final Relationship relationshipToVnfm = new Relationship();
- relationshipToVnfm.setRelatedTo("tenant");
- final RelationshipData relationshipData1 = new RelationshipData();
- final RelationshipData relationshipData2 = new RelationshipData();
- final RelationshipData relationshipData3 = new RelationshipData();
-
- relationshipData1.setRelationshipKey("cloud-region.cloud-owner");
- relationshipData1.setRelationshipValue(CLOUD_OWNER);
- relationshipData2.setRelationshipKey("cloud-region.cloud-region-id");
- relationshipData2.setRelationshipValue(REGION);
- relationshipData3.setRelationshipKey("tenant.tenant-id");
- relationshipData3.setRelationshipValue(TENANT_ID);
-
- relationshipToVnfm.getRelationshipData().add(relationshipData1);
- relationshipToVnfm.getRelationshipData().add(relationshipData2);
- relationshipToVnfm.getRelationshipData().add(relationshipData3);
-
- final RelationshipList relationshipList = new RelationshipList();
- relationshipList.getRelationship().add(relationshipToVnfm);
- genericVnf.setRelationshipList(relationshipList);
-
- doReturn(Optional.of(genericVnf)).when(aaiResourcesClient).get(eq(GenericVnf.class),
- MockitoHamcrest.argThat(new AaiResourceUriMatcher("/network/generic-vnfs/generic-vnf/myTestVnfId")));
-
- final List<GenericVnf> listOfGenericVnfs = new ArrayList<>();
- listOfGenericVnfs.add(genericVnf);
- final GenericVnfs genericVnfs = new GenericVnfs();
- genericVnfs.getGenericVnf().addAll(listOfGenericVnfs);
- doReturn(Optional.of(genericVnfs)).when(aaiResourcesClient).get(eq(GenericVnfs.class),
- MockitoHamcrest.argThat(new AaiResourceUriMatcher(
- "/network/generic-vnfs?selflink=http%3A%2F%2Fvnfm%3A8080%2Fvnfs%2FmyTestVnfIdOnVnfm")));
- }
-
- private class AaiResourceUriMatcher extends BaseMatcher<AAIBaseResourceUri<?, ?>> {
-
- final String uriAsString;
-
- public AaiResourceUriMatcher(final String uriAsString) {
- this.uriAsString = uriAsString;
- }
-
- @Override
- public boolean matches(final Object item) {
- if (item instanceof AAIBaseResourceUri) {
- if (uriAsString.endsWith("...")) {
- return ((AAIBaseResourceUri<?, ?>) item).build().toString()
- .startsWith(uriAsString.substring(0, uriAsString.indexOf("...")));
- }
- return ((AAIBaseResourceUri<?, ?>) item).build().toString().equals(uriAsString);
- }
- return false;
- }
-
- @Override
- public void describeTo(final Description description) {}
-
- }
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/Sol003LcnControllerTest.java b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/Sol003LcnControllerTest.java
deleted file mode 100644
index 0d5bcd2573..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/Sol003LcnControllerTest.java
+++ /dev/null
@@ -1,414 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.lcm.rest;
-
-import static org.junit.Assert.assertEquals;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.timeout;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.verifyZeroInteractions;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.VnfmRestTemplateConfiguration;
-import static org.springframework.test.web.client.match.MockRestRequestMatchers.requestTo;
-import static org.springframework.test.web.client.response.MockRestResponseCreators.withStatus;
-import static org.springframework.test.web.client.response.MockRestResponseCreators.withSuccess;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Optional;
-import javax.inject.Inject;
-import org.hamcrest.BaseMatcher;
-import org.hamcrest.Description;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.ArgumentCaptor;
-import org.mockito.hamcrest.MockitoHamcrest;
-import org.onap.aai.domain.yang.EsrSystemInfoList;
-import org.onap.aai.domain.yang.EsrVnfm;
-import org.onap.aai.domain.yang.GenericVnf;
-import org.onap.aai.domain.yang.GenericVnfs;
-import org.onap.aai.domain.yang.Relationship;
-import org.onap.aai.domain.yang.RelationshipData;
-import org.onap.aai.domain.yang.RelationshipList;
-import org.onap.aai.domain.yang.Vserver;
-import org.onap.aaiclient.client.aai.AAIResourcesClient;
-import org.onap.aaiclient.client.aai.entities.uri.AAIBaseResourceUri;
-import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.aai.AaiHelper;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.aai.OamIpAddressSource;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.aai.OamIpAddressSource.OamIpAddressType;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vim.model.AccessInfo;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.InlineResponse201;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.InlineResponse201Links;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.InlineResponse201LinksSelf;
-import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model.InlineResponse201VimConnectionInfo;
-import org.onap.so.adapters.etsisol003adapter.lcm.lcn.model.LcnVnfLcmOperationOccurrenceNotificationAffectedVnfcs;
-import org.onap.so.adapters.etsisol003adapter.lcm.lcn.model.LcnVnfLcmOperationOccurrenceNotificationAffectedVnfcs.ChangeTypeEnum;
-import org.onap.so.adapters.etsisol003adapter.lcm.lcn.model.LcnVnfLcmOperationOccurrenceNotificationComputeResource;
-import org.onap.so.adapters.etsisol003adapter.lcm.lcn.model.LcnVnfLcmOperationOccurrenceNotificationLinks;
-import org.onap.so.adapters.etsisol003adapter.lcm.lcn.model.LcnVnfLcmOperationOccurrenceNotificationLinksVnfInstance;
-import org.onap.so.adapters.etsisol003adapter.lcm.lcn.model.VnfIdentifierCreationNotification;
-import org.onap.so.adapters.etsisol003adapter.lcm.lcn.model.VnfLcmOperationOccurrenceNotification;
-import org.onap.so.adapters.etsisol003adapter.lcm.lcn.model.VnfLcmOperationOccurrenceNotification.OperationEnum;
-import org.onap.so.adapters.etsisol003adapter.lcm.lcn.model.VnfLcmOperationOccurrenceNotification.OperationStateEnum;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
-import org.springframework.boot.test.mock.mockito.MockBean;
-import org.springframework.boot.web.server.LocalServerPort;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.MediaType;
-import org.springframework.http.ResponseEntity;
-import org.springframework.test.context.ActiveProfiles;
-import org.springframework.test.context.junit4.SpringRunner;
-import org.springframework.test.web.client.MockRestServiceServer;
-import org.springframework.web.client.RestTemplate;
-import com.google.gson.Gson;
-
-@RunWith(SpringRunner.class)
-@SpringBootTest(classes = TestApplication.class, webEnvironment = WebEnvironment.RANDOM_PORT)
-@ActiveProfiles("test")
-public class Sol003LcnControllerTest {
-
- private static final String CLOUD_OWNER = "myTestCloudOwner";
- private static final String REGION = "myTestRegion";
- private static final String TENANT_ID = "myTestTenantId";
-
- @LocalServerPort
- private int port;
- @Autowired
- @Qualifier(VnfmRestTemplateConfiguration.SOL003_LCM_REST_TEMPLATE)
- private RestTemplate testRestTemplate;
- private MockRestServiceServer mockRestServer;
-
- @MockBean
- private AAIResourcesClient aaiResourcesClient;
-
- @Autowired
- private Sol003LcnContoller controller;
- private final Gson gson = new Gson();
-
- @Inject
- private AaiHelper aaiHelper;
-
- @Before
- public void setUp() throws Exception {
- mockRestServer = MockRestServiceServer.bindTo(testRestTemplate).build();
- }
-
- @Test
- public void lcnNotification_IdentifierCreated_Returns204() throws URISyntaxException, InterruptedException {
- final VnfIdentifierCreationNotification vnfIdentifierCreationNotification =
- new VnfIdentifierCreationNotification();
- final ResponseEntity<Void> response =
- controller.lcnVnfIdentifierCreationNotificationPost(vnfIdentifierCreationNotification);
- assertEquals(HttpStatus.NO_CONTENT, response.getStatusCode());
- }
-
- @Test
- public void lcnNotification_IdentifierDeleted_Returns204() throws URISyntaxException, InterruptedException {
- final VnfIdentifierCreationNotification vnfIdentifierCreationNotification =
- new VnfIdentifierCreationNotification();
- final ResponseEntity<Void> response =
- controller.lcnVnfIdentifierCreationNotificationPost(vnfIdentifierCreationNotification);
- assertEquals(HttpStatus.NO_CONTENT, response.getStatusCode());
- }
-
- @Test
- public void lcnNotification_InstantiateStartingOrProcessing_NoAction()
- throws URISyntaxException, InterruptedException {
- final VnfLcmOperationOccurrenceNotification startingNotification = new VnfLcmOperationOccurrenceNotification();
- startingNotification.setOperation(OperationEnum.INSTANTIATE);
- startingNotification.setOperationState(OperationStateEnum.STARTING);
-
- ResponseEntity<Void> response = controller.lcnVnfLcmOperationOccurrenceNotificationPost(startingNotification);
- assertEquals(HttpStatus.NO_CONTENT, response.getStatusCode());
-
- verifyZeroInteractions(aaiResourcesClient);
-
- final VnfLcmOperationOccurrenceNotification processingNotification =
- new VnfLcmOperationOccurrenceNotification();
- processingNotification.setOperation(OperationEnum.INSTANTIATE);
- processingNotification.setOperationState(OperationStateEnum.STARTING);
-
- response = controller.lcnVnfLcmOperationOccurrenceNotificationPost(processingNotification);
- assertEquals(HttpStatus.NO_CONTENT, response.getStatusCode());
-
- verifyZeroInteractions(aaiResourcesClient);
- }
-
- @Test
- public void lcnNotification_InstantiateCompleted_AaiUpdated() throws URISyntaxException, InterruptedException {
- final VnfLcmOperationOccurrenceNotification vnfLcmOperationOccurrenceNotification =
- createNotification(OperationEnum.INSTANTIATE);
- addVnfcsToNotification(vnfLcmOperationOccurrenceNotification, ChangeTypeEnum.ADDED);
- final InlineResponse201 vnfInstance = createVnfInstance();
-
- mockRestServer.expect(requestTo(new URI("http://vnfm:8080/vnfs/myTestVnfIdOnVnfm")))
- .andRespond(withSuccess(gson.toJson(vnfInstance), MediaType.APPLICATION_JSON));
-
- final GenericVnf genericVnf = createGenericVnf("vnfmType1");
- addRelationshipFromGenericVnfToVnfm(genericVnf, "vnfm1");
- final List<GenericVnf> listOfGenericVnfs = new ArrayList<>();
- listOfGenericVnfs.add(genericVnf);
- final GenericVnfs genericVnfs = new GenericVnfs();
- genericVnfs.getGenericVnf().addAll(listOfGenericVnfs);
- doReturn(Optional.of(genericVnfs)).when(aaiResourcesClient).get(eq(GenericVnfs.class),
- MockitoHamcrest.argThat(new AaiResourceUriMatcher(
- "/network/generic-vnfs?selflink=http%3A%2F%2Fvnfm%3A8080%2Fvnfs%2FmyTestVnfIdOnVnfm")));
- final EsrVnfm vnfm = new EsrVnfm();
- vnfm.setVnfmId("vnfm1");
- final EsrSystemInfoList esrSystemInfoList = new EsrSystemInfoList();
- vnfm.setEsrSystemInfoList(esrSystemInfoList);
- doReturn(Optional.of(vnfm)).when(aaiResourcesClient).get(eq(EsrVnfm.class), MockitoHamcrest
- .argThat(new AaiResourceUriMatcher("/external-system/esr-vnfm-list/esr-vnfm/vnfm1?depth=1")));
-
- final ResponseEntity<Void> response =
- controller.lcnVnfLcmOperationOccurrenceNotificationPost(vnfLcmOperationOccurrenceNotification);
- assertEquals(HttpStatus.NO_CONTENT, response.getStatusCode());
-
- final ArgumentCaptor<Object> bodyArgument1 = ArgumentCaptor.forClass(Object.class);
- final ArgumentCaptor<AAIResourceUri> uriArgument1 = ArgumentCaptor.forClass(AAIResourceUri.class);
-
- verify(aaiResourcesClient, timeout(1000)).update(uriArgument1.capture(), bodyArgument1.capture());
-
- assertEquals("/network/generic-vnfs/generic-vnf/myTestVnfId",
- uriArgument1.getAllValues().get(0).build().toString());
- final GenericVnf updatedGenericVnf = (GenericVnf) bodyArgument1.getAllValues().get(0);
- assertEquals("10.10.10.10", updatedGenericVnf.getIpv4OamAddress());
- assertEquals("Created", updatedGenericVnf.getOrchestrationStatus());
-
- final ArgumentCaptor<Object> bodyArgument2 = ArgumentCaptor.forClass(Object.class);
- final ArgumentCaptor<AAIResourceUri> uriArgument2 = ArgumentCaptor.forClass(AAIResourceUri.class);
- verify(aaiResourcesClient, timeout(1000)).create(uriArgument2.capture(), bodyArgument2.capture());
-
- assertEquals(
- "/cloud-infrastructure/cloud-regions/cloud-region/" + CLOUD_OWNER + "/" + REGION + "/tenants/tenant/"
- + TENANT_ID + "/vservers/vserver/myVnfc1",
- uriArgument2.getAllValues().get(0).build().toString());
-
- final Vserver vserver = (Vserver) bodyArgument2.getAllValues().get(0);
- assertEquals("myVnfc1", vserver.getVserverId());
-
- final ArgumentCaptor<AAIResourceUri> uriArgument1Connect = ArgumentCaptor.forClass(AAIResourceUri.class);
- final ArgumentCaptor<AAIResourceUri> uriArgument2Connect = ArgumentCaptor.forClass(AAIResourceUri.class);
- verify(aaiResourcesClient, timeout(1000)).connect(uriArgument1Connect.capture(), uriArgument2Connect.capture());
- assertEquals(
- "/cloud-infrastructure/cloud-regions/cloud-region/" + CLOUD_OWNER + "/" + REGION + "/tenants/tenant/"
- + TENANT_ID + "/vservers/vserver/myVnfc1",
- uriArgument1Connect.getAllValues().get(0).build().toString());
- assertEquals("/network/generic-vnfs/generic-vnf/myTestVnfId",
- uriArgument2Connect.getAllValues().get(0).build().toString());
- }
-
- @Test
- public void lcnNotification_TerminateCompleted_AaiUpdated() throws URISyntaxException, InterruptedException {
- final VnfLcmOperationOccurrenceNotification vnfLcmOperationOccurrenceNotification =
- createNotification(OperationEnum.TERMINATE);
- addVnfcsToNotification(vnfLcmOperationOccurrenceNotification, ChangeTypeEnum.REMOVED);
-
- final InlineResponse201 vnfInstance = createVnfInstance();
-
- mockRestServer.expect(requestTo(new URI("http://vnfm:8080/vnfs/myTestVnfIdOnVnfm")))
- .andRespond(withSuccess(gson.toJson(vnfInstance), MediaType.APPLICATION_JSON));
-
- mockRestServer.expect(requestTo(new URI("http://vnfm:8080/vnfs/myTestVnfIdOnVnfm")))
- .andRespond(withStatus(HttpStatus.NO_CONTENT).contentType(MediaType.APPLICATION_JSON));
-
- final GenericVnf genericVnf = createGenericVnf("vnfmType1");
- addRelationshipFromGenericVnfToVnfm(genericVnf, "vnfm1");
- genericVnf.setSelflink("http://vnfm:8080/vnfs/myTestVnfIdOnVnfm");
- final List<GenericVnf> listOfGenericVnfs = new ArrayList<>();
- listOfGenericVnfs.add(genericVnf);
- final GenericVnfs genericVnfs = new GenericVnfs();
- genericVnfs.getGenericVnf().addAll(listOfGenericVnfs);
- addRelationshipFromGenericVnfToVserver(genericVnf, "myVnfc1");
-
- doReturn(Optional.of(genericVnfs)).when(aaiResourcesClient).get(eq(GenericVnfs.class),
- MockitoHamcrest.argThat(new AaiResourceUriMatcher(
- "/network/generic-vnfs?selflink=http%3A%2F%2Fvnfm%3A8080%2Fvnfs%2FmyTestVnfIdOnVnfm")));
- final EsrVnfm vnfm = new EsrVnfm();
- vnfm.setVnfmId("vnfm1");
- final EsrSystemInfoList esrSystemInfoList = new EsrSystemInfoList();
- vnfm.setEsrSystemInfoList(esrSystemInfoList);
- doReturn(Optional.of(vnfm)).when(aaiResourcesClient).get(eq(EsrVnfm.class), MockitoHamcrest
- .argThat(new AaiResourceUriMatcher("/external-system/esr-vnfm-list/esr-vnfm/vnfm1?depth=1")));
-
- final ResponseEntity<Void> response =
- controller.lcnVnfLcmOperationOccurrenceNotificationPost(vnfLcmOperationOccurrenceNotification);
- assertEquals(HttpStatus.NO_CONTENT, response.getStatusCode());
-
- final ArgumentCaptor<GenericVnf> genericVnfArgument = ArgumentCaptor.forClass(GenericVnf.class);
- final ArgumentCaptor<AAIResourceUri> updateUriArgument = ArgumentCaptor.forClass(AAIResourceUri.class);
- verify(aaiResourcesClient, timeout(10000000)).update(updateUriArgument.capture(), genericVnfArgument.capture());
- assertEquals("/network/generic-vnfs/generic-vnf/myTestVnfId", updateUriArgument.getValue().build().toString());
- assertEquals("Assigned", genericVnfArgument.getValue().getOrchestrationStatus());
-
- final ArgumentCaptor<AAIResourceUri> deleteUriArgument = ArgumentCaptor.forClass(AAIResourceUri.class);
-
- verify(aaiResourcesClient, timeout(10000000)).delete(deleteUriArgument.capture());
-
- assertEquals(
- "/cloud-infrastructure/cloud-regions/cloud-region/" + CLOUD_OWNER + "/" + REGION + "/tenants/tenant/"
- + TENANT_ID + "/vservers/vserver/myVnfc1",
- deleteUriArgument.getAllValues().get(0).build().toString());
- }
-
- private VnfLcmOperationOccurrenceNotification createNotification(final OperationEnum operation) {
- final VnfLcmOperationOccurrenceNotification notification = new VnfLcmOperationOccurrenceNotification();
- notification.setOperation(operation);
- notification.setOperationState(OperationStateEnum.COMPLETED);
-
- final LcnVnfLcmOperationOccurrenceNotificationLinksVnfInstance linkToVnfInstance =
- new LcnVnfLcmOperationOccurrenceNotificationLinksVnfInstance()
- .href("http://vnfm:8080/vnfs/myTestVnfIdOnVnfm");
- final LcnVnfLcmOperationOccurrenceNotificationLinks operationLinks =
- new LcnVnfLcmOperationOccurrenceNotificationLinks().vnfInstance(linkToVnfInstance);
- notification.setLinks(operationLinks);
-
- return notification;
- }
-
- private void addVnfcsToNotification(final VnfLcmOperationOccurrenceNotification notification,
- final ChangeTypeEnum changeType) {
- final List<LcnVnfLcmOperationOccurrenceNotificationAffectedVnfcs> affectedVnfcs = new ArrayList<>();;
- final LcnVnfLcmOperationOccurrenceNotificationAffectedVnfcs vnfc =
- new LcnVnfLcmOperationOccurrenceNotificationAffectedVnfcs();
- vnfc.changeType(changeType);
- final LcnVnfLcmOperationOccurrenceNotificationComputeResource computeResource =
- new LcnVnfLcmOperationOccurrenceNotificationComputeResource();
- computeResource.setResourceId("myVnfc1");
- computeResource.setVimConnectionId(CLOUD_OWNER + "_" + REGION);
- vnfc.setComputeResource(computeResource);
- affectedVnfcs.add(vnfc);
- notification.setAffectedVnfcs(affectedVnfcs);
- }
-
- private InlineResponse201 createVnfInstance() {
- final InlineResponse201 vnfInstance = new InlineResponse201();
- vnfInstance.setId("myTestVnfIdOnVnfm");
- final InlineResponse201LinksSelf selfLink = new InlineResponse201LinksSelf();
- selfLink.setHref("http://vnfm:8080/vnfs/myTestVnfIdOnVnfm");
- final InlineResponse201Links VnfInstancelinks = new InlineResponse201Links();
- VnfInstancelinks.setSelf(selfLink);
- vnfInstance.setLinks(VnfInstancelinks);
-
- final Map<String, String> vnfConfigurableProperties = new HashMap<>();
- vnfConfigurableProperties.put("vnfIpAddress", "10.10.10.10");
- vnfInstance.setVnfConfigurableProperties(vnfConfigurableProperties);
-
- final List<InlineResponse201VimConnectionInfo> vimConnectionInfo = new ArrayList<>();;
- final InlineResponse201VimConnectionInfo vimConnection = new InlineResponse201VimConnectionInfo();
- vimConnection.setVimId(CLOUD_OWNER + "_" + REGION);
- vimConnection.setId(CLOUD_OWNER + "_" + REGION);
- final AccessInfo accessInfo = new AccessInfo();
- accessInfo.setProjectId(TENANT_ID);
- vimConnection.setAccessInfo(accessInfo);
- vimConnectionInfo.add(vimConnection);
- vnfInstance.setVimConnectionInfo(vimConnectionInfo);
-
- final OamIpAddressSource oamIpAddressSource =
- new OamIpAddressSource(OamIpAddressType.CONFIGURABLE_PROPERTY, "vnfIpAddress");
- aaiHelper.setOamIpAddressSource("myTestVnfIdOnVnfm", oamIpAddressSource);
- return vnfInstance;
- }
-
- private GenericVnf createGenericVnf(final String type) {
- final GenericVnf genericVnf = new GenericVnf();
- genericVnf.setVnfId("myTestVnfId");
- genericVnf.setNfType(type);
- return genericVnf;
- }
-
- private void addRelationshipFromGenericVnfToVnfm(final GenericVnf genericVnf, final String vnfmId) {
- final Relationship relationshipToVnfm = new Relationship();
- relationshipToVnfm.setRelatedLink("/aai/v15/external-system/esr-vnfm-list/esr-vnfm/" + vnfmId);
- relationshipToVnfm.setRelatedTo("esr-vnfm");
- final RelationshipData relationshipData = new RelationshipData();
- relationshipData.setRelationshipKey("esr-vnfm.vnfm-id");
- relationshipData.setRelationshipValue(vnfmId);
- relationshipToVnfm.getRelationshipData().add(relationshipData);
-
- if (genericVnf.getRelationshipList() == null) {
- final RelationshipList relationshipList = new RelationshipList();
- genericVnf.setRelationshipList(relationshipList);
- }
- genericVnf.getRelationshipList().getRelationship().add(relationshipToVnfm);
- }
-
- private void addRelationshipFromGenericVnfToVserver(final GenericVnf genericVnf, final String vserverId) {
- final Relationship relationshipToVserver = new Relationship();
- relationshipToVserver.setRelatedTo("vserver");
- final RelationshipData relationshipData1 = new RelationshipData();
- relationshipData1.setRelationshipKey("vserver.vserver-id");
- relationshipData1.setRelationshipValue(vserverId);
- relationshipToVserver.getRelationshipData().add(relationshipData1);
- final RelationshipData relationshipData2 = new RelationshipData();
- relationshipData2.setRelationshipKey("cloud-region.cloud-owner");
- relationshipData2.setRelationshipValue(CLOUD_OWNER);
- relationshipToVserver.getRelationshipData().add(relationshipData2);
- final RelationshipData relationshipData3 = new RelationshipData();
- relationshipData3.setRelationshipKey("cloud-region.cloud-region-id");
- relationshipData3.setRelationshipValue(REGION);
- relationshipToVserver.getRelationshipData().add(relationshipData3);
- final RelationshipData relationshipData4 = new RelationshipData();
- relationshipData4.setRelationshipKey("tenant.tenant-id");
- relationshipData4.setRelationshipValue(TENANT_ID);
- relationshipToVserver.getRelationshipData().add(relationshipData4);
-
- if (genericVnf.getRelationshipList() == null) {
- final RelationshipList relationshipList = new RelationshipList();
- genericVnf.setRelationshipList(relationshipList);
- }
- genericVnf.getRelationshipList().getRelationship().add(relationshipToVserver);
- }
-
- private class AaiResourceUriMatcher extends BaseMatcher<AAIBaseResourceUri<?, ?>> {
-
- final String uriAsString;
-
- public AaiResourceUriMatcher(final String uriAsString) {
- this.uriAsString = uriAsString;
- }
-
- @Override
- public boolean matches(final Object item) {
- if (item instanceof AAIBaseResourceUri<?, ?>) {
- if (uriAsString.endsWith("...")) {
- return ((AAIBaseResourceUri<?, ?>) item).build().toString()
- .startsWith(uriAsString.substring(0, uriAsString.indexOf("...")));
- }
- return ((AAIBaseResourceUri<?, ?>) item).build().toString().equals(uriAsString);
- }
- return false;
- }
-
- @Override
- public void describeTo(final Description description) {}
-
- }
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/TestApplication.java b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/TestApplication.java
deleted file mode 100755
index b59bc025e8..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/TestApplication.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.lcm.rest;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration;
-import org.springframework.cache.annotation.EnableCaching;
-
-@EnableCaching
-@SpringBootApplication(scanBasePackages = {"org.onap.so"})
-@EnableAutoConfiguration(exclude = {JacksonAutoConfiguration.class})
-public class TestApplication {
-
- public static void main(final String[] args) {
- new SpringApplication(TestApplication.class).run(args);
- }
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/test/resources/application.yaml b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/test/resources/application.yaml
deleted file mode 100644
index cdb6662191..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/test/resources/application.yaml
+++ /dev/null
@@ -1,61 +0,0 @@
-# Copyright © 2019 Nordix Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-spring:
- security:
- usercredentials:
- - username: test
- password: '$2a$12$Zi3AuYcZoZO/gBQyUtST2.F5N6HqcTtaNci2Et.ufsQhski56srIu'
- role: BPEL-Client
- - username: vnfm
- password: '$2a$10$Fh9ffgPw2vnmsghsRD3ZauBL1aKXebigbq3BB1RPWtE62UDILsjke'
- role: BPEL-Client
- main:
- allow-bean-definition-overriding: true
-
-mso:
- key: 07a7159d3bf51a0e53be7a8f89699be7
-
-aai:
- auth: 2A11B07DB6214A839394AA1EC5844695F5114FC407FF5422625FB00175A3DCB8A1FF745F22867EFA72D5369D599BBD88DA8BED4233CF5586
- endpoint: https://aai.onap:8443
- version: v15
-
-sdc:
- username: sdcUser
- password: sdcPassword
- key: adadadadad
- endpoint: http://sdc.onap/1234A
-
-
-vnfmadapter:
- endpoint: https://so-vnfm-adapter.onap:30406
-
-
-#Actuator
-management:
- endpoints:
- web:
- base-path: /manage
- exposure:
- include: "*"
- metrics:
- se-global-registry: false
- export:
- prometheus:
- enabled: true # Whether exporting of metrics to Prometheus is enabled.
- step: 1m # Step size (i.e. reporting frequency) to use.
-
-etsi-catalog-manager:
- vnfpkgm:
- endpoint: http://msb-iag.onap:80/api/vnfpkgm/v1
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-api/pom.xml b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-api/pom.xml
deleted file mode 100644
index b636f6818c..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-api/pom.xml
+++ /dev/null
@@ -1,221 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.onap.so.adapters</groupId>
- <artifactId>etsi-sol003-lcm</artifactId>
- <version>1.7.1-SNAPSHOT</version>
- </parent>
- <artifactId>etsi-sol003-lcm-api</artifactId>
- <name>ETSI SOL003 Life Cycle Management Adapter API</name>
- <build>
- <plugins>
- <plugin>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-codegen-maven-plugin</artifactId>
- <version>${version-swagger-codegen}</version>
- <executions>
- <execution>
- <id>vnfmadapter</id>
- <goals>
- <goal>generate</goal>
- </goals>
- <configuration>
- <inputSpec>${basedir}/src/main/resources/etsisol003adapter.yaml</inputSpec>
- <language>java</language>
- <library>retrofit2</library>
- <output>${project.build.directory}/generated-sources/etsisol003adapter</output>
- <apiPackage>org.onap.so.adapters.etsisol003adapter.lcm.v1.api</apiPackage>
- <modelPackage>org.onap.so.adapters.etsisol003adapter.lcm.v1.model</modelPackage>
- <generateApiTests>false</generateApiTests>
- <generateModelTests>false</generateModelTests>
- <configOptions>
- <jackson>true</jackson>
- <sourceFolder>src/gen/java/main</sourceFolder>
- <withXml>true</withXml>
- <useRxJava2>true</useRxJava2>
- <serializableModel>true</serializableModel>
- </configOptions>
- </configuration>
- </execution>
- <execution>
- <id>sol003-vnf-lcn-api</id>
- <goals>
- <goal>generate</goal>
- </goals>
- <configuration>
- <inputSpec>${basedir}/src/main/resources/SOL003-VNFLifecycleManagementNotification-API.json</inputSpec>
- <language>java</language>
- <library>okhttp-gson</library>
- <output>${project.build.directory}/generated-sources/sol003-vnf-lcn</output>
- <apiPackage>org.onap.so.adapters.etsisol003adapter.lcm.lcn.api</apiPackage>
- <modelPackage>org.onap.so.adapters.etsisol003adapter.lcm.lcn.model</modelPackage>
- <generateApiTests>false</generateApiTests>
- <generateModelTests>false</generateModelTests>
- <configOptions>
- <sourceFolder>src/gen/java/main</sourceFolder>
- <withXml>true</withXml>
- <useRxJava2>true</useRxJava2>
- <serializableModel>true</serializableModel>
- </configOptions>
- </configuration>
- </execution>
- <execution>
- <id>sol003-vnf-grant-api</id>
- <goals>
- <goal>generate</goal>
- </goals>
- <configuration>
- <inputSpec>${basedir}/src/main/resources/SOL003-VNFLifecycleOperationGranting-API.json</inputSpec>
- <language>java</language>
- <library>okhttp-gson</library>
- <output>${project.build.directory}/generated-sources/sol003-vnf-grant</output>
- <apiPackage>org.onap.so.adapters.etsisol003adapter.lcm.grant.api</apiPackage>
- <modelPackage>org.onap.so.adapters.etsisol003adapter.lcm.grant.model</modelPackage>
- <generateApiTests>false</generateApiTests>
- <generateModelTests>false</generateModelTests>
- <configOptions>
- <generateSupportingFiles>false</generateSupportingFiles>
- <sourceFolder>src/gen/java/main</sourceFolder>
- <withXml>true</withXml>
- <useRxJava2>true</useRxJava2>
- <serializableModel>true</serializableModel>
- </configOptions>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>add-source</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>${project.basedir}/target/generated-sources/vnfmadapter/src/gen/java/main</source>
- <source>${project.basedir}/target/generated-sources/sol003-vnf-lcn/src/gen/java/main</source>
- <source>${project.basedir}/target/generated-sources/sol003-vnf-grant/src/gen/java/main</source>
- <source>${project.basedir}/target/generated-sources/etsisol003adapter/src/gen/java/main</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.eclipse.m2e</groupId>
- <artifactId>lifecycle-mapping</artifactId>
- <version>1.0.0</version>
- <configuration>
- <lifecycleMappingMetadata>
- <pluginExecutions>
- <pluginExecution>
- <pluginExecutionFilter>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-codegen-maven-plugin</artifactId>
- <goals>
- <goal>generate</goal>
- </goals>
- <versionRange>[2.2.0,)</versionRange>
- </pluginExecutionFilter>
- <action>
- <execute>
- <runOnIncremental>false</runOnIncremental>
- </execute>
- </action>
- </pluginExecution>
- </pluginExecutions>
- </lifecycleMappingMetadata>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
- <dependencies>
- <dependency>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-annotations</artifactId>
- <version>${swagger-core-version}</version>
- </dependency>
- <dependency>
- <groupId>com.squareup.retrofit2</groupId>
- <artifactId>converter-gson</artifactId>
- <version>${retrofit-version}</version>
- </dependency>
- <dependency>
- <groupId>com.squareup.retrofit2</groupId>
- <artifactId>retrofit</artifactId>
- <version>${retrofit-version}</version>
- </dependency>
- <dependency>
- <groupId>com.squareup.retrofit2</groupId>
- <artifactId>converter-scalars</artifactId>
- <version>${retrofit-version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.oltu.oauth2</groupId>
- <artifactId>org.apache.oltu.oauth2.client</artifactId>
- <version>${oltu-version}</version>
- </dependency>
- <dependency>
- <groupId>io.gsonfire</groupId>
- <artifactId>gson-fire</artifactId>
- <version>${gson-fire-version}</version>
- </dependency>
- <dependency>
- <groupId>org.threeten</groupId>
- <artifactId>threetenbp</artifactId>
- <version>${threetenbp-version}</version>
- </dependency>
- <dependency>
- <groupId>io.reactivex.rxjava2</groupId>
- <artifactId>rxjava</artifactId>
- </dependency>
- <dependency>
- <groupId>com.squareup.retrofit2</groupId>
- <artifactId>adapter-rxjava2</artifactId>
- <version>${retrofit-version}</version>
- </dependency>
- <dependency>
- <groupId>com.google.code.gson</groupId>
- <artifactId>gson</artifactId>
- </dependency>
- <dependency>
- <groupId>com.squareup.okio</groupId>
- <artifactId>okio</artifactId>
- <version>${okio-version}</version>
- </dependency>
- <dependency>
- <groupId>com.squareup.okhttp3</groupId>
- <artifactId>okhttp</artifactId>
- <version>${okhttp3-version}</version>
- </dependency>
- <dependency>
- <groupId>com.squareup.okhttp3</groupId>
- <artifactId>logging-interceptor</artifactId>
- <version>${okhttp3-version}</version>
- </dependency>
- <dependency>
- <groupId>com.squareup.okhttp</groupId>
- <artifactId>logging-interceptor</artifactId>
- <version>${okhttp-version}</version>
- </dependency>
- <dependency>
- <groupId>com.squareup.okhttp</groupId>
- <artifactId>okhttp</artifactId>
- <version>${okhttp-version}</version>
- </dependency>
- <dependency>
- <groupId>com.squareup.okhttp</groupId>
- <artifactId>logging-interceptor</artifactId>
- <version>${okhttp-version}</version>
- </dependency>
- </dependencies>
-</project> \ No newline at end of file
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-api/src/main/resources/SOL003-VNFLifecycleManagementNotification-API.json b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-api/src/main/resources/SOL003-VNFLifecycleManagementNotification-API.json
deleted file mode 100644
index d3b6ebaa7e..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-api/src/main/resources/SOL003-VNFLifecycleManagementNotification-API.json
+++ /dev/null
@@ -1,1897 +0,0 @@
-{
- "swagger" : "2.0",
- "info" : {
- "description" : "SOL003 - VNF Lifecycle Management Notification interface\n\nIMPORTANT: Please note that this file might be not aligned to the current version of the ETSI Group Specification it refers to. In case of discrepancies the published ETSI Group Specification takes precedence.\n\nIn clause 4.3.2 of ETSI GS NFV-SOL 003 v2.4.1, an attribute-based filtering mechanism is defined. This mechanism is currently not included in the corresponding OpenAPI design for this GS version. Changes to the attribute-based filtering mechanism are being considered in v2.5.1 of this GS for inclusion in the corresponding future ETSI NFV OpenAPI design.\nPlease report bugs to https://forge.etsi.org/bugzilla/buglist.cgi?component=Nfv-Openapis&list_id=61&product=NFV&resolution=\n",
- "version" : "1.1.1",
- "title" : "SOL003 - VNF Lifecycle Management Notification interface",
- "license" : {
- "name" : "ETSI Forge copyright notice",
- "url" : "https://forge.etsi.org/etsi-forge-copyright-notice.txt"
- }
- },
- "basePath" : "/so/vnfm-adapter/v1/",
- "schemes" : [ "https" ],
- "consumes" : [ "application/json" ],
- "produces" : [ "application/json" ],
- "paths" : {
- "/lcn/VnfLcmOperationOccurrenceNotification" : {
- "post" : {
- "description" : "Notify\n\nThe POST method delivers a notification from the server to the client.\n",
- "parameters" : [ {
- "in" : "body",
- "name" : "VnfLcmOperationOccurrenceNotification",
- "description" : "A notification about on-boarding of a VNF package.",
- "required" : true,
- "schema" : {
- "$ref" : "#/definitions/VnfLcmOperationOccurrenceNotification"
- }
- }, {
- "name" : "Authorization",
- "in" : "header",
- "description" : "The authorization token for the request. Reference: IETF RFC 7235\n",
- "required" : false,
- "type" : "string"
- }, {
- "name" : "Content-Type",
- "in" : "header",
- "description" : "The MIME type of the body of the request. Reference: IETF RFC 7231\n",
- "required" : true,
- "type" : "string"
- } ],
- "responses" : {
- "204" : {
- "description" : "No Content\nThe notification was delivered successfully.\n",
- "headers" : {
- "WWW-Authenticate" : {
- "type" : "string",
- "description" : "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n"
- }
- }
- },
- "400" : {
- "description" : "Bad Request\nIf the request is malformed or syntactically incorrect (e.g. if the request URI contains incorrect query parameters or a syntactically incorrect payload body), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem.\n\n ---\n\nIf the request contains a malformed access token, the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n\n ---\n\nIf there is an application error related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond with this response code.The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
- "headers" : {
- "Content-Type" : {
- "type" : "string",
- "description" : "The MIME type of the body of the response."
- },
- "WWW-Authenticate" : {
- "type" : "string",
- "description" : "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n"
- }
- },
- "schema" : {
- "type" : "object",
- "required" : [ "detail", "status" ],
- "properties" : {
- "type" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n"
- },
- "title" : {
- "type" : "string",
- "description" : "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n"
- },
- "status" : {
- "type" : "integer",
- "description" : "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n"
- },
- "detail" : {
- "type" : "string",
- "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
- },
- "instance" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
- }
- },
- "description" : "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n"
- }
- },
- "401" : {
- "description" : "Unauthorized\nIf the request contains no access token even though one is required, or if the request contains an authorization token that is invalid (e.g. expired or revoked), the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n",
- "headers" : {
- "Content-Type" : {
- "type" : "string",
- "description" : "The MIME type of the body of the response."
- },
- "WWW-Authenticate" : {
- "type" : "string",
- "description" : "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n"
- }
- },
- "schema" : {
- "type" : "object",
- "required" : [ "detail", "status" ],
- "properties" : {
- "type" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n"
- },
- "title" : {
- "type" : "string",
- "description" : "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n"
- },
- "status" : {
- "type" : "integer",
- "description" : "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n"
- },
- "detail" : {
- "type" : "string",
- "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
- },
- "instance" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
- }
- },
- "description" : "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n"
- }
- },
- "403" : {
- "description" : "Forbidden\nIf the API consumer is not allowed to perform a particular request to a particular resource, the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided. It should include in the \"detail\" attribute information about the source of the problem, and may indicate how to solve it.\n",
- "headers" : {
- "Content-Type" : {
- "type" : "string",
- "description" : "The MIME type of the body of the response."
- }
- },
- "schema" : {
- "type" : "object",
- "required" : [ "detail", "status" ],
- "properties" : {
- "type" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n"
- },
- "title" : {
- "type" : "string",
- "description" : "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n"
- },
- "status" : {
- "type" : "integer",
- "description" : "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n"
- },
- "detail" : {
- "type" : "string",
- "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
- },
- "instance" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
- }
- },
- "description" : "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n"
- }
- },
- "404" : {
- "description" : "Not Found\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request, or is not willing to disclose that one exists, it shall respond with this response code. Specifically in case of this task resource, the reason can also be that the task is not supported for the VNF LCM operation occurrence represented by the parent resource, and that the task resource consequently does not exist. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the sourceof the problem, e.g. a wrong resource URI variable.\n",
- "headers" : {
- "Content-Type" : {
- "type" : "string",
- "description" : "The MIME type of the body of the response."
- }
- },
- "schema" : {
- "type" : "object",
- "required" : [ "detail", "status" ],
- "properties" : {
- "type" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n"
- },
- "title" : {
- "type" : "string",
- "description" : "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n"
- },
- "status" : {
- "type" : "integer",
- "description" : "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n"
- },
- "detail" : {
- "type" : "string",
- "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
- },
- "instance" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
- }
- },
- "description" : "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n"
- }
- },
- "405" : {
- "description" : "Method Not Allowed\nIf a particular HTTP method is not supported for a particular resource, the API producer shall respond with this response code. The \"ProblemDetails\" structure may be omitted in that case.\n",
- "headers" : {
- "Content-Type" : {
- "type" : "string",
- "description" : "The MIME type of the body of the response."
- }
- },
- "schema" : {
- "type" : "object",
- "required" : [ "detail", "status" ],
- "properties" : {
- "type" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n"
- },
- "title" : {
- "type" : "string",
- "description" : "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n"
- },
- "status" : {
- "type" : "integer",
- "description" : "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n"
- },
- "detail" : {
- "type" : "string",
- "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
- },
- "instance" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
- }
- },
- "description" : "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n"
- }
- },
- "406" : {
- "description" : "Not Acceptable\nIf the \"Accept\" HTTP header does not contain at least one name of a content type that is acceptable to the API producer, the API producer shall respond with this response code. The \"ProblemDetails\" structure may be omitted in that case. \n",
- "headers" : {
- "Content-Type" : {
- "type" : "string",
- "description" : "The MIME type of the body of the response."
- }
- },
- "schema" : {
- "type" : "object",
- "required" : [ "detail", "status" ],
- "properties" : {
- "type" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n"
- },
- "title" : {
- "type" : "string",
- "description" : "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n"
- },
- "status" : {
- "type" : "integer",
- "description" : "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n"
- },
- "detail" : {
- "type" : "string",
- "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
- },
- "instance" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
- }
- },
- "description" : "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n"
- }
- },
- "500" : {
- "description" : "Internal Server Error\nIf there is an application error not related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond withthis response code. The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
- "headers" : {
- "Content-Type" : {
- "type" : "string",
- "description" : "The MIME type of the body of the response."
- }
- },
- "schema" : {
- "type" : "object",
- "required" : [ "detail", "status" ],
- "properties" : {
- "type" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n"
- },
- "title" : {
- "type" : "string",
- "description" : "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n"
- },
- "status" : {
- "type" : "integer",
- "description" : "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n"
- },
- "detail" : {
- "type" : "string",
- "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
- },
- "instance" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
- }
- },
- "description" : "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n"
- }
- },
- "503" : {
- "description" : "Service Unavailable\nIf the API producer encounters an internal overload situation of itself or of a system it relies on, it should respond with this response code, following the provisions in IETF RFC 7231 [13] for the use of the \"Retry-After\" HTTP header and for the alternative to refuse the connection. The \"ProblemDetails\" structure may be omitted.\n",
- "headers" : {
- "Content-Type" : {
- "type" : "string",
- "description" : "The MIME type of the body of the response."
- }
- },
- "schema" : {
- "type" : "object",
- "required" : [ "detail", "status" ],
- "properties" : {
- "type" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n"
- },
- "title" : {
- "type" : "string",
- "description" : "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n"
- },
- "status" : {
- "type" : "integer",
- "description" : "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n"
- },
- "detail" : {
- "type" : "string",
- "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
- },
- "instance" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
- }
- },
- "description" : "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n"
- }
- }
- }
- }
- },
- "/lcn/VnfIdentifierCreationNotification" : {
- "post" : {
- "description" : "Notify\n\nThe POST method delivers a notification from the server to the client.\n",
- "parameters" : [ {
- "in" : "body",
- "name" : "VnfIdentifierCreationNotification",
- "description" : "A notification about the creation of a VNF identifier and the related VNF instance resource.\n",
- "required" : true,
- "schema" : {
- "$ref" : "#/definitions/VnfIdentifierCreationNotification"
- }
- }, {
- "name" : "Authorization",
- "in" : "header",
- "description" : "The authorization token for the request. Reference: IETF RFC 7235\n",
- "required" : false,
- "type" : "string"
- }, {
- "name" : "Content-Type",
- "in" : "header",
- "description" : "The MIME type of the body of the request. Reference: IETF RFC 7231\n",
- "required" : true,
- "type" : "string"
- } ],
- "responses" : {
- "204" : {
- "description" : "No Content\nThe notification was delivered successfully.\n",
- "headers" : {
- "WWW-Authenticate" : {
- "type" : "string",
- "description" : "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n"
- }
- }
- },
- "400" : {
- "description" : "Bad Request\nIf the request is malformed or syntactically incorrect (e.g. if the request URI contains incorrect query parameters or a syntactically incorrect payload body), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem.\n\n ---\n\nIf the request contains a malformed access token, the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n\n ---\n\nIf there is an application error related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond with this response code.The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
- "headers" : {
- "Content-Type" : {
- "type" : "string",
- "description" : "The MIME type of the body of the response."
- },
- "WWW-Authenticate" : {
- "type" : "string",
- "description" : "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n"
- }
- },
- "schema" : {
- "type" : "object",
- "required" : [ "detail", "status" ],
- "properties" : {
- "type" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n"
- },
- "title" : {
- "type" : "string",
- "description" : "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n"
- },
- "status" : {
- "type" : "integer",
- "description" : "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n"
- },
- "detail" : {
- "type" : "string",
- "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
- },
- "instance" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
- }
- },
- "description" : "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n"
- }
- },
- "401" : {
- "description" : "Unauthorized\nIf the request contains no access token even though one is required, or if the request contains an authorization token that is invalid (e.g. expired or revoked), the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n",
- "headers" : {
- "Content-Type" : {
- "type" : "string",
- "description" : "The MIME type of the body of the response."
- },
- "WWW-Authenticate" : {
- "type" : "string",
- "description" : "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n"
- }
- },
- "schema" : {
- "type" : "object",
- "required" : [ "detail", "status" ],
- "properties" : {
- "type" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n"
- },
- "title" : {
- "type" : "string",
- "description" : "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n"
- },
- "status" : {
- "type" : "integer",
- "description" : "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n"
- },
- "detail" : {
- "type" : "string",
- "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
- },
- "instance" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
- }
- },
- "description" : "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n"
- }
- },
- "403" : {
- "description" : "Forbidden\nIf the API consumer is not allowed to perform a particular request to a particular resource, the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided. It should include in the \"detail\" attribute information about the source of the problem, and may indicate how to solve it.\n",
- "headers" : {
- "Content-Type" : {
- "type" : "string",
- "description" : "The MIME type of the body of the response."
- }
- },
- "schema" : {
- "type" : "object",
- "required" : [ "detail", "status" ],
- "properties" : {
- "type" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n"
- },
- "title" : {
- "type" : "string",
- "description" : "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n"
- },
- "status" : {
- "type" : "integer",
- "description" : "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n"
- },
- "detail" : {
- "type" : "string",
- "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
- },
- "instance" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
- }
- },
- "description" : "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n"
- }
- },
- "404" : {
- "description" : "Not Found\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request, or is not willing to disclose that one exists, it shall respond with this response code. Specifically in case of this task resource, the reason can also be that the task is not supported for the VNF LCM operation occurrence represented by the parent resource, and that the task resource consequently does not exist. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the sourceof the problem, e.g. a wrong resource URI variable.\n",
- "headers" : {
- "Content-Type" : {
- "type" : "string",
- "description" : "The MIME type of the body of the response."
- }
- },
- "schema" : {
- "type" : "object",
- "required" : [ "detail", "status" ],
- "properties" : {
- "type" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n"
- },
- "title" : {
- "type" : "string",
- "description" : "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n"
- },
- "status" : {
- "type" : "integer",
- "description" : "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n"
- },
- "detail" : {
- "type" : "string",
- "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
- },
- "instance" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
- }
- },
- "description" : "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n"
- }
- },
- "405" : {
- "description" : "Method Not Allowed\nIf a particular HTTP method is not supported for a particular resource, the API producer shall respond with this response code. The \"ProblemDetails\" structure may be omitted in that case.\n",
- "headers" : {
- "Content-Type" : {
- "type" : "string",
- "description" : "The MIME type of the body of the response."
- }
- },
- "schema" : {
- "type" : "object",
- "required" : [ "detail", "status" ],
- "properties" : {
- "type" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n"
- },
- "title" : {
- "type" : "string",
- "description" : "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n"
- },
- "status" : {
- "type" : "integer",
- "description" : "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n"
- },
- "detail" : {
- "type" : "string",
- "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
- },
- "instance" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
- }
- },
- "description" : "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n"
- }
- },
- "406" : {
- "description" : "Not Acceptable\nIf the \"Accept\" HTTP header does not contain at least one name of a content type that is acceptable to the API producer, the API producer shall respond with this response code. The \"ProblemDetails\" structure may be omitted in that case. \n",
- "headers" : {
- "Content-Type" : {
- "type" : "string",
- "description" : "The MIME type of the body of the response."
- }
- },
- "schema" : {
- "type" : "object",
- "required" : [ "detail", "status" ],
- "properties" : {
- "type" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n"
- },
- "title" : {
- "type" : "string",
- "description" : "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n"
- },
- "status" : {
- "type" : "integer",
- "description" : "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n"
- },
- "detail" : {
- "type" : "string",
- "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
- },
- "instance" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
- }
- },
- "description" : "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n"
- }
- },
- "500" : {
- "description" : "Internal Server Error\nIf there is an application error not related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond withthis response code. The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
- "headers" : {
- "Content-Type" : {
- "type" : "string",
- "description" : "The MIME type of the body of the response."
- }
- },
- "schema" : {
- "type" : "object",
- "required" : [ "detail", "status" ],
- "properties" : {
- "type" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n"
- },
- "title" : {
- "type" : "string",
- "description" : "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n"
- },
- "status" : {
- "type" : "integer",
- "description" : "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n"
- },
- "detail" : {
- "type" : "string",
- "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
- },
- "instance" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
- }
- },
- "description" : "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n"
- }
- },
- "503" : {
- "description" : "Service Unavailable\nIf the API producer encounters an internal overload situation of itself or of a system it relies on, it should respond with this response code, following the provisions in IETF RFC 7231 [13] for the use of the \"Retry-After\" HTTP header and for the alternative to refuse the connection. The \"ProblemDetails\" structure may be omitted.\n",
- "headers" : {
- "Content-Type" : {
- "type" : "string",
- "description" : "The MIME type of the body of the response."
- }
- },
- "schema" : {
- "type" : "object",
- "required" : [ "detail", "status" ],
- "properties" : {
- "type" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n"
- },
- "title" : {
- "type" : "string",
- "description" : "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n"
- },
- "status" : {
- "type" : "integer",
- "description" : "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n"
- },
- "detail" : {
- "type" : "string",
- "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
- },
- "instance" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
- }
- },
- "description" : "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n"
- }
- }
- }
- }
- },
- "/lcn/VnfIdentifierDeletionNotification" : {
- "post" : {
- "description" : "Notify\n\nThe POST method delivers a notification from the server to the client.\n",
- "parameters" : [ {
- "in" : "body",
- "name" : "VnfIdentifierDeletionNotification",
- "description" : "A notification about the deletion of a VNF identifier and the related VNF instance resource.\n",
- "required" : true,
- "schema" : {
- "$ref" : "#/definitions/VnfIdentifierDeletionNotification"
- }
- }, {
- "name" : "Authorization",
- "in" : "header",
- "description" : "The authorization token for the request. Reference: IETF RFC 7235\n",
- "required" : false,
- "type" : "string"
- }, {
- "name" : "Content-Type",
- "in" : "header",
- "description" : "The MIME type of the body of the request. Reference: IETF RFC 7231\n",
- "required" : true,
- "type" : "string"
- } ],
- "responses" : {
- "204" : {
- "description" : "No Content\nThe notification was delivered successfully.\n",
- "headers" : {
- "WWW-Authenticate" : {
- "type" : "string",
- "description" : "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n"
- }
- }
- },
- "400" : {
- "description" : "Bad Request\nIf the request is malformed or syntactically incorrect (e.g. if the request URI contains incorrect query parameters or a syntactically incorrect payload body), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem.\n\n ---\n\nIf the request contains a malformed access token, the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n\n ---\n\nIf there is an application error related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond with this response code.The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
- "headers" : {
- "Content-Type" : {
- "type" : "string",
- "description" : "The MIME type of the body of the response."
- },
- "WWW-Authenticate" : {
- "type" : "string",
- "description" : "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n"
- }
- },
- "schema" : {
- "type" : "object",
- "required" : [ "detail", "status" ],
- "properties" : {
- "type" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n"
- },
- "title" : {
- "type" : "string",
- "description" : "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n"
- },
- "status" : {
- "type" : "integer",
- "description" : "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n"
- },
- "detail" : {
- "type" : "string",
- "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
- },
- "instance" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
- }
- },
- "description" : "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n"
- }
- },
- "401" : {
- "description" : "Unauthorized\nIf the request contains no access token even though one is required, or if the request contains an authorization token that is invalid (e.g. expired or revoked), the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n",
- "headers" : {
- "Content-Type" : {
- "type" : "string",
- "description" : "The MIME type of the body of the response."
- },
- "WWW-Authenticate" : {
- "type" : "string",
- "description" : "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n"
- }
- },
- "schema" : {
- "type" : "object",
- "required" : [ "detail", "status" ],
- "properties" : {
- "type" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n"
- },
- "title" : {
- "type" : "string",
- "description" : "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n"
- },
- "status" : {
- "type" : "integer",
- "description" : "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n"
- },
- "detail" : {
- "type" : "string",
- "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
- },
- "instance" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
- }
- },
- "description" : "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n"
- }
- },
- "403" : {
- "description" : "Forbidden\nIf the API consumer is not allowed to perform a particular request to a particular resource, the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided. It should include in the \"detail\" attribute information about the source of the problem, and may indicate how to solve it.\n",
- "headers" : {
- "Content-Type" : {
- "type" : "string",
- "description" : "The MIME type of the body of the response."
- }
- },
- "schema" : {
- "type" : "object",
- "required" : [ "detail", "status" ],
- "properties" : {
- "type" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n"
- },
- "title" : {
- "type" : "string",
- "description" : "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n"
- },
- "status" : {
- "type" : "integer",
- "description" : "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n"
- },
- "detail" : {
- "type" : "string",
- "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
- },
- "instance" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
- }
- },
- "description" : "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n"
- }
- },
- "404" : {
- "description" : "Not Found\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request, or is not willing to disclose that one exists, it shall respond with this response code. Specifically in case of this task resource, the reason can also be that the task is not supported for the VNF LCM operation occurrence represented by the parent resource, and that the task resource consequently does not exist. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the sourceof the problem, e.g. a wrong resource URI variable.\n",
- "headers" : {
- "Content-Type" : {
- "type" : "string",
- "description" : "The MIME type of the body of the response."
- }
- },
- "schema" : {
- "type" : "object",
- "required" : [ "detail", "status" ],
- "properties" : {
- "type" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n"
- },
- "title" : {
- "type" : "string",
- "description" : "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n"
- },
- "status" : {
- "type" : "integer",
- "description" : "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n"
- },
- "detail" : {
- "type" : "string",
- "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
- },
- "instance" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
- }
- },
- "description" : "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n"
- }
- },
- "405" : {
- "description" : "Method Not Allowed\nIf a particular HTTP method is not supported for a particular resource, the API producer shall respond with this response code. The \"ProblemDetails\" structure may be omitted in that case.\n",
- "headers" : {
- "Content-Type" : {
- "type" : "string",
- "description" : "The MIME type of the body of the response."
- }
- },
- "schema" : {
- "type" : "object",
- "required" : [ "detail", "status" ],
- "properties" : {
- "type" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n"
- },
- "title" : {
- "type" : "string",
- "description" : "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n"
- },
- "status" : {
- "type" : "integer",
- "description" : "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n"
- },
- "detail" : {
- "type" : "string",
- "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
- },
- "instance" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
- }
- },
- "description" : "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n"
- }
- },
- "406" : {
- "description" : "Not Acceptable\nIf the \"Accept\" HTTP header does not contain at least one name of a content type that is acceptable to the API producer, the API producer shall respond with this response code. The \"ProblemDetails\" structure may be omitted in that case. \n",
- "headers" : {
- "Content-Type" : {
- "type" : "string",
- "description" : "The MIME type of the body of the response."
- }
- },
- "schema" : {
- "type" : "object",
- "required" : [ "detail", "status" ],
- "properties" : {
- "type" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n"
- },
- "title" : {
- "type" : "string",
- "description" : "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n"
- },
- "status" : {
- "type" : "integer",
- "description" : "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n"
- },
- "detail" : {
- "type" : "string",
- "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
- },
- "instance" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
- }
- },
- "description" : "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n"
- }
- },
- "500" : {
- "description" : "Internal Server Error\nIf there is an application error not related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond withthis response code. The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
- "headers" : {
- "Content-Type" : {
- "type" : "string",
- "description" : "The MIME type of the body of the response."
- }
- },
- "schema" : {
- "type" : "object",
- "required" : [ "detail", "status" ],
- "properties" : {
- "type" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n"
- },
- "title" : {
- "type" : "string",
- "description" : "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n"
- },
- "status" : {
- "type" : "integer",
- "description" : "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n"
- },
- "detail" : {
- "type" : "string",
- "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
- },
- "instance" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
- }
- },
- "description" : "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n"
- }
- },
- "503" : {
- "description" : "Service Unavailable\nIf the API producer encounters an internal overload situation of itself or of a system it relies on, it should respond with this response code, following the provisions in IETF RFC 7231 [13] for the use of the \"Retry-After\" HTTP header and for the alternative to refuse the connection. The \"ProblemDetails\" structure may be omitted.\n",
- "headers" : {
- "Content-Type" : {
- "type" : "string",
- "description" : "The MIME type of the body of the response."
- }
- },
- "schema" : {
- "type" : "object",
- "required" : [ "detail", "status" ],
- "properties" : {
- "type" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n"
- },
- "title" : {
- "type" : "string",
- "description" : "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n"
- },
- "status" : {
- "type" : "integer",
- "description" : "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n"
- },
- "detail" : {
- "type" : "string",
- "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
- },
- "instance" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
- }
- },
- "description" : "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n"
- }
- }
- }
- }
- }
- },
- "definitions" : {
- "lcnVnfLcmOperationOccurrenceNotification_changedInfo_vimConnectionInfo" : {
- "required" : [ "id", "vimType" ],
- "properties" : {
- "id" : {
- "type" : "string",
- "description" : "An identifier with the intention of being globally unique.\n"
- },
- "vimId" : {
- "type" : "string",
- "description" : "An identifier with the intention of being globally unique.\n"
- },
- "vimType" : {
- "type" : "string",
- "description" : "Discriminator for the different types of the VIM information. The value of this attribute determines the structure of the \"interfaceInfo\" and \"accessInfo\" attributes, based on the type of the VIM. The set of permitted values is expected to change over time as new types or versions of VIMs become available. The ETSI NFV registry of VIM-related information provides access to information about VimConnectionInfo definitions for various VIM types. The structure of the registry is defined in Annex C of SOL003.\n"
- },
- "interfaceInfo" : {
- "type" : "object",
- "description" : "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159. \n",
- "properties" : { }
- },
- "accessInfo" : {
- "type" : "object",
- "description" : "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159. \n",
- "properties" : { }
- },
- "extra" : {
- "type" : "object",
- "description" : "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159. \n",
- "properties" : { }
- }
- },
- "description" : "This type represents parameters to connect to a VIM for managing the resources of a VNF instance. This structure is used to convey VIM-related parameters over the Or-Vnfm interface. Additional parameters for a VIM may be configured into the VNFM by means outside the scope of the present document, and bound to the identifier of that VIM.\n",
- "example" : {
- "vimType" : "vimType",
- "vimId" : "vimId",
- "extra" : "{}",
- "interfaceInfo" : "{}",
- "id" : "id",
- "accessInfo" : "{}"
- }
- },
- "lcnVnfLcmOperationOccurrenceNotification_computeResource" : {
- "required" : [ "resourceId", "vimConnectionId" ],
- "properties" : {
- "vimConnectionId" : {
- "type" : "string",
- "description" : "An identifier with the intention of being globally unique.\n"
- },
- "resourceProviderId" : {
- "type" : "string",
- "description" : "An identifier with the intention of being globally unique.\n"
- },
- "resourceId" : {
- "type" : "string",
- "description" : "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n"
- },
- "vimLevelResourceType" : {
- "type" : "string",
- "description" : "Type of the resource in the scope of the VIM or the resource provider.\n"
- }
- },
- "description" : "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance. Information about the resource is available from the VIM.\n",
- "example" : {
- "resourceId" : "resourceId",
- "vimConnectionId" : "vimConnectionId",
- "vimLevelResourceType" : "vimLevelResourceType",
- "resourceProviderId" : "resourceProviderId"
- }
- },
- "lcnVnfLcmOperationOccurrenceNotification_affectedVnfcs" : {
- "required" : [ "changeType", "computeResource", "id", "vduId" ],
- "properties" : {
- "id" : {
- "type" : "string",
- "description" : "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n"
- },
- "vduId" : {
- "type" : "string",
- "description" : "An identifier that is unique within a VNF descriptor.\n"
- },
- "changeType" : {
- "type" : "string",
- "description" : "Signals the type of change. Permitted values: * ADDED * REMOVED * MODIFIED * TEMPORARY For a temporary resource, an AffectedVnfc structure exists as long as the temporary resource exists.\n",
- "enum" : [ "ADDED", "REMOVED", "MODIFIED", "TEMPORARY" ]
- },
- "computeResource" : {
- "$ref" : "#/definitions/lcnVnfLcmOperationOccurrenceNotification_computeResource"
- },
- "metadata" : {
- "type" : "object",
- "description" : "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159. \n",
- "properties" : { }
- },
- "affectedVnfcCpIds" : {
- "type" : "array",
- "description" : "Identifiers of CP(s) of the VNFC instance that were affected by the change. Shall be present for those affected CPs of the VNFC instance that are associated to an external CP of the VNF instance. May be present for further affected CPs of the VNFC instance.\n",
- "items" : {
- "type" : "string",
- "description" : "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n"
- }
- },
- "addedStorageResourceIds" : {
- "type" : "array",
- "description" : "References to VirtualStorage resources that have been added. Each value refers to a VirtualStorageResourceInfo item in the VnfInstance that was added to the VNFC. It shall be provided if at least one storage resource was added to the VNFC.\n",
- "items" : {
- "type" : "string",
- "description" : "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n"
- }
- },
- "removedStorageResourceIds" : {
- "type" : "array",
- "description" : "References to VirtualStorage resources that have been removed. The value contains the identifier of a VirtualStorageResourceInfo item that has been removed from the VNFC, and might no longer exist in the VnfInstance. It shall be provided if at least one storage resource was removed from the VNFC.\n",
- "items" : {
- "type" : "string",
- "description" : "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n"
- }
- }
- },
- "description" : "This type provides information about added, deleted, modified and temporary VNFCs. \n",
- "example" : {
- "addedStorageResourceIds" : [ "addedStorageResourceIds", "addedStorageResourceIds" ],
- "metadata" : "{}",
- "changeType" : "ADDED",
- "affectedVnfcCpIds" : [ "affectedVnfcCpIds", "affectedVnfcCpIds" ],
- "id" : "id",
- "vduId" : "vduId",
- "computeResource" : {
- "resourceId" : "resourceId",
- "vimConnectionId" : "vimConnectionId",
- "vimLevelResourceType" : "vimLevelResourceType",
- "resourceProviderId" : "resourceProviderId"
- },
- "removedStorageResourceIds" : [ "removedStorageResourceIds", "removedStorageResourceIds" ]
- }
- },
- "lcnVnfLcmOperationOccurrenceNotification_changedExtConnectivity" : {
- "required" : [ "id", "resourceHandle" ],
- "properties" : {
- "id" : {
- "type" : "string",
- "description" : "An identifier with the intention of being globally unique.\n"
- },
- "resourceHandle" : {
- "$ref" : "#/definitions/lcnVnfLcmOperationOccurrenceNotification_computeResource"
- },
- "extLinkPorts" : {
- "type" : "array",
- "description" : "Link ports of this VL.\n",
- "items" : {
- "$ref" : "#/definitions/lcnVnfLcmOperationOccurrenceNotification_extLinkPorts"
- }
- }
- },
- "example" : {
- "resourceHandle" : {
- "resourceId" : "resourceId",
- "vimConnectionId" : "vimConnectionId",
- "vimLevelResourceType" : "vimLevelResourceType",
- "resourceProviderId" : "resourceProviderId"
- },
- "extLinkPorts" : [ {
- "resourceHandle" : {
- "resourceId" : "resourceId",
- "vimConnectionId" : "vimConnectionId",
- "vimLevelResourceType" : "vimLevelResourceType",
- "resourceProviderId" : "resourceProviderId"
- },
- "id" : "id",
- "cpInstanceId" : "cpInstanceId"
- }, {
- "resourceHandle" : {
- "resourceId" : "resourceId",
- "vimConnectionId" : "vimConnectionId",
- "vimLevelResourceType" : "vimLevelResourceType",
- "resourceProviderId" : "resourceProviderId"
- },
- "id" : "id",
- "cpInstanceId" : "cpInstanceId"
- } ],
- "id" : "id"
- }
- },
- "lcnVnfLcmOperationOccurrenceNotification_error" : {
- "required" : [ "detail", "status" ],
- "properties" : {
- "type" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n"
- },
- "title" : {
- "type" : "string",
- "description" : "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n"
- },
- "status" : {
- "type" : "integer",
- "description" : "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n"
- },
- "detail" : {
- "type" : "string",
- "description" : "A human-readable explanation specific to this occurrence of the problem.\n"
- },
- "instance" : {
- "type" : "string",
- "format" : "URI",
- "description" : "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n"
- }
- },
- "description" : "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "example" : {
- "instance" : "instance",
- "detail" : "detail",
- "type" : "type",
- "title" : "title",
- "status" : 0
- }
- },
- "VnfLcmOperationOccurrenceNotification" : {
- "type" : "object",
- "required" : [ "_links", "id", "isAutomaticInvocation", "notificationStatus", "notificationType", "operation", "operationState", "subscriptionId", "timeStamp", "vnfInstanceId", "vnfLcmOpOccId" ],
- "properties" : {
- "id" : {
- "type" : "string",
- "description" : "An identifier with the intention of being globally unique.\n"
- },
- "notificationType" : {
- "type" : "string",
- "description" : "Discriminator for the different notification types. Shall be set to \"VnfLcmOperationOccurrenceNotification\" for this notification type.\n",
- "enum" : [ "VnfLcmOperationOccurrenceNotification" ]
- },
- "subscriptionId" : {
- "type" : "string",
- "description" : "An identifier with the intention of being globally unique.\n"
- },
- "timeStamp" : {
- "type" : "string",
- "format" : "date-time",
- "description" : "Date-time stamp. Representation: String formatted according to IETF RFC 3339.\n"
- },
- "notificationStatus" : {
- "type" : "string",
- "description" : "Indicates whether this notification reports about the start of a lifecycle operation or the result of a lifecycle operation. Permitted values: * START: Informs about the start of the VNF LCM operation\n occurrence.\n* RESULT: Informs about the final or intermediate result of the VNF\n LCM operation occurrence.\n",
- "enum" : [ "START", "RESULT" ]
- },
- "operationState" : {
- "type" : "string",
- "description" : "Value | Description ------|------------ STARTING | The LCM operation is starting. PROCESSING | The LCM operation is currently in execution. COMPLETED | he LCM operation has been completed successfully. FAILED_TEMP | The LCM operation has failed and execution has stopped, but the execution of the operation is not considered to be closed. FAILED | The LCM operation has failed and it cannot be retried or rolled back, as it is determined that such action won't succeed. ROLLING_BACK | The LCM operation is currently being rolled back. ROLLED_BACK | The LCM operation has been successfully rolled back, i.e. The state of the VNF prior to the original operation invocation has been restored as closely as possible.\n",
- "enum" : [ "STARTING", "PROCESSING", "COMPLETED", "FAILED_TEMP", "FAILED", "ROLLING_BACK", "ROLLED_BACK" ]
- },
- "vnfInstanceId" : {
- "type" : "string",
- "description" : "An identifier with the intention of being globally unique.\n"
- },
- "operation" : {
- "type" : "string",
- "description" : "Value | Description ------|------------ INSTANTIATE | Represents the \"Instantiate VNF\" LCM operation. SCALE | Represents the \"Scale VNF\" LCM operation. SCALE_TO_LEVEL | Represents the \"Scale VNF to Level\" LCM operation. CHANGE_FLAVOUR | Represents the \"Change VNF Flavour\" LCM operation. TERMINATE | Represents the \"Terminate VNF\" LCM operation. HEAL | Represents the \"Heal VNF\" LCM operation. OPERATE | Represents the \"Operate VNF\" LCM operation. CHANGE_EXT_CONN | Represents the \"Change external VNF connectivity\" LCM operation. MODIFY_INFO | Represents the \"Modify VNF Information\" LCM operation. \n",
- "enum" : [ "INSTANTIATE", "SCALE", "SCALE_TO_LEVEL", "CHANGE_FLAVOUR", "TERMINATE", "HEAL", "OPERATE", "CHANGE_EXT_CONN", "MODIFY_INFO" ]
- },
- "isAutomaticInvocation" : {
- "type" : "boolean",
- "description" : "Set to true if this VNF LCM operation occurrence has been triggered by an automated procedure inside the VNFM (i.e. ScaleVnf / ScaleVnfToLevel triggered by auto-scale, or HealVnf triggered by auto-heal). Set to false otherwise.\n"
- },
- "vnfLcmOpOccId" : {
- "type" : "string",
- "description" : "An identifier with the intention of being globally unique.\n"
- },
- "affectedVnfcs" : {
- "type" : "array",
- "description" : "Information about VNFC instances that were affected during the lifecycle operation. Shall be present if the \"notificationStatus\" is set to \"RESULT\" and the operation has performed any resource modification. Shall be absent otherwise. This attribute contains information about the cumulative changes to virtualised resources that were performed so far by the VNF LCM operation occurrence and by any of the error handling procedures for that operation occurrence.\n",
- "items" : {
- "$ref" : "#/definitions/lcnVnfLcmOperationOccurrenceNotification_affectedVnfcs"
- }
- },
- "affectedVirtualLinks" : {
- "type" : "array",
- "description" : "Information about VL instances that were affected during the lifecycle operation. Shall be present if the \"notificationStatus\" is set to \"RESULT\" and the operation has performed any resource modification. Shall be absent otherwise. This attribute contains information about the cumulative changes to virtualised resources that were performed so far by the VNF LCM operation occurrence and by any of the error handling procedures for that operation occurrence.\n",
- "items" : {
- "$ref" : "#/definitions/lcnVnfLcmOperationOccurrenceNotification_affectedVirtualLinks"
- }
- },
- "affectedVirtualStorages" : {
- "type" : "array",
- "description" : "Information about virtualised storage instances that were affected during the lifecycle operation. Shall be present if the \"notificationStatus\" is set to \"RESULT\" and the operation has performed any resource modification. Shall be absent otherwise. This attribute contains information about the cumulative changes to virtualised resources that were performed so far by the VNF LCM operation occurrence and by any of the error handling procedures for that operation occurrence.\n",
- "items" : {
- "$ref" : "#/definitions/lcnVnfLcmOperationOccurrenceNotification_affectedVirtualStorages"
- }
- },
- "changedInfo" : {
- "$ref" : "#/definitions/lcnVnfLcmOperationOccurrenceNotification_changedInfo"
- },
- "changedExtConnectivity" : {
- "type" : "array",
- "description" : "Information about changed external connectivity, if this notification represents the result of a lifecycle operation occurrence. Shall be present if the \"notificationStatus\" is set to \"RESULT\" and the \"operation\" is set to \"CHANGE_EXT_CONN\". Shall be absent otherwise.\n",
- "items" : {
- "$ref" : "#/definitions/lcnVnfLcmOperationOccurrenceNotification_changedExtConnectivity"
- }
- },
- "error" : {
- "$ref" : "#/definitions/lcnVnfLcmOperationOccurrenceNotification_error"
- },
- "_links" : {
- "$ref" : "#/definitions/lcnVnfLcmOperationOccurrenceNotification__links"
- }
- },
- "description" : "This type represents a VNF lifecycle management operation occurrence notification, which informs the receiver of changes in the VNF lifecycle caused by a VNF LCM operation occurrence. The support of the notification is mandatory. This notification shall be triggered by the VNFM when there is a change in the VNF lifecycle caused by a VNF LCM operation occurrence, including: * Instantiation of the VNF * Scaling of the VNF instance (including auto-scaling) * Healing of the VNF instance (including auto-healing) * Change of the state of the VNF instance (i.e. Operate VNF) * Change of the deployment flavour of the VNF instance * Change of the external connectivity of the VNF instance * Termination of the VNF instance * Modification of VNF instance information and/or VNF configurable\n properties through the \"PATCH\" method on the \"Individual VNF instance\"\n resource.\nIf this is the initial notification about the start of a VNF LCM operation occurrence, it is assumed that the notification is sent by the VNFM before any action (including sending the grant request) is taken as part of the LCM operation. Due to possible race conditions, the \"start\" notification, the grant request and the LCM operation acknowledgment can arrive in any order at the NFVO, and the NFVO shall be able to handle such a situation. If this is a notification about a final or intermediate result state of a VNF LCM operation occurrence, the notification shall be sent after all related actions of the LCM operation that led to this state have been executed. The new state shall be set in the VnfLcmOpOcc resource before the notification about the state change is sent.\n",
- "example" : {
- "notificationStatus" : "START",
- "affectedVirtualLinks" : [ {
- "metadata" : "{}",
- "networkResource" : {
- "resourceId" : "resourceId",
- "vimConnectionId" : "vimConnectionId",
- "vimLevelResourceType" : "vimLevelResourceType",
- "resourceProviderId" : "resourceProviderId"
- },
- "changeType" : "ADDED",
- "virtualLinkDescId" : "virtualLinkDescId",
- "id" : "id"
- }, {
- "metadata" : "{}",
- "networkResource" : {
- "resourceId" : "resourceId",
- "vimConnectionId" : "vimConnectionId",
- "vimLevelResourceType" : "vimLevelResourceType",
- "resourceProviderId" : "resourceProviderId"
- },
- "changeType" : "ADDED",
- "virtualLinkDescId" : "virtualLinkDescId",
- "id" : "id"
- } ],
- "affectedVirtualStorages" : [ {
- "metadata" : "{}",
- "virtualStorageDescId" : "virtualStorageDescId",
- "changeType" : "ADDED",
- "id" : "id",
- "storageResource" : {
- "resourceId" : "resourceId",
- "vimConnectionId" : "vimConnectionId",
- "vimLevelResourceType" : "vimLevelResourceType",
- "resourceProviderId" : "resourceProviderId"
- }
- }, {
- "metadata" : "{}",
- "virtualStorageDescId" : "virtualStorageDescId",
- "changeType" : "ADDED",
- "id" : "id",
- "storageResource" : {
- "resourceId" : "resourceId",
- "vimConnectionId" : "vimConnectionId",
- "vimLevelResourceType" : "vimLevelResourceType",
- "resourceProviderId" : "resourceProviderId"
- }
- } ],
- "affectedVnfcs" : [ {
- "addedStorageResourceIds" : [ "addedStorageResourceIds", "addedStorageResourceIds" ],
- "metadata" : "{}",
- "changeType" : "ADDED",
- "affectedVnfcCpIds" : [ "affectedVnfcCpIds", "affectedVnfcCpIds" ],
- "id" : "id",
- "vduId" : "vduId",
- "computeResource" : {
- "resourceId" : "resourceId",
- "vimConnectionId" : "vimConnectionId",
- "vimLevelResourceType" : "vimLevelResourceType",
- "resourceProviderId" : "resourceProviderId"
- },
- "removedStorageResourceIds" : [ "removedStorageResourceIds", "removedStorageResourceIds" ]
- }, {
- "addedStorageResourceIds" : [ "addedStorageResourceIds", "addedStorageResourceIds" ],
- "metadata" : "{}",
- "changeType" : "ADDED",
- "affectedVnfcCpIds" : [ "affectedVnfcCpIds", "affectedVnfcCpIds" ],
- "id" : "id",
- "vduId" : "vduId",
- "computeResource" : {
- "resourceId" : "resourceId",
- "vimConnectionId" : "vimConnectionId",
- "vimLevelResourceType" : "vimLevelResourceType",
- "resourceProviderId" : "resourceProviderId"
- },
- "removedStorageResourceIds" : [ "removedStorageResourceIds", "removedStorageResourceIds" ]
- } ],
- "_links" : {
- "subscription" : {
- "href" : "http://example.com/aeiou"
- },
- "vnfLcmOpOcc" : {
- "href" : "http://example.com/aeiou"
- },
- "vnfInstance" : {
- "href" : "http://example.com/aeiou"
- }
- },
- "operationState" : "STARTING",
- "notificationType" : "VnfLcmOperationOccurrenceNotification",
- "error" : {
- "instance" : "instance",
- "detail" : "detail",
- "type" : "type",
- "title" : "title",
- "status" : 0
- },
- "timeStamp" : "2000-01-23T04:56:07.000+00:00",
- "vnfInstanceId" : "vnfInstanceId",
- "vnfLcmOpOccId" : "vnfLcmOpOccId",
- "changedInfo" : {
- "vnfProductName" : "vnfProductName",
- "metadata" : "{}",
- "extensions" : "{}",
- "vimConnectionInfo" : [ {
- "vimType" : "vimType",
- "vimId" : "vimId",
- "extra" : "{}",
- "interfaceInfo" : "{}",
- "id" : "id",
- "accessInfo" : "{}"
- }, {
- "vimType" : "vimType",
- "vimId" : "vimId",
- "extra" : "{}",
- "interfaceInfo" : "{}",
- "id" : "id",
- "accessInfo" : "{}"
- } ],
- "vnfdVersion" : "vnfdVersion",
- "vnfProvider" : "vnfProvider",
- "vnfConfigurableProperties" : "{}",
- "vnfPkgId" : "vnfPkgId",
- "vnfdId" : "vnfdId",
- "vnfInstanceName" : "vnfInstanceName",
- "vnfInstanceDescription" : "vnfInstanceDescription",
- "vnfSoftwareVersion" : "vnfSoftwareVersion"
- },
- "changedExtConnectivity" : [ {
- "resourceHandle" : {
- "resourceId" : "resourceId",
- "vimConnectionId" : "vimConnectionId",
- "vimLevelResourceType" : "vimLevelResourceType",
- "resourceProviderId" : "resourceProviderId"
- },
- "extLinkPorts" : [ {
- "resourceHandle" : {
- "resourceId" : "resourceId",
- "vimConnectionId" : "vimConnectionId",
- "vimLevelResourceType" : "vimLevelResourceType",
- "resourceProviderId" : "resourceProviderId"
- },
- "id" : "id",
- "cpInstanceId" : "cpInstanceId"
- }, {
- "resourceHandle" : {
- "resourceId" : "resourceId",
- "vimConnectionId" : "vimConnectionId",
- "vimLevelResourceType" : "vimLevelResourceType",
- "resourceProviderId" : "resourceProviderId"
- },
- "id" : "id",
- "cpInstanceId" : "cpInstanceId"
- } ],
- "id" : "id"
- }, {
- "resourceHandle" : {
- "resourceId" : "resourceId",
- "vimConnectionId" : "vimConnectionId",
- "vimLevelResourceType" : "vimLevelResourceType",
- "resourceProviderId" : "resourceProviderId"
- },
- "extLinkPorts" : [ {
- "resourceHandle" : {
- "resourceId" : "resourceId",
- "vimConnectionId" : "vimConnectionId",
- "vimLevelResourceType" : "vimLevelResourceType",
- "resourceProviderId" : "resourceProviderId"
- },
- "id" : "id",
- "cpInstanceId" : "cpInstanceId"
- }, {
- "resourceHandle" : {
- "resourceId" : "resourceId",
- "vimConnectionId" : "vimConnectionId",
- "vimLevelResourceType" : "vimLevelResourceType",
- "resourceProviderId" : "resourceProviderId"
- },
- "id" : "id",
- "cpInstanceId" : "cpInstanceId"
- } ],
- "id" : "id"
- } ],
- "id" : "id",
- "subscriptionId" : "subscriptionId",
- "isAutomaticInvocation" : true,
- "operation" : "INSTANTIATE"
- }
- },
- "lcnVnfLcmOperationOccurrenceNotification_extLinkPorts" : {
- "required" : [ "id", "resourceHandle" ],
- "properties" : {
- "id" : {
- "type" : "string",
- "description" : "An identifier with the intention of being globally unique.\n"
- },
- "resourceHandle" : {
- "$ref" : "#/definitions/lcnVnfLcmOperationOccurrenceNotification_computeResource"
- },
- "cpInstanceId" : {
- "type" : "string",
- "description" : "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n"
- }
- },
- "description" : "This type represents information about a link port of an external VL, i.e. a port providing connectivity for the VNF to an NS VL. \n",
- "example" : {
- "resourceHandle" : {
- "resourceId" : "resourceId",
- "vimConnectionId" : "vimConnectionId",
- "vimLevelResourceType" : "vimLevelResourceType",
- "resourceProviderId" : "resourceProviderId"
- },
- "id" : "id",
- "cpInstanceId" : "cpInstanceId"
- }
- },
- "VnfIdentifierCreationNotification" : {
- "type" : "object",
- "required" : [ "_links", "id", "notificationType", "timeStamp", "vnfInstanceId" ],
- "properties" : {
- "id" : {
- "type" : "string",
- "description" : "An identifier with the intention of being globally unique.\n"
- },
- "notificationType" : {
- "type" : "string",
- "description" : "Discriminator for the different notification types. Shall be set to \"VnfIdentifierCreationNotification\" for this notification type.\n",
- "enum" : [ "VnfIdentifierCreationNotification" ]
- },
- "subscriptionId" : {
- "type" : "string",
- "description" : "An identifier with the intention of being globally unique.\n"
- },
- "timeStamp" : {
- "type" : "string",
- "format" : "date-time",
- "description" : "Date-time stamp. Representation: String formatted according to IETF RFC 3339.\n"
- },
- "vnfInstanceId" : {
- "type" : "string",
- "description" : "An identifier with the intention of being globally unique.\n"
- },
- "_links" : {
- "$ref" : "#/definitions/lcnVnfLcmOperationOccurrenceNotification__links"
- }
- },
- "description" : "This type represents a VNF identifier creation notification, which informs the receiver of the creation of a new VNF instance resource and the associated VNF instance identifier. This notification shall be triggered by the VNFM when it has created a VNF instance resource and the associated VNF instance identifier.\n",
- "example" : {
- "timeStamp" : "2000-01-23T04:56:07.000+00:00",
- "vnfInstanceId" : "vnfInstanceId",
- "_links" : {
- "subscription" : {
- "href" : "http://example.com/aeiou"
- },
- "vnfLcmOpOcc" : {
- "href" : "http://example.com/aeiou"
- },
- "vnfInstance" : {
- "href" : "http://example.com/aeiou"
- }
- },
- "id" : "id",
- "notificationType" : "VnfIdentifierCreationNotification",
- "subscriptionId" : "subscriptionId"
- }
- },
- "lcnVnfLcmOperationOccurrenceNotification__links_vnfInstance" : {
- "required" : [ "href" ],
- "properties" : {
- "href" : {
- "type" : "string",
- "format" : "url",
- "description" : "URI of the referenced resource.\n"
- }
- },
- "description" : "This type represents a link to a resource.\n",
- "example" : {
- "href" : "http://example.com/aeiou"
- }
- },
- "lcnVnfLcmOperationOccurrenceNotification_changedInfo" : {
- "properties" : {
- "vnfInstanceName" : {
- "type" : "string",
- "description" : "If present, this attribute signals modifications of the \"vnfInstanceName\" attribute in \"VnfInstance\".\n"
- },
- "vnfInstanceDescription" : {
- "type" : "string",
- "description" : "If present, this attribute signals modifications of the \"vnfInstanceDescription\" attribute in \"VnfInstance\".\n"
- },
- "vnfConfigurableProperties" : {
- "type" : "object",
- "description" : "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159. \n",
- "properties" : { }
- },
- "metadata" : {
- "type" : "object",
- "description" : "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159. \n",
- "properties" : { }
- },
- "extensions" : {
- "type" : "object",
- "description" : "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159. \n",
- "properties" : { }
- },
- "vimConnectionInfo" : {
- "type" : "array",
- "description" : "If present, this attribute signals modifications of certain entries in the \"vimConnectionInfo\" attribute array in \"VnfInstance\".\n",
- "items" : {
- "$ref" : "#/definitions/lcnVnfLcmOperationOccurrenceNotification_changedInfo_vimConnectionInfo"
- }
- },
- "vnfPkgId" : {
- "type" : "string",
- "description" : "An identifier with the intention of being globally unique.\n"
- },
- "vnfdId" : {
- "type" : "string",
- "description" : "An identifier with the intention of being globally unique.\n"
- },
- "vnfProvider" : {
- "type" : "string",
- "description" : "If present, this attribute signals modifications of the \"vnfProvider\" attribute in \"VnfInstance\". If present, this attribute (which depends on the value of the \"vnfPkgId\" attribute) was modified implicitly following a request to modify the \"vnfPkgId\" attribute, by copying the value of this attribute from the VNFD in the VNF Package identified by the \"vnfPkgId” attribute.\n"
- },
- "vnfProductName" : {
- "type" : "string",
- "description" : "If present, this attribute signals modifications of the \"vnfProductName\" attribute in \"VnfInstance\". If present, this attribute (which depends on the value of the \"vnfPkgId\" attribute) was modified implicitly following a request to modify the \"vnfPkgId\" attribute, by copying the value of this attribute from the VNFD in the VNF Package identified by the \"vnfPkgId” attribute.\n"
- },
- "vnfSoftwareVersion" : {
- "type" : "string",
- "description" : "A Version.\n"
- },
- "vnfdVersion" : {
- "type" : "string",
- "description" : "A Version.\n"
- }
- },
- "description" : "This type represents attribute modifications that were performed on an \"Individual VNF instance\" resource. The attributes that can be included consist of those requested to be modified explicitly in the \"VnfInfoModificationRequest\" data structure, and additional attributes of the \"VnfInstance\" data structure that were modified implicitly e.g. when modifying the referenced VNF package.\n",
- "example" : {
- "vnfProductName" : "vnfProductName",
- "metadata" : "{}",
- "extensions" : "{}",
- "vimConnectionInfo" : [ {
- "vimType" : "vimType",
- "vimId" : "vimId",
- "extra" : "{}",
- "interfaceInfo" : "{}",
- "id" : "id",
- "accessInfo" : "{}"
- }, {
- "vimType" : "vimType",
- "vimId" : "vimId",
- "extra" : "{}",
- "interfaceInfo" : "{}",
- "id" : "id",
- "accessInfo" : "{}"
- } ],
- "vnfdVersion" : "vnfdVersion",
- "vnfProvider" : "vnfProvider",
- "vnfConfigurableProperties" : "{}",
- "vnfPkgId" : "vnfPkgId",
- "vnfdId" : "vnfdId",
- "vnfInstanceName" : "vnfInstanceName",
- "vnfInstanceDescription" : "vnfInstanceDescription",
- "vnfSoftwareVersion" : "vnfSoftwareVersion"
- }
- },
- "lcnVnfLcmOperationOccurrenceNotification_affectedVirtualStorages" : {
- "required" : [ "changeType", "id", "storageResource", "virtualStorageDescId" ],
- "properties" : {
- "id" : {
- "type" : "string",
- "description" : "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n"
- },
- "virtualStorageDescId" : {
- "type" : "string",
- "description" : "An identifier that is unique within a VNF descriptor.\n"
- },
- "changeType" : {
- "type" : "string",
- "description" : "Signals the type of change. Permitted values: * ADDED * REMOVED * MODIFIED * TEMPORARY For a temporary resource, an AffectedVirtualStorage structure exists as long as the temporary resource exists.\n",
- "enum" : [ "ADDED", "REMOVED", "MODIFIED", "TEMPORARY" ]
- },
- "storageResource" : {
- "$ref" : "#/definitions/lcnVnfLcmOperationOccurrenceNotification_computeResource"
- },
- "metadata" : {
- "type" : "object",
- "description" : "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159. \n",
- "properties" : { }
- }
- },
- "description" : "This type provides information about added, deleted, modified and temporary virtual storage resources.\n",
- "example" : {
- "metadata" : "{}",
- "virtualStorageDescId" : "virtualStorageDescId",
- "changeType" : "ADDED",
- "id" : "id",
- "storageResource" : {
- "resourceId" : "resourceId",
- "vimConnectionId" : "vimConnectionId",
- "vimLevelResourceType" : "vimLevelResourceType",
- "resourceProviderId" : "resourceProviderId"
- }
- }
- },
- "lcnVnfLcmOperationOccurrenceNotification__links" : {
- "required" : [ "subscription", "vnfInstance" ],
- "properties" : {
- "vnfInstance" : {
- "$ref" : "#/definitions/lcnVnfLcmOperationOccurrenceNotification__links_vnfInstance"
- },
- "subscription" : {
- "$ref" : "#/definitions/lcnVnfLcmOperationOccurrenceNotification__links_vnfInstance"
- },
- "vnfLcmOpOcc" : {
- "$ref" : "#/definitions/lcnVnfLcmOperationOccurrenceNotification__links_vnfInstance"
- }
- },
- "description" : "This type represents the links to resources that a notification can contain.\n",
- "example" : {
- "subscription" : {
- "href" : "http://example.com/aeiou"
- },
- "vnfLcmOpOcc" : {
- "href" : "http://example.com/aeiou"
- },
- "vnfInstance" : {
- "href" : "http://example.com/aeiou"
- }
- }
- },
- "VnfIdentifierDeletionNotification" : {
- "type" : "object",
- "required" : [ "_links", "id", "notificationType", "timeStamp", "vnfInstanceId" ],
- "properties" : {
- "id" : {
- "type" : "string",
- "description" : "An identifier with the intention of being globally unique.\n"
- },
- "notificationType" : {
- "type" : "string",
- "description" : "Discriminator for the different notification types. Shall be set to \"VnfIdentifierDeletionNotification\" for this notification type.\n",
- "enum" : [ "VnfIdentifierDeletionNotification" ]
- },
- "subscriptionId" : {
- "type" : "string",
- "description" : "An identifier with the intention of being globally unique.\n"
- },
- "timeStamp" : {
- "type" : "string",
- "format" : "date-time",
- "description" : "Date-time stamp. Representation: String formatted according to IETF RFC 3339.\n"
- },
- "vnfInstanceId" : {
- "type" : "string",
- "description" : "An identifier with the intention of being globally unique.\n"
- },
- "_links" : {
- "$ref" : "#/definitions/lcnVnfLcmOperationOccurrenceNotification__links"
- }
- },
- "description" : "This type represents a VNF identifier deletion notification, which informs the receiver of the deletion of a new VNF instance resource and the associated VNF instance identifier. This notification shall be triggered by the VNFM when it has deleted a VNF instance resource and the associated VNF instance identifier.\n",
- "example" : {
- "timeStamp" : "2000-01-23T04:56:07.000+00:00",
- "vnfInstanceId" : "vnfInstanceId",
- "_links" : {
- "subscription" : {
- "href" : "http://example.com/aeiou"
- },
- "vnfLcmOpOcc" : {
- "href" : "http://example.com/aeiou"
- },
- "vnfInstance" : {
- "href" : "http://example.com/aeiou"
- }
- },
- "id" : "id",
- "notificationType" : "VnfIdentifierDeletionNotification",
- "subscriptionId" : "subscriptionId"
- }
- },
- "lcnVnfLcmOperationOccurrenceNotification_affectedVirtualLinks" : {
- "required" : [ "changeType", "id", "networkResource", "virtualLinkDescId" ],
- "properties" : {
- "id" : {
- "type" : "string",
- "description" : "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n"
- },
- "virtualLinkDescId" : {
- "type" : "string",
- "description" : "An identifier that is unique within a VNF descriptor.\n"
- },
- "changeType" : {
- "type" : "string",
- "description" : "Signals the type of change. Permitted values: * ADDED * REMOVED * MODIFIED * TEMPORARY * LINK_PORT_ADDED * LINK_PORT_REMOVED For a temporary resource, an AffectedVirtualLink structure exists as long as the temporary resource exists.\n",
- "enum" : [ "ADDED", "REMOVED", "MODIFIED", "TEMPORARY", "LINK_PORT_ADDED", "LINK_PORT_REMOVED" ]
- },
- "networkResource" : {
- "$ref" : "#/definitions/lcnVnfLcmOperationOccurrenceNotification_computeResource"
- },
- "metadata" : {
- "type" : "object",
- "description" : "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159. \n",
- "properties" : { }
- }
- },
- "description" : "This type provides information about added, deleted, modified and temporary VLs.\n",
- "example" : {
- "metadata" : "{}",
- "networkResource" : {
- "resourceId" : "resourceId",
- "vimConnectionId" : "vimConnectionId",
- "vimLevelResourceType" : "vimLevelResourceType",
- "resourceProviderId" : "resourceProviderId"
- },
- "changeType" : "ADDED",
- "virtualLinkDescId" : "virtualLinkDescId",
- "id" : "id"
- }
- }
- },
- "externalDocs" : {
- "description" : "ETSI GS NFV-SOL 003 V2.4.1",
- "url" : "http://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/003/02.04.01_60/gs_NFV-SOL003v020401p.pdf"
- }
-} \ No newline at end of file
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-api/src/main/resources/SOL003-VNFLifecycleOperationGranting-API.json b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-api/src/main/resources/SOL003-VNFLifecycleOperationGranting-API.json
deleted file mode 100644
index aab56ee2af..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-api/src/main/resources/SOL003-VNFLifecycleOperationGranting-API.json
+++ /dev/null
@@ -1,2774 +0,0 @@
-{
- "swagger": "2.0",
- "info": {
- "version": "1.1.1",
- "title": "SOL003 - VNF Lifecycle Operation Granting interface",
- "description": "SOL003 - VNF Lifecycle Operation Granting interface\n\nIMPORTANT: Please note that this file might be not aligned to the current version of the ETSI Group Specification it refers to. In case of discrepancies the published ETSI Group Specification takes precedence.\n\nIn clause 4.3.2 of ETSI GS NFV-SOL 003 v2.4.1, an attribute-based filtering mechanism is defined. This mechanism is currently not included in the corresponding OpenAPI design for this GS version. Changes to the attribute-based filtering mechanism are being considered in v2.5.1 of this GS for inclusion in the corresponding future ETSI NFV OpenAPI design.\nPlease report bugs to https://forge.etsi.org/bugzilla/buglist.cgi?component=Nfv-Openapis&list_id=61&product=NFV&resolution=\n",
- "license": {
- "name": "ETSI Forge copyright notice",
- "url": "https://forge.etsi.org/etsi-forge-copyright-notice.txt"
- }
- },
- "externalDocs": {
- "description": "ETSI GS NFV-SOL 003 V2.4.1",
- "url": "http://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/003/02.04.01_60/gs_NFV-SOL003v020401p.pdf"
- },
- "basePath": "/grant/v1",
- "schemes": [
- "https"
- ],
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "paths": {
- "/grants": {
- "post": {
- "description": "Grant Lifecycle Operation\n\nThe POST method requests a grant for a particular VNF lifecycle operation.\n",
- "parameters": [
- {
- "name": "GrantRequest",
- "in": "body",
- "required": true,
- "schema": {
- "description": "This type represents a grant request.\n",
- "type": "object",
- "required": [
- "vnfInstanceId",
- "vnfLcmOpOccId",
- "vnfdId",
- "operation",
- "isAutomaticInvocation",
- "_links"
- ],
- "properties": {
- "vnfInstanceId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vnfLcmOpOccId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vnfdId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "flavourId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "operation": {
- "description": "Value | Description ------|------------ INSTANTIATE | Represents the \"Instantiate VNF\" LCM operation. SCALE | Represents the \"Scale VNF\" LCM operation. SCALE_TO_LEVEL | Represents the \"Scale VNF to Level\" LCM operation. CHANGE_FLAVOUR | Represents the \"Change VNF Flavour\" LCM operation. TERMINATE | Represents the \"Terminate VNF\" LCM operation. HEAL | Represents the \"Heal VNF\" LCM operation. OPERATE | Represents the \"Operate VNF\" LCM operation. CHANGE_EXT_CONN | Represents the \"Change external VNF connectivity\" LCM operation. MODIFY_INFO | Represents the \"Modify VNF Information\" LCM operation.\n",
- "type": "string",
- "enum": [
- "INSTANTIATE",
- "SCALE",
- "SCALE_TO_LEVEL",
- "CHANGE_FLAVOUR",
- "TERMINATE",
- "HEAL",
- "OPERATE",
- "CHANGE_EXT_CONN",
- "MODIFY_INFO"
- ]
- },
- "isAutomaticInvocation": {
- "description": "Set to true if this VNF LCM operation occurrence has been triggered by an automated procedure inside the VNFM (i.e. ScaleVnf / ScaleVnfToLevel triggered by auto-scale, or HealVnf triggered by auto-heal). Set to false otherwise.\n",
- "type": "boolean"
- },
- "instantiationLevelId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "addResources": {
- "description": "List of resource definitions in the VNFD for resources to be added by the LCM operation which is related to this grant request, with one entry per resource. If the granting request is for InstantiateVNF, either instantiationLevel or addResources shall be present.\n",
- "type": "array",
- "items": {
- "description": "This type provides information of an existing or proposed resource used by the VNF.\n",
- "type": "object",
- "required": [
- "id",
- "type"
- ],
- "properties": {
- "id": {
- "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
- "type": "string"
- },
- "type": {
- "description": "Type of the resource definition referenced. Permitted values: * COMPUTE * VL * STORAGE * LINKPORT\n",
- "type": "string",
- "enum": [
- "COMPUTE",
- "VL",
- "STORAGE",
- "LINKPORT"
- ]
- },
- "vduId": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "resourceTemplateId": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "resource": {
- "required": [
- "vimConnectionId",
- "resourceId"
- ],
- "type": "object",
- "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance. Information about the resource is available from the VIM.\n",
- "properties": {
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "vimLevelResourceType": {
- "description": "Type of the resource in the scope of the VIM or the resource provider.\n",
- "type": "string"
- }
- }
- }
- }
- }
- },
- "tempResources": {
- "description": "List of resource definitions in the VNFD for resources to be temporarily instantiated during the runtime of the LCM operation which is related to this grant request, with one entry per resource. The NFVO will assume that the VNFM will be responsible to both allocate and release the temporary resource during the runtime of the LCM operation. This means, the resource can be allocated and consumed after the \"start\" notification for the LCM operation is sent by the VNFM, and the resource will be released before the \"result\" notification of the VNF LCM operation is sent by the VNFM.\n",
- "type": "array",
- "items": {
- "description": "This type provides information of an existing or proposed resource used by the VNF.\n",
- "type": "object",
- "required": [
- "id",
- "type"
- ],
- "properties": {
- "id": {
- "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
- "type": "string"
- },
- "type": {
- "description": "Type of the resource definition referenced. Permitted values: * COMPUTE * VL * STORAGE * LINKPORT\n",
- "type": "string",
- "enum": [
- "COMPUTE",
- "VL",
- "STORAGE",
- "LINKPORT"
- ]
- },
- "vduId": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "resourceTemplateId": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "resource": {
- "required": [
- "vimConnectionId",
- "resourceId"
- ],
- "type": "object",
- "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance. Information about the resource is available from the VIM.\n",
- "properties": {
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "vimLevelResourceType": {
- "description": "Type of the resource in the scope of the VIM or the resource provider.\n",
- "type": "string"
- }
- }
- }
- }
- }
- },
- "removeResources": {
- "description": "Provides the definitions of resources to be removed by the LCM operation which is related to this grant request, with one entry per resource.\n",
- "type": "array",
- "items": {
- "description": "This type provides information of an existing or proposed resource used by the VNF.\n",
- "type": "object",
- "required": [
- "id",
- "type"
- ],
- "properties": {
- "id": {
- "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
- "type": "string"
- },
- "type": {
- "description": "Type of the resource definition referenced. Permitted values: * COMPUTE * VL * STORAGE * LINKPORT\n",
- "type": "string",
- "enum": [
- "COMPUTE",
- "VL",
- "STORAGE",
- "LINKPORT"
- ]
- },
- "vduId": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "resourceTemplateId": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "resource": {
- "required": [
- "vimConnectionId",
- "resourceId"
- ],
- "type": "object",
- "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance. Information about the resource is available from the VIM.\n",
- "properties": {
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "vimLevelResourceType": {
- "description": "Type of the resource in the scope of the VIM or the resource provider.\n",
- "type": "string"
- }
- }
- }
- }
- }
- },
- "updateResources": {
- "description": "Provides the definitions of resources to be modified by the LCM operation which is related to this grant request, with one entry per resource.\n",
- "type": "array",
- "items": {
- "description": "This type provides information of an existing or proposed resource used by the VNF.\n",
- "type": "object",
- "required": [
- "id",
- "type"
- ],
- "properties": {
- "id": {
- "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
- "type": "string"
- },
- "type": {
- "description": "Type of the resource definition referenced. Permitted values: * COMPUTE * VL * STORAGE * LINKPORT\n",
- "type": "string",
- "enum": [
- "COMPUTE",
- "VL",
- "STORAGE",
- "LINKPORT"
- ]
- },
- "vduId": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "resourceTemplateId": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "resource": {
- "required": [
- "vimConnectionId",
- "resourceId"
- ],
- "type": "object",
- "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance. Information about the resource is available from the VIM.\n",
- "properties": {
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "vimLevelResourceType": {
- "description": "Type of the resource in the scope of the VIM or the resource provider.\n",
- "type": "string"
- }
- }
- }
- }
- }
- },
- "placementConstraints": {
- "description": "Placement constraints that the VNFM may send to the NFVO in order to influence the resource placement decision. If sent, the NFVO shall take the constraints into consideration when making resource placement decisions, and shall reject the grant if they cannot be honoured. The affinity/anti-affinity rules defined in the VNFD , and the placement constraints in the GrantVnfLifecycleOperation as defined in this clause should be conflict-free. In case of conflicts, the placement constraints in the GrantVnfLifecycleOperation shall take precedence. Passing constraints allows the VNFM or the lifecycle management scripts to influence resource placement decisions by the NFVO to ensure VNF properties such as performance or fault tolerance.\n",
- "type": "array",
- "items": {
- "description": "This type provides information regarding a resource placement constraint. A set of such constraints may be sent by the VNFM to the NFVO to influence the resource placement decisions made by the NFVO as part of the granting process. A placement constraint defines a condition to the placement of new resources, considering other new resources as well as existing resources. EXAMPLE: The following rules influence the placement of a set of resources such that they are placed in the same Network Function Virtualisation Infrastructure Point of Presence (NFVI-PoP) but in different resource zones: {type=\"affinity\"; scope=\"NFVI_POP\"; {resource1,resource2}} {type=\"anti-affinity\"; scope=\"ZONE\"; {resource1,resource2}}\n",
- "type": "object",
- "required": [
- "affinityOrAntiAffinity",
- "scope",
- "resource"
- ],
- "properties": {
- "affinityOrAntiAffinity": {
- "description": "The type of the constraint. Permitted values: * AFFINITY * ANTI_AFFINITY\n",
- "type": "string",
- "enum": [
- "AFFINITY",
- "ANTI_AFFINITY"
- ]
- },
- "scope": {
- "description": "The scope of the placement constraint indicating the category of the \"place\" where the constraint applies. Permitted values: * NFVI_POP * ZONE * ZONE_GROUP * NFVI_NODE\n",
- "type": "string",
- "enum": [
- "NFVI_POP",
- "ZONE",
- "ZONE_GROUP",
- "NFVI_NODE"
- ]
- },
- "resource": {
- "description": "References to resources in the constraint rule.\n",
- "type": "array",
- "items": {
- "description": "This type references a resource either by its VIM-level identifier for existing resources, or by the identifier of a \"ResourceDefinition\" structure in the \"GrantRequest\" structure for new resources.\n",
- "type": "object",
- "required": [
- "idType",
- "resourceId"
- ],
- "properties": {
- "idType": {
- "description": "The type of the identifier. Permitted values: * RES_MGMT: Resource-management-level identifier; this identifier is managed by the VIM in the direct mode of VNF-related resource\n management, and is managed by the NFVO in the indirect mode)\n* GRANT: Reference to the identifier of a \"ResourceDefinition\" structure in the \"GrantRequest\" structure.\n",
- "type": "string",
- "enum": [
- "RES_MGMT",
- "GRANT"
- ]
- },
- "resourceId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "vimConstraints": {
- "description": "Used by the VNFM to require that multiple resources are managed through the same VIM connection. If sent, the NFVO shall take the constraints into consideration when making VIM selection decisions, and shall reject the grant if they cannot be honoured. This attribute shall be supported if VNF-related Resource Management in direct mode is applicable. The applicability and further details of this attribute for indirect mode are left for future specification.\n",
- "type": "array",
- "items": {
- "description": "This type provides information regarding a VIM selection constraint. A set of such constraints may be sent by the VNFM to the NFVO to influence the VIM selection decisions made by the NFVO as part of the granting process.\n",
- "type": "object",
- "required": [
- "resource"
- ],
- "properties": {
- "sameResourceGroup": {
- "description": "If present and set to true, this signals that the constraint applies not only to the same VIM connection, but also to the same infrastructure resource group.\n",
- "type": "boolean"
- },
- "resource": {
- "description": "References to resources in the constraint rule. The NFVO shall ensure that all resources in this list are managed through the same VIM connection. If \"sameResourceGroup\" is set to true, the NFVO shall further ensure that all resources in this list are part of the same infrastructure resource group in that VIM connection.\n",
- "type": "array",
- "items": {
- "description": "This type references a resource either by its VIM-level identifier for existing resources, or by the identifier of a \"ResourceDefinition\" structure in the \"GrantRequest\" structure for new resources.\n",
- "type": "object",
- "required": [
- "idType",
- "resourceId"
- ],
- "properties": {
- "idType": {
- "description": "The type of the identifier. Permitted values: * RES_MGMT: Resource-management-level identifier; this identifier is managed by the VIM in the direct mode of VNF-related resource\n management, and is managed by the NFVO in the indirect mode)\n* GRANT: Reference to the identifier of a \"ResourceDefinition\" structure in the \"GrantRequest\" structure.\n",
- "type": "string",
- "enum": [
- "RES_MGMT",
- "GRANT"
- ]
- },
- "resourceId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "additionalParams": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- },
- "_links": {
- "description": "Links to resources related to this request.\n",
- "type": "object",
- "required": [
- "vnfLcmOpOcc",
- "vnfInstance"
- ],
- "properties": {
- "vnfLcmOpOcc": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": [
- "href"
- ],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- },
- "vnfInstance": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": [
- "href"
- ],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- }
- }
- }
- }
- }
- },
- {
- "name": "Accept",
- "description": "Content-Types that are acceptable for the response. Reference: IETF RFC 7231\n",
- "in": "header",
- "required": true,
- "type": "string"
- },
- {
- "name": "Content-Type",
- "description": "The MIME type of the body of the request. Reference: IETF RFC 7231\n",
- "in": "header",
- "required": true,
- "type": "string"
- },
- {
- "name": "Authorization",
- "description": "The authorization token for the request. Reference: IETF RFC 7235\n",
- "in": "header",
- "required": false,
- "type": "string"
- }
- ],
- "responses": {
- "201": {
- "description": "Created\nThe grant was created successfully (synchronous mode). A representation of the created \"Individual grant\" resource shall be returned in the response body. The HTTP response shall include a \"Location\" HTTP header that indicates the URI of the \"Individual grant\" resource just created.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "Location": {
- "description": "The resource URI of the created VNF instance",
- "type": "string",
- "format": "url"
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "This type represents a grant.\n",
- "type": "object",
- "required": [
- "id",
- "vnfInstanceId",
- "vnfLcmOpOccId",
- "_links"
- ],
- "properties": {
- "id": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vnfInstanceId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vnfLcmOpOccId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vimConnections": {
- "description": "Provides information regarding VIM connections that are approved to be used by the VNFM to allocate resources, and provides parameters of these VIM connections. The VNFM shall update the \" vimConnectionInfo\" attribute of the \"VnfInstance\" structure by adding unknown entries received in this attribute. This attribute is not intended for the modification of VimConnection entries passed earlier; for that, the VnfInfoModificationRequest structure shall be used. This attribute shall only be supported when VNF-related Resource Management in direct mode is applicable. In direct mode, this parameter shall be absent if the VIM information was configured to the VNFM in another way, present otherwise. This interface allows to signal the use of multiple VIMs per VNF. However, due to the partial support of this feature in the present release, it is recommended in the present document that the number of entries in the \"vims\" attribute in the Grant is not greater than 1.\n",
- "type": "array",
- "items": {
- "description": "This type represents parameters to connect to a VIM for managing the resources of a VNF instance. This structure is used to convey VIM-related parameters over the Or-Vnfm interface. Additional parameters for a VIM may be configured into the VNFM by means outside the scope of the present document, and bound to the identifier of that VIM.\n",
- "type": "object",
- "required": [
- "id",
- "vimType"
- ],
- "properties": {
- "id": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vimId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vimType": {
- "description": "Discriminator for the different types of the VIM information. The value of this attribute determines the structure of the \"interfaceInfo\" and \"accessInfo\" attributes, based on the type of the VIM. The set of permitted values is expected to change over time as new types or versions of VIMs become available. The ETSI NFV registry of VIM-related information provides access to information about VimConnectionInfo definitions for various VIM types. The structure of the registry is defined in Annex C of SOL003.\n",
- "type": "string"
- },
- "interfaceInfo": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- },
- "accessInfo": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- },
- "extra": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- }
- }
- }
- },
- "zones": {
- "description": "Identifies resource zones where the resources are approved to be allocated by the VNFM.\n",
- "type": "array",
- "items": {
- "description": "This type provides information regarding a resource zone.\n",
- "type": "object",
- "required": [
- "id",
- "zoneId"
- ],
- "properties": {
- "id": {
- "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
- "type": "string"
- },
- "zoneId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- }
- }
- }
- },
- "zoneGroups": {
- "description": "Information about groups of resource zones that are related and that the NFVO has chosen to fulfil a zoneGroup constraint in the GrantVnfLifecycleOperation request. This information confirms that the NFVO has honoured the zoneGroup constraints that were passed as part of \"placementConstraints\" in the GrantRequest.\n",
- "type": "array",
- "items": {
- "description": "This type provides information regarding a resource zone group. A resource zone group is a group of one or more related resource zones which can be used in resource placement constraints. To fulfil such constraint, the NFVO may decide to place a resource into any zone that belongs to a particular group. NOTE: A resource zone group can be used to support overflow from one resource zone into another, in case a particular deployment supports only non-elastic resource zones.\n",
- "type": "object",
- "required": [
- "zoneId"
- ],
- "properties": {
- "zoneId": {
- "description": "References of identifiers of \"ZoneInfo\" structures, each of which provides information about a resource zone that belongs to this group.\n",
- "type": "array",
- "items": {
- "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
- "type": "string"
- }
- }
- }
- }
- },
- "computeReservationId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "networkReservationId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "storageReservationId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "addResources": {
- "description": "List of resources that are approved to be added, with one entry per resource.\n",
- "type": "array",
- "items": {
- "description": "This type contains information about a Compute, storage or network resource whose addition/update/deletion was granted.\n",
- "type": "object",
- "required": [
- "resourceDefinitionId"
- ],
- "properties": {
- "resourceDefinitionId": {
- "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
- "type": "string"
- },
- "reservationId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "zoneId": {
- "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
- "type": "string"
- },
- "resourceGroupId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- }
- }
- }
- },
- "tempResources": {
- "description": "List of resources that are approved to be temporarily instantiated during the runtime of the lifecycle operation, with one entry per resource.\n",
- "type": "array",
- "items": {
- "description": "This type contains information about a Compute, storage or network resource whose addition/update/deletion was granted.\n",
- "type": "object",
- "required": [
- "resourceDefinitionId"
- ],
- "properties": {
- "resourceDefinitionId": {
- "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
- "type": "string"
- },
- "reservationId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "zoneId": {
- "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
- "type": "string"
- },
- "resourceGroupId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- }
- }
- }
- },
- "removeResources": {
- "description": "List of resources that are approved to be removed, with one entry per resource.\n",
- "type": "array",
- "items": {
- "description": "This type contains information about a Compute, storage or network resource whose addition/update/deletion was granted.\n",
- "type": "object",
- "required": [
- "resourceDefinitionId"
- ],
- "properties": {
- "resourceDefinitionId": {
- "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
- "type": "string"
- },
- "reservationId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "zoneId": {
- "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
- "type": "string"
- },
- "resourceGroupId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- }
- }
- }
- },
- "updateResources": {
- "description": "List of resources that are approved to be modified, with one entry per resource.\n",
- "type": "array",
- "items": {
- "description": "This type contains information about a Compute, storage or network resource whose addition/update/deletion was granted.\n",
- "type": "object",
- "required": [
- "resourceDefinitionId"
- ],
- "properties": {
- "resourceDefinitionId": {
- "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
- "type": "string"
- },
- "reservationId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "zoneId": {
- "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
- "type": "string"
- },
- "resourceGroupId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- }
- }
- }
- },
- "vimAssets": {
- "description": "Information about assets for the VNF that are managed by the NFVO in the VIM, such as software images and virtualised compute resource flavours. This attribute is not intended for the modification of vimAssets entries passed earlier. Modification of VIM assets during the lifetime of a VNF instance is not necessary, since it is expected that all applicable assets have been on boarded into the VIM before the VNF is instantiated.\n",
- "type": "object",
- "properties": {
- "computeResourceFlavours": {
- "description": "Mappings between virtual compute descriptors defined in the VNFD and compute resource flavours managed in the VIM.\n",
- "type": "array",
- "items": {
- "description": "If the VIM requires the use of virtual compute resource flavours during compute resource instantiation, it is assumed that such flavours are selected or created by the NFVO based on the information in the virtual compute descriptor defined in the VNFD. This type defines the mapping between a virtual compute descriptor in the VNFD and the corresponding compute resource flavour managed by the NFVO in the VIM.\n",
- "type": "object",
- "required": [
- "vnfdVirtualComputeDescId",
- "vimFlavourId"
- ],
- "properties": {
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vnfdVirtualComputeDescId": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "vimFlavourId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- }
- }
- }
- },
- "softwareImages": {
- "description": "Mappings between software images defined in the VNFD and software images managed in the VIM.\n",
- "type": "array",
- "items": {
- "description": "This type contains a mapping between a software image definition the VNFD and the corresponding software image managed by the NFVO in the VIM which is needed during compute resource instantiation.\n",
- "type": "object",
- "required": [
- "vnfdSoftwareImageId",
- "vimSoftwareImageId"
- ],
- "properties": {
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vnfdSoftwareImageId": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "vimSoftwareImageId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- }
- }
- }
- }
- }
- },
- "extVirtualLinks": {
- "description": "Information about external VLs to connect the VNF to. External and/or externally-managed internal VLs can be passed in VNF lifecycle management operation requests such as InstantiateVnf or ChangeVnfFlavor, and/or in the grant response. The NFVO may choose to override in the grant response external and/or externally-managed VL instances that have been passed previously in the associated VNF lifecycle management request, if the lifecycle management request has originated from the NFVO itself.\n",
- "type": "array",
- "items": {
- "description": "This type represents an external VL.\n",
- "type": "object",
- "required": [
- "id",
- "resourceId",
- "extCps"
- ],
- "properties": {
- "id": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "extCps": {
- "description": "External CPs of the VNF to be connected to this external VL.\n",
- "type": "array",
- "items": {
- "description": "This type represents configuration information for external CPs created from a CPD.\n",
- "type": "object",
- "required": [
- "cpdId"
- ],
- "properties": {
- "cpdId": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "cpConfig": {
- "description": "List of instance data that need to be configured on the CP instances created from the respective CPD.\n",
- "type": "array",
- "items": {
- "description": "This type represents an externally provided link port or network address information per instance of an external connection point. In case a link port is provided, the VNFM shall use that link port when connecting the external CP to the external VL. In a link port is not provided, the VNFM shall create a link port on the external VL, and use that link port to connect the external CP to the external VL.\n",
- "type": "object",
- "properties": {
- "cpInstanceId": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- },
- "linkPortId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "cpProtocolData": {
- "description": "Parameters for configuring the network protocols on the link port that connects the CP to a VL. The following conditions apply to the attributes \"linkPortId\" and \"cpProtocolData\": * The \"linkPortId\" and \"cpProtocolData\" attributes shall both be absent for the deletion of an existing external CP instance\n addressed by cpInstanceId. \n* At least one of these attributes shall be present for a to-be-created external CP instance or an existing external\n CP instance.\n* If the \"linkPortId\" attribute is absent, the VNFM shall create a link port.\n* If the \"cpProtocolData\" attribute is absent, the \"linkPortId\" attribute shall be provided referencing a pre-created link port,\n and the VNFM can use means outside the scope of the present\n document to obtain the pre-configured address information for the\n connection point from the resource representing the link port.\n* If both \"cpProtocolData\" and \"linkportId\" are provided, the API consumer shall ensure that the cpProtocolData can be used with the\n pre-created link port referenced by \"linkPortId\".\n",
- "type": "array",
- "items": {
- "description": "This type represents network protocol data.\n",
- "type": "object",
- "required": [
- "layerProtocol"
- ],
- "properties": {
- "layerProtocol": {
- "description": "Identifier of layer(s) and protocol(s). This attribute allows to signal the addition of further types of layer and protocol in future versions of the present document in a backwards-compatible way. In the current version of the present document, only IP over Ethernet is supported.\n",
- "type": "string",
- "enum": [
- "IP_OVER_ETHERNET"
- ]
- },
- "ipOverEthernet": {
- "description": "This type represents network address data for IP over Ethernet.\n",
- "type": "object",
- "properties": {
- "macAddress": {
- "description": "A MAC address. Representation: string that consists of groups of two hexadecimal digits, separated by hyphens or colons.\n",
- "type": "string",
- "format": "MAC"
- },
- "ipAddresses": {
- "description": "List of IP addresses to assign to the CP instance. Each entry represents IP address data for fixed or dynamic IP address assignment per subnet. If this attribute is not present, no IP address shall be assigned.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "type"
- ],
- "properties": {
- "type": {
- "description": "The type of the IP addresses. Permitted values: IPV4, IPV6.\n",
- "type": "string",
- "enum": [
- "IPV4",
- "IPV6"
- ]
- },
- "fixedAddresses": {
- "description": "Fixed addresses to assign (from the subnet defined by \"subnetId\" if provided). Exactly one of \"fixedAddresses\", \"numDynamicAddresses\" or \"ipAddressRange\" shall be present.\n",
- "type": "array",
- "items": {
- "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n",
- "type": "string",
- "format": "IP"
- }
- },
- "numDynamicAddresses": {
- "description": "Number of dynamic addresses to assign (from the subnet defined by \"subnetId\" if provided). Exactly one of \"fixedAddresses\", \"numDynamicAddresses\" or \"ipAddressRange\" shall be present.\n",
- "type": "integer"
- },
- "addressRange": {
- "description": "An IP address range to be used, e.g. in case of egress connections. In case this attribute is present, IP addresses from the range will be used.\n",
- "type": "object",
- "required": [
- "minAddress",
- "maxAddress"
- ],
- "properties": {
- "minAddress": {
- "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n",
- "type": "string",
- "format": "IP"
- },
- "maxAddress": {
- "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n",
- "type": "string",
- "format": "IP"
- }
- }
- },
- "subnetId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "extLinkPorts": {
- "description": "Externally provided link ports to be used to connect external connection points to this external VL. If this attribute is not present, the VNFM shall create the link ports on the external VL.\n",
- "type": "array",
- "items": {
- "description": "This type represents an externally provided link port to be used to connect an external connection point to an external VL.\n",
- "type": "object",
- "required": [
- "id",
- "resourceHandle"
- ],
- "properties": {
- "id": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceHandle": {
- "required": [
- "vimConnectionId",
- "resourceId"
- ],
- "type": "object",
- "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance. Information about the resource is available from the VIM.\n",
- "properties": {
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "vimLevelResourceType": {
- "description": "Type of the resource in the scope of the VIM or the resource provider.\n",
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "extManagedVirtualLinks": {
- "description": "Information about internal VLs that are managed by other entities than the VNFM. The indication of externally-managed internal VLs is needed in case networks have been pre-configured for use with certain VNFs, for instance to ensure that these networks have certain properties such as security or acceleration features, or to address particular network topologies. The present document assumes that externally-managed internal VLs are managed by the NFVO and created towards the VIM. External and/or externally-managed internal VLs can be passed in VNF lifecycle management operation requests such as InstantiateVnf or ChangeVnfFlavor, and/or in the grant response. The NFVO may choose to override in the grant response external and/or externally-managed VL instances that have been passed previously in the associated VNF lifecycle management request, if the lifecycle management request has originated from the NFVO itself.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "id",
- "virtualLinkDescId",
- "resourceId"
- ],
- "properties": {
- "id": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "virtualLinkDescId": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- }
- }
- }
- },
- "additionalParams": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- },
- "_links": {
- "description": "Links to resources related to this resource.\n",
- "type": "object",
- "required": [
- "self",
- "vnfLcmOpOcc",
- "vnfInstance"
- ],
- "properties": {
- "self": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": [
- "href"
- ],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- },
- "vnfLcmOpOcc": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": [
- "href"
- ],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- },
- "vnfInstance": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": [
- "href"
- ],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- }
- }
- }
- }
- }
- },
- "202": {
- "description": "Accepted\nThe request was accepted for processing, but the processing has not been completed. It is expected to take some time to create the grant (asynchronous mode). The response body shall be empty. The HTTP response shall include a \"Location\" HTTP header that indicates the URI of the \"Individual grant\" resource that will be created once the granting decision has been made.\n",
- "headers": {
- "Location": {
- "description": "The resource URI of the created VNF instance",
- "type": "string",
- "format": "url"
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- }
- },
- "400": {
- "description": "Bad Request\nIf the request is malformed or syntactically incorrect (e.g. if the request URI contains incorrect query parameters or a syntactically incorrect payload body), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem.\n ---\n\nIf the request contains a malformed access token, the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n ---\n\nIf there is an application error related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond with this response code.The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "401": {
- "description": "Unauthorized\nIf the request contains no access token even though one is required, or if the request contains an authorization token that is invalid (e.g. expired or revoked), the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "403": {
- "description": "Forbidden\nThe grant was rejected. A ProblemDetails structure shall be included in the response to provide more details about the rejection in the \"details\" attribute.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "404": {
- "description": "Not Found\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request, or is not willing to disclose that one exists, it shall respond with this response code. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the source of the problem, e.g. a wrong resource URI variable.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "405": {
- "description": "Method Not Allowed\nIf a particular HTTP method is not supported for a particular resource, the API producer shall respond with this response code. The \"ProblemDetails\" structure may be omitted in that case.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "406": {
- "description": "Not Acceptable\nIf the \"Accept\" HTTP header does not contain at least one name of a content type that is acceptable to the API producer, the API producer shall respond with this response code. The \"ProblemDetails\" structure may be omitted in that case.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "416": {
- "description": "Requested Range Not Satisfiable\nThis code is returned if the requested byte range in the Range HTTP header is not present in the requested resource.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "422": {
- "description": "Unprocessable Entity\nIf the payload body of a request contains syntactically correct data (e.g. well-formed JSON) but the data cannot be processed (e.g. because it fails validation against a schema), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem. NOTE 2: This error response code is only applicable for methods that have a request body.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "500": {
- "description": "Internal Server Error\nIf there is an application error not related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond withthis response code. The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "503": {
- "description": "Service Unavailable\nIf the API producer encounters an internal overload situation of itself or of a system it relies on, it should respond with this response code, following the provisions in IETF RFC 7231 [13] for the use of the \"Retry-After\" HTTP header and for the alternative to refuse the connection. The \"ProblemDetails\" structure may be omitted.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- }
- }
- }
- },
- "/grants/{grantId}": {
- "parameters": [
- {
- "name": "grantId",
- "description": "Identifier of the grant. This identifier can be retrieved from the resource referenced by the \"Location\" HTTP header in the response to a POST request granting a new VNF lifecycle operation. It can also be retrieved from the \"id\" attribute in the payload body of that response.\n",
- "in": "path",
- "type": "string",
- "required": true
- }
- ],
- "get": {
- "description": "Grant Lifecycle Operation\n\nThe GET method retrieves information about a specific grant by reading an individual grant resource.\n",
- "parameters": [
- {
- "name": "Accept",
- "description": "Content-Types that are acceptable for the response. Reference: IETF RFC 7231\n",
- "in": "header",
- "required": true,
- "type": "string"
- },
- {
- "name": "Authorization",
- "description": "The authorization token for the request. Reference: IETF RFC 7235\n",
- "in": "header",
- "required": false,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK\nThe grant was read successfully. A representation of the \"individual grant\" resource shall be returned in the response body.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "This type represents a grant.\n",
- "type": "object",
- "required": [
- "id",
- "vnfInstanceId",
- "vnfLcmOpOccId",
- "_links"
- ],
- "properties": {
- "id": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vnfInstanceId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vnfLcmOpOccId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vimConnections": {
- "description": "Provides information regarding VIM connections that are approved to be used by the VNFM to allocate resources, and provides parameters of these VIM connections. The VNFM shall update the \" vimConnectionInfo\" attribute of the \"VnfInstance\" structure by adding unknown entries received in this attribute. This attribute is not intended for the modification of VimConnection entries passed earlier; for that, the VnfInfoModificationRequest structure shall be used. This attribute shall only be supported when VNF-related Resource Management in direct mode is applicable. In direct mode, this parameter shall be absent if the VIM information was configured to the VNFM in another way, present otherwise. This interface allows to signal the use of multiple VIMs per VNF. However, due to the partial support of this feature in the present release, it is recommended in the present document that the number of entries in the \"vims\" attribute in the Grant is not greater than 1.\n",
- "type": "array",
- "items": {
- "description": "This type represents parameters to connect to a VIM for managing the resources of a VNF instance. This structure is used to convey VIM-related parameters over the Or-Vnfm interface. Additional parameters for a VIM may be configured into the VNFM by means outside the scope of the present document, and bound to the identifier of that VIM.\n",
- "type": "object",
- "required": [
- "id",
- "vimType"
- ],
- "properties": {
- "id": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vimId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vimType": {
- "description": "Discriminator for the different types of the VIM information. The value of this attribute determines the structure of the \"interfaceInfo\" and \"accessInfo\" attributes, based on the type of the VIM. The set of permitted values is expected to change over time as new types or versions of VIMs become available. The ETSI NFV registry of VIM-related information provides access to information about VimConnectionInfo definitions for various VIM types. The structure of the registry is defined in Annex C of SOL003.\n",
- "type": "string"
- },
- "interfaceInfo": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- },
- "accessInfo": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- },
- "extra": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- }
- }
- }
- },
- "zones": {
- "description": "Identifies resource zones where the resources are approved to be allocated by the VNFM.\n",
- "type": "array",
- "items": {
- "description": "This type provides information regarding a resource zone.\n",
- "type": "object",
- "required": [
- "id",
- "zoneId"
- ],
- "properties": {
- "id": {
- "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
- "type": "string"
- },
- "zoneId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- }
- }
- }
- },
- "zoneGroups": {
- "description": "Information about groups of resource zones that are related and that the NFVO has chosen to fulfil a zoneGroup constraint in the GrantVnfLifecycleOperation request. This information confirms that the NFVO has honoured the zoneGroup constraints that were passed as part of \"placementConstraints\" in the GrantRequest.\n",
- "type": "array",
- "items": {
- "description": "This type provides information regarding a resource zone group. A resource zone group is a group of one or more related resource zones which can be used in resource placement constraints. To fulfil such constraint, the NFVO may decide to place a resource into any zone that belongs to a particular group. NOTE: A resource zone group can be used to support overflow from one resource zone into another, in case a particular deployment supports only non-elastic resource zones.\n",
- "type": "object",
- "required": [
- "zoneId"
- ],
- "properties": {
- "zoneId": {
- "description": "References of identifiers of \"ZoneInfo\" structures, each of which provides information about a resource zone that belongs to this group.\n",
- "type": "array",
- "items": {
- "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
- "type": "string"
- }
- }
- }
- }
- },
- "computeReservationId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "networkReservationId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "storageReservationId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "addResources": {
- "description": "List of resources that are approved to be added, with one entry per resource.\n",
- "type": "array",
- "items": {
- "description": "This type contains information about a Compute, storage or network resource whose addition/update/deletion was granted.\n",
- "type": "object",
- "required": [
- "resourceDefinitionId"
- ],
- "properties": {
- "resourceDefinitionId": {
- "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
- "type": "string"
- },
- "reservationId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "zoneId": {
- "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
- "type": "string"
- },
- "resourceGroupId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- }
- }
- }
- },
- "tempResources": {
- "description": "List of resources that are approved to be temporarily instantiated during the runtime of the lifecycle operation, with one entry per resource.\n",
- "type": "array",
- "items": {
- "description": "This type contains information about a Compute, storage or network resource whose addition/update/deletion was granted.\n",
- "type": "object",
- "required": [
- "resourceDefinitionId"
- ],
- "properties": {
- "resourceDefinitionId": {
- "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
- "type": "string"
- },
- "reservationId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "zoneId": {
- "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
- "type": "string"
- },
- "resourceGroupId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- }
- }
- }
- },
- "removeResources": {
- "description": "List of resources that are approved to be removed, with one entry per resource.\n",
- "type": "array",
- "items": {
- "description": "This type contains information about a Compute, storage or network resource whose addition/update/deletion was granted.\n",
- "type": "object",
- "required": [
- "resourceDefinitionId"
- ],
- "properties": {
- "resourceDefinitionId": {
- "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
- "type": "string"
- },
- "reservationId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "zoneId": {
- "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
- "type": "string"
- },
- "resourceGroupId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- }
- }
- }
- },
- "updateResources": {
- "description": "List of resources that are approved to be modified, with one entry per resource.\n",
- "type": "array",
- "items": {
- "description": "This type contains information about a Compute, storage or network resource whose addition/update/deletion was granted.\n",
- "type": "object",
- "required": [
- "resourceDefinitionId"
- ],
- "properties": {
- "resourceDefinitionId": {
- "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
- "type": "string"
- },
- "reservationId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "zoneId": {
- "description": "An identifier that is unique within a limited local scope other than above listed identifiers, such as within a complex data structure or within a request-response pair. Representation: string of variable length.\n",
- "type": "string"
- },
- "resourceGroupId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- }
- }
- }
- },
- "vimAssets": {
- "description": "Information about assets for the VNF that are managed by the NFVO in the VIM, such as software images and virtualised compute resource flavours. This attribute is not intended for the modification of vimAssets entries passed earlier. Modification of VIM assets during the lifetime of a VNF instance is not necessary, since it is expected that all applicable assets have been on boarded into the VIM before the VNF is instantiated.\n",
- "type": "object",
- "properties": {
- "computeResourceFlavours": {
- "description": "Mappings between virtual compute descriptors defined in the VNFD and compute resource flavours managed in the VIM.\n",
- "type": "array",
- "items": {
- "description": "If the VIM requires the use of virtual compute resource flavours during compute resource instantiation, it is assumed that such flavours are selected or created by the NFVO based on the information in the virtual compute descriptor defined in the VNFD. This type defines the mapping between a virtual compute descriptor in the VNFD and the corresponding compute resource flavour managed by the NFVO in the VIM.\n",
- "type": "object",
- "required": [
- "vnfdVirtualComputeDescId",
- "vimFlavourId"
- ],
- "properties": {
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vnfdVirtualComputeDescId": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "vimFlavourId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- }
- }
- }
- },
- "softwareImages": {
- "description": "Mappings between software images defined in the VNFD and software images managed in the VIM.\n",
- "type": "array",
- "items": {
- "description": "This type contains a mapping between a software image definition the VNFD and the corresponding software image managed by the NFVO in the VIM which is needed during compute resource instantiation.\n",
- "type": "object",
- "required": [
- "vnfdSoftwareImageId",
- "vimSoftwareImageId"
- ],
- "properties": {
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vnfdSoftwareImageId": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "vimSoftwareImageId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- }
- }
- }
- }
- }
- },
- "extVirtualLinks": {
- "description": "Information about external VLs to connect the VNF to. External and/or externally-managed internal VLs can be passed in VNF lifecycle management operation requests such as InstantiateVnf or ChangeVnfFlavor, and/or in the grant response. The NFVO may choose to override in the grant response external and/or externally-managed VL instances that have been passed previously in the associated VNF lifecycle management request, if the lifecycle management request has originated from the NFVO itself.\n",
- "type": "array",
- "items": {
- "description": "This type represents an external VL.\n",
- "type": "object",
- "required": [
- "id",
- "resourceId",
- "extCps"
- ],
- "properties": {
- "id": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "extCps": {
- "description": "External CPs of the VNF to be connected to this external VL.\n",
- "type": "array",
- "items": {
- "description": "This type represents configuration information for external CPs created from a CPD.\n",
- "type": "object",
- "required": [
- "cpdId"
- ],
- "properties": {
- "cpdId": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "cpConfig": {
- "description": "List of instance data that need to be configured on the CP instances created from the respective CPD.\n",
- "type": "array",
- "items": {
- "description": "This type represents an externally provided link port or network address information per instance of an external connection point. In case a link port is provided, the VNFM shall use that link port when connecting the external CP to the external VL. In a link port is not provided, the VNFM shall create a link port on the external VL, and use that link port to connect the external CP to the external VL.\n",
- "type": "object",
- "properties": {
- "cpInstanceId": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- },
- "linkPortId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "cpProtocolData": {
- "description": "Parameters for configuring the network protocols on the link port that connects the CP to a VL. The following conditions apply to the attributes \"linkPortId\" and \"cpProtocolData\": * The \"linkPortId\" and \"cpProtocolData\" attributes shall both be absent for the deletion of an existing external CP instance\n addressed by cpInstanceId. \n* At least one of these attributes shall be present for a to-be-created external CP instance or an existing external\n CP instance.\n* If the \"linkPortId\" attribute is absent, the VNFM shall create a link port.\n* If the \"cpProtocolData\" attribute is absent, the \"linkPortId\" attribute shall be provided referencing a pre-created link port,\n and the VNFM can use means outside the scope of the present\n document to obtain the pre-configured address information for the\n connection point from the resource representing the link port.\n* If both \"cpProtocolData\" and \"linkportId\" are provided, the API consumer shall ensure that the cpProtocolData can be used with the\n pre-created link port referenced by \"linkPortId\".\n",
- "type": "array",
- "items": {
- "description": "This type represents network protocol data.\n",
- "type": "object",
- "required": [
- "layerProtocol"
- ],
- "properties": {
- "layerProtocol": {
- "description": "Identifier of layer(s) and protocol(s). This attribute allows to signal the addition of further types of layer and protocol in future versions of the present document in a backwards-compatible way. In the current version of the present document, only IP over Ethernet is supported.\n",
- "type": "string",
- "enum": [
- "IP_OVER_ETHERNET"
- ]
- },
- "ipOverEthernet": {
- "description": "This type represents network address data for IP over Ethernet.\n",
- "type": "object",
- "properties": {
- "macAddress": {
- "description": "A MAC address. Representation: string that consists of groups of two hexadecimal digits, separated by hyphens or colons.\n",
- "type": "string",
- "format": "MAC"
- },
- "ipAddresses": {
- "description": "List of IP addresses to assign to the CP instance. Each entry represents IP address data for fixed or dynamic IP address assignment per subnet. If this attribute is not present, no IP address shall be assigned.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "type"
- ],
- "properties": {
- "type": {
- "description": "The type of the IP addresses. Permitted values: IPV4, IPV6.\n",
- "type": "string",
- "enum": [
- "IPV4",
- "IPV6"
- ]
- },
- "fixedAddresses": {
- "description": "Fixed addresses to assign (from the subnet defined by \"subnetId\" if provided). Exactly one of \"fixedAddresses\", \"numDynamicAddresses\" or \"ipAddressRange\" shall be present.\n",
- "type": "array",
- "items": {
- "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n",
- "type": "string",
- "format": "IP"
- }
- },
- "numDynamicAddresses": {
- "description": "Number of dynamic addresses to assign (from the subnet defined by \"subnetId\" if provided). Exactly one of \"fixedAddresses\", \"numDynamicAddresses\" or \"ipAddressRange\" shall be present.\n",
- "type": "integer"
- },
- "addressRange": {
- "description": "An IP address range to be used, e.g. in case of egress connections. In case this attribute is present, IP addresses from the range will be used.\n",
- "type": "object",
- "required": [
- "minAddress",
- "maxAddress"
- ],
- "properties": {
- "minAddress": {
- "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n",
- "type": "string",
- "format": "IP"
- },
- "maxAddress": {
- "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n",
- "type": "string",
- "format": "IP"
- }
- }
- },
- "subnetId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "extLinkPorts": {
- "description": "Externally provided link ports to be used to connect external connection points to this external VL. If this attribute is not present, the VNFM shall create the link ports on the external VL.\n",
- "type": "array",
- "items": {
- "description": "This type represents an externally provided link port to be used to connect an external connection point to an external VL.\n",
- "type": "object",
- "required": [
- "id",
- "resourceHandle"
- ],
- "properties": {
- "id": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceHandle": {
- "required": [
- "vimConnectionId",
- "resourceId"
- ],
- "type": "object",
- "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance. Information about the resource is available from the VIM.\n",
- "properties": {
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "vimLevelResourceType": {
- "description": "Type of the resource in the scope of the VIM or the resource provider.\n",
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "extManagedVirtualLinks": {
- "description": "Information about internal VLs that are managed by other entities than the VNFM. The indication of externally-managed internal VLs is needed in case networks have been pre-configured for use with certain VNFs, for instance to ensure that these networks have certain properties such as security or acceleration features, or to address particular network topologies. The present document assumes that externally-managed internal VLs are managed by the NFVO and created towards the VIM. External and/or externally-managed internal VLs can be passed in VNF lifecycle management operation requests such as InstantiateVnf or ChangeVnfFlavor, and/or in the grant response. The NFVO may choose to override in the grant response external and/or externally-managed VL instances that have been passed previously in the associated VNF lifecycle management request, if the lifecycle management request has originated from the NFVO itself.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "id",
- "virtualLinkDescId",
- "resourceId"
- ],
- "properties": {
- "id": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "virtualLinkDescId": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- }
- }
- }
- },
- "additionalParams": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- },
- "_links": {
- "description": "Links to resources related to this resource.\n",
- "type": "object",
- "required": [
- "self",
- "vnfLcmOpOcc",
- "vnfInstance"
- ],
- "properties": {
- "self": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": [
- "href"
- ],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- },
- "vnfLcmOpOcc": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": [
- "href"
- ],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- },
- "vnfInstance": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": [
- "href"
- ],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- }
- }
- }
- }
- }
- },
- "202": {
- "description": "Accepted\nThe process of creating the grant is ongoing, no grant is available yet. The response body shall be empty.\n",
- "headers": {
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- }
- },
- "400": {
- "description": "Bad Request\nIf the request is malformed or syntactically incorrect (e.g. if the request URI contains incorrect query parameters or a syntactically incorrect payload body), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem.\n ---\n\nIf the request contains a malformed access token, the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n ---\n\nIf there is an application error related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond with this response code.The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "401": {
- "description": "Unauthorized\nIf the request contains no access token even though one is required, or if the request contains an authorization token that is invalid (e.g. expired or revoked), the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "403": {
- "description": "Forbidden\nThe grant was rejected. A ProblemDetails structure shall be included in the response to provide more details about the rejection in the \"details\" attribute.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "404": {
- "description": "Not Found\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request, or is not willing to disclose that one exists, it shall respond with this response code. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the source of the problem, e.g. a wrong resource URI variable.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "405": {
- "description": "Method Not Allowed\nIf a particular HTTP method is not supported for a particular resource, the API producer shall respond with this response code. The \"ProblemDetails\" structure may be omitted in that case.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "406": {
- "description": "Not Acceptable\nIf the \"Accept\" HTTP header does not contain at least one name of a content type that is acceptable to the API producer, the API producer shall respond with this response code. The \"ProblemDetails\" structure may be omitted in that case.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "416": {
- "description": "Requested Range Not Satisfiable\nThis code is returned if the requested byte range in the Range HTTP header is not present in the requested resource.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "422": {
- "description": "Unprocessable Entity\nIf the payload body of a request contains syntactically correct data (e.g. well-formed JSON) but the data cannot be processed (e.g. because it fails validation against a schema), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem. NOTE 2: This error response code is only applicable for methods that have a request body.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "500": {
- "description": "Internal Server Error\nIf there is an application error not related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond withthis response code. The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "503": {
- "description": "Service Unavailable\nIf the API producer encounters an internal overload situation of itself or of a system it relies on, it should respond with this response code, following the provisions in IETF RFC 7231 [13] for the use of the \"Retry-After\" HTTP header and for the alternative to refuse the connection. The \"ProblemDetails\" structure may be omitted.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- }
- }
- }
- }
- }
-} \ No newline at end of file
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-api/src/main/resources/etsisol003adapter.yaml b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-api/src/main/resources/etsisol003adapter.yaml
deleted file mode 100644
index 578708ded8..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-api/src/main/resources/etsisol003adapter.yaml
+++ /dev/null
@@ -1,525 +0,0 @@
-swagger: '2.0'
-info:
- version: 1.0.0
- title: ONAP SO VNFM Adapter API
- description: >-
- Describes the API between SO (Service Orchestrator) and the adapter for VNFM
- (Virtual Network Function Manager)
-basePath: /so/vnfm-adapter/v1
-schemes:
- - http
- - https
-consumes:
- - application/json
-produces:
- - application/json
-paths:
- '/vnfs/{vnfId}':
- post:
- tags:
- - SO VNFM Adapter
- summary: VNF create
- description: Create a VNF instance using a VNFM.
- operationId: vnf_create
- consumes:
- - application/json
- parameters:
- - required: true
- type: string
- description: >-
- The identifier of the VNF. This must be the vnf-id of an existing
- generic-vnf in AAI.
- name: vnfId
- in: path
- - in: body
- name: body
- description: VNF creation parameters
- required: true
- schema:
- $ref: '#/definitions/CreateVnfRequest'
- - name: X-ONAP-RequestID
- description: >-
- Used to track REST requests for logging purposes. Identifies a
- single top level invocation of ONAP
- in: header
- required: true
- type: string
- - name: X-InvocationID
- description: >-
- Used to track REST requests for logging purposes. Identifies a
- single invocation of a single component
- in: header
- required: true
- type: string
- responses:
- '202':
- description: >-
- The request was accepted for processing, but the processing has not
- been completed.
- schema:
- $ref: '#/definitions/CreateVnfResponse'
- '400':
- description: >-
- An error occurred in the VNFM adapter relating to the given input,
- for example, if the definition of the given VNF in AAI does not
- included required information.
- '404':
- description: A VNF with the specified ID was not found in AAI.
- '500':
- description: >-
- An error occurred in the VNFM adapter not relating to the given
- input, or an error is received from the VNFM.
- delete:
- tags:
- - SO VNFM Adapter
- summary: VNF delete
- description: Delete an instance of a VNF using a VNFM.
- operationId: vnf_delete
- consumes:
- - application/json
- parameters:
- - required: true
- type: string
- description: >-
- The identifier of the VNF. This must be the vnf-id of an existing
- generic-vnf in AAI
- name: vnfId
- in: path
- - name: X-ONAP-RequestID
- description: >-
- Used to track REST requests for logging purposes. Identifies a
- single top level invocation of ONAP
- in: header
- required: true
- type: string
- - name: X-InvocationID
- description: >-
- Used to track REST requests for logging purposes. Identifies a
- single invocation of a single component
- in: header
- required: true
- type: string
- responses:
- '202':
- description: >-
- The request was accepted for processing, but the processing has not
- been completed.
- schema:
- $ref: '#/definitions/DeleteVnfResponse'
- '400':
- description: >-
- An error occurred in the VNFM adapter relating to the given input,
- for example, if the definition of the given VNF in AAI does not
- included required information.
- '404':
- description: A VNF with the specified ID was not found in AAI.
- '500':
- description: >-
- An error occurred in the VNFM adapter not relating to the given
- input, or an error is received from the VNFM.
- '/jobs/{jobId}':
- get:
- tags:
- - SO VNFM Adapter
- summary: Job query
- description: Query the status of a job.
- operationId: job_query
- consumes:
- - application/json
- produces:
- - application/json
- parameters:
- - required: true
- type: string
- description: The identifier of the Job.
- name: jobId
- in: path
- - name: X-ONAP-RequestID
- description: >-
- Used to track REST requests for logging purposes. Identifies a
- single top level invocation of ONAP
- in: header
- required: true
- type: string
- - name: X-InvocationID
- description: >-
- Used to track REST requests for logging purposes. Identifies a
- single invocation of a single component
- in: header
- required: true
- type: string
- responses:
- '200':
- description: ''
- schema:
- $ref: '#/definitions/QueryJobResponse'
- '404':
- description: A job with the specified ID was not found.
- '500':
- description: >-
- An error occurred in the VNFM adapter not relating to the given
- input, or an error is received from the VNFM.
-definitions:
- CreateVnfRequest:
- type: object
- properties:
- name:
- type: string
- description: The name to be applied to the VNF.
- tenant:
- $ref: '#/definitions/Tenant'
- pkgId:
- type: string
- description: An identifier for the vnf package.
- additionalParams:
- type: object
- description: >-
- Additional input parameters for the instantiation process, specific to
- the VNF being instantiated, as declared in the VNFD as part of
- "InstantiateVnfOpConfig".
- additionalProperties:
- type: string
- externalVirtualLinks:
- type: array
- description: Information about external VLs to connect the VNF to.
- items:
- $ref: '#/definitions/ExternalVirtualLink'
- required:
- - name
- - tenant
- Tenant:
- type: object
- description: Details of the tenant that VNFs can be deployed into
- properties:
- cloudOwner:
- type: string
- description: The owner in AAI of the cloud to which the tenant belongs.
- regionName:
- type: string
- description: The regionName in AAI of the cloud to which the tenant belongs.
- tenantId:
- type: string
- description: The identifier of the tenant in the VIM.
- required:
- - cloudOwner
- - regionName
- - tenantId
- CreateVnfResponse:
- type: object
- properties:
- jobId:
- description: The ID of the job which can be used to query the status of the job
- type: string
- required:
- - jobId
- DeleteVnfResponse:
- type: object
- properties:
- jobId:
- description: >-
- The ID of the job which can be used to query the status of the delete
- job
- type: string
- required:
- - jobId
- QueryJobResponse:
- type: object
- properties:
- operationStatusRetrievalStatus:
- $ref: '#/definitions/OperationStatusRetrievalStatusEnum'
- id:
- type: string
- operation:
- $ref: '#/definitions/OperationEnum'
- operationState:
- $ref: '#/definitions/OperationStateEnum'
- startTime:
- type: string
- format: date-time
- stateEnteredTime:
- type: string
- format: date-time
- vnfInstanceId:
- type: string
- required:
- - operationStatusRetrievalStatus
- OperationStatusRetrievalStatusEnum:
- description: The status of the attempt to retrieve the operation from the VNFM
- type: string
- enum:
- - STATUS_FOUND
- - WAITING_FOR_STATUS
- - OPERATION_NOT_FOUND
- - CANNOT_RETRIEVE_STATUS
- OperationEnum:
- description: The operation
- type: string
- enum:
- - INSTANTIATE
- - SCALE
- - SCALE_TO_LEVEL
- - CHANGE_FLAVOUR
- - TERMINATE
- - HEAL
- - OPERATE
- - CHANGE_EXT_CONN
- - MODIFY_INFO
- OperationStateEnum:
- description: The status of the operation
- type: string
- enum:
- - STARTING
- - PROCESSING
- - COMPLETED
- - FAILED_TEMP
- - FAILED
- - ROLLING_BACK
- - ROLLED_BACK
- ExternalVirtualLink:
- description: |
- This type represents an external VL.
- type: object
- required:
- - id
- - resourceId
- - extCps
- properties:
- id:
- description: |
- An identifier with the intention of being globally unique.
- type: string
- tenant:
- $ref: '#/definitions/Tenant'
- resourceId:
- description: |
- An identifier maintained by the VIM.
- type: string
- extCps:
- description: |
- External CPs of the VNF to be connected to this external VL.
- type: array
- items:
- description: >
- This type represents configuration information for external CPs
- created from a CPD.
- type: object
- required:
- - cpdId
- properties:
- cpdId:
- description: |
- An identifier that is unique within a VNF descriptor.
- type: string
- cpConfig:
- description: >
- List of instance data that need to be configured on the CP
- instances created from the respective CPD.
- type: array
- items:
- description: >
- This type represents an externally provided link port or
- network address information per instance of an external
- connection point. In case a link port is provided, the VNFM
- shall use that link port when connecting the external CP to
- the external VL. In a link port is not provided, the VNFM
- shall create a link port on the external VL, and use that link
- port to connect the external CP to the external VL.
- type: object
- properties:
- cpInstanceId:
- description: >
- An identifier that is unique for the respective type
- within a VNF instance, but may not be globally unique.
- type: string
- linkPortId:
- description: |
- An identifier with the intention of being globally unique.
- type: string
- cpProtocolData:
- description: >
- Parameters for configuring the network protocols on the
- link port that connects the CP to a VL. The following
- conditions apply to the attributes "linkPortId" and
- "cpProtocolData": * The "linkPortId" and "cpProtocolData"
- attributes shall both be absent for the deletion of an
- existing external CP instance
- addressed by cpInstanceId.
- * At least one of these attributes shall be present for a
- to-be-created external CP instance or an existing external
- CP instance.
- * If the "linkPortId" attribute is absent, the VNFM shall
- create a link port.
-
- * If the "cpProtocolData" attribute is absent, the
- "linkPortId" attribute shall be provided referencing a
- pre-created link port,
- and the VNFM can use means outside the scope of the present
- document to obtain the pre-configured address information for the
- connection point from the resource representing the link port.
- * If both "cpProtocolData" and "linkportId" are provided,
- the API consumer shall ensure that the cpProtocolData can
- be used with the
- pre-created link port referenced by "linkPortId".
- type: array
- items:
- description: |
- This type represents network protocol data.
- type: object
- required:
- - layerProtocol
- properties:
- layerProtocol:
- description: >
- Identifier of layer(s) and protocol(s). This
- attribute allows to signal the addition of further
- types of layer and protocol in future versions of
- the present document in a backwards-compatible way.
- In the current version of the present document, only
- IP over Ethernet is supported.
- type: string
- enum:
- - IP_OVER_ETHERNET
- ipOverEthernet:
- description: >
- This type represents network address data for IP
- over Ethernet.
- type: object
- properties:
- macAddress:
- description: >
- A MAC address. Representation: string that
- consists of groups of two hexadecimal digits,
- separated by hyphens or colons.
- type: string
- format: MAC
- ipAddresses:
- description: >
- List of IP addresses to assign to the CP
- instance. Each entry represents IP address data
- for fixed or dynamic IP address assignment per
- subnet. If this attribute is not present, no IP
- address shall be assigned.
- type: array
- items:
- type: object
- required:
- - type
- properties:
- type:
- description: >
- The type of the IP addresses. Permitted
- values: IPV4, IPV6.
- type: string
- enum:
- - IPV4
- - IPV6
- fixedAddresses:
- description: >
- Fixed addresses to assign (from the subnet
- defined by "subnetId" if provided).
- Exactly one of "fixedAddresses",
- "numDynamicAddresses" or "ipAddressRange"
- shall be present.
- type: array
- items:
- description: >
- An IPV4 or IPV6 address. Representation:
- In case of an IPV4 address, string that
- consists of four decimal integers
- separated by dots, each integer ranging
- from 0 to 255. In case of an IPV6
- address, string that consists of groups
- of zero to four hexadecimal digits,
- separated by colons.
- type: string
- format: IP
- numDynamicAddresses:
- description: >
- Number of dynamic addresses to assign
- (from the subnet defined by "subnetId" if
- provided). Exactly one of
- "fixedAddresses", "numDynamicAddresses" or
- "ipAddressRange" shall be present.
- type: integer
- addressRange:
- description: >
- An IP address range to be used, e.g. in
- case of egress connections. In case this
- attribute is present, IP addresses from
- the range will be used.
- type: object
- required:
- - minAddress
- - maxAddress
- properties:
- minAddress:
- description: >
- An IPV4 or IPV6 address. Representation:
- In case of an IPV4 address, string that
- consists of four decimal integers
- separated by dots, each integer ranging
- from 0 to 255. In case of an IPV6
- address, string that consists of groups
- of zero to four hexadecimal digits,
- separated by colons.
- type: string
- format: IP
- maxAddress:
- description: >
- An IPV4 or IPV6 address. Representation:
- In case of an IPV4 address, string that
- consists of four decimal integers
- separated by dots, each integer ranging
- from 0 to 255. In case of an IPV6
- address, string that consists of groups
- of zero to four hexadecimal digits,
- separated by colons.
- type: string
- format: IP
- subnetId:
- description: >
- An identifier maintained by the VIM or
- other resource provider. It is expected to
- be unique within the VIM instance.
- type: string
- extLinkPorts:
- description: >
- Externally provided link ports to be used to connect external
- connection points to this external VL. If this attribute is not
- present, the VNFM shall create the link ports on the external VL.
- type: array
- items:
- description: >
- This type represents an externally provided link port to be used to
- connect an external connection point to an external VL.
- type: object
- required:
- - id
- - resourceHandle
- properties:
- id:
- description: |
- An identifier with the intention of being globally unique.
- type: string
- resourceHandle:
- required:
- - tenant
- - resourceId
- type: object
- description: >
- This type represents the information that allows addressing a
- virtualised resource that is used by a VNF instance.
- properties:
- tenant:
- $ref: '#/definitions/Tenant'
- resourceId:
- description: >
- An identifier maintained by the VIM or other resource
- provider. It is expected to be unique within the VIM
- instance.
- type: string
- vimLevelResourceType:
- description: >
- Type of the resource in the scope of the VIM or the resource
- provider.
- type: string
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-ext-clients/pom.xml b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-ext-clients/pom.xml
deleted file mode 100644
index 14e8a600b5..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-ext-clients/pom.xml
+++ /dev/null
@@ -1,173 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.onap.so.adapters</groupId>
- <artifactId>etsi-sol003-lcm</artifactId>
- <version>1.7.1-SNAPSHOT</version>
- </parent>
- <artifactId>etsi-sol003-lcm-ext-clients</artifactId>
- <name>ETSI SOL003 Life Cycle Management Adapter Ext Clients</name>
- <build>
- <plugins>
- <plugin>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-codegen-maven-plugin</artifactId>
- <version>${version-swagger-codegen}</version>
- <executions>
- <execution>
- <id>sol003-vnf-lcm-api</id>
- <goals>
- <goal>generate</goal>
- </goals>
- <configuration>
- <inputSpec>${basedir}/src/main/resources/SOL003-VNFLifecycleManagement-API.json</inputSpec>
- <language>java</language>
- <library>okhttp-gson</library>
- <output>${project.build.directory}/generated-sources/sol003-vnf-lcm</output>
- <apiPackage>org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.api</apiPackage>
- <modelPackage>org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.model</modelPackage>
- <generateApiTests>false</generateApiTests>
- <generateModelTests>false</generateModelTests>
- <configOptions>
- <jackson>true</jackson>
- <sourceFolder>src/gen/java/main</sourceFolder>
- <withXml>true</withXml>
- <useRxJava2>true</useRxJava2>
- <serializableModel>true</serializableModel>
- </configOptions>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>add-source</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>${project.basedir}/target/generated-sources/sol003-vnf-lcm/src/gen/java/main</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.eclipse.m2e</groupId>
- <artifactId>lifecycle-mapping</artifactId>
- <version>1.0.0</version>
- <configuration>
- <lifecycleMappingMetadata>
- <pluginExecutions>
- <pluginExecution>
- <pluginExecutionFilter>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-codegen-maven-plugin</artifactId>
- <goals>
- <goal>generate</goal>
- </goals>
- <versionRange>[2.2.0,)</versionRange>
- </pluginExecutionFilter>
- <action>
- <execute>
- <runOnIncremental>false</runOnIncremental>
- </execute>
- </action>
- </pluginExecution>
- </pluginExecutions>
- </lifecycleMappingMetadata>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
- <dependencies>
- <dependency>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-annotations</artifactId>
- <version>${swagger-core-version}</version>
- </dependency>
- <dependency>
- <groupId>com.squareup.retrofit2</groupId>
- <artifactId>converter-gson</artifactId>
- <version>${retrofit-version}</version>
- </dependency>
- <dependency>
- <groupId>com.squareup.retrofit2</groupId>
- <artifactId>retrofit</artifactId>
- <version>${retrofit-version}</version>
- </dependency>
- <dependency>
- <groupId>com.squareup.retrofit2</groupId>
- <artifactId>converter-scalars</artifactId>
- <version>${retrofit-version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.oltu.oauth2</groupId>
- <artifactId>org.apache.oltu.oauth2.client</artifactId>
- <version>${oltu-version}</version>
- </dependency>
- <dependency>
- <groupId>io.gsonfire</groupId>
- <artifactId>gson-fire</artifactId>
- <version>${gson-fire-version}</version>
- </dependency>
- <dependency>
- <groupId>org.threeten</groupId>
- <artifactId>threetenbp</artifactId>
- <version>${threetenbp-version}</version>
- </dependency>
- <dependency>
- <groupId>io.reactivex.rxjava2</groupId>
- <artifactId>rxjava</artifactId>
- </dependency>
- <dependency>
- <groupId>com.squareup.retrofit2</groupId>
- <artifactId>adapter-rxjava2</artifactId>
- <version>${retrofit-version}</version>
- </dependency>
- <dependency>
- <groupId>com.google.code.gson</groupId>
- <artifactId>gson</artifactId>
- </dependency>
- <dependency>
- <groupId>com.squareup.okio</groupId>
- <artifactId>okio</artifactId>
- <version>${okio-version}</version>
- </dependency>
- <dependency>
- <groupId>com.squareup.okhttp3</groupId>
- <artifactId>okhttp</artifactId>
- <version>${okhttp3-version}</version>
- </dependency>
- <dependency>
- <groupId>com.squareup.okhttp3</groupId>
- <artifactId>logging-interceptor</artifactId>
- <version>${okhttp3-version}</version>
- </dependency>
- <dependency>
- <groupId>com.squareup.okhttp</groupId>
- <artifactId>logging-interceptor</artifactId>
- <version>${okhttp-version}</version>
- </dependency>
- <dependency>
- <groupId>com.squareup.okhttp</groupId>
- <artifactId>okhttp</artifactId>
- <version>${okhttp-version}</version>
- </dependency>
- <dependency>
- <groupId>com.squareup.okhttp</groupId>
- <artifactId>logging-interceptor</artifactId>
- <version>${okhttp-version}</version>
- </dependency>
- </dependencies>
-</project> \ No newline at end of file
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-ext-clients/src/main/resources/SOL003-VNFLifecycleManagement-API.json b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-ext-clients/src/main/resources/SOL003-VNFLifecycleManagement-API.json
deleted file mode 100644
index 2bc25a2d5b..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-ext-clients/src/main/resources/SOL003-VNFLifecycleManagement-API.json
+++ /dev/null
@@ -1,8143 +0,0 @@
-{
- "swagger": "2.0",
- "info": {
- "version": "1.1.1",
- "title": "SOL003 - VNF Lifecycle Management interface",
- "description": "SOL003 - VNF Lifecycle Management interface definition\n\nIMPORTANT: Please note that this file might be not aligned to the current version of the ETSI Group Specification it refers to. In case of discrepancies the published ETSI Group Specification takes precedence.\n\nIn clause 4.3.2 of ETSI GS NFV-SOL 003 v2.4.1, an attribute-based filtering mechanism is defined. This mechanism is currently not included in the corresponding OpenAPI design for this GS version. Changes to the attribute-based filtering mechanism are being considered in v2.5.1 of this GS for inclusion in the corresponding future ETSI NFV OpenAPI design.\nPlease report bugs to https://forge.etsi.org/bugzilla/buglist.cgi?component=Nfv-Openapis&list_id=61&product=NFV&resolution=\n",
- "license": {
- "name": "ETSI Forge copyright notice",
- "url": "https://forge.etsi.org/etsi-forge-copyright-notice.txt"
- }
- },
- "externalDocs": {
- "description": "ETSI GS NFV-SOL 003 V2.4.1",
- "url": "http://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/003/02.04.01_60/gs_NFV-SOL003v020401p.pdf"
- },
- "basePath": "/vnflcm/v1",
- "schemes": ["https"],
- "consumes": ["application/json"],
- "produces": ["application/json"],
- "paths": {
- "/vnf_instances": {
- "post": {
- "description": "Create VNF Identifier\n\nThe POST method creates a new VNF instance resource.\n",
- "tags": ["Sol003VnfLcm"],
- "parameters": [{
- "name": "createVnfRequest",
- "description": "The VNF creation parameters",
- "in": "body",
- "required": true,
- "schema": {
- "type": "object",
- "required": ["vnfdId"],
- "properties": {
- "vnfdId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vnfInstanceName": {
- "description": "Human-readable name of the VNF instance to be created.\n",
- "type": "string"
- },
- "vnfInstanceDescription": {
- "description": "Human-readable description of the VNF instance to be created.\n",
- "type": "string"
- }
- }
- }
- }, {
- "name": "Accept",
- "description": "Content-Types that are acceptable for the response. Reference: IETF RFC 7231\n",
- "in": "header",
- "required": true,
- "type": "string"
- }, {
- "name": "Authorization",
- "description": "The authorization token for the request. Reference: IETF RFC 7235\n",
- "in": "header",
- "required": false,
- "type": "string"
- }, {
- "name": "Content-Type",
- "description": "The MIME type of the body of the request. Reference: IETF RFC 7231\n",
- "in": "header",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "201": {
- "description": "A VNF Instance identifier was created successfully",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "Location": {
- "description": "The resource URI of the created VNF instance",
- "type": "string",
- "format": "url"
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "This type represents a VNF instance.\n",
- "type": "object",
- "required": ["id", "vnfdId", "vnfProvider", "vnfProductName", "vnfSoftwareVersion", "vnfdVersion", "vnfPkgId", "instantiationState"],
- "properties": {
- "id": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vnfInstanceName": {
- "description": "Name of the VNF instance. This attribute can be modified with the PATCH method.\n",
- "type": "string"
- },
- "vnfInstanceDescription": {
- "description": "Human-readable description of the VNF instance. This attribute can be modified with the PATCH method.\n",
- "type": "string"
- },
- "vnfdId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vnfProvider": {
- "description": "Provider of the VNF and the VNFD. The value is copied from the VNFD.\n",
- "type": "string"
- },
- "vnfProductName": {
- "description": "Name to identify the VNF Product. The value is copied from the VNFD.\n",
- "type": "string"
- },
- "vnfSoftwareVersion": {
- "description": "A Version.\n",
- "type": "string"
- },
- "vnfdVersion": {
- "description": "A Version.\n",
- "type": "string"
- },
- "vnfPkgId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vnfConfigurableProperties": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- },
- "vimConnectionInfo": {
- "description": "Information about VIM connections to be used for managing the resources for the VNF instance. This attribute shall only be supported and present if VNF-related resource management in direct mode is applicable. This attribute can be modified with the PATCH method.\n",
- "type": "array",
- "items": {
- "description": "This type represents parameters to connect to a VIM for managing the resources of a VNF instance. This structure is used to convey VIM-related parameters over the Or-Vnfm interface. Additional parameters for a VIM may be configured into the VNFM by means outside the scope of the present document, and bound to the identifier of that VIM.\n",
- "type": "object",
- "required": ["id", "vimType"],
- "properties": {
- "id": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vimId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vimType": {
- "description": "Discriminator for the different types of the VIM information. The value of this attribute determines the structure of the \"interfaceInfo\" and \"accessInfo\" attributes, based on the type of the VIM. The set of permitted values is expected to change over time as new types or versions of VIMs become available. The ETSI NFV registry of VIM-related information provides access to information about VimConnectionInfo definitions for various VIM types. The structure of the registry is defined in Annex C of SOL003.\n",
- "type": "string"
- },
- "interfaceInfo": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- },
- "accessInfo": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- },
- "extra": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- }
- }
- }
- },
- "instantiationState": {
- "description": "The instantiation state of the VNF.\n",
- "type": "string",
- "enum": ["NOT_INSTANTIATED", "INSTANTIATED"]
- },
- "instantiatedVnfInfo": {
- "description": "Information specific to an instantiated VNF instance. This attribute shall be present if the instantiateState attribute value is INSTANTIATED.\n",
- "type": "object",
- "required": ["flavourId", "vnfState"],
- "properties": {
- "flavourId": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "vnfState": {
- "type": "string",
- "enum": ["STARTED", "STOPPED"]
- },
- "scaleStatus": {
- "description": "Scale status of the VNF, one entry per aspect. Represents for every scaling aspect how \"big\" the VNF has been scaled w.r.t. that aspect.\n",
- "type": "array",
- "items": {
- "required": ["aspectId", "scaleLevel"],
- "type": "object",
- "properties": {
- "aspectId": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "scaleLevel": {
- "description": "Indicates the scale level. The minimum value shall be 0 and the maximum value shall be <= maxScaleLevel as described in the VNFD.\n",
- "type": "integer"
- }
- }
- }
- },
- "extCpInfo": {
- "description": "Information about the external CPs exposed by the VNF instance.\n",
- "type": "array",
- "minItems": 1,
- "items": {
- "type": "object",
- "required": ["id", "cpdId"],
- "properties": {
- "id": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- },
- "cpdId": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "cpProtocolInfo": {
- "description": "Network protocol information for this CP.\n",
- "type": "array",
- "items": {
- "description": "This type describes the protocol layer(s) that a CP uses together with protocol-related information, like addresses.\n",
- "required": ["layerProtocol"],
- "properties": {
- "layerProtocol": {
- "description": "The identifier of layer(s) and protocol(s) associated to the network address information. Permitted values: IP_OVER_ETHERNET This attribute allows to signal the addition of further types of layer and protocol in future versions of the present document in a backwards-compatible way. In the current version of the present document, only IP over Ethernet is supported.\n",
- "type": "string",
- "enum": ["IP_OVER_ETHERNET"]
- },
- "ipOverEthernet": {
- "description": "This type represents information about a network address that has been assigned.\n",
- "type": "object",
- "required": ["macAddress"],
- "properties": {
- "macAddress": {
- "description": "A MAC address. Representation: string that consists of groups of two hexadecimal digits, separated by hyphens or colons.\n",
- "type": "string",
- "format": "MAC"
- },
- "ipAddresses": {
- "description": "Addresses assigned to the CP instance. Each entry represents IP addresses assigned by fixed or dynamic IP address assignment per subnet.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": ["type"],
- "properties": {
- "type": {
- "description": "The type of the IP addresses. Permitted values: IPV4, IPV6.\n",
- "type": "string",
- "enum": ["IPV4", "IPV6"]
- },
- "addresses": {
- "description": "Fixed addresses assigned (from the subnet defined by \"subnetId\" if provided).\n",
- "type": "array",
- "items": {
- "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n",
- "type": "string",
- "format": "IP"
- }
- },
- "isDynamic": {
- "description": "Indicates whether this set of addresses was assigned dynamically (true) or based on address information provided as input from the API consumer (false). Shall be present if \"addresses\" is present and shall be absent otherwise.\n",
- "type": "boolean"
- },
- "addressRange": {
- "description": "An IP address range used, e.g., in case of egress connections. Exactly one of \"addresses\" or \"addressRange\" shall be present.\n",
- "type": "object",
- "required": ["minAddress", "maxAddress"],
- "properties": {
- "minAddress": {
- "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n",
- "type": "string",
- "format": "IP"
- },
- "maxAddress": {
- "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n",
- "type": "string",
- "format": "IP"
- }
- }
- },
- "subnetId": {
- "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n",
- "type": "string",
- "format": "IP"
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "extLinkPortId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- }
- }
- }
- },
- "extVirtualLinkInfo": {
- "description": "Information about the external VLs the VNF instance is connected to.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": ["id", "resourceHandle"],
- "properties": {
- "id": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceHandle": {
- "required": ["vimConnectionId", "resourceId"],
- "type": "object",
- "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance. Information about the resource is available from the VIM.\n",
- "properties": {
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "vimLevelResourceType": {
- "description": "Type of the resource in the scope of the VIM or the resource provider.\n",
- "type": "string"
- }
- }
- },
- "extLinkPorts": {
- "description": "Link ports of this VL.\n",
- "type": "array",
- "items": {
- "description": "This type represents information about a link port of an external VL, i.e. a port providing connectivity for the VNF to an NS VL.\n",
- "type": "object",
- "required": ["id", "resourceHandle"],
- "properties": {
- "id": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceHandle": {
- "required": ["vimConnectionId", "resourceId"],
- "type": "object",
- "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance. Information about the resource is available from the VIM.\n",
- "properties": {
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "vimLevelResourceType": {
- "description": "Type of the resource in the scope of the VIM or the resource provider.\n",
- "type": "string"
- }
- }
- },
- "cpInstanceId": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "extManagedVirtualLinkInfo": {
- "description": "External virtual links the VNF instance is connected to.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": ["id", "vnfVirtualLinkDescId"],
- "properties": {
- "id": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vnfVirtualLinkDescId": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- },
- "networkResource": {
- "required": ["vimConnectionId", "resourceId"],
- "type": "object",
- "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance. Information about the resource is available from the VIM.\n",
- "properties": {
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "vimLevelResourceType": {
- "description": "Type of the resource in the scope of the VIM or the resource provider.\n",
- "type": "string"
- }
- }
- },
- "vnfLinkPorts": {
- "description": "Link ports of this VL.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": ["id", "resourceHandle"],
- "properties": {
- "id": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- },
- "resourceHandle": {
- "required": ["vimConnectionId", "resourceId"],
- "type": "object",
- "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance. Information about the resource is available from the VIM.\n",
- "properties": {
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "vimLevelResourceType": {
- "description": "Type of the resource in the scope of the VIM or the resource provider.\n",
- "type": "string"
- }
- }
- },
- "cpInstanceId": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "monitoringParameters": {
- "description": "Active monitoring parameters.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": ["id", "value", "timeStamp"],
- "properties": {
- "id": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "name": {
- "description": "Human readable name of the monitoring parameter, as defined in the VNFD.\n",
- "type": "string"
- },
- "value": {
- "description": "Value of the monitoring parameter known to the VNFM (e.g. obtained for autoscaling purposes). The type of the \"value\" attribute (i.e. scalar, structure (Object in JSON), or array (of scalars, arrays or structures/Objects)) is assumed to be defined in an external measurement specification.\n",
- "type": "object"
- },
- "timeStamp": {
- "description": "Represents the point in time when the measurement has been performed, as known to the VNFM. Should be formatted according to ETF RFC 3339.\n",
- "type": "string"
- }
- }
- }
- },
- "localizationLanguage": {
- "description": "Information about localization language of the VNF (includes e.g. strings in the VNFD). The localization languages supported by a VNF can be declared in the VNFD, and localization language selection can take place at instantiation time. The value shall comply with the format defined in IETF RFC 5646.\n",
- "type": "string"
- },
- "vnfcResourceInfo": {
- "description": "Information about the virtualised compute and storage resources used by the VNFCs of the VNF instance.\n",
- "type": "array",
- "items": {
- "description": "This type represents the information on virtualised compute and storage resources used by a VNFC in a VNF instance.\n",
- "type": "object",
- "required": ["id", "vduId", "computeResource"],
- "properties": {
- "id": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- },
- "vduId": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "computeResource": {
- "required": ["vimConnectionId", "resourceId"],
- "type": "object",
- "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance. Information about the resource is available from the VIM.\n",
- "properties": {
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "vimLevelResourceType": {
- "description": "Type of the resource in the scope of the VIM or the resource provider.\n",
- "type": "string"
- }
- }
- },
- "storageResourceIds": {
- "description": "References to the VirtualStorage resources. The value refers to a VirtualStorageResourceInfo item in the VnfInstance.\n",
- "type": "array",
- "items": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- }
- },
- "reservationId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vnfcCpInfo": {
- "description": "CPs of the VNFC instance. Shall be present when that particular CP of the VNFC instance is associated to an external CP of the VNF instance. May be present otherwise.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": ["id", "cpdId"],
- "properties": {
- "id": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- },
- "cpdId": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "vnfExtCpId": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- },
- "cpProtocolInfo": {
- "description": "Network protocol information for this CP.\n",
- "type": "array",
- "items": {
- "description": "This type describes the protocol layer(s) that a CP uses together with protocol-related information, like addresses.\n",
- "required": ["layerProtocol"],
- "properties": {
- "layerProtocol": {
- "description": "The identifier of layer(s) and protocol(s) associated to the network address information. Permitted values: IP_OVER_ETHERNET This attribute allows to signal the addition of further types of layer and protocol in future versions of the present document in a backwards-compatible way. In the current version of the present document, only IP over Ethernet is supported.\n",
- "type": "string",
- "enum": ["IP_OVER_ETHERNET"]
- },
- "ipOverEthernet": {
- "description": "This type represents information about a network address that has been assigned.\n",
- "type": "object",
- "required": ["macAddress"],
- "properties": {
- "macAddress": {
- "description": "A MAC address. Representation: string that consists of groups of two hexadecimal digits, separated by hyphens or colons.\n",
- "type": "string",
- "format": "MAC"
- },
- "ipAddresses": {
- "description": "Addresses assigned to the CP instance. Each entry represents IP addresses assigned by fixed or dynamic IP address assignment per subnet.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": ["type"],
- "properties": {
- "type": {
- "description": "The type of the IP addresses. Permitted values: IPV4, IPV6.\n",
- "type": "string",
- "enum": ["IPV4", "IPV6"]
- },
- "addresses": {
- "description": "Fixed addresses assigned (from the subnet defined by \"subnetId\" if provided).\n",
- "type": "array",
- "items": {
- "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n",
- "type": "string",
- "format": "IP"
- }
- },
- "isDynamic": {
- "description": "Indicates whether this set of addresses was assigned dynamically (true) or based on address information provided as input from the API consumer (false). Shall be present if \"addresses\" is present and shall be absent otherwise.\n",
- "type": "boolean"
- },
- "addressRange": {
- "description": "An IP address range used, e.g., in case of egress connections. Exactly one of \"addresses\" or \"addressRange\" shall be present.\n",
- "type": "object",
- "required": ["minAddress", "maxAddress"],
- "properties": {
- "minAddress": {
- "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n",
- "type": "string",
- "format": "IP"
- },
- "maxAddress": {
- "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n",
- "type": "string",
- "format": "IP"
- }
- }
- },
- "subnetId": {
- "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n",
- "type": "string",
- "format": "IP"
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "vnfLinkPortId": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- }
- }
- }
- },
- "metadata": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- }
- }
- }
- },
- "virtualLinkResourceInfo": {
- "description": "Information about the virtualised network resources used by the VLs of the VNF instance.\n",
- "type": "array",
- "items": {
- "description": "This type represents the information that allows addressing a virtualised resource that is used by an internal VL instance in a VNF instance.\n",
- "type": "object",
- "required": ["id", "vnfVirtualLinkDescId", "networkResource"],
- "properties": {
- "id": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- },
- "vnfVirtualLinkDescId": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "networkResource": {
- "required": ["vimConnectionId", "resourceId"],
- "type": "object",
- "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance. Information about the resource is available from the VIM.\n",
- "properties": {
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "vimLevelResourceType": {
- "description": "Type of the resource in the scope of the VIM or the resource provider.\n",
- "type": "string"
- }
- }
- },
- "reservationId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vnfLinkPorts": {
- "description": "Links ports of this VL. Shall be present when the linkPort is used for external connectivity by the VNF (refer to VnfLinkPortInfo). May be present otherwise.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": ["id", "resourceHandle"],
- "properties": {
- "id": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- },
- "resourceHandle": {
- "required": ["vimConnectionId", "resourceId"],
- "type": "object",
- "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance. Information about the resource is available from the VIM.\n",
- "properties": {
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "vimLevelResourceType": {
- "description": "Type of the resource in the scope of the VIM or the resource provider.\n",
- "type": "string"
- }
- }
- },
- "cpInstanceId": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- }
- }
- }
- },
- "metadata": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- }
- }
- }
- },
- "virtualStorageResourceInfo": {
- "description": "Information on the virtualised storage resource(s) used as storage for the VNF instance.\n",
- "type": "array",
- "items": {
- "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance.\n",
- "type": "object",
- "required": ["id", "virtualStorageDescId", "storageResource"],
- "properties": {
- "id": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- },
- "virtualStorageDescId": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "storageResource": {
- "required": ["vimConnectionId", "resourceId"],
- "type": "object",
- "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance. Information about the resource is available from the VIM.\n",
- "properties": {
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "vimLevelResourceType": {
- "description": "Type of the resource in the scope of the VIM or the resource provider.\n",
- "type": "string"
- }
- }
- },
- "reservationId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "metadata": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- }
- }
- }
- }
- }
- },
- "metadata": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- },
- "extensions": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- },
- "_links": {
- "description": "Links to resources related to this resource.\n",
- "type": "object",
- "required": ["self"],
- "properties": {
- "self": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": ["href"],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- },
- "indicators": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": ["href"],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- },
- "instantiate": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": ["href"],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- },
- "terminate": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": ["href"],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- },
- "scale": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": ["href"],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- },
- "scaleToLevel": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": ["href"],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- },
- "changeFlavour": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": ["href"],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- },
- "heal": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": ["href"],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- },
- "operate": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": ["href"],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- },
- "changeExtConn": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": ["href"],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- }
- }
- }
- }
- }
- },
- "400": {
- "description": "Bad Request\nIf the request is malformed or syntactically incorrect (e.g. if the request URI contains incorrect query parameters or a syntactically incorrect payload body), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem.\n ---\n\nIf the request contains a malformed access token, the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n ---\n\nIf there is an application error related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond with this response code.The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "401": {
- "description": "Unauthorized\nIf the request contains no access token even though one is required, or if the request contains an authorization token that is invalid (e.g. expired or revoked), the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "403": {
- "description": "Forbidden\nIf the API consumer is not allowed to perform a particular request to a particular resource, the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided. It should include in the \"detail\" attribute information about the source of the problem, and may indicate how to solve it.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "404": {
- "description": "Not Found\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request, or is not willing to disclose that one exists, it shall respond with this response code. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the source of the problem, e.g. a wrong resource URI variable.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "405": {
- "description": "Not Found\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request, or is not willing to disclose that one exists, it shall respond with this response code. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the source of the problem, e.g. a wrong resource URI variable.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "406": {
- "description": "Not Acceptable\nIf the \"Accept\" HTTP header does not contain at least one name of a content type that is acceptable to the API producer, the API producer shall respond with this response code. The \"ProblemDetails\" structure may be omitted in that case.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "409": {
- "description": "Conflict\nAnother request is in progress that prohibits the fulfilment of the current request, or the current resource state is inconsistent with the request.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "416": {
- "description": "Requested Range Not Satisfiable\nThis code is returned if the requested byte range in the Range HTTP header is not present in the requested resource.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "422": {
- "description": "Unprocessable Entity\nIf the payload body of a request contains syntactically correct data (e.g. well-formed JSON) but the data cannot be processed (e.g. because it fails validation against a schema), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem. NOTE 2: This error response code is only applicable for methods that have a request body.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "500": {
- "description": "Internal Server Error\nIf there is an application error not related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond withthis response code. The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "503": {
- "description": "Service Unavailable\nIf the API producer encounters an internal overload situation of itself or of a system it relies on, it should respond with this response code, following the provisions in IETF RFC 7231 [13] for the use of the \"Retry-After\" HTTP header and for the alternative to refuse the connection. The \"ProblemDetails\" structure may be omitted.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- }
- }
- }
- },
- "/vnf_instances/{vnfInstanceId}": {
- "parameters": [{
- "name": "vnfInstanceId",
- "description": "Identifier of the VNF instance. This identifier can be retrieved from the resource referenced by the \"Location\" HTTP header in the response to a POST request creating a new VNF instance resource. It can also be retrieved from the \"id\" attribute in the payload body of that response.\n",
- "in": "path",
- "type": "string",
- "required": true
- }
- ],
- "get": {
- "description": "Query VNF\n\nThe GET method retrieves information about a VNF instance by reading an individual VNF instance resource.\n",
- "tags": ["Sol003VnfLcm"],
- "parameters": [{
- "name": "Accept",
- "description": "Content-Types that are acceptable for the response. Reference: IETF RFC 7231\n",
- "in": "header",
- "required": true,
- "type": "string"
- }, {
- "name": "Authorization",
- "description": "The authorization token for the request. Reference: IETF RFC 7235\n",
- "in": "header",
- "required": false,
- "type": "string"
- }, {
- "name": "Content-Type",
- "description": "The MIME type of the body of the request. Reference: IETF RFC 7231\n",
- "in": "header",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK\nInformation about zero or more VNF instances was queried successfully. The response body shall contain representations of zero or more VNF instances.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "This type represents a VNF instance.\n",
- "type": "object",
- "required": ["id", "vnfdId", "vnfProvider", "vnfProductName", "vnfSoftwareVersion", "vnfdVersion", "vnfPkgId", "instantiationState"],
- "properties": {
- "id": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vnfInstanceName": {
- "description": "Name of the VNF instance. This attribute can be modified with the PATCH method.\n",
- "type": "string"
- },
- "vnfInstanceDescription": {
- "description": "Human-readable description of the VNF instance. This attribute can be modified with the PATCH method.\n",
- "type": "string"
- },
- "vnfdId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vnfProvider": {
- "description": "Provider of the VNF and the VNFD. The value is copied from the VNFD.\n",
- "type": "string"
- },
- "vnfProductName": {
- "description": "Name to identify the VNF Product. The value is copied from the VNFD.\n",
- "type": "string"
- },
- "vnfSoftwareVersion": {
- "description": "A Version.\n",
- "type": "string"
- },
- "vnfdVersion": {
- "description": "A Version.\n",
- "type": "string"
- },
- "vnfPkgId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vnfConfigurableProperties": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- },
- "vimConnectionInfo": {
- "description": "Information about VIM connections to be used for managing the resources for the VNF instance. This attribute shall only be supported and present if VNF-related resource management in direct mode is applicable. This attribute can be modified with the PATCH method.\n",
- "type": "array",
- "items": {
- "description": "This type represents parameters to connect to a VIM for managing the resources of a VNF instance. This structure is used to convey VIM-related parameters over the Or-Vnfm interface. Additional parameters for a VIM may be configured into the VNFM by means outside the scope of the present document, and bound to the identifier of that VIM.\n",
- "type": "object",
- "required": ["id", "vimType"],
- "properties": {
- "id": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vimId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vimType": {
- "description": "Discriminator for the different types of the VIM information. The value of this attribute determines the structure of the \"interfaceInfo\" and \"accessInfo\" attributes, based on the type of the VIM. The set of permitted values is expected to change over time as new types or versions of VIMs become available. The ETSI NFV registry of VIM-related information provides access to information about VimConnectionInfo definitions for various VIM types. The structure of the registry is defined in Annex C of SOL003.\n",
- "type": "string"
- },
- "interfaceInfo": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- },
- "accessInfo": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- },
- "extra": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- }
- }
- }
- },
- "instantiationState": {
- "description": "The instantiation state of the VNF.\n",
- "type": "string",
- "enum": ["NOT_INSTANTIATED", "INSTANTIATED"]
- },
- "instantiatedVnfInfo": {
- "description": "Information specific to an instantiated VNF instance. This attribute shall be present if the instantiateState attribute value is INSTANTIATED.\n",
- "type": "object",
- "required": ["flavourId", "vnfState"],
- "properties": {
- "flavourId": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "vnfState": {
- "type": "string",
- "enum": ["STARTED", "STOPPED"]
- },
- "scaleStatus": {
- "description": "Scale status of the VNF, one entry per aspect. Represents for every scaling aspect how \"big\" the VNF has been scaled w.r.t. that aspect.\n",
- "type": "array",
- "items": {
- "required": ["aspectId", "scaleLevel"],
- "type": "object",
- "properties": {
- "aspectId": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "scaleLevel": {
- "description": "Indicates the scale level. The minimum value shall be 0 and the maximum value shall be <= maxScaleLevel as described in the VNFD.\n",
- "type": "integer"
- }
- }
- }
- },
- "extCpInfo": {
- "description": "Information about the external CPs exposed by the VNF instance.\n",
- "type": "array",
- "minItems": 1,
- "items": {
- "type": "object",
- "required": ["id", "cpdId"],
- "properties": {
- "id": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- },
- "cpdId": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "cpProtocolInfo": {
- "description": "Network protocol information for this CP.\n",
- "type": "array",
- "items": {
- "description": "This type describes the protocol layer(s) that a CP uses together with protocol-related information, like addresses.\n",
- "required": ["layerProtocol"],
- "properties": {
- "layerProtocol": {
- "description": "The identifier of layer(s) and protocol(s) associated to the network address information. Permitted values: IP_OVER_ETHERNET This attribute allows to signal the addition of further types of layer and protocol in future versions of the present document in a backwards-compatible way. In the current version of the present document, only IP over Ethernet is supported.\n",
- "type": "string",
- "enum": ["IP_OVER_ETHERNET"]
- },
- "ipOverEthernet": {
- "description": "This type represents information about a network address that has been assigned.\n",
- "type": "object",
- "required": ["macAddress"],
- "properties": {
- "macAddress": {
- "description": "A MAC address. Representation: string that consists of groups of two hexadecimal digits, separated by hyphens or colons.\n",
- "type": "string",
- "format": "MAC"
- },
- "ipAddresses": {
- "description": "Addresses assigned to the CP instance. Each entry represents IP addresses assigned by fixed or dynamic IP address assignment per subnet.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": ["type"],
- "properties": {
- "type": {
- "description": "The type of the IP addresses. Permitted values: IPV4, IPV6.\n",
- "type": "string",
- "enum": ["IPV4", "IPV6"]
- },
- "addresses": {
- "description": "Fixed addresses assigned (from the subnet defined by \"subnetId\" if provided).\n",
- "type": "array",
- "items": {
- "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n",
- "type": "string",
- "format": "IP"
- }
- },
- "isDynamic": {
- "description": "Indicates whether this set of addresses was assigned dynamically (true) or based on address information provided as input from the API consumer (false). Shall be present if \"addresses\" is present and shall be absent otherwise.\n",
- "type": "boolean"
- },
- "addressRange": {
- "description": "An IP address range used, e.g., in case of egress connections. Exactly one of \"addresses\" or \"addressRange\" shall be present.\n",
- "type": "object",
- "required": ["minAddress", "maxAddress"],
- "properties": {
- "minAddress": {
- "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n",
- "type": "string",
- "format": "IP"
- },
- "maxAddress": {
- "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n",
- "type": "string",
- "format": "IP"
- }
- }
- },
- "subnetId": {
- "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n",
- "type": "string",
- "format": "IP"
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "extLinkPortId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- }
- }
- }
- },
- "extVirtualLinkInfo": {
- "description": "Information about the external VLs the VNF instance is connected to.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": ["id", "resourceHandle"],
- "properties": {
- "id": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceHandle": {
- "required": ["vimConnectionId", "resourceId"],
- "type": "object",
- "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance. Information about the resource is available from the VIM.\n",
- "properties": {
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "vimLevelResourceType": {
- "description": "Type of the resource in the scope of the VIM or the resource provider.\n",
- "type": "string"
- }
- }
- },
- "extLinkPorts": {
- "description": "Link ports of this VL.\n",
- "type": "array",
- "items": {
- "description": "This type represents information about a link port of an external VL, i.e. a port providing connectivity for the VNF to an NS VL.\n",
- "type": "object",
- "required": ["id", "resourceHandle"],
- "properties": {
- "id": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceHandle": {
- "required": ["vimConnectionId", "resourceId"],
- "type": "object",
- "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance. Information about the resource is available from the VIM.\n",
- "properties": {
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "vimLevelResourceType": {
- "description": "Type of the resource in the scope of the VIM or the resource provider.\n",
- "type": "string"
- }
- }
- },
- "cpInstanceId": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "extManagedVirtualLinkInfo": {
- "description": "External virtual links the VNF instance is connected to.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": ["id", "vnfVirtualLinkDescId"],
- "properties": {
- "id": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vnfVirtualLinkDescId": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- },
- "networkResource": {
- "required": ["vimConnectionId", "resourceId"],
- "type": "object",
- "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance. Information about the resource is available from the VIM.\n",
- "properties": {
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "vimLevelResourceType": {
- "description": "Type of the resource in the scope of the VIM or the resource provider.\n",
- "type": "string"
- }
- }
- },
- "vnfLinkPorts": {
- "description": "Link ports of this VL.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": ["id", "resourceHandle"],
- "properties": {
- "id": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- },
- "resourceHandle": {
- "required": ["vimConnectionId", "resourceId"],
- "type": "object",
- "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance. Information about the resource is available from the VIM.\n",
- "properties": {
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "vimLevelResourceType": {
- "description": "Type of the resource in the scope of the VIM or the resource provider.\n",
- "type": "string"
- }
- }
- },
- "cpInstanceId": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "monitoringParameters": {
- "description": "Active monitoring parameters.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": ["id", "value", "timeStamp"],
- "properties": {
- "id": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "name": {
- "description": "Human readable name of the monitoring parameter, as defined in the VNFD.\n",
- "type": "string"
- },
- "value": {
- "description": "Value of the monitoring parameter known to the VNFM (e.g. obtained for autoscaling purposes). The type of the \"value\" attribute (i.e. scalar, structure (Object in JSON), or array (of scalars, arrays or structures/Objects)) is assumed to be defined in an external measurement specification.\n",
- "type": "object"
- },
- "timeStamp": {
- "description": "Represents the point in time when the measurement has been performed, as known to the VNFM. Should be formatted according to ETF RFC 3339.\n",
- "type": "string"
- }
- }
- }
- },
- "localizationLanguage": {
- "description": "Information about localization language of the VNF (includes e.g. strings in the VNFD). The localization languages supported by a VNF can be declared in the VNFD, and localization language selection can take place at instantiation time. The value shall comply with the format defined in IETF RFC 5646.\n",
- "type": "string"
- },
- "vnfcResourceInfo": {
- "description": "Information about the virtualised compute and storage resources used by the VNFCs of the VNF instance.\n",
- "type": "array",
- "items": {
- "description": "This type represents the information on virtualised compute and storage resources used by a VNFC in a VNF instance.\n",
- "type": "object",
- "required": ["id", "vduId", "computeResource"],
- "properties": {
- "id": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- },
- "vduId": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "computeResource": {
- "required": ["vimConnectionId", "resourceId"],
- "type": "object",
- "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance. Information about the resource is available from the VIM.\n",
- "properties": {
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "vimLevelResourceType": {
- "description": "Type of the resource in the scope of the VIM or the resource provider.\n",
- "type": "string"
- }
- }
- },
- "storageResourceIds": {
- "description": "References to the VirtualStorage resources. The value refers to a VirtualStorageResourceInfo item in the VnfInstance.\n",
- "type": "array",
- "items": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- }
- },
- "reservationId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vnfcCpInfo": {
- "description": "CPs of the VNFC instance. Shall be present when that particular CP of the VNFC instance is associated to an external CP of the VNF instance. May be present otherwise.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": ["id", "cpdId"],
- "properties": {
- "id": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- },
- "cpdId": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "vnfExtCpId": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- },
- "cpProtocolInfo": {
- "description": "Network protocol information for this CP.\n",
- "type": "array",
- "items": {
- "description": "This type describes the protocol layer(s) that a CP uses together with protocol-related information, like addresses.\n",
- "required": ["layerProtocol"],
- "properties": {
- "layerProtocol": {
- "description": "The identifier of layer(s) and protocol(s) associated to the network address information. Permitted values: IP_OVER_ETHERNET This attribute allows to signal the addition of further types of layer and protocol in future versions of the present document in a backwards-compatible way. In the current version of the present document, only IP over Ethernet is supported.\n",
- "type": "string",
- "enum": ["IP_OVER_ETHERNET"]
- },
- "ipOverEthernet": {
- "description": "This type represents information about a network address that has been assigned.\n",
- "type": "object",
- "required": ["macAddress"],
- "properties": {
- "macAddress": {
- "description": "A MAC address. Representation: string that consists of groups of two hexadecimal digits, separated by hyphens or colons.\n",
- "type": "string",
- "format": "MAC"
- },
- "ipAddresses": {
- "description": "Addresses assigned to the CP instance. Each entry represents IP addresses assigned by fixed or dynamic IP address assignment per subnet.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": ["type"],
- "properties": {
- "type": {
- "description": "The type of the IP addresses. Permitted values: IPV4, IPV6.\n",
- "type": "string",
- "enum": ["IPV4", "IPV6"]
- },
- "addresses": {
- "description": "Fixed addresses assigned (from the subnet defined by \"subnetId\" if provided).\n",
- "type": "array",
- "items": {
- "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n",
- "type": "string",
- "format": "IP"
- }
- },
- "isDynamic": {
- "description": "Indicates whether this set of addresses was assigned dynamically (true) or based on address information provided as input from the API consumer (false). Shall be present if \"addresses\" is present and shall be absent otherwise.\n",
- "type": "boolean"
- },
- "addressRange": {
- "description": "An IP address range used, e.g., in case of egress connections. Exactly one of \"addresses\" or \"addressRange\" shall be present.\n",
- "type": "object",
- "required": ["minAddress", "maxAddress"],
- "properties": {
- "minAddress": {
- "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n",
- "type": "string",
- "format": "IP"
- },
- "maxAddress": {
- "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n",
- "type": "string",
- "format": "IP"
- }
- }
- },
- "subnetId": {
- "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n",
- "type": "string",
- "format": "IP"
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "vnfLinkPortId": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- }
- }
- }
- },
- "metadata": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- }
- }
- }
- },
- "virtualLinkResourceInfo": {
- "description": "Information about the virtualised network resources used by the VLs of the VNF instance.\n",
- "type": "array",
- "items": {
- "description": "This type represents the information that allows addressing a virtualised resource that is used by an internal VL instance in a VNF instance.\n",
- "type": "object",
- "required": ["id", "vnfVirtualLinkDescId", "networkResource"],
- "properties": {
- "id": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- },
- "vnfVirtualLinkDescId": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "networkResource": {
- "required": ["vimConnectionId", "resourceId"],
- "type": "object",
- "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance. Information about the resource is available from the VIM.\n",
- "properties": {
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "vimLevelResourceType": {
- "description": "Type of the resource in the scope of the VIM or the resource provider.\n",
- "type": "string"
- }
- }
- },
- "reservationId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vnfLinkPorts": {
- "description": "Links ports of this VL. Shall be present when the linkPort is used for external connectivity by the VNF (refer to VnfLinkPortInfo). May be present otherwise.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": ["id", "resourceHandle"],
- "properties": {
- "id": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- },
- "resourceHandle": {
- "required": ["vimConnectionId", "resourceId"],
- "type": "object",
- "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance. Information about the resource is available from the VIM.\n",
- "properties": {
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "vimLevelResourceType": {
- "description": "Type of the resource in the scope of the VIM or the resource provider.\n",
- "type": "string"
- }
- }
- },
- "cpInstanceId": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- }
- }
- }
- },
- "metadata": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- }
- }
- }
- },
- "virtualStorageResourceInfo": {
- "description": "Information on the virtualised storage resource(s) used as storage for the VNF instance.\n",
- "type": "array",
- "items": {
- "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance.\n",
- "type": "object",
- "required": ["id", "virtualStorageDescId", "storageResource"],
- "properties": {
- "id": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- },
- "virtualStorageDescId": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "storageResource": {
- "required": ["vimConnectionId", "resourceId"],
- "type": "object",
- "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance. Information about the resource is available from the VIM.\n",
- "properties": {
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "vimLevelResourceType": {
- "description": "Type of the resource in the scope of the VIM or the resource provider.\n",
- "type": "string"
- }
- }
- },
- "reservationId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "metadata": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- }
- }
- }
- }
- }
- },
- "metadata": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- },
- "extensions": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- },
- "_links": {
- "description": "Links to resources related to this resource.\n",
- "type": "object",
- "required": ["self"],
- "properties": {
- "self": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": ["href"],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- },
- "indicators": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": ["href"],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- },
- "instantiate": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": ["href"],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- },
- "terminate": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": ["href"],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- },
- "scale": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": ["href"],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- },
- "scaleToLevel": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": ["href"],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- },
- "changeFlavour": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": ["href"],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- },
- "heal": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": ["href"],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- },
- "operate": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": ["href"],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- },
- "changeExtConn": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": ["href"],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- }
- }
- }
- }
- }
- },
- "400": {
- "description": "Bad Request\nIf the request is malformed or syntactically incorrect (e.g. if the request URI contains incorrect query parameters or a syntactically incorrect payload body), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem.\n ---\n\nIf the request contains a malformed access token, the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n ---\n\nIf there is an application error related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond with this response code.The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "401": {
- "description": "Unauthorized\nIf the request contains no access token even though one is required, or if the request contains an authorization token that is invalid (e.g. expired or revoked), the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "403": {
- "description": "Forbidden\nIf the API consumer is not allowed to perform a particular request to a particular resource, the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided. It should include in the \"detail\" attribute information about the source of the problem, and may indicate how to solve it.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "404": {
- "description": "Not Found\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request, or is not willing to disclose that one exists, it shall respond with this response code. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the source of the problem, e.g. a wrong resource URI variable.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "405": {
- "description": "Not Found\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request, or is not willing to disclose that one exists, it shall respond with this response code. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the source of the problem, e.g. a wrong resource URI variable.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "406": {
- "description": "Not Acceptable\nIf the \"Accept\" HTTP header does not contain at least one name of a content type that is acceptable to the API producer, the API producer shall respond with this response code. The \"ProblemDetails\" structure may be omitted in that case.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "409": {
- "description": "Conflict\nAnother request is in progress that prohibits the fulfilment of the current request, or the current resource state is inconsistent with the request.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "416": {
- "description": "Requested Range Not Satisfiable\nThis code is returned if the requested byte range in the Range HTTP header is not present in the requested resource.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "500": {
- "description": "Internal Server Error\nIf there is an application error not related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond withthis response code. The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "503": {
- "description": "Service Unavailable\nIf the API producer encounters an internal overload situation of itself or of a system it relies on, it should respond with this response code, following the provisions in IETF RFC 7231 [13] for the use of the \"Retry-After\" HTTP header and for the alternative to refuse the connection. The \"ProblemDetails\" structure may be omitted.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- }
- }
- },
- "delete": {
- "description": "Delete VNF Identifier\n\nThis method deletes an individual VNF instance resource.\n",
- "tags": ["Sol003VnfLcm"],
- "parameters": [{
- "name": "Authorization",
- "description": "The authorization token for the request. Reference: IETF RFC 7235\n",
- "in": "header",
- "required": false,
- "type": "string"
- }
- ],
- "responses": {
- "204": {
- "description": "No Content\nThe VNF instance resource and the associated VNF identifier were deleted successfully. The response body shall be empty.\n",
- "headers": {
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- }
- },
- "400": {
- "description": "Bad Request\nIt fhe request is malformed or syntactically incorrect (e.g. if the request URI contains incorrect query parameters or a syntactically incorrect payload body), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem. If the request contains a malformed access token, the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided. If there is an application error related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond with this response code.The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "401": {
- "description": "Unauthorized\nIf the request contains no access token even though one is required, or if the request contains an authorization token that is invalid (e.g. expired or revoked), the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "403": {
- "description": "Forbidden\nIf the API consumer is not allowed to perform a particular request to a particular resource, the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided. It should include in the \"detail\" attribute information about the source of the problem, and may indicate how to solve it.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "404": {
- "description": "Not Found\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request, or is not willing to disclose that one exists, it shall respond with this response code. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the source of the problem, e.g. a wrong resource URI variable.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "405": {
- "description": "Not Found\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request, or is not willing to disclose that one exists, it shall respond with this response code. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the source of the problem, e.g. a wrong resource URI variable.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "406": {
- "description": "Not Acceptable\nIf the \"Accept\" HTTP header does not contain at least one name of a content type that is acceptable to the API producer, the API producer shall respond with this response code. The \"ProblemDetails\" structure may be omitted in that case.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "409": {
- "description": "Conflict\nThe operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. Typically, this is due to the fact that the VNF instance resource is in INSTANTIATED state. The response body shall contain a ProblemDetails structure, in which the \"detail\" attribute should convey more information about the error.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "412": {
- "description": "Precondition Failed\nA precondition given in an HTTP request header is not fulfilled. Typically, this is due to an ETag mismatch, indicating that the resource was modified by another entity. The response body should contain a ProblemDetails structure, in which the \"detail\" attribute should convey more information about the error.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "500": {
- "description": "Internal Server Error\nIf there is an application error not related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond withthis response code. The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "503": {
- "description": "Service Unavailable\nIf the API producer encounters an internal overload situation of itself or of a system it relies on, it should respond with this response code, following the provisions in IETF RFC 7231 [13] for the use of the \"Retry-After\" HTTP header and for the alternative to refuse the connection. The \"ProblemDetails\" structure may be omitted.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- }
- }
- }
- },
- "/vnf_instances/{vnfInstanceId}/instantiate": {
- "parameters": [{
- "name": "vnfInstanceId",
- "description": "Identifier of the VNF instance. This identifier can be retrieved from the resource referenced by the \"Location\" HTTP header in the response to a POST request creating a new VNF instance resource. It can also be retrieved from the \"id\" attribute in the payload body of that response.\n",
- "in": "path",
- "type": "string",
- "required": true
- }
- ],
- "post": {
- "description": "Instantiate VNF\n\nThe POST method instantiates a VNF instance.\n",
- "tags": ["Sol003VnfLcm"],
- "parameters": [{
- "name": "InstantiateVnfRequest",
- "description": "Parameters for the VNF instantiation.",
- "in": "body",
- "required": true,
- "schema": {
- "type": "object",
- "required": ["flavourId"],
- "properties": {
- "flavourId": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "extVirtualLinks": {
- "description": "Information about external VLs to connect the VNF to.\n",
- "type": "array",
- "items": {
- "description": "This type represents an external VL.\n",
- "type": "object",
- "required": ["id", "resourceId", "extCps"],
- "properties": {
- "id": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "extCps": {
- "description": "External CPs of the VNF to be connected to this external VL.\n",
- "type": "array",
- "items": {
- "description": "This type represents configuration information for external CPs created from a CPD.\n",
- "type": "object",
- "required": ["cpdId"],
- "properties": {
- "cpdId": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "cpConfig": {
- "description": "List of instance data that need to be configured on the CP instances created from the respective CPD.\n",
- "type": "array",
- "items": {
- "description": "This type represents an externally provided link port or network address information per instance of an external connection point. In case a link port is provided, the VNFM shall use that link port when connecting the external CP to the external VL. In a link port is not provided, the VNFM shall create a link port on the external VL, and use that link port to connect the external CP to the external VL.\n",
- "type": "object",
- "properties": {
- "cpInstanceId": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- },
- "linkPortId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "cpProtocolData": {
- "description": "Parameters for configuring the network protocols on the link port that connects the CP to a VL. The following conditions apply to the attributes \"linkPortId\" and \"cpProtocolData\": * The \"linkPortId\" and \"cpProtocolData\" attributes shall both be absent for the deletion of an existing external CP instance\n addressed by cpInstanceId. \n* At least one of these attributes shall be present for a to-be-created external CP instance or an existing external\n CP instance.\n* If the \"linkPortId\" attribute is absent, the VNFM shall create a link port.\n* If the \"cpProtocolData\" attribute is absent, the \"linkPortId\" attribute shall be provided referencing a pre-created link port,\n and the VNFM can use means outside the scope of the present\n document to obtain the pre-configured address information for the\n connection point from the resource representing the link port.\n* If both \"cpProtocolData\" and \"linkportId\" are provided, the API consumer shall ensure that the cpProtocolData can be used with the\n pre-created link port referenced by \"linkPortId\".\n",
- "type": "array",
- "items": {
- "description": "This type represents network protocol data.\n",
- "type": "object",
- "required": ["layerProtocol"],
- "properties": {
- "layerProtocol": {
- "description": "Identifier of layer(s) and protocol(s). This attribute allows to signal the addition of further types of layer and protocol in future versions of the present document in a backwards-compatible way. In the current version of the present document, only IP over Ethernet is supported.\n",
- "type": "string",
- "enum": ["IP_OVER_ETHERNET"]
- },
- "ipOverEthernet": {
- "description": "This type represents network address data for IP over Ethernet.\n",
- "type": "object",
- "properties": {
- "macAddress": {
- "description": "A MAC address. Representation: string that consists of groups of two hexadecimal digits, separated by hyphens or colons.\n",
- "type": "string",
- "format": "MAC"
- },
- "ipAddresses": {
- "description": "List of IP addresses to assign to the CP instance. Each entry represents IP address data for fixed or dynamic IP address assignment per subnet. If this attribute is not present, no IP address shall be assigned.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": ["type"],
- "properties": {
- "type": {
- "description": "The type of the IP addresses. Permitted values: IPV4, IPV6.\n",
- "type": "string",
- "enum": ["IPV4", "IPV6"]
- },
- "fixedAddresses": {
- "description": "Fixed addresses to assign (from the subnet defined by \"subnetId\" if provided). Exactly one of \"fixedAddresses\", \"numDynamicAddresses\" or \"ipAddressRange\" shall be present.\n",
- "type": "array",
- "items": {
- "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n",
- "type": "string",
- "format": "IP"
- }
- },
- "numDynamicAddresses": {
- "description": "Number of dynamic addresses to assign (from the subnet defined by \"subnetId\" if provided). Exactly one of \"fixedAddresses\", \"numDynamicAddresses\" or \"ipAddressRange\" shall be present.\n",
- "type": "integer"
- },
- "addressRange": {
- "description": "An IP address range to be used, e.g. in case of egress connections. In case this attribute is present, IP addresses from the range will be used.\n",
- "type": "object",
- "required": ["minAddress", "maxAddress"],
- "properties": {
- "minAddress": {
- "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n",
- "type": "string",
- "format": "IP"
- },
- "maxAddress": {
- "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n",
- "type": "string",
- "format": "IP"
- }
- }
- },
- "subnetId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "extLinkPorts": {
- "description": "Externally provided link ports to be used to connect external connection points to this external VL. If this attribute is not present, the VNFM shall create the link ports on the external VL.\n",
- "type": "array",
- "items": {
- "description": "This type represents an externally provided link port to be used to connect an external connection point to an external VL.\n",
- "type": "object",
- "required": ["id", "resourceHandle"],
- "properties": {
- "id": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceHandle": {
- "required": ["vimConnectionId", "resourceId"],
- "type": "object",
- "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance. Information about the resource is available from the VIM.\n",
- "properties": {
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "vimLevelResourceType": {
- "description": "Type of the resource in the scope of the VIM or the resource provider.\n",
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "vimConnectionInfo": {
- "description": "Information about VIM connections to be used for managing the resources for the VNF instance, or refer to external / externally-managed virtual links. This attribute shall only be supported and may be present if VNF-related resource management in direct mode is applicable.\n",
- "type": "array",
- "items": {
- "description": "This type represents parameters to connect to a VIM for managing the resources of a VNF instance. This structure is used to convey VIM-related parameters over the Or-Vnfm interface. Additional parameters for a VIM may be configured into the VNFM by means outside the scope of the present document, and bound to the identifier of that VIM.\n",
- "type": "object",
- "required": ["id", "vimType"],
- "properties": {
- "id": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vimId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vimType": {
- "description": "Discriminator for the different types of the VIM information. The value of this attribute determines the structure of the \"interfaceInfo\" and \"accessInfo\" attributes, based on the type of the VIM. The set of permitted values is expected to change over time as new types or versions of VIMs become available. The ETSI NFV registry of VIM-related information provides access to information about VimConnectionInfo definitions for various VIM types. The structure of the registry is defined in Annex C of SOL003.\n",
- "type": "string"
- },
- "interfaceInfo": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- },
- "accessInfo": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- }
- }
- }
- },
- "additionalParams": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- }
- }
- }
- }, {
- "name": "Accept",
- "description": "Content-Types that are acceptable for the response. Reference: IETF RFC 7231\n",
- "in": "header",
- "required": true,
- "type": "string"
- }, {
- "name": "Authorization",
- "description": "The authorization token for the request. Reference: IETF RFC 7235\n",
- "in": "header",
- "required": false,
- "type": "string"
- }, {
- "name": "Content-Type",
- "description": "The MIME type of the body of the request. Reference: IETF RFC 7231\n",
- "in": "header",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "202": {
- "description": "Accepted\nThe request was accepted for processing, but the processing has not been completed. The response body shall be empty. The HTTP response shall include a \"Location\" HTTP header that contains the URI of the newly-created \"VNF LCM operation occurrence\" resource corresponding to the operation.\n",
- "headers": {
- "Location": {
- "description": "The resource URI of the created VNF instance",
- "type": "string",
- "format": "url"
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- }
- },
- "400": {
- "description": "Bad Request\nIf the request is malformed or syntactically incorrect (e.g. if the request URI contains incorrect query parameters or a syntactically incorrect payload body), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem.\n ---\n\nIf the request contains a malformed access token, the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n ---\n\nIf there is an application error related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond with this response code.The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "401": {
- "description": "Unauthorized\nIf the request contains no access token even though one is required, or if the request contains an authorization token that is invalid (e.g. expired or revoked), the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "403": {
- "description": "Forbidden\nIf the API consumer is not allowed to perform a particular request to a particular resource, the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided. It should include in the \"detail\" attribute information about the source of the problem, and may indicate how to solve it.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "404": {
- "description": "Not Found\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request, or is not willing to disclose that one exists, it shall respond with this response code. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the source of the problem, e.g. a wrong resource URI variable.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "405": {
- "description": "Not Found\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request, or is not willing to disclose that one exists, it shall respond with this response code. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the source of the problem, e.g. a wrong resource URI variable.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "406": {
- "description": "Not Acceptable\nIf the \"Accept\" HTTP header does not contain at least one name of a content type that is acceptable to the API producer, the API producer shall respond with this response code. The \"ProblemDetails\" structure may be omitted in that case.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "409": {
- "description": "Conflict\nThe operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. Typically, this is due to the fact that the VNF instance resource is in INSTANTIATED state. The response body shall contain a ProblemDetails structure, in which the \"detail\" attribute should convey more information about the error.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "416": {
- "description": "Requested Range Not Satisfiable\nThis code is returned if the requested byte range in the Range HTTP header is not present in the requested resource.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "500": {
- "description": "Internal Server Error\nIf there is an application error not related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond withthis response code. The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "503": {
- "description": "Service Unavailable\nIf the API producer encounters an internal overload situation of itself or of a system it relies on, it should respond with this response code, following the provisions in IETF RFC 7231 [13] for the use of the \"Retry-After\" HTTP header and for the alternative to refuse the connection. The \"ProblemDetails\" structure may be omitted.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- }
- }
- }
- },
- "/vnf_instances/{vnfInstanceId}/terminate": {
- "parameters": [{
- "name": "vnfInstanceId",
- "description": "The identifier of the VNF instance to be terminated. This identifier can be retrieved from the resource referenced by the \"Location\" HTTP header in the response to a POST request creating a new VNF instance resource. It can also be retrieved from the \"id\" attribute in the payload body of that response.\n",
- "in": "path",
- "type": "string",
- "required": true
- }
- ],
- "post": {
- "description": "Terminate VNF\n\nThe POST method terminates a VNF instance.\n",
- "tags": ["Sol003VnfLcm"],
- "parameters": [{
- "name": "TerminateVnfRequest",
- "description": "Parameters for the VNF termination.",
- "in": "body",
- "required": true,
- "schema": {
- "type": "object",
- "required": ["terminationType"],
- "properties": {
- "terminationType": {
- "description": "Indicates whether forceful or graceful termination is requested. VNFM Adapter will only support FORCEFUL in Dublin.\n",
- "type": "string",
- "enum": ["FORCEFUL", "GRACEFUL"]
- }
- }
- }
- }, {
- "name": "Accept",
- "description": "Content-Types that are acceptable for the response. Reference: IETF RFC 7231\n",
- "in": "header",
- "required": true,
- "type": "string"
- }, {
- "name": "Authorization",
- "description": "The authorization token for the request. Reference: IETF RFC 7235\n",
- "in": "header",
- "required": false,
- "type": "string"
- }, {
- "name": "Content-Type",
- "description": "The MIME type of the body of the request. Reference: IETF RFC 7231\n",
- "in": "header",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "202": {
- "description": "Accepted\nThe request was accepted for processing, but the processing has not been completed. On success, the HTTP response shall include a \"Location\" HTTP header that contains the URI of the newly-created \"VNF LCM operation occurrence\" resource corresponding to the operation.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "Location": {
- "description": "The resource URI of the created VNF instance",
- "type": "string",
- "format": "url"
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "This type represents a VNF instance.\n",
- "type": "object",
- "required": ["id", "vnfdId", "vnfProvider", "vnfProductName", "vnfSoftwareVersion", "vnfdVersion", "vnfPkgId", "instantiationState"],
- "properties": {
- "id": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vnfInstanceName": {
- "description": "Name of the VNF instance. This attribute can be modified with the PATCH method.\n",
- "type": "string"
- },
- "vnfInstanceDescription": {
- "description": "Human-readable description of the VNF instance. This attribute can be modified with the PATCH method.\n",
- "type": "string"
- },
- "vnfdId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vnfProvider": {
- "description": "Provider of the VNF and the VNFD. The value is copied from the VNFD.\n",
- "type": "string"
- },
- "vnfProductName": {
- "description": "Name to identify the VNF Product. The value is copied from the VNFD.\n",
- "type": "string"
- },
- "vnfSoftwareVersion": {
- "description": "A Version.\n",
- "type": "string"
- },
- "vnfdVersion": {
- "description": "A Version.\n",
- "type": "string"
- },
- "vnfPkgId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vnfConfigurableProperties": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- },
- "vimConnectionInfo": {
- "description": "Information about VIM connections to be used for managing the resources for the VNF instance. This attribute shall only be supported and present if VNF-related resource management in direct mode is applicable. This attribute can be modified with the PATCH method.\n",
- "type": "array",
- "items": {
- "description": "This type represents parameters to connect to a VIM for managing the resources of a VNF instance. This structure is used to convey VIM-related parameters over the Or-Vnfm interface. Additional parameters for a VIM may be configured into the VNFM by means outside the scope of the present document, and bound to the identifier of that VIM.\n",
- "type": "object",
- "required": ["id", "vimType"],
- "properties": {
- "id": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vimId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vimType": {
- "description": "Discriminator for the different types of the VIM information. The value of this attribute determines the structure of the \"interfaceInfo\" and \"accessInfo\" attributes, based on the type of the VIM. The set of permitted values is expected to change over time as new types or versions of VIMs become available. The ETSI NFV registry of VIM-related information provides access to information about VimConnectionInfo definitions for various VIM types. The structure of the registry is defined in Annex C of SOL003.\n",
- "type": "string"
- },
- "interfaceInfo": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- },
- "accessInfo": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- },
- "extra": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- }
- }
- }
- },
- "instantiationState": {
- "description": "The instantiation state of the VNF.\n",
- "type": "string",
- "enum": ["NOT_INSTANTIATED", "INSTANTIATED"]
- },
- "instantiatedVnfInfo": {
- "description": "Information specific to an instantiated VNF instance. This attribute shall be present if the instantiateState attribute value is INSTANTIATED.\n",
- "type": "object",
- "required": ["flavourId", "vnfState"],
- "properties": {
- "flavourId": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "vnfState": {
- "type": "string",
- "enum": ["STARTED", "STOPPED"]
- },
- "scaleStatus": {
- "description": "Scale status of the VNF, one entry per aspect. Represents for every scaling aspect how \"big\" the VNF has been scaled w.r.t. that aspect.\n",
- "type": "array",
- "items": {
- "required": ["aspectId", "scaleLevel"],
- "type": "object",
- "properties": {
- "aspectId": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "scaleLevel": {
- "description": "Indicates the scale level. The minimum value shall be 0 and the maximum value shall be <= maxScaleLevel as described in the VNFD.\n",
- "type": "integer"
- }
- }
- }
- },
- "extCpInfo": {
- "description": "Information about the external CPs exposed by the VNF instance.\n",
- "type": "array",
- "minItems": 1,
- "items": {
- "type": "object",
- "required": ["id", "cpdId"],
- "properties": {
- "id": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- },
- "cpdId": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "cpProtocolInfo": {
- "description": "Network protocol information for this CP.\n",
- "type": "array",
- "items": {
- "description": "This type describes the protocol layer(s) that a CP uses together with protocol-related information, like addresses.\n",
- "required": ["layerProtocol"],
- "properties": {
- "layerProtocol": {
- "description": "The identifier of layer(s) and protocol(s) associated to the network address information. Permitted values: IP_OVER_ETHERNET This attribute allows to signal the addition of further types of layer and protocol in future versions of the present document in a backwards-compatible way. In the current version of the present document, only IP over Ethernet is supported.\n",
- "type": "string",
- "enum": ["IP_OVER_ETHERNET"]
- },
- "ipOverEthernet": {
- "description": "This type represents information about a network address that has been assigned.\n",
- "type": "object",
- "required": ["macAddress"],
- "properties": {
- "macAddress": {
- "description": "A MAC address. Representation: string that consists of groups of two hexadecimal digits, separated by hyphens or colons.\n",
- "type": "string",
- "format": "MAC"
- },
- "ipAddresses": {
- "description": "Addresses assigned to the CP instance. Each entry represents IP addresses assigned by fixed or dynamic IP address assignment per subnet.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": ["type"],
- "properties": {
- "type": {
- "description": "The type of the IP addresses. Permitted values: IPV4, IPV6.\n",
- "type": "string",
- "enum": ["IPV4", "IPV6"]
- },
- "addresses": {
- "description": "Fixed addresses assigned (from the subnet defined by \"subnetId\" if provided).\n",
- "type": "array",
- "items": {
- "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n",
- "type": "string",
- "format": "IP"
- }
- },
- "isDynamic": {
- "description": "Indicates whether this set of addresses was assigned dynamically (true) or based on address information provided as input from the API consumer (false). Shall be present if \"addresses\" is present and shall be absent otherwise.\n",
- "type": "boolean"
- },
- "addressRange": {
- "description": "An IP address range used, e.g., in case of egress connections. Exactly one of \"addresses\" or \"addressRange\" shall be present.\n",
- "type": "object",
- "required": ["minAddress", "maxAddress"],
- "properties": {
- "minAddress": {
- "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n",
- "type": "string",
- "format": "IP"
- },
- "maxAddress": {
- "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n",
- "type": "string",
- "format": "IP"
- }
- }
- },
- "subnetId": {
- "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n",
- "type": "string",
- "format": "IP"
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "extLinkPortId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- }
- }
- }
- },
- "extVirtualLinkInfo": {
- "description": "Information about the external VLs the VNF instance is connected to.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": ["id", "resourceHandle"],
- "properties": {
- "id": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceHandle": {
- "required": ["vimConnectionId", "resourceId"],
- "type": "object",
- "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance. Information about the resource is available from the VIM.\n",
- "properties": {
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "vimLevelResourceType": {
- "description": "Type of the resource in the scope of the VIM or the resource provider.\n",
- "type": "string"
- }
- }
- },
- "extLinkPorts": {
- "description": "Link ports of this VL.\n",
- "type": "array",
- "items": {
- "description": "This type represents information about a link port of an external VL, i.e. a port providing connectivity for the VNF to an NS VL.\n",
- "type": "object",
- "required": ["id", "resourceHandle"],
- "properties": {
- "id": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceHandle": {
- "required": ["vimConnectionId", "resourceId"],
- "type": "object",
- "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance. Information about the resource is available from the VIM.\n",
- "properties": {
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "vimLevelResourceType": {
- "description": "Type of the resource in the scope of the VIM or the resource provider.\n",
- "type": "string"
- }
- }
- },
- "cpInstanceId": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "extManagedVirtualLinkInfo": {
- "description": "External virtual links the VNF instance is connected to.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": ["id", "vnfVirtualLinkDescId"],
- "properties": {
- "id": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vnfVirtualLinkDescId": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- },
- "networkResource": {
- "required": ["vimConnectionId", "resourceId"],
- "type": "object",
- "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance. Information about the resource is available from the VIM.\n",
- "properties": {
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "vimLevelResourceType": {
- "description": "Type of the resource in the scope of the VIM or the resource provider.\n",
- "type": "string"
- }
- }
- },
- "vnfLinkPorts": {
- "description": "Link ports of this VL.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": ["id", "resourceHandle"],
- "properties": {
- "id": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- },
- "resourceHandle": {
- "required": ["vimConnectionId", "resourceId"],
- "type": "object",
- "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance. Information about the resource is available from the VIM.\n",
- "properties": {
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "vimLevelResourceType": {
- "description": "Type of the resource in the scope of the VIM or the resource provider.\n",
- "type": "string"
- }
- }
- },
- "cpInstanceId": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "monitoringParameters": {
- "description": "Active monitoring parameters.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": ["id", "value", "timeStamp"],
- "properties": {
- "id": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "name": {
- "description": "Human readable name of the monitoring parameter, as defined in the VNFD.\n",
- "type": "string"
- },
- "value": {
- "description": "Value of the monitoring parameter known to the VNFM (e.g. obtained for autoscaling purposes). The type of the \"value\" attribute (i.e. scalar, structure (Object in JSON), or array (of scalars, arrays or structures/Objects)) is assumed to be defined in an external measurement specification.\n",
- "type": "object"
- },
- "timeStamp": {
- "description": "Represents the point in time when the measurement has been performed, as known to the VNFM. Should be formatted according to ETF RFC 3339.\n",
- "type": "string"
- }
- }
- }
- },
- "localizationLanguage": {
- "description": "Information about localization language of the VNF (includes e.g. strings in the VNFD). The localization languages supported by a VNF can be declared in the VNFD, and localization language selection can take place at instantiation time. The value shall comply with the format defined in IETF RFC 5646.\n",
- "type": "string"
- },
- "vnfcResourceInfo": {
- "description": "Information about the virtualised compute and storage resources used by the VNFCs of the VNF instance.\n",
- "type": "array",
- "items": {
- "description": "This type represents the information on virtualised compute and storage resources used by a VNFC in a VNF instance.\n",
- "type": "object",
- "required": ["id", "vduId", "computeResource"],
- "properties": {
- "id": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- },
- "vduId": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "computeResource": {
- "required": ["vimConnectionId", "resourceId"],
- "type": "object",
- "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance. Information about the resource is available from the VIM.\n",
- "properties": {
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "vimLevelResourceType": {
- "description": "Type of the resource in the scope of the VIM or the resource provider.\n",
- "type": "string"
- }
- }
- },
- "storageResourceIds": {
- "description": "References to the VirtualStorage resources. The value refers to a VirtualStorageResourceInfo item in the VnfInstance.\n",
- "type": "array",
- "items": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- }
- },
- "reservationId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vnfcCpInfo": {
- "description": "CPs of the VNFC instance. Shall be present when that particular CP of the VNFC instance is associated to an external CP of the VNF instance. May be present otherwise.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": ["id", "cpdId"],
- "properties": {
- "id": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- },
- "cpdId": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "vnfExtCpId": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- },
- "cpProtocolInfo": {
- "description": "Network protocol information for this CP.\n",
- "type": "array",
- "items": {
- "description": "This type describes the protocol layer(s) that a CP uses together with protocol-related information, like addresses.\n",
- "required": ["layerProtocol"],
- "properties": {
- "layerProtocol": {
- "description": "The identifier of layer(s) and protocol(s) associated to the network address information. Permitted values: IP_OVER_ETHERNET This attribute allows to signal the addition of further types of layer and protocol in future versions of the present document in a backwards-compatible way. In the current version of the present document, only IP over Ethernet is supported.\n",
- "type": "string",
- "enum": ["IP_OVER_ETHERNET"]
- },
- "ipOverEthernet": {
- "description": "This type represents information about a network address that has been assigned.\n",
- "type": "object",
- "required": ["macAddress"],
- "properties": {
- "macAddress": {
- "description": "A MAC address. Representation: string that consists of groups of two hexadecimal digits, separated by hyphens or colons.\n",
- "type": "string",
- "format": "MAC"
- },
- "ipAddresses": {
- "description": "Addresses assigned to the CP instance. Each entry represents IP addresses assigned by fixed or dynamic IP address assignment per subnet.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": ["type"],
- "properties": {
- "type": {
- "description": "The type of the IP addresses. Permitted values: IPV4, IPV6.\n",
- "type": "string",
- "enum": ["IPV4", "IPV6"]
- },
- "addresses": {
- "description": "Fixed addresses assigned (from the subnet defined by \"subnetId\" if provided).\n",
- "type": "array",
- "items": {
- "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n",
- "type": "string",
- "format": "IP"
- }
- },
- "isDynamic": {
- "description": "Indicates whether this set of addresses was assigned dynamically (true) or based on address information provided as input from the API consumer (false). Shall be present if \"addresses\" is present and shall be absent otherwise.\n",
- "type": "boolean"
- },
- "addressRange": {
- "description": "An IP address range used, e.g., in case of egress connections. Exactly one of \"addresses\" or \"addressRange\" shall be present.\n",
- "type": "object",
- "required": ["minAddress", "maxAddress"],
- "properties": {
- "minAddress": {
- "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n",
- "type": "string",
- "format": "IP"
- },
- "maxAddress": {
- "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n",
- "type": "string",
- "format": "IP"
- }
- }
- },
- "subnetId": {
- "description": "An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that consists of groups of zero to four hexadecimal digits, separated by colons.\n",
- "type": "string",
- "format": "IP"
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "vnfLinkPortId": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- }
- }
- }
- },
- "metadata": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- }
- }
- }
- },
- "virtualLinkResourceInfo": {
- "description": "Information about the virtualised network resources used by the VLs of the VNF instance.\n",
- "type": "array",
- "items": {
- "description": "This type represents the information that allows addressing a virtualised resource that is used by an internal VL instance in a VNF instance.\n",
- "type": "object",
- "required": ["id", "vnfVirtualLinkDescId", "networkResource"],
- "properties": {
- "id": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- },
- "vnfVirtualLinkDescId": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "networkResource": {
- "required": ["vimConnectionId", "resourceId"],
- "type": "object",
- "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance. Information about the resource is available from the VIM.\n",
- "properties": {
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "vimLevelResourceType": {
- "description": "Type of the resource in the scope of the VIM or the resource provider.\n",
- "type": "string"
- }
- }
- },
- "reservationId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vnfLinkPorts": {
- "description": "Links ports of this VL. Shall be present when the linkPort is used for external connectivity by the VNF (refer to VnfLinkPortInfo). May be present otherwise.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": ["id", "resourceHandle"],
- "properties": {
- "id": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- },
- "resourceHandle": {
- "required": ["vimConnectionId", "resourceId"],
- "type": "object",
- "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance. Information about the resource is available from the VIM.\n",
- "properties": {
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "vimLevelResourceType": {
- "description": "Type of the resource in the scope of the VIM or the resource provider.\n",
- "type": "string"
- }
- }
- },
- "cpInstanceId": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- }
- }
- }
- },
- "metadata": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- }
- }
- }
- },
- "virtualStorageResourceInfo": {
- "description": "Information on the virtualised storage resource(s) used as storage for the VNF instance.\n",
- "type": "array",
- "items": {
- "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance.\n",
- "type": "object",
- "required": ["id", "virtualStorageDescId", "storageResource"],
- "properties": {
- "id": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- },
- "virtualStorageDescId": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "storageResource": {
- "required": ["vimConnectionId", "resourceId"],
- "type": "object",
- "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance. Information about the resource is available from the VIM.\n",
- "properties": {
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "vimLevelResourceType": {
- "description": "Type of the resource in the scope of the VIM or the resource provider.\n",
- "type": "string"
- }
- }
- },
- "reservationId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "metadata": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- }
- }
- }
- }
- }
- },
- "metadata": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- },
- "extensions": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- },
- "_links": {
- "description": "Links to resources related to this resource.\n",
- "type": "object",
- "required": ["self"],
- "properties": {
- "self": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": ["href"],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- },
- "indicators": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": ["href"],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- },
- "instantiate": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": ["href"],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- },
- "terminate": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": ["href"],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- },
- "scale": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": ["href"],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- },
- "scaleToLevel": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": ["href"],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- },
- "changeFlavour": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": ["href"],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- },
- "heal": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": ["href"],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- },
- "operate": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": ["href"],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- },
- "changeExtConn": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": ["href"],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- }
- }
- }
- }
- }
- },
- "400": {
- "description": "Bad Request\nIf the request is malformed or syntactically incorrect (e.g. if the request URI contains incorrect query parameters or a syntactically incorrect payload body), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem.\n ---\n\nIf the request contains a malformed access token, the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n ---\n\nIf there is an application error related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond with this response code.The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "401": {
- "description": "Unauthorized\nIf the request contains no access token even though one is required, or if the request contains an authorization token that is invalid (e.g. expired or revoked), the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "403": {
- "description": "Forbidden\nIf the API consumer is not allowed to perform a particular request to a particular resource, the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided. It should include in the \"detail\" attribute information about the source of the problem, and may indicate how to solve it.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "404": {
- "description": "Not Found\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request, or is not willing to disclose that one exists, it shall respond with this response code. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the source of the problem, e.g. a wrong resource URI variable.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "405": {
- "description": "Not Found\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request, or is not willing to disclose that one exists, it shall respond with this response code. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the source of the problem, e.g. a wrong resource URI variable.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "406": {
- "description": "Not Acceptable\nIf the \"Accept\" HTTP header does not contain at least one name of a content type that is acceptable to the API producer, the API producer shall respond with this response code. The \"ProblemDetails\" structure may be omitted in that case.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "409": {
- "description": "Conflict\nThe operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. Typically, this is due to the fact that the VNF instance resource is in NOT-INSTANTIATED state, or that another lifecycle management operation is ongoing. The response body shall contain a ProblemDetails structure, in which the \"detail\" attribute should convey more information about the error.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "500": {
- "description": "Internal Server Error\nIf there is an application error not related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond withthis response code. The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "503": {
- "description": "Service Unavailable\nIf the API producer encounters an internal overload situation of itself or of a system it relies on, it should respond with this response code, following the provisions in IETF RFC 7231 [13] for the use of the \"Retry-After\" HTTP header and for the alternative to refuse the connection. The \"ProblemDetails\" structure may be omitted.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- }
- }
- }
- },
- "/vnf_lcm_op_occs/{vnfLcmOpOccId}": {
- "parameters": [{
- "name": "vnfLcmOpOccId",
- "description": "Identifier of a VNF lifecycle management operation occurrence. This identifier can be retrieved from the resource referenced by the \"Location\" HTTP header in the response to a PATCH or POST request triggering a VNF LCM operation. It can also be retrieved from the \"vnfLcmOpOccId\" attribute in the VnfLcmOperationOccurrenceNotification.\n",
- "in": "path",
- "required": true,
- "type": "string"
- }
- ],
- "get": {
- "description": "Get Operation Status\n\nThe client can use this method to retrieve status information about a VNF lifecycle management operation occurrence by reading an individual \"VNF LCM operation occurrence\" resource.\n",
- "tags": ["Sol003VnfLcm"],
- "parameters": [{
- "name": "Accept",
- "description": "Content-Types that are acceptable for the response. Reference: IETF RFC 7231\n",
- "in": "header",
- "required": true,
- "type": "string"
- }, {
- "name": "Authorization",
- "description": "The authorization token for the request. Reference: IETF RFC 7235\n",
- "in": "header",
- "required": false,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK\nInformation about an individual VNF instance was queried successfully. The response body shall contain status information about a VNF lifecycle management operation occurrence.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "This type represents a VNF lifecycle management operation occurrence.\n",
- "type": "object",
- "required": ["id", "operationState", "stateEnteredTime", "startTime", "vnfInstanceId", "operation", "isAutomaticInvocation", "operationParams", "isCancelPending"],
- "properties": {
- "id": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "operationState": {
- "description": "Value | Description ------|------------ STARTING | The LCM operation is starting. PROCESSING | The LCM operation is currently in execution. COMPLETED | he LCM operation has been completed successfully. FAILED_TEMP | The LCM operation has failed and execution has stopped, but the execution of the operation is not considered to be closed. FAILED | The LCM operation has failed and it cannot be retried or rolled back, as it is determined that such action won't succeed. ROLLING_BACK | The LCM operation is currently being rolled back. ROLLED_BACK | The LCM operation has been successfully rolled back, i.e. The state of the VNF prior to the original operation invocation has been restored as closely as possible.\n",
- "type": "string",
- "enum": ["STARTING", "PROCESSING", "COMPLETED", "FAILED_TEMP", "FAILED", "ROLLING_BACK", "ROLLED_BACK"]
- },
- "stateEnteredTime": {
- "description": "Date-time when the current state was entered.\n",
- "type": "string",
- "format": "date-time"
- },
- "startTime": {
- "description": "Date-time of the start of the operation.\n",
- "type": "string",
- "format": "date-time"
- },
- "vnfInstanceId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "grantId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "operation": {
- "description": "Value | Description ------|------------ INSTANTIATE | Represents the \"Instantiate VNF\" LCM operation. SCALE | Represents the \"Scale VNF\" LCM operation. SCALE_TO_LEVEL | Represents the \"Scale VNF to Level\" LCM operation. CHANGE_FLAVOUR | Represents the \"Change VNF Flavour\" LCM operation. TERMINATE | Represents the \"Terminate VNF\" LCM operation. HEAL | Represents the \"Heal VNF\" LCM operation. OPERATE | Represents the \"Operate VNF\" LCM operation. CHANGE_EXT_CONN | Represents the \"Change external VNF connectivity\" LCM operation. MODIFY_INFO | Represents the \"Modify VNF Information\" LCM operation.\n",
- "type": "string",
- "enum": ["INSTANTIATE", "SCALE", "SCALE_TO_LEVEL", "CHANGE_FLAVOUR", "TERMINATE", "HEAL", "OPERATE", "CHANGE_EXT_CONN", "MODIFY_INFO"]
- },
- "isAutomaticInvocation": {
- "description": "Set to true if this VNF LCM operation occurrence has been triggered by an automated procedure inside the VNFM (i.e. ScaleVnf / ScaleVnfToLevel triggered by auto-scale, or HealVnf triggered by auto-heal). Set to false otherwise.\n",
- "type": "boolean"
- },
- "operationParams": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- },
- "isCancelPending": {
- "description": "If the VNF LCM operation occurrence is in \"STARTING\", \"PROCESSING\" or \"ROLLING_BACK\" state and the operation is being cancelled, this attribute shall be set to true. Otherwise, it shall be set to false.\n",
- "type": "boolean"
- },
- "cancelMode": {
- "description": "Cancellation mode. GRACEFUL: If the VNF LCM operation occurrence is in \"PROCESSING\" or \"ROLLING_BACK\" state, the VNFM shall not start any new resource management operation and shall wait for the ongoing resource management operations in the underlying system, typically the VIM, to finish execution or to time out. After that, the VNFM shall put the operation occurrence into the FAILED_TEMP state. If the VNF LCM operation occurrence is in \"STARTING\" state, the VNFM shall not start any resource management operation and shall wait for the granting request to finish execution or time out. After that, the VNFM shall put the operation occurrence into the ROLLED_BACK state. FORCEFUL: If the VNF LCM operation occurrence is in \"PROCESSING\" or \"ROLLING_BACK\" state, the VNFM shall not start any new resource management operation, shall cancel the ongoing resource management operations in the underlying system, typically the VIM, and shall wait for the cancellation to finish or to time out. After that, the VNFM shall put the operation occurrence into the FAILED_TEMP state. If the VNF LCM operation occurrence is in \"STARTING\" state, the VNFM shall not start any resource management operation and put the operation occurrence into the ROLLED_BACK state.\n",
- "type": "string",
- "enum": ["GRACEFUL", "FORCEFUL"]
- },
- "error": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- },
- "resourceChanges": {
- "description": "This attribute contains information about the cumulative changes to virtualised resources that were performed so far by the LCM operation since its start, if applicable.\n",
- "type": "object",
- "properties": {
- "affectedVnfcs": {
- "description": "Information about VNFC instances that were affected during the lifecycle operation. This allows the NFVO to obtain the information contained in the latest \"result\" notification if it has not received it due to an error or a wrongly configured subscription filter.\n",
- "type": "array",
- "items": {
- "description": "This type provides information about added, deleted, modified and temporary VNFCs.\n",
- "type": "object",
- "required": ["id", "vduId", "changeType", "computeResource"],
- "properties": {
- "id": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- },
- "vduId": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "changeType": {
- "description": "Signals the type of change. Permitted values: * ADDED * REMOVED * MODIFIED * TEMPORARY For a temporary resource, an AffectedVnfc structure exists as long as the temporary resource exists.\n",
- "type": "string",
- "enum": ["ADDED", "REMOVED", "MODIFIED", "TEMPORARY"]
- },
- "computeResource": {
- "required": ["vimConnectionId", "resourceId"],
- "type": "object",
- "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance. Information about the resource is available from the VIM.\n",
- "properties": {
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "vimLevelResourceType": {
- "description": "Type of the resource in the scope of the VIM or the resource provider.\n",
- "type": "string"
- }
- }
- },
- "metadata": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- },
- "affectedVnfcCpIds": {
- "description": "Identifiers of CP(s) of the VNFC instance that were affected by the change. Shall be present for those affected CPs of the VNFC instance that are associated to an external CP of the VNF instance. May be present for further affected CPs of the VNFC instance.\n",
- "type": "array",
- "items": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- }
- },
- "addedStorageResourceIds": {
- "description": "References to VirtualStorage resources that have been added. Each value refers to a VirtualStorageResourceInfo item in the VnfInstance that was added to the VNFC. It shall be provided if at least one storage resource was added to the VNFC.\n",
- "type": "array",
- "items": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- }
- },
- "removedStorageResourceIds": {
- "description": "References to VirtualStorage resources that have been removed. The value contains the identifier of a VirtualStorageResourceInfo item that has been removed from the VNFC, and might no longer exist in the VnfInstance. It shall be provided if at least one storage resource was removed from the VNFC.\n",
- "type": "array",
- "items": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- }
- }
- }
- }
- },
- "affectedVirtualLinks": {
- "description": "Information about VL instances that were affected during the lifecycle operation. This allows the NFVO to obtain the information contained in the latest \"result\" notification if it has not received it due to an error or a wrongly configured subscription filter.\n",
- "type": "array",
- "items": {
- "description": "This type provides information about added, deleted, modified and temporary VLs.\n",
- "type": "object",
- "required": ["id", "virtualLinkDescId", "changeType", "networkResource"],
- "properties": {
- "id": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- },
- "virtualLinkDescId": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "changeType": {
- "description": "Signals the type of change. Permitted values: * ADDED * REMOVED * MODIFIED * TEMPORARY * LINK_PORT_ADDED * LINK_PORT_REMOVED For a temporary resource, an AffectedVirtualLink structure exists as long as the temporary resource exists.\n",
- "type": "string",
- "enum": ["ADDED", "REMOVED", "MODIFIED", "TEMPORARY", "LINK_PORT_ADDED", "LINK_PORT_REMOVED"]
- },
- "networkResource": {
- "required": ["vimConnectionId", "resourceId"],
- "type": "object",
- "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance. Information about the resource is available from the VIM.\n",
- "properties": {
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "vimLevelResourceType": {
- "description": "Type of the resource in the scope of the VIM or the resource provider.\n",
- "type": "string"
- }
- }
- },
- "metadata": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- }
- }
- }
- },
- "affectedVirtualStorages": {
- "description": "Information about virtualised storage instances that were affected during the lifecycle operation. This allows the NFVO to obtain the information contained in the latest \"result\" notification if it has not received it due to an error or a wrongly configured subscription filter.\n",
- "type": "array",
- "items": {
- "description": "This type provides information about added, deleted, modified and temporary virtual storage resources.\n",
- "type": "object",
- "required": ["id", "virtualStorageDescId", "changeType", "storageResource"],
- "properties": {
- "id": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- },
- "virtualStorageDescId": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "changeType": {
- "description": "Signals the type of change. Permitted values: * ADDED * REMOVED * MODIFIED * TEMPORARY For a temporary resource, an AffectedVirtualStorage structure exists as long as the temporary resource exists.\n",
- "type": "string",
- "enum": ["ADDED", "REMOVED", "MODIFIED", "TEMPORARY"]
- },
- "storageResource": {
- "required": ["vimConnectionId", "resourceId"],
- "type": "object",
- "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance. Information about the resource is available from the VIM.\n",
- "properties": {
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "vimLevelResourceType": {
- "description": "Type of the resource in the scope of the VIM or the resource provider.\n",
- "type": "string"
- }
- }
- },
- "metadata": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- }
- }
- }
- }
- }
- },
- "changedInfo": {
- "description": "This type represents attribute modifications that were performed on an \"Individual VNF instance\" resource. The attributes that can be included consist of those requested to be modified explicitly in the \"VnfInfoModificationRequest\" data structure, and additional attributes of the \"VnfInstance\" data structure that were modified implicitly e.g. when modifying the referenced VNF package.\n",
- "type": "object",
- "properties": {
- "vnfInstanceName": {
- "description": "If present, this attribute signals modifications of the \"vnfInstanceName\" attribute in \"VnfInstance\".\n",
- "type": "string"
- },
- "vnfInstanceDescription": {
- "description": "If present, this attribute signals modifications of the \"vnfInstanceDescription\" attribute in \"VnfInstance\".\n",
- "type": "string"
- },
- "vnfConfigurableProperties": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- },
- "metadata": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- },
- "extensions": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- },
- "vimConnectionInfo": {
- "description": "If present, this attribute signals modifications of certain entries in the \"vimConnectionInfo\" attribute array in \"VnfInstance\".\n",
- "type": "array",
- "items": {
- "description": "This type represents parameters to connect to a VIM for managing the resources of a VNF instance. This structure is used to convey VIM-related parameters over the Or-Vnfm interface. Additional parameters for a VIM may be configured into the VNFM by means outside the scope of the present document, and bound to the identifier of that VIM.\n",
- "type": "object",
- "required": ["id", "vimType"],
- "properties": {
- "id": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vimId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vimType": {
- "description": "Discriminator for the different types of the VIM information. The value of this attribute determines the structure of the \"interfaceInfo\" and \"accessInfo\" attributes, based on the type of the VIM. The set of permitted values is expected to change over time as new types or versions of VIMs become available. The ETSI NFV registry of VIM-related information provides access to information about VimConnectionInfo definitions for various VIM types. The structure of the registry is defined in Annex C of SOL003.\n",
- "type": "string"
- },
- "interfaceInfo": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- },
- "accessInfo": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- },
- "extra": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- }
- }
- }
- },
- "vnfPkgId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vnfdId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vnfProvider": {
- "description": "If present, this attribute signals modifications of the \"vnfProvider\" attribute in \"VnfInstance\". If present, this attribute (which depends on the value of the \"vnfPkgId\" attribute) was modified implicitly following a request to modify the \"vnfPkgId\" attribute, by copying the value of this attribute from the VNFD in the VNF Package identified by the \"vnfPkgId” attribute.\n",
- "type": "string"
- },
- "vnfProductName": {
- "description": "If present, this attribute signals modifications of the \"vnfProductName\" attribute in \"VnfInstance\". If present, this attribute (which depends on the value of the \"vnfPkgId\" attribute) was modified implicitly following a request to modify the \"vnfPkgId\" attribute, by copying the value of this attribute from the VNFD in the VNF Package identified by the \"vnfPkgId” attribute.\n",
- "type": "string"
- },
- "vnfSoftwareVersion": {
- "description": "A Version.\n",
- "type": "string"
- },
- "vnfdVersion": {
- "description": "A Version.\n",
- "type": "string"
- }
- }
- },
- "changedExtConnectivity": {
- "description": "Information about changed external connectivity, if applicable. This allows the NFVO to obtain the information contained in the latest \"result\" notification if it has not received it due to an error or a wrongly configured subscription filter.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": ["id", "resourceHandle"],
- "properties": {
- "id": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceHandle": {
- "required": ["vimConnectionId", "resourceId"],
- "type": "object",
- "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance. Information about the resource is available from the VIM.\n",
- "properties": {
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "vimLevelResourceType": {
- "description": "Type of the resource in the scope of the VIM or the resource provider.\n",
- "type": "string"
- }
- }
- },
- "extLinkPorts": {
- "description": "Link ports of this VL.\n",
- "type": "array",
- "items": {
- "description": "This type represents information about a link port of an external VL, i.e. a port providing connectivity for the VNF to an NS VL.\n",
- "type": "object",
- "required": ["id", "resourceHandle"],
- "properties": {
- "id": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceHandle": {
- "required": ["vimConnectionId", "resourceId"],
- "type": "object",
- "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance. Information about the resource is available from the VIM.\n",
- "properties": {
- "vimConnectionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceProviderId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "resourceId": {
- "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n",
- "type": "string"
- },
- "vimLevelResourceType": {
- "description": "Type of the resource in the scope of the VIM or the resource provider.\n",
- "type": "string"
- }
- }
- },
- "cpInstanceId": {
- "description": "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique.\n",
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "_links": {
- "description": "Links to resources related to this resource.\n",
- "type": "object",
- "required": ["self", "vnfInstance"],
- "properties": {
- "self": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": ["href"],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- },
- "vnfInstance": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": ["href"],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- },
- "grant": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": ["href"],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- },
- "cancel": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": ["href"],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- },
- "retry": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": ["href"],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- },
- "rollback": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": ["href"],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- },
- "fail": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": ["href"],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- }
- }
- }
- }
- }
- },
- "400": {
- "description": "Bad Request\nIf the request is malformed or syntactically incorrect (e.g. if the request URI contains incorrect query parameters or a syntactically incorrect payload body), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem.\n ---\n\nIf the request contains a malformed access token, the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n ---\n\nIf there is an application error related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond with this response code.The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "401": {
- "description": "Unauthorized\nIf the request contains no access token even though one is required, or if the request contains an authorization token that is invalid (e.g. expired or revoked), the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "403": {
- "description": "Forbidden\nIf the API consumer is not allowed to perform a particular request to a particular resource, the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided. It should include in the \"detail\" attribute information about the source of the problem, and may indicate how to solve it.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "404": {
- "description": "Not Found\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request, or is not willing to disclose that one exists, it shall respond with this response code. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the source of the problem, e.g. a wrong resource URI variable.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "405": {
- "description": "Not Found\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request, or is not willing to disclose that one exists, it shall respond with this response code. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the source of the problem, e.g. a wrong resource URI variable.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "406": {
- "description": "Not Acceptable\nIf the \"Accept\" HTTP header does not contain at least one name of a content type that is acceptable to the API producer, the API producer shall respond with this response code. The \"ProblemDetails\" structure may be omitted in that case.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "409": {
- "description": "Conflict\nAnother request is in progress that prohibits the fulfilment of the current request, or the current resource state is inconsistent with the request.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "500": {
- "description": "Internal Server Error\nIf there is an application error not related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond withthis response code. The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "503": {
- "description": "Service Unavailable\nIf the API producer encounters an internal overload situation of itself or of a system it relies on, it should respond with this response code, following the provisions in IETF RFC 7231 [13] for the use of the \"Retry-After\" HTTP header and for the alternative to refuse the connection. The \"ProblemDetails\" structure may be omitted.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- }
- }
- }
- },
- "/subscriptions": {
- "post": {
- "description": "Subscribe\n\nThe POST method creates a new subscription. Creation of two subscription resources with the same callbackURI and the same filter can result in performance degradation and will provide duplicates of notifications to the NFVO, and might make sense only in very rare use cases. Consequently, the VNFM may either allow creating a subscription resource if another subscription resource with the same filter and callbackUri already exists (in which case it shall return the “201 Created” response code), or may decide to not create a duplicate subscription resource (in which case it shall return a “303 See Other” response code referencing the existing subscription resource with the same filter and callbackUri).\n",
- "tags": ["Sol003VnfLcm"],
- "parameters": [{
- "name": "LccnSubscriptionRequest",
- "description": "Details of the subscription to be created.\n",
- "in": "body",
- "required": true,
- "schema": {
- "description": "This type represents a subscription request related to notifications about VNF lifecycle changes.\n",
- "type": "object",
- "required": ["callbackUri"],
- "properties": {
- "filter": {
- "description": "This type represents a subscription filter related to notifications about VNF lifecycle changes. At a particular nesting level in the filter structure, the following applies: All attributes shall match in order for the filter to match (logical \"and\" between different filter attributes). If an attribute is an array, the attribute shall match if at least one of the values in the array matches (logical \"or\" between the values of one filter attribute).\n",
- "type": "object",
- "properties": {
- "vnfInstanceSubscriptionFilter": {
- "description": "This type represents subscription filter criteria to match VNF instances.\n",
- "type": "object",
- "properties": {
- "vnfInstanceIds": {
- "description": "If present, match VNF instances with an instance identifier listed in this attribute. The attributes \"vnfInstanceIds\" and \"vnfInstanceNames\" are alternatives to reference to particular VNF Instances in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n",
- "type": "array",
- "items": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- }
- }
- }
- },
- "notificationTypes": {
- "description": "Match particular notification types. Permitted values: * VnfLcmOperationOccurrenceNotification * VnfIdentifierCreationNotification * VnfIdentifierDeletionNotification The permitted values of the \"notificationTypes\" attribute are spelled exactly as the names of the notification types to facilitate automated code generation systems.\n",
- "type": "array",
- "items": {
- "type": "string",
- "enum": ["VnfLcmOperationOccurrenceNotification", "VnfIdentifierCreationNotification", "VnfIdentifierDeletionNotification"]
- }
- },
- "operationTypes": {
- "description": "Match particular VNF lifecycle operation types for the notification of type VnfLcmOperationOccurrenceNotification. May be present if the \"notificationTypes\" attribute contains the value \"VnfLcmOperationOccurrenceNotification\", and shall be absent otherwise.\n",
- "type": "array",
- "items": {
- "description": "Value | Description ------|------------ INSTANTIATE | Represents the \"Instantiate VNF\" LCM operation. SCALE | Represents the \"Scale VNF\" LCM operation. SCALE_TO_LEVEL | Represents the \"Scale VNF to Level\" LCM operation. CHANGE_FLAVOUR | Represents the \"Change VNF Flavour\" LCM operation. TERMINATE | Represents the \"Terminate VNF\" LCM operation. HEAL | Represents the \"Heal VNF\" LCM operation. OPERATE | Represents the \"Operate VNF\" LCM operation. CHANGE_EXT_CONN | Represents the \"Change external VNF connectivity\" LCM operation. MODIFY_INFO | Represents the \"Modify VNF Information\" LCM operation.\n",
- "type": "string",
- "enum": ["INSTANTIATE", "TERMINATE"]
- }
- },
- "operationStates": {
- "description": "Match particular LCM operation state values as reported in notifications of type VnfLcmOperationOccurrenceNotification. May be present if the \"notificationTypes\" attribute contains the value \"VnfLcmOperationOccurrenceNotification\", and shall be absent otherwise.\n",
- "type": "array",
- "items": {
- "description": "Value | Description ------|------------ STARTING | The LCM operation is starting. PROCESSING | The LCM operation is currently in execution. COMPLETED | he LCM operation has been completed successfully. FAILED_TEMP | The LCM operation has failed and execution has stopped, but the execution of the operation is not considered to be closed. FAILED | The LCM operation has failed and it cannot be retried or rolled back, as it is determined that such action won't succeed. ROLLING_BACK | The LCM operation is currently being rolled back. ROLLED_BACK | The LCM operation has been successfully rolled back, i.e. The state of the VNF prior to the original operation invocation has been restored as closely as possible.\n",
- "type": "string",
- "enum": ["STARTING", "PROCESSING", "COMPLETED", "FAILED_TEMP", "FAILED", "ROLLING_BACK", "ROLLED_BACK"]
- }
- }
- }
- },
- "callbackUri": {
- "description": "String formatted according to IETF RFC 3986.\n",
- "type": "string"
- },
- "authentication": {
- "type": "object",
- "required": ["authType"],
- "properties": {
- "authType": {
- "description": "Defines the types of Authentication / Authorization which the API consumer is willing to accept when receiving a notification. Permitted values: * BASIC: In every HTTP request to the notification endpoint, use HTTP Basic authentication with the client credentials. \n* OAUTH2_CLIENT_CREDENTIALS: In every HTTP request to the notification endpoint, use an OAuth 2.0 Bearer token, obtained\n using the client credentials grant type.\n* TLS_CERT: Every HTTP request to the notification endpoint is sent over a mutually authenticated TLS session, i.e. not only the\n server is authenticated, but also the client is authenticated\n during the TLS tunnel setup.\n",
- "type": "array",
- "items": {
- "type": "string",
- "enum": ["BASIC", "OAUTH2_CLIENT_CREDENTIALS", "TLS_CERT"]
- }
- },
- "paramsBasic": {
- "description": "Parameters for authentication/authorization using BASIC. Shall be present if authType is \"BASIC\" and the contained information has not been provisioned out of band. Shall be absent otherwise.\n",
- "type": "object",
- "properties": {
- "userName": {
- "description": "Username to be used in HTTP Basic authentication. Shall be present if it has not been provisioned out of band.\n",
- "type": "string"
- },
- "password": {
- "description": "Password to be used in HTTP Basic authentication. Shall be present if it has not been provisioned out of band.\n",
- "type": "string"
- }
- }
- },
- "paramsOauth2ClientCredentials": {
- "description": "Parameters for authentication/authorization using OAUTH2_CLIENT_CREDENTIALS. Shall be present if authType is \"OAUTH2_CLIENT_CREDENTIALS\" and the contained information has not been provisioned out of band. Shall be absent otherwise.\n",
- "type": "object",
- "properties": {
- "clientId": {
- "description": "Client identifier to be used in the access token request of the OAuth 2.0 client credentials grant type. Shall be present if it has not been provisioned out of band. The clientId and clientPassword passed in a subscription shall not be the same as the clientId and clientPassword that are used to obtain authorization for API requests. Client credentials may differ between subscriptions. The value of clientPassword should be generated by a random process.\n",
- "type": "string"
- },
- "clientPassword": {
- "description": "Client password to be used in the access token request of the OAuth 2.0 client credentials grant type. Shall be present if it has not been provisioned out of band. The clientId and clientPassword passed in a subscription shall not be the same as the clientId and clientPassword that are used to obtain authorization for API requests. Client credentials may differ between subscriptions. The value of clientPassword should be generated by a random process.\n",
- "type": "string"
- },
- "tokenEndpoint": {
- "description": "String formatted according to IETF RFC 3986.\n",
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }, {
- "name": "Accept",
- "description": "Content-Types that are acceptable for the response. Reference: IETF RFC 7231\n",
- "in": "header",
- "required": true,
- "type": "string"
- }, {
- "name": "Authorization",
- "description": "The authorization token for the request. Reference: IETF RFC 7235\n",
- "in": "header",
- "required": false,
- "type": "string"
- }, {
- "name": "Content-Type",
- "description": "The MIME type of the body of the request. Reference: IETF RFC 7231\n",
- "in": "header",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "201": {
- "description": "Created\nThe subscription was created successfully. The response body shall contain a representation of the created subscription resource. The HTTP response shall include a \"Location\" HTTP header that points to the created subscription resource.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "Location": {
- "description": "The resource URI of the created VNF instance",
- "type": "string",
- "format": "url"
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "This type represents a subscription related to notifications about VNF lifecycle changes.\n",
- "type": "object",
- "required": ["id", "callbackUri", "_links"],
- "properties": {
- "id": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "filter": {
- "description": "This type represents a subscription filter related to notifications about VNF lifecycle changes. At a particular nesting level in the filter structure, the following applies: All attributes shall match in order for the filter to match (logical \"and\" between different filter attributes). If an attribute is an array, the attribute shall match if at least one of the values in the array matches (logical \"or\" between the values of one filter attribute).\n",
- "type": "object",
- "properties": {
- "vnfInstanceSubscriptionFilter": {
- "description": "This type represents subscription filter criteria to match VNF instances.\n",
- "type": "object",
- "properties": {
- "vnfdIds": {
- "description": "If present, match VNF instances that were created based on a VNFD identified by one of the vnfdId values listed in this attribute. The attributes \"vnfdIds\" and \"vnfProductsFromProviders\" are alternatives to reference to VNF instances that are based on certain VNFDs in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n",
- "type": "array",
- "items": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- }
- },
- "vnfProductsFromProviders": {
- "description": "If present, match VNF instances that belong to VNF products from certain providers. The attributes \"vnfdIds\" and \"vnfProductsFromProviders\" are alternatives to reference to VNF instances that are based on certain VNFDs in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": ["vnfProvider"],
- "properties": {
- "vnfProvider": {
- "description": "Name of the VNF provider to match.\n",
- "type": "string"
- },
- "vnfProducts": {
- "description": "If present, match VNF instances that belong to VNF products with certain product names, from one particular provider.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": ["vnfProductName"],
- "properties": {
- "vnfProductName": {
- "description": "Name of the VNF product to match.\n",
- "type": "string"
- },
- "versions": {
- "description": "If present, match VNF instances that belong to VNF products with certain versions and a certain product name, from one particular provider.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": ["vnfSoftwareVersion"],
- "properties": {
- "vnfSoftwareVersion": {
- "description": "A version.\n",
- "type": "string"
- },
- "vnfdVersions": {
- "description": "If present, match VNF instances that belong to VNF products with certain VNFD versions, a certain software version and a certain product name, from one particular provider.\n",
- "type": "array",
- "items": {
- "description": "A version.\n",
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "vnfInstanceIds": {
- "description": "If present, match VNF instances with an instance identifier listed in this attribute. The attributes \"vnfInstanceIds\" and \"vnfInstanceNames\" are alternatives to reference to particular VNF Instances in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n",
- "type": "array",
- "items": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- }
- },
- "vnfInstanceNames": {
- "description": "If present, match VNF instances with a VNF Instance Name listed in this attribute. The attributes \"vnfInstanceIds\" and \"vnfInstanceNames\" are alternatives to reference to particular VNF Instances in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- },
- "notificationTypes": {
- "description": "Match particular notification types. Permitted values: * VnfLcmOperationOccurrenceNotification * VnfIdentifierCreationNotification * VnfIdentifierDeletionNotification The permitted values of the \"notificationTypes\" attribute are spelled exactly as the names of the notification types to facilitate automated code generation systems.\n",
- "type": "array",
- "items": {
- "type": "string",
- "enum": ["VnfLcmOperationOccurrenceNotification", "VnfIdentifierCreationNotification", "VnfIdentifierDeletionNotification"]
- }
- },
- "operationTypes": {
- "description": "Match particular VNF lifecycle operation types for the notification of type VnfLcmOperationOccurrenceNotification. May be present if the \"notificationTypes\" attribute contains the value \"VnfLcmOperationOccurrenceNotification\", and shall be absent otherwise.\n",
- "type": "array",
- "items": {
- "description": "Value | Description ------|------------ INSTANTIATE | Represents the \"Instantiate VNF\" LCM operation. SCALE | Represents the \"Scale VNF\" LCM operation. SCALE_TO_LEVEL | Represents the \"Scale VNF to Level\" LCM operation. CHANGE_FLAVOUR | Represents the \"Change VNF Flavour\" LCM operation. TERMINATE | Represents the \"Terminate VNF\" LCM operation. HEAL | Represents the \"Heal VNF\" LCM operation. OPERATE | Represents the \"Operate VNF\" LCM operation. CHANGE_EXT_CONN | Represents the \"Change external VNF connectivity\" LCM operation. MODIFY_INFO | Represents the \"Modify VNF Information\" LCM operation.\n",
- "type": "string",
- "enum": ["INSTANTIATE", "SCALE", "SCALE_TO_LEVEL", "CHANGE_FLAVOUR", "TERMINATE", "HEAL", "OPERATE", "CHANGE_EXT_CONN", "MODIFY_INFO"]
- }
- },
- "operationStates": {
- "description": "Match particular LCM operation state values as reported in notifications of type VnfLcmOperationOccurrenceNotification. May be present if the \"notificationTypes\" attribute contains the value \"VnfLcmOperationOccurrenceNotification\", and shall be absent otherwise.\n",
- "type": "array",
- "items": {
- "description": "Value | Description ------|------------ STARTING | The LCM operation is starting. PROCESSING | The LCM operation is currently in execution. COMPLETED | he LCM operation has been completed successfully. FAILED_TEMP | The LCM operation has failed and execution has stopped, but the execution of the operation is not considered to be closed. FAILED | The LCM operation has failed and it cannot be retried or rolled back, as it is determined that such action won't succeed. ROLLING_BACK | The LCM operation is currently being rolled back. ROLLED_BACK | The LCM operation has been successfully rolled back, i.e. The state of the VNF prior to the original operation invocation has been restored as closely as possible.\n",
- "type": "string",
- "enum": ["STARTING", "PROCESSING", "COMPLETED", "FAILED_TEMP", "FAILED", "ROLLING_BACK", "ROLLED_BACK"]
- }
- }
- }
- },
- "callbackUri": {
- "description": "String formatted according to IETF RFC 3986.\n",
- "type": "string"
- },
- "_links": {
- "description": "Links to resources related to this resource.\n",
- "type": "object",
- "required": ["self"],
- "properties": {
- "self": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": ["href"],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- }
- }
- }
- }
- }
- },
- "303": {
- "description": "See Other\nA subscription with the same callbackURI and the same filter already exists and the policy of the VNFM is to not create redundant subscriptions. The HTTP response shall include a \"Location\" HTTP header that contains the resource URI of the existing subscription resource. The response body shall be empty.\n",
- "headers": {
- "Location": {
- "description": "The resource URI of the created VNF instance",
- "type": "string",
- "format": "url"
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- }
- },
- "400": {
- "description": "Bad Request\nIf the request is malformed or syntactically incorrect (e.g. if the request URI contains incorrect query parameters or a syntactically incorrect payload body), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem.\n ---\n\nIf the request contains a malformed access token, the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n ---\n\nIf there is an application error related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond with this response code.The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "401": {
- "description": "Unauthorized\nIf the request contains no access token even though one is required, or if the request contains an authorization token that is invalid (e.g. expired or revoked), the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "403": {
- "description": "Forbidden\nIf the API consumer is not allowed to perform a particular request to a particular resource, the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided. It should include in the \"detail\" attribute information about the source of the problem, and may indicate how to solve it.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "404": {
- "description": "Not Found\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request, or is not willing to disclose that one exists, it shall respond with this response code. Specifically in case of this task resource, the reason can also be that the task is not supported for the VNF LCM operation occurrence represented by the parent resource, and that the task resource consequently does not exist. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the sourceof the problem, e.g. a wrong resource URI variable.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "405": {
- "description": "Not Found\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request, or is not willing to disclose that one exists, it shall respond with this response code. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the source of the problem, e.g. a wrong resource URI variable.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "406": {
- "description": "Not Acceptable\nIf the \"Accept\" HTTP header does not contain at least one name of a content type that is acceptable to the API producer, the API producer shall respond with this response code. The \"ProblemDetails\" structure may be omitted in that case.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "500": {
- "description": "Internal Server Error\nIf there is an application error not related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond withthis response code. The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "503": {
- "description": "Service Unavailable\nIf the API producer encounters an internal overload situation of itself or of a system it relies on, it should respond with this response code, following the provisions in IETF RFC 7231 [13] for the use of the \"Retry-After\" HTTP header and for the alternative to refuse the connection. The \"ProblemDetails\" structure may be omitted.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- }
- }
- },
- "get": {
- "description": "Query Subscription Information\n\nThe GET method queries the list of active subscriptions of the functional block that invokes the method. It can be used e.g. for resynchronization after error situations.\n",
- "tags": ["Sol003VnfLcm"],
- "parameters": [{
- "name": "Accept",
- "description": "Content-Types that are acceptable for the response. Reference: IETF RFC 7231\n",
- "in": "header",
- "required": true,
- "type": "string"
- }, {
- "name": "Authorization",
- "description": "The authorization token for the request. Reference: IETF RFC 7235\n",
- "in": "header",
- "required": false,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK\nThe list of subscriptions was queried successfully. The response body shall contain the representations of all active subscriptions of the functional block that invokes the method.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "This type represents a subscription related to notifications about VNF lifecycle changes.\n",
- "type": "object",
- "required": ["id", "callbackUri", "_links"],
- "properties": {
- "id": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "filter": {
- "description": "This type represents a subscription filter related to notifications about VNF lifecycle changes. At a particular nesting level in the filter structure, the following applies: All attributes shall match in order for the filter to match (logical \"and\" between different filter attributes). If an attribute is an array, the attribute shall match if at least one of the values in the array matches (logical \"or\" between the values of one filter attribute).\n",
- "type": "object",
- "properties": {
- "vnfInstanceSubscriptionFilter": {
- "description": "This type represents subscription filter criteria to match VNF instances.\n",
- "type": "object",
- "properties": {
- "vnfdIds": {
- "description": "If present, match VNF instances that were created based on a VNFD identified by one of the vnfdId values listed in this attribute. The attributes \"vnfdIds\" and \"vnfProductsFromProviders\" are alternatives to reference to VNF instances that are based on certain VNFDs in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n",
- "type": "array",
- "items": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- }
- },
- "vnfProductsFromProviders": {
- "description": "If present, match VNF instances that belong to VNF products from certain providers. The attributes \"vnfdIds\" and \"vnfProductsFromProviders\" are alternatives to reference to VNF instances that are based on certain VNFDs in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": ["vnfProvider"],
- "properties": {
- "vnfProvider": {
- "description": "Name of the VNF provider to match.\n",
- "type": "string"
- },
- "vnfProducts": {
- "description": "If present, match VNF instances that belong to VNF products with certain product names, from one particular provider.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": ["vnfProductName"],
- "properties": {
- "vnfProductName": {
- "description": "Name of the VNF product to match.\n",
- "type": "string"
- },
- "versions": {
- "description": "If present, match VNF instances that belong to VNF products with certain versions and a certain product name, from one particular provider.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": ["vnfSoftwareVersion"],
- "properties": {
- "vnfSoftwareVersion": {
- "description": "A version.\n",
- "type": "string"
- },
- "vnfdVersions": {
- "description": "If present, match VNF instances that belong to VNF products with certain VNFD versions, a certain software version and a certain product name, from one particular provider.\n",
- "type": "array",
- "items": {
- "description": "A version.\n",
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "vnfInstanceIds": {
- "description": "If present, match VNF instances with an instance identifier listed in this attribute. The attributes \"vnfInstanceIds\" and \"vnfInstanceNames\" are alternatives to reference to particular VNF Instances in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n",
- "type": "array",
- "items": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- }
- },
- "vnfInstanceNames": {
- "description": "If present, match VNF instances with a VNF Instance Name listed in this attribute. The attributes \"vnfInstanceIds\" and \"vnfInstanceNames\" are alternatives to reference to particular VNF Instances in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- },
- "notificationTypes": {
- "description": "Match particular notification types. Permitted values: * VnfLcmOperationOccurrenceNotification * VnfIdentifierCreationNotification * VnfIdentifierDeletionNotification The permitted values of the \"notificationTypes\" attribute are spelled exactly as the names of the notification types to facilitate automated code generation systems.\n",
- "type": "array",
- "items": {
- "type": "string",
- "enum": ["VnfLcmOperationOccurrenceNotification", "VnfIdentifierCreationNotification", "VnfIdentifierDeletionNotification"]
- }
- },
- "operationTypes": {
- "description": "Match particular VNF lifecycle operation types for the notification of type VnfLcmOperationOccurrenceNotification. May be present if the \"notificationTypes\" attribute contains the value \"VnfLcmOperationOccurrenceNotification\", and shall be absent otherwise.\n",
- "type": "array",
- "items": {
- "description": "Value | Description ------|------------ INSTANTIATE | Represents the \"Instantiate VNF\" LCM operation. SCALE | Represents the \"Scale VNF\" LCM operation. SCALE_TO_LEVEL | Represents the \"Scale VNF to Level\" LCM operation. CHANGE_FLAVOUR | Represents the \"Change VNF Flavour\" LCM operation. TERMINATE | Represents the \"Terminate VNF\" LCM operation. HEAL | Represents the \"Heal VNF\" LCM operation. OPERATE | Represents the \"Operate VNF\" LCM operation. CHANGE_EXT_CONN | Represents the \"Change external VNF connectivity\" LCM operation. MODIFY_INFO | Represents the \"Modify VNF Information\" LCM operation.\n",
- "type": "string",
- "enum": ["INSTANTIATE", "SCALE", "SCALE_TO_LEVEL", "CHANGE_FLAVOUR", "TERMINATE", "HEAL", "OPERATE", "CHANGE_EXT_CONN", "MODIFY_INFO"]
- }
- },
- "operationStates": {
- "description": "Match particular LCM operation state values as reported in notifications of type VnfLcmOperationOccurrenceNotification. May be present if the \"notificationTypes\" attribute contains the value \"VnfLcmOperationOccurrenceNotification\", and shall be absent otherwise.\n",
- "type": "array",
- "items": {
- "description": "Value | Description ------|------------ STARTING | The LCM operation is starting. PROCESSING | The LCM operation is currently in execution. COMPLETED | he LCM operation has been completed successfully. FAILED_TEMP | The LCM operation has failed and execution has stopped, but the execution of the operation is not considered to be closed. FAILED | The LCM operation has failed and it cannot be retried or rolled back, as it is determined that such action won't succeed. ROLLING_BACK | The LCM operation is currently being rolled back. ROLLED_BACK | The LCM operation has been successfully rolled back, i.e. The state of the VNF prior to the original operation invocation has been restored as closely as possible.\n",
- "type": "string",
- "enum": ["STARTING", "PROCESSING", "COMPLETED", "FAILED_TEMP", "FAILED", "ROLLING_BACK", "ROLLED_BACK"]
- }
- }
- }
- },
- "callbackUri": {
- "description": "String formatted according to IETF RFC 3986.\n",
- "type": "string"
- },
- "_links": {
- "description": "Links to resources related to this resource.\n",
- "type": "object",
- "required": ["self"],
- "properties": {
- "self": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": ["href"],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- }
- }
- }
- }
- }
- },
- "400": {
- "description": "Bad Request\nInvalid attribute-based filtering parameters. The response body shall contain a ProblemDetails structure, in which the \"detail\" attribute should convey more information about the error.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "401": {
- "description": "Unauthorized\nIf the request contains no access token even though one is required, or if the request contains an authorization token that is invalid (e.g. expired or revoked), the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "403": {
- "description": "Forbidden\nIf the API consumer is not allowed to perform a particular request to a particular resource, the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided. It should include in the \"detail\" attribute information about the source of the problem, and may indicate how to solve it.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "404": {
- "description": "Not Found\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request, or is not willing to disclose that one exists, it shall respond with this response code. Specifically in case of this task resource, the reason can also be that the task is not supported for the VNF LCM operation occurrence represented by the parent resource, and that the task resource consequently does not exist. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the sourceof the problem, e.g. a wrong resource URI variable.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "405": {
- "description": "Not Found\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request, or is not willing to disclose that one exists, it shall respond with this response code. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the source of the problem, e.g. a wrong resource URI variable.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "406": {
- "description": "Not Acceptable\nIf the \"Accept\" HTTP header does not contain at least one name of a content type that is acceptable to the API producer, the API producer shall respond with this response code. The \"ProblemDetails\" structure may be omitted in that case.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "500": {
- "description": "Internal Server Error\nIf there is an application error not related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond withthis response code. The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "503": {
- "description": "Service Unavailable\nIf the API producer encounters an internal overload situation of itself or of a system it relies on, it should respond with this response code, following the provisions in IETF RFC 7231 [13] for the use of the \"Retry-After\" HTTP header and for the alternative to refuse the connection. The \"ProblemDetails\" structure may be omitted.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- }
- }
- }
- },
- "/subscriptions/{subscriptionId}": {
- "parameters": [{
- "name": "subscriptionId",
- "description": "Identifier of this subscription. This identifier can be retrieved from the resource referenced by the \"Location\" HTTP header in the response to a POST request creating a new subscription resource. It can also be retrieved from the \"id\" attribute in the payload body of that response.\n",
- "in": "path",
- "type": "string",
- "required": true
- }
- ],
- "get": {
- "description": "Query Subscription Information\n\nThe GET method retrieves information about a subscription by reading an individual subscription resource.\n",
- "tags": ["Sol003VnfLcm"],
- "parameters": [{
- "name": "Accept",
- "description": "Content-Types that are acceptable for the response. Reference: IETF RFC 7231\n",
- "in": "header",
- "required": true,
- "type": "string"
- }, {
- "name": "Authorization",
- "description": "The authorization token for the request. Reference: IETF RFC 7235\n",
- "in": "header",
- "required": false,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "OK\nThe operation has completed successfully. The response body shall contain a representation of the subscription resource.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "This type represents a subscription related to notifications about VNF lifecycle changes.\n",
- "type": "object",
- "required": ["id", "callbackUri", "_links"],
- "properties": {
- "id": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "filter": {
- "description": "This type represents a subscription filter related to notifications about VNF lifecycle changes. At a particular nesting level in the filter structure, the following applies: All attributes shall match in order for the filter to match (logical \"and\" between different filter attributes). If an attribute is an array, the attribute shall match if at least one of the values in the array matches (logical \"or\" between the values of one filter attribute).\n",
- "type": "object",
- "properties": {
- "vnfInstanceSubscriptionFilter": {
- "description": "This type represents subscription filter criteria to match VNF instances.\n",
- "type": "object",
- "properties": {
- "vnfdIds": {
- "description": "If present, match VNF instances that were created based on a VNFD identified by one of the vnfdId values listed in this attribute. The attributes \"vnfdIds\" and \"vnfProductsFromProviders\" are alternatives to reference to VNF instances that are based on certain VNFDs in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n",
- "type": "array",
- "items": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- }
- },
- "vnfProductsFromProviders": {
- "description": "If present, match VNF instances that belong to VNF products from certain providers. The attributes \"vnfdIds\" and \"vnfProductsFromProviders\" are alternatives to reference to VNF instances that are based on certain VNFDs in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": ["vnfProvider"],
- "properties": {
- "vnfProvider": {
- "description": "Name of the VNF provider to match.\n",
- "type": "string"
- },
- "vnfProducts": {
- "description": "If present, match VNF instances that belong to VNF products with certain product names, from one particular provider.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": ["vnfProductName"],
- "properties": {
- "vnfProductName": {
- "description": "Name of the VNF product to match.\n",
- "type": "string"
- },
- "versions": {
- "description": "If present, match VNF instances that belong to VNF products with certain versions and a certain product name, from one particular provider.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": ["vnfSoftwareVersion"],
- "properties": {
- "vnfSoftwareVersion": {
- "description": "A version.\n",
- "type": "string"
- },
- "vnfdVersions": {
- "description": "If present, match VNF instances that belong to VNF products with certain VNFD versions, a certain software version and a certain product name, from one particular provider.\n",
- "type": "array",
- "items": {
- "description": "A version.\n",
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "vnfInstanceIds": {
- "description": "If present, match VNF instances with an instance identifier listed in this attribute. The attributes \"vnfInstanceIds\" and \"vnfInstanceNames\" are alternatives to reference to particular VNF Instances in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n",
- "type": "array",
- "items": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- }
- },
- "vnfInstanceNames": {
- "description": "If present, match VNF instances with a VNF Instance Name listed in this attribute. The attributes \"vnfInstanceIds\" and \"vnfInstanceNames\" are alternatives to reference to particular VNF Instances in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- },
- "notificationTypes": {
- "description": "Match particular notification types. Permitted values: * VnfLcmOperationOccurrenceNotification * VnfIdentifierCreationNotification * VnfIdentifierDeletionNotification The permitted values of the \"notificationTypes\" attribute are spelled exactly as the names of the notification types to facilitate automated code generation systems.\n",
- "type": "array",
- "items": {
- "type": "string",
- "enum": ["VnfLcmOperationOccurrenceNotification", "VnfIdentifierCreationNotification", "VnfIdentifierDeletionNotification"]
- }
- },
- "operationTypes": {
- "description": "Match particular VNF lifecycle operation types for the notification of type VnfLcmOperationOccurrenceNotification. May be present if the \"notificationTypes\" attribute contains the value \"VnfLcmOperationOccurrenceNotification\", and shall be absent otherwise.\n",
- "type": "array",
- "items": {
- "description": "Value | Description ------|------------ INSTANTIATE | Represents the \"Instantiate VNF\" LCM operation. SCALE | Represents the \"Scale VNF\" LCM operation. SCALE_TO_LEVEL | Represents the \"Scale VNF to Level\" LCM operation. CHANGE_FLAVOUR | Represents the \"Change VNF Flavour\" LCM operation. TERMINATE | Represents the \"Terminate VNF\" LCM operation. HEAL | Represents the \"Heal VNF\" LCM operation. OPERATE | Represents the \"Operate VNF\" LCM operation. CHANGE_EXT_CONN | Represents the \"Change external VNF connectivity\" LCM operation. MODIFY_INFO | Represents the \"Modify VNF Information\" LCM operation.\n",
- "type": "string",
- "enum": ["INSTANTIATE", "SCALE", "SCALE_TO_LEVEL", "CHANGE_FLAVOUR", "TERMINATE", "HEAL", "OPERATE", "CHANGE_EXT_CONN", "MODIFY_INFO"]
- }
- },
- "operationStates": {
- "description": "Match particular LCM operation state values as reported in notifications of type VnfLcmOperationOccurrenceNotification. May be present if the \"notificationTypes\" attribute contains the value \"VnfLcmOperationOccurrenceNotification\", and shall be absent otherwise.\n",
- "type": "array",
- "items": {
- "description": "Value | Description ------|------------ STARTING | The LCM operation is starting. PROCESSING | The LCM operation is currently in execution. COMPLETED | he LCM operation has been completed successfully. FAILED_TEMP | The LCM operation has failed and execution has stopped, but the execution of the operation is not considered to be closed. FAILED | The LCM operation has failed and it cannot be retried or rolled back, as it is determined that such action won't succeed. ROLLING_BACK | The LCM operation is currently being rolled back. ROLLED_BACK | The LCM operation has been successfully rolled back, i.e. The state of the VNF prior to the original operation invocation has been restored as closely as possible.\n",
- "type": "string",
- "enum": ["STARTING", "PROCESSING", "COMPLETED", "FAILED_TEMP", "FAILED", "ROLLING_BACK", "ROLLED_BACK"]
- }
- }
- }
- },
- "callbackUri": {
- "description": "String formatted according to IETF RFC 3986.\n",
- "type": "string"
- },
- "_links": {
- "description": "Links to resources related to this resource.\n",
- "type": "object",
- "required": ["self"],
- "properties": {
- "self": {
- "description": "This type represents a link to a resource.\n",
- "type": "object",
- "required": ["href"],
- "properties": {
- "href": {
- "description": "URI of the referenced resource.\n",
- "type": "string",
- "format": "url"
- }
- }
- }
- }
- }
- }
- }
- },
- "400": {
- "description": "Bad Request\nIf the request is malformed or syntactically incorrect (e.g. if the request URI contains incorrect query parameters or a syntactically incorrect payload body), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem.\n ---\n\nIf the request contains a malformed access token, the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n ---\n\nIf there is an application error related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond with this response code.The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "401": {
- "description": "Unauthorized\nIf the request contains no access token even though one is required, or if the request contains an authorization token that is invalid (e.g. expired or revoked), the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "403": {
- "description": "Forbidden\nIf the API consumer is not allowed to perform a particular request to a particular resource, the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided. It should include in the \"detail\" attribute information about the source of the problem, and may indicate how to solve it.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "404": {
- "description": "Not Found\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request, or is not willing to disclose that one exists, it shall respond with this response code. Specifically in case of this task resource, the reason can also be that the task is not supported for the VNF LCM operation occurrence represented by the parent resource, and that the task resource consequently does not exist. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the sourceof the problem, e.g. a wrong resource URI variable.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "405": {
- "description": "Not Found\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request, or is not willing to disclose that one exists, it shall respond with this response code. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the source of the problem, e.g. a wrong resource URI variable.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "406": {
- "description": "Not Acceptable\nIf the \"Accept\" HTTP header does not contain at least one name of a content type that is acceptable to the API producer, the API producer shall respond with this response code. The \"ProblemDetails\" structure may be omitted in that case.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "500": {
- "description": "Internal Server Error\nIf there is an application error not related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond withthis response code. The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "503": {
- "description": "Service Unavailable\nIf the API producer encounters an internal overload situation of itself or of a system it relies on, it should respond with this response code, following the provisions in IETF RFC 7231 [13] for the use of the \"Retry-After\" HTTP header and for the alternative to refuse the connection. The \"ProblemDetails\" structure may be omitted.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- }
- }
- },
- "delete": {
- "description": "Terminate Subscription\n\nThe DELETE method terminates an individual subscription.\n",
- "tags": ["Sol003VnfLcm"],
- "parameters": [{
- "name": "Authorization",
- "description": "The authorization token for the request. Reference: IETF RFC 7235\n",
- "in": "header",
- "required": false,
- "type": "string"
- }
- ],
- "responses": {
- "204": {
- "description": "No Content\nThe subscription resource was deleted successfully. The response body shall be empty.\n",
- "headers": {
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- }
- },
- "400": {
- "description": "Bad Request\nIf the request is malformed or syntactically incorrect (e.g. if the request URI contains incorrect query parameters or a syntactically incorrect payload body), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem.\n ---\n\nIf the request contains a malformed access token, the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n ---\n\nIf there is an application error related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond with this response code.The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "401": {
- "description": "Unauthorized\nIf the request contains no access token even though one is required, or if the request contains an authorization token that is invalid (e.g. expired or revoked), the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "403": {
- "description": "Forbidden\nIf the API consumer is not allowed to perform a particular request to a particular resource, the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided. It should include in the \"detail\" attribute information about the source of the problem, and may indicate how to solve it.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "404": {
- "description": "Not Found\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request, or is not willing to disclose that one exists, it shall respond with this response code. Specifically in case of this task resource, the reason can also be that the task is not supported for the VNF LCM operation occurrence represented by the parent resource, and that the task resource consequently does not exist. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the sourceof the problem, e.g. a wrong resource URI variable.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "405": {
- "description": "Not Found\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request, or is not willing to disclose that one exists, it shall respond with this response code. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the source of the problem, e.g. a wrong resource URI variable.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "406": {
- "description": "Not Acceptable\nIf the \"Accept\" HTTP header does not contain at least one name of a content type that is acceptable to the API producer, the API producer shall respond with this response code. The \"ProblemDetails\" structure may be omitted in that case.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "500": {
- "description": "Internal Server Error\nIf there is an application error not related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond withthis response code. The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "503": {
- "description": "Service Unavailable\nIf the API producer encounters an internal overload situation of itself or of a system it relies on, it should respond with this response code, following the provisions in IETF RFC 7231 [13] for the use of the \"Retry-After\" HTTP header and for the alternative to refuse the connection. The \"ProblemDetails\" structure may be omitted.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- }
- }
- }
- }
- }
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/pom.xml b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/pom.xml
deleted file mode 100644
index 5bcc43f2bd..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/pom.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.onap.so.adapters</groupId>
- <artifactId>etsi-sol003-adapter</artifactId>
- <version>1.7.1-SNAPSHOT</version>
- </parent>
- <artifactId>etsi-sol003-lcm</artifactId>
- <name>ETSI SOL003 Life Cycle Management</name>
- <packaging>pom</packaging>
- <modules>
- <module>etsi-sol003-lcm-api</module>
- <module>etsi-sol003-lcm-ext-clients</module>
- <module>etsi-sol003-lcm-adapter</module>
- </modules>
-</project> \ No newline at end of file
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/pom.xml b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/pom.xml
deleted file mode 100644
index fd4dc0d972..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/pom.xml
+++ /dev/null
@@ -1,109 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.onap.so.adapters</groupId>
- <artifactId>etsi-sol003-pkgm</artifactId>
- <version>1.7.1-SNAPSHOT</version>
- </parent>
- <artifactId>etsi-sol003-pkgm-adapter</artifactId>
- <name>ETSI SOL003 VNF Package Management Adapter</name>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.jacoco</groupId>
- <artifactId>jacoco-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <systemPropertyVariables>
- <so.log.level>DEBUG</so.log.level>
- </systemPropertyVariables>
- <rerunFailingTestsCount>2</rerunFailingTestsCount>
- <parallel>suites</parallel>
- <useUnlimitedThreads>false</useUnlimitedThreads>
- <threadCount>1</threadCount>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-web</artifactId>
- <exclusions>
- <exclusion>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-databind</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-security</artifactId>
- <exclusions>
- <exclusion>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-tomcat</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-actuator</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-test</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.onap.so</groupId>
- <artifactId>common</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.so.adapters</groupId>
- <artifactId>etsi-sol003-adapter-common</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.so.adapters</groupId>
- <artifactId>etsi-sol003-pkgm-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.so.adapters</groupId>
- <artifactId>etsi-sol003-pkgm-ext-clients</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.glassfish.jersey.core</groupId>
- <artifactId>jersey-client</artifactId>
- </dependency>
- <dependency>
- <groupId>org.glassfish.jersey.core</groupId>
- <artifactId>jersey-common</artifactId>
- </dependency>
- <dependency>
- <groupId>org.glassfish.jersey.inject</groupId>
- <artifactId>jersey-hk2</artifactId>
- </dependency>
- <dependency>
- <groupId>org.glassfish.jersey.media</groupId>
- <artifactId>jersey-media-json-jackson</artifactId>
- </dependency>
- <dependency>
- <groupId>org.yaml</groupId>
- <artifactId>snakeyaml</artifactId>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-</project> \ No newline at end of file
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/ConversionServiceConfiguration.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/ConversionServiceConfiguration.java
deleted file mode 100644
index fd19d0e0a1..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/ConversionServiceConfiguration.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2020 Ericsson. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.adapters.etsisol003adapter.pkgm;
-
-import org.onap.so.adapters.etsi.sol003.adapter.common.VnfmAdapterUrlProvider;
-import org.onap.so.adapters.etsisol003adapter.pkgm.converters.etsicatalog.sol003.PkgChangeNotificationConverter;
-import org.onap.so.adapters.etsisol003adapter.pkgm.converters.etsicatalog.sol003.PkgOnboardingNotificationConverter;
-import org.onap.so.adapters.etsisol003adapter.pkgm.converters.etsicatalog.sol003.VnfPkgInfoConverter;
-import org.onap.so.adapters.etsisol003adapter.pkgm.converters.sol003.etsicatalog.PkgmSubscriptionRequestConverter;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.Bean;
-import org.springframework.core.convert.ConversionService;
-import org.springframework.core.convert.support.DefaultConversionService;
-
-/**
- * @author Waqas Ikram (waqas.ikram@est.tech)
- *
- */
-public class ConversionServiceConfiguration {
-
- private final VnfmAdapterUrlProvider vnfmAdapterUrlProvider;
-
- @Autowired
- public ConversionServiceConfiguration(final VnfmAdapterUrlProvider vnfmAdapterUrlProvider) {
- this.vnfmAdapterUrlProvider = vnfmAdapterUrlProvider;
- }
-
- @Bean
- public ConversionService conversionService() {
- final DefaultConversionService service = new DefaultConversionService();
- service.addConverter(new VnfPkgInfoConverter(vnfmAdapterUrlProvider));
- service.addConverter(new PkgmSubscriptionRequestConverter());
- service.addConverter(new PkgChangeNotificationConverter(vnfmAdapterUrlProvider));
- service.addConverter(new PkgOnboardingNotificationConverter(vnfmAdapterUrlProvider));
- return service;
- }
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/PackageManagementConstants.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/PackageManagementConstants.java
deleted file mode 100644
index 5922aab9ca..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/PackageManagementConstants.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.pkgm;
-
-/**
- * ETSI SOL003 VNF Package Management Adapter constants
- *
- * @author Ronan Kenny (ronan.kenny@est.tech)
- * @author Gareth Roper (gareth.roper@est.tech)
- */
-public class PackageManagementConstants {
-
- public static final String APPLICATION_ZIP = "application/zip";
-
- /**
- * Name of the subscription cache
- */
- public static final String PACKAGE_MANAGEMENT_SUBSCRIPTION_CACHE = "PackageManagementSubscriptionCache";
-
- private PackageManagementConstants() {}
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/cache/AbstractCacheServiceProvider.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/cache/AbstractCacheServiceProvider.java
deleted file mode 100644
index 6dd67faa9e..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/cache/AbstractCacheServiceProvider.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.pkgm.cache;
-
-import org.springframework.cache.Cache;
-import org.springframework.cache.CacheManager;
-
-/**
- * @author Ronan Kenny (ronan.kenny@est.tech)
- * @author Gareth Roper (gareth.roper@est.tech)
- */
-public abstract class AbstractCacheServiceProvider {
-
- private final CacheManager cacheManager;
- private final String cacheName;
-
- public AbstractCacheServiceProvider(final String cacheName, final CacheManager cacheManager) {
- this.cacheName = cacheName;
- this.cacheManager = cacheManager;
- }
-
- public Cache getCache() {
- final Cache cache = cacheManager.getCache(cacheName);
- if (cache == null) {
- throw new CacheNotFoundException("Unable to find " + cacheName + " cache");
- }
- return cache;
- }
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/cache/CacheManagerConfiguration.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/cache/CacheManagerConfiguration.java
deleted file mode 100644
index c184a25bef..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/cache/CacheManagerConfiguration.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2020 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.pkgm.cache;
-
-import java.util.Arrays;
-import org.onap.so.adapters.etsisol003adapter.pkgm.PackageManagementConstants;
-import org.springframework.cache.Cache;
-import org.springframework.cache.CacheManager;
-import org.springframework.cache.concurrent.ConcurrentMapCache;
-import org.springframework.cache.support.SimpleCacheManager;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-/**
- * @author Ronan Kenny (ronan.kenny@est.tech)
- * @author Gareth Roper (gareth.roper@est.tech)
- */
-@Configuration
-public class CacheManagerConfiguration {
-
- @Bean
- public CacheManager cacheManager() {
- final SimpleCacheManager manager = new SimpleCacheManager();
- manager.setCaches(Arrays.asList(getCache(PackageManagementConstants.PACKAGE_MANAGEMENT_SUBSCRIPTION_CACHE)));
-
- return manager;
- }
-
- private Cache getCache(final String name) {
- return new ConcurrentMapCache(name);
- }
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/cache/CacheNotFoundException.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/cache/CacheNotFoundException.java
deleted file mode 100644
index 6b2f4710da..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/cache/CacheNotFoundException.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2020 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.pkgm.cache;
-
-/**
- * Exception for failure to find the cache.
- *
- * @author Ronan Kenny (ronan.kenny@est.tech)
- * @author Gareth Roper (gareth.roper@est.tech)
- *
- */
-public class CacheNotFoundException extends RuntimeException {
-
- private static final long serialVersionUID = -372361485260755367L;
-
- public CacheNotFoundException(final String message) {
- super(message);
- }
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/cache/PkgmCacheServiceProvider.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/cache/PkgmCacheServiceProvider.java
deleted file mode 100644
index 34ed1cfc0c..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/cache/PkgmCacheServiceProvider.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2020 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.pkgm.cache;
-
-import java.util.Map;
-import java.util.Optional;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.PkgmSubscriptionRequest;
-
-/**
- * Interface which provides methods for communicating with the cache
- *
- * @author Ronan Kenny (ronan.kenny@est.tech)
- * @author Gareth Roper (gareth.roper@est.tech)
- *
- */
-public interface PkgmCacheServiceProvider {
-
- /**
- * Checks cache if subscription request Id is already present. If not, it adds the subscription to the cache.
- *
- * @param subscriptionId
- * @param pkgmSubscriptionRequest
- */
- void addSubscription(final String subscriptionId, final PkgmSubscriptionRequest pkgmSubscriptionRequest);
-
- /**
- * Gets individual subscription from cache
- *
- * @param subscriptionId
- * @return <AbstractMap.SimpleImmutableEntry<String, PkgmSubscriptionRequest>>
- */
- Optional<PkgmSubscriptionRequest> getSubscription(final String subscriptionId);
-
- /**
- * Gets Map of subscriptions from cache
- *
- * @return Map<String, PkgmSubscriptionRequest>>
- */
- Map<String, PkgmSubscriptionRequest> getSubscriptions();
-
- /**
- * Delete subscription from cache
- *
- * @param subscriptionId
- * @return Boolean
- */
- boolean deleteSubscription(final String subscriptionId);
-
- /**
- * Checks if subscription exists in cache and return its subscriptionId
- *
- * @param pkgmSubscriptionRequest
- * @return Subscription Id
- */
- Optional<String> getSubscriptionId(final PkgmSubscriptionRequest pkgmSubscriptionRequest);
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/cache/PkgmCacheServiceProviderImpl.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/cache/PkgmCacheServiceProviderImpl.java
deleted file mode 100644
index 4811132e92..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/cache/PkgmCacheServiceProviderImpl.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2020 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.pkgm.cache;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Optional;
-import java.util.concurrent.ConcurrentHashMap;
-import org.onap.so.adapters.etsisol003adapter.pkgm.PackageManagementConstants;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.PkgmSubscriptionRequest;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.cache.Cache;
-import org.springframework.cache.CacheManager;
-import org.springframework.stereotype.Service;
-
-/**
- * Implementation which provides methods for communicating with the cache
- *
- * @author Ronan Kenny (ronan.kenny@est.tech)
- * @author Gareth Roper (gareth.roper@est.tech)
- */
-@Service
-public class PkgmCacheServiceProviderImpl extends AbstractCacheServiceProvider implements PkgmCacheServiceProvider {
-
- private static final Logger LOGGER = LoggerFactory.getLogger(PkgmCacheServiceProviderImpl.class);
-
- @Autowired
- public PkgmCacheServiceProviderImpl(final CacheManager cacheManager) {
- super(PackageManagementConstants.PACKAGE_MANAGEMENT_SUBSCRIPTION_CACHE, cacheManager);
- }
-
- @Override
- public void addSubscription(final String subscriptionId, final PkgmSubscriptionRequest pkgmSubscriptionRequest) {
- LOGGER.debug("Adding {} to cache with subscription id: {}", pkgmSubscriptionRequest, subscriptionId);
- getCache().put(subscriptionId, pkgmSubscriptionRequest);
- }
-
- @Override
- public Optional<PkgmSubscriptionRequest> getSubscription(final String subscriptionId) {
- LOGGER.debug("Getting subscription from cache using Id: {}", subscriptionId);
- final Cache cache = getCache();
- final PkgmSubscriptionRequest cacheValue = cache.get(subscriptionId, PkgmSubscriptionRequest.class);
- if (cacheValue != null) {
- return Optional.of(cacheValue);
- }
- LOGGER.error("Unable to find Subscription in cache using Id: {}", subscriptionId);
- return Optional.empty();
- }
-
- @Override
- public Map<String, PkgmSubscriptionRequest> getSubscriptions() {
- LOGGER.info("Getting all subscriptions from cache");
- final Cache cache = getCache();
-
- final Object nativeCache = cache.getNativeCache();
- if (nativeCache instanceof ConcurrentHashMap) {
- @SuppressWarnings("unchecked")
- final ConcurrentHashMap<Object, Object> concurrentHashMap = (ConcurrentHashMap<Object, Object>) nativeCache;
- final Map<String, PkgmSubscriptionRequest> result = new HashMap<>();
- concurrentHashMap.keySet().forEach(key -> {
- final Optional<PkgmSubscriptionRequest> optional = getSubscription(key.toString());
- optional.ifPresent(pkgmSubscriptionRequest -> result.put(key.toString(), pkgmSubscriptionRequest));
- });
- return result;
- }
- LOGGER.error("Unable to find Subscriptions in cache");
- return Collections.emptyMap();
- }
-
- @Override
- public boolean deleteSubscription(final String subscriptionId) {
- final Cache cache = getCache();
- final Optional<PkgmSubscriptionRequest> optional = getSubscription(subscriptionId);
- if (optional.isPresent()) {
- cache.evict(subscriptionId);
- return true;
- }
- return false;
- }
-
- @Override
- public Optional<String> getSubscriptionId(final PkgmSubscriptionRequest pkgmSubscriptionRequest) {
- final Cache cache = getCache();
- final Object nativeCache = cache.getNativeCache();
- if (nativeCache instanceof ConcurrentHashMap) {
- @SuppressWarnings("unchecked")
- final ConcurrentHashMap<Object, Object> concurrentHashMap = (ConcurrentHashMap<Object, Object>) nativeCache;
- final Optional<Entry<Object, Object>> optional = concurrentHashMap.entrySet().stream()
- .filter(entry -> entry.getValue().equals(pkgmSubscriptionRequest)).findAny();
- if (optional.isPresent()) {
- return Optional.of(optional.get().getKey().toString());
- }
- }
- return Optional.empty();
- }
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/converters/etsicatalog/sol003/AbstractPkgNotificationConverter.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/converters/etsicatalog/sol003/AbstractPkgNotificationConverter.java
deleted file mode 100644
index 5f2ee1d5ab..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/converters/etsicatalog/sol003/AbstractPkgNotificationConverter.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2020 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.pkgm.converters.etsicatalog.sol003;
-
-import org.onap.so.adapters.etsi.sol003.adapter.common.VnfmAdapterUrlProvider;
-import org.onap.so.adapters.etsisol003adapter.etsicatalog.notification.model.PkgmLinks;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.vnfm.notification.model.URIisprovidedbytheclientwhencreatingthesubscriptionVnfPackageOnboardingNotificationLinks;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.vnfm.notification.model.URIisprovidedbytheclientwhencreatingthesubscriptionVnfPackageOnboardingNotificationLinksVnfPackage;
-
-/**
- * A base class that can be extended by classes for converting Etsi Catalog Manager Pkg Notification classes. Provides
- * common methods that will be useful to those classes.
- *
- * @author andrew.a.lamb@est.tech
- */
-abstract public class AbstractPkgNotificationConverter {
-
- private final VnfmAdapterUrlProvider vnfmAdapterUrlProvider;
-
- public AbstractPkgNotificationConverter(final VnfmAdapterUrlProvider vnfmAdapterUrlProvider) {
- this.vnfmAdapterUrlProvider = vnfmAdapterUrlProvider;
- }
-
- protected URIisprovidedbytheclientwhencreatingthesubscriptionVnfPackageOnboardingNotificationLinks convert(
- final PkgmLinks pkgmLinks, final String vnfPkgId, final String subscriptionId) {
- final URIisprovidedbytheclientwhencreatingthesubscriptionVnfPackageOnboardingNotificationLinksVnfPackage linksVnfPackage =
- new URIisprovidedbytheclientwhencreatingthesubscriptionVnfPackageOnboardingNotificationLinksVnfPackage();
- if (pkgmLinks.getVnfPackage() != null) {
- linksVnfPackage.setHref(vnfmAdapterUrlProvider.getVnfPackageUrl(vnfPkgId));
- }
-
- final URIisprovidedbytheclientwhencreatingthesubscriptionVnfPackageOnboardingNotificationLinksVnfPackage linksSubscription =
- new URIisprovidedbytheclientwhencreatingthesubscriptionVnfPackageOnboardingNotificationLinksVnfPackage();
- if (pkgmLinks.getSubscription() != null) {
- linksSubscription.setHref(vnfmAdapterUrlProvider.getSubscriptionUriString(subscriptionId));
- }
-
- final URIisprovidedbytheclientwhencreatingthesubscriptionVnfPackageOnboardingNotificationLinks links =
- new URIisprovidedbytheclientwhencreatingthesubscriptionVnfPackageOnboardingNotificationLinks();
- links.setVnfPackage(linksVnfPackage);
- links.setSubscription(linksSubscription);
- return links;
- }
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/converters/etsicatalog/sol003/PkgChangeNotificationConverter.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/converters/etsicatalog/sol003/PkgChangeNotificationConverter.java
deleted file mode 100644
index 5787d35b9a..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/converters/etsicatalog/sol003/PkgChangeNotificationConverter.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2020 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.pkgm.converters.etsicatalog.sol003;
-
-import static org.slf4j.LoggerFactory.getLogger;
-import org.onap.so.adapters.etsi.sol003.adapter.common.VnfmAdapterUrlProvider;
-import org.onap.so.adapters.etsisol003adapter.etsicatalog.notification.model.PkgChangeNotification;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.vnfm.notification.model.VnfPackageChangeNotification;
-import org.slf4j.Logger;
-import org.springframework.core.convert.converter.Converter;
-import org.springframework.stereotype.Service;
-
-/**
- * Converter to convert from an Etsi Catalog Manager {@link PkgChangeNotification} Object to its equivalent SOL003
- * {@link VnfPackageChangeNotification} Object
- *
- * @author andrew.a.lamb@est.tech
- */
-@Service
-public class PkgChangeNotificationConverter extends AbstractPkgNotificationConverter
- implements Converter<PkgChangeNotification, VnfPackageChangeNotification> {
- private static final Logger logger = getLogger(PkgChangeNotificationConverter.class);
-
- public PkgChangeNotificationConverter(final VnfmAdapterUrlProvider vnfmAdapterUrlProvider) {
- super(vnfmAdapterUrlProvider);
- }
-
- /**
- * Convert a {@link PkgChangeNotification} Object to an {@link VnfPackageChangeNotification} Object
- *
- * @param pkgChangeNotification The PkgChangeNotification Object to Convert
- * @return The Converted VnfPackageChangeNotification Object
- */
- @Override
- public VnfPackageChangeNotification convert(final PkgChangeNotification pkgChangeNotification) {
- logger.info("Converting PkgChangeNotification\n{}", pkgChangeNotification.toString());
- final VnfPackageChangeNotification vnfPackageChangeNotification = new VnfPackageChangeNotification();
- vnfPackageChangeNotification.setId(pkgChangeNotification.getId());
-
- if (pkgChangeNotification.getNotificationType() != null) {
- vnfPackageChangeNotification.setNotificationType(VnfPackageChangeNotification.NotificationTypeEnum
- .fromValue(pkgChangeNotification.getNotificationType().getValue()));
- }
-
- vnfPackageChangeNotification.setSubscriptionId(pkgChangeNotification.getSubscriptionId());
- vnfPackageChangeNotification.setTimeStamp(pkgChangeNotification.getTimeStamp());
- vnfPackageChangeNotification.setVnfPkgId(pkgChangeNotification.getVnfPkgId());
-
- vnfPackageChangeNotification.setVnfdId(pkgChangeNotification.getVnfdId());
-
- if (pkgChangeNotification.getChangeType() != null) {
- vnfPackageChangeNotification.setChangeType(VnfPackageChangeNotification.ChangeTypeEnum
- .fromValue(pkgChangeNotification.getChangeType().getValue()));
- }
-
- if (pkgChangeNotification.getOperationalState() != null) {
- vnfPackageChangeNotification.setOperationalState(VnfPackageChangeNotification.OperationalStateEnum
- .fromValue(pkgChangeNotification.getOperationalState().getValue()));
- }
-
- vnfPackageChangeNotification.setLinks(convert(pkgChangeNotification.getLinks(),
- pkgChangeNotification.getVnfPkgId(), pkgChangeNotification.getSubscriptionId()));
-
- return vnfPackageChangeNotification;
- }
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/converters/etsicatalog/sol003/PkgOnboardingNotificationConverter.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/converters/etsicatalog/sol003/PkgOnboardingNotificationConverter.java
deleted file mode 100644
index 96a5d827e6..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/converters/etsicatalog/sol003/PkgOnboardingNotificationConverter.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2020 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.pkgm.converters.etsicatalog.sol003;
-
-import static org.slf4j.LoggerFactory.getLogger;
-import org.onap.so.adapters.etsi.sol003.adapter.common.VnfmAdapterUrlProvider;
-import org.onap.so.adapters.etsisol003adapter.etsicatalog.notification.model.PkgOnboardingNotification;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.vnfm.notification.model.VnfPackageOnboardingNotification;
-import org.slf4j.Logger;
-import org.springframework.core.convert.converter.Converter;
-import org.springframework.stereotype.Service;
-
-/**
- * Converter to convert from an Etsi Catalog Manager {@link PkgOnboardingNotification} Object to its equivalent SOL003
- * {@link VnfPackageOnboardingNotification} Object
- *
- * @author andrew.a.lamb@est.tech
- */
-@Service
-public class PkgOnboardingNotificationConverter extends AbstractPkgNotificationConverter
- implements Converter<PkgOnboardingNotification, VnfPackageOnboardingNotification> {
- private static final Logger logger = getLogger(PkgOnboardingNotificationConverter.class);
-
- public PkgOnboardingNotificationConverter(final VnfmAdapterUrlProvider vnfmAdapterUrlProvider) {
- super(vnfmAdapterUrlProvider);
- }
-
-
- /**
- * Convert a {@link PkgOnboardingNotification} Object to an {@link VnfPackageOnboardingNotification} Object
- *
- * @param pkgOnboardingNotification The PkgOnboardingNotification Object to Convert
- * @return The Converted VnfPackageOnboardingNotification Object
- */
- @Override
- public VnfPackageOnboardingNotification convert(final PkgOnboardingNotification pkgOnboardingNotification) {
- logger.info("Converting PkgChangeNotification\n{}", pkgOnboardingNotification.toString());
- final VnfPackageOnboardingNotification vnfPackageOnboardingNotification =
- new VnfPackageOnboardingNotification();
- vnfPackageOnboardingNotification.setId(pkgOnboardingNotification.getId());
-
- if (pkgOnboardingNotification.getNotificationType() != null) {
- vnfPackageOnboardingNotification.setNotificationType(VnfPackageOnboardingNotification.NotificationTypeEnum
- .fromValue(pkgOnboardingNotification.getNotificationType().getValue()));
- }
-
- vnfPackageOnboardingNotification.setSubscriptionId(pkgOnboardingNotification.getSubscriptionId());
- vnfPackageOnboardingNotification.setTimeStamp(pkgOnboardingNotification.getTimeStamp());
- vnfPackageOnboardingNotification.setVnfPkgId(pkgOnboardingNotification.getVnfPkgId());
- vnfPackageOnboardingNotification.setVnfdId(pkgOnboardingNotification.getVnfdId());
-
- vnfPackageOnboardingNotification.setLinks(convert(pkgOnboardingNotification.getLinks(),
- pkgOnboardingNotification.getVnfPkgId(), pkgOnboardingNotification.getSubscriptionId()));
-
- return vnfPackageOnboardingNotification;
- }
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/converters/etsicatalog/sol003/VnfPkgInfoConverter.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/converters/etsicatalog/sol003/VnfPkgInfoConverter.java
deleted file mode 100644
index 0121cc5885..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/converters/etsicatalog/sol003/VnfPkgInfoConverter.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.pkgm.converters.etsicatalog.sol003;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.onap.so.adapters.etsi.sol003.adapter.common.VnfmAdapterUrlProvider;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.Checksum;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.VNFPKGMLinkSerializer;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.VnfPackageArtifactInfo;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.VnfPackageSoftwareImageInfo;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.VnfPkgInfo;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.InlineResponse2001;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.VnfPackagesAdditionalArtifacts;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.VnfPackagesChecksum;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.VnfPackagesLinks;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.VnfPackagesLinksSelf;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.VnfPackagesSoftwareImages;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.core.convert.converter.Converter;
-import org.springframework.stereotype.Service;
-
-/**
- * Converter to convert from an Etsi Catalog Manager {@link VnfPkgInfo} Object to its equivalent SOL003 Object
- * {@link InlineResponse2001} Object
- *
- * @author andrew.a.lamb@est.tech
- */
-@Service
-public class VnfPkgInfoConverter implements Converter<VnfPkgInfo, InlineResponse2001> {
- private static final Logger logger = LoggerFactory.getLogger(VnfPkgInfoConverter.class);
- private final VnfmAdapterUrlProvider vnfmAdapterUrlProvider;
-
- public VnfPkgInfoConverter(final VnfmAdapterUrlProvider vnfmAdapterUrlProvider) {
- this.vnfmAdapterUrlProvider = vnfmAdapterUrlProvider;
- }
-
- /**
- * Convert a {@link VnfPkgInfo} Object to an {@link InlineResponse2001} Object
- *
- * @param vnfPkgInfo The VnfPkgInfo Object to Convert
- * @return The Converted InlineResponse2001 Object
- */
- @Override
- public InlineResponse2001 convert(final VnfPkgInfo vnfPkgInfo) {
- if (vnfPkgInfo == null) {
- logger.error("No VnfPkgInfo Object Provided for Conversion. (Null object received, returning Null)");
- return null;
- }
- final InlineResponse2001 response = new InlineResponse2001();
- response.setId(vnfPkgInfo.getId());
- response.setVnfdId(vnfPkgInfo.getVnfdId());
- response.setVnfProvider(vnfPkgInfo.getVnfProvider());
- response.setVnfProductName(vnfPkgInfo.getVnfProductName());
- response.setVnfSoftwareVersion(vnfPkgInfo.getVnfSoftwareVersion());
- response.setVnfdVersion(vnfPkgInfo.getVnfdVersion());
- response.setChecksum(convertChecksumToVnfPackagesChecksum(vnfPkgInfo.getChecksum()));
- response.setSoftwareImages(
- convertVnfPackageSoftwareImageInfoListToVnfPackagesSoftwareImagesList(vnfPkgInfo.getSoftwareImages()));
- response.setAdditionalArtifacts(convertVnfPackageArtifactInfoListToVnfPackagesAdditionalArtifactsList(
- vnfPkgInfo.getAdditionalArtifacts()));
-
- if (vnfPkgInfo.getOnboardingState() != null) {
- response.setOnboardingState(
- InlineResponse2001.OnboardingStateEnum.fromValue(vnfPkgInfo.getOnboardingState().getValue()));
- }
-
- if (vnfPkgInfo.getOperationalState() != null) {
- response.setOperationalState(
- InlineResponse2001.OperationalStateEnum.fromValue(vnfPkgInfo.getOperationalState().getValue()));
- }
-
- response.setUserDefinedData((vnfPkgInfo.getUserDefinedData()));
-
- if (vnfPkgInfo.getLinks() != null) {
- response.setLinks(getVnfPackagesLinks(vnfPkgInfo.getLinks(), vnfPkgInfo.getId()));
- }
-
- return response;
- }
-
- private VnfPackagesChecksum convertChecksumToVnfPackagesChecksum(final Checksum checksum) {
- final VnfPackagesChecksum vnfPackagesChecksum = new VnfPackagesChecksum();
- if (checksum != null) {
- vnfPackagesChecksum.setAlgorithm(checksum.getAlgorithm());
- vnfPackagesChecksum.setHash(checksum.getHash());
- }
- return vnfPackagesChecksum;
- }
-
- private List<VnfPackagesSoftwareImages> convertVnfPackageSoftwareImageInfoListToVnfPackagesSoftwareImagesList(
- final List<VnfPackageSoftwareImageInfo> vnfPackageSoftwareImageInfoList) {
- final List<VnfPackagesSoftwareImages> vnfPackagesSoftwareImages = new ArrayList<>();
- if (vnfPackageSoftwareImageInfoList != null) {
- for (final VnfPackageSoftwareImageInfo vnfPackageSoftwareImageInfo : vnfPackageSoftwareImageInfoList) {
- final VnfPackagesSoftwareImages softwareImage =
- convertVnfPackageSoftwareImageInfoToVnfPackagesSoftwareImages(vnfPackageSoftwareImageInfo);
- vnfPackagesSoftwareImages.add(softwareImage);
- }
- }
- return vnfPackagesSoftwareImages;
- }
-
- private VnfPackagesSoftwareImages convertVnfPackageSoftwareImageInfoToVnfPackagesSoftwareImages(
- final VnfPackageSoftwareImageInfo vnfPackageSoftwareImageInfo) {
- final VnfPackagesSoftwareImages vnfPackagesSoftwareImages = new VnfPackagesSoftwareImages();
- vnfPackagesSoftwareImages.setId(vnfPackageSoftwareImageInfo.getId());
- vnfPackagesSoftwareImages.setName(vnfPackageSoftwareImageInfo.getName());
- vnfPackagesSoftwareImages.setProvider(vnfPackageSoftwareImageInfo.getProvider());
- vnfPackagesSoftwareImages.setVersion(vnfPackageSoftwareImageInfo.getVersion());
- vnfPackagesSoftwareImages
- .setChecksum(convertChecksumToVnfPackagesChecksum(vnfPackageSoftwareImageInfo.getChecksum()));
- if (vnfPackageSoftwareImageInfo.getContainerFormat() != null) {
- vnfPackagesSoftwareImages.setContainerFormat(VnfPackagesSoftwareImages.ContainerFormatEnum
- .fromValue(vnfPackageSoftwareImageInfo.getContainerFormat().getValue()));
- }
-
- if (vnfPackageSoftwareImageInfo.getDiskFormat() != null) {
- vnfPackagesSoftwareImages.setDiskFormat(VnfPackagesSoftwareImages.DiskFormatEnum
- .fromValue(vnfPackageSoftwareImageInfo.getDiskFormat().getValue()));
- }
-
- vnfPackagesSoftwareImages.setCreatedAt(vnfPackageSoftwareImageInfo.getCreatedAt());
- vnfPackagesSoftwareImages.setMinDisk(vnfPackageSoftwareImageInfo.getMinDisk());
- vnfPackagesSoftwareImages.setMinRam(vnfPackageSoftwareImageInfo.getMinRam());
- vnfPackagesSoftwareImages.setSize(vnfPackageSoftwareImageInfo.getSize());
- vnfPackagesSoftwareImages.setUserMetadata(vnfPackageSoftwareImageInfo.getUserMetadata());
- vnfPackagesSoftwareImages.setImagePath(vnfPackageSoftwareImageInfo.getImagePath());
- return vnfPackagesSoftwareImages;
- }
-
- private List<VnfPackagesAdditionalArtifacts> convertVnfPackageArtifactInfoListToVnfPackagesAdditionalArtifactsList(
- final List<VnfPackageArtifactInfo> vnfPackageArtifactInfoList) {
- if (vnfPackageArtifactInfoList != null) {
- final List<VnfPackagesAdditionalArtifacts> additionalArtifacts = new ArrayList<>();
- for (final VnfPackageArtifactInfo artifactInfo : vnfPackageArtifactInfoList) {
- final VnfPackagesAdditionalArtifacts artifact =
- convertVnfPackageArtifactInfoToVnfPackagesAdditionalArtifacts(artifactInfo);
- additionalArtifacts.add(artifact);
- }
- return additionalArtifacts;
- }
- return null;
- }
-
- private VnfPackagesAdditionalArtifacts convertVnfPackageArtifactInfoToVnfPackagesAdditionalArtifacts(
- final VnfPackageArtifactInfo vnfPackageArtifactInfo) {
- final VnfPackagesAdditionalArtifacts vnfPackagesAdditionalArtifacts = new VnfPackagesAdditionalArtifacts();
- vnfPackagesAdditionalArtifacts.setArtifactPath(vnfPackageArtifactInfo.getArtifactPath());
- vnfPackagesAdditionalArtifacts
- .setChecksum(convertChecksumToVnfPackagesChecksum(vnfPackageArtifactInfo.getChecksum()));
- vnfPackagesAdditionalArtifacts.setMetadata(vnfPackageArtifactInfo.getMetadata());
- return vnfPackagesAdditionalArtifacts;
- }
-
- private VnfPackagesLinks getVnfPackagesLinks(final VNFPKGMLinkSerializer links, final String vnfPkgId) {
- final VnfPackagesLinks vnfPackagesLinks = new VnfPackagesLinks();
-
- if (links.getSelf() != null) {
- vnfPackagesLinks.setSelf(getVnfPackagesLinksSelf(vnfmAdapterUrlProvider.getVnfPackageUrl(vnfPkgId)));
- }
-
- if (links.getVnfd() != null) {
- vnfPackagesLinks.setVnfd(getVnfPackagesLinksSelf(vnfmAdapterUrlProvider.getVnfPackageVnfdUrl(vnfPkgId)));
- }
-
- if (links.getPackageContent() != null) {
- vnfPackagesLinks.setPackageContent(
- getVnfPackagesLinksSelf(vnfmAdapterUrlProvider.getVnfPackageContentUrl(vnfPkgId)));
- }
-
- return vnfPackagesLinks;
- }
-
- private VnfPackagesLinksSelf getVnfPackagesLinksSelf(final String href) {
- return new VnfPackagesLinksSelf().href(href);
- }
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/converters/sol003/etsicatalog/PkgmSubscriptionRequestConverter.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/converters/sol003/etsicatalog/PkgmSubscriptionRequestConverter.java
deleted file mode 100644
index f63ada9c75..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/converters/sol003/etsicatalog/PkgmSubscriptionRequestConverter.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.pkgm.converters.sol003.etsicatalog;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.Version;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.VnfProducts;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.VnfProductsProviders;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.PkgmSubscriptionRequest;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.SubscriptionsFilter1;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.SubscriptionsFilter1.NotificationTypesEnum;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.SubscriptionsFilter1.OperationalStateEnum;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.SubscriptionsFilter1.UsageStateEnum;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.SubscriptionsFilterVersions;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.SubscriptionsFilterVnfProducts;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.SubscriptionsFilterVnfProductsFromProviders;
-import org.springframework.core.convert.converter.Converter;
-import org.springframework.stereotype.Service;
-
-/**
- * Converter to convert from an Etsi Catalog Manager {@link PkgmSubscriptionRequest} Object to its equivalent ETSI
- * Catalog Manager Object
- *
- * @author Ronan Kenny (ronan.kenny@est.tech)
- * @author Gareth Roper (gareth.roper@est.tech)
- */
-@Service
-public class PkgmSubscriptionRequestConverter implements
- Converter<PkgmSubscriptionRequest, org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.PkgmSubscriptionRequest> {
-
- @Override
- public org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.PkgmSubscriptionRequest convert(
- final PkgmSubscriptionRequest pkgmSubscriptionRequest) {
- final org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.PkgmSubscriptionRequest etsiCatalogManagerSubscriptionRequest =
- new org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.PkgmSubscriptionRequest();
-
- etsiCatalogManagerSubscriptionRequest
- .setFilter(getPkgmNotificationsFilter(pkgmSubscriptionRequest.getFilter()));
-
- return etsiCatalogManagerSubscriptionRequest;
- }
-
-
- private org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.PkgmNotificationsFilter getPkgmNotificationsFilter(
- final SubscriptionsFilter1 sol003SubscriptionsFilter) {
- final org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.PkgmNotificationsFilter etsiCatalogManagerFilters =
- new org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.PkgmNotificationsFilter();
-
- if (sol003SubscriptionsFilter.getNotificationTypes() != null) {
- etsiCatalogManagerFilters.setNotificationTypes(
- getPkgmNotificationsFilterNotificationTypes(sol003SubscriptionsFilter.getNotificationTypes()));
- }
-
- etsiCatalogManagerFilters.setVnfProductsFromProviders(
- getVnfProductsProviders(sol003SubscriptionsFilter.getVnfProductsFromProviders()));
-
- etsiCatalogManagerFilters.setVnfdId(getVnfdIds(sol003SubscriptionsFilter.getVnfdId()));
-
- etsiCatalogManagerFilters.setVnfPkgId(getVnfPkgIds(sol003SubscriptionsFilter.getVnfPkgId()));
-
- etsiCatalogManagerFilters
- .setOperationalState(getOperationalState(sol003SubscriptionsFilter.getOperationalState()));
-
- etsiCatalogManagerFilters.setUsageState(getUsageState(sol003SubscriptionsFilter.getUsageState()));
-
- return etsiCatalogManagerFilters;
- }
-
-
- private List<org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.PkgmNotificationsFilter.UsageStateEnum> getUsageState(
- final List<UsageStateEnum> usageStates) {
- if (usageStates != null) {
- final List<org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.PkgmNotificationsFilter.UsageStateEnum> etsiCatalogUsageStates =
- new ArrayList<>();
- usageStates.stream().forEach(state -> {
- etsiCatalogUsageStates.add(
- org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.PkgmNotificationsFilter.UsageStateEnum
- .fromValue(state.getValue()));
- });
- return etsiCatalogUsageStates;
- }
- return Collections.emptyList();
- }
-
-
- private List<org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.PkgmNotificationsFilter.OperationalStateEnum> getOperationalState(
- final List<OperationalStateEnum> operationalStates) {
- if (operationalStates != null) {
- final List<org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.PkgmNotificationsFilter.OperationalStateEnum> etsiCatalogOperationalStates =
- new ArrayList<>();
- operationalStates.forEach(state -> {
- etsiCatalogOperationalStates.add(
- org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.PkgmNotificationsFilter.OperationalStateEnum
- .fromValue(state.getValue()));
- });
-
- return etsiCatalogOperationalStates;
- }
- return Collections.emptyList();
- }
-
- private List<String> getVnfPkgIds(final List<String> vnfPkgId) {
- if (vnfPkgId != null) {
- final List<String> etsiCatalogManagerVnfPkgId = new ArrayList<>();
- vnfPkgId.forEach(type -> {
- etsiCatalogManagerVnfPkgId.add(type);
- });
- return etsiCatalogManagerVnfPkgId;
- }
- return Collections.emptyList();
- }
-
- private List<String> getVnfdIds(final List<String> vnfdId) {
- if (vnfdId != null) {
- final List<String> etsiCatalogManagerVnfdId = new ArrayList<>();
- vnfdId.forEach(type -> {
- etsiCatalogManagerVnfdId.add(type);
- });
- return etsiCatalogManagerVnfdId;
- }
- return Collections.emptyList();
- }
-
- private List<VnfProductsProviders> getVnfProductsProviders(
- final List<SubscriptionsFilterVnfProductsFromProviders> filterProductsFromProvider) {
-
- if (filterProductsFromProvider != null && !filterProductsFromProvider.isEmpty()) {
- final List<VnfProductsProviders> etsiCatalogManagerVnfProductsProviders = new ArrayList<>();
- filterProductsFromProvider.forEach(vnfProduct -> {
- etsiCatalogManagerVnfProductsProviders
- .add(new VnfProductsProviders().vnfProvider(vnfProduct.getVnfProvider())
- .vnfProducts(getVnfProducts(vnfProduct.getVnfProducts())));
- });
- return etsiCatalogManagerVnfProductsProviders;
- }
- return Collections.emptyList();
- }
-
- private List<VnfProducts> getVnfProducts(final List<SubscriptionsFilterVnfProducts> sol003VnfProducts) {
- if (sol003VnfProducts != null) {
- final List<VnfProducts> etsiCatalogManagerVnfProductsList = new ArrayList<>();
- sol003VnfProducts.forEach(vnfProduct -> {
- etsiCatalogManagerVnfProductsList.add(new VnfProducts().vnfProductName(vnfProduct.getVnfProductName())
- .versions(getVersion(vnfProduct.getVersions())));
- });
- return etsiCatalogManagerVnfProductsList;
- }
- return Collections.emptyList();
- }
-
- private List<Version> getVersion(final List<SubscriptionsFilterVersions> sol003FilterVersions) {
- if (sol003FilterVersions != null && !sol003FilterVersions.isEmpty()) {
- final List<Version> etsiCatalogVersionList = new ArrayList<>();
- sol003FilterVersions.forEach(vnfFilterVersion -> {
- etsiCatalogVersionList.add(new Version().vnfSoftwareVersion(vnfFilterVersion.getVnfSoftwareVersion())
- .vnfdVersions(vnfFilterVersion.getVnfdVersions()));
- });
- return etsiCatalogVersionList;
- }
- return Collections.emptyList();
- }
-
- private List<org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.PkgmNotificationsFilter.NotificationTypesEnum> getPkgmNotificationsFilterNotificationTypes(
- final List<NotificationTypesEnum> notificationTypes) {
-
- if (notificationTypes != null && !notificationTypes.isEmpty()) {
- final List<org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.PkgmNotificationsFilter.NotificationTypesEnum> etsiCatalogNotificationTypes =
- new ArrayList<>();
- notificationTypes.forEach(type -> etsiCatalogNotificationTypes.add(
- org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.PkgmNotificationsFilter.NotificationTypesEnum
- .fromValue(type.getValue())));
- return etsiCatalogNotificationTypes;
- }
- return Collections.emptyList();
- }
-
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/extclients/etsicatalog/EtsiCatalogPackageManagementServiceProvider.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/extclients/etsicatalog/EtsiCatalogPackageManagementServiceProvider.java
deleted file mode 100644
index db3c24bd1c..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/extclients/etsicatalog/EtsiCatalogPackageManagementServiceProvider.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2020 Ericsson. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog;
-
-import java.util.Optional;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.InlineResponse2001;
-
-/**
- * @author Waqas Ikram (waqas.ikram@est.tech)
- *
- */
-public interface EtsiCatalogPackageManagementServiceProvider {
-
- /**
- * GET Package Content, from VNF Package.
- *
- * @param vnfPkgId The ID of the VNF Package from which the "package_content" will be retrieved.
- * @return The Package Content of a VNF Package ("vnfPkgId").
- */
- Optional<byte[]> getVnfPackageContent(final String vnfPkgId);
-
- /**
- * GET VNF packages information from ETSI Catalog. Will return zero or more VNF package representations.
- *
- * @return An Array of all VNF packages retrieved from the ETSI Catalog.
- */
- Optional<InlineResponse2001[]> getVnfPackages();
-
- /**
- * GET specific VNF package information from ETSI Catalog.
- *
- * @param vnfPkgId The ID of the VNF Package that you want to query.
- * @return The VNF package retrieved from the ETSI Catalog
- */
- Optional<InlineResponse2001> getVnfPackage(final String vnfPkgId);
-
- /**
- * GET specific VNF package VNFD from ETSI Catalog.
- *
- * @param vnfPkgId The ID of the VNF Package that you want to query.
- * @return The VNF package retrieved from the ETSI Catalog
- */
- Optional<byte[]> getVnfPackageVnfd(final String vnfPkgId);
-
- /**
- * GET Package Artifact, from VNF Package.
- *
- * @param vnfPkgId The ID of the VNF Package from which the artifact will be retrieved.
- * @param artifactPath Sequence of one or more path segments representing the path of the artifact within the VNF
- * Package, e.g., foo/bar/run.sh
- * @return The Package Artifact of a VNF Package ("vnfPkgId", "artifactPath").
- */
- Optional<byte[]> getVnfPackageArtifact(final String vnfPkgId, final String artifactPath);
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/extclients/etsicatalog/EtsiCatalogServiceProvider.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/extclients/etsicatalog/EtsiCatalogServiceProvider.java
deleted file mode 100644
index f11fc5c39a..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/extclients/etsicatalog/EtsiCatalogServiceProvider.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog;
-
-/**
- * Provides methods for invoking REST calls to the ETSI Catalog Manager.
- *
- * @author gareth.roper@est.tech
- */
-public interface EtsiCatalogServiceProvider
- extends EtsiCatalogSubscriptionServiceProvider, EtsiCatalogPackageManagementServiceProvider {
-
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/extclients/etsicatalog/EtsiCatalogServiceProviderConfiguration.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/extclients/etsicatalog/EtsiCatalogServiceProviderConfiguration.java
deleted file mode 100644
index 1ff3672df9..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/extclients/etsicatalog/EtsiCatalogServiceProviderConfiguration.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog;
-
-import java.io.IOException;
-import java.security.KeyManagementException;
-import java.security.KeyStoreException;
-import java.security.NoSuchAlgorithmException;
-import java.security.cert.CertificateException;
-import java.util.concurrent.TimeUnit;
-import javax.net.ssl.HostnameVerifier;
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.SSLSession;
-import org.apache.http.client.config.RequestConfig;
-import org.apache.http.config.Registry;
-import org.apache.http.config.RegistryBuilder;
-import org.apache.http.conn.socket.ConnectionSocketFactory;
-import org.apache.http.conn.socket.PlainConnectionSocketFactory;
-import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
-import org.apache.http.impl.client.HttpClientBuilder;
-import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
-import org.apache.http.ssl.SSLContextBuilder;
-import org.onap.logging.filter.spring.SpringClientPayloadFilter;
-import org.onap.so.adapters.etsi.sol003.adapter.common.configuration.AbstractServiceProviderConfiguration;
-import org.onap.so.configuration.rest.BasicHttpHeadersProvider;
-import org.onap.so.configuration.rest.HttpClientConnectionConfiguration;
-import org.onap.so.logging.jaxrs.filter.SOSpringClientFilter;
-import org.onap.so.rest.service.HttpRestServiceProvider;
-import org.onap.so.rest.service.HttpRestServiceProviderImpl;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.core.io.Resource;
-import org.springframework.http.client.BufferingClientHttpRequestFactory;
-import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
-import org.springframework.web.client.RestTemplate;
-import com.google.gson.Gson;
-
-/**
- * Configures the HttpRestServiceProvider to make REST calls to the ETSI Catalog Manager
- *
- * @author gareth.roper@est.tech
- */
-
-@Configuration
-public class EtsiCatalogServiceProviderConfiguration extends AbstractServiceProviderConfiguration {
-
- public static final String ETSI_CATALOG_REST_TEMPLATE_BEAN = "etsiCatalogRestTemplate";
-
- public static final String ETSI_CATALOG_SERVICE_PROVIDER_BEAN = "etsiCatalogServiceProvider";
-
- private final static Logger LOGGER = LoggerFactory.getLogger(EtsiCatalogServiceProviderConfiguration.class);
-
- private final HttpClientConnectionConfiguration clientConnectionConfiguration;
-
- @Value("${etsi-catalog-manager.http.client.ssl.trust-store:#{null}}")
- private Resource trustStore;
- @Value("${etsi-catalog-manager.http.client.ssl.trust-store-password:#{null}}")
- private String trustStorePassword;
-
- @Autowired
- public EtsiCatalogServiceProviderConfiguration(
- final HttpClientConnectionConfiguration clientConnectionConfiguration) {
- this.clientConnectionConfiguration = clientConnectionConfiguration;
- }
-
- @Bean
- @Qualifier(ETSI_CATALOG_REST_TEMPLATE_BEAN)
- public RestTemplate etsiCatalogRestTemplate() {
- final RestTemplate restTemplate = new RestTemplate();
- restTemplate.getInterceptors().add(new SOSpringClientFilter());
- restTemplate.getInterceptors().add((new SpringClientPayloadFilter()));
- return restTemplate;
- }
-
- @Bean
- @Qualifier(ETSI_CATALOG_SERVICE_PROVIDER_BEAN)
- public HttpRestServiceProvider etsiCatalogHttpRestServiceProvider(
- @Qualifier(ETSI_CATALOG_REST_TEMPLATE_BEAN) final RestTemplate restTemplate) {
- setGsonMessageConverter(restTemplate);
-
- final HttpClientBuilder httpClientBuilder = getHttpClientBuilder();
- if (trustStore != null) {
- try {
- LOGGER.debug("Setting up HttpComponentsClientHttpRequestFactory with SSL Context");
- LOGGER.debug("Setting client trust-store: {}", trustStore.getURL());
- LOGGER.debug("Creating SSLConnectionSocketFactory with AllowAllHostsVerifier ... ");
- final SSLContext sslContext = new SSLContextBuilder()
- .loadTrustMaterial(trustStore.getURL(), trustStorePassword.toCharArray()).build();
- final SSLConnectionSocketFactory sslConnectionSocketFactory =
- new SSLConnectionSocketFactory(sslContext, AllowAllHostsVerifier.INSTANCE);
- httpClientBuilder.setSSLSocketFactory(sslConnectionSocketFactory);
- final Registry<ConnectionSocketFactory> socketFactoryRegistry = RegistryBuilder
- .<ConnectionSocketFactory>create().register("http", PlainConnectionSocketFactory.INSTANCE)
- .register("https", sslConnectionSocketFactory).build();
-
- httpClientBuilder.setConnectionManager(getConnectionManager(socketFactoryRegistry));
- } catch (final KeyManagementException | NoSuchAlgorithmException | KeyStoreException | CertificateException
- | IOException exception) {
- LOGGER.error("Error reading truststore, TLS connection will fail.", exception);
- }
-
- } else {
- LOGGER.debug("Setting connection manager without SSL ConnectionSocketFactory ...");
- httpClientBuilder.setConnectionManager(getConnectionManager());
- }
-
- final HttpComponentsClientHttpRequestFactory factory =
- new HttpComponentsClientHttpRequestFactory(httpClientBuilder.build());
- restTemplate.setRequestFactory(new BufferingClientHttpRequestFactory(factory));
-
- return new HttpRestServiceProviderImpl(restTemplate, new BasicHttpHeadersProvider().getHttpHeaders());
- }
-
- private PoolingHttpClientConnectionManager getConnectionManager(
- final Registry<ConnectionSocketFactory> socketFactoryRegistry) {
- return new PoolingHttpClientConnectionManager(socketFactoryRegistry, null, null, null,
- clientConnectionConfiguration.getTimeToLiveInMins(), TimeUnit.MINUTES);
- }
-
- private PoolingHttpClientConnectionManager getConnectionManager() {
- return new PoolingHttpClientConnectionManager(clientConnectionConfiguration.getTimeToLiveInMins(),
- TimeUnit.MINUTES);
- }
-
- private HttpClientBuilder getHttpClientBuilder() {
- return HttpClientBuilder.create().setMaxConnPerRoute(clientConnectionConfiguration.getMaxConnectionsPerRoute())
- .setMaxConnTotal(clientConnectionConfiguration.getMaxConnections())
- .setDefaultRequestConfig(getRequestConfig());
- }
-
- private RequestConfig getRequestConfig() {
- return RequestConfig.custom().setSocketTimeout(clientConnectionConfiguration.getSocketTimeOutInMiliSeconds())
- .setConnectTimeout(clientConnectionConfiguration.getConnectionTimeOutInMilliSeconds()).build();
- }
-
- private static final class AllowAllHostsVerifier implements HostnameVerifier {
-
- private static final AllowAllHostsVerifier INSTANCE = new AllowAllHostsVerifier();
-
- @Override
- public boolean verify(final String hostname, final SSLSession session) {
- LOGGER.debug("Skipping hostname verification ...");
- return true;
- }
-
- }
-
- @Override
- protected Gson getGson() {
- return new JSON().getGson();
- }
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/extclients/etsicatalog/EtsiCatalogServiceProviderImpl.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/extclients/etsicatalog/EtsiCatalogServiceProviderImpl.java
deleted file mode 100644
index a4e5550061..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/extclients/etsicatalog/EtsiCatalogServiceProviderImpl.java
+++ /dev/null
@@ -1,281 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog;
-
-import static org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.EtsiCatalogServiceProviderConfiguration.ETSI_CATALOG_SERVICE_PROVIDER_BEAN;
-import java.util.Optional;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.NsdmSubscription;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.PkgmSubscription;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.VnfPkgInfo;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.InlineResponse2001;
-import org.onap.so.adapters.etsisol003adapter.pkgm.rest.exceptions.EtsiCatalogManagerBadRequestException;
-import org.onap.so.adapters.etsisol003adapter.pkgm.rest.exceptions.EtsiCatalogManagerRequestFailureException;
-import org.onap.so.adapters.etsisol003adapter.pkgm.rest.exceptions.SubscriptionNotFoundException;
-import org.onap.so.adapters.etsisol003adapter.pkgm.rest.exceptions.VnfPkgBadRequestException;
-import org.onap.so.adapters.etsisol003adapter.pkgm.rest.exceptions.VnfPkgConflictException;
-import org.onap.so.adapters.etsisol003adapter.pkgm.rest.exceptions.VnfPkgNotFoundException;
-import org.onap.so.rest.exceptions.HttpResouceNotFoundException;
-import org.onap.so.rest.exceptions.InvalidRestRequestException;
-import org.onap.so.rest.exceptions.RestProcessingException;
-import org.onap.so.rest.service.HttpRestServiceProvider;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.core.convert.ConversionService;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
-import org.springframework.stereotype.Service;
-
-/**
- * Provides the implementations of the REST Requests to the ETSI Catalog Manager.
- *
- * @author gareth.roper@est.tech
- */
-@Service
-public class EtsiCatalogServiceProviderImpl implements EtsiCatalogServiceProvider {
- private static final Logger logger = LoggerFactory.getLogger(EtsiCatalogServiceProviderImpl.class);
-
- private final HttpRestServiceProvider httpServiceProvider;
- private final EtsiCatalogUrlProvider etsiCatalogUrlProvider;
- private final ConversionService conversionService;
-
- @Autowired
- public EtsiCatalogServiceProviderImpl(final EtsiCatalogUrlProvider etsiCatalogUrlProvider,
- @Qualifier(ETSI_CATALOG_SERVICE_PROVIDER_BEAN) final HttpRestServiceProvider httpServiceProvider,
- final ConversionService conversionService) {
- this.etsiCatalogUrlProvider = etsiCatalogUrlProvider;
- this.httpServiceProvider = httpServiceProvider;
- this.conversionService = conversionService;
- }
-
- @Override
- public Optional<byte[]> getVnfPackageContent(final String vnfPkgId)
- throws EtsiCatalogManagerRequestFailureException {
- final String vnfRequestUrl = etsiCatalogUrlProvider.getVnfPackageContentUrl(vnfPkgId);
- final String vnfRequestName = "getVnfPackageContent";
- return requestVnfElement(vnfPkgId, vnfRequestUrl, vnfRequestName);
- }
-
- @Override
- public Optional<byte[]> getVnfPackageArtifact(final String vnfPkgId, final String artifactPath) {
- try {
- final ResponseEntity<byte[]> response = httpServiceProvider.getHttpResponse(
- etsiCatalogUrlProvider.getVnfPackageArtifactUrl(vnfPkgId, artifactPath), byte[].class);
- logger.info("getVnfPackageArtifact Request to ETSI Catalog Manager Status Code: {}",
- response.getStatusCodeValue());
- if (response.getStatusCode().is2xxSuccessful()) {
- return Optional.ofNullable(response.getBody());
- }
- } catch (final HttpResouceNotFoundException httpResouceNotFoundException) {
- logger.error("Caught HttpResouceNotFoundException", httpResouceNotFoundException);
- throw new VnfPkgNotFoundException("No Vnf Package Artifact found with vnfPkgId: \"" + vnfPkgId
- + "\" and artifactPath: \"" + artifactPath + "\".");
- } catch (final RestProcessingException restProcessingException) {
- logger.error("Caught RestProcessingException with Status Code: {}", restProcessingException.getStatusCode(),
- restProcessingException);
- if (restProcessingException.getStatusCode() == HttpStatus.CONFLICT.value()) {
- throw new VnfPkgConflictException("A conflict occurred with the state of the resource,\n"
- + "due to the attribute: onboardingState not being set to ONBOARDED.");
- }
- }
- throw new EtsiCatalogManagerRequestFailureException("Internal Server Error Occurred.");
- }
-
- @Override
- public Optional<InlineResponse2001[]> getVnfPackages() {
- try {
- final ResponseEntity<VnfPkgInfo[]> response =
- httpServiceProvider.getHttpResponse(etsiCatalogUrlProvider.getVnfPackagesUrl(), VnfPkgInfo[].class);
- logger.info("getVnfPackages Request to ETSI Catalog Manager Status Code: {}",
- response.getStatusCodeValue());
- if (response.getStatusCode().is2xxSuccessful()) {
- if (response.hasBody()) {
- final VnfPkgInfo[] vnfPackages = response.getBody();
- assert (vnfPackages != null);
- final InlineResponse2001[] responses = new InlineResponse2001[vnfPackages.length];
- for (int index = 0; index < vnfPackages.length; index++) {
- if (conversionService.canConvert(vnfPackages[index].getClass(), InlineResponse2001.class)) {
- final InlineResponse2001 inlineResponse2001 =
- conversionService.convert(vnfPackages[index], InlineResponse2001.class);
- if (inlineResponse2001 != null) {
- responses[index] = inlineResponse2001;
- }
- } else {
- logger.error("Unable to find Converter for response class: {}",
- vnfPackages[index].getClass());
- }
- }
- return Optional.of(responses);
- }
- logger.error("Received response without body ...");
- }
- logger.error("Unexpected status code received {}", response.getStatusCode());
- return Optional.empty();
- } catch (final InvalidRestRequestException invalidRestRequestException) {
- logger.error("Caught InvalidRestRequestException", invalidRestRequestException);
- throw new VnfPkgBadRequestException("Error: Bad Request Received");
- } catch (final HttpResouceNotFoundException httpResouceNotFoundException) {
- logger.error("Caught HttpResouceNotFoundException", httpResouceNotFoundException);
- throw new VnfPkgNotFoundException("No Vnf Packages found");
- } catch (final RestProcessingException restProcessingException) {
- logger.error("Caught RestProcessingException with Status Code: {}", restProcessingException.getStatusCode(),
- restProcessingException);
- throw new EtsiCatalogManagerRequestFailureException("Internal Server Error Occurred.");
- }
- }
-
- @Override
- public Optional<InlineResponse2001> getVnfPackage(final String vnfPkgId) {
- try {
- final ResponseEntity<VnfPkgInfo> response = httpServiceProvider
- .getHttpResponse(etsiCatalogUrlProvider.getVnfPackageUrl(vnfPkgId), VnfPkgInfo.class);
- logger.info("getVnfPackage Request for vnfPkgId {} to ETSI Catalog Manager Status Code: {}", vnfPkgId,
- response.getStatusCodeValue());
- if (response.getStatusCode().is2xxSuccessful()) {
- if (response.hasBody()) {
- final VnfPkgInfo vnfPkgInfo = response.getBody();
- if (conversionService.canConvert(vnfPkgInfo.getClass(), InlineResponse2001.class)) {
- return Optional.ofNullable(conversionService.convert(vnfPkgInfo, InlineResponse2001.class));
- }
- logger.error("Unable to find Converter for response class: {}", vnfPkgInfo.getClass());
- }
- logger.error("Received response without body ....");
- }
- return Optional.empty();
- } catch (final InvalidRestRequestException invalidRestRequestException) {
- logger.error("Caught InvalidRestRequestException", invalidRestRequestException);
- throw new VnfPkgBadRequestException("Error: Bad Request Received");
- } catch (final HttpResouceNotFoundException httpResouceNotFoundException) {
- logger.error("Caught HttpResouceNotFoundException", httpResouceNotFoundException);
- throw new VnfPkgNotFoundException("No Vnf Package found with vnfPkgId: " + vnfPkgId);
- } catch (final RestProcessingException restProcessingException) {
- logger.error("Caught RestProcessingException with Status Code: {}", restProcessingException.getStatusCode(),
- restProcessingException);
- throw new EtsiCatalogManagerRequestFailureException("Internal Server Error Occurred.");
- }
- }
-
- @Override
- public Optional<byte[]> getVnfPackageVnfd(final String vnfPkgId) {
- final String vnfRequestUrl = etsiCatalogUrlProvider.getVnfPackageVnfdUrl(vnfPkgId);
- final String vnfRequestName = "getVnfPackageVnfd";
- return requestVnfElement(vnfPkgId, vnfRequestUrl, vnfRequestName);
- }
-
- @Override
- public Optional<PkgmSubscription> postSubscription(
- final org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.PkgmSubscriptionRequest etsiCatalogManagerSubscriptionRequest) {
- try {
- final ResponseEntity<PkgmSubscription> responseEntity =
- httpServiceProvider.postHttpRequest(etsiCatalogManagerSubscriptionRequest,
- etsiCatalogUrlProvider.getSubscriptionUrl(), PkgmSubscription.class);
- if (responseEntity.getStatusCode().is2xxSuccessful()) {
- if (responseEntity.hasBody()) {
- return Optional.of(responseEntity.getBody());
- }
- logger.error("Received response without body on postSubscription");
- }
- logger.error("Unexpected Status Code Received on postSubscription: {}", responseEntity.getStatusCode());
- return Optional.empty();
- } catch (final InvalidRestRequestException invalidRestRequestException) {
- logger.error("Caught InvalidRestRequestException", invalidRestRequestException);
- throw new EtsiCatalogManagerBadRequestException(
- "Bad Request Received on postSubscription call to ETSI Catalog Manager.");
- } catch (final RestProcessingException restProcessingException) {
- logger.error("Caught RestProcessingException with Status Code: {}", restProcessingException.getStatusCode(),
- restProcessingException);
- throw new EtsiCatalogManagerRequestFailureException(
- "Internal Server Error Occurred. On postSubscription with StatusCode: "
- + restProcessingException.getStatusCode());
- }
- }
-
- @Override
- public boolean deleteSubscription(final String subscriptionId) {
- try {
- final ResponseEntity<Void> responseEntity = httpServiceProvider
- .deleteHttpRequest(etsiCatalogUrlProvider.getSubscriptionUrl() + "/" + subscriptionId, Void.class);
-
- if (responseEntity.getStatusCode().is2xxSuccessful()) {
- logger.info("Subscription with ID: {} has been successfully deleted from the ETSI Catalog Manager",
- subscriptionId);
- return true;
- }
- logger.error("Unexpected Status Code Received on deleteSubscription: {}", responseEntity.getStatusCode());
- return false;
- } catch (final HttpResouceNotFoundException resouceNotFoundException) {
- final String message = "Unable to find subscription in ETSI Catalog Manager using id: " + subscriptionId;
- logger.error(message);
- throw new SubscriptionNotFoundException(message);
- } catch (final InvalidRestRequestException invalidRestRequestException) {
- logger.error("Caught InvalidRestRequestException on deleteSubscription call to ETSI Catalog Manager.",
- invalidRestRequestException);
- throw new EtsiCatalogManagerBadRequestException(
- "Bad Request Received on deleteSubscription call to ETSI Catalog Manager.");
- }
- }
-
- @Override
- public Optional<NsdmSubscription> getSubscription(final String subscriptionId) {
- try {
- final ResponseEntity<NsdmSubscription> responseEntity = httpServiceProvider.getHttpResponse(
- etsiCatalogUrlProvider.getSubscriptionUrl() + "/" + subscriptionId, NsdmSubscription.class);
-
- if (responseEntity.getStatusCode().is2xxSuccessful()) {
- logger.debug("Found subscription with ID: {} in ETSI Catalog Manager", subscriptionId);
- return Optional.ofNullable(responseEntity.getBody());
- }
- logger.error("Unexpected Status Code Received on getting subscription from ETSI Catalog Manager: {}",
- responseEntity.getStatusCode());
- } catch (final HttpResouceNotFoundException resouceNotFoundException) {
- logger.error("Unable to find subscription in ETSI Catalog Manager using id: {}", subscriptionId);
- return Optional.empty();
- } catch (final RestProcessingException | InvalidRestRequestException exception) {
- logger.error("Unable to query ETSI Catalog Manager for subscription using id: {}", subscriptionId,
- exception);
- }
- throw new EtsiCatalogManagerRequestFailureException("Internal Server Error Occurred.");
- }
-
- private Optional<byte[]> requestVnfElement(final String vnfPkgId, final String vnfRequestUrl,
- final String vnfRequestName) {
- try {
- final ResponseEntity<byte[]> response = httpServiceProvider.getHttpResponse(vnfRequestUrl, byte[].class);
- logger.info("{} Request to ETSI Catalog Manager Status Code: {}", vnfRequestName,
- response.getStatusCodeValue());
- if (response.getStatusCode() == HttpStatus.OK) {
- return Optional.ofNullable(response.getBody());
- }
- } catch (final HttpResouceNotFoundException httpResouceNotFoundException) {
- logger.error("Caught HttpResouceNotFoundException", httpResouceNotFoundException);
- throw new VnfPkgNotFoundException("No Vnf Package found with vnfPkgId: " + vnfPkgId);
- } catch (final RestProcessingException restProcessingException) {
- logger.error("Caught RestProcessingException with Status Code: {}", restProcessingException.getStatusCode(),
- restProcessingException);
- if (restProcessingException.getStatusCode() == HttpStatus.CONFLICT.value()) {
- throw new VnfPkgConflictException("A conflict occurred with the state of the resource,\n"
- + "due to the attribute: onboardingState not being set to ONBOARDED.");
- }
- }
- throw new EtsiCatalogManagerRequestFailureException("Internal Server Error Occurred.");
- }
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/extclients/etsicatalog/EtsiCatalogSubscriptionServiceProvider.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/extclients/etsicatalog/EtsiCatalogSubscriptionServiceProvider.java
deleted file mode 100644
index d561f8734b..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/extclients/etsicatalog/EtsiCatalogSubscriptionServiceProvider.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2020 Ericsson. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog;
-
-import java.util.Optional;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.NsdmSubscription;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.PkgmSubscription;
-
-/**
- * @author Waqas Ikram (waqas.ikram@est.tech)
- *
- */
-public interface EtsiCatalogSubscriptionServiceProvider {
-
- /**
- * POST the SubscriptionRequest Object.
- *
- * @return The ETSI Catalog Manager's PkgmSubscription object.
- */
- Optional<PkgmSubscription> postSubscription(
- final org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.PkgmSubscriptionRequest etsiCatalogManagerSubscriptionRequest);
-
- /**
- * Get the Subscription from ETSI Catalog.
- *
- * @param subscriptionId Subscription ID
- * @return The Subscription {@link NsdmSubscription} from ETSI Catalog
- */
- Optional<NsdmSubscription> getSubscription(final String subscriptionId);
-
- /**
- * DELETE the SubscriptionRequest Object.
- *
- * @return A Boolean representing if the delete was successful or not.
- */
- boolean deleteSubscription(final String subscriptionId);
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/extclients/etsicatalog/EtsiCatalogUrlProvider.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/extclients/etsicatalog/EtsiCatalogUrlProvider.java
deleted file mode 100644
index 1725bf9fba..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/extclients/etsicatalog/EtsiCatalogUrlProvider.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog;
-
-import static org.slf4j.LoggerFactory.getLogger;
-import org.slf4j.Logger;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Service;
-
-/**
- * Provides the URLs for the REST Requests to the ETSI Catalog Manager.
- *
- * @author gareth.roper@est.tech
- */
-@Service
-public class EtsiCatalogUrlProvider {
-
- private static final Logger logger = getLogger(EtsiCatalogUrlProvider.class);
-
- @Value("${etsi-catalog-manager.vnfpkgm.endpoint}")
- private String etsiCatalogManagerEndpoint;
-
- public EtsiCatalogUrlProvider() {}
-
- /**
- * Get the URL for retrieving the Package Content from the ETSI Catalog.".
- *
- * @param vnfPkgId The ID of the VNF Package
- * @return the URL for the GET operation
- */
- public String getVnfPackageContentUrl(final String vnfPkgId) {
- final String url = etsiCatalogManagerEndpoint + "/vnf_packages/" + vnfPkgId + "/package_content";
- logger.info("getEtsiCatalogVnfPackageContentUrl: {}", url);
- return url;
- }
-
- /**
- * Get the URL for retrieving VNF packages information from ETSI Catalog.".
- *
- * @return the URL for the GET operation
- */
- public String getVnfPackagesUrl() {
- final String url = etsiCatalogManagerEndpoint + "/vnf_packages";
- logger.info("getEtsiCatalogVnfPackagesEndpoint: {}", url);
- return url;
- }
-
- /**
- * Get the URL for retrieving specific VNF package information from the ETSI Catalog.".
- *
- * @param vnfPkgId The ID of the VNF Package
- * @return the URL for the GET operation
- */
- public String getVnfPackageUrl(final String vnfPkgId) {
- final String url = etsiCatalogManagerEndpoint + "/vnf_packages/" + vnfPkgId;
- logger.info("getEtsiCatalogVnfPackageEndpoint: {}", url);
- return url;
- }
-
- /**
- * Get the URL for retrieving VNF Package Artifacts
- *
- * @param vnfPkgId The ID of the VNF Package
- * @param artifactPath The path to the Artifact
- * @return the URL for the GET operation
- */
- public String getVnfPackageArtifactUrl(final String vnfPkgId, final String artifactPath) {
- final String url = etsiCatalogManagerEndpoint + "/vnf_packages/" + vnfPkgId + "/artifacts/" + artifactPath;
- logger.info("getVnfPackageArtifactUrl: {}", url);
- return url;
- }
-
- /**
- * Get the URL for retrieving VNF packages vnfd from ETSI Catalog.
- *
- * @param vnfPkgId The ID of the VNF Package
- * @return the URL for the GET operation
- */
- public String getVnfPackageVnfdUrl(final String vnfPkgId) {
- final String url = etsiCatalogManagerEndpoint + "/vnf_packages/" + vnfPkgId + "/vnfd";
- logger.info("getEtsiCatalogVnfPackageVnfd: {}", url);
- return url;
- }
-
- /**
- * Get the URL for posting/retrieving a Subscription
- *
- * @return the URL for the operation
- */
- public String getSubscriptionUrl() {
- final String url = etsiCatalogManagerEndpoint + "/subscriptions";
- logger.info("getSubscriptionNotificationUrl: {}", url);
- return url;
- }
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/extclients/vnfm/VnfmHttpServiceProviderConfiguration.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/extclients/vnfm/VnfmHttpServiceProviderConfiguration.java
deleted file mode 100644
index 22bbef9c01..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/extclients/vnfm/VnfmHttpServiceProviderConfiguration.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2020 Ericsson. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.adapters.etsisol003adapter.pkgm.extclients.vnfm;
-
-import static org.onap.so.client.RestTemplateConfig.CONFIGURABLE_REST_TEMPLATE;
-import java.time.LocalDateTime;
-import java.time.OffsetDateTime;
-import org.onap.so.adapters.etsi.sol003.adapter.common.configuration.AbstractServiceProviderConfiguration;
-import org.onap.so.adapters.etsisol003adapter.pkgm.JSON;
-import org.onap.so.adapters.etsisol003adapter.pkgm.rest.EtsiSubscriptionNotificationController;
-import org.onap.so.configuration.rest.BasicHttpHeadersProvider;
-import org.onap.so.rest.service.HttpRestServiceProvider;
-import org.onap.so.rest.service.HttpRestServiceProviderImpl;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.web.client.RestTemplate;
-import com.google.gson.Gson;
-
-/**
- * @author Waqas Ikram (waqas.ikram@est.tech)
- *
- */
-@Configuration
-public class VnfmHttpServiceProviderConfiguration extends AbstractServiceProviderConfiguration {
- private final JSON.OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new JSON.OffsetDateTimeTypeAdapter();
-
- public static final String VNFM_ADAPTER_HTTP_SERVICE_PROVIDER_BEAN = "vnfmAdapterHttpServiceProvider";
-
- @Bean
- @Qualifier(VNFM_ADAPTER_HTTP_SERVICE_PROVIDER_BEAN)
- public HttpRestServiceProvider vnfmAdapterHttpRestServiceProvider(
- @Autowired @Qualifier(CONFIGURABLE_REST_TEMPLATE) RestTemplate restTemplate) {
- setGsonMessageConverter(restTemplate);
- return new HttpRestServiceProviderImpl(restTemplate, new BasicHttpHeadersProvider().getHttpHeaders());
- }
-
- @Override
- protected Gson getGson() {
- return JSON.createGson().registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter)
- .registerTypeAdapter(LocalDateTime.class,
- new EtsiSubscriptionNotificationController.LocalDateTimeTypeAdapter())
- .create();
- }
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/EtsiSubscriptionNotificationController.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/EtsiSubscriptionNotificationController.java
deleted file mode 100644
index 2b4b486fa8..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/EtsiSubscriptionNotificationController.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2020 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.pkgm.rest;
-
-import static org.onap.so.adapters.etsi.sol003.adapter.common.CommonConstants.ETSI_SUBSCRIPTION_NOTIFICATION_CONTROLLER_BASE_URL;
-import static org.slf4j.LoggerFactory.getLogger;
-import java.io.IOException;
-import java.time.LocalDateTime;
-import java.time.format.DateTimeFormatter;
-import java.util.AbstractMap;
-import java.util.Map.Entry;
-import javax.ws.rs.core.MediaType;
-import org.onap.so.adapters.etsisol003adapter.etsicatalog.notification.model.PkgChangeNotification;
-import org.onap.so.adapters.etsisol003adapter.etsicatalog.notification.model.PkgOnboardingNotification;
-import org.onap.so.adapters.etsisol003adapter.pkgm.rest.exceptions.InternalServerErrorException;
-import org.onap.so.adapters.etsisol003adapter.pkgm.rest.exceptions.NotificationTypeNotSupportedException;
-import org.onap.so.adapters.etsisol003adapter.pkgm.subscriptionmgmt.NotificationManager;
-import org.slf4j.Logger;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.ResponseEntity;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import com.google.gson.Gson;
-import com.google.gson.GsonBuilder;
-import com.google.gson.JsonObject;
-import com.google.gson.JsonParser;
-import com.google.gson.TypeAdapter;
-import com.google.gson.stream.JsonReader;
-import com.google.gson.stream.JsonWriter;
-
-/**
- * This controller handles the ETSI Subscription Notification Endpoints.
- *
- * @author Ronan Kenny (ronan.kenny@est.tech)
- * @author Gareth Roper (gareth.roper@est.tech)
- * @author Andrew Lamb (andrew.a.lamb@est.tech)
- */
-@Controller
-@RequestMapping(value = ETSI_SUBSCRIPTION_NOTIFICATION_CONTROLLER_BASE_URL)
-public class EtsiSubscriptionNotificationController {
-
- private static final Logger logger = getLogger(EtsiSubscriptionNotificationController.class);
- private final NotificationManager notificationManager;
- private final Gson gson;
-
- @Autowired
- public EtsiSubscriptionNotificationController(final NotificationManager notificationManager) {
- this.notificationManager = notificationManager;
- this.gson = new GsonBuilder().registerTypeAdapter(LocalDateTime.class, new LocalDateTimeTypeAdapter()).create();
- }
-
- @GetMapping(value = "/notification")
- public ResponseEntity<Void> testSubscriptionNotificationEndPoint() {
- logger.debug("Testing Notification Endpoint");
- return ResponseEntity.noContent().build();
- }
-
- /**
- * POST notification on to subscriber.
- *
- * @param notification The notification to send.
- * @return Response Code: 204 No Content if Successful, ProblemDetails Object if not.
- */
- @PostMapping(value = "/notification", consumes = MediaType.APPLICATION_JSON, produces = MediaType.APPLICATION_JSON)
- public ResponseEntity<?> postSubscriptionNotification(@RequestBody final Object notification) {
- logger.info("Posting subscription notification class: {} \n{}", notification.getClass(), notification);
- final String notificationString = gson.toJson(notification);
-
- final Entry<String, Object> notificationObject = getNotificationObject(notificationString);
- if (notificationManager.processSubscriptionNotification(notificationObject.getValue(),
- notificationObject.getKey())) {
- logger.info("Notification Delivered Successfully");
- return ResponseEntity.noContent().build();
- }
- final String errorMessage = "An error occurred. Sending of notification to VNFM failed.";
- logger.error(errorMessage);
- throw new InternalServerErrorException(errorMessage);
- }
-
- private Entry<String, Object> getNotificationObject(final String notification) {
- logger.info("getNotificationObject() notification: {}", notification);
- final String notificationType = getNotificationType(notification);
- if (PkgOnboardingNotification.NotificationTypeEnum.VNFPACKAGEONBOARDINGNOTIFICATION.getValue()
- .equals(notificationType)) {
- final PkgOnboardingNotification pkgOnboardingNotification =
- gson.fromJson(notification, PkgOnboardingNotification.class);
- logger.info("Onboarding notification received:\n{}", pkgOnboardingNotification);
- return new AbstractMap.SimpleEntry<>(pkgOnboardingNotification.getSubscriptionId(),
- pkgOnboardingNotification);
- }
- if (PkgChangeNotification.NotificationTypeEnum.VNFPACKAGECHANGENOTIFICATION.getValue()
- .equals(notificationType)) {
- final PkgChangeNotification pkgChangeNotification =
- gson.fromJson(notification, PkgChangeNotification.class);
- logger.info("Change notification received:\n{}", pkgChangeNotification);
- return new AbstractMap.SimpleEntry<>(pkgChangeNotification.getSubscriptionId(), pkgChangeNotification);
-
- }
-
- final String errorMessage = "An error occurred. Notification type not supported for: " + notificationType;
- logger.error(errorMessage);
- throw new NotificationTypeNotSupportedException(errorMessage);
-
- }
-
- private String getNotificationType(final String notification) {
- try {
- logger.info("getNotificationType() notification: {}", notification);
- final JsonParser parser = new JsonParser();
- final JsonObject element = (JsonObject) parser.parse(notification);
- return element.get("notificationType").getAsString();
- } catch (final Exception e) {
- logger.error("An error occurred processing notificiation: {}", e.getMessage());
- }
- throw new NotificationTypeNotSupportedException(
- "Unable to parse notification type in object \n" + notification);
- }
-
- public static class LocalDateTimeTypeAdapter extends TypeAdapter<LocalDateTime> {
-
- private static final DateTimeFormatter FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
-
- @Override
- public void write(final JsonWriter out, final LocalDateTime localDateTime) throws IOException {
- if (localDateTime == null) {
- out.nullValue();
- } else {
- out.value(FORMATTER.format(localDateTime));
- }
- }
-
- @Override
- public LocalDateTime read(final JsonReader in) throws IOException {
- switch (in.peek()) {
- case NULL:
- in.nextNull();
- return null;
- default:
- final String dateTime = in.nextString();
- return LocalDateTime.parse(dateTime, FORMATTER);
- }
- }
- }
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/Sol003PackageManagementController.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/Sol003PackageManagementController.java
deleted file mode 100644
index 6c1e5e5506..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/Sol003PackageManagementController.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.pkgm.rest;
-
-import static org.onap.so.adapters.etsi.sol003.adapter.common.CommonConstants.PACKAGE_MANAGEMENT_BASE_URL;
-import static org.onap.so.adapters.etsisol003adapter.pkgm.PackageManagementConstants.APPLICATION_ZIP;
-import static org.slf4j.LoggerFactory.getLogger;
-import java.util.Optional;
-import javax.ws.rs.core.MediaType;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.EtsiCatalogServiceProvider;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.ProblemDetails;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.InlineResponse2001;
-import org.slf4j.Logger;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestMapping;
-
-/**
- * Controller for handling the VNF Package Management. For further information please read:
- * https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/003/02.05.01_60/gs_nfv-sol003v020501p.pdf Use the section number
- * above each endpoint to find the corresponding section in the above document.
- *
- * @author gareth.roper@est.tech
- */
-@Controller
-@RequestMapping(value = PACKAGE_MANAGEMENT_BASE_URL, consumes = {MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
-public class Sol003PackageManagementController {
-
- private final EtsiCatalogServiceProvider etsiCatalogServiceProvider;
- private static final String LOG_REQUEST_RECEIVED = "VNF PackageManagement Controller: {} {} {} {}";
- private static final Logger logger = getLogger(Sol003PackageManagementController.class);
-
- @Autowired
- Sol003PackageManagementController(final EtsiCatalogServiceProvider etsiCatalogServiceProvider) {
- this.etsiCatalogServiceProvider = etsiCatalogServiceProvider;
- }
-
- /**
- * GET VNF packages information. Will return zero or more VNF package representations that match the attribute
- * filter. These representations will be in a list. Section Number: 10.4.2
- *
- * @return An Array of all VNF packages. Object: InlineResponse2001[] Response Code: 200 OK
- */
- @GetMapping(value = "/vnf_packages", produces = {MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
- public ResponseEntity<?> getVnfPackages() {
- logger.info(LOG_REQUEST_RECEIVED, "getVnfPackages.");
- final Optional<InlineResponse2001[]> response = etsiCatalogServiceProvider.getVnfPackages();
- if (response.isPresent()) {
- logger.info(LOG_REQUEST_RECEIVED, "getVnfPackages Response: ", HttpStatus.OK);
- return ResponseEntity.ok().body(response.get());
- }
- final String errorMessage = "An error occurred, a null response was received by the\n"
- + " Sol003PackageManagementController from the EtsiCatalogManager using the GET \"vnf_packages\" \n"
- + "endpoint.";
- logger.error(errorMessage);
- return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(new ProblemDetails().detail(errorMessage));
- }
-
- /**
- * GET VNF package information. Will return a specific VNF package representation that match the attribute filter.
- * Section Number: 10.4.3
- *
- * @param vnfPkgId The ID of the VNF Package that you want to query.
- * @return A VNF package based on vnfPkgId. Object: VnfPkgInfo Response Code: 200 OK
- */
- @GetMapping(value = "/vnf_packages/{vnfPkgId}", produces = {MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
- public ResponseEntity<?> getVnfPackage(@PathVariable("vnfPkgId") final String vnfPkgId) {
- logger.info(LOG_REQUEST_RECEIVED, "getVnfPackage: ", vnfPkgId);
- final Optional<InlineResponse2001> response = etsiCatalogServiceProvider.getVnfPackage(vnfPkgId);
- if (response.isPresent()) {
- logger.info(LOG_REQUEST_RECEIVED, "getVnfPackage Response: ", HttpStatus.OK);
- return ResponseEntity.ok().body(response.get());
- }
- final String errorMessage = "An error occurred, a null response was received by the\n"
- + " Sol003PackageManagementController from the EtsiCatalogManager using the GET \"vnf_packages\" by vnfPkgId: \""
- + vnfPkgId + "\" \n" + "endpoint.";
- logger.error(errorMessage);
- return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(new ProblemDetails().detail(errorMessage));
- }
-
- /**
- * GET VNFD, from VNF package. Will return a copy of the file representing the VNFD or a ZIP file that contains the
- * file/multiple files representing the VNFD specified. Section Number: 10.4.4
- *
- * @param vnfPkgId The ID of the VNF Package that you want to retrieve the VNFD from.
- * @return The VNFD of a VNF Package as a single file or within a ZIP file. Object: byte[] Response Code: 200 OK
- */
- @GetMapping(value = "/vnf_packages/{vnfPkgId}/vnfd",
- produces = {MediaType.TEXT_PLAIN, APPLICATION_ZIP, MediaType.APPLICATION_JSON})
- public ResponseEntity<?> getVnfPackageVnfd(@PathVariable("vnfPkgId") final String vnfPkgId) {
- logger.info(LOG_REQUEST_RECEIVED, "getVnfPackageVnfd Endpoint Invoked with VNF Package ID: ", vnfPkgId);
- final Optional<byte[]> response = etsiCatalogServiceProvider.getVnfPackageVnfd(vnfPkgId);
- if (response.isPresent()) {
- logger.info(LOG_REQUEST_RECEIVED, "getVnfPackageVnfd Response: ", HttpStatus.OK);
- return new ResponseEntity<>(response.get(), HttpStatus.OK);
- }
- final String errorMessage = "An error occurred, a null response was received by the\n"
- + " Sol003PackageManagementController from the EtsiCatalogManager using the GET \"vnfd\" \n"
- + "endpoint.";
-
- logger.error(errorMessage);
- return new ResponseEntity<>(new ProblemDetails().detail(errorMessage), HttpStatus.INTERNAL_SERVER_ERROR);
- }
-
- /**
- * GET Package Content, from VNF Package. Will return a copy of the VNF package file that you specified. Section
- * Number: 10.4.5
- *
- * @param vnfPkgId The ID of the VNF Package that you want to retrieve the "package_content" from.
- * @return The Package Content of a VNF Package. Object: byte[] Response Code: 200 OK
- */
- @GetMapping(value = "/vnf_packages/{vnfPkgId}/package_content",
- produces = {MediaType.APPLICATION_JSON, APPLICATION_ZIP, MediaType.APPLICATION_OCTET_STREAM})
- public ResponseEntity<?> getVnfPackageContent(@PathVariable("vnfPkgId") final String vnfPkgId) {
- logger.info(LOG_REQUEST_RECEIVED, "getVnfPackageContent Endpoint Invoked with VNF Package ID: ", vnfPkgId);
- final Optional<byte[]> response = etsiCatalogServiceProvider.getVnfPackageContent(vnfPkgId);
- if (response.isPresent()) {
- logger.info(LOG_REQUEST_RECEIVED, "getVnfPackageContent Response: ", HttpStatus.OK);
- return ResponseEntity.ok().body(response.get());
- }
- final String errorMessage = "An error occurred, a null response was received by the\n"
- + " Sol003PackageManagementController from the EtsiCatalogManager using the GET \"package_content\" \n"
- + "endpoint.";
- logger.error(errorMessage);
- return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(new ProblemDetails().detail(errorMessage));
- }
-
- /**
- * GET Artifact, from VNF Package Will return a the content of the artifact that you specified. Section Number:
- * 10.4.6
- *
- * @param vnfPkgId The ID of the VNF Package that you want to retrieve an artifact from.
- * @param artifactPath The path of the artifact that you want to retrieve.
- * @return An Artifact from a VNF Package. Object: byte[] Response Code: 200 OK
- */
- @GetMapping(value = "/vnf_packages/{vnfPkgId}/artifacts/{artifactPath}",
- produces = {MediaType.APPLICATION_OCTET_STREAM, MediaType.APPLICATION_JSON})
- public ResponseEntity<?> getVnfPackageArtifact(@PathVariable("vnfPkgId") final String vnfPkgId,
- @PathVariable("artifactPath") final String artifactPath) {
- logger.info(LOG_REQUEST_RECEIVED, "getVnfPackageArtifact: vnfPkgId= ", vnfPkgId, " artifactPath=",
- artifactPath);
- final Optional<byte[]> response = etsiCatalogServiceProvider.getVnfPackageArtifact(vnfPkgId, artifactPath);
- if (response.isPresent()) {
- logger.info(LOG_REQUEST_RECEIVED, "getVnfPackageArtifact Response: ", HttpStatus.OK);
- return ResponseEntity.ok().body(response.get());
- }
- final String errorMessage = "An error occurred, a null response was received by the\n"
- + " Sol003PackageManagementController from the EtsiCatalogManager using the\n GET \"vnf_packages\" by vnfPkgId: \""
- + vnfPkgId + "\" for artifactPath: \"" + artifactPath + "\"\n" + "endpoint.";
- logger.error(errorMessage);
- return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(new ProblemDetails().detail(errorMessage));
- }
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/Sol003PackageManagementSubscriptionController.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/Sol003PackageManagementSubscriptionController.java
deleted file mode 100644
index 7314f6aa2e..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/Sol003PackageManagementSubscriptionController.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2020 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.pkgm.rest;
-
-import static org.onap.so.adapters.etsi.sol003.adapter.common.CommonConstants.PACKAGE_MANAGEMENT_BASE_URL;
-import static org.slf4j.LoggerFactory.getLogger;
-import java.net.URI;
-import java.security.GeneralSecurityException;
-import java.util.List;
-import java.util.Optional;
-import javax.ws.rs.core.MediaType;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.ProblemDetails;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.InlineResponse201;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.PkgmSubscriptionRequest;
-import org.onap.so.adapters.etsisol003adapter.pkgm.subscriptionmgmt.SubscriptionManager;
-import org.slf4j.Logger;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-
-/**
- * Controller for handling the Subscription Management. The client can use this resource to subscribe to notifications
- * related to the VNF package management, and to query its subscriptions. For further information please read:
- * https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/003/02.05.01_60/gs_nfv-sol003v020501p.pdf Use the section number
- * above each endpoint to find the corresponding section in the above document.
- *
- * @author Ronan Kenny (ronan.kenny@est.tech)
- * @author Gareth Roper (gareth.roper@est.tech)
- */
-@Controller
-@RequestMapping(value = PACKAGE_MANAGEMENT_BASE_URL, produces = {MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML},
- consumes = {MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
-public class Sol003PackageManagementSubscriptionController {
-
- private static final String LOG_REQUEST_RECEIVED = "Subscription Management Controller: {} {}";
- private static final Logger logger = getLogger(Sol003PackageManagementSubscriptionController.class);
- private final SubscriptionManager subscriptionManager;
-
- @Autowired
- public Sol003PackageManagementSubscriptionController(final SubscriptionManager subscriptionManager) {
- this.subscriptionManager = subscriptionManager;
- }
-
- /**
- * POST Subscribe request. Will send request and respond with the subscription that you subscribed to, if
- * successful. Section Number: 10.4.7
- *
- * @param pkgmSubscriptionRequest This includes the details of the subscription to be created.
- * @return The subscription requested, if successful. Object: InlineRespone2002 Response Code: 201 Created Response
- * Code: 303 Duplicate Subscription
- * @throws GeneralSecurityException
- */
- @PostMapping(value = "/subscriptions")
- public ResponseEntity<?> postSubscriptionRequest(@RequestBody final PkgmSubscriptionRequest pkgmSubscriptionRequest)
- throws GeneralSecurityException {
- logger.info(LOG_REQUEST_RECEIVED, " postSubscriptionRequest Endpoint Called", pkgmSubscriptionRequest);
-
- // Check if subscription exists already.
- final Optional<String> exists = subscriptionManager.getSubscriptionId(pkgmSubscriptionRequest);
-
- if (exists.isPresent()) {
- final URI subscriptionUri = subscriptionManager.getSubscriptionUri(exists.get());
- final HttpHeaders headers = createLocationHeader(subscriptionUri);
- logger.info("PkgmSubscriptionRequest already exists with uri {} ", subscriptionUri);
- return new ResponseEntity<>(headers, HttpStatus.SEE_OTHER);
- }
-
- logger.debug("No duplicate Subscription exists, continuing with POST.");
- final Optional<InlineResponse201> optionalInlineResponse =
- subscriptionManager.createSubscription(pkgmSubscriptionRequest);
-
- if (optionalInlineResponse.isPresent()) {
- InlineResponse201 inlineResponse = optionalInlineResponse.get();
- final URI subscriptionUri = subscriptionManager.getSubscriptionUri(inlineResponse.getId());
- final HttpHeaders headers = createLocationHeader(subscriptionUri);
- logger.debug("Sending response with uri {} ", subscriptionUri);
- return new ResponseEntity<>(inlineResponse, headers, HttpStatus.CREATED);
- }
- final String errorMessage = "A null response was received during the postSubscriptionRequest call.";
- logger.error(errorMessage);
- return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(new ProblemDetails().detail(errorMessage));
- }
-
- /**
- * GET all subscriptions. Will return a list of all subscriptions currently active. Section Number: 10.4.7
- *
- * @return All of the current active subscriptions. Object: List<InlineResponse2002> Response Code: 200 OK
- */
- @GetMapping(value = "/subscriptions")
- public ResponseEntity<List<InlineResponse201>> getSubscriptions() {
- logger.info(LOG_REQUEST_RECEIVED, " getSubscriptions.");
- List<InlineResponse201> subscriptionsList = subscriptionManager.getSubscriptions();
- return new ResponseEntity<>(subscriptionsList, HttpStatus.OK);
- }
-
- /**
- * GET a specific subscription, by subscriptionId. Section Number: 10.4.8
- *
- * @param subscriptionId The ID of the subscription that you wish to retrieve.
- * @return A subscription based on subscriptionId. Object: InlineResponse2002 Response Code: 200 OK
- */
- @GetMapping(value = "/subscriptions/{subscriptionId}")
- public ResponseEntity<?> getSubscription(@PathVariable("subscriptionId") final String subscriptionId) {
- logger.info(LOG_REQUEST_RECEIVED, " Getting Subscription: ", subscriptionId);
- final Optional<InlineResponse201> optional = subscriptionManager.getSubscription(subscriptionId);
- if (optional.isPresent()) {
- logger.debug("Return subscription with id {} and body {}", subscriptionId, optional);
- return new ResponseEntity<>(optional.get(), HttpStatus.OK);
- }
- final String errorMessage =
- "The requested subscription: " + subscriptionId + " was not found on call getSubscription";
- logger.error(errorMessage);
- return ResponseEntity.status(HttpStatus.NOT_FOUND).body(new ProblemDetails().detail(errorMessage));
- }
-
- /**
- * DELETE a specific subscription, by subscriptionId. Section Number: 10.4.8.3.5
- *
- * @param subscriptionId The ID of the subscription that you wish to delete.
- * @return Empty response if successful. Object: Void Response Code: 204 No Content
- */
- @DeleteMapping(value = "/subscriptions/{subscriptionId}")
- public ResponseEntity<?> deleteSubscription(@PathVariable("subscriptionId") final String subscriptionId) {
- if (subscriptionManager.deleteSubscription(subscriptionId)) {
- logger.debug("Successfully deleted subscription with id {}", subscriptionId);
- return ResponseEntity.noContent().build();
- }
- final String errorMessage =
- "The requested subscription: " + subscriptionId + " was not found on call deleteSubscription";
- logger.error(errorMessage);
- return ResponseEntity.status(HttpStatus.NOT_FOUND).body(new ProblemDetails().detail(errorMessage));
- }
-
- /**
- * Method to set the Location in the header with the URI parameter
- *
- * @param subscriptionUri
- * @return header with callbackUri in Location
- */
- private HttpHeaders createLocationHeader(final URI subscriptionUri) {
- final HttpHeaders headers = new HttpHeaders();
- headers.setLocation(subscriptionUri);
- return headers;
- }
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/AuthenticationTypeNotSupportedException.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/AuthenticationTypeNotSupportedException.java
deleted file mode 100644
index 6e1330140f..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/AuthenticationTypeNotSupportedException.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2020 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.adapters.etsisol003adapter.pkgm.rest.exceptions;
-
-import org.springframework.http.HttpStatus;
-import org.springframework.web.bind.annotation.ResponseStatus;
-
-/**
- * Exception for an unsupported authentication type
- *
- * @author Andrew Lamb (andrew.a.lamb@est.tech)
- */
-@ResponseStatus(code = HttpStatus.INTERNAL_SERVER_ERROR)
-public class AuthenticationTypeNotSupportedException extends RuntimeException {
-
- private static final long serialVersionUID = 2939423208362066902L;
-
- public AuthenticationTypeNotSupportedException(final String message) {
- super(message);
- }
-
- @Override
- public synchronized Throwable fillInStackTrace() {
- return this;
- }
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/ConversionFailedException.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/ConversionFailedException.java
deleted file mode 100644
index 9e9cb8e352..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/ConversionFailedException.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2020 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.adapters.etsisol003adapter.pkgm.rest.exceptions;
-
-import org.springframework.http.HttpStatus;
-import org.springframework.web.bind.annotation.ResponseStatus;
-
-/**
- * Exception for Conversion Failures
- *
- * @author Gareth Roper (gareth.roper@est.tech)
- * @author Andrew Lamb (andrew.a.lamb@est.tech)
- */
-@ResponseStatus(code = HttpStatus.INTERNAL_SERVER_ERROR)
-public class ConversionFailedException extends RuntimeException {
-
- private static final long serialVersionUID = 45898561453196895L;
-
- public ConversionFailedException(final String message) {
- super(message);
- }
-
- @Override
- public synchronized Throwable fillInStackTrace() {
- return this;
- }
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/EtsiCatalogManagerBadRequestException.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/EtsiCatalogManagerBadRequestException.java
deleted file mode 100644
index 7d9d5fc17a..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/EtsiCatalogManagerBadRequestException.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.adapters.etsisol003adapter.pkgm.rest.exceptions;
-
-import org.springframework.http.HttpStatus;
-import org.springframework.web.bind.annotation.ResponseStatus;
-
-/**
- * Exception for an ETSI Catalog Manager Bad Request Exception.
- *
- * @author Gareth Roper (gareth.roper@est.tech
- */
-@ResponseStatus(code = HttpStatus.BAD_REQUEST)
-public class EtsiCatalogManagerBadRequestException extends RuntimeException {
-
- private static final long serialVersionUID = 6571317418914258768L;
-
- public EtsiCatalogManagerBadRequestException(final String message) {
- super(message);
- }
-
- @Override
- public synchronized Throwable fillInStackTrace() {
- return this;
- }
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/EtsiCatalogManagerRequestFailureException.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/EtsiCatalogManagerRequestFailureException.java
deleted file mode 100644
index 110826a6d3..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/EtsiCatalogManagerRequestFailureException.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.adapters.etsisol003adapter.pkgm.rest.exceptions;
-
-import org.springframework.http.HttpStatus;
-import org.springframework.web.bind.annotation.ResponseStatus;
-
-/**
- * Exception for an ETSI Catalog Manager Request Failure
- *
- * @author gareth.roper@est.tech
- */
-@ResponseStatus(code = HttpStatus.INTERNAL_SERVER_ERROR)
-public class EtsiCatalogManagerRequestFailureException extends RuntimeException {
-
- private static final long serialVersionUID = 66862444537194516L;
-
- public EtsiCatalogManagerRequestFailureException(final String message) {
- super(message);
- }
-
- public EtsiCatalogManagerRequestFailureException(final String message, final Throwable cause) {
- super(message, cause);
- }
-
- @Override
- public synchronized Throwable fillInStackTrace() {
- return this;
- }
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/EtsiSubscriptionNotificationControllerExceptionHandler.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/EtsiSubscriptionNotificationControllerExceptionHandler.java
deleted file mode 100644
index 645ef96326..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/EtsiSubscriptionNotificationControllerExceptionHandler.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2020 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.pkgm.rest.exceptions;
-
-import static org.slf4j.LoggerFactory.getLogger;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.ProblemDetails;
-import org.onap.so.adapters.etsisol003adapter.pkgm.rest.EtsiSubscriptionNotificationController;
-import org.onap.so.rest.exceptions.HttpResouceNotFoundException;
-import org.onap.so.rest.exceptions.InvalidRestRequestException;
-import org.onap.so.rest.exceptions.RestProcessingException;
-import org.slf4j.Logger;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
-import org.springframework.web.bind.annotation.ControllerAdvice;
-import org.springframework.web.bind.annotation.ExceptionHandler;
-
-/**
- * Exception Handler for the Etsi Subscription Notification Controller {@link EtsiSubscriptionNotificationController
- * EtsiSubscriptionNotificationController}
- *
- * @author Andrew Lamb (andrew.a.lamb@est.tech)
- */
-@ControllerAdvice(assignableTypes = EtsiSubscriptionNotificationController.class)
-public class EtsiSubscriptionNotificationControllerExceptionHandler {
-
- private static final Logger logger = getLogger(EtsiSubscriptionNotificationControllerExceptionHandler.class);
-
- @ExceptionHandler(InvalidRestRequestException.class)
- public ResponseEntity<ProblemDetails> handleInvalidRestRequestException(
- final InvalidRestRequestException invalidRestRequestException) {
- final String errorMessage = "An error occurred. Sending of notification to VNFM failed with response: "
- + HttpStatus.BAD_REQUEST + ".\n" + invalidRestRequestException.getMessage();
- logger.error(errorMessage);
- return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(new ProblemDetails().detail(errorMessage));
- }
-
- @ExceptionHandler(HttpResouceNotFoundException.class)
- public ResponseEntity<ProblemDetails> handleHttpResourceNotFoundException(
- final HttpResouceNotFoundException httpResourceNotFoundException) {
- final String errorMessage = "An error occurred. Sending of notification to VNFM failed with response: "
- + HttpStatus.NOT_FOUND + ".\n" + httpResourceNotFoundException.getMessage();
- logger.error(errorMessage);
- return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(new ProblemDetails().detail(errorMessage));
- }
-
- @ExceptionHandler(RestProcessingException.class)
- public ResponseEntity<ProblemDetails> handleRestProcessingException(
- final RestProcessingException restProcessingException) {
- final String errorMessage = "An error occurred. Sending of notification to VNFM failed with response: "
- + restProcessingException.getStatusCode() + ".\n" + restProcessingException.getMessage();
- logger.error(errorMessage);
- return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(new ProblemDetails().detail(errorMessage));
- }
-
- @ExceptionHandler(InternalServerErrorException.class)
- public ResponseEntity<ProblemDetails> handleInternalServerErrorException(
- final InternalServerErrorException internalServerErrorException) {
- logger.error(internalServerErrorException.getMessage());
- return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR)
- .body(new ProblemDetails().detail(internalServerErrorException.getMessage()));
- }
-
- @ExceptionHandler(AuthenticationTypeNotSupportedException.class)
- public ResponseEntity<ProblemDetails> handleAuthenticationTypeNotSupportedException(
- final AuthenticationTypeNotSupportedException authenticationTypeNotSupportedException) {
- logger.error(authenticationTypeNotSupportedException.getMessage());
- return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR)
- .body(new ProblemDetails().detail(authenticationTypeNotSupportedException.getMessage()));
- }
-
- @ExceptionHandler(ConversionFailedException.class)
- public ResponseEntity<ProblemDetails> handleConversionFailedException(
- final ConversionFailedException conversionFailedException) {
- logger.error(conversionFailedException.getMessage());
- return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR)
- .body(new ProblemDetails().detail(conversionFailedException.getMessage()));
- }
-
- @ExceptionHandler(NotificationTypeNotSupportedException.class)
- public ResponseEntity<ProblemDetails> handleNotificationTypeNotSupportedException(
- final NotificationTypeNotSupportedException notificationTypeNotSupportedException) {
- logger.error(notificationTypeNotSupportedException.getMessage());
- return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR)
- .body(new ProblemDetails().detail(notificationTypeNotSupportedException.getMessage()));
- }
-
- @ExceptionHandler(SubscriptionNotFoundException.class)
- public ResponseEntity<ProblemDetails> handleSubscriptionNotFoundException(
- final SubscriptionNotFoundException subscriptionNotFoundException) {
- logger.error(subscriptionNotFoundException.getMessage());
- return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR)
- .body(new ProblemDetails().detail(subscriptionNotFoundException.getMessage()));
- }
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/InternalServerErrorException.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/InternalServerErrorException.java
deleted file mode 100644
index 9dd7f1b7b2..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/InternalServerErrorException.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2020 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.adapters.etsisol003adapter.pkgm.rest.exceptions;
-
-import org.springframework.http.HttpStatus;
-import org.springframework.web.bind.annotation.ResponseStatus;
-
-/**
- * Exception for an ETSI Catalog Manager Request Failure
- *
- * @author gareth.roper@est.tech
- */
-@ResponseStatus(code = HttpStatus.INTERNAL_SERVER_ERROR)
-public class InternalServerErrorException extends RuntimeException {
-
- private static final long serialVersionUID = 66864561537194516L;
-
- public InternalServerErrorException(final String message) {
- super(message);
- }
-
- @Override
- public synchronized Throwable fillInStackTrace() {
- return this;
- }
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/NotificationTypeNotSupportedException.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/NotificationTypeNotSupportedException.java
deleted file mode 100644
index 7716037342..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/NotificationTypeNotSupportedException.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2020 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.adapters.etsisol003adapter.pkgm.rest.exceptions;
-
-import org.springframework.http.HttpStatus;
-import org.springframework.web.bind.annotation.ResponseStatus;
-
-/**
- * Exception for an unsupported notification type
- *
- * @author Andrew Lamb (andrew.a.lamb@est.tech)
- */
-@ResponseStatus(code = HttpStatus.INTERNAL_SERVER_ERROR)
-public class NotificationTypeNotSupportedException extends RuntimeException {
-
- private static final long serialVersionUID = 2939423208362066902L;
-
- public NotificationTypeNotSupportedException(final String message) {
- super(message);
- }
-
- @Override
- public synchronized Throwable fillInStackTrace() {
- return this;
- }
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/Sol003PackageManagementControllerExceptionHandler.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/Sol003PackageManagementControllerExceptionHandler.java
deleted file mode 100644
index 9f97b4ae02..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/Sol003PackageManagementControllerExceptionHandler.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.pkgm.rest.exceptions;
-
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.ProblemDetails;
-import org.onap.so.adapters.etsisol003adapter.pkgm.rest.Sol003PackageManagementController;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
-import org.springframework.web.bind.annotation.ControllerAdvice;
-import org.springframework.web.bind.annotation.ExceptionHandler;
-
-/**
- * Exception Handler for the Package Management Controller {@link Sol003PackageManagementController Sol003Controller}
- *
- * @author gareth.roper@est.tech
- */
-@ControllerAdvice(assignableTypes = Sol003PackageManagementController.class)
-
-public class Sol003PackageManagementControllerExceptionHandler {
-
- @ExceptionHandler(EtsiCatalogManagerRequestFailureException.class)
- public ResponseEntity<ProblemDetails> handleEtsiCatalogManagerRequestFailureException(
- final EtsiCatalogManagerRequestFailureException etsiCatalogManagerRequestFailureException) {
- final ProblemDetails problemDetails = new ProblemDetails();
- problemDetails.setDetail(etsiCatalogManagerRequestFailureException.getMessage());
- return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(problemDetails);
- }
-
- @ExceptionHandler(EtsiCatalogManagerBadRequestException.class)
- public ResponseEntity<ProblemDetails> handleEtsiCatalogManagerBadRequestFailureException(
- final EtsiCatalogManagerBadRequestException etsiCatalogManagerBadRequestException) {
- final ProblemDetails problemDetails = new ProblemDetails();
- problemDetails.setDetail(etsiCatalogManagerBadRequestException.getMessage());
- return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(problemDetails);
- }
-
- @ExceptionHandler(SubscriptionNotFoundException.class)
- public ResponseEntity<ProblemDetails> handleSubscriptionNotFoundException(
- final SubscriptionNotFoundException subscriptionNotFoundException) {
- final ProblemDetails problemDetails = new ProblemDetails();
- problemDetails.setDetail(subscriptionNotFoundException.getMessage());
- return ResponseEntity.status(HttpStatus.NOT_FOUND).body(problemDetails);
- }
-
- @ExceptionHandler(ConversionFailedException.class)
- public ResponseEntity<ProblemDetails> handleConversionFailedException(
- final ConversionFailedException conversionFailedException) {
- final ProblemDetails problemDetails = new ProblemDetails();
- problemDetails.setDetail(conversionFailedException.getMessage());
- return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(problemDetails);
- }
-
- @ExceptionHandler(VnfPkgConflictException.class)
- public ResponseEntity<ProblemDetails> handleVnfPkgConflictException(
- final VnfPkgConflictException vnfPkgConflictException) {
- final ProblemDetails problemDetails = new ProblemDetails();
- problemDetails.setDetail(vnfPkgConflictException.getMessage());
- return ResponseEntity.status(HttpStatus.CONFLICT).body(problemDetails);
- }
-
- @ExceptionHandler(VnfPkgNotFoundException.class)
- public ResponseEntity<ProblemDetails> handleVnfPkgNotFoundException(
- final VnfPkgNotFoundException vnfPkgNotFoundException) {
- final ProblemDetails problemDetails = new ProblemDetails();
- problemDetails.setDetail(vnfPkgNotFoundException.getMessage());
- return ResponseEntity.status(HttpStatus.NOT_FOUND).body(problemDetails);
- }
-
- @ExceptionHandler(VnfPkgBadRequestException.class)
- public ResponseEntity<ProblemDetails> handleVnfPkgBadRequestException(
- final VnfPkgBadRequestException vnfPkgBadRequestException) {
- final ProblemDetails problemDetails = new ProblemDetails();
- problemDetails.setDetail(vnfPkgBadRequestException.getMessage());
- return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(problemDetails);
- }
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/SubscriptionNotFoundException.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/SubscriptionNotFoundException.java
deleted file mode 100644
index af409e7399..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/SubscriptionNotFoundException.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2020 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.adapters.etsisol003adapter.pkgm.rest.exceptions;
-
-import org.springframework.http.HttpStatus;
-import org.springframework.web.bind.annotation.ResponseStatus;
-
-/**
- * Exception for an ETSI Catalog Manager Request Failure
- *
- * @author gareth.roper@est.tech
- */
-@ResponseStatus(code = HttpStatus.NOT_FOUND)
-public class SubscriptionNotFoundException extends RuntimeException {
-
- private static final long serialVersionUID = 85268561453194516L;
-
- public SubscriptionNotFoundException(final String message) {
- super(message);
- }
-
- @Override
- public synchronized Throwable fillInStackTrace() {
- return this;
- }
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/VnfPkgBadRequestException.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/VnfPkgBadRequestException.java
deleted file mode 100644
index 5c318da89f..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/VnfPkgBadRequestException.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.adapters.etsisol003adapter.pkgm.rest.exceptions;
-
-import org.springframework.http.HttpStatus;
-import org.springframework.web.bind.annotation.ResponseStatus;
-
-/**
- * Exception for a Vnfpkg Bad Request failure, due to state of resource.
- *
- * @author andrew.a.lamb@est.tech
- */
-@ResponseStatus(code = HttpStatus.BAD_REQUEST)
-public class VnfPkgBadRequestException extends RuntimeException {
-
- private static final long serialVersionUID = 3301317418914258411L;
-
- public VnfPkgBadRequestException(final String message) {
- super(message);
- }
-
- @Override
- public synchronized Throwable fillInStackTrace() {
- return this;
- }
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/VnfPkgConflictException.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/VnfPkgConflictException.java
deleted file mode 100644
index 7cb7a0c860..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/VnfPkgConflictException.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.adapters.etsisol003adapter.pkgm.rest.exceptions;
-
-import org.springframework.http.HttpStatus;
-import org.springframework.web.bind.annotation.ResponseStatus;
-
-/**
- * Exception for a VnfPkg Conflict failures, due to state of resource.
- *
- * @author gareth.roper@est.tech
- */
-@ResponseStatus(code = HttpStatus.CONFLICT)
-public class VnfPkgConflictException extends RuntimeException {
-
- private static final long serialVersionUID = 26862444537198441L;
-
- public VnfPkgConflictException(final String message) {
- super(message);
- }
-
- @Override
- public synchronized Throwable fillInStackTrace() {
- return this;
- }
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/VnfPkgNotFoundException.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/VnfPkgNotFoundException.java
deleted file mode 100644
index 5ed4847173..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/exceptions/VnfPkgNotFoundException.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.adapters.etsisol003adapter.pkgm.rest.exceptions;
-
-import org.springframework.http.HttpStatus;
-import org.springframework.web.bind.annotation.ResponseStatus;
-
-/**
- * Exception for VnfPkg Not Found Failures
- *
- * @author gareth.roper@est.tech
- */
-@ResponseStatus(code = HttpStatus.NOT_FOUND)
-public class VnfPkgNotFoundException extends RuntimeException {
-
- private static final long serialVersionUID = 26862444537198441L;
-
- public VnfPkgNotFoundException(final String message) {
- super(message);
- }
-
- @Override
- public synchronized Throwable fillInStackTrace() {
- return this;
- }
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/subscriptionmgmt/AbstractNotificationServiceProvider.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/subscriptionmgmt/AbstractNotificationServiceProvider.java
deleted file mode 100644
index b6ba1ede95..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/subscriptionmgmt/AbstractNotificationServiceProvider.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2020 Ericsson. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.adapters.etsisol003adapter.pkgm.subscriptionmgmt;
-
-import static org.onap.so.adapters.etsisol003adapter.pkgm.extclients.vnfm.VnfmHttpServiceProviderConfiguration.VNFM_ADAPTER_HTTP_SERVICE_PROVIDER_BEAN;
-import java.nio.charset.StandardCharsets;
-import org.apache.commons.codec.binary.Base64;
-import org.onap.so.configuration.rest.BasicHttpHeadersProvider;
-import org.onap.so.rest.service.HttpRestServiceProvider;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Qualifier;
-
-/**
- * A base class that can be extended by classes for providing notification services. Provides common methods that will
- * be useful to those classes.
- *
- * @author Waqas Ikram (waqas.ikram@est.tech)
- * @author Andrew Lamb (andrew.a.lamb@est.tech)
- */
-public abstract class AbstractNotificationServiceProvider {
-
- @Autowired
- @Qualifier(VNFM_ADAPTER_HTTP_SERVICE_PROVIDER_BEAN)
- private HttpRestServiceProvider httpRestServiceProvider;
-
- protected HttpRestServiceProvider getHttpRestServiceProvider() {
- return httpRestServiceProvider;
- }
-
- protected BasicHttpHeadersProvider getBasicHttpHeadersProviderWithBasicAuth(final String username,
- final String password) {
- final byte[] encodedAuth = getBasicAuth(username, password);
- final String authHeader = "Basic " + new String(encodedAuth);
- return new BasicHttpHeadersProvider(authHeader);
- }
-
- protected byte[] getBasicAuth(final String username, final String password) {
- final String auth = username + ":" + password;
- return Base64.encodeBase64(auth.getBytes(StandardCharsets.ISO_8859_1));
- }
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/subscriptionmgmt/BasicAuthNotificationServiceProvider.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/subscriptionmgmt/BasicAuthNotificationServiceProvider.java
deleted file mode 100644
index ffe8529c93..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/subscriptionmgmt/BasicAuthNotificationServiceProvider.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2020 Ericsson. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.adapters.etsisol003adapter.pkgm.subscriptionmgmt;
-
-import static org.slf4j.LoggerFactory.getLogger;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.SubscriptionsAuthentication;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.SubscriptionsAuthentication.AuthTypeEnum;
-import org.onap.so.configuration.rest.HttpHeadersProvider;
-import org.onap.so.rest.service.HttpRestServiceProvider;
-import org.slf4j.Logger;
-import org.springframework.http.ResponseEntity;
-import org.springframework.stereotype.Service;
-
-/**
- * Implementation of a NotificationServiceProvider which supports Basic Authentication
- *
- * @author Waqas Ikram (waqas.ikram@est.tech)
- * @author Andrew Lamb (andrew.a.lamb@est.tech)
- */
-@Service
-public class BasicAuthNotificationServiceProvider extends AbstractNotificationServiceProvider
- implements NotificationServiceProvider {
-
- private static final Logger logger = getLogger(BasicAuthNotificationServiceProvider.class);
-
- @Override
- public boolean send(final Object notification, final SubscriptionsAuthentication subscriptionsAuthentication,
- final String callbackUri) {
- logger.info("Sending notification to uri: {}", callbackUri);
- final HttpHeadersProvider httpHeadersProvider =
- getBasicHttpHeadersProviderWithBasicAuth(subscriptionsAuthentication.getParamsBasic().getUserName(),
- subscriptionsAuthentication.getParamsBasic().getPassword());
- final HttpRestServiceProvider httpRestServiceProvider = getHttpRestServiceProvider();
-
- final ResponseEntity<Void> responseEntity = httpRestServiceProvider.postHttpRequest(notification, callbackUri,
- httpHeadersProvider.getHttpHeaders(), Void.class);
- if (responseEntity.getStatusCode().is2xxSuccessful()) {
- logger.info("Notification sent successfully.");
- return true;
- }
-
- logger.error("Failed to send notification.");
- return false;
- }
-
- @Override
- public AuthTypeEnum getAuthType() {
- return AuthTypeEnum.BASIC;
- }
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/subscriptionmgmt/NotificationManager.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/subscriptionmgmt/NotificationManager.java
deleted file mode 100644
index 82b1a7d4c3..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/subscriptionmgmt/NotificationManager.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2020 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.pkgm.subscriptionmgmt;
-
-import static org.slf4j.LoggerFactory.getLogger;
-import java.util.List;
-import java.util.Optional;
-import org.onap.so.adapters.etsisol003adapter.etsicatalog.notification.model.PkgChangeNotification;
-import org.onap.so.adapters.etsisol003adapter.etsicatalog.notification.model.PkgOnboardingNotification;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.vnfm.notification.model.VnfPackageChangeNotification;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.vnfm.notification.model.VnfPackageOnboardingNotification;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.PkgmSubscriptionRequest;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.SubscriptionsAuthentication;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.SubscriptionsAuthentication.AuthTypeEnum;
-import org.onap.so.adapters.etsisol003adapter.pkgm.rest.exceptions.AuthenticationTypeNotSupportedException;
-import org.onap.so.adapters.etsisol003adapter.pkgm.rest.exceptions.ConversionFailedException;
-import org.onap.so.adapters.etsisol003adapter.pkgm.rest.exceptions.NotificationTypeNotSupportedException;
-import org.onap.so.adapters.etsisol003adapter.pkgm.rest.exceptions.SubscriptionNotFoundException;
-import org.slf4j.Logger;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.core.convert.ConversionService;
-import org.springframework.stereotype.Service;
-
-/**
- * Manages package management subscription notifications to the VNFMs
- *
- * @author Andrew Lamb (andrew.a.lamb@est.tech)
- *
- */
-@Service
-public class NotificationManager {
-
- private static final Logger logger = getLogger(NotificationManager.class);
- private final ConversionService conversionService;
- private final SubscriptionManager subscriptionManager;
- private final NotificationServiceProviderFactory notificationServiceProviderFactory;
-
- @Autowired
- public NotificationManager(final SubscriptionManager subscriptionManager, final ConversionService conversionService,
- final NotificationServiceProviderFactory notificationServiceProviderFactory) {
- this.subscriptionManager = subscriptionManager;
- this.conversionService = conversionService;
- this.notificationServiceProviderFactory = notificationServiceProviderFactory;
- }
-
- /**
- * Process a subscription notification. Checks for a subscription request stored in the adapter and if there is, it
- * sends the notification to the subscribed vnfm.
- *
- * @param notification the notification to send to the vnfm
- * @param subscriptionId the id of the subscription request
- * @return true if the notification is successfully sent
- */
- public boolean processSubscriptionNotification(final Object notification, final String subscriptionId) {
- final Optional<PkgmSubscriptionRequest> optionalSubscription =
- subscriptionManager.getSubscriptionRequest(subscriptionId);
- if (optionalSubscription.isPresent()) {
- final PkgmSubscriptionRequest subscriptionRequest = optionalSubscription.get();
- return notifyVnfm(subscriptionRequest, notification);
- }
- final String errorMessage = "No subscription found with subscriptionId " + subscriptionId
- + ". Unable to forward notification to subscriber.";
- logger.error(errorMessage);
- throw new SubscriptionNotFoundException(errorMessage);
- }
-
- private boolean notifyVnfm(final PkgmSubscriptionRequest subscriptionRequest, final Object notification) {
- if (!(notification instanceof PkgOnboardingNotification) && !(notification instanceof PkgChangeNotification)) {
- final String errorMessage =
- "An error occurred. Notification type not supported for: " + notification.getClass();
- logger.error(errorMessage);
- throw new NotificationTypeNotSupportedException(errorMessage);
- }
-
- final SubscriptionsAuthentication subscriptionsAuthentication = subscriptionRequest.getAuthentication();
- final AuthTypeEnum authType = getAuthType(subscriptionsAuthentication.getAuthType());
- final NotificationServiceProvider sender = notificationServiceProviderFactory.getNotificationSender(authType);
-
- final Object vnfmNotificationObject = convertEtsiCatalogNotification(notification);
-
- if (sender.send(vnfmNotificationObject, subscriptionsAuthentication, subscriptionRequest.getCallbackUri())) {
- logger.info("Notification delivered successfully {}", notification);
- return true;
- }
-
- logger.error("Failed to deliver notification.");
- return false;
- }
-
- private SubscriptionsAuthentication.AuthTypeEnum getAuthType(final List<AuthTypeEnum> authTypes) {
- if (authTypes.contains(SubscriptionsAuthentication.AuthTypeEnum.TLS_CERT)) {
- return SubscriptionsAuthentication.AuthTypeEnum.TLS_CERT;
- }
- if (authTypes.contains(SubscriptionsAuthentication.AuthTypeEnum.OAUTH2_CLIENT_CREDENTIALS)) {
- return SubscriptionsAuthentication.AuthTypeEnum.OAUTH2_CLIENT_CREDENTIALS;
- }
- if (authTypes.contains(SubscriptionsAuthentication.AuthTypeEnum.BASIC)) {
- return SubscriptionsAuthentication.AuthTypeEnum.BASIC;
- }
- final String errorMessage =
- "An error occurred. No supported authentication type provided in subscription request.";
- logger.error(errorMessage);
- throw new AuthenticationTypeNotSupportedException(errorMessage);
- }
-
- private Object convertEtsiCatalogNotification(final Object etsiCatalogNotification) {
- logger.info("Converting notification:\n {}", etsiCatalogNotification);
- if (conversionService.canConvert(etsiCatalogNotification.getClass(), VnfPackageOnboardingNotification.class)) {
- return conversionService.convert(etsiCatalogNotification, VnfPackageOnboardingNotification.class);
- } else if (conversionService.canConvert(etsiCatalogNotification.getClass(),
- VnfPackageChangeNotification.class)) {
- return conversionService.convert(etsiCatalogNotification, VnfPackageChangeNotification.class);
- }
- final String errorMessage = "An error occurred. Unable to convert provided notification object.";
- logger.error(errorMessage + "\n" + etsiCatalogNotification);
- throw new ConversionFailedException(errorMessage);
- }
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/subscriptionmgmt/NotificationServiceProvider.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/subscriptionmgmt/NotificationServiceProvider.java
deleted file mode 100644
index 2fc7e19eb6..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/subscriptionmgmt/NotificationServiceProvider.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2020 Ericsson. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.adapters.etsisol003adapter.pkgm.subscriptionmgmt;
-
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.SubscriptionsAuthentication;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.SubscriptionsAuthentication.AuthTypeEnum;
-
-/**
- * Interface which lays out requirements for a Notification Service Provider
- *
- * @author Waqas Ikram (waqas.ikram@est.tech)
- * @author Andrew Lamb (andrew.a.lamb@est.tech)
- */
-public interface NotificationServiceProvider {
-
- /**
- * Method to send a notification to a uri, given the subscription authentication
- *
- * @param notification The notification to send
- * @param subscriptionsAuthentication Object containing the authentication details
- * @param callbackUri The uri to send the notification to
- * @return true if notification is delivered successfully, otherwise false
- */
- boolean send(final Object notification, final SubscriptionsAuthentication subscriptionsAuthentication,
- final String callbackUri);
-
- /**
- * Method to get the supported authorization type of the service provider
- *
- * @return the supported AuthTypeEnum
- */
- AuthTypeEnum getAuthType();
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/subscriptionmgmt/NotificationServiceProviderFactory.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/subscriptionmgmt/NotificationServiceProviderFactory.java
deleted file mode 100644
index 2b8e818c9c..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/subscriptionmgmt/NotificationServiceProviderFactory.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2020 Ericsson. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.adapters.etsisol003adapter.pkgm.subscriptionmgmt;
-
-import static org.slf4j.LoggerFactory.getLogger;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.SubscriptionsAuthentication.AuthTypeEnum;
-import org.onap.so.adapters.etsisol003adapter.pkgm.rest.exceptions.AuthenticationTypeNotSupportedException;
-import org.slf4j.Logger;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-/**
- * Factory to provide a notification services
- *
- * @author Waqas Ikram (waqas.ikram@est.tech)
- * @author Andrew Lamb (andrew.a.lamb@est.tech)
- */
-@Component
-public class NotificationServiceProviderFactory {
-
- private static final Logger logger = getLogger(NotificationServiceProviderFactory.class);
- private static final Map<AuthTypeEnum, NotificationServiceProvider> CACHE = new HashMap<>();
-
- @Autowired
- public NotificationServiceProviderFactory(final List<NotificationServiceProvider> services) {
- for (final NotificationServiceProvider notificationServiceProvider : services) {
- logger.debug("Adding {} of type {} to cache", notificationServiceProvider.getClass().getCanonicalName(),
- notificationServiceProvider.getAuthType());
- CACHE.put(notificationServiceProvider.getAuthType(), notificationServiceProvider);
- }
- }
-
- /**
- * Get a notification service for a given authorization type
- *
- * @param type the type of authentication required
- * @return the notification service
- */
- public NotificationServiceProvider getNotificationSender(final AuthTypeEnum type) {
- final NotificationServiceProvider service = CACHE.get(type);
- if (service == null) {
- throw new AuthenticationTypeNotSupportedException("Unknown type: " + type);
- }
- return service;
- }
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/subscriptionmgmt/OAuthNotificationServiceProvider.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/subscriptionmgmt/OAuthNotificationServiceProvider.java
deleted file mode 100644
index 81dc743a22..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/subscriptionmgmt/OAuthNotificationServiceProvider.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2020 Ericsson. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.adapters.etsisol003adapter.pkgm.subscriptionmgmt;
-
-import static org.slf4j.LoggerFactory.getLogger;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.SubscriptionsAuthentication;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.SubscriptionsAuthentication.AuthTypeEnum;
-import org.onap.so.adapters.etsisol003adapter.pkgm.rest.exceptions.InternalServerErrorException;
-import org.onap.so.configuration.rest.BasicHttpHeadersProvider;
-import org.onap.so.configuration.rest.HttpHeadersProvider;
-import org.onap.so.rest.service.HttpRestServiceProvider;
-import org.slf4j.Logger;
-import org.springframework.http.ResponseEntity;
-import org.springframework.stereotype.Service;
-
-/**
- * @author Waqas Ikram (waqas.ikram@est.tech)
- * @author Andrew Lamb (andrew.a.lamb@est.tech)
- *
- */
-@Service
-public class OAuthNotificationServiceProvider extends AbstractNotificationServiceProvider
- implements NotificationServiceProvider {
-
- private static final Logger logger = getLogger(OAuthNotificationServiceProvider.class);
-
- @Override
- public boolean send(final Object notification, final SubscriptionsAuthentication subscriptionsAuthentication,
- final String callbackUri) {
- logger.info("Sending notification to uri: {}", callbackUri);
- logger.info("Object: {}", notification);
- final String token = getAccessToken(subscriptionsAuthentication);
-
- if (token == null) {
- logger.error("Failed to get access token");
- return false;
- }
-
- final HttpHeadersProvider httpHeadersProvider = getHttpHeadersProvider(token);
- final HttpRestServiceProvider httpRestServiceProvider = getHttpRestServiceProvider();
- final ResponseEntity<Void> responseEntity = httpRestServiceProvider.postHttpRequest(notification, callbackUri,
- httpHeadersProvider.getHttpHeaders(), Void.class);
- if (responseEntity.getStatusCode().is2xxSuccessful()) {
- logger.info("Notification sent successfully.");
- return true;
- }
-
- logger.error("Failed to send notification.");
- return false;
- }
-
- @Override
- public AuthTypeEnum getAuthType() {
- return AuthTypeEnum.OAUTH2_CLIENT_CREDENTIALS;
- }
-
- private BasicHttpHeadersProvider getHttpHeadersProvider(final String token) {
- final String authHeader = "Bearer " + token;
- return new BasicHttpHeadersProvider(authHeader);
- }
-
- private String getAccessToken(final SubscriptionsAuthentication subscriptionsAuthentication) {
- logger.info("Requesting Access Token.");
-
- final String tokenEndpoint = subscriptionsAuthentication.getParamsOauth2ClientCredentials().getTokenEndpoint();
-
- final HttpHeadersProvider httpHeadersProvider = getBasicHttpHeadersProviderWithBasicAuth(
- subscriptionsAuthentication.getParamsOauth2ClientCredentials().getClientId(),
- subscriptionsAuthentication.getParamsOauth2ClientCredentials().getClientPassword());
-
- final HttpRestServiceProvider httpRestServiceProvider = getHttpRestServiceProvider();
- final ResponseEntity<OAuthTokenResponse> responseEntity = httpRestServiceProvider.postHttpRequest(null,
- tokenEndpoint, httpHeadersProvider.getHttpHeaders(), OAuthTokenResponse.class);
- if (responseEntity.getStatusCode().is2xxSuccessful()) {
- if (responseEntity.getBody() != null) {
- logger.info("Returning Access Token.");
- return responseEntity.getBody().getAccessToken();
- }
- }
-
- final String errorMessage = "An error occurred. Unable to retrieve OAuth Token from VNFM for notification.";
- logger.error(errorMessage);
- throw new InternalServerErrorException(errorMessage);
- }
-
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/subscriptionmgmt/OAuthTokenResponse.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/subscriptionmgmt/OAuthTokenResponse.java
deleted file mode 100644
index 3e6f7bde2b..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/subscriptionmgmt/OAuthTokenResponse.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2020 Ericsson. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.adapters.etsisol003adapter.pkgm.subscriptionmgmt;
-
-import java.io.Serializable;
-import javax.xml.bind.annotation.XmlElement;
-import com.google.gson.annotations.SerializedName;
-
-/**
- * @author Waqas Ikram (waqas.ikram@est.tech)
- * @author Andrew Lamb (andrew.a.lamb@est.tech)
- */
-public class OAuthTokenResponse implements Serializable {
-
- private static final long serialVersionUID = -6455742984985959926L;
-
- @XmlElement(name = "access_token")
- @SerializedName("access_token")
- private String accessToken;
-
- /**
- * Get the Accees Token
- *
- * @return the Access Token
- */
- public String getAccessToken() {
- return accessToken;
- }
-
- /**
- * Set the Access Token
- *
- * @param accessToken
- */
- public void setAccessToken(final String accessToken) {
- this.accessToken = accessToken;
- }
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/subscriptionmgmt/SubscriptionManager.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/subscriptionmgmt/SubscriptionManager.java
deleted file mode 100644
index edae41525e..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/subscriptionmgmt/SubscriptionManager.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2020 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.pkgm.subscriptionmgmt;
-
-import static org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.SubscriptionAuthentication.AuthTypeEnum.BASIC;
-import static org.slf4j.LoggerFactory.getLogger;
-import java.net.URI;
-import java.security.GeneralSecurityException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-import java.util.Optional;
-import org.apache.commons.lang3.tuple.ImmutablePair;
-import org.onap.so.adapters.etsi.sol003.adapter.common.VnfmAdapterUrlProvider;
-import org.onap.so.adapters.etsisol003adapter.pkgm.cache.PkgmCacheServiceProvider;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.EtsiCatalogServiceProvider;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.BasicAuth;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.NsdmSubscription;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.PkgmSubscription;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.InlineResponse201;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.PkgmSubscriptionRequest;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.SubscriptionsLinks;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.VnfPackagesLinksSelf;
-import org.onap.so.adapters.etsisol003adapter.pkgm.rest.exceptions.ConversionFailedException;
-import org.onap.so.adapters.etsisol003adapter.pkgm.rest.exceptions.InternalServerErrorException;
-import org.onap.so.adapters.etsisol003adapter.pkgm.rest.exceptions.SubscriptionNotFoundException;
-import org.slf4j.Logger;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.core.convert.ConversionService;
-import org.springframework.stereotype.Service;
-
-/**
- * Manages package management subscriptions from the VNFMs
- *
- * @author Ronan Kenny (ronan.kenny@est.tech)
- * @author Gareth Roper (gareth.roper@est.tech)
- */
-@Service
-public class SubscriptionManager {
-
- private static final Logger logger = getLogger(SubscriptionManager.class);
- private final PkgmCacheServiceProvider packageManagementCacheServiceProvider;
- private final ConversionService conversionService;
- private final EtsiCatalogServiceProvider etsiCatalogServiceProvider;
- private final VnfmAdapterUrlProvider vnfmAdapterUrlProvider;
-
- @Autowired
- public SubscriptionManager(final PkgmCacheServiceProvider packageManagementCacheServiceProvider,
- final ConversionService conversionService, final EtsiCatalogServiceProvider etsiCatalogServiceProvider,
- final VnfmAdapterUrlProvider vnfmAdapterUrlProvider) {
- this.packageManagementCacheServiceProvider = packageManagementCacheServiceProvider;
- this.conversionService = conversionService;
- this.etsiCatalogServiceProvider = etsiCatalogServiceProvider;
- this.vnfmAdapterUrlProvider = vnfmAdapterUrlProvider;
- }
-
- public Optional<InlineResponse201> createSubscription(final PkgmSubscriptionRequest pkgmSubscriptionRequest)
- throws GeneralSecurityException {
-
- final org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.PkgmSubscriptionRequest etsiCatalogManagerSubscriptionRequest =
- buildEtsiCatalogManagerPkgmSubscriptionRequest(pkgmSubscriptionRequest);
-
- final Optional<PkgmSubscription> optionalEtsiCatalogManagerSubscription =
- etsiCatalogServiceProvider.postSubscription(etsiCatalogManagerSubscriptionRequest);
-
- if (optionalEtsiCatalogManagerSubscription.isPresent()) {
- final PkgmSubscription etsiCatalogManagerSubscription = optionalEtsiCatalogManagerSubscription.get();
- logger.debug("postPkgmSubscriptionRequest Response SubscriptionId: {}",
- Objects.requireNonNull(etsiCatalogManagerSubscription.getId()));
- final String subscriptionId = etsiCatalogManagerSubscription.getId();
-
- packageManagementCacheServiceProvider.addSubscription(subscriptionId, pkgmSubscriptionRequest);
-
- final InlineResponse201 response = new InlineResponse201();
- response.setId(subscriptionId);
- response.setFilter(pkgmSubscriptionRequest.getFilter());
- response.setCallbackUri(vnfmAdapterUrlProvider.getSubscriptionUriString(subscriptionId));
- response.setLinks(new SubscriptionsLinks()
- .self(new VnfPackagesLinksSelf().href(getSubscriptionUri(subscriptionId).toString())));
-
- return Optional.of(response);
- }
- throw new InternalServerErrorException(
- "Received empty response from POST to ETSI Catalog Manager Subscription Endpoint.");
- }
-
- public Optional<String> getSubscriptionId(final PkgmSubscriptionRequest pkgmSubscriptionRequest) {
- return packageManagementCacheServiceProvider.getSubscriptionId(pkgmSubscriptionRequest);
- }
-
- public Optional<InlineResponse201> getSubscription(final String subscriptionId) {
-
- logger.debug("Checking if subscrition with id: {} exists in ETSI Catalog Manager", subscriptionId);
- final Optional<NsdmSubscription> etsiCatalogSubscriptionOption =
- etsiCatalogServiceProvider.getSubscription(subscriptionId);
-
- if (!etsiCatalogSubscriptionOption.isPresent()) {
- logger.debug("Unable to find subscription in ETSI Catalog Manager using id: {}", subscriptionId);
- if (packageManagementCacheServiceProvider.getSubscription(subscriptionId).isPresent()) {
- logger.debug("will remove subcription with id: {} from local cache", subscriptionId);
- packageManagementCacheServiceProvider.deleteSubscription(subscriptionId);
- }
- }
-
- final Optional<PkgmSubscriptionRequest> optional =
- packageManagementCacheServiceProvider.getSubscription(subscriptionId);
- if (optional.isPresent()) {
- final PkgmSubscriptionRequest subscription = optional.get();
- return Optional.of(getInlineResponse2002(subscriptionId, subscription));
- }
- return Optional.empty();
- }
-
- public List<InlineResponse201> getSubscriptions() {
- final Map<String, PkgmSubscriptionRequest> subscriptions =
- packageManagementCacheServiceProvider.getSubscriptions();
- final List<InlineResponse201> response = new ArrayList<>();
- subscriptions.forEach((key, value) -> {
- final Optional<InlineResponse201> optional = getSubscription(key);
- if (optional.isPresent()) {
- response.add(optional.get());
- }
- });
- return response;
- }
-
- public boolean deleteSubscription(final String subscriptionId) {
- if (packageManagementCacheServiceProvider.getSubscription(subscriptionId).isPresent()) {
- try {
- if (etsiCatalogServiceProvider.deleteSubscription(subscriptionId)) {
- return packageManagementCacheServiceProvider.deleteSubscription(subscriptionId);
- }
- } catch (final SubscriptionNotFoundException subscriptionNotFoundException) {
- logger.error(
- "Unable to find subscription in ETSI Catalog Manager using id: {} will delete it from local cache",
- subscriptionId);
- return packageManagementCacheServiceProvider.deleteSubscription(subscriptionId);
- }
- }
- return false;
- }
-
- public URI getSubscriptionUri(final String subscriptionId) {
- return vnfmAdapterUrlProvider.getSubscriptionUri(subscriptionId);
- }
-
- public Optional<PkgmSubscriptionRequest> getSubscriptionRequest(final String subscriptionId) {
- return packageManagementCacheServiceProvider.getSubscription(subscriptionId);
- }
-
- private InlineResponse201 getInlineResponse2002(final String id, final PkgmSubscriptionRequest subscription) {
- return new InlineResponse201().id(id).filter(subscription.getFilter())
- .callbackUri(subscription.getCallbackUri());
- }
-
- private org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.PkgmSubscriptionRequest buildEtsiCatalogManagerPkgmSubscriptionRequest(
- final PkgmSubscriptionRequest pkgmSubscriptionRequest) throws GeneralSecurityException {
-
- final org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.PkgmSubscriptionRequest etsiCatalogManagerSubscriptionRequest;
- try {
- etsiCatalogManagerSubscriptionRequest = conversionService.convert(pkgmSubscriptionRequest,
- org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.PkgmSubscriptionRequest.class);
- } catch (final org.springframework.core.convert.ConversionException conversionException) {
- logger.error(conversionException.getMessage());
- throw new ConversionFailedException(
- "Could not convert Sol003 PkgmSubscriptionRequest to ETSI-Catalog Manager PkgmSubscriptionRequest");
- } catch (final Exception exception) {
- logger.error(exception.getMessage());
- throw new InternalServerErrorException(
- "Could not convert Sol003 PkgmSubscriptionRequest to ETSI-Catalog Manager PkgmSubscriptionRequest");
- }
-
- if (etsiCatalogManagerSubscriptionRequest != null) {
- etsiCatalogManagerSubscriptionRequest
- .setCallbackUri(vnfmAdapterUrlProvider.getEtsiSubscriptionNotificationBaseUrl());
-
- final ImmutablePair<String, String> immutablePair = vnfmAdapterUrlProvider.getDecryptAuth();
- if (!immutablePair.equals(ImmutablePair.nullPair())) {
- etsiCatalogManagerSubscriptionRequest.setAuthentication(
- new org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.SubscriptionAuthentication()
- .addAuthTypeItem(BASIC).paramsBasic(new BasicAuth().userName(immutablePair.getLeft())
- .password(immutablePair.getRight())));
- }
- return etsiCatalogManagerSubscriptionRequest;
- }
- throw new ConversionFailedException(
- "Failed to convert Sol003 PkgmSubscriptionRequest to ETSI-Catalog Manager PkgmSubscriptionRequest");
- }
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/subscriptionmgmt/TlsNotificationServiceProvider.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/subscriptionmgmt/TlsNotificationServiceProvider.java
deleted file mode 100644
index 69ff5da3ec..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/pkgm/subscriptionmgmt/TlsNotificationServiceProvider.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2020 Ericsson. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.adapters.etsisol003adapter.pkgm.subscriptionmgmt;
-
-import static org.slf4j.LoggerFactory.getLogger;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.SubscriptionsAuthentication;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.SubscriptionsAuthentication.AuthTypeEnum;
-import org.onap.so.adapters.etsisol003adapter.pkgm.rest.exceptions.AuthenticationTypeNotSupportedException;
-import org.slf4j.Logger;
-import org.springframework.stereotype.Service;
-
-/**
- *
- * @author Waqas Ikram (waqas.ikram@est.tech)
- * @author Andrew Lamb (andrew.a.lamb@est.tech)
- */
-@Service
-public class TlsNotificationServiceProvider extends AbstractNotificationServiceProvider
- implements NotificationServiceProvider {
-
- private static final Logger logger = getLogger(TlsNotificationServiceProvider.class);
-
- @Override
- public boolean send(final Object notification, final SubscriptionsAuthentication subscriptionsAuthentication,
- final String callbackUri) {
- final String errorMessage = "An error occurred. Authentication type "
- + subscriptionsAuthentication.getAuthType().toString() + " not currently supported.";
- logger.error(errorMessage);
- throw new AuthenticationTypeNotSupportedException(errorMessage);
- }
-
-
- @Override
- public AuthTypeEnum getAuthType() {
- return AuthTypeEnum.TLS_CERT;
- }
-
-
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/EtsiSubscriptionNotificationControllerTest.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/EtsiSubscriptionNotificationControllerTest.java
deleted file mode 100644
index efe6891f1e..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/EtsiSubscriptionNotificationControllerTest.java
+++ /dev/null
@@ -1,591 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2020 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.pkgm.rest;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.onap.so.adapters.etsi.sol003.adapter.common.CommonConstants.ETSI_SUBSCRIPTION_NOTIFICATION_CONTROLLER_BASE_URL;
-import static org.onap.so.client.RestTemplateConfig.CONFIGURABLE_REST_TEMPLATE;
-import static org.springframework.test.annotation.DirtiesContext.ClassMode.BEFORE_CLASS;
-import static org.springframework.test.web.client.match.MockRestRequestMatchers.header;
-import static org.springframework.test.web.client.match.MockRestRequestMatchers.jsonPath;
-import static org.springframework.test.web.client.match.MockRestRequestMatchers.method;
-import static org.springframework.test.web.client.match.MockRestRequestMatchers.requestTo;
-import static org.springframework.test.web.client.response.MockRestResponseCreators.withStatus;
-import static org.springframework.test.web.client.response.MockRestResponseCreators.withSuccess;
-import java.net.URI;
-import java.time.LocalDateTime;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.UUID;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.onap.so.adapters.etsisol003adapter.etsicatalog.notification.model.NOTIFICATIONLINKSERIALIZER;
-import org.onap.so.adapters.etsisol003adapter.etsicatalog.notification.model.PkgChangeNotification;
-import org.onap.so.adapters.etsisol003adapter.etsicatalog.notification.model.PkgOnboardingNotification;
-import org.onap.so.adapters.etsisol003adapter.etsicatalog.notification.model.PkgmLinks;
-import org.onap.so.adapters.etsisol003adapter.pkgm.JSON;
-import org.onap.so.adapters.etsisol003adapter.pkgm.PackageManagementConstants;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.ProblemDetails;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.vnfm.notification.model.VnfPackageChangeNotification;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.vnfm.notification.model.VnfPackageOnboardingNotification;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.PkgmSubscriptionRequest;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.SubscriptionsAuthentication;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.SubscriptionsAuthenticationParamsBasic;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.SubscriptionsAuthenticationParamsOauth2ClientCredentials;
-import org.onap.so.configuration.rest.BasicHttpHeadersProvider;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.boot.test.web.client.TestRestTemplate;
-import org.springframework.boot.web.client.RestTemplateBuilder;
-import org.springframework.boot.web.server.LocalServerPort;
-import org.springframework.cache.Cache;
-import org.springframework.cache.CacheManager;
-import org.springframework.http.HttpEntity;
-import org.springframework.http.HttpMethod;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.MediaType;
-import org.springframework.http.ResponseEntity;
-import org.springframework.http.converter.json.GsonHttpMessageConverter;
-import org.springframework.test.annotation.DirtiesContext;
-import org.springframework.test.context.ActiveProfiles;
-import org.springframework.test.context.junit4.SpringRunner;
-import org.springframework.test.web.client.MockRestServiceServer;
-import org.springframework.web.client.RestTemplate;
-import com.google.gson.Gson;
-
-/**
- * @author Andrew Lamb (andrew.a.lamb@est.tech)
- *
- */
-@RunWith(SpringRunner.class)
-@SpringBootTest(classes = TestApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
-@ActiveProfiles("test")
-@DirtiesContext(classMode = BEFORE_CLASS)
-public class EtsiSubscriptionNotificationControllerTest {
-
- @LocalServerPort
- private int port;
-
- private static final URI CALLBACK_URI = URI.create("http://test_callback_uri/notification");
- private static final String TOKEN_ENDPOINT = "http://test_token_endpoint_uri/";
- private static final String TOKEN = "dXNlcm5hbWU6cGFzc3dvcmQ=......";
- private static final String JSON_TOKEN = "{\"access_token\":\"" + TOKEN + "\"}";
- private static final String LOCALHOST_URL = "http://localhost:";
- private static final String NOTIFICATION_BASE_URL =
- ETSI_SUBSCRIPTION_NOTIFICATION_CONTROLLER_BASE_URL + "/notification";
- private static final String USERNAME = "username";
- private static final String PASSWORD = "password";
- private static final String EXPECTED_BASIC_AUTHORIZATION = "Basic dXNlcm5hbWU6cGFzc3dvcmQ=";
- private static final String EXPECTED_OAUTH_AUTHORIZATION = "Bearer " + TOKEN;
- private static final String NOTIFICATION_ID = "NOTIFICATION_ID";
- private static final String SUBSCRIPTION_ID = "SUBSCRIPTION_ID";
- private static final String TIME_STAMP_STRING_EXPECTED_FROM_ETSI_CATALOG = "2020-01-01 01:01:01";
- private static final java.time.LocalDateTime TIMESTAMP = java.time.LocalDateTime.of(2020, 1, 1, 1, 1, 1, 1);
- private static final String VNFPKG_ID = UUID.randomUUID().toString();
- private static final String VNFD_ID = UUID.randomUUID().toString();
- private static final String EXPECTED_VNF_PACKAGE_HREF =
- "https://so-vnfm-adapter.onap:30406/so/vnfm-adapter/v1/vnfpkgm/v1/vnf_packages/" + VNFPKG_ID;
- private static final String EXPECTED_SUBSCRIPTION_HREF =
- "https://so-vnfm-adapter.onap:30406/so/vnfm-adapter/v1/vnfpkgm/v1/subscriptions/" + SUBSCRIPTION_ID;
-
-
- private BasicHttpHeadersProvider basicHttpHeadersProvider;
-
- @Autowired
- @Qualifier(CONFIGURABLE_REST_TEMPLATE)
- private RestTemplate restTemplate;
- private MockRestServiceServer mockRestServiceServer;
-
- private TestRestTemplate testRestTemplate;
-
- @Autowired
- private CacheManager cacheServiceProvider;
- private Cache cache;
-
- @Before
- public void setUp() {
- mockRestServiceServer = MockRestServiceServer.bindTo(restTemplate).build();
- basicHttpHeadersProvider = new BasicHttpHeadersProvider();
- cache = cacheServiceProvider.getCache(PackageManagementConstants.PACKAGE_MANAGEMENT_SUBSCRIPTION_CACHE);
- cache.clear();
-
- final Gson gson = JSON.createGson().registerTypeAdapter(LocalDateTime.class,
- new EtsiSubscriptionNotificationController.LocalDateTimeTypeAdapter()).create();
- testRestTemplate = new TestRestTemplate(
- new RestTemplateBuilder().additionalMessageConverters(new GsonHttpMessageConverter(gson)));
- }
-
-
- @After
- public void tearDown() {
- mockRestServiceServer.reset();
- cache.clear();
- }
-
- @Test
- public void testSubscriptionNotificationEndPoint_ReturnsNoContent() {
- final ResponseEntity<?> response = sendHttpGet(NOTIFICATION_BASE_URL);
- assertEquals(HttpStatus.NO_CONTENT, response.getStatusCode());
- }
-
- @Test
- public void testOnboardingNotificationSentOnToVnfmCallbackUri_SubscriptionRequestInCache_Success() {
- final PkgmSubscriptionRequest subscriptionRequest =
- buildPkgmSubscriptionRequest(SubscriptionsAuthentication.AuthTypeEnum.BASIC);
- cache.put(SUBSCRIPTION_ID, subscriptionRequest);
- final PkgOnboardingNotification notification = buildPkgOnboardingNotification();
-
- mockRestServiceServer.expect(requestTo(CALLBACK_URI)).andExpect(method(HttpMethod.POST))
- .andExpect(jsonPath("$.id").value(NOTIFICATION_ID))
- .andExpect(jsonPath("$.notificationType")
- .value(VnfPackageOnboardingNotification.NotificationTypeEnum.VNFPACKAGEONBOARDINGNOTIFICATION
- .toString()))
- .andExpect(jsonPath("$.subscriptionId").value(SUBSCRIPTION_ID))
- .andExpect(jsonPath("$.timeStamp").value(TIME_STAMP_STRING_EXPECTED_FROM_ETSI_CATALOG))
- .andExpect(jsonPath("$.vnfPkgId").value(VNFPKG_ID)).andExpect(jsonPath("$.vnfdId").value(VNFD_ID))
- .andExpect(jsonPath("$._links")
- .value(buildPkgmLinks(EXPECTED_VNF_PACKAGE_HREF, EXPECTED_SUBSCRIPTION_HREF)))
- .andExpect(header("Authorization", EXPECTED_BASIC_AUTHORIZATION)).andRespond(withSuccess());
-
- final ResponseEntity<?> response = sendHttpPost(notification);
-
- assertEquals(HttpStatus.NO_CONTENT, response.getStatusCode());
- }
-
- @Test
- public void testOnboardingNotificationNotSentOnToVnfmCallbackUri_SubscriptionRequestNotInCache_Fail() {
- final PkgOnboardingNotification notification = buildPkgOnboardingNotification();
- final ResponseEntity<?> response = sendHttpPost(notification);
-
- assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, response.getStatusCode());
- assertTrue(response.getBody() instanceof ProblemDetails);
-
- final ProblemDetails problemDetails = (ProblemDetails) response.getBody();
- final String errorMessage = "No subscription found with subscriptionId " + SUBSCRIPTION_ID
- + ". Unable to forward notification to subscriber.";
-
- assertEquals(errorMessage, problemDetails.getDetail());
- }
-
- @Test
- public void testOnboardingNotificationSentOnToVnfmCallbackUri_BadRequestResponseFromCallbackUri_Fail() {
- final PkgmSubscriptionRequest subscriptionRequest =
- buildPkgmSubscriptionRequest(SubscriptionsAuthentication.AuthTypeEnum.BASIC);
- cache.put(SUBSCRIPTION_ID, subscriptionRequest);
- final PkgOnboardingNotification notification = buildPkgOnboardingNotification();
-
- mockRestServiceServer.expect(requestTo(CALLBACK_URI)).andExpect(method(HttpMethod.POST))
- .andRespond(withStatus(HttpStatus.BAD_REQUEST));
-
- final ResponseEntity<?> response = sendHttpPost(notification);
-
- assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, response.getStatusCode());
- assertTrue(response.getBody() instanceof ProblemDetails);
-
- final ProblemDetails problemDetails = (ProblemDetails) response.getBody();
- final String errorMessage = "An error occurred. Sending of notification to VNFM failed with response: "
- + HttpStatus.BAD_REQUEST + ".\n" + "No result found for given url: " + CALLBACK_URI;
-
- assertEquals(errorMessage, problemDetails.getDetail());
- }
-
- @Test
- public void testOnboardingNotificationSentOnToVnfmCallbackUri_301MovedPermanentlyResponseFromCallbackUri_Fail() {
- final PkgmSubscriptionRequest subscriptionRequest =
- buildPkgmSubscriptionRequest(SubscriptionsAuthentication.AuthTypeEnum.BASIC);
- cache.put(SUBSCRIPTION_ID, subscriptionRequest);
- final PkgOnboardingNotification notification = buildPkgOnboardingNotification();
-
- mockRestServiceServer.expect(requestTo(CALLBACK_URI)).andExpect(method(HttpMethod.POST))
- .andRespond(withStatus(HttpStatus.MOVED_PERMANENTLY));
-
- final ResponseEntity<?> response = sendHttpPost(notification);
-
- assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, response.getStatusCode());
- assertTrue(response.getBody() instanceof ProblemDetails);
-
- final ProblemDetails problemDetails = (ProblemDetails) response.getBody();
- final String errorMessage = "An error occurred. Sending of notification to VNFM failed.";
-
- assertEquals(errorMessage, problemDetails.getDetail());
- }
-
- @Test
- public void testOnboardingNotificationSentOnToVnfmCallbackUri_NotFoundResponseFromCallbackUri_Fail() {
- final PkgmSubscriptionRequest subscriptionRequest =
- buildPkgmSubscriptionRequest(SubscriptionsAuthentication.AuthTypeEnum.BASIC);
- cache.put(SUBSCRIPTION_ID, subscriptionRequest);
- final PkgOnboardingNotification notification = buildPkgOnboardingNotification();
-
- mockRestServiceServer.expect(requestTo(CALLBACK_URI)).andExpect(method(HttpMethod.POST))
- .andRespond(withStatus(HttpStatus.NOT_FOUND));
-
- final ResponseEntity<?> response = sendHttpPost(notification);
-
- assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, response.getStatusCode());
- assertTrue(response.getBody() instanceof ProblemDetails);
-
- final ProblemDetails problemDetails = (ProblemDetails) response.getBody();
- final String errorMessage = "An error occurred. Sending of notification to VNFM failed with response: "
- + HttpStatus.NOT_FOUND + ".\n" + "No result found for given url: " + CALLBACK_URI;
-
- assertEquals(errorMessage, problemDetails.getDetail());
- }
-
- @Test
- public void testOnboardingNotificationSentOnToVnfmCallbackUri_InternalServerErrorResponseFromCallbackUri_Fail() {
- final PkgmSubscriptionRequest subscriptionRequest =
- buildPkgmSubscriptionRequest(SubscriptionsAuthentication.AuthTypeEnum.BASIC);
- cache.put(SUBSCRIPTION_ID, subscriptionRequest);
- final PkgOnboardingNotification notification = buildPkgOnboardingNotification();
-
- mockRestServiceServer.expect(requestTo(CALLBACK_URI)).andExpect(method(HttpMethod.POST))
- .andRespond(withStatus(HttpStatus.INTERNAL_SERVER_ERROR));
-
- final ResponseEntity<?> response = sendHttpPost(notification);
-
- assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, response.getStatusCode());
- assertTrue(response.getBody() instanceof ProblemDetails);
-
- final ProblemDetails problemDetails = (ProblemDetails) response.getBody();
- final String errorMessage = "An error occurred. Sending of notification to VNFM failed with response: "
- + HttpStatus.INTERNAL_SERVER_ERROR.value() + ".\n" + "Unable to invoke HTTP POST using URL: "
- + CALLBACK_URI;
-
- assertEquals(errorMessage, problemDetails.getDetail());
- }
-
- @Test
- public void testChangeNotificationSentOnToVnfmCallbackUri_SubscriptionRequestInCache_Success() {
- final PkgmSubscriptionRequest subscriptionRequest =
- buildPkgmSubscriptionRequest(SubscriptionsAuthentication.AuthTypeEnum.BASIC);
- cache.put(SUBSCRIPTION_ID, subscriptionRequest);
- final PkgChangeNotification notification = buildPkgChangeNotification();
-
- mockRestServiceServer.expect(requestTo(CALLBACK_URI)).andExpect(method(HttpMethod.POST))
- .andExpect(jsonPath("$.id").value(NOTIFICATION_ID))
- .andExpect(jsonPath("$.notificationType").value(
- VnfPackageChangeNotification.NotificationTypeEnum.VNFPACKAGECHANGENOTIFICATION.getValue()))
- .andExpect(jsonPath("$.subscriptionId").value(SUBSCRIPTION_ID))
- .andExpect(jsonPath("$.timeStamp").value(TIME_STAMP_STRING_EXPECTED_FROM_ETSI_CATALOG))
- .andExpect(jsonPath("$.vnfPkgId").value(VNFPKG_ID)).andExpect(jsonPath("$.vnfdId").value(VNFD_ID))
- .andExpect(
- jsonPath("$.changeType").value(PkgChangeNotification.ChangeTypeEnum.OP_STATE_CHANGE.toString()))
- .andExpect(jsonPath("$.operationalState")
- .value(PkgChangeNotification.OperationalStateEnum.ENABLED.toString()))
- .andExpect(jsonPath("$._links")
- .value(buildPkgmLinks(EXPECTED_VNF_PACKAGE_HREF, EXPECTED_SUBSCRIPTION_HREF)))
- .andExpect(header("Authorization", EXPECTED_BASIC_AUTHORIZATION)).andRespond(withSuccess());
-
- final ResponseEntity<?> response = sendHttpPost(notification);
-
- assertEquals(HttpStatus.NO_CONTENT, response.getStatusCode());
- }
-
- @Test
- public void testChangeNotificationNotSentOnToVnfmCallbackUri_SubscriptionRequestNotInCache_Fail() {
- final PkgChangeNotification notification = buildPkgChangeNotification();
- final ResponseEntity<?> response = sendHttpPost(notification);
-
- assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, response.getStatusCode());
- assertTrue(response.getBody() instanceof ProblemDetails);
-
- final ProblemDetails problemDetails = (ProblemDetails) response.getBody();
- final String errorMessage = "No subscription found with subscriptionId " + SUBSCRIPTION_ID
- + ". Unable to forward notification to subscriber.";
-
- assertEquals(errorMessage, problemDetails.getDetail());
- }
-
- @Test
- public void testChangeNotificationSentOnToVnfmCallbackUri_BadRequestResponseFromCallbackUri_Fail() {
- final PkgmSubscriptionRequest subscriptionRequest =
- buildPkgmSubscriptionRequest(SubscriptionsAuthentication.AuthTypeEnum.BASIC);
- cache.put(SUBSCRIPTION_ID, subscriptionRequest);
- final PkgChangeNotification notification = buildPkgChangeNotification();
-
- mockRestServiceServer.expect(requestTo(CALLBACK_URI)).andExpect(method(HttpMethod.POST))
- .andRespond(withStatus(HttpStatus.BAD_REQUEST));
-
- final ResponseEntity<?> response = sendHttpPost(notification);
-
- assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, response.getStatusCode());
- assertTrue(response.getBody() instanceof ProblemDetails);
-
- final ProblemDetails problemDetails = (ProblemDetails) response.getBody();
- final String errorMessage = "An error occurred. Sending of notification to VNFM failed with response: "
- + HttpStatus.BAD_REQUEST + ".\n" + "No result found for given url: " + CALLBACK_URI;
-
- assertEquals(errorMessage, problemDetails.getDetail());
- }
-
- @Test
- public void testChangeNotificationSentOnToVnfmCallbackUri_NotFoundResponseFromCallbackUri_Fail() {
- final PkgmSubscriptionRequest subscriptionRequest =
- buildPkgmSubscriptionRequest(SubscriptionsAuthentication.AuthTypeEnum.BASIC);
- cache.put(SUBSCRIPTION_ID, subscriptionRequest);
- final PkgChangeNotification notification = buildPkgChangeNotification();
-
- mockRestServiceServer.expect(requestTo(CALLBACK_URI)).andExpect(method(HttpMethod.POST))
- .andRespond(withStatus(HttpStatus.NOT_FOUND));
-
- final ResponseEntity<?> response = sendHttpPost(notification);
-
- assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, response.getStatusCode());
- assertTrue(response.getBody() instanceof ProblemDetails);
-
- final ProblemDetails problemDetails = (ProblemDetails) response.getBody();
- final String errorMessage = "An error occurred. Sending of notification to VNFM failed with response: "
- + HttpStatus.NOT_FOUND + ".\n" + "No result found for given url: " + CALLBACK_URI;
-
- assertEquals(errorMessage, problemDetails.getDetail());
- }
-
- @Test
- public void testChangeNotificationSentOnToVnfmCallbackUri_InternalServerErrorResponseFromCallbackUri_Fail() {
- final PkgmSubscriptionRequest subscriptionRequest =
- buildPkgmSubscriptionRequest(SubscriptionsAuthentication.AuthTypeEnum.BASIC);
- cache.put(SUBSCRIPTION_ID, subscriptionRequest);
- final PkgChangeNotification notification = buildPkgChangeNotification();
-
- mockRestServiceServer.expect(requestTo(CALLBACK_URI)).andExpect(method(HttpMethod.POST))
- .andRespond(withStatus(HttpStatus.INTERNAL_SERVER_ERROR));
-
- final ResponseEntity<?> response = sendHttpPost(notification);
-
- assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, response.getStatusCode());
- assertTrue(response.getBody() instanceof ProblemDetails);
-
- final ProblemDetails problemDetails = (ProblemDetails) response.getBody();
- final String errorMessage = "An error occurred. Sending of notification to VNFM failed with response: "
- + HttpStatus.INTERNAL_SERVER_ERROR.value() + ".\n" + "Unable to invoke HTTP POST using URL: "
- + CALLBACK_URI;
-
- assertEquals(errorMessage, problemDetails.getDetail());
- }
-
- @Test
- public void testNotificationSentOnToVnfm_BasicAuthUserPasswordAuthorized_Success() {
- final PkgmSubscriptionRequest subscriptionRequest =
- buildPkgmSubscriptionRequest(SubscriptionsAuthentication.AuthTypeEnum.BASIC);
- cache.put(SUBSCRIPTION_ID, subscriptionRequest);
- final PkgOnboardingNotification notification = buildPkgOnboardingNotification();
-
- mockRestServiceServer.expect(requestTo(CALLBACK_URI)).andExpect(method(HttpMethod.POST))
- .andExpect(jsonPath("$.id").value(NOTIFICATION_ID))
- .andExpect(jsonPath("$.notificationType")
- .value(VnfPackageOnboardingNotification.NotificationTypeEnum.VNFPACKAGEONBOARDINGNOTIFICATION
- .toString()))
- .andExpect(jsonPath("$.subscriptionId").value(SUBSCRIPTION_ID))
- .andExpect(jsonPath("$.timeStamp").value(TIME_STAMP_STRING_EXPECTED_FROM_ETSI_CATALOG))
- .andExpect(jsonPath("$.vnfPkgId").value(VNFPKG_ID)).andExpect(jsonPath("$.vnfdId").value(VNFD_ID))
- .andExpect(jsonPath("$._links")
- .value(buildPkgmLinks(EXPECTED_VNF_PACKAGE_HREF, EXPECTED_SUBSCRIPTION_HREF)))
- .andExpect(header("Authorization", EXPECTED_BASIC_AUTHORIZATION)).andRespond(withSuccess());
-
- final ResponseEntity<?> response = sendHttpPost(notification);
-
- assertEquals(HttpStatus.NO_CONTENT, response.getStatusCode());
- }
-
- @Test
- public void testNotificationSentOnToVnfm_BasicAuthUserPasswordNotAuthorized_Fail() {
- final PkgmSubscriptionRequest subscriptionRequest =
- buildPkgmSubscriptionRequest(SubscriptionsAuthentication.AuthTypeEnum.BASIC);
- cache.put(SUBSCRIPTION_ID, subscriptionRequest);
- final PkgChangeNotification notification = buildPkgChangeNotification();
-
- mockRestServiceServer.expect(requestTo(CALLBACK_URI)).andExpect(method(HttpMethod.POST))
- .andExpect(header("Authorization", EXPECTED_BASIC_AUTHORIZATION))
- .andRespond(withStatus(HttpStatus.UNAUTHORIZED));
-
- final ResponseEntity<?> response = sendHttpPost(notification);
-
- assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, response.getStatusCode());
- assertTrue(response.getBody() instanceof ProblemDetails);
-
- final ProblemDetails problemDetails = (ProblemDetails) response.getBody();
- final String errorMessage = "An error occurred. Sending of notification to VNFM failed with response: "
- + HttpStatus.UNAUTHORIZED.value() + ".\n" + "Unable to invoke HTTP POST using URL: " + CALLBACK_URI;
-
- assertEquals(errorMessage, problemDetails.getDetail());
- }
-
- @Test
- public void testNotificationSentOnToVnfm_OAuthAuthorized_Success() {
- final PkgmSubscriptionRequest subscriptionRequest =
- buildPkgmSubscriptionRequest(SubscriptionsAuthentication.AuthTypeEnum.OAUTH2_CLIENT_CREDENTIALS);
- cache.put(SUBSCRIPTION_ID, subscriptionRequest);
- final PkgChangeNotification notification = buildPkgChangeNotification();
-
- mockRestServiceServer.expect(requestTo(TOKEN_ENDPOINT)).andExpect(method(HttpMethod.POST))
- .andExpect(header("Authorization", EXPECTED_BASIC_AUTHORIZATION))
- .andRespond(withSuccess(JSON_TOKEN, MediaType.APPLICATION_JSON));
-
- mockRestServiceServer.expect(requestTo(CALLBACK_URI)).andExpect(method(HttpMethod.POST))
- .andExpect(header("Authorization", EXPECTED_OAUTH_AUTHORIZATION))
- .andExpect(jsonPath("$.id").value(NOTIFICATION_ID))
- .andExpect(jsonPath("$.notificationType").value(
- VnfPackageChangeNotification.NotificationTypeEnum.VNFPACKAGECHANGENOTIFICATION.toString()))
- .andExpect(jsonPath("$.subscriptionId").value(SUBSCRIPTION_ID))
- .andExpect(jsonPath("$.timeStamp").value(TIME_STAMP_STRING_EXPECTED_FROM_ETSI_CATALOG))
- .andExpect(jsonPath("$.vnfPkgId").value(VNFPKG_ID)).andExpect(jsonPath("$.vnfdId").value(VNFD_ID))
- .andExpect(
- jsonPath("$.changeType").value(PkgChangeNotification.ChangeTypeEnum.OP_STATE_CHANGE.toString()))
- .andExpect(jsonPath("$.operationalState")
- .value(PkgChangeNotification.OperationalStateEnum.ENABLED.toString()))
- .andExpect(jsonPath("$._links")
- .value(buildPkgmLinks(EXPECTED_VNF_PACKAGE_HREF, EXPECTED_SUBSCRIPTION_HREF)))
- .andRespond(withSuccess());
-
- final ResponseEntity<?> response = sendHttpPost(notification);
-
- assertEquals(HttpStatus.NO_CONTENT, response.getStatusCode());
- }
-
- @Test
- public void testNotificationSentOnToVnfm_OAuthTokenNotReceived_Fail() {
- final PkgmSubscriptionRequest subscriptionRequest =
- buildPkgmSubscriptionRequest(SubscriptionsAuthentication.AuthTypeEnum.OAUTH2_CLIENT_CREDENTIALS);
- cache.put(SUBSCRIPTION_ID, subscriptionRequest);
- final PkgChangeNotification notification = buildPkgChangeNotification();
-
- mockRestServiceServer.expect(requestTo(TOKEN_ENDPOINT)).andExpect(method(HttpMethod.POST))
- .andExpect(header("Authorization", EXPECTED_BASIC_AUTHORIZATION)).andRespond(withSuccess());
-
- final ResponseEntity<?> response = sendHttpPost(notification);
-
- assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, response.getStatusCode());
- assertTrue(response.getBody() instanceof ProblemDetails);
-
- final ProblemDetails problemDetails = (ProblemDetails) response.getBody();
- final String errorMessage = "An error occurred. Unable to retrieve OAuth Token from VNFM for notification.";
-
- assertEquals(errorMessage, problemDetails.getDetail());
- }
-
- @Test
- public void testNotificationSentOnToVnfm_TLSCertNotYetSupported_Fail() {
- final PkgmSubscriptionRequest subscriptionRequest =
- buildPkgmSubscriptionRequest(SubscriptionsAuthentication.AuthTypeEnum.TLS_CERT);
- cache.put(SUBSCRIPTION_ID, subscriptionRequest);
- final PkgChangeNotification notification = buildPkgChangeNotification();
-
- final ResponseEntity<?> response = sendHttpPost(notification);
-
- assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, response.getStatusCode());
- assertTrue(response.getBody() instanceof ProblemDetails);
-
- final ProblemDetails problemDetails = (ProblemDetails) response.getBody();
- final String errorMessage = "An error occurred. Authentication type "
- + subscriptionRequest.getAuthentication().getAuthType().toString() + " not currently supported.";
-
- assertEquals(errorMessage, problemDetails.getDetail());
- }
-
- private PkgOnboardingNotification buildPkgOnboardingNotification() {
- final PkgOnboardingNotification notification = new PkgOnboardingNotification();
- notification.setId(NOTIFICATION_ID);
- notification
- .setNotificationType(PkgOnboardingNotification.NotificationTypeEnum.VNFPACKAGEONBOARDINGNOTIFICATION);
- notification.setSubscriptionId(SUBSCRIPTION_ID);
- notification.setTimeStamp(TIMESTAMP);
- notification.setVnfPkgId(VNFPKG_ID);
- notification.setVnfdId(VNFD_ID);
- notification.setLinks(buildPkgmLinks());
- return notification;
- }
-
- private PkgChangeNotification buildPkgChangeNotification() {
- final PkgChangeNotification notification = new PkgChangeNotification();
- notification.setId(NOTIFICATION_ID);
- notification.setNotificationType(PkgChangeNotification.NotificationTypeEnum.VNFPACKAGECHANGENOTIFICATION);
- notification.setSubscriptionId(SUBSCRIPTION_ID);
- notification.setTimeStamp(TIMESTAMP);
- notification.setVnfPkgId(VNFPKG_ID);
- notification.setVnfdId(VNFD_ID);
- notification.setChangeType(PkgChangeNotification.ChangeTypeEnum.OP_STATE_CHANGE);
- notification.setOperationalState(PkgChangeNotification.OperationalStateEnum.ENABLED);
- notification.setLinks(buildPkgmLinks());
- return notification;
- }
-
- private PkgmLinks buildPkgmLinks() {
- return buildPkgmLinks("vnf_package_href", "subscription_href");
- }
-
- private PkgmLinks buildPkgmLinks(final String vnfPkgHref, final String subscriptionHref) {
- return new PkgmLinks().vnfPackage(new NOTIFICATIONLINKSERIALIZER().href(vnfPkgHref))
- .subscription(new NOTIFICATIONLINKSERIALIZER().href(subscriptionHref));
- }
-
- private PkgmSubscriptionRequest buildPkgmSubscriptionRequest(
- final SubscriptionsAuthentication.AuthTypeEnum authTypeEnum) {
- final PkgmSubscriptionRequest subscriptionRequest = new PkgmSubscriptionRequest();
- subscriptionRequest.setCallbackUri(CALLBACK_URI.toString());
- subscriptionRequest.setAuthentication(buildSubscriptionsAuthentication(authTypeEnum));
- return subscriptionRequest;
- }
-
- // TODO update for auth types other than basicAuth
- private SubscriptionsAuthentication buildSubscriptionsAuthentication(
- final SubscriptionsAuthentication.AuthTypeEnum authTypeEnum) {
- final SubscriptionsAuthentication subscriptionsAuthentication = new SubscriptionsAuthentication();
- final List<SubscriptionsAuthentication.AuthTypeEnum> authTypes = new ArrayList<>();
- authTypes.add(authTypeEnum);
- subscriptionsAuthentication.setAuthType(authTypes);
- if (authTypeEnum == SubscriptionsAuthentication.AuthTypeEnum.TLS_CERT) {
- // TODO: remove basic params and code for TLS
- final SubscriptionsAuthenticationParamsBasic basicParams =
- new SubscriptionsAuthenticationParamsBasic().userName(USERNAME).password(PASSWORD);
- subscriptionsAuthentication.setParamsBasic(basicParams);
- } else if (authTypeEnum == SubscriptionsAuthentication.AuthTypeEnum.OAUTH2_CLIENT_CREDENTIALS) {
- final SubscriptionsAuthenticationParamsOauth2ClientCredentials oathParams =
- new SubscriptionsAuthenticationParamsOauth2ClientCredentials().clientId(USERNAME)
- .clientPassword(PASSWORD).tokenEndpoint(TOKEN_ENDPOINT);
- subscriptionsAuthentication.setParamsOauth2ClientCredentials(oathParams);
- } else {
- final SubscriptionsAuthenticationParamsBasic basicParams =
- new SubscriptionsAuthenticationParamsBasic().userName(USERNAME).password(PASSWORD);
- subscriptionsAuthentication.setParamsBasic(basicParams);
- }
-
- return subscriptionsAuthentication;
- }
-
- private <T> ResponseEntity<ProblemDetails> sendHttpPost(final T notification) {
- final String testURL = LOCALHOST_URL + port + NOTIFICATION_BASE_URL;
- final HttpEntity<?> request = new HttpEntity<>(notification, basicHttpHeadersProvider.getHttpHeaders());
- return testRestTemplate.withBasicAuth("test", "test").exchange(testURL, HttpMethod.POST, request,
- ProblemDetails.class);
- }
-
- private ResponseEntity<Void> sendHttpGet(final String url) {
- final String testURL = LOCALHOST_URL + port + url;
- final HttpEntity<?> request = new HttpEntity<>(basicHttpHeadersProvider.getHttpHeaders());
- return testRestTemplate.withBasicAuth("test", "test").exchange(testURL, HttpMethod.GET, request, Void.class);
- }
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/Sol003PackageManagementControllerTest.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/Sol003PackageManagementControllerTest.java
deleted file mode 100644
index 10e4ea3a58..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/Sol003PackageManagementControllerTest.java
+++ /dev/null
@@ -1,677 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.pkgm.rest;
-
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.onap.so.adapters.etsi.sol003.adapter.common.CommonConstants.PACKAGE_MANAGEMENT_BASE_URL;
-import static org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.EtsiCatalogServiceProviderConfiguration.ETSI_CATALOG_REST_TEMPLATE_BEAN;
-import static org.springframework.test.web.client.match.MockRestRequestMatchers.method;
-import static org.springframework.test.web.client.match.MockRestRequestMatchers.requestTo;
-import static org.springframework.test.web.client.response.MockRestResponseCreators.withStatus;
-import static org.springframework.test.web.client.response.MockRestResponseCreators.withSuccess;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Random;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.Checksum;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.ProblemDetails;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.UriLink;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.VNFPKGMLinkSerializer;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.VnfPackageArtifactInfo;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.VnfPackageSoftwareImageInfo;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.VnfPkgInfo;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.InlineResponse2001;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.VnfPackagesLinks;
-import org.onap.so.configuration.rest.BasicHttpHeadersProvider;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.boot.test.web.client.TestRestTemplate;
-import org.springframework.boot.web.server.LocalServerPort;
-import org.springframework.http.HttpEntity;
-import org.springframework.http.HttpMethod;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.MediaType;
-import org.springframework.http.ResponseEntity;
-import org.springframework.test.context.ActiveProfiles;
-import org.springframework.test.context.junit4.SpringRunner;
-import org.springframework.test.web.client.MockRestServiceServer;
-import org.springframework.web.client.RestTemplate;
-import com.google.gson.Gson;
-
-/**
- * @author gareth.roper@est.tech
- */
-@RunWith(SpringRunner.class)
-@SpringBootTest(classes = TestApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
-@ActiveProfiles("test")
-public class Sol003PackageManagementControllerTest {
-
- @LocalServerPort
- private int port;
-
- @Autowired
- @Qualifier(ETSI_CATALOG_REST_TEMPLATE_BEAN)
- private RestTemplate restTemplate;
-
- @Autowired
- private TestRestTemplate testRestTemplate;
-
- private static final String VNF_PACKAGE_ID = "myVnfPackageId";
- private static final String ARTIFACT_PATH = "myArtifactPath";
- private static final String MSB_BASE_URL = "http://msb-iag.onap:80/api/vnfpkgm/v1/vnf_packages";
- private static final String VNFPKGM_BASE_URL = PACKAGE_MANAGEMENT_BASE_URL + "/vnf_packages";
- private static final String localhostUrl = "http://localhost:";
- private static final String GET_VNF_PACKAGES_URL = "";
- private static final String GET_VNF_PACKAGE_BY_ID_URL = "/" + VNF_PACKAGE_ID;
- private static final String VNFD_ID = "vnfdId";
- private static final String VNF_PROVIDER = "vnfProvider";
- private static final String VNF_PRODUCT_NAME = "vnfProductName";
- private static final String VNF_SOFTWARE_VERSION = "vnfSoftwareVersion";
- private static final String VNFD_VERSION = "vnfdVersion";
- private static final String ALGORITHM = "algorithm";
- private static final String HASH = "hash";
- private static final String EXPECTED_BASE_URL =
- "https://so-vnfm-adapter.onap:30406/so/vnfm-adapter/v1/vnfpkgm/v1/vnf_packages/";
- private static final String EXPECTED_SELF_HREF = EXPECTED_BASE_URL + VNF_PACKAGE_ID;
- private static final String EXPECTED_VNFD_HREF = EXPECTED_BASE_URL + VNF_PACKAGE_ID + "/vnfd";
- private static final String EXPECTED_PACKAGE_CONTENT_HREF = EXPECTED_BASE_URL + VNF_PACKAGE_ID + "/package_content";
-
- private MockRestServiceServer mockRestServiceServer;
- private BasicHttpHeadersProvider basicHttpHeadersProvider;
- private final Gson gson = new Gson();
-
- public Sol003PackageManagementControllerTest() {}
-
- @Before
- public void setUp() {
- final MockRestServiceServer.MockRestServiceServerBuilder builder = MockRestServiceServer.bindTo(restTemplate);
- builder.ignoreExpectOrder(true);
- mockRestServiceServer = builder.build();
- basicHttpHeadersProvider = new BasicHttpHeadersProvider();
- }
-
- @After
- public void after() {
- mockRestServiceServer.reset();
- }
-
- @Test
- public void testGetPackageContent_ValidArray_Success() {
- final byte[] responseArray = buildByteArrayWithRandomData(10);
-
- mockRestServiceServer.expect(requestTo(MSB_BASE_URL + "/" + VNF_PACKAGE_ID + "/package_content"))
- .andExpect(method(HttpMethod.GET))
- .andRespond(withSuccess(responseArray, MediaType.APPLICATION_OCTET_STREAM));
-
- final String testURL = "http://localhost:" + port + PACKAGE_MANAGEMENT_BASE_URL + "/vnf_packages/"
- + VNF_PACKAGE_ID + "/package_content";
- final HttpEntity<?> request = new HttpEntity<>(basicHttpHeadersProvider.getHttpHeaders());
- final ResponseEntity<byte[]> responseEntity =
- testRestTemplate.withBasicAuth("test", "test").exchange(testURL, HttpMethod.GET, request, byte[].class);
-
- assertEquals(byte[].class, responseEntity.getBody().getClass());
- assertArrayEquals(responseEntity.getBody(), responseArray);
- assertEquals(HttpStatus.OK, responseEntity.getStatusCode());
- }
-
- @Test
- public void testOnGetPackageContent_Conflict_Fail() {
- mockRestServiceServer.expect(requestTo(MSB_BASE_URL + "/" + VNF_PACKAGE_ID + "/package_content"))
- .andExpect(method(HttpMethod.GET)).andRespond(withStatus(HttpStatus.CONFLICT));
-
- final ResponseEntity<ProblemDetails> responseEntity = sendHttpRequest(VNF_PACKAGE_ID + "/package_content");
-
- assertTrue(responseEntity.getBody() instanceof ProblemDetails);
- assertEquals(HttpStatus.CONFLICT, responseEntity.getStatusCode());
- }
-
- @Test
- public void testOnGetPackageContent_NotFound_Fail() {
- mockRestServiceServer.expect(requestTo(MSB_BASE_URL + "/" + VNF_PACKAGE_ID + "/package_content"))
- .andExpect(method(HttpMethod.GET)).andRespond(withStatus(HttpStatus.NOT_FOUND));
-
- final ResponseEntity<ProblemDetails> responseEntity = sendHttpRequest(VNF_PACKAGE_ID + "/package_content");
-
- assertTrue(responseEntity.getBody() instanceof ProblemDetails);
- assertEquals(HttpStatus.NOT_FOUND, responseEntity.getStatusCode());
- }
-
- @Test
- public void testOnGetPackageContent_UnauthorizedClient_Fail() {
- final String testURL = "http://localhost:" + port + PACKAGE_MANAGEMENT_BASE_URL + "/vnf_packages/"
- + VNF_PACKAGE_ID + "/package_content";
-
- mockRestServiceServer.expect(requestTo(MSB_BASE_URL + "/" + VNF_PACKAGE_ID + "/package_content"))
- .andExpect(method(HttpMethod.GET)).andRespond(withStatus(HttpStatus.UNAUTHORIZED));
-
- final HttpEntity<?> request = new HttpEntity<>(basicHttpHeadersProvider.getHttpHeaders());
-
-
- final ResponseEntity<ProblemDetails> responseEntity =
- testRestTemplate.exchange(testURL, HttpMethod.GET, request, ProblemDetails.class);
-
- assertTrue(responseEntity.getBody() instanceof ProblemDetails);
- assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, responseEntity.getStatusCode());
- }
-
- @Test
- public void testOnGetPackageContent_InternalServerError_Fail() {
- mockRestServiceServer.expect(requestTo(MSB_BASE_URL + "/" + VNF_PACKAGE_ID + "/package_content"))
- .andExpect(method(HttpMethod.GET)).andRespond(withStatus(HttpStatus.INTERNAL_SERVER_ERROR));
-
- final ResponseEntity<ProblemDetails> responseEntity = sendHttpRequest(VNF_PACKAGE_ID + "/package_content");
-
- assertTrue(responseEntity.getBody() instanceof ProblemDetails);
- assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, responseEntity.getStatusCode());
- }
-
- @Test
- public void testOnGetPackageContent_BadRequest_Fail() {
- mockRestServiceServer.expect(requestTo(MSB_BASE_URL + "/" + VNF_PACKAGE_ID + "/package_content"))
- .andExpect(method(HttpMethod.GET)).andRespond(withStatus(HttpStatus.BAD_REQUEST));
-
- final ResponseEntity<ProblemDetails> responseEntity = sendHttpRequest(VNF_PACKAGE_ID + "/package_content");
-
- assertTrue(responseEntity.getBody() instanceof ProblemDetails);
- assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, responseEntity.getStatusCode());
- }
-
- @Test
- public void testOnGetPackageContent_UnauthorizedServer_InternalError_Fail() {
- mockRestServiceServer.expect(requestTo(MSB_BASE_URL + "/" + VNF_PACKAGE_ID + "/package_content"))
- .andExpect(method(HttpMethod.GET)).andRespond(withStatus(HttpStatus.UNAUTHORIZED));
-
- final ResponseEntity<ProblemDetails> responseEntity = sendHttpRequest(VNF_PACKAGE_ID + "/package_content");
-
- assertTrue(responseEntity.getBody() instanceof ProblemDetails);
- assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, responseEntity.getStatusCode());
- }
-
- @Test
- public void testGetPackageContent_SuccessResponseFromServerWithNullPackage_Fail() {
- mockRestServiceServer.expect(requestTo(MSB_BASE_URL + "/" + VNF_PACKAGE_ID + "/package_content"))
- .andExpect(method(HttpMethod.GET)).andRespond(withSuccess());
-
- final ResponseEntity<ProblemDetails> responseEntity = sendHttpRequest(VNF_PACKAGE_ID + "/package_content");
-
- assertEquals(ProblemDetails.class, responseEntity.getBody().getClass());
- assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, responseEntity.getStatusCode());
- }
-
- @Test
- public void testGetPackageArtifact_ValidArray_Success() {
- final byte[] responseArray = buildByteArrayWithRandomData(10);
-
- mockRestServiceServer.expect(requestTo(MSB_BASE_URL + "/" + VNF_PACKAGE_ID + "/artifacts/" + ARTIFACT_PATH))
- .andExpect(method(HttpMethod.GET))
- .andRespond(withSuccess(responseArray, MediaType.APPLICATION_OCTET_STREAM));
-
- final String testURL = "http://localhost:" + port + PACKAGE_MANAGEMENT_BASE_URL + "/vnf_packages/"
- + VNF_PACKAGE_ID + "/artifacts/" + ARTIFACT_PATH;
- final HttpEntity<?> request = new HttpEntity<>(basicHttpHeadersProvider.getHttpHeaders());
- final ResponseEntity<byte[]> responseEntity =
- testRestTemplate.withBasicAuth("test", "test").exchange(testURL, HttpMethod.GET, request, byte[].class);
-
- assertEquals(byte[].class, responseEntity.getBody().getClass());
- assertArrayEquals(responseEntity.getBody(), responseArray);
- assertEquals(HttpStatus.OK, responseEntity.getStatusCode());
- }
-
- @Test
- public void testOnGetPackageArtifact_Conflict_Fail() {
- mockRestServiceServer.expect(requestTo(MSB_BASE_URL + "/" + VNF_PACKAGE_ID + "/artifacts/" + ARTIFACT_PATH))
- .andExpect(method(HttpMethod.GET)).andRespond(withStatus(HttpStatus.CONFLICT));
-
- final ResponseEntity<ProblemDetails> responseEntity =
- sendHttpRequest(VNF_PACKAGE_ID + "/artifacts/" + ARTIFACT_PATH);
-
- assertNotNull(responseEntity.getBody());
- assertEquals(HttpStatus.CONFLICT, responseEntity.getStatusCode());
- }
-
- @Test
- public void testOnGetPackageArtifact_NotFound_Fail() {
- mockRestServiceServer.expect(requestTo(MSB_BASE_URL + "/" + VNF_PACKAGE_ID + "/artifacts/" + ARTIFACT_PATH))
- .andExpect(method(HttpMethod.GET)).andRespond(withStatus(HttpStatus.NOT_FOUND));
-
- final ResponseEntity<ProblemDetails> responseEntity =
- sendHttpRequest(VNF_PACKAGE_ID + "/artifacts/" + ARTIFACT_PATH);
-
- assertNotNull(responseEntity.getBody());
- assertEquals(HttpStatus.NOT_FOUND, responseEntity.getStatusCode());
- }
-
- @Test
- public void testOnGetPackageArtifact_UnauthorizedClient_Fail() {
- final String testURL = "http://localhost:" + port + PACKAGE_MANAGEMENT_BASE_URL + "/vnf_packages/"
- + VNF_PACKAGE_ID + "/artifacts/" + ARTIFACT_PATH;
-
- mockRestServiceServer.expect(requestTo(MSB_BASE_URL + "/" + VNF_PACKAGE_ID + "/artifacts/" + ARTIFACT_PATH))
- .andExpect(method(HttpMethod.GET)).andRespond(withStatus(HttpStatus.UNAUTHORIZED));
-
- final HttpEntity<?> request = new HttpEntity<>(basicHttpHeadersProvider.getHttpHeaders());
- final ResponseEntity<ProblemDetails> responseEntity =
- testRestTemplate.exchange(testURL, HttpMethod.GET, request, ProblemDetails.class);
-
- assertNotNull(responseEntity.getBody());
- assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, responseEntity.getStatusCode());
- }
-
- @Test
- public void testOnGetPackageArtifact_InternalServerError_Fail() {
- mockRestServiceServer.expect(requestTo(MSB_BASE_URL + "/" + VNF_PACKAGE_ID + "/artifacts/" + ARTIFACT_PATH))
- .andExpect(method(HttpMethod.GET)).andRespond(withStatus(HttpStatus.INTERNAL_SERVER_ERROR));
-
- final ResponseEntity<ProblemDetails> responseEntity =
- sendHttpRequest(VNF_PACKAGE_ID + "/artifacts/" + ARTIFACT_PATH);
-
- assertNotNull(responseEntity.getBody());
- assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, responseEntity.getStatusCode());
- }
-
- @Test
- public void testOnGetPackageArtifact_BadRequest_Fail() {
- mockRestServiceServer.expect(requestTo(MSB_BASE_URL + "/" + VNF_PACKAGE_ID + "/artifacts/" + ARTIFACT_PATH))
- .andExpect(method(HttpMethod.GET)).andRespond(withStatus(HttpStatus.BAD_REQUEST));
-
- final ResponseEntity<ProblemDetails> responseEntity =
- sendHttpRequest(VNF_PACKAGE_ID + "/artifacts/" + ARTIFACT_PATH);
-
- assertNotNull(responseEntity.getBody());
- assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, responseEntity.getStatusCode());
- }
-
- @Test
- public void testOnGetPackageArtifact_UnauthorizedServer_InternalError_Fail() {
- mockRestServiceServer.expect(requestTo(MSB_BASE_URL + "/" + VNF_PACKAGE_ID + "/artifacts/" + ARTIFACT_PATH))
- .andExpect(method(HttpMethod.GET)).andRespond(withStatus(HttpStatus.UNAUTHORIZED));
-
- final ResponseEntity<ProblemDetails> responseEntity =
- sendHttpRequest(VNF_PACKAGE_ID + "/artifacts/" + ARTIFACT_PATH);
-
- assertNotNull(responseEntity.getBody());
- assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, responseEntity.getStatusCode());
- }
-
- @Test
- public void testGetPackageArtifact_SuccessResponseFromServerWithNullPackage_Fail() {
- mockRestServiceServer.expect(requestTo(MSB_BASE_URL + "/" + VNF_PACKAGE_ID + "/artifacts/" + ARTIFACT_PATH))
- .andExpect(method(HttpMethod.GET)).andRespond(withSuccess());
-
- final ResponseEntity<ProblemDetails> responseEntity =
- sendHttpRequest(VNF_PACKAGE_ID + "/artifacts/" + ARTIFACT_PATH);
-
- assertNotNull(responseEntity.getBody());
- assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, responseEntity.getStatusCode());
- }
-
- @Test
- public void testVnfPackagesReceivedAsInlineResponse2001ListIfGetVnfPackagesSuccessful() {
- final VnfPkgInfo[] responses = createVnfPkgArray();
-
- mockRestServiceServer.expect(requestTo(MSB_BASE_URL)).andExpect(method(HttpMethod.GET))
- .andRespond(withSuccess(gson.toJson(responses), MediaType.APPLICATION_JSON));
-
- final String testURL = localhostUrl + port + VNFPKGM_BASE_URL;
- final HttpEntity<?> request = new HttpEntity<>(basicHttpHeadersProvider.getHttpHeaders());
-
- final ResponseEntity<InlineResponse2001[]> responseEntity = testRestTemplate.withBasicAuth("test", "test")
- .exchange(testURL, HttpMethod.GET, request, InlineResponse2001[].class);
-
- assertEquals(HttpStatus.OK, responseEntity.getStatusCode());
- assertNotNull(responseEntity.getBody());
- final InlineResponse2001[] inlineResponse2001array = responseEntity.getBody();
- final InlineResponse2001 inlineResponse2001 = inlineResponse2001array[0];
- assertEquals(VNF_PACKAGE_ID, inlineResponse2001.getId());
- assertEquals(VNFD_ID, inlineResponse2001.getVnfdId());
- assertEquals(VNFD_ID, inlineResponse2001.getSoftwareImages().get(0).getId());
- assertEquals(VNF_PRODUCT_NAME, inlineResponse2001.getSoftwareImages().get(0).getName());
- assertEquals(ALGORITHM, inlineResponse2001.getChecksum().getAlgorithm());
- assertEquals(HASH, inlineResponse2001.getChecksum().getHash());
- assertEquals(ARTIFACT_PATH, inlineResponse2001.getAdditionalArtifacts().get(0).getArtifactPath());
- assertEquals(ALGORITHM, inlineResponse2001.getAdditionalArtifacts().get(0).getChecksum().getAlgorithm());
- assertEquals(HASH, inlineResponse2001.getAdditionalArtifacts().get(0).getChecksum().getHash());
- final VnfPackagesLinks links = inlineResponse2001.getLinks();
- assertNotNull(links);
- assertEquals(EXPECTED_SELF_HREF, links.getSelf().getHref());
- assertEquals(EXPECTED_VNFD_HREF, links.getVnfd().getHref());
- assertEquals(EXPECTED_PACKAGE_CONTENT_HREF, links.getPackageContent().getHref());
- }
-
- @Test
- public void test400BadRequestInfoReceivedAsProblemDetailsIfGetVnfPackagesIs400BadRequest() {
- mockRestServiceServer.expect(requestTo(MSB_BASE_URL)).andExpect(method(HttpMethod.GET))
- .andRespond(withStatus(HttpStatus.BAD_REQUEST));
-
- final ResponseEntity<ProblemDetails> responseEntity = sendHttpRequest(GET_VNF_PACKAGES_URL);
- assertEquals(HttpStatus.BAD_REQUEST, responseEntity.getStatusCode());
-
- assertNotNull(responseEntity.getBody());
- final ProblemDetails problemDetails = responseEntity.getBody();
- assertEquals("Error: Bad Request Received", problemDetails.getDetail());
- }
-
- @Test
- public void test404NotFoundInfoReceivedAsProblemDetailsIfGetVnfPackagesIs404NotFound() {
- mockRestServiceServer.expect(requestTo(MSB_BASE_URL)).andExpect(method(HttpMethod.GET))
- .andRespond(withStatus(HttpStatus.NOT_FOUND));
-
- final ResponseEntity<ProblemDetails> responseEntity = sendHttpRequest(GET_VNF_PACKAGES_URL);
- assertEquals(HttpStatus.NOT_FOUND, responseEntity.getStatusCode());
-
- assertNotNull(responseEntity.getBody());
- final ProblemDetails problemDetails = responseEntity.getBody();
- assertEquals("No Vnf Packages found", problemDetails.getDetail());
- }
-
- @Test
- public void test500InternalServerErrorProblemDetailsReceivedIfGetVnfPackagesReturns500InternalServerError() {
- mockRestServiceServer.expect(requestTo(MSB_BASE_URL)).andExpect(method(HttpMethod.GET))
- .andRespond(withStatus(HttpStatus.INTERNAL_SERVER_ERROR));
-
- final ResponseEntity<ProblemDetails> responseEntity = sendHttpRequest(GET_VNF_PACKAGES_URL);
- assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, responseEntity.getStatusCode());
-
- assertNotNull(responseEntity.getBody());
- final ProblemDetails problemDetails = responseEntity.getBody();
- assertEquals("Internal Server Error Occurred.", problemDetails.getDetail());
- }
-
- @Test
- public void test500InternalServerErrorProblemDetailsReceivedIfGetVnfPackagesReturnsANullPackage() {
- mockRestServiceServer.expect(requestTo(MSB_BASE_URL)).andExpect(method(HttpMethod.GET))
- .andRespond(withSuccess());
-
- final ResponseEntity<ProblemDetails> responseEntity = sendHttpRequest(GET_VNF_PACKAGES_URL);
- assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, responseEntity.getStatusCode());
-
- assertNotNull(responseEntity.getBody());
- final ProblemDetails problemDetails = responseEntity.getBody();
- assertEquals("An error occurred, a null response was received by the\n"
- + " Sol003PackageManagementController from the EtsiCatalogManager using the GET \"vnf_packages\" \n"
- + "endpoint.", problemDetails.getDetail());
- }
-
- @Test
- public void testVnfPackageReceivedAsInlineResponse2001IfGetVnfPackageByIdSuccessful() {
- final VnfPkgInfo response = createVnfPkgInfo(VNF_PACKAGE_ID);
-
- mockRestServiceServer.expect(requestTo(MSB_BASE_URL + "/" + VNF_PACKAGE_ID)).andExpect(method(HttpMethod.GET))
- .andRespond(withSuccess(gson.toJson(response), MediaType.APPLICATION_JSON));
-
- final String testURL = localhostUrl + port + VNFPKGM_BASE_URL + "/" + VNF_PACKAGE_ID;
- final HttpEntity<?> request = new HttpEntity<>(basicHttpHeadersProvider.getHttpHeaders());
- final ResponseEntity<InlineResponse2001> responseEntity = testRestTemplate.withBasicAuth("test", "test")
- .exchange(testURL, HttpMethod.GET, request, InlineResponse2001.class);
-
- assertEquals(HttpStatus.OK, responseEntity.getStatusCode());
- assertNotNull(responseEntity.getBody());
- final InlineResponse2001 inlineResponse2001 = responseEntity.getBody();
- assertEquals(VNF_PACKAGE_ID, inlineResponse2001.getId());
- assertEquals(VNFD_ID, inlineResponse2001.getVnfdId());
- assertEquals(VNFD_ID, inlineResponse2001.getSoftwareImages().get(0).getId());
- assertEquals(VNF_PRODUCT_NAME, inlineResponse2001.getSoftwareImages().get(0).getName());
- assertEquals(ALGORITHM, inlineResponse2001.getChecksum().getAlgorithm());
- assertEquals(HASH, inlineResponse2001.getChecksum().getHash());
- assertEquals(ARTIFACT_PATH, inlineResponse2001.getAdditionalArtifacts().get(0).getArtifactPath());
- assertEquals(ALGORITHM, inlineResponse2001.getAdditionalArtifacts().get(0).getChecksum().getAlgorithm());
- assertEquals(HASH, inlineResponse2001.getAdditionalArtifacts().get(0).getChecksum().getHash());
- final VnfPackagesLinks links = inlineResponse2001.getLinks();
- assertNotNull(links);
- assertEquals(EXPECTED_SELF_HREF, links.getSelf().getHref());
- assertEquals(EXPECTED_VNFD_HREF, links.getVnfd().getHref());
- assertEquals(EXPECTED_PACKAGE_CONTENT_HREF, links.getPackageContent().getHref());
-
- }
-
- @Test
- public void test400BadRequestInfoReceivedAsProblemDetailsIfGetVnfPackageByIdIs400BadRequest() {
- mockRestServiceServer.expect(requestTo(MSB_BASE_URL + "/" + VNF_PACKAGE_ID)).andExpect(method(HttpMethod.GET))
- .andRespond(withStatus(HttpStatus.BAD_REQUEST));
-
- final ResponseEntity<ProblemDetails> responseEntity = sendHttpRequest(GET_VNF_PACKAGE_BY_ID_URL);
-
- assertEquals(HttpStatus.BAD_REQUEST, responseEntity.getStatusCode());
- assertNotNull(responseEntity.getBody());
- final ProblemDetails problemDetails = responseEntity.getBody();
- assertEquals("Error: Bad Request Received", problemDetails.getDetail());
- }
-
- @Test
- public void test404NotFoundInfoReceivedAsProblemDetailsIfGetVnfPackageByIdIs404NotFound() {
- mockRestServiceServer.expect(requestTo(MSB_BASE_URL + "/" + VNF_PACKAGE_ID)).andExpect(method(HttpMethod.GET))
- .andRespond(withStatus(HttpStatus.NOT_FOUND));
-
- final ResponseEntity<ProblemDetails> responseEntity = sendHttpRequest(GET_VNF_PACKAGE_BY_ID_URL);
-
- assertEquals(HttpStatus.NOT_FOUND, responseEntity.getStatusCode());
- assertNotNull(responseEntity.getBody());
- final ProblemDetails problemDetails = responseEntity.getBody();
- assertEquals("No Vnf Package found with vnfPkgId: " + VNF_PACKAGE_ID, problemDetails.getDetail());
- }
-
- @Test
- public void test500InternalServerErrorProblemDetailsReceivedIfGetVnfPackageByIdReturns500InternalServerError() {
- mockRestServiceServer.expect(requestTo(MSB_BASE_URL + "/" + VNF_PACKAGE_ID)).andExpect(method(HttpMethod.GET))
- .andRespond(withStatus(HttpStatus.INTERNAL_SERVER_ERROR));
-
- final ResponseEntity<ProblemDetails> responseEntity = sendHttpRequest(GET_VNF_PACKAGE_BY_ID_URL);
-
- assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, responseEntity.getStatusCode());
- assertNotNull(responseEntity.getBody());
- final ProblemDetails problemDetails = responseEntity.getBody();
- assertEquals("Internal Server Error Occurred.", problemDetails.getDetail());
- }
-
- @Test
- public void test500InternalServerErrorProblemDetailsReceivedIfGetVnfPackageByIdReturnsANullPackage() {
- mockRestServiceServer.expect(requestTo(MSB_BASE_URL + "/" + VNF_PACKAGE_ID)).andExpect(method(HttpMethod.GET))
- .andRespond(withSuccess());
-
- final ResponseEntity<ProblemDetails> responseEntity = sendHttpRequest(GET_VNF_PACKAGE_BY_ID_URL);
- assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, responseEntity.getStatusCode());
-
- assertNotNull(responseEntity.getBody());
- final ProblemDetails problemDetails = responseEntity.getBody();
- assertEquals("An error occurred, a null response was received by the\n"
- + " Sol003PackageManagementController from the EtsiCatalogManager using the GET \"vnf_packages\" by vnfPkgId: \""
- + VNF_PACKAGE_ID + "\" \n" + "endpoint.", problemDetails.getDetail());
- }
-
- // The below test method is here to improve code coverage and provide a foundation for writing
- // future tests
- @Test
- public void testGetPackageVnfd_ValidArray_Success() {
- final byte[] responseArray = buildByteArrayWithRandomData(10);
-
- mockRestServiceServer.expect(requestTo(MSB_BASE_URL + "/" + VNF_PACKAGE_ID + "/vnfd"))
- .andExpect(method(HttpMethod.GET))
- .andRespond(withSuccess(responseArray, MediaType.APPLICATION_OCTET_STREAM));
-
- final String testURL =
- "http://localhost:" + port + PACKAGE_MANAGEMENT_BASE_URL + "/vnf_packages/" + VNF_PACKAGE_ID + "/vnfd";
- final HttpEntity<?> request = new HttpEntity<>(basicHttpHeadersProvider.getHttpHeaders());
- final ResponseEntity<byte[]> responseEntity =
- testRestTemplate.withBasicAuth("test", "test").exchange(testURL, HttpMethod.GET, request, byte[].class);
-
- assertEquals(byte[].class, responseEntity.getBody().getClass());
- assertArrayEquals(responseEntity.getBody(), responseArray);
- assertEquals(HttpStatus.OK, responseEntity.getStatusCode());
- }
-
- @Test
- public void testOnGetPackageVnfd_Conflict_Fail() {
- mockRestServiceServer.expect(requestTo(MSB_BASE_URL + "/" + VNF_PACKAGE_ID + "/vnfd"))
- .andExpect(method(HttpMethod.GET)).andRespond(withStatus(HttpStatus.CONFLICT));
-
- final ResponseEntity<ProblemDetails> responseEntity = sendHttpRequest(VNF_PACKAGE_ID + "/vnfd");
-
- assertTrue(responseEntity.getBody() instanceof ProblemDetails);
- assertEquals(HttpStatus.CONFLICT, responseEntity.getStatusCode());
- }
-
- @Test
- public void testOnGetPackageVnfd_NotFound_Fail() {
- mockRestServiceServer.expect(requestTo(MSB_BASE_URL + "/" + VNF_PACKAGE_ID + "/vnfd"))
- .andExpect(method(HttpMethod.GET)).andRespond(withStatus(HttpStatus.NOT_FOUND));
-
- final ResponseEntity<ProblemDetails> responseEntity = sendHttpRequest(VNF_PACKAGE_ID + "/vnfd");
-
- assertTrue(responseEntity.getBody() instanceof ProblemDetails);
- assertEquals(HttpStatus.NOT_FOUND, responseEntity.getStatusCode());
- }
-
- @Test
- public void testOnGetPackageVnfd_UnauthorizedClient_Fail() {
- mockRestServiceServer.expect(requestTo(MSB_BASE_URL + "/" + VNF_PACKAGE_ID + "/vnfd"))
- .andExpect(method(HttpMethod.GET)).andRespond(withStatus(HttpStatus.UNAUTHORIZED));
-
- final ResponseEntity<ProblemDetails> responseEntity = sendHttpRequest(VNF_PACKAGE_ID + "/vnfd");
-
- assertTrue(responseEntity.getBody() instanceof ProblemDetails);
- assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, responseEntity.getStatusCode());
- }
-
- @Test
- public void testOnGetPackageVnfd_InternalServerError_Fail() {
- mockRestServiceServer.expect(requestTo(MSB_BASE_URL + "/" + VNF_PACKAGE_ID + "/vnfd"))
- .andExpect(method(HttpMethod.GET)).andRespond(withStatus(HttpStatus.INTERNAL_SERVER_ERROR));
-
- final ResponseEntity<ProblemDetails> responseEntity = sendHttpRequest(VNF_PACKAGE_ID + "/vnfd");
-
- assertTrue(responseEntity.getBody() instanceof ProblemDetails);
- assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, responseEntity.getStatusCode());
- }
-
- @Test
- public void testOnGetPackageVnfd_BadRequest_Fail() {
- mockRestServiceServer.expect(requestTo(MSB_BASE_URL + "/" + VNF_PACKAGE_ID + "/vnfd"))
- .andExpect(method(HttpMethod.GET)).andRespond(withStatus(HttpStatus.BAD_REQUEST));
-
- final ResponseEntity<ProblemDetails> responseEntity = sendHttpRequest(VNF_PACKAGE_ID + "/vnfd");
-
- assertTrue(responseEntity.getBody() instanceof ProblemDetails);
- assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, responseEntity.getStatusCode());
- }
-
- @Test
- public void testOnGetPackageVnfd_UnauthorizedServer_InternalError_Fail() {
- mockRestServiceServer.expect(requestTo(MSB_BASE_URL + "/" + VNF_PACKAGE_ID + "/vnfd"))
- .andExpect(method(HttpMethod.GET)).andRespond(withStatus(HttpStatus.UNAUTHORIZED));
-
- final ResponseEntity<ProblemDetails> responseEntity = sendHttpRequest(VNF_PACKAGE_ID + "/vnfd");
-
- assertTrue(responseEntity.getBody() instanceof ProblemDetails);
- assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, responseEntity.getStatusCode());
- }
-
- @Test
- public void testGetPackageVnfd_SuccessResponseFromServerWithNullPackage_Fail() {
- mockRestServiceServer.expect(requestTo(MSB_BASE_URL + "/" + VNF_PACKAGE_ID + "/vnfd"))
- .andExpect(method(HttpMethod.GET)).andRespond(withSuccess());
-
- final ResponseEntity<ProblemDetails> responseEntity = sendHttpRequest(VNF_PACKAGE_ID + "/vnfd");
-
- assertEquals(ProblemDetails.class, responseEntity.getBody().getClass());
- assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, responseEntity.getStatusCode());
- }
-
- // Simply returns a byte array filled with random data, for use in the tests.
- private byte[] buildByteArrayWithRandomData(final int sizeInKb) {
- final Random rnd = new Random();
- final byte[] b = new byte[sizeInKb * 1024]; // converting kb to byte
- rnd.nextBytes(b);
- return b;
- }
-
- private ResponseEntity<ProblemDetails> sendHttpRequest(final String url) {
- final String testURL = localhostUrl + port + VNFPKGM_BASE_URL + "/" + url;
- final HttpEntity<?> request = new HttpEntity<>(basicHttpHeadersProvider.getHttpHeaders());
- return testRestTemplate.withBasicAuth("test", "test").exchange(testURL, HttpMethod.GET, request,
- ProblemDetails.class);
- }
-
- private VnfPkgInfo[] createVnfPkgArray() {
- final VnfPkgInfo[] vnfPkgInfoArray = new VnfPkgInfo[1];
- final VnfPkgInfo vnfPkgInfo = createVnfPkgInfo(VNF_PACKAGE_ID);
- vnfPkgInfoArray[0] = vnfPkgInfo;
- return vnfPkgInfoArray;
- }
-
- private VnfPkgInfo createVnfPkgInfo(final String vnfPackageId) {
- final VnfPkgInfo vnfPkgInfo = new VnfPkgInfo();
- vnfPkgInfo.setId(vnfPackageId);
- vnfPkgInfo.setVnfdId(VNFD_ID);
- vnfPkgInfo.setVnfProvider(VNF_PROVIDER);
- vnfPkgInfo.setVnfProductName(VNF_PRODUCT_NAME);
- vnfPkgInfo.setVnfSoftwareVersion(VNF_SOFTWARE_VERSION);
- vnfPkgInfo.setVnfdVersion(VNFD_VERSION);
- vnfPkgInfo.setChecksum(createVnfPkgChecksum());
- vnfPkgInfo.setSoftwareImages(createSoftwareImages());
- vnfPkgInfo.setAdditionalArtifacts(createAdditionalArtifacts());
- vnfPkgInfo.setLinks(createVNFPKGMLinkSerializerLinks());
- return vnfPkgInfo;
- }
-
- private Checksum createVnfPkgChecksum() {
- final Checksum checksum = new Checksum();
- checksum.setAlgorithm(ALGORITHM);
- checksum.setHash(HASH);
- return checksum;
- }
-
- private List<VnfPackageSoftwareImageInfo> createSoftwareImages() {
- final List<VnfPackageSoftwareImageInfo> softwareImages = new ArrayList<>();
- final VnfPackageSoftwareImageInfo vnfPackageSoftwareImageInfo = new VnfPackageSoftwareImageInfo();
- vnfPackageSoftwareImageInfo.setId(VNFD_ID);
- vnfPackageSoftwareImageInfo.setName(VNF_PRODUCT_NAME);
- vnfPackageSoftwareImageInfo.setProvider("");
- vnfPackageSoftwareImageInfo.setVersion("");
- vnfPackageSoftwareImageInfo.setChecksum(createVnfPkgChecksum());
- vnfPackageSoftwareImageInfo
- .setContainerFormat(VnfPackageSoftwareImageInfo.ContainerFormatEnum.fromValue("AKI"));
- softwareImages.add(vnfPackageSoftwareImageInfo);
- return softwareImages;
- }
-
- private List<VnfPackageArtifactInfo> createAdditionalArtifacts() {
- final List<VnfPackageArtifactInfo> vnfPackageArtifactInfos = new ArrayList<>();
- final VnfPackageArtifactInfo vnfPackageArtifactInfo =
- new VnfPackageArtifactInfo().artifactPath(ARTIFACT_PATH).checksum(createVnfPkgChecksum());
- vnfPackageArtifactInfos.add(vnfPackageArtifactInfo);
- return vnfPackageArtifactInfos;
- }
-
- private VNFPKGMLinkSerializer createVNFPKGMLinkSerializerLinks() {
- final String baseUrl = "http://msb-iag:443/api/vnfpkgm/v1/vnf_packages";
- return new VNFPKGMLinkSerializer().self(new UriLink().href(baseUrl + "/myVnfPackageId"))
- .vnfd(new UriLink().href(baseUrl + "/myVnfPackageId/vnfd"))
- .packageContent(new UriLink().href(baseUrl + "/myVnfPackageId/package_content"));
- }
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/Sol003PackageManagementSubscriptionControllerTest.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/Sol003PackageManagementSubscriptionControllerTest.java
deleted file mode 100644
index 65be6a87f0..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/Sol003PackageManagementSubscriptionControllerTest.java
+++ /dev/null
@@ -1,403 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2020 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.pkgm.rest;
-
-import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.assertTrue;
-import static org.onap.so.adapters.etsi.sol003.adapter.common.CommonConstants.ETSI_SUBSCRIPTION_NOTIFICATION_BASE_URL;
-import static org.onap.so.adapters.etsi.sol003.adapter.common.CommonConstants.PACKAGE_MANAGEMENT_BASE_URL;
-import static org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.EtsiCatalogServiceProviderConfiguration.ETSI_CATALOG_REST_TEMPLATE_BEAN;
-import static org.springframework.test.web.client.match.MockRestRequestMatchers.method;
-import static org.springframework.test.web.client.match.MockRestRequestMatchers.requestTo;
-import static org.springframework.test.web.client.response.MockRestResponseCreators.withStatus;
-import static org.springframework.test.web.client.response.MockRestResponseCreators.withSuccess;
-import java.io.File;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.nio.file.Files;
-import java.nio.file.Paths;
-import java.security.GeneralSecurityException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Objects;
-import java.util.UUID;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.onap.so.adapters.etsisol003adapter.pkgm.PackageManagementConstants;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.BasicAuth;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.LinkSelf;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.NsdmSubscription;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.PkgmNotificationsFilter;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.PkgmSubscription;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.ProblemDetails;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.SubscriptionAuthentication;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.Version;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.VnfProducts;
-import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.VnfProductsProviders;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.InlineResponse2002;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.InlineResponse201;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.PkgmSubscriptionRequest;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.SubscriptionsAuthentication;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.SubscriptionsFilter1;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.SubscriptionsFilterVnfProductsFromProviders;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.SubscriptionsLinks;
-import org.onap.so.adapters.etsisol003adapter.pkgm.model.VnfPackagesLinksSelf;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.boot.test.web.client.TestRestTemplate;
-import org.springframework.boot.web.server.LocalServerPort;
-import org.springframework.cache.Cache;
-import org.springframework.cache.CacheManager;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.HttpMethod;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.MediaType;
-import org.springframework.http.ResponseEntity;
-import org.springframework.test.context.ActiveProfiles;
-import org.springframework.test.context.junit4.SpringRunner;
-import org.springframework.test.web.client.MockRestServiceServer;
-import org.springframework.test.web.client.match.MockRestRequestMatchers;
-import org.springframework.web.client.RestTemplate;
-import com.google.gson.Gson;
-
-/**
- * @author Ronan Kenny (ronan.kenny@est.tech)
- * @author Gareth Roper (gareth.roper@est.tech)
- */
-@RunWith(SpringRunner.class)
-@SpringBootTest(classes = TestApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
-@ActiveProfiles("test")
-public class Sol003PackageManagementSubscriptionControllerTest {
-
- private final Gson gson = new Gson();
- private final URI msbEndpoint = URI.create("http://msb-iag.onap:80/api/vnfpkgm/v1/subscriptions");
- private static final String _NOTIFICATION_CALLBACK_URI =
- "https://so-vnfm-adapter.onap:30406" + ETSI_SUBSCRIPTION_NOTIFICATION_BASE_URL;
- private static final String LOCALHOST_URL = "http://localhost:";
-
- @Autowired
- @Qualifier(ETSI_CATALOG_REST_TEMPLATE_BEAN)
- private RestTemplate restTemplate;
- private MockRestServiceServer mockRestServiceServer;
- @Autowired
- private CacheManager cacheServiceProvider;
- @Autowired
- private Sol003PackageManagementSubscriptionController sol003PackageManagementSubscriptionController;
-
- @Autowired
- private TestRestTemplate testRestTemplate;
-
- @LocalServerPort
- private int port;
-
- private static final String ID = UUID.randomUUID().toString();
-
- @Before
- public void setUp() {
- mockRestServiceServer = MockRestServiceServer.bindTo(restTemplate).build();
- final Cache cache =
- cacheServiceProvider.getCache(PackageManagementConstants.PACKAGE_MANAGEMENT_SUBSCRIPTION_CACHE);
- cache.clear();
- }
-
- @After
- public void after() {
- mockRestServiceServer.reset();
- }
-
- @Test
- public void testSuccessPostSubscription() throws GeneralSecurityException, URISyntaxException {
- final PkgmSubscriptionRequest pkgmSubscriptionRequest = postSubscriptionForTest();
- final ResponseEntity<InlineResponse201> response =
- (ResponseEntity<InlineResponse201>) sol003PackageManagementSubscriptionController
- .postSubscriptionRequest(pkgmSubscriptionRequest);
-
- final HttpHeaders headers = buildHttpHeaders(Objects.requireNonNull(response.getBody()).getCallbackUri());
-
- final SubscriptionsLinks subscriptionsLinks = new SubscriptionsLinks();
- final VnfPackagesLinksSelf vnfPackagesLinksSelf = new VnfPackagesLinksSelf();
- vnfPackagesLinksSelf.setHref("https://so-vnfm-adapter.onap:30406" + PACKAGE_MANAGEMENT_BASE_URL
- + "/subscriptions/" + response.getBody().getId());
- subscriptionsLinks.setSelf(vnfPackagesLinksSelf);
-
- assertEquals(pkgmSubscriptionRequest.getFilter(), response.getBody().getFilter());
- assertEquals(subscriptionsLinks, response.getBody().getLinks());
- assertEquals(response.getBody().getFilter(), pkgmSubscriptionRequest.getFilter());
- assert (response.getHeaders().equals(headers));
- assertThat(response.getStatusCode(), is(HttpStatus.CREATED));
- assertNotNull(response.getBody().getCallbackUri());
- }
-
- @Test
- public void testFailPostSubscriptionAlreadyExists() throws GeneralSecurityException {
- final PkgmSubscriptionRequest pkgmSubscriptionRequest = postSubscriptionForTest();
-
- final ResponseEntity<InlineResponse2002> response =
- (ResponseEntity<InlineResponse2002>) sol003PackageManagementSubscriptionController
- .postSubscriptionRequest(pkgmSubscriptionRequest);
-
- // Create duplicate entry
- final PkgmSubscriptionRequest pkgmSubscriptionRequest2 = buildPkgmSubscriptionRequest();
-
- final ResponseEntity<InlineResponse2002> response2002 =
- (ResponseEntity<InlineResponse2002>) sol003PackageManagementSubscriptionController
- .postSubscriptionRequest(pkgmSubscriptionRequest2);
-
- assertEquals(HttpStatus.SEE_OTHER, response2002.getStatusCode());
- }
-
- @Test
- public void testSuccessGetSubscriptionWithSubscriptionId() throws GeneralSecurityException, URISyntaxException {
-
- final PkgmSubscriptionRequest pkgmSubscriptionRequest = postSubscriptionForTest();
-
- mockRestServiceServer.expect(requestTo(msbEndpoint + "/" + ID)).andExpect(method(HttpMethod.GET))
- .andRespond(withSuccess(gson.toJson(new NsdmSubscription().id(ID)), MediaType.APPLICATION_JSON));
-
- final ResponseEntity<InlineResponse201> response =
- (ResponseEntity<InlineResponse201>) sol003PackageManagementSubscriptionController
- .postSubscriptionRequest(pkgmSubscriptionRequest);
- final String subscriptionId = response.getBody().getId();
-
-
-
- final ResponseEntity<InlineResponse201> responseEntity =
- (ResponseEntity<InlineResponse201>) sol003PackageManagementSubscriptionController
- .getSubscription(subscriptionId);
-
- final HttpHeaders headers = buildHttpHeaders(response.getBody().getCallbackUri());
-
- assertEquals(response.getBody().getFilter(), pkgmSubscriptionRequest.getFilter());
- assertEquals(response.getHeaders(), headers);
- assertEquals(HttpStatus.OK, responseEntity.getStatusCode());
- assertEquals(pkgmSubscriptionRequest.getFilter(), response.getBody().getFilter());
- // Ensure CallBackUri is set to new URI
- assertNotEquals(pkgmSubscriptionRequest.getCallbackUri(), response.getBody().getCallbackUri());
- }
-
- @Test
- public void testFailGetSubscriptionWithInvalidSubscriptionId() {
- final String invalidId = "invalidSubscriptionId";
- mockRestServiceServer.expect(requestTo(msbEndpoint + "/" + invalidId)).andExpect(method(HttpMethod.GET))
- .andRespond(withStatus(HttpStatus.NOT_FOUND));
- final ResponseEntity<?> response = sol003PackageManagementSubscriptionController.getSubscription(invalidId);
- assertEquals(HttpStatus.NOT_FOUND, response.getStatusCode());
- assertTrue(response.getBody() instanceof ProblemDetails);
- }
-
- @Test
- public void testSuccessGetSubscriptions() throws GeneralSecurityException {
- final PkgmSubscription pkgmSubscription = buildPkgmSubscription();
- final PkgmSubscriptionRequest pkgmSubscriptionRequest = buildPkgmSubscriptionRequest();
-
- mockRestServiceServer.expect(requestTo(msbEndpoint)).andExpect(method(HttpMethod.POST))
- .andRespond(withSuccess(gson.toJson(pkgmSubscription), MediaType.APPLICATION_JSON));
- mockRestServiceServer.expect(requestTo(msbEndpoint + "/" + ID)).andExpect(method(HttpMethod.GET))
- .andRespond(withSuccess(gson.toJson(new NsdmSubscription().id(ID)), MediaType.APPLICATION_JSON));
-
- sol003PackageManagementSubscriptionController.postSubscriptionRequest(pkgmSubscriptionRequest);
- final ResponseEntity<List<InlineResponse201>> response =
- sol003PackageManagementSubscriptionController.getSubscriptions();
-
- final List<InlineResponse201> subscriptionsList = response.getBody();
-
- assertEquals(Objects.requireNonNull(response.getBody()).get(0).getFilter(),
- pkgmSubscriptionRequest.getFilter());
- assertNotNull(subscriptionsList != null);
- assertNotEquals('0', subscriptionsList.size());
- assertEquals(HttpStatus.OK, response.getStatusCode());
- }
-
- @Test
- public void testSuccessDeleteSubscriptionWithSubscriptionId() throws GeneralSecurityException {
- final PkgmSubscriptionRequest pkgmSubscriptionRequest = buildPkgmSubscriptionRequest();
- final PkgmSubscription pkgmSubscription = buildPkgmSubscription();
- final String subscriptionId = pkgmSubscription.getId();
-
- mockRestServiceServer.expect(requestTo(msbEndpoint)).andExpect(method(HttpMethod.POST))
- .andRespond(withSuccess(gson.toJson(pkgmSubscription), MediaType.APPLICATION_JSON));
-
- mockRestServiceServer.expect(requestTo(msbEndpoint + "/" + subscriptionId)).andExpect(method(HttpMethod.DELETE))
- .andRespond(withStatus(HttpStatus.NO_CONTENT));
- mockRestServiceServer.expect(requestTo(msbEndpoint + "/" + subscriptionId)).andExpect(method(HttpMethod.GET))
- .andRespond(withSuccess(gson.toJson(new NsdmSubscription().id(subscriptionId)),
- MediaType.APPLICATION_JSON));
-
- final ResponseEntity<InlineResponse2002> responsePost =
- (ResponseEntity<InlineResponse2002>) sol003PackageManagementSubscriptionController
- .postSubscriptionRequest(pkgmSubscriptionRequest);
-
- final ResponseEntity responseDelete =
- sol003PackageManagementSubscriptionController.deleteSubscription(subscriptionId);
-
- // Attempt to retrieve the subscription after delete
- final ResponseEntity<InlineResponse2002> responseGetSubscription =
- (ResponseEntity<InlineResponse2002>) sol003PackageManagementSubscriptionController
- .getSubscription(subscriptionId);
-
- assertEquals(HttpStatus.NOT_FOUND, responseGetSubscription.getStatusCode());
- assertEquals(HttpStatus.NO_CONTENT, responseDelete.getStatusCode());
- }
-
- @Test
- public void testDeleteSubscription_SubscripitonNotFoundInEtsiCatalogManager_SubscriptionDeletedFromLocalCache()
- throws GeneralSecurityException {
- final PkgmSubscriptionRequest pkgmSubscriptionRequest = buildPkgmSubscriptionRequest();
- final PkgmSubscription pkgmSubscription = buildPkgmSubscription();
-
- mockRestServiceServer.expect(requestTo(msbEndpoint)).andExpect(method(HttpMethod.POST))
- .andRespond(withSuccess(gson.toJson(pkgmSubscription), MediaType.APPLICATION_JSON));
-
- mockRestServiceServer.expect(requestTo(msbEndpoint + "/" + ID)).andExpect(method(HttpMethod.DELETE))
- .andRespond(withStatus(HttpStatus.NOT_FOUND));
-
- final ResponseEntity<InlineResponse2002> responsePost =
- (ResponseEntity<InlineResponse2002>) sol003PackageManagementSubscriptionController
- .postSubscriptionRequest(pkgmSubscriptionRequest);
-
- final Cache cache =
- cacheServiceProvider.getCache(PackageManagementConstants.PACKAGE_MANAGEMENT_SUBSCRIPTION_CACHE);
- assertNotNull(cache.get(ID));
-
- final ResponseEntity responseDelete = sol003PackageManagementSubscriptionController.deleteSubscription(ID);
-
- assertEquals(HttpStatus.NO_CONTENT, responseDelete.getStatusCode());
- assertNull(cache.get(ID));
-
- }
-
- @Test
- public void testFailDeleteSubscriptionWithInvalidSubscriptionId() throws URISyntaxException, InterruptedException {
- final ResponseEntity<Void> responseDelete = (ResponseEntity<Void>) sol003PackageManagementSubscriptionController
- .deleteSubscription("invalidSubscriptionId");
- assertEquals(HttpStatus.NOT_FOUND, responseDelete.getStatusCode());
- }
-
-
- @Test
- public void testSuccessPostSubscriptionWithValidNotificationTypes() throws Exception {
-
- final String file = getAbsolutePath("src/test/resources/requests/SubscriptionRequest.json");
- final String json = new String(Files.readAllBytes(Paths.get(file)));
- final PkgmSubscriptionRequest request = gson.fromJson(json, PkgmSubscriptionRequest.class);
-
- mockRestServiceServer.expect(requestTo(msbEndpoint)).andExpect(method(HttpMethod.POST))
- .andExpect(MockRestRequestMatchers.content().json(gson.toJson(getEtsiCatalogPkgmSubscriptionRequest())))
- .andRespond(withSuccess(gson.toJson(buildPkgmSubscription()), MediaType.APPLICATION_JSON));
-
-
- final ResponseEntity<InlineResponse201> responseEntity =
- testRestTemplate.postForEntity(LOCALHOST_URL + port + PACKAGE_MANAGEMENT_BASE_URL + "/subscriptions",
- request, InlineResponse201.class);
-
- assertEquals(HttpStatus.CREATED, responseEntity.getStatusCode());
- assertTrue(responseEntity.hasBody());
- final InlineResponse201 actual = responseEntity.getBody();
- assertEquals(ID, actual.getId());
-
-
- }
-
- private org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.PkgmSubscriptionRequest getEtsiCatalogPkgmSubscriptionRequest() {
- return new org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.PkgmSubscriptionRequest()
- .filter(new PkgmNotificationsFilter()
- .addNotificationTypesItem(
- PkgmNotificationsFilter.NotificationTypesEnum.VNFPACKAGEONBOARDINGNOTIFICATION)
- .addVnfdIdItem("VNFDID").addVnfPkgIdItem("VNFPKGID")
- .addOperationalStateItem(PkgmNotificationsFilter.OperationalStateEnum.ENABLED)
- .addVnfProductsFromProvidersItem(new VnfProductsProviders().vnfProvider("EST")
- .addVnfProductsItem(new VnfProducts().vnfProductName("VnfProducts")
- .addVersionsItem(new Version().vnfSoftwareVersion("vnfSoftwareVersion")
- .addVnfdVersionsItem("version1")))))
- .callbackUri(_NOTIFICATION_CALLBACK_URI).authentication(
- new SubscriptionAuthentication().addAuthTypeItem(SubscriptionAuthentication.AuthTypeEnum.BASIC)
- .paramsBasic(new BasicAuth().userName("vnfm").password("password1$")));
- }
-
- private PkgmSubscriptionRequest buildPkgmSubscriptionRequest() {
- final PkgmSubscriptionRequest pkgmSubscriptionRequest = new PkgmSubscriptionRequest();
- final SubscriptionsFilter1 sub = buildSubscriptionsFilter();
- final SubscriptionsAuthentication auth = new SubscriptionsAuthentication();
- pkgmSubscriptionRequest.setFilter(sub);
- pkgmSubscriptionRequest.setCallbackUri(msbEndpoint.toString());
- pkgmSubscriptionRequest.setAuthentication(auth);
- return pkgmSubscriptionRequest;
- }
-
- private SubscriptionsFilter1 buildSubscriptionsFilter() {
- final SubscriptionsFilter1 sub = new SubscriptionsFilter1();
- final List<String> vnfdIdList = new ArrayList<>();
- final List<String> vnfPkgIdList = new ArrayList<>();
- final List<SubscriptionsFilter1.NotificationTypesEnum> notificationTypes = new ArrayList<>();
- final SubscriptionsFilterVnfProductsFromProviders subscriptionsFilterVnfProductsFromProviders =
- new SubscriptionsFilterVnfProductsFromProviders();
- final List<SubscriptionsFilterVnfProductsFromProviders> vnfProductsFromProviders = new ArrayList<>();
-
- vnfProductsFromProviders.add(subscriptionsFilterVnfProductsFromProviders);
- sub.setVnfdId(vnfdIdList);
- sub.setNotificationTypes(notificationTypes);
- sub.setVnfPkgId(vnfPkgIdList);
- sub.setVnfProductsFromProviders(vnfProductsFromProviders);
- return sub;
- }
-
- private PkgmSubscription buildPkgmSubscription() {
- final PkgmSubscription pkgmSubscription = new PkgmSubscription();
- final PkgmNotificationsFilter pkgmNotificationsFilter = new PkgmNotificationsFilter();
- final LinkSelf linkSelf = new LinkSelf();
-
- pkgmSubscription.setId(ID);
- pkgmSubscription.setCallbackUri(msbEndpoint + "/" + pkgmSubscription.getId().toString());
- pkgmSubscription.setFilter(pkgmNotificationsFilter);
- pkgmSubscription.setLinks(linkSelf);
- return pkgmSubscription;
- }
-
- private PkgmSubscriptionRequest postSubscriptionForTest() {
- final PkgmSubscriptionRequest pkgmSubscriptionRequest = buildPkgmSubscriptionRequest();
- final PkgmSubscription pkgmSubscription = buildPkgmSubscription();
-
- mockRestServiceServer.expect(requestTo(msbEndpoint)).andExpect(method(HttpMethod.POST))
- .andRespond(withSuccess(gson.toJson(pkgmSubscription), MediaType.APPLICATION_JSON));
- return pkgmSubscriptionRequest;
- }
-
- private HttpHeaders buildHttpHeaders(final String uri) throws URISyntaxException {
- final HttpHeaders headers = new HttpHeaders();
- final URI myUri = new URI(uri);
- headers.setLocation(myUri);
- return headers;
- }
-
- private String getAbsolutePath(final String path) {
- final File file = new File(path);
- return file.getAbsolutePath();
- }
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/TestApplication.java b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/TestApplication.java
deleted file mode 100755
index 33535523d6..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/pkgm/rest/TestApplication.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.etsisol003adapter.pkgm.rest;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration;
-import org.springframework.cache.annotation.EnableCaching;
-
-@EnableCaching
-@SpringBootApplication(scanBasePackages = {"org.onap.so"})
-@EnableAutoConfiguration(exclude = {JacksonAutoConfiguration.class})
-public class TestApplication {
-
- public static void main(final String[] args) {
- new SpringApplication(TestApplication.class).run(args);
- }
-
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/test/resources/application.yaml b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/test/resources/application.yaml
deleted file mode 100644
index cdb6662191..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/test/resources/application.yaml
+++ /dev/null
@@ -1,61 +0,0 @@
-# Copyright © 2019 Nordix Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-spring:
- security:
- usercredentials:
- - username: test
- password: '$2a$12$Zi3AuYcZoZO/gBQyUtST2.F5N6HqcTtaNci2Et.ufsQhski56srIu'
- role: BPEL-Client
- - username: vnfm
- password: '$2a$10$Fh9ffgPw2vnmsghsRD3ZauBL1aKXebigbq3BB1RPWtE62UDILsjke'
- role: BPEL-Client
- main:
- allow-bean-definition-overriding: true
-
-mso:
- key: 07a7159d3bf51a0e53be7a8f89699be7
-
-aai:
- auth: 2A11B07DB6214A839394AA1EC5844695F5114FC407FF5422625FB00175A3DCB8A1FF745F22867EFA72D5369D599BBD88DA8BED4233CF5586
- endpoint: https://aai.onap:8443
- version: v15
-
-sdc:
- username: sdcUser
- password: sdcPassword
- key: adadadadad
- endpoint: http://sdc.onap/1234A
-
-
-vnfmadapter:
- endpoint: https://so-vnfm-adapter.onap:30406
-
-
-#Actuator
-management:
- endpoints:
- web:
- base-path: /manage
- exposure:
- include: "*"
- metrics:
- se-global-registry: false
- export:
- prometheus:
- enabled: true # Whether exporting of metrics to Prometheus is enabled.
- step: 1m # Step size (i.e. reporting frequency) to use.
-
-etsi-catalog-manager:
- vnfpkgm:
- endpoint: http://msb-iag.onap:80/api/vnfpkgm/v1
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/test/resources/requests/SubscriptionRequest.json b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/test/resources/requests/SubscriptionRequest.json
deleted file mode 100644
index c38466f8e5..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-adapter/src/test/resources/requests/SubscriptionRequest.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
- "filter":
- {
- "notificationTypes": [
- "VnfPackageOnboardingNotification"
- ],
- "vnfProductsFromProviders": [
- {
- "vnfProvider": "EST",
- "vnfProducts": [
- {
- "vnfProductName": "VnfProducts",
- "versions": [
- {
- "vnfSoftwareVersion": "vnfSoftwareVersion",
- "vnfdVersions": [
- "version1"
- ]
- }
- ]
- }
- ]
- }
- ],
- "vnfdId": [
- "VNFDID"
- ],
- "vnfPkgId": [
- "VNFPKGID"
- ],
- "operationalState": ["ENABLED"]
- },
- "callbackUri": "http://so-vnfm-adapter:9093/api/vnfpkgm/v1/subscriptions",
- "authentication":
- {
- "authType": [
- "BASIC"
- ],
- "paramsBasic":
- {
- "userName": "vnfm",
- "password": "vnfm"
- }
- }
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-api/pom.xml b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-api/pom.xml
deleted file mode 100644
index aaf4949144..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-api/pom.xml
+++ /dev/null
@@ -1,191 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.onap.so.adapters</groupId>
- <artifactId>etsi-sol003-pkgm</artifactId>
- <version>1.7.1-SNAPSHOT</version>
- </parent>
- <artifactId>etsi-sol003-pkgm-api</artifactId>
- <name>ETSI SOL003 VNF Package Management Adapter API</name>
- <build>
- <plugins>
- <plugin>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-codegen-maven-plugin</artifactId>
- <version>${version-swagger-codegen}</version>
- <executions>
- <execution>
- <id>etsicatalog-notification-api</id>
- <goals>
- <goal>generate</goal>
- </goals>
- <configuration>
- <inputSpec>${basedir}/src/main/resources/ETSI-Catalog-Notification-API.json</inputSpec>
- <language>java</language>
- <library>okhttp-gson</library>
- <output>${project.build.directory}/generated-sources/etsicatalog/notification</output>
- <apiPackage>org.onap.so.adapters.etsisol003adapter.etsicatalog.notification.api</apiPackage>
- <modelPackage>org.onap.so.adapters.etsisol003adapter.etsicatalog.notification.model</modelPackage>
- <generateApiTests>false</generateApiTests>
- <generateModelTests>false</generateModelTests>
- <configOptions>
- <sourceFolder>src/gen/java/main</sourceFolder>
- <withXml>true</withXml>
- <useRxJava2>true</useRxJava2>
- <serializableModel>true</serializableModel>
- <dateLibrary>java8-localdatetime</dateLibrary>
- </configOptions>
- </configuration>
- </execution>
- <execution>
- <id>sol003-vnf-packagemanagement-api</id>
- <goals>
- <goal>generate</goal>
- </goals>
- <configuration>
- <inputSpec>${basedir}/src/main/resources/SOL003-VNFPackageManagement-API.json</inputSpec>
- <language>java</language>
- <library>okhttp-gson</library>
- <output>${project.build.directory}/generated-sources/sol003-vnf-packagemanagement</output>
- <apiPackage>org.onap.so.adapters.etsisol003adapter.pkgm.api</apiPackage>
- <modelPackage>org.onap.so.adapters.etsisol003adapter.pkgm.model</modelPackage>
- <generateApiTests>false</generateApiTests>
- <generateModelTests>false</generateModelTests>
- <configOptions>
- <sourceFolder>src/gen/java/main</sourceFolder>
- <withXml>true</withXml>
- <useRxJava2>true</useRxJava2>
- <serializableModel>true</serializableModel>
- </configOptions>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>add-source</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>${project.basedir}/target/generated-sources/etsicatalog/notification/src/gen/java/main</source>
- <source>${project.basedir}/target/generated-sources/sol003-vnf-packagemanagement/src/gen/java/main</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.eclipse.m2e</groupId>
- <artifactId>lifecycle-mapping</artifactId>
- <version>1.0.0</version>
- <configuration>
- <lifecycleMappingMetadata>
- <pluginExecutions>
- <pluginExecution>
- <pluginExecutionFilter>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-codegen-maven-plugin</artifactId>
- <goals>
- <goal>generate</goal>
- </goals>
- <versionRange>[2.2.0,)</versionRange>
- </pluginExecutionFilter>
- <action>
- <execute>
- <runOnIncremental>false</runOnIncremental>
- </execute>
- </action>
- </pluginExecution>
- </pluginExecutions>
- </lifecycleMappingMetadata>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
- <dependencies>
- <dependency>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-annotations</artifactId>
- <version>${swagger-core-version}</version>
- </dependency>
- <dependency>
- <groupId>com.squareup.retrofit2</groupId>
- <artifactId>converter-gson</artifactId>
- <version>${retrofit-version}</version>
- </dependency>
- <dependency>
- <groupId>com.squareup.retrofit2</groupId>
- <artifactId>retrofit</artifactId>
- <version>${retrofit-version}</version>
- </dependency>
- <dependency>
- <groupId>com.squareup.retrofit2</groupId>
- <artifactId>converter-scalars</artifactId>
- <version>${retrofit-version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.oltu.oauth2</groupId>
- <artifactId>org.apache.oltu.oauth2.client</artifactId>
- <version>${oltu-version}</version>
- </dependency>
- <dependency>
- <groupId>io.gsonfire</groupId>
- <artifactId>gson-fire</artifactId>
- <version>${gson-fire-version}</version>
- </dependency>
- <dependency>
- <groupId>org.threeten</groupId>
- <artifactId>threetenbp</artifactId>
- <version>${threetenbp-version}</version>
- </dependency>
- <dependency>
- <groupId>io.reactivex.rxjava2</groupId>
- <artifactId>rxjava</artifactId>
- </dependency>
- <dependency>
- <groupId>com.squareup.retrofit2</groupId>
- <artifactId>adapter-rxjava2</artifactId>
- <version>${retrofit-version}</version>
- </dependency>
- <dependency>
- <groupId>com.google.code.gson</groupId>
- <artifactId>gson</artifactId>
- </dependency>
- <dependency>
- <groupId>com.squareup.okio</groupId>
- <artifactId>okio</artifactId>
- <version>${okio-version}</version>
- </dependency>
- <dependency>
- <groupId>com.squareup.okhttp3</groupId>
- <artifactId>okhttp</artifactId>
- <version>${okhttp3-version}</version>
- </dependency>
- <dependency>
- <groupId>com.squareup.okhttp3</groupId>
- <artifactId>logging-interceptor</artifactId>
- <version>${okhttp3-version}</version>
- </dependency>
- <dependency>
- <groupId>com.squareup.okhttp</groupId>
- <artifactId>logging-interceptor</artifactId>
- <version>${okhttp-version}</version>
- </dependency>
- <dependency>
- <groupId>com.squareup.okhttp</groupId>
- <artifactId>okhttp</artifactId>
- <version>${okhttp-version}</version>
- </dependency>
- </dependencies>
-</project>
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-api/src/main/resources/ETSI-Catalog-Notification-API.json b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-api/src/main/resources/ETSI-Catalog-Notification-API.json
deleted file mode 100644
index 6db54435d2..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-api/src/main/resources/ETSI-Catalog-Notification-API.json
+++ /dev/null
@@ -1,279 +0,0 @@
-{
- "swagger": "2.0",
- "info": {
- "title": "Modeling etsicatalog API",
- "description": "\n\nThe `swagger-ui` view can be found [here](/api/catalog/v1/swagger).\nThe `ReDoc` view can be found [here](/api/catalog/v1/redoc).\nThe swagger YAML document can be found [here](/api/catalog/v1/swagger.yaml).\nThe swagger JSON document can be found [here](/api/catalog/v1/swagger.json).",
- "version": "v1"
- },
- "host": "127.0.0.1:8000",
- "schemes": [
- "http"
- ],
- "basePath": "/",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "securityDefinitions": {
- "Basic": {
- "type": "basic"
- }
- },
- "security": [
- {
- "Basic": []
- }
- ],
- "paths": {
- "/URI-is-provided-by-the-client-when-creating-the-subscription-VnfPackageChangeNotification": {
- "get": {
- "operationId": "URI-is-provided-by-the-client-when-creating-the-subscription-VnfPackageChangeNotification_list",
- "description": "",
- "parameters": [],
- "responses": {
- "204": {
- "description": ""
- },
- "500": {
- "description": "error message",
- "schema": {
- "type": "string"
- }
- }
- },
- "tags": [
- "VNF Package Management interface"
- ]
- },
- "post": {
- "operationId": "URI-is-provided-by-the-client-when-creating-the-subscription-VnfPackageChangeNotification_create",
- "description": "",
- "parameters": [
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/PkgChangeNotification"
- }
- }
- ],
- "responses": {
- "204": {
- "description": ""
- }
- },
- "tags": [
- "VNF Package Management interface"
- ]
- },
- "parameters": []
- },
- "/URI-is-provided-by-the-client-when-creating-the-subscription-VnfPackageOnboardingNotification": {
- "get": {
- "operationId": "URI-is-provided-by-the-client-when-creating-the-subscription-VnfPackageOnboardingNotification_list",
- "description": "",
- "parameters": [],
- "responses": {
- "204": {
- "description": ""
- },
- "500": {
- "description": "error message",
- "schema": {
- "type": "string"
- }
- }
- },
- "tags": [
- "VNF Package Management interface"
- ]
- },
- "post": {
- "operationId": "URI-is-provided-by-the-client-when-creating-the-subscription-VnfPackageOnboardingNotification_create",
- "description": "",
- "parameters": [
- {
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/PkgOnboardingNotification"
- }
- }
- ],
- "responses": {
- "204": {
- "description": ""
- }
- },
- "tags": [
- "VNF Package Management interface"
- ]
- },
- "parameters": []
- }
- },
- "definitions": {
- "NOTIFICATION_LINKSERIALIZER": {
- "title": "Vnfpackage",
- "description": "Link to the resource representing the VNF package to which the notified change applies.",
- "required": [
- "href"
- ],
- "type": "object",
- "properties": {
- "href": {
- "title": "Href",
- "description": "URI of the referenced resource.",
- "type": "string",
- "minLength": 1
- }
- }
- },
- "PkgmLinks": {
- "title": " links",
- "description": "Links to resources related to this resource.",
- "type": "object",
- "properties": {
- "vnfPackage": {
- "$ref": "#/definitions/NOTIFICATION_LINKSERIALIZER"
- },
- "subscription": {
- "$ref": "#/definitions/NOTIFICATION_LINKSERIALIZER"
- }
- }
- },
- "PkgChangeNotification": {
- "required": [
- "id",
- "notificationType",
- "timeStamp",
- "subscriptionId",
- "vnfPkgId",
- "changeType",
- "vnfdId",
- "_links"
- ],
- "type": "object",
- "properties": {
- "id": {
- "title": "Id",
- "description": "Identifier of this notification.",
- "type": "string",
- "minLength": 1
- },
- "notificationType": {
- "title": "Notificationtype",
- "description": "Discriminator for the different notification types.",
- "type": "string",
- "enum": [
- "VnfPackageChangeNotification"
- ]
- },
- "timeStamp": {
- "title": "Timestamp",
- "description": "Date-time of the generation of the notification.",
- "type": "string",
- "format": "date-time"
- },
- "subscriptionId": {
- "title": "Subscriptionid",
- "description": "Identifier of the subscription that this notification relates to.",
- "type": "string",
- "minLength": 1
- },
- "vnfPkgId": {
- "title": "Vnfpkgid",
- "description": "Identifier of the VNF package.",
- "type": "string",
- "minLength": 1
- },
- "changeType": {
- "title": "Changetype",
- "description": "The type of change of the VNF package.",
- "type": "string",
- "enum": [
- "OP_STATE_CHANGE",
- "PKG_DELETE"
- ]
- },
- "operationalState": {
- "title": "Operationalstate",
- "description": "New operational state of the VNF package.",
- "type": "string",
- "enum": [
- "ENABLED",
- "DISABLED"
- ]
- },
- "vnfdId": {
- "title": "Vnfdid",
- "description": "This identifier, which is managed by the VNF provider, identifies the VNF package and the VNFD in a globally unique way.",
- "type": "string",
- "minLength": 1
- },
- "_links": {
- "$ref": "#/definitions/PkgmLinks"
- }
- }
- },
- "PkgOnboardingNotification": {
- "required": [
- "id",
- "notificationType",
- "subscriptionId",
- "timeStamp",
- "vnfPkgId",
- "vnfdId",
- "_links"
- ],
- "type": "object",
- "properties": {
- "id": {
- "title": "Id",
- "description": "Identifier of this notification.",
- "type": "string",
- "minLength": 1
- },
- "notificationType": {
- "title": "Notificationtype",
- "description": "Discriminator for the different notification types.",
- "type": "string",
- "enum": [
- "VnfPackageOnboardingNotification"
- ]
- },
- "subscriptionId": {
- "title": "Subscriptionid",
- "description": "Identifier of the subscription that this notification relates to.",
- "type": "string",
- "minLength": 1
- },
- "timeStamp": {
- "title": "Timestamp",
- "description": "Date-time of the generation of the notification.",
- "type": "string",
- "format": "date-time"
- },
- "vnfPkgId": {
- "title": "Vnfpkgid",
- "description": "Identifier of the VNF package.",
- "type": "string",
- "minLength": 1
- },
- "vnfdId": {
- "title": "Vnfdid",
- "description": "This identifier, which is managed by the VNF provider, identifies the VNF package and the VNFD in a globally unique way.",
- "type": "string",
- "minLength": 1
- },
- "_links": {
- "$ref": "#/definitions/PkgmLinks"
- }
- }
- }
- }
-}
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-api/src/main/resources/SOL003-VNFPackageManagement-API.json b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-api/src/main/resources/SOL003-VNFPackageManagement-API.json
deleted file mode 100644
index 17d81f44c1..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-api/src/main/resources/SOL003-VNFPackageManagement-API.json
+++ /dev/null
@@ -1,7352 +0,0 @@
-{
- "swagger": "2.0",
- "info": {
- "version": "1.2.0-impl:etsi.org:ETSI_NFV_OpenAPI:1",
- "title": "SOL003 - VNF Package Management interface",
- "description": "SOL003 - VNF Package Management interface\n\nIMPORTANT: Please note that this file might be not aligned to the current version of the ETSI Group Specification it refers to. In case of discrepancies the published ETSI Group Specification takes precedence.\n\nIn clause 4.3.2 of ETSI GS NFV-SOL 003 v2.4.1, an attribute-based filtering mechanism is defined. This mechanism is currently not included in the corresponding OpenAPI design for this GS version. Changes to the attribute-based filtering mechanism are being considered in v2.5.1 of this GS for inclusion in the corresponding future ETSI NFV OpenAPI design.\nPlease report bugs to https://forge.etsi.org/bugzilla/buglist.cgi?component=Nfv-Openapis&list_id=61&product=NFV&resolution=\n",
- "license": {
- "name": "ETSI Forge copyright notice",
- "url": "https://forge.etsi.org/etsi-forge-copyright-notice.txt"
- }
- },
- "externalDocs": {
- "description": "ETSI GS NFV-SOL 003 V2.5.1",
- "url": "https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/003/02.05.01_60/gs_nfv-sol003v020501p.pdf"
- },
- "basePath": "/vnfpkgm/v1",
- "schemes": [
- "https"
- ],
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "paths": {
- "/api-versions": {
- "parameters": [
- {
- "name": "Version",
- "description": "Version of the API requested to use when responding to this request.\n",
- "in": "header",
- "required": false,
- "type": "string"
- }
- ],
- "get": {
- "summary": "Retrieve API version information",
- "description": "The GET method reads API version information. This method shall follow the provisions specified in table 4.6.3.3.3.2-1 for request and response data structures, and response codes. URI query parameters are not supported.\n",
- "responses": {
- "200": {
- "description": "200 OK\nAPI version information was read successfully. The response body shall contain 4.4 API version information, as defined in clause 4.4.1.13.\n",
- "schema": {
- "description": "This type represents API version information. It shall comply with the provisions defined in table 4.4.1.13-1 (SOL003).\n",
- "type": "object",
- "required": [
- "uriPrefix",
- "apiVersions"
- ],
- "properties": {
- "uriPrefix": {
- "description": "Specifies the URI prefix for the API, in the following form {apiRoot}/{apiName}/{apiMajorVersion}/\n",
- "type": "string"
- },
- "apiVersions": {
- "description": "Version(s) supported for the API signaled by the uriPrefix attribute.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "version"
- ],
- "properties": {
- "version": {
- "description": "Identifies a supported version. The value of the version attribute shall be a version identifier as specified in clause 4.6.1.\n",
- "type": "string"
- },
- "isDeprecated": {
- "description": "If such information is available, this attribute indicates whether use of the version signaled by the version attribute is deprecated (true) or not (false). A deprecated version is still supported by the API producer but is recommended not to be used any longer. When a version is no longer supported, it does not appear in the response body.\n",
- "type": "boolean"
- },
- "retirementDate": {
- "description": "Date-time stamp. Representation: String formatted according to IETF RFC 3339.\n",
- "type": "string",
- "format": "date-time"
- }
- }
- }
- }
- }
- },
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "Version": {
- "description": "The used API version.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- }
- },
- "400": {
- "description": "400 BAD REQUEST\n400 code can be returned in the following specified cases, the specific cause has to be proper specified in the \"ProblemDetails\" structure to be returned.\nIf the request is malformed or syntactically incorrect (e.g. if the request URI contains incorrect query parameters or the payload body contains a syntactically incorrect data structure), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem.\nIf the response to a GET request which queries a container resource would be so big that the performance of the API producer is adversely affected, and the API producer does not support paging for the affected resource, it shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem.\nIf there is an application error related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\nIf the request contains a malformed access token, the API producer should respond with this response. The details of the error shall be returned in the WWW Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\nThe use of this HTTP error response code described above is applicable to the use of the OAuth 2.0 for the authorization of API requests and notifications, as defined in clauses 4.5.3.3 and 4.5.3.4.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "401": {
- "description": "401 UNAUTHORIZED\nIf the request contains no access token even though one is required, or if the request contains an authorization token that is invalid (e.g. expired or revoked), the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "403": {
- "description": "403 FORBIDDEN\nIf the API consumer is not allowed to perform a particular request to a particular resource, the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided. It should include in the \"detail\" attribute information about the source of the problem, and may indicate how to solve it.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "404": {
- "description": "404 NOT FOUND\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request or is not willing to disclose that one exists, it shall respond with this response code. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the source of the problem, e.g. a wrong resource URI variable.\nThis response code is not appropriate in case the resource addressed by the URI is a container resource which is designed to contain child resources, but does not contain any child resource at the time the request is received. For a GET request to an existing empty container resource, a typical response contains a 200 OK response code and a payload body with an empty array.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "405": {
- "description": "405 METHOD NOT ALLOWED\nIf a particular HTTP method is not supported for a particular resource, the API producer shall respond with this response code. The \"ProblemDetails\" structure may be omitted.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "406": {
- "description": "406 NOT ACCEPTABLE\nIf the \"Accept\" header does not contain at least one name of a content type that is acceptable to the API producer, the API producer shall respond with this response code. The \"ProblemDetails\" structure may be omitted.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "413": {
- "description": "413 PAYLOAD TOO LARGE\nIf the payload body of a request is larger than the amount of data the API producer is willing or able to process, it shall respond with this response code, following the provisions in IETF RFC 7231 for the use of the \"Retry-After\" HTTP header and for closing the connection. The \"ProblemDetails\" structure may be omitted.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "414": {
- "description": "414 URI TOO LONG\nIf the request URI of a request is longer than the API producer is willing or able to process, it shall respond with this response code. This condition can e.g. be caused by passing long queries in the request URI of a GET request. The \"ProblemDetails\" structure may be omitted.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "416": {
- "description": "416 RANGE NOT SATISFIABLE\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "422": {
- "description": "422 UNPROCESSABLE ENTITY\nIf the payload body of a request contains syntactically correct data (e.g. well-formed JSON) but the data cannot be processed (e.g. because it fails validation against a schema), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem.\nThis error response code is only applicable for methods that have a request body.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "429": {
- "description": "429 TOO MANY REQUESTS\nIf the API consumer has sent too many requests in a defined period of time and the API producer is able to detect that condition (\"rate limiting\"), the API producer shall respond with this response code, following the provisions in IETF RFC 6585 [17] for the use of the \"Retry-After\" HTTP header. The \"ProblemDetails\" structure shall be provided and shall include in the \"detail\" attribute more information about the source of the problem.\nThe period of time and allowed number of requests are configured within the API producer by means outside the scope of the present document.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "500": {
- "description": "500 INTERNAL SERVER ERROR\nIf there is an application error not related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "503": {
- "description": "503 SERVICE UNAVAILABLE\nIf the API producer encounters an internal overload situation of itself or of a system it relies on, it should respond with this response code, following the provisions in IETF RFC 7231 for the use of the \"Retry-After\" HTTP header and for the alternative to refuse the connection. The \"ProblemDetails\" structure may be omitted.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "504": {
- "description": "504 GATEWAY TIMEOUT\nIf the API producer encounters a timeout while waiting for a response from an upstream server (i.e. a server that the API producer communicates with when fulfilling a request), it should respond with this response code.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- }
- }
- }
- },
- "/vnf_packages": {
- "get": {
- "description": "Query VNF Package Info\n\nThe GET method queries the information of the VNF packages matching the filter.\n",
- "parameters": [
- {
- "name": "Accept",
- "description": "Content-Types that are acceptable for the response. Reference: IETF RFC 7231\n",
- "in": "header",
- "required": true,
- "type": "string"
- },
- {
- "name": "Authorization",
- "description": "The authorization token for the request. Reference: IETF RFC 7235\n",
- "in": "header",
- "required": false,
- "type": "string"
- },
- {
- "name": "filter",
- "description": "Attribute-based filtering expression according to clause 4.3.2. The VNFM shall support receiving this parameter as part of the URI query string. The NFVO may supply this parameter. All attribute names that appear in the VnfPkgInfo and in data types referenced from it shall be supported by the VNFM in the filter expression.\n",
- "in": "query",
- "required": false,
- "type": "string"
- },
- {
- "name": "all_fields",
- "description": "Include all complex attributes in the response. See clause 4.3.3 for details. The VNFM shall support this parameter.\n",
- "in": "query",
- "required": false,
- "type": "string"
- },
- {
- "name": "fields",
- "description": "Complex attributes to be included into the response. See clause 4.3.3 for details. The VNFM should support this parameter.\n",
- "in": "query",
- "required": false,
- "type": "string"
- },
- {
- "name": "exclude_fields",
- "description": "Complex attributes to be excluded from the response. See clause 4.3.3 for details. The VNFM should support this parameter.\n",
- "in": "query",
- "required": false,
- "type": "string"
- },
- {
- "name": "exclude_default",
- "description": "Indicates to exclude the following complex attributes from the response. See clause 4.3.3 for details. The VNFM shall support this parameter. The following attributes shall be excluded from the VnfPkgInfo structure in the response body if this parameter is provided, or none of the parameters \"all_fields,\" \"fields\", \"exclude_fields\", \"exclude_default\" are provided: -\tsoftwareImages -\tadditionalArtifacts -\tuserDefinedData.\n",
- "in": "query",
- "required": false,
- "type": "string"
- },
- {
- "name": "nextpage_opaque_marker",
- "description": "Marker to obtain the next page of a paged response. Shall be supported by the VNFM if the VNFM supports alternative 2 (paging) according to clause 4.7.2.1 for this resource.\n",
- "in": "query",
- "required": false,
- "type": "string"
- },
- {
- "name": "Version",
- "description": "Version of the API requested to use when responding to this request.\n",
- "in": "header",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "200 OK\nInformation about zero or more VNF packages was queried successfully. The response body shall contain in an array the VNF package info representations that match the attribute filter, i.e. zero or more VNF package representations as defined in clause 10.5.2.2. If the VNFM supports alternative 2 (paging) according to clause 4.7.2.1 for this resource, inclusion of the Link HTTP header in this response shall follow the provisions in clause 4.7.2.3.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "Link": {
- "description": "Reference to other resources. Used for paging in the present document, see clause 4.7.2.1.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "type": "array",
- "items": {
- "description": "This type represents the information of an VNF package.\n",
- "type": "object",
- "required": [
- "id",
- "operationalState",
- "usageState",
- "_links"
- ],
- "properties": {
- "id": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vnfdId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vnfProvider": {
- "description": "Provider of the VNF package and the VNFD. This information is copied from the VNFD.\n",
- "type": "string"
- },
- "vnfProductName": {
- "description": "Name to identify the VNF product. Invariant for the VNF product lifetime. This information is copied from the VNFD. It shall be present after the VNF package content has been on-boarded and absent otherwise.\n",
- "type": "string"
- },
- "vnfSoftwareVersion": {
- "description": "A Version.\n",
- "type": "string"
- },
- "vnfdVersion": {
- "description": "A Version.\n",
- "type": "string"
- },
- "checksum": {
- "description": "This type represents the checksum of a VNF package or an artifact file.\n",
- "type": "object",
- "required": [
- "algorithm",
- "hash"
- ],
- "properties": {
- "algorithm": {
- "description": "Name of the algorithm used to generate the checksum, as defined in ETSI GS NFV-SOL 004. For example, SHA-256, SHA-512.\n",
- "type": "string"
- },
- "hash": {
- "description": "The hexadecimal value of the checksum.\n",
- "type": "string"
- }
- }
- },
- "softwareImages": {
- "description": "Information about VNF package artifacts that are software images. This attribute shall not be present before the VNF package content is on-boarded. Otherwise, this attribute shall be present unless it has been requested to be excluded per attribute selector.\n",
- "type": "array",
- "items": {
- "description": "This type represents an artifact contained in a VNF package which represents a software image.\n",
- "type": "object",
- "required": [
- "id",
- "name",
- "provider",
- "version",
- "checksum",
- "containerFormat",
- "diskFormat",
- "createdAt",
- "minDisk",
- "minRam",
- "size",
- "imagePath"
- ],
- "properties": {
- "id": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "name": {
- "description": "Name of the software image.\n",
- "type": "string"
- },
- "provider": {
- "description": "Provider of the software image.\n",
- "type": "string"
- },
- "version": {
- "description": "A Version.\n",
- "type": "string"
- },
- "checksum": {
- "description": "This type represents the checksum of a VNF package or an artifact file.\n",
- "type": "object",
- "required": [
- "algorithm",
- "hash"
- ],
- "properties": {
- "algorithm": {
- "description": "Name of the algorithm used to generate the checksum, as defined in ETSI GS NFV-SOL 004. For example, SHA-256, SHA-512.\n",
- "type": "string"
- },
- "hash": {
- "description": "The hexadecimal value of the checksum.\n",
- "type": "string"
- }
- }
- },
- "containerFormat": {
- "description": "Container format indicates whether the software image is in a file format that also contains metadata about the actual software. Permitted values: - AKI: a kernel image format - AMI: a machine image format - ARI: a ramdisk image format - BARE: the image does not have a container or metadata envelope - DOCKER: docker container format - OVA: OVF package in a tarfile - OVF: OVF container format The list of permitted values was taken from \"Container formats\" in http://docs.openstack.org/image-guide/image-formats.html\n",
- "type": "string",
- "enum": [
- "AKI",
- "AMI",
- "ARI",
- "BARE",
- "DOCKER",
- "OVA",
- "OVF"
- ]
- },
- "diskFormat": {
- "description": "Disk format of a software image is the format of the underlying disk image. Permitted values: - AKI: a kernel image format - AMI: a machine image format - ARI: a ramdisk image format - ISO: an archive format for the data contents of an optical disc, such as CD-ROM\n- QCOW2: a common disk image format, which can expand dynamically and supports copy on write\n- RAW: an unstructured disk image format - VDI: a common disk image format - VHD: a common disk image format - VHDX: enhanced version of VHD format - VMDK: a common disk image format The list of permitted values was adapted from \"Disk formats\" in http://docs.openstack.org/image-guide/image-formats.html\n",
- "type": "string",
- "enum": [
- "AKI",
- "AMI",
- "ISO",
- "QCOW2",
- "RAW",
- "VDI",
- "VHD",
- "VHDX",
- "VMDK"
- ]
- },
- "createdAt": {
- "description": "Date-time stamp. Representation: String formatted according to IETF RFC 3339.\n",
- "type": "string",
- "format": "date-time"
- },
- "minDisk": {
- "description": "The minimal disk for this software image in bytes.\n",
- "type": "integer"
- },
- "minRam": {
- "description": "The minimal RAM for this software image in bytes.\n",
- "type": "integer"
- },
- "size": {
- "description": "Size of this software image in bytes.\n",
- "type": "integer"
- },
- "userMetadata": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- },
- "imagePath": {
- "description": "Path in the VNF package, which identifies the image artifact and also allows to access a copy of the image artifact.\n",
- "type": "string"
- }
- }
- }
- },
- "additionalArtifacts": {
- "description": "Information about VNF package artifacts contained in the VNF package that are not software images. This attribute shall not be present before the VNF package content is on-boarded. Otherwise, this attribute shall be present if the VNF package contains additional artifacts.\n",
- "type": "array",
- "items": {
- "description": "This type represents an artifact other than a software image which is contained in a VNF package.\n",
- "type": "object",
- "required": [
- "artifactPath",
- "checksum"
- ],
- "properties": {
- "artifactPath": {
- "description": "Path in the VNF package, which identifies the artifact and also allows to access a copy of the artifact.\n",
- "type": "string"
- },
- "checksum": {
- "description": "This type represents the checksum of a VNF package or an artifact file.\n",
- "type": "object",
- "required": [
- "algorithm",
- "hash"
- ],
- "properties": {
- "algorithm": {
- "description": "Name of the algorithm used to generate the checksum, as defined in ETSI GS NFV-SOL 004. For example, SHA-256, SHA-512.\n",
- "type": "string"
- },
- "hash": {
- "description": "The hexadecimal value of the checksum.\n",
- "type": "string"
- }
- }
- },
- "metadata": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- }
- }
- }
- },
- "onboardingState": {
- "description": "CREATED: The VNF package resource has been created. UPLOADING: The associated VNF package content is being uploaded. PROCESSING: The associated VNF package content is being processed, e.g., validation.\nONBOARDED: The associated VNF package content has been successfully on-boarded.\n",
- "type": "string",
- "enum": [
- "CREATED",
- "UPLOADING",
- "PROCESSING",
- "ONBOARDED"
- ]
- },
- "operationalState": {
- "description": "- ENABLED: The VNF package is enabled, i.e. it can be used for instantiation of new VNF instances.\n- DISABLED: The VNF package is disabled, i.e. it cannot be used for further VNF instantiation requests (unless and until the VNF package\n is re-enabled).\n",
- "type": "string",
- "enum": [
- "ENABLED",
- "DISABLED"
- ]
- },
- "usageState":
- {
- "description": "- IN_USE: VNF instances instantiated from this VNF package exist. - NOT_IN_USE: No existing VNF instance is instantiated from this VNF package.\n",
- "type": "string",
- "enum": [
- "IN_USE",
- "NOT_IN_USE"
- ]
- },
- "userDefinedData": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- },
- "_links": {
- "description": "Links to resources related to this resource.\n",
- "type": "object",
- "required": [
- "self",
- "packageContent"
- ],
- "properties": {
- "self": {
- "description": "This type represents a link to a resource using an absolute URI. It shall comply with the provisions defined in table 4.4.1.3-1.\n",
- "type": "object",
- "required": [
- "href"
- ],
- "properties": {
- "href": {
- "description": "String formatted according to IETF RFC 3986.\n",
- "type": "string"
- }
- }
- },
- "vnfd": {
- "description": "This type represents a link to a resource using an absolute URI. It shall comply with the provisions defined in table 4.4.1.3-1.\n",
- "type": "object",
- "required": [
- "href"
- ],
- "properties": {
- "href": {
- "description": "String formatted according to IETF RFC 3986.\n",
- "type": "string"
- }
- }
- },
- "packageContent": {
- "description": "This type represents a link to a resource using an absolute URI. It shall comply with the provisions defined in table 4.4.1.3-1.\n",
- "type": "object",
- "required": [
- "href"
- ],
- "properties": {
- "href": {
- "description": "String formatted according to IETF RFC 3986.\n",
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "400": {
- "description": "400 BAD REQUEST\n400 code can be returned in the following specified cases, the specific cause has to be proper specified in the \"ProblemDetails\" structure to be returned.\nIf the request is malformed or syntactically incorrect (e.g. if the request URI contains incorrect query parameters or the payload body contains a syntactically incorrect data structure), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem.\nIf the response to a GET request which queries a container resource would be so big that the performance of the API producer is adversely affected, and the API producer does not support paging for the affected resource, it shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem.\nIf there is an application error related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\nIf the request contains a malformed access token, the API producer should respond with this response. The details of the error shall be returned in the WWW Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\nThe use of this HTTP error response code described above is applicable to the use of the OAuth 2.0 for the authorization of API requests and notifications, as defined in clauses 4.5.3.3 and 4.5.3.4.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "401": {
- "description": "401 UNAUTHORIZED\nIf the request contains no access token even though one is required, or if the request contains an authorization token that is invalid (e.g. expired or revoked), the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "403": {
- "description": "403 FORBIDDEN\nIf the API consumer is not allowed to perform a particular request to a particular resource, the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided. It should include in the \"detail\" attribute information about the source of the problem, and may indicate how to solve it.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "404": {
- "description": "404 NOT FOUND\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request or is not willing to disclose that one exists, it shall respond with this response code. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the source of the problem, e.g. a wrong resource URI variable.\nThis response code is not appropriate in case the resource addressed by the URI is a container resource which is designed to contain child resources, but does not contain any child resource at the time the request is received. For a GET request to an existing empty container resource, a typical response contains a 200 OK response code and a payload body with an empty array.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "405": {
- "description": "404 NOT FOUND\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request or is not willing to disclose that one exists, it shall respond with this response code. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the source of the problem, e.g. a wrong resource URI variable.\nThis response code is not appropriate in case the resource addressed by the URI is a container resource which is designed to contain child resources, but does not contain any child resource at the time the request is received. For a GET request to an existing empty container resource, a typical response contains a 200 OK response code and a payload body with an empty array.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "406": {
- "description": "406 NOT ACCEPTABLE\nIf the \"Accept\" header does not contain at least one name of a content type that is acceptable to the API producer, the API producer shall respond with this response code. The \"ProblemDetails\" structure may be omitted.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "416": {
- "description": "416 RANGE NOT SATISFIABLE\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "500": {
- "description": "500 INTERNAL SERVER ERROR\nIf there is an application error not related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "503": {
- "description": "503 SERVICE UNAVAILABLE\nIf the API producer encounters an internal overload situation of itself or of a system it relies on, it should respond with this response code, following the provisions in IETF RFC 7231 for the use of the \"Retry-After\" HTTP header and for the alternative to refuse the connection. The \"ProblemDetails\" structure may be omitted.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- }
- }
- }
- },
- "/vnf_packages/{vnfPkgId}": {
- "parameters": [
- {
- "name": "vnfPkgId",
- "description": "Identifier of the VNF package. The identifier is allocated by the NFVO. This identifier can be retrieved from the \"vnfPkgId\" attribute in the VnfPackageOnboardingNotification or VnfPackageChangeNotification.\n",
- "in": "path",
- "type": "string",
- "required": true
- }
- ],
- "get": {
- "description": "Query VNF Package Info\n\nThe GET method reads the information of an individual VNF package.\n",
- "parameters": [
- {
- "name": "Accept",
- "description": "Content-Types that are acceptable for the response. Reference: IETF RFC 7231\n",
- "in": "header",
- "required": true,
- "type": "string"
- },
- {
- "name": "Authorization",
- "description": "The authorization token for the request. Reference: IETF RFC 7235\n",
- "in": "header",
- "required": false,
- "type": "string"
- },
- {
- "name": "Version",
- "description": "Version of the API requested to use when responding to this request.\n",
- "in": "header",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "200 OK\nInformation of the selected VNF packages.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "This type represents the information of an VNF package.\n",
- "type": "object",
- "required": [
- "id",
- "operationalState",
- "usageState",
- "_links"
- ],
- "properties": {
- "id": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vnfdId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vnfProvider": {
- "description": "Provider of the VNF package and the VNFD. This information is copied from the VNFD.\n",
- "type": "string"
- },
- "vnfProductName": {
- "description": "Name to identify the VNF product. Invariant for the VNF product lifetime. This information is copied from the VNFD. It shall be present after the VNF package content has been on-boarded and absent otherwise.\n",
- "type": "string"
- },
- "vnfSoftwareVersion": {
- "description": "A Version.\n",
- "type": "string"
- },
- "vnfdVersion": {
- "description": "A Version.\n",
- "type": "string"
- },
- "checksum": {
- "description": "This type represents the checksum of a VNF package or an artifact file.\n",
- "type": "object",
- "required": [
- "algorithm",
- "hash"
- ],
- "properties": {
- "algorithm": {
- "description": "Name of the algorithm used to generate the checksum, as defined in ETSI GS NFV-SOL 004. For example, SHA-256, SHA-512.\n",
- "type": "string"
- },
- "hash": {
- "description": "The hexadecimal value of the checksum.\n",
- "type": "string"
- }
- }
- },
- "softwareImages": {
- "description": "Information about VNF package artifacts that are software images. This attribute shall not be present before the VNF package content is on-boarded. Otherwise, this attribute shall be present unless it has been requested to be excluded per attribute selector.\n",
- "type": "array",
- "items": {
- "description": "This type represents an artifact contained in a VNF package which represents a software image.\n",
- "type": "object",
- "required": [
- "id",
- "name",
- "provider",
- "version",
- "checksum",
- "containerFormat",
- "diskFormat",
- "createdAt",
- "minDisk",
- "minRam",
- "size",
- "imagePath"
- ],
- "properties": {
- "id": {
- "description": "An identifier that is unique within a VNF descriptor.\n",
- "type": "string"
- },
- "name": {
- "description": "Name of the software image.\n",
- "type": "string"
- },
- "provider": {
- "description": "Provider of the software image.\n",
- "type": "string"
- },
- "version": {
- "description": "A Version.\n",
- "type": "string"
- },
- "checksum": {
- "description": "This type represents the checksum of a VNF package or an artifact file.\n",
- "type": "object",
- "required": [
- "algorithm",
- "hash"
- ],
- "properties": {
- "algorithm": {
- "description": "Name of the algorithm used to generate the checksum, as defined in ETSI GS NFV-SOL 004. For example, SHA-256, SHA-512.\n",
- "type": "string"
- },
- "hash": {
- "description": "The hexadecimal value of the checksum.\n",
- "type": "string"
- }
- }
- },
- "containerFormat": {
- "description": "Container format indicates whether the software image is in a file format that also contains metadata about the actual software. Permitted values: - AKI: a kernel image format - AMI: a machine image format - ARI: a ramdisk image format - BARE: the image does not have a container or metadata envelope - DOCKER: docker container format - OVA: OVF package in a tarfile - OVF: OVF container format The list of permitted values was taken from \"Container formats\" in http://docs.openstack.org/image-guide/image-formats.html\n",
- "type": "string",
- "enum": [
- "AKI",
- "AMI",
- "ARI",
- "BARE",
- "DOCKER",
- "OVA",
- "OVF"
- ]
- },
- "diskFormat": {
- "description": "Disk format of a software image is the format of the underlying disk image. Permitted values: - AKI: a kernel image format - AMI: a machine image format - ARI: a ramdisk image format - ISO: an archive format for the data contents of an optical disc, such as CD-ROM\n- QCOW2: a common disk image format, which can expand dynamically and supports copy on write\n- RAW: an unstructured disk image format - VDI: a common disk image format - VHD: a common disk image format - VHDX: enhanced version of VHD format - VMDK: a common disk image format The list of permitted values was adapted from \"Disk formats\" in http://docs.openstack.org/image-guide/image-formats.html\n",
- "type": "string",
- "enum": [
- "AKI",
- "AMI",
- "ISO",
- "QCOW2",
- "RAW",
- "VDI",
- "VHD",
- "VHDX",
- "VMDK"
- ]
- },
- "createdAt": {
- "description": "Date-time stamp. Representation: String formatted according to IETF RFC 3339.\n",
- "type": "string",
- "format": "date-time"
- },
- "minDisk": {
- "description": "The minimal disk for this software image in bytes.\n",
- "type": "integer"
- },
- "minRam": {
- "description": "The minimal RAM for this software image in bytes.\n",
- "type": "integer"
- },
- "size": {
- "description": "Size of this software image in bytes.\n",
- "type": "integer"
- },
- "userMetadata": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- },
- "imagePath": {
- "description": "Path in the VNF package, which identifies the image artifact and also allows to access a copy of the image artifact.\n",
- "type": "string"
- }
- }
- }
- },
- "additionalArtifacts": {
- "description": "Information about VNF package artifacts contained in the VNF package that are not software images. This attribute shall not be present before the VNF package content is on-boarded. Otherwise, this attribute shall be present if the VNF package contains additional artifacts.\n",
- "type": "array",
- "items": {
- "description": "This type represents an artifact other than a software image which is contained in a VNF package.\n",
- "type": "object",
- "required": [
- "artifactPath",
- "checksum"
- ],
- "properties": {
- "artifactPath": {
- "description": "Path in the VNF package, which identifies the artifact and also allows to access a copy of the artifact.\n",
- "type": "string"
- },
- "checksum": {
- "description": "This type represents the checksum of a VNF package or an artifact file.\n",
- "type": "object",
- "required": [
- "algorithm",
- "hash"
- ],
- "properties": {
- "algorithm": {
- "description": "Name of the algorithm used to generate the checksum, as defined in ETSI GS NFV-SOL 004. For example, SHA-256, SHA-512.\n",
- "type": "string"
- },
- "hash": {
- "description": "The hexadecimal value of the checksum.\n",
- "type": "string"
- }
- }
- },
- "metadata": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- }
- }
- }
- },
- "onboardingState": {
- "description": "CREATED: The VNF package resource has been created. UPLOADING: The associated VNF package content is being uploaded. PROCESSING: The associated VNF package content is being processed, e.g., validation.\nONBOARDED: The associated VNF package content has been successfully on-boarded.\n",
- "type": "string",
- "enum": [
- "CREATED",
- "UPLOADING",
- "PROCESSING",
- "ONBOARDED"
- ]
- },
- "operationalState": {
- "description": "- ENABLED: The VNF package is enabled, i.e. it can be used for instantiation of new VNF instances.\n- DISABLED: The VNF package is disabled, i.e. it cannot be used for further VNF instantiation requests (unless and until the VNF package\n is re-enabled).\n",
- "type": "string",
- "enum": [
- "ENABLED",
- "DISABLED"
- ]
- },
- "usageState":
- {
- "description": "- IN_USE: VNF instances instantiated from this VNF package exist. - NOT_IN_USE: No existing VNF instance is instantiated from this VNF package.\n",
- "type": "string",
- "enum": [
- "IN_USE",
- "NOT_IN_USE"
- ]
- },
- "userDefinedData": {
- "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159.\n",
- "type": "object"
- },
- "_links": {
- "description": "Links to resources related to this resource.\n",
- "type": "object",
- "required": [
- "self",
- "packageContent"
- ],
- "properties": {
- "self": {
- "description": "This type represents a link to a resource using an absolute URI. It shall comply with the provisions defined in table 4.4.1.3-1.\n",
- "type": "object",
- "required": [
- "href"
- ],
- "properties": {
- "href": {
- "description": "String formatted according to IETF RFC 3986.\n",
- "type": "string"
- }
- }
- },
- "vnfd": {
- "description": "This type represents a link to a resource using an absolute URI. It shall comply with the provisions defined in table 4.4.1.3-1.\n",
- "type": "object",
- "required": [
- "href"
- ],
- "properties": {
- "href": {
- "description": "String formatted according to IETF RFC 3986.\n",
- "type": "string"
- }
- }
- },
- "packageContent": {
- "description": "This type represents a link to a resource using an absolute URI. It shall comply with the provisions defined in table 4.4.1.3-1.\n",
- "type": "object",
- "required": [
- "href"
- ],
- "properties": {
- "href": {
- "description": "String formatted according to IETF RFC 3986.\n",
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- },
- "400": {
- "description": "400 BAD REQUEST\n400 code can be returned in the following specified cases, the specific cause has to be proper specified in the \"ProblemDetails\" structure to be returned.\nIf the request is malformed or syntactically incorrect (e.g. if the request URI contains incorrect query parameters or the payload body contains a syntactically incorrect data structure), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem.\nIf the response to a GET request which queries a container resource would be so big that the performance of the API producer is adversely affected, and the API producer does not support paging for the affected resource, it shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem.\nIf there is an application error related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\nIf the request contains a malformed access token, the API producer should respond with this response. The details of the error shall be returned in the WWW Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\nThe use of this HTTP error response code described above is applicable to the use of the OAuth 2.0 for the authorization of API requests and notifications, as defined in clauses 4.5.3.3 and 4.5.3.4.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "401": {
- "description": "401 UNAUTHORIZED\nIf the request contains no access token even though one is required, or if the request contains an authorization token that is invalid (e.g. expired or revoked), the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "403": {
- "description": "403 FORBIDDEN\nIf the API consumer is not allowed to perform a particular request to a particular resource, the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided. It should include in the \"detail\" attribute information about the source of the problem, and may indicate how to solve it.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "404": {
- "description": "404 NOT FOUND\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request or is not willing to disclose that one exists, it shall respond with this response code. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the source of the problem, e.g. a wrong resource URI variable.\nThis response code is not appropriate in case the resource addressed by the URI is a container resource which is designed to contain child resources, but does not contain any child resource at the time the request is received. For a GET request to an existing empty container resource, a typical response contains a 200 OK response code and a payload body with an empty array.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "405": {
- "description": "404 NOT FOUND\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request or is not willing to disclose that one exists, it shall respond with this response code. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the source of the problem, e.g. a wrong resource URI variable.\nThis response code is not appropriate in case the resource addressed by the URI is a container resource which is designed to contain child resources, but does not contain any child resource at the time the request is received. For a GET request to an existing empty container resource, a typical response contains a 200 OK response code and a payload body with an empty array.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "406": {
- "description": "406 NOT ACCEPTABLE\nIf the \"Accept\" header does not contain at least one name of a content type that is acceptable to the API producer, the API producer shall respond with this response code. The \"ProblemDetails\" structure may be omitted.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "416": {
- "description": "416 RANGE NOT SATISFIABLE\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "500": {
- "description": "500 INTERNAL SERVER ERROR\nIf there is an application error not related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "503": {
- "description": "503 SERVICE UNAVAILABLE\nIf the API producer encounters an internal overload situation of itself or of a system it relies on, it should respond with this response code, following the provisions in IETF RFC 7231 for the use of the \"Retry-After\" HTTP header and for the alternative to refuse the connection. The \"ProblemDetails\" structure may be omitted.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- }
- }
- }
- },
- "/vnf_packages/{vnfPkgId}/vnfd": {
- "parameters": [
- {
- "name": "vnfPkgId",
- "description": "Identifier of the on-boarded VNF package. The identifier is allocated by the NFVO. This identifier can be retrieved from the \"vnfPkgId\" attribute in the VnfPackageOnboardingNotification or VnfPackageChangeNotification.\n",
- "in": "path",
- "type": "string",
- "required": true
- }
- ],
- "get": {
- "description": "Query VNF Package Info\n\nThe GET method reads the content of the VNFD within a VNF package. The VNFD can be implemented as a single file or as a collection of multiple files. If the VNFD is implemented in the form of multiple files, a ZIP file embedding these files shall be returned. If the VNFD is implemented as a single file, either that file or a ZIP file embedding that file shall be returned. The selection of the format is controlled by the \"Accept\" HTTP header passed in the GET request. * If the \"Accept\" header contains only \"text/plain\" and the VNFD is implemented as a single file, the file shall be returned;\n otherwise, an error message shall be returned.\n* If the \"Accept\" header contains only \"application/zip\", the single file or the multiple files that make up the VNFD shall be returned\n embedded in a ZIP file.\n* If the \"Accept\" header contains both \"text/plain\" and \"application/zip\", it is up to the NFVO to choose the format to\n return for a single-file VNFD; for a multi-file VNFD, a ZIP file\n shall be returned.\nThe default format of the ZIP file shall be the one specified in ETSI GS NFV-SOL 004 where only the YAML files representing the VNFD, and information needed to navigate the ZIP file and to identify the file that is the entry point for parsing the VNFD (such as TOSCA-meta or manifest files or naming conventions) are included.\n",
- "parameters": [
- {
- "name": "Accept",
- "description": "Content-Types that are acceptable for the response. Permitted values: \"text/plain\" and/or \"application/zip\" Reference: IETF RFC 7231\n",
- "in": "header",
- "required": true,
- "type": "string",
- "enum": [
- "text/plain",
- "application/zip",
- "text/plain+application/zip"
- ]
- },
- {
- "name": "Authorization",
- "description": "The authorization token for the request. Reference: IETF RFC 7235\n",
- "in": "header",
- "required": false,
- "type": "string"
- },
- {
- "name": "Version",
- "description": "Version of the API requested to use when responding to this request.\n",
- "in": "header",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "200 OK\nOn success, the content of the VNFD is returned. The payload body shall contain a copy of the file representing the VNFD or a ZIP file that contains the file or multiple files representing the VNFD, as specified above. The \"Content-Type\" HTTP header shall be set according to the format of the returned file, i.e. to \"text/plain\" for a YAML file or to \"application/zip\" for a ZIP file.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "enum": [
- "text/plain",
- "application/zip"
- ],
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- }
- },
- "400": {
- "description": "400 BAD REQUEST\n400 code can be returned in the following specified cases, the specific cause has to be proper specified in the \"ProblemDetails\" structure to be returned.\nIf the request is malformed or syntactically incorrect (e.g. if the request URI contains incorrect query parameters or the payload body contains a syntactically incorrect data structure), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem.\nIf the response to a GET request which queries a container resource would be so big that the performance of the API producer is adversely affected, and the API producer does not support paging for the affected resource, it shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem.\nIf there is an application error related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\nIf the request contains a malformed access token, the API producer should respond with this response. The details of the error shall be returned in the WWW Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\nThe use of this HTTP error response code described above is applicable to the use of the OAuth 2.0 for the authorization of API requests and notifications, as defined in clauses 4.5.3.3 and 4.5.3.4.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "401": {
- "description": "401 UNAUTHORIZED\nIf the request contains no access token even though one is required, or if the request contains an authorization token that is invalid (e.g. expired or revoked), the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "403": {
- "description": "403 FORBIDDEN\nIf the API consumer is not allowed to perform a particular request to a particular resource, the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided. It should include in the \"detail\" attribute information about the source of the problem, and may indicate how to solve it.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "404": {
- "description": "404 NOT FOUND\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request or is not willing to disclose that one exists, it shall respond with this response code. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the source of the problem, e.g. a wrong resource URI variable.\nThis response code is not appropriate in case the resource addressed by the URI is a container resource which is designed to contain child resources, but does not contain any child resource at the time the request is received. For a GET request to an existing empty container resource, a typical response contains a 200 OK response code and a payload body with an empty array.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "405": {
- "description": "404 NOT FOUND\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request or is not willing to disclose that one exists, it shall respond with this response code. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the source of the problem, e.g. a wrong resource URI variable.\nThis response code is not appropriate in case the resource addressed by the URI is a container resource which is designed to contain child resources, but does not contain any child resource at the time the request is received. For a GET request to an existing empty container resource, a typical response contains a 200 OK response code and a payload body with an empty array.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "406": {
- "description": "Not Acceptable\nIf the \"Accept\" header does not contain at least one name of a content type for which the NFVO can provide a representation of the VNFD, the NFVO shall respond with this response code. The \"ProblemDetails\" structure may be included with the \"detail\" attribute providing more information about the error.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "409": {
- "description": "Conflict\nError: The operation cannot be executed currently, due to a conflict with the state of the resource. Typically, this is due to the fact that \"onboardingState\" of the VNF package has a value different from \"ONBOARDED\". The response body shall contain a ProblemDetails structure, in which the \"detail\" attribute shall convey more information about the error.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "416": {
- "description": "416 RANGE NOT SATISFIABLE\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "500": {
- "description": "500 INTERNAL SERVER ERROR\nIf there is an application error not related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "503": {
- "description": "503 SERVICE UNAVAILABLE\nIf the API producer encounters an internal overload situation of itself or of a system it relies on, it should respond with this response code, following the provisions in IETF RFC 7231 for the use of the \"Retry-After\" HTTP header and for the alternative to refuse the connection. The \"ProblemDetails\" structure may be omitted.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- }
- }
- }
- },
- "/vnf_packages/{vnfPkgId}/package_content": {
- "parameters": [
- {
- "name": "vnfPkgId",
- "description": "Identifier of the VNF package. The identifier is allocated by the NFVO. This identifier can be retrieved from the \"vnfPkgId\" attribute in the VnfPackageOnboardingNotification or VnfPackageChangeNotification.\n",
- "in": "path",
- "type": "string",
- "required": true
- }
- ],
- "get": {
- "description": "Fetch VNF Package\n\nThe GET method fetches the content of a VNF package identified by the VNF package identifier allocated by the NFVO.\n",
- "parameters": [
- {
- "name": "Accept",
- "description": "Content-Types that are acceptable for the response.\n",
- "in": "header",
- "required": true,
- "type": "string",
- "enum": [
- "text/plain",
- "application/zip"
- ]
- },
- {
- "name": "Authorization",
- "description": "The authorization token for the request. Reference: IETF RFC 7235\n",
- "in": "header",
- "required": false,
- "type": "string"
- },
- {
- "name": "Range",
- "description": "The request may contain a \"Range\" HTTP header to obtain single range of bytes from the VNF package file. This can be used to continue an aborted transmission. If the NFVO does not support range requests, it should return the whole file with a 200 OK response instead.\n",
- "in": "header",
- "type": "string"
- },
- {
- "name": "Version",
- "description": "Version of the API requested to use when responding to this request.\n",
- "in": "header",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "200 OK\nOn success, a copy of the VNF package file is returned. The response body shall include a copy of the VNF package file. The \"Content-Type HTTP\" header shall be set according to the type of the file, i.e. to \"application/zip\" for a VNF Package as defined in ETSI GS NFV-SOL 004.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- }
- },
- "206": {
- "description": "206 PARTIAL CONTENT\nOn success, if the NFVO supports range requests, a single consecutive byte range from the content of the VNF package file is returned. The response body shall contain the requested part of the VNF package file. The \"Content-Range\" HTTP header shall be provided according to IETF RFC 7233. The \"Content-Type\" HTTP header shall be set as defined above for the \"200 OK\" response.\n",
- "headers": {
- "Content-Range": {
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- }
- },
- "400": {
- "description": "400 BAD REQUEST\n400 code can be returned in the following specified cases, the specific cause has to be proper specified in the \"ProblemDetails\" structure to be returned.\nIf the request is malformed or syntactically incorrect (e.g. if the request URI contains incorrect query parameters or the payload body contains a syntactically incorrect data structure), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem.\nIf the response to a GET request which queries a container resource would be so big that the performance of the API producer is adversely affected, and the API producer does not support paging for the affected resource, it shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem.\nIf there is an application error related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\nIf the request contains a malformed access token, the API producer should respond with this response. The details of the error shall be returned in the WWW Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\nThe use of this HTTP error response code described above is applicable to the use of the OAuth 2.0 for the authorization of API requests and notifications, as defined in clauses 4.5.3.3 and 4.5.3.4.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "401": {
- "description": "401 UNAUTHORIZED\nIf the request contains no access token even though one is required, or if the request contains an authorization token that is invalid (e.g. expired or revoked), the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "403": {
- "description": "403 FORBIDDEN\nIf the API consumer is not allowed to perform a particular request to a particular resource, the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided. It should include in the \"detail\" attribute information about the source of the problem, and may indicate how to solve it.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "404": {
- "description": "404 NOT FOUND\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request or is not willing to disclose that one exists, it shall respond with this response code. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the source of the problem, e.g. a wrong resource URI variable.\nThis response code is not appropriate in case the resource addressed by the URI is a container resource which is designed to contain child resources, but does not contain any child resource at the time the request is received. For a GET request to an existing empty container resource, a typical response contains a 200 OK response code and a payload body with an empty array.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "405": {
- "description": "404 NOT FOUND\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request or is not willing to disclose that one exists, it shall respond with this response code. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the source of the problem, e.g. a wrong resource URI variable.\nThis response code is not appropriate in case the resource addressed by the URI is a container resource which is designed to contain child resources, but does not contain any child resource at the time the request is received. For a GET request to an existing empty container resource, a typical response contains a 200 OK response code and a payload body with an empty array.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "406": {
- "description": "406 NOT ACCEPTABLE\nIf the \"Accept\" header does not contain at least one name of a content type that is acceptable to the API producer, the API producer shall respond with this response code. The \"ProblemDetails\" structure may be omitted.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "409": {
- "description": "Conflict\nError: The operation cannot be executed currently, due to a conflict with the state of the resource. Typically, this is due to the fact that \"onboardingState\" of the VNF package has a value different from \"ONBOARDED\". The response body shall contain a ProblemDetails structure, in which the \"detail\" attribute shall convey more information about the error.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "416": {
- "description": "Requested Range Not Satisfiable\nThe byte range passed in the \"Range\" header did not match any available byte range in the VNF package file (e.g. \"access after end of file\"). The response body may contain a ProblemDetails structure.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "500": {
- "description": "500 INTERNAL SERVER ERROR\nIf there is an application error not related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "503": {
- "description": "503 SERVICE UNAVAILABLE\nIf the API producer encounters an internal overload situation of itself or of a system it relies on, it should respond with this response code, following the provisions in IETF RFC 7231 for the use of the \"Retry-After\" HTTP header and for the alternative to refuse the connection. The \"ProblemDetails\" structure may be omitted.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- }
- }
- }
- },
- "/vnf_packages/{vnfPkgId}/artifacts/{artifactPath}": {
- "parameters": [
- {
- "name": "artifactPath",
- "description": "Sequence of one or more path segments representing the path of the artifact within the VNF package. EXAMPLE: foo/bar/run.sh This identifier can be retrieved from the \"artifactPath\" attribute of the applicable \"additionalArtifacts\" entry in the body of the response to a GET request querying the \"Individual VNF package\" or the \"VNF packages\" resource.\n",
- "in": "path",
- "type": "string",
- "required": true
- },
- {
- "name": "vnfPkgId",
- "description": "Identifier of the VNF package. The identifier is allocated by the NFVO. This identifier can be retrieved from the \"vnfPkgId\" attribute in the VnfPackageOnboardingNotification or VnfPackageChangeNotification.\n",
- "in": "path",
- "type": "string",
- "required": true
- }
- ],
- "get": {
- "description": "Fetch VNF Package Artifacts\n\nThe GET method fetches the content of an artifact within a VNF package.\n",
- "parameters": [
- {
- "name": "Accept",
- "description": "Content-Types that are acceptable for the response.\n",
- "in": "header",
- "required": true,
- "type": "string"
- },
- {
- "name": "Authorization",
- "description": "The authorization token for the request. Reference: IETF RFC 7235\n",
- "in": "header",
- "required": false,
- "type": "string"
- },
- {
- "name": "Range",
- "description": "The request may contain a \"Range\" HTTP header to obtain single range of bytes from the VNF package file. This can be used to continue an aborted transmission. If the NFVO does not support range requests, it should return the whole file with a 200 OK response instead.\n",
- "in": "header",
- "type": "string"
- },
- {
- "name": "Version",
- "description": "Version of the API requested to use when responding to this request.\n",
- "in": "header",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "200 OK\nOn success, the content of the artifact is returned. The payload body shall contain a copy of the artifact file from the VNF package, as defined by ETSI GS NFV-SOL 004. The \"Content-Type\" HTTP header shall be set according to the content type of the artifact file. If the content type cannot be determined, the header shall be set to the value \"application/octet-stream\".\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response. The \"Content-Type\" HTTP header shall be set according to the content type of the artifact file. If the content type cannot be determined, the header shall be set to the value \"application/octet-stream\".\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- }
- },
- "206": {
- "description": "206 PARTIAL CONTENT\nOn success, if the NFVO supports range requests, a single consecutive byte range from the content of the VNF package file is returned. The response body shall contain the requested part of the VNF package file. The \"Content-Range\" HTTP header shall be provided according to IETF RFC 7233. The \"Content-Type\" HTTP header shall be set as defined above for the \"200 OK\" response.\n",
- "headers": {
- "Content-Range": {
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- }
- },
- "400": {
- "description": "400 BAD REQUEST\n400 code can be returned in the following specified cases, the specific cause has to be proper specified in the \"ProblemDetails\" structure to be returned.\nIf the request is malformed or syntactically incorrect (e.g. if the request URI contains incorrect query parameters or the payload body contains a syntactically incorrect data structure), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem.\nIf the response to a GET request which queries a container resource would be so big that the performance of the API producer is adversely affected, and the API producer does not support paging for the affected resource, it shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem.\nIf there is an application error related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\nIf the request contains a malformed access token, the API producer should respond with this response. The details of the error shall be returned in the WWW Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\nThe use of this HTTP error response code described above is applicable to the use of the OAuth 2.0 for the authorization of API requests and notifications, as defined in clauses 4.5.3.3 and 4.5.3.4.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "401": {
- "description": "401 UNAUTHORIZED\nIf the request contains no access token even though one is required, or if the request contains an authorization token that is invalid (e.g. expired or revoked), the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "403": {
- "description": "403 FORBIDDEN\nIf the API consumer is not allowed to perform a particular request to a particular resource, the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided. It should include in the \"detail\" attribute information about the source of the problem, and may indicate how to solve it.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "404": {
- "description": "404 NOT FOUND\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request or is not willing to disclose that one exists, it shall respond with this response code. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the source of the problem, e.g. a wrong resource URI variable.\nThis response code is not appropriate in case the resource addressed by the URI is a container resource which is designed to contain child resources, but does not contain any child resource at the time the request is received. For a GET request to an existing empty container resource, a typical response contains a 200 OK response code and a payload body with an empty array.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "405": {
- "description": "404 NOT FOUND\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request or is not willing to disclose that one exists, it shall respond with this response code. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the source of the problem, e.g. a wrong resource URI variable.\nThis response code is not appropriate in case the resource addressed by the URI is a container resource which is designed to contain child resources, but does not contain any child resource at the time the request is received. For a GET request to an existing empty container resource, a typical response contains a 200 OK response code and a payload body with an empty array.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "406": {
- "description": "406 NOT ACCEPTABLE\nIf the \"Accept\" header does not contain at least one name of a content type that is acceptable to the API producer, the API producer shall respond with this response code. The \"ProblemDetails\" structure may be omitted.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "409": {
- "description": "Conflict\nError: The operation cannot be executed currently, due to a conflict with the state of the resource. Typically, this is due to the fact that \"onboardingState\" of the VNF package has a value different from \"ONBOARDED\". The response body shall contain a ProblemDetails structure, in which the \"detail\" attribute shall convey more information about the error.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "416": {
- "description": "Requested Range Not Satisfiable\nThe byte range passed in the \"Range\" header did not match any available byte range in the VNF package file (e.g. \"access after end of file\"). The response body may contain a ProblemDetails structure.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "500": {
- "description": "500 INTERNAL SERVER ERROR\nIf there is an application error not related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "503": {
- "description": "503 SERVICE UNAVAILABLE\nIf the API producer encounters an internal overload situation of itself or of a system it relies on, it should respond with this response code, following the provisions in IETF RFC 7231 for the use of the \"Retry-After\" HTTP header and for the alternative to refuse the connection. The \"ProblemDetails\" structure may be omitted.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- }
- }
- }
- },
- "/subscriptions": {
- "post": {
- "description": "Subscribe\n\nThe POST method creates a new subscription. Creation of two subscription resources with the same callbackURI and the same filter can result in performance degradation and will provide duplicates of notifications to the VNFM, and might make sense only in very rare use cases. Consequently, the NFVO may either allow creating a subscription resource if another subscription resource with the same filter and callbackUri already exists (in which case it shall return the “201 Created” response code), or may decide to not create a duplicate subscription resource (in which case it shall return a “303 See Other” response code referencing the existing subscription resource with the same filter and callbackUri).\n",
- "parameters": [
- {
- "name": "PkgmSubscriptionRequest",
- "description": "Representation of the created subscription resource. The HTTP response shall include a \"Location\" HTTP header that points to the created subscription resource.\n",
- "in": "body",
- "required": true,
- "schema": {
- "description": "This type represents a subscription request related to VNF package management notifications about VNF package on-boarding or changes.\n",
- "type": "object",
- "required": [
- "callbackUri"
- ],
- "properties": {
- "filter": {
- "description": "This type represents a subscription filter related to notifications related to VNF package management. At a particular nesting level in the filter structure, the following applies: All attributes shall match in order for the filter to match (logical \"and\" between different filter attributes). If an attribute is an array, the attribute shall match if at least one of the values in the array matches (logical \"or\" between the values of one filter attribute).\n",
- "type": "object",
- "properties": {
- "notificationTypes": {
- "description": "Match particular notification types. Permitted values: - VnfPackageOnboardingNotification - VnfPackageChangeNotification The permitted values of the \"notificationTypes\" attribute are spelled exactly as the names of the notification types to facilitate automated code generation systems.\n",
- "type": "array",
- "items": {
- "type": "string",
- "enum": [
- "VnfPackageOnboardingNotification",
- "VnfPackageChangeNotification"
- ]
- }
- },
- "vnfProductsFromProviders": {
- "description": "If present, match VNF packages that contain VNF products from certain providers. The attributes \"vnfProductsFromProviders\", \"vnfdId\" and \"vnfPkgId\" are alternatives to reference to particular VNF packages in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "vnfProvider"
- ],
- "properties": {
- "vnfProvider": {
- "description": "Name of the VNF provider to match.\n",
- "type": "string"
- },
- "vnfProducts": {
- "description": "If present, match VNF packages that contain VNF products with certain product names, from one particular provider.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "vnfProductName"
- ],
- "properties": {
- "vnfProductName": {
- "description": "Name of the VNF product to match.\n",
- "type": "string"
- },
- "versions": {
- "description": "If present, match VNF packages that contain VNF products with certain versions and a certain product name, from one particular provider.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "vnfSoftwareVersion"
- ],
- "properties": {
- "vnfSoftwareVersion": {
- "description": "A Version.\n",
- "type": "string"
- },
- "vnfdVersions": {
- "description": "If present, match VNF packages that contain VNF products with certain VNFD versions, a certain software version and a certain product name, from one particular provider.\n",
- "type": "array",
- "items": {
- "description": "A Version.\n",
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "vnfdId": {
- "description": "Match VNF packages with a VNFD identifier listed in the attribute. The attributes \"vnfProductsFromProviders\", \"vnfdId\" and \"vnfPkgId\" are alternatives to reference to particular VNF packages in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n",
- "type": "array",
- "items": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- }
- },
- "vnfPkgId": {
- "description": "Match VNF packages with a package identifier listed in the attribute. May be present if the \"notificationTypes\" attribute contains the value \"VnfPackageChangeNotification\", and shall be absent otherwise. The attributes \"vnfProductsFromProviders\", \"vnfdId\" and \"vnfPkgId\" are alternatives to reference to particular VNF packages in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n",
- "type": "array",
- "items": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- }
- },
- "operationalState":
- {
- "description": "- ENABLED: The VNF package is enabled, i.e. it can be used for instantiation of new VNF instances.\n- DISABLED: The VNF package is disabled, i.e. it cannot be used for further VNF instantiation requests (unless and until the VNF package\n is re-enabled).\n",
- "type": "array",
- "items":
- {
- "type": "string",
- "enum": [
- "ENABLED",
- "DISABLED"
- ]
- }
- },
- "usageState":
- {
- "description": "- IN_USE: VNF instances instantiated from this VNF package exist. - NOT_IN_USE: No existing VNF instance is instantiated from this VNF package.\n",
- "type": "array",
- "items":
- {
- "type": "string",
- "enum": [
- "IN_USE",
- "NOT_IN_USE"
- ]
- }
- }
- }
- },
- "callbackUri": {
- "description": "String formatted according to IETF RFC 3986.\n",
- "type": "string"
- },
- "authentication": {
- "type": "object",
- "required": [
- "authType"
- ],
- "properties": {
- "authType": {
- "description": "Defines the types of Authentication / Authorization which the API consumer is willing to accept when receiving a notification. Permitted values: * BASIC: In every HTTP request to the notification endpoint, use HTTP Basic authentication with the client credentials. \n* OAUTH2_CLIENT_CREDENTIALS: In every HTTP request to the notification endpoint, use an OAuth 2.0 Bearer token, obtained\n using the client credentials grant type.\n* TLS_CERT: Every HTTP request to the notification endpoint is sent over a mutually authenticated TLS session, i.e. not only the\n server is authenticated, but also the client is authenticated\n during the TLS tunnel setup.\n",
- "type": "array",
- "items": {
- "type": "string",
- "enum": [
- "BASIC",
- "OAUTH2_CLIENT_CREDENTIALS",
- "TLS_CERT"
- ]
- }
- },
- "paramsBasic": {
- "description": "Parameters for authentication/authorization using BASIC. Shall be present if authType is \"BASIC\" and the contained information has not been provisioned out of band. Shall be absent otherwise.\n",
- "type": "object",
- "properties": {
- "userName": {
- "description": "Username to be used in HTTP Basic authentication. Shall be present if it has not been provisioned out of band.\n",
- "type": "string"
- },
- "password": {
- "description": "Password to be used in HTTP Basic authentication. Shall be present if it has not been provisioned out of band.\n",
- "type": "string"
- }
- }
- },
- "paramsOauth2ClientCredentials": {
- "description": "Parameters for authentication/authorization using OAUTH2_CLIENT_CREDENTIALS. Shall be present if authType is \"OAUTH2_CLIENT_CREDENTIALS\" and the contained information has not been provisioned out of band. Shall be absent otherwise.\n",
- "type": "object",
- "properties": {
- "clientId": {
- "description": "Client identifier to be used in the access token request of the OAuth 2.0 client credentials grant type. Shall be present if it has not been provisioned out of band. The clientId and clientPassword passed in a subscription shall not be the same as the clientId and clientPassword that are used to obtain authorization for API requests. Client credentials may differ between subscriptions. The value of clientPassword should be generated by a random process.\n",
- "type": "string"
- },
- "clientPassword": {
- "description": "Client password to be used in the access token request of the OAuth 2.0 client credentials grant type. Shall be present if it has not been provisioned out of band. The clientId and clientPassword passed in a subscription shall not be the same as the clientId and clientPassword that are used to obtain authorization for API requests. Client credentials may differ between subscriptions. The value of clientPassword should be generated by a random process.\n",
- "type": "string"
- },
- "tokenEndpoint": {
- "description": "String formatted according to IETF RFC 3986.\n",
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- },
- {
- "name": "Accept",
- "description": "Content-Types that are acceptable for the response. Reference: IETF RFC 7231\n",
- "in": "header",
- "required": true,
- "type": "string"
- },
- {
- "name": "Authorization",
- "description": "The authorization token for the request. Reference: IETF RFC 7235\n",
- "in": "header",
- "required": false,
- "type": "string"
- },
- {
- "name": "Content-Type",
- "description": "The MIME type of the body of the request. Reference: IETF RFC 7231\n",
- "in": "header",
- "required": true,
- "type": "string"
- },
- {
- "name": "Version",
- "description": "Version of the API requested to use when responding to this request.\n",
- "in": "header",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "201": {
- "description": "201 CREATED\nRepresentation of the created subscription resource. The HTTP response shall include a \"Location\" HTTP header that points to the created subscription resource.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "Location": {
- "description": "The resource URI of the created VNF instance",
- "type": "string",
- "format": "url"
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "type": "array",
- "items": {
- "description": "This type represents a subscription related to notifications about VNF package management.\n",
- "type": "object",
- "required": [
- "id",
- "callbackUri",
- "_links"
- ],
- "properties": {
- "id": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "filter": {
- "description": "This type represents a subscription filter related to notifications related to VNF package management. At a particular nesting level in the filter structure, the following applies: All attributes shall match in order for the filter to match (logical \"and\" between different filter attributes). If an attribute is an array, the attribute shall match if at least one of the values in the array matches (logical \"or\" between the values of one filter attribute).\n",
- "type": "object",
- "properties": {
- "notificationTypes": {
- "description": "Match particular notification types. Permitted values: - VnfPackageOnboardingNotification - VnfPackageChangeNotification The permitted values of the \"notificationTypes\" attribute are spelled exactly as the names of the notification types to facilitate automated code generation systems.\n",
- "type": "array",
- "items": {
- "type": "string",
- "enum": [
- "VnfPackageOnboardingNotification",
- "VnfPackageChangeNotification"
- ]
- }
- },
- "vnfProductsFromProviders": {
- "description": "If present, match VNF packages that contain VNF products from certain providers. The attributes \"vnfProductsFromProviders\", \"vnfdId\" and \"vnfPkgId\" are alternatives to reference to particular VNF packages in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "vnfProvider"
- ],
- "properties": {
- "vnfProvider": {
- "description": "Name of the VNF provider to match.\n",
- "type": "string"
- },
- "vnfProducts": {
- "description": "If present, match VNF packages that contain VNF products with certain product names, from one particular provider.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "vnfProductName"
- ],
- "properties": {
- "vnfProductName": {
- "description": "Name of the VNF product to match.\n",
- "type": "string"
- },
- "versions": {
- "description": "If present, match VNF packages that contain VNF products with certain versions and a certain product name, from one particular provider.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "vnfSoftwareVersion"
- ],
- "properties": {
- "vnfSoftwareVersion": {
- "description": "A Version.\n",
- "type": "string"
- },
- "vnfdVersions": {
- "description": "If present, match VNF packages that contain VNF products with certain VNFD versions, a certain software version and a certain product name, from one particular provider.\n",
- "type": "array",
- "items": {
- "description": "A Version.\n",
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "vnfdId": {
- "description": "Match VNF packages with a VNFD identifier listed in the attribute. The attributes \"vnfProductsFromProviders\", \"vnfdId\" and \"vnfPkgId\" are alternatives to reference to particular VNF packages in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n",
- "type": "array",
- "items": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- }
- },
- "vnfPkgId": {
- "description": "Match VNF packages with a package identifier listed in the attribute. May be present if the \"notificationTypes\" attribute contains the value \"VnfPackageChangeNotification\", and shall be absent otherwise. The attributes \"vnfProductsFromProviders\", \"vnfdId\" and \"vnfPkgId\" are alternatives to reference to particular VNF packages in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n",
- "type": "array",
- "items": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- }
- },
- "operationalState":
- {
- "description": "- ENABLED: The VNF package is enabled, i.e. it can be used for instantiation of new VNF instances.\n- DISABLED: The VNF package is disabled, i.e. it cannot be used for further VNF instantiation requests (unless and until the VNF package\n is re-enabled).\n",
- "type": "array",
- "items":
- {
- "type": "string",
- "enum": [
- "ENABLED",
- "DISABLED"
- ]
- }
- },
- "usageState":
- {
- "description": "- IN_USE: VNF instances instantiated from this VNF package exist. - NOT_IN_USE: No existing VNF instance is instantiated from this VNF package.\n",
- "type": "array",
- "items":
- {
- "type": "string",
- "enum": [
- "IN_USE",
- "NOT_IN_USE"
- ]
- }
- } }
- },
- "callbackUri": {
- "description": "String formatted according to IETF RFC 3986.\n",
- "type": "string"
- },
- "_links": {
- "description": "Links to resources related to this resource.\n",
- "type": "object",
- "required": [
- "self"
- ],
- "properties": {
- "self": {
- "description": "This type represents a link to a resource using an absolute URI. It shall comply with the provisions defined in table 4.4.1.3-1.\n",
- "type": "object",
- "required": [
- "href"
- ],
- "properties": {
- "href": {
- "description": "String formatted according to IETF RFC 3986.\n",
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "303": {
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- }
- },
- "400": {
- "description": "400 BAD REQUEST\n400 code can be returned in the following specified cases, the specific cause has to be proper specified in the \"ProblemDetails\" structure to be returned.\nIf the request is malformed or syntactically incorrect (e.g. if the request URI contains incorrect query parameters or the payload body contains a syntactically incorrect data structure), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem.\nIf the response to a GET request which queries a container resource would be so big that the performance of the API producer is adversely affected, and the API producer does not support paging for the affected resource, it shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem.\nIf there is an application error related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\nIf the request contains a malformed access token, the API producer should respond with this response. The details of the error shall be returned in the WWW Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\nThe use of this HTTP error response code described above is applicable to the use of the OAuth 2.0 for the authorization of API requests and notifications, as defined in clauses 4.5.3.3 and 4.5.3.4.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "401": {
- "description": "401 UNAUTHORIZED\nIf the request contains no access token even though one is required, or if the request contains an authorization token that is invalid (e.g. expired or revoked), the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "403": {
- "description": "403 FORBIDDEN\nIf the API consumer is not allowed to perform a particular request to a particular resource, the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided. It should include in the \"detail\" attribute information about the source of the problem, and may indicate how to solve it.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "404": {
- "description": "404 NOT FOUND\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request or is not willing to disclose that one exists, it shall respond with this response code. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the source of the problem, e.g. a wrong resource URI variable.\nThis response code is not appropriate in case the resource addressed by the URI is a container resource which is designed to contain child resources, but does not contain any child resource at the time the request is received. For a GET request to an existing empty container resource, a typical response contains a 200 OK response code and a payload body with an empty array.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "405": {
- "description": "404 NOT FOUND\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request or is not willing to disclose that one exists, it shall respond with this response code. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the source of the problem, e.g. a wrong resource URI variable.\nThis response code is not appropriate in case the resource addressed by the URI is a container resource which is designed to contain child resources, but does not contain any child resource at the time the request is received. For a GET request to an existing empty container resource, a typical response contains a 200 OK response code and a payload body with an empty array.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "406": {
- "description": "406 NOT ACCEPTABLE\nIf the \"Accept\" header does not contain at least one name of a content type that is acceptable to the API producer, the API producer shall respond with this response code. The \"ProblemDetails\" structure may be omitted.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "416": {
- "description": "416 RANGE NOT SATISFIABLE\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "500": {
- "description": "500 INTERNAL SERVER ERROR\nIf there is an application error not related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "503": {
- "description": "503 SERVICE UNAVAILABLE\nIf the API producer encounters an internal overload situation of itself or of a system it relies on, it should respond with this response code, following the provisions in IETF RFC 7231 for the use of the \"Retry-After\" HTTP header and for the alternative to refuse the connection. The \"ProblemDetails\" structure may be omitted.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- }
- }
- },
- "get": {
- "description": "Query Subscription Information\n\nThe GET method queries the list of active subscriptions of the functional block that invokes the method. It can be used e.g. for resynchronization after error situations.\n",
- "parameters": [
- {
- "name": "Accept",
- "description": "Content-Types that are acceptable for the response. Reference: IETF RFC 7231\n",
- "in": "header",
- "required": true,
- "type": "string"
- },
- {
- "name": "Authorization",
- "description": "The authorization token for the request. Reference: IETF RFC 7235\n",
- "in": "header",
- "required": false,
- "type": "string"
- },
- {
- "name": "filter",
- "description": "Attribute-based filtering expression according to clause 4.3.2. The VNFM shall support receiving this parameter as part of the URI query string. The NFVO may supply this parameter. All attribute names that appear in the PkgmSubscription and in data types referenced from it shall be supported by the VNFM in the filter expression.\n",
- "in": "query",
- "required": false,
- "type": "string"
- },
- {
- "name": "nextpage_opaque_marker",
- "description": "Marker to obtain the next page of a paged response. Shall be supported by the VNFM if the VNFM supports alternative 2 (paging) according to clause 4.7.2.1 for this resource.\n",
- "in": "query",
- "required": false,
- "type": "string"
- },
- {
- "name": "Version",
- "description": "Version of the API requested to use when responding to this request.\n",
- "in": "header",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "200 OK\nThe list of subscriptions was queried successfully. The representations body shall contain in an array the representations of all active subscriptions of the functional block that invokes the method , i.e. zero or more representations of VNF package Management subscriptions as defined in clause 10.5.2.4. If the VNFM supports alternative 2 (paging) according to clause 4.7.2.1 for this resource, inclusion of the Link HTTP header in this response shall follow the provisions in clause 4.7.2.3.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "Link": {
- "description": "Reference to other resources. Used for paging in the present document, see clause 4.7.2.1.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- }
- },
- "schema": {
- "type": "array",
- "items": {
- "description": "This type represents a subscription related to notifications about VNF package management.\n",
- "type": "object",
- "required": [
- "id",
- "callbackUri",
- "_links"
- ],
- "properties": {
- "id": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "filter": {
- "description": "This type represents a subscription filter related to notifications related to VNF package management. At a particular nesting level in the filter structure, the following applies: All attributes shall match in order for the filter to match (logical \"and\" between different filter attributes). If an attribute is an array, the attribute shall match if at least one of the values in the array matches (logical \"or\" between the values of one filter attribute).\n",
- "type": "object",
- "properties": {
- "notificationTypes": {
- "description": "Match particular notification types. Permitted values: - VnfPackageOnboardingNotification - VnfPackageChangeNotification The permitted values of the \"notificationTypes\" attribute are spelled exactly as the names of the notification types to facilitate automated code generation systems.\n",
- "type": "array",
- "items": {
- "type": "string",
- "enum": [
- "VnfPackageOnboardingNotification",
- "VnfPackageChangeNotification"
- ]
- }
- },
- "vnfProductsFromProviders": {
- "description": "If present, match VNF packages that contain VNF products from certain providers. The attributes \"vnfProductsFromProviders\", \"vnfdId\" and \"vnfPkgId\" are alternatives to reference to particular VNF packages in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "vnfProvider"
- ],
- "properties": {
- "vnfProvider": {
- "description": "Name of the VNF provider to match.\n",
- "type": "string"
- },
- "vnfProducts": {
- "description": "If present, match VNF packages that contain VNF products with certain product names, from one particular provider.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "vnfProductName"
- ],
- "properties": {
- "vnfProductName": {
- "description": "Name of the VNF product to match.\n",
- "type": "string"
- },
- "versions": {
- "description": "If present, match VNF packages that contain VNF products with certain versions and a certain product name, from one particular provider.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "vnfSoftwareVersion"
- ],
- "properties": {
- "vnfSoftwareVersion": {
- "description": "A Version.\n",
- "type": "string"
- },
- "vnfdVersions": {
- "description": "If present, match VNF packages that contain VNF products with certain VNFD versions, a certain software version and a certain product name, from one particular provider.\n",
- "type": "array",
- "items": {
- "description": "A Version.\n",
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "vnfdId": {
- "description": "Match VNF packages with a VNFD identifier listed in the attribute. The attributes \"vnfProductsFromProviders\", \"vnfdId\" and \"vnfPkgId\" are alternatives to reference to particular VNF packages in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n",
- "type": "array",
- "items": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- }
- },
- "vnfPkgId": {
- "description": "Match VNF packages with a package identifier listed in the attribute. May be present if the \"notificationTypes\" attribute contains the value \"VnfPackageChangeNotification\", and shall be absent otherwise. The attributes \"vnfProductsFromProviders\", \"vnfdId\" and \"vnfPkgId\" are alternatives to reference to particular VNF packages in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n",
- "type": "array",
- "items": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- }
- },
- "operationalState": {
- "description": "- ENABLED: The VNF package is enabled, i.e. it can be used for instantiation of new VNF instances.\n- DISABLED: The VNF package is disabled, i.e. it cannot be used for further VNF instantiation requests (unless and until the VNF package\n is re-enabled).\n",
- "type": "string",
- "enum": [
- "ENABLED",
- "DISABLED"
- ]
- },
- "usageState": {
- "description": "- IN_USE: VNF instances instantiated from this VNF package exist. - NOT_IN_USE: No existing VNF instance is instantiated from this VNF package.\n"
- }
- }
- },
- "callbackUri": {
- "description": "String formatted according to IETF RFC 3986.\n",
- "type": "string"
- },
- "_links": {
- "description": "Links to resources related to this resource.\n",
- "type": "object",
- "required": [
- "self"
- ],
- "properties": {
- "self": {
- "description": "This type represents a link to a resource using an absolute URI. It shall comply with the provisions defined in table 4.4.1.3-1.\n",
- "type": "object",
- "required": [
- "href"
- ],
- "properties": {
- "href": {
- "description": "String formatted according to IETF RFC 3986.\n",
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "400": {
- "description": "400 BAD REQUEST\n400 code can be returned in the following specified cases, the specific cause has to be proper specified in the \"ProblemDetails\" structure to be returned.\nIf the request is malformed or syntactically incorrect (e.g. if the request URI contains incorrect query parameters or the payload body contains a syntactically incorrect data structure), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem.\nIf the response to a GET request which queries a container resource would be so big that the performance of the API producer is adversely affected, and the API producer does not support paging for the affected resource, it shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem.\nIf there is an application error related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\nIf the request contains a malformed access token, the API producer should respond with this response. The details of the error shall be returned in the WWW Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\nThe use of this HTTP error response code described above is applicable to the use of the OAuth 2.0 for the authorization of API requests and notifications, as defined in clauses 4.5.3.3 and 4.5.3.4.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "401": {
- "description": "401 UNAUTHORIZED\nIf the request contains no access token even though one is required, or if the request contains an authorization token that is invalid (e.g. expired or revoked), the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "403": {
- "description": "403 FORBIDDEN\nIf the API consumer is not allowed to perform a particular request to a particular resource, the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided. It should include in the \"detail\" attribute information about the source of the problem, and may indicate how to solve it.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "404": {
- "description": "404 NOT FOUND\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request or is not willing to disclose that one exists, it shall respond with this response code. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the source of the problem, e.g. a wrong resource URI variable.\nThis response code is not appropriate in case the resource addressed by the URI is a container resource which is designed to contain child resources, but does not contain any child resource at the time the request is received. For a GET request to an existing empty container resource, a typical response contains a 200 OK response code and a payload body with an empty array.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "405": {
- "description": "404 NOT FOUND\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request or is not willing to disclose that one exists, it shall respond with this response code. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the source of the problem, e.g. a wrong resource URI variable.\nThis response code is not appropriate in case the resource addressed by the URI is a container resource which is designed to contain child resources, but does not contain any child resource at the time the request is received. For a GET request to an existing empty container resource, a typical response contains a 200 OK response code and a payload body with an empty array.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "406": {
- "description": "406 NOT ACCEPTABLE\nIf the \"Accept\" header does not contain at least one name of a content type that is acceptable to the API producer, the API producer shall respond with this response code. The \"ProblemDetails\" structure may be omitted.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "416": {
- "description": "416 RANGE NOT SATISFIABLE\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "500": {
- "description": "500 INTERNAL SERVER ERROR\nIf there is an application error not related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "503": {
- "description": "503 SERVICE UNAVAILABLE\nIf the API producer encounters an internal overload situation of itself or of a system it relies on, it should respond with this response code, following the provisions in IETF RFC 7231 for the use of the \"Retry-After\" HTTP header and for the alternative to refuse the connection. The \"ProblemDetails\" structure may be omitted.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- }
- }
- }
- },
- "/subscriptions/{subscriptionId}": {
- "parameters": [
- {
- "name": "subscriptionId",
- "description": "Identifier of this subscription. This identifier can be retrieved from the resource referenced by the \"Location\" HTTP header in the response to a POST request creating a new subscription resource. It can also be retrieved from the \"id\" attribute in the payload body of that response.\n",
- "in": "path",
- "type": "string",
- "required": true
- }
- ],
- "get": {
- "description": "Query Subscription Information\n\nThe GET method reads an individual subscription.\n",
- "parameters": [
- {
- "name": "Accept",
- "description": "Content-Types that are acceptable for the response. Reference: IETF RFC 7231\n",
- "in": "header",
- "required": true,
- "type": "string"
- },
- {
- "name": "Authorization",
- "description": "The authorization token for the request. Reference: IETF RFC 7235\n",
- "in": "header",
- "required": false,
- "type": "string"
- },
- {
- "name": "Version",
- "description": "Version of the API requested to use when responding to this request.\n",
- "in": "header",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "200 OK\nRepresentation of the subscription resource.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "This type represents a subscription related to notifications about VNF package management.\n",
- "type": "object",
- "required": [
- "id",
- "callbackUri",
- "_links"
- ],
- "properties": {
- "id": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "filter": {
- "description": "This type represents a subscription filter related to notifications related to VNF package management. At a particular nesting level in the filter structure, the following applies: All attributes shall match in order for the filter to match (logical \"and\" between different filter attributes). If an attribute is an array, the attribute shall match if at least one of the values in the array matches (logical \"or\" between the values of one filter attribute).\n",
- "type": "object",
- "properties": {
- "notificationTypes": {
- "description": "Match particular notification types. Permitted values: - VnfPackageOnboardingNotification - VnfPackageChangeNotification The permitted values of the \"notificationTypes\" attribute are spelled exactly as the names of the notification types to facilitate automated code generation systems.\n",
- "type": "array",
- "items": {
- "type": "string",
- "enum": [
- "VnfPackageOnboardingNotification",
- "VnfPackageChangeNotification"
- ]
- }
- },
- "vnfProductsFromProviders": {
- "description": "If present, match VNF packages that contain VNF products from certain providers. The attributes \"vnfProductsFromProviders\", \"vnfdId\" and \"vnfPkgId\" are alternatives to reference to particular VNF packages in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "vnfProvider"
- ],
- "properties": {
- "vnfProvider": {
- "description": "Name of the VNF provider to match.\n",
- "type": "string"
- },
- "vnfProducts": {
- "description": "If present, match VNF packages that contain VNF products with certain product names, from one particular provider.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "vnfProductName"
- ],
- "properties": {
- "vnfProductName": {
- "description": "Name of the VNF product to match.\n",
- "type": "string"
- },
- "versions": {
- "description": "If present, match VNF packages that contain VNF products with certain versions and a certain product name, from one particular provider.\n",
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "vnfSoftwareVersion"
- ],
- "properties": {
- "vnfSoftwareVersion": {
- "description": "A Version.\n",
- "type": "string"
- },
- "vnfdVersions": {
- "description": "If present, match VNF packages that contain VNF products with certain VNFD versions, a certain software version and a certain product name, from one particular provider.\n",
- "type": "array",
- "items": {
- "description": "A Version.\n",
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "vnfdId": {
- "description": "Match VNF packages with a VNFD identifier listed in the attribute. The attributes \"vnfProductsFromProviders\", \"vnfdId\" and \"vnfPkgId\" are alternatives to reference to particular VNF packages in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n",
- "type": "array",
- "items": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- }
- },
- "vnfPkgId": {
- "description": "Match VNF packages with a package identifier listed in the attribute. May be present if the \"notificationTypes\" attribute contains the value \"VnfPackageChangeNotification\", and shall be absent otherwise. The attributes \"vnfProductsFromProviders\", \"vnfdId\" and \"vnfPkgId\" are alternatives to reference to particular VNF packages in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n",
- "type": "array",
- "items": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- }
- },
- "operationalState": {
- "description": "- ENABLED: The VNF package is enabled, i.e. it can be used for instantiation of new VNF instances.\n- DISABLED: The VNF package is disabled, i.e. it cannot be used for further VNF instantiation requests (unless and until the VNF package\n is re-enabled).\n",
- "type": "string",
- "enum": [
- "ENABLED",
- "DISABLED"
- ]
- },
- "usageState": {
- "description": "- IN_USE: VNF instances instantiated from this VNF package exist. - NOT_IN_USE: No existing VNF instance is instantiated from this VNF package.\n"
- }
- }
- },
- "callbackUri": {
- "description": "String formatted according to IETF RFC 3986.\n",
- "type": "string"
- },
- "_links": {
- "description": "Links to resources related to this resource.\n",
- "type": "object",
- "required": [
- "self"
- ],
- "properties": {
- "self": {
- "description": "This type represents a link to a resource using an absolute URI. It shall comply with the provisions defined in table 4.4.1.3-1.\n",
- "type": "object",
- "required": [
- "href"
- ],
- "properties": {
- "href": {
- "description": "String formatted according to IETF RFC 3986.\n",
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- },
- "400": {
- "description": "400 BAD REQUEST\n400 code can be returned in the following specified cases, the specific cause has to be proper specified in the \"ProblemDetails\" structure to be returned.\nIf the request is malformed or syntactically incorrect (e.g. if the request URI contains incorrect query parameters or the payload body contains a syntactically incorrect data structure), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem.\nIf the response to a GET request which queries a container resource would be so big that the performance of the API producer is adversely affected, and the API producer does not support paging for the affected resource, it shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem.\nIf there is an application error related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\nIf the request contains a malformed access token, the API producer should respond with this response. The details of the error shall be returned in the WWW Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\nThe use of this HTTP error response code described above is applicable to the use of the OAuth 2.0 for the authorization of API requests and notifications, as defined in clauses 4.5.3.3 and 4.5.3.4.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "401": {
- "description": "401 UNAUTHORIZED\nIf the request contains no access token even though one is required, or if the request contains an authorization token that is invalid (e.g. expired or revoked), the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "403": {
- "description": "403 FORBIDDEN\nIf the API consumer is not allowed to perform a particular request to a particular resource, the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided. It should include in the \"detail\" attribute information about the source of the problem, and may indicate how to solve it.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "404": {
- "description": "404 NOT FOUND\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request or is not willing to disclose that one exists, it shall respond with this response code. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the source of the problem, e.g. a wrong resource URI variable.\nThis response code is not appropriate in case the resource addressed by the URI is a container resource which is designed to contain child resources, but does not contain any child resource at the time the request is received. For a GET request to an existing empty container resource, a typical response contains a 200 OK response code and a payload body with an empty array.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "405": {
- "description": "404 NOT FOUND\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request or is not willing to disclose that one exists, it shall respond with this response code. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the source of the problem, e.g. a wrong resource URI variable.\nThis response code is not appropriate in case the resource addressed by the URI is a container resource which is designed to contain child resources, but does not contain any child resource at the time the request is received. For a GET request to an existing empty container resource, a typical response contains a 200 OK response code and a payload body with an empty array.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "406": {
- "description": "406 NOT ACCEPTABLE\nIf the \"Accept\" header does not contain at least one name of a content type that is acceptable to the API producer, the API producer shall respond with this response code. The \"ProblemDetails\" structure may be omitted.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "416": {
- "description": "416 RANGE NOT SATISFIABLE\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "500": {
- "description": "500 INTERNAL SERVER ERROR\nIf there is an application error not related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "503": {
- "description": "503 SERVICE UNAVAILABLE\nIf the API producer encounters an internal overload situation of itself or of a system it relies on, it should respond with this response code, following the provisions in IETF RFC 7231 for the use of the \"Retry-After\" HTTP header and for the alternative to refuse the connection. The \"ProblemDetails\" structure may be omitted.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- }
- }
- },
- "delete": {
- "description": "Terminate subscription\n\nThe DELETE method terminates an individual subscription.\n",
- "parameters": [
- {
- "name": "Authorization",
- "description": "The authorization token for the request. Reference: IETF RFC 7235\n",
- "in": "header",
- "required": false,
- "type": "string"
- },
- {
- "name": "Version",
- "description": "Version of the API requested to use when responding to this request.\n",
- "in": "header",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "204": {
- "description": "204 NO CONTENT\nThe subscription resource was deleted successfully.\n",
- "headers": {
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- }
- },
- "400": {
- "description": "400 BAD REQUEST\n400 code can be returned in the following specified cases, the specific cause has to be proper specified in the \"ProblemDetails\" structure to be returned.\nIf the request is malformed or syntactically incorrect (e.g. if the request URI contains incorrect query parameters or the payload body contains a syntactically incorrect data structure), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem.\nIf the response to a GET request which queries a container resource would be so big that the performance of the API producer is adversely affected, and the API producer does not support paging for the affected resource, it shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem.\nIf there is an application error related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\nIf the request contains a malformed access token, the API producer should respond with this response. The details of the error shall be returned in the WWW Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\nThe use of this HTTP error response code described above is applicable to the use of the OAuth 2.0 for the authorization of API requests and notifications, as defined in clauses 4.5.3.3 and 4.5.3.4.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "401": {
- "description": "401 UNAUTHORIZED\nIf the request contains no access token even though one is required, or if the request contains an authorization token that is invalid (e.g. expired or revoked), the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "403": {
- "description": "403 FORBIDDEN\nIf the API consumer is not allowed to perform a particular request to a particular resource, the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided. It should include in the \"detail\" attribute information about the source of the problem, and may indicate how to solve it.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "404": {
- "description": "404 NOT FOUND\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request or is not willing to disclose that one exists, it shall respond with this response code. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the source of the problem, e.g. a wrong resource URI variable.\nThis response code is not appropriate in case the resource addressed by the URI is a container resource which is designed to contain child resources, but does not contain any child resource at the time the request is received. For a GET request to an existing empty container resource, a typical response contains a 200 OK response code and a payload body with an empty array.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "405": {
- "description": "404 NOT FOUND\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request or is not willing to disclose that one exists, it shall respond with this response code. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the source of the problem, e.g. a wrong resource URI variable.\nThis response code is not appropriate in case the resource addressed by the URI is a container resource which is designed to contain child resources, but does not contain any child resource at the time the request is received. For a GET request to an existing empty container resource, a typical response contains a 200 OK response code and a payload body with an empty array.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "406": {
- "description": "406 NOT ACCEPTABLE\nIf the \"Accept\" header does not contain at least one name of a content type that is acceptable to the API producer, the API producer shall respond with this response code. The \"ProblemDetails\" structure may be omitted.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "416": {
- "description": "416 RANGE NOT SATISFIABLE\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "500": {
- "description": "500 INTERNAL SERVER ERROR\nIf there is an application error not related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "503": {
- "description": "503 SERVICE UNAVAILABLE\nIf the API producer encounters an internal overload situation of itself or of a system it relies on, it should respond with this response code, following the provisions in IETF RFC 7231 for the use of the \"Retry-After\" HTTP header and for the alternative to refuse the connection. The \"ProblemDetails\" structure may be omitted.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": [
- "status",
- "detail"
- ],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- }
- }
- }
- }
- }
-} \ No newline at end of file
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-ext-clients/pom.xml b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-ext-clients/pom.xml
deleted file mode 100644
index 6554da3409..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-ext-clients/pom.xml
+++ /dev/null
@@ -1,192 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.onap.so.adapters</groupId>
- <artifactId>etsi-sol003-pkgm</artifactId>
- <version>1.7.1-SNAPSHOT</version>
- </parent>
- <artifactId>etsi-sol003-pkgm-ext-clients</artifactId>
- <name>ETSI SOL003 VNF Package Management Adapter Ext Clients</name>
- <build>
- <plugins>
- <plugin>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-codegen-maven-plugin</artifactId>
- <version>${version-swagger-codegen}</version>
- <executions>
- <execution>
- <id>etsicatalog-api</id>
- <goals>
- <goal>generate</goal>
- </goals>
- <configuration>
- <inputSpec>${basedir}/src/main/resources/ETSI-Catalog-API.json</inputSpec>
- <language>java</language>
- <library>okhttp-gson</library>
- <output>${project.build.directory}/generated-sources/etsicatalog</output>
- <apiPackage>org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.api</apiPackage>
- <modelPackage>org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model</modelPackage>
- <generateApiTests>false</generateApiTests>
- <generateModelTests>false</generateModelTests>
- <configOptions>
- <sourceFolder>src/gen/java/main</sourceFolder>
- <withXml>true</withXml>
- <useRxJava2>true</useRxJava2>
- <serializableModel>true</serializableModel>
- </configOptions>
- </configuration>
- </execution>
- <execution>
- <id>sol003-packagemanagement-notification-api</id>
- <goals>
- <goal>generate</goal>
- </goals>
- <configuration>
- <inputSpec>${basedir}/src/main/resources/SOL003-VNFPackageManagement-Notification-API.json</inputSpec>
- <language>java</language>
- <library>okhttp-gson</library>
- <output>${project.build.directory}/generated-sources/sol003-vnf-packagemanagement/notification</output>
- <apiPackage>org.onap.so.adapters.etsisol003adapter.pkgm.extclients.vnfm.notification.api</apiPackage>
- <modelPackage>org.onap.so.adapters.etsisol003adapter.pkgm.extclients.vnfm.notification.model</modelPackage>
- <generateApiTests>false</generateApiTests>
- <generateModelTests>false</generateModelTests>
- <configOptions>
- <sourceFolder>src/gen/java/main</sourceFolder>
- <withXml>true</withXml>
- <useRxJava2>true</useRxJava2>
- <serializableModel>true</serializableModel>
- <dateLibrary>java8-localdatetime</dateLibrary>
- </configOptions>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>add-source</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>${project.basedir}/target/generated-sources/sol003-vnf-packagemanagement/notification/src/gen/java/main</source>
- <source>${project.basedir}/target/generated-sources/etsicatalog/src/gen/java/main</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.eclipse.m2e</groupId>
- <artifactId>lifecycle-mapping</artifactId>
- <version>1.0.0</version>
- <configuration>
- <lifecycleMappingMetadata>
- <pluginExecutions>
- <pluginExecution>
- <pluginExecutionFilter>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-codegen-maven-plugin</artifactId>
- <goals>
- <goal>generate</goal>
- </goals>
- <versionRange>[2.2.0,)</versionRange>
- </pluginExecutionFilter>
- <action>
- <execute>
- <runOnIncremental>false</runOnIncremental>
- </execute>
- </action>
- </pluginExecution>
- </pluginExecutions>
- </lifecycleMappingMetadata>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
- <dependencies>
- <dependency>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-annotations</artifactId>
- <version>${swagger-core-version}</version>
- </dependency>
- <dependency>
- <groupId>com.squareup.retrofit2</groupId>
- <artifactId>converter-gson</artifactId>
- <version>${retrofit-version}</version>
- </dependency>
- <dependency>
- <groupId>com.squareup.retrofit2</groupId>
- <artifactId>retrofit</artifactId>
- <version>${retrofit-version}</version>
- </dependency>
- <dependency>
- <groupId>com.squareup.retrofit2</groupId>
- <artifactId>converter-scalars</artifactId>
- <version>${retrofit-version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.oltu.oauth2</groupId>
- <artifactId>org.apache.oltu.oauth2.client</artifactId>
- <version>${oltu-version}</version>
- </dependency>
- <dependency>
- <groupId>io.gsonfire</groupId>
- <artifactId>gson-fire</artifactId>
- <version>${gson-fire-version}</version>
- </dependency>
- <dependency>
- <groupId>org.threeten</groupId>
- <artifactId>threetenbp</artifactId>
- <version>${threetenbp-version}</version>
- </dependency>
- <dependency>
- <groupId>io.reactivex.rxjava2</groupId>
- <artifactId>rxjava</artifactId>
- </dependency>
- <dependency>
- <groupId>com.squareup.retrofit2</groupId>
- <artifactId>adapter-rxjava2</artifactId>
- <version>${retrofit-version}</version>
- </dependency>
- <dependency>
- <groupId>com.google.code.gson</groupId>
- <artifactId>gson</artifactId>
- </dependency>
- <dependency>
- <groupId>com.squareup.okio</groupId>
- <artifactId>okio</artifactId>
- <version>${okio-version}</version>
- </dependency>
- <dependency>
- <groupId>com.squareup.okhttp3</groupId>
- <artifactId>okhttp</artifactId>
- <version>${okhttp3-version}</version>
- </dependency>
- <dependency>
- <groupId>com.squareup.okhttp3</groupId>
- <artifactId>logging-interceptor</artifactId>
- <version>${okhttp3-version}</version>
- </dependency>
- <dependency>
- <groupId>com.squareup.okhttp</groupId>
- <artifactId>logging-interceptor</artifactId>
- <version>${okhttp-version}</version>
- </dependency>
- <dependency>
- <groupId>com.squareup.okhttp</groupId>
- <artifactId>okhttp</artifactId>
- <version>${okhttp-version}</version>
- </dependency>
- </dependencies>
-
-</project>
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-ext-clients/src/main/resources/ETSI-Catalog-API.json b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-ext-clients/src/main/resources/ETSI-Catalog-API.json
deleted file mode 100644
index 35a8c2bd3d..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-ext-clients/src/main/resources/ETSI-Catalog-API.json
+++ /dev/null
@@ -1,3121 +0,0 @@
-{
- "swagger": "2.0",
- "info": {
- "title": "Modeling etsicatalog API",
- "description": "\n\nThe `swagger-ui` view can be found [here](/api/catalog/v1/swagger).\nThe `ReDoc` view can be found [here](/api/catalog/v1/redoc).\nThe swagger YAML document can be found [here](/api/catalog/v1/swagger.yaml).\nThe swagger JSON document can be found [here](/api/catalog/v1/swagger.json).",
- "version": "v1"
- },
- "host": "127.0.0.1:8806",
- "schemes": ["http"],
- "basePath": "/",
- "consumes": ["application/json"],
- "produces": ["application/json"],
- "securityDefinitions": {
- "Basic": {
- "type": "basic"
- }
- },
- "security": [{
- "Basic": []
- }],
- "paths": {
- "/api/catalog/v1/callback_sample": {
- "get": {
- "operationId": "api_catalog_v1_callback_sample_list",
- "description": "Callback Sample.",
- "parameters": [],
- "responses": {
- "200": {
- "description": ""
- }
- },
- "tags": ["Sample interface"]
- },
- "parameters": []
- },
- "/api/catalog/v1/health_check": {
- "get": {
- "operationId": "api_catalog_v1_health_check_list",
- "description": "",
- "parameters": [],
- "responses": {
- "200": {
- "description": "Active"
- }
- },
- "tags": ["Health Check interface"]
- },
- "parameters": []
- },
- "/api/catalog/v1/jobs/{job_id}": {
- "get": {
- "operationId": "api_catalog_v1_jobs_read",
- "description": "Get job status",
- "parameters": [{
- "name": "job_id",
- "in": "query",
- "description": "job id",
- "type": "string"
- }, {
- "name": "responseId",
- "in": "query",
- "description": "response id",
- "type": "string"
- }],
- "responses": {
- "200": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/GetJobResponse"
- }
- },
- "500": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/PostJobResponseResult"
- }
- }
- },
- "tags": ["Catalog interface"]
- },
- "post": {
- "operationId": "api_catalog_v1_jobs_create",
- "description": "Update job status",
- "parameters": [{
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/PostJobRequest"
- }
- }, {
- "name": "job_id",
- "in": "query",
- "description": "job id",
- "type": "string"
- }],
- "responses": {
- "202": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/PostJobResponseResult"
- }
- },
- "500": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/PostJobResponseResult"
- }
- }
- },
- "tags": ["Catalog interface"]
- },
- "parameters": [{
- "name": "job_id",
- "in": "path",
- "required": true,
- "type": "string"
- }]
- },
- "/api/catalog/v1/mandb/{modelName}": {
- "get": {
- "operationId": "api_catalog_v1_mandb_read",
- "description": "",
- "parameters": [],
- "responses": {
- "200": {
- "description": ""
- }
- },
- "tags": ["Sample interface"]
- },
- "delete": {
- "operationId": "api_catalog_v1_mandb_delete",
- "description": "",
- "parameters": [],
- "responses": {
- "204": {
- "description": ""
- }
- },
- "tags": ["Sample interface"]
- },
- "parameters": [{
- "name": "modelName",
- "in": "path",
- "required": true,
- "type": "string"
- }]
- },
- "/api/catalog/v1/nspackages": {
- "get": {
- "operationId": "api_catalog_v1_nspackages_list",
- "description": "Query NS packages",
- "parameters": [],
- "responses": {
- "200": {
- "description": "",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/NsPackage"
- }
- }
- },
- "500": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/InternalErrorRequest"
- }
- }
- },
- "tags": ["Catalog interface"]
- },
- "post": {
- "operationId": "api_catalog_v1_nspackages_create",
- "description": "On distribute NS package",
- "parameters": [{
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/NsPackageDistributeRequest"
- }
- }],
- "responses": {
- "202": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/NsPackageDistributeResponse"
- }
- },
- "500": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/InternalErrorRequest"
- }
- }
- },
- "tags": ["Catalog interface"]
- },
- "parameters": []
- },
- "/api/catalog/v1/nspackages/{csarId}": {
- "get": {
- "operationId": "api_catalog_v1_nspackages_read",
- "description": "Query one NS package",
- "parameters": [{
- "name": "csarId",
- "in": "query",
- "description": "csarId",
- "type": "string"
- }],
- "responses": {
- "200": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/NsPackage"
- }
- },
- "500": {
- "description": "error message",
- "schema": {
- "type": "string"
- }
- }
- },
- "tags": ["Catalog interface"]
- },
- "delete": {
- "operationId": "api_catalog_v1_nspackages_delete",
- "description": "Delete one NS package",
- "parameters": [{
- "name": "csarId",
- "in": "query",
- "description": "csarId",
- "type": "string"
- }],
- "responses": {
- "200": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/NsPackageDistributeResponse"
- }
- },
- "500": {
- "description": "error message",
- "schema": {
- "type": "string"
- }
- }
- },
- "tags": ["Catalog interface"]
- },
- "parameters": [{
- "name": "csarId",
- "in": "path",
- "required": true,
- "type": "string"
- }]
- },
- "/api/catalog/v1/service_packages": {
- "get": {
- "operationId": "api_catalog_v1_service_packages_list",
- "description": "Query Service packages",
- "parameters": [],
- "responses": {
- "200": {
- "description": "",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/ServicePackage"
- }
- }
- },
- "500": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/InternalErrorRequest"
- }
- }
- },
- "tags": ["Catalog interface"]
- },
- "post": {
- "operationId": "api_catalog_v1_service_packages_create",
- "description": "On distribute Service package",
- "parameters": [{
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/ServicePackageDistributeRequest"
- }
- }],
- "responses": {
- "202": {
- "description": ""
- },
- "400": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/InternalErrorRequest"
- }
- },
- "500": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/InternalErrorRequest"
- }
- }
- },
- "tags": ["Catalog interface"]
- },
- "parameters": []
- },
- "/api/catalog/v1/service_packages/{csarId}": {
- "get": {
- "operationId": "api_catalog_v1_service_packages_read",
- "description": "Query one Service package",
- "parameters": [{
- "name": "csarId",
- "in": "query",
- "description": "csarId",
- "type": "string"
- }],
- "responses": {
- "200": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/ServicePackage"
- }
- },
- "404": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/InternalErrorRequest"
- }
- },
- "500": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/InternalErrorRequest"
- }
- }
- },
- "tags": ["Catalog interface"]
- },
- "delete": {
- "operationId": "api_catalog_v1_service_packages_delete",
- "description": "Delete one Service package",
- "parameters": [{
- "name": "csarId",
- "in": "query",
- "description": "csarId",
- "type": "string"
- }],
- "responses": {
- "204": {
- "description": ""
- },
- "404": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/InternalErrorRequest"
- }
- },
- "500": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/InternalErrorRequest"
- }
- }
- },
- "tags": ["Catalog interface"]
- },
- "parameters": [{
- "name": "csarId",
- "in": "path",
- "required": true,
- "type": "string"
- }]
- },
- "/api/catalog/v1/vnfpackages": {
- "get": {
- "operationId": "api_catalog_v1_vnfpackages_list",
- "description": "Query Nf packages",
- "parameters": [],
- "responses": {
- "200": {
- "description": "",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/NfPackage"
- }
- }
- },
- "500": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/InternalErrorRequest"
- }
- }
- },
- "tags": ["Catalog interface"]
- },
- "post": {
- "operationId": "api_catalog_v1_vnfpackages_create",
- "description": "On distribute Nf package",
- "parameters": [{
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/NfPackageDistributeRequest"
- }
- }],
- "responses": {
- "202": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/PostJobResponse"
- }
- },
- "500": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/InternalErrorRequest"
- }
- }
- },
- "tags": ["Catalog interface"]
- },
- "parameters": []
- },
- "/api/catalog/v1/vnfpackages/{csarId}": {
- "get": {
- "operationId": "api_catalog_v1_vnfpackages_read",
- "description": "Query one Nf package",
- "parameters": [{
- "name": "csarId",
- "in": "query",
- "description": "csarId",
- "type": "string"
- }],
- "responses": {
- "200": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/NfPackage"
- }
- },
- "500": {
- "description": "error message",
- "schema": {
- "type": "string"
- }
- }
- },
- "tags": ["Catalog interface"]
- },
- "delete": {
- "operationId": "api_catalog_v1_vnfpackages_delete",
- "description": "Delete one Nf package",
- "parameters": [{
- "name": "csarId",
- "in": "query",
- "description": "csarId",
- "type": "string"
- }],
- "responses": {
- "202": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/PostJobResponse"
- }
- },
- "500": {
- "description": "error message",
- "schema": {
- "type": "string"
- }
- }
- },
- "tags": ["Catalog interface"]
- },
- "parameters": [{
- "name": "csarId",
- "in": "path",
- "required": true,
- "type": "string"
- }]
- },
- "/api/nsd/v1/health_check": {
- "get": {
- "operationId": "api_nsd_v1_health_check_list",
- "description": "",
- "parameters": [],
- "responses": {
- "200": {
- "description": "Active"
- }
- },
- "tags": ["Health Check interface"]
- },
- "parameters": []
- },
- "/api/nsd/v1/ns_descriptors": {
- "get": {
- "operationId": "api_nsd_v1_ns_descriptors_list",
- "description": "Query multiple NSDs",
- "parameters": [],
- "responses": {
- "200": {
- "description": "",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/NsdInfo"
- }
- }
- },
- "500": {
- "description": "Internal error"
- }
- },
- "tags": ["NSD Management interface"]
- },
- "post": {
- "operationId": "api_nsd_v1_ns_descriptors_create",
- "description": "Create a NSD",
- "parameters": [{
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/CreateNsdInfoRequest"
- }
- }],
- "responses": {
- "201": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/NsdInfo"
- }
- },
- "500": {
- "description": "Internal error"
- }
- },
- "tags": ["NSD Management interface"]
- },
- "parameters": []
- },
- "/api/nsd/v1/ns_descriptors/{nsdInfoId}": {
- "get": {
- "operationId": "api_nsd_v1_ns_descriptors_read",
- "description": "Query a NSD",
- "parameters": [],
- "responses": {
- "200": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/NsdInfo"
- }
- },
- "404": {
- "description": "NSDs do not exist"
- },
- "500": {
- "description": "Internal error"
- }
- },
- "tags": ["NSD Management interface"]
- },
- "delete": {
- "operationId": "api_nsd_v1_ns_descriptors_delete",
- "description": "Delete a NSD",
- "parameters": [],
- "responses": {
- "204": {
- "description": "No content"
- },
- "500": {
- "description": "Internal error"
- }
- },
- "tags": ["NSD Management interface"]
- },
- "parameters": [{
- "name": "nsdInfoId",
- "in": "path",
- "required": true,
- "type": "string"
- }]
- },
- "/api/nsd/v1/ns_descriptors/{nsdInfoId}/nsd_content": {
- "get": {
- "operationId": "api_nsd_v1_ns_descriptors_nsd_content_list",
- "description": "Download NSD content",
- "parameters": [],
- "responses": {
- "204": {
- "description": "No content"
- },
- "404": {
- "description": "NSD does not exist."
- },
- "500": {
- "description": "Internal error"
- }
- },
- "tags": ["NSD Management interface"]
- },
- "put": {
- "operationId": "api_nsd_v1_ns_descriptors_nsd_content_update",
- "description": "Upload NSD content",
- "parameters": [],
- "responses": {
- "204": {
- "description": "PNFD file"
- },
- "500": {
- "description": "Internal error"
- }
- },
- "tags": ["NSD Management interface"]
- },
- "parameters": [{
- "name": "nsdInfoId",
- "in": "path",
- "required": true,
- "type": "string"
- }]
- },
- "/api/nsd/v1/pnf_descriptors": {
- "get": {
- "operationId": "api_nsd_v1_pnf_descriptors_list",
- "description": "Query multiple PNFDs",
- "parameters": [],
- "responses": {
- "200": {
- "description": "",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/PnfdInfo"
- }
- }
- },
- "500": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/SUBSCRIPTION_ProblemDetailsSerializer"
- }
- }
- },
- "tags": ["NSD Management interface"]
- },
- "post": {
- "operationId": "api_nsd_v1_pnf_descriptors_create",
- "description": "Create a PNFD",
- "parameters": [{
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/CreatePnfdInfoRequest"
- }
- }],
- "responses": {
- "201": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/PnfdInfo"
- }
- },
- "500": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/SUBSCRIPTION_ProblemDetailsSerializer"
- }
- }
- },
- "tags": ["NSD Management interface"]
- },
- "parameters": []
- },
- "/api/nsd/v1/pnf_descriptors/{pnfdInfoId}": {
- "get": {
- "operationId": "api_nsd_v1_pnf_descriptors_read",
- "description": "Query a PNFD",
- "parameters": [],
- "responses": {
- "200": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/PnfdInfo"
- }
- },
- "404": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/SUBSCRIPTION_ProblemDetailsSerializer"
- }
- },
- "500": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/SUBSCRIPTION_ProblemDetailsSerializer"
- }
- }
- },
- "tags": ["NSD Management interface"]
- },
- "delete": {
- "operationId": "api_nsd_v1_pnf_descriptors_delete",
- "description": "Delete a PNFD",
- "parameters": [],
- "responses": {
- "204": {
- "description": "No content"
- },
- "500": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/SUBSCRIPTION_ProblemDetailsSerializer"
- }
- }
- },
- "tags": ["NSD Management interface"]
- },
- "parameters": [{
- "name": "pnfdInfoId",
- "in": "path",
- "required": true,
- "type": "string"
- }]
- },
- "/api/nsd/v1/pnf_descriptors/{pnfdInfoId}/pnfd_content": {
- "get": {
- "operationId": "Fetch PNFD content",
- "description": "Fetch PNFD content",
- "parameters": [],
- "responses": {
- "200": {
- "description": "PNFD file",
- "schema": {
- "type": "string",
- "format": "binary"
- }
- },
- "404": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/SUBSCRIPTION_ProblemDetailsSerializer"
- }
- },
- "500": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/SUBSCRIPTION_ProblemDetailsSerializer"
- }
- }
- },
- "produces": ["application/octet-stream", "application/json"],
- "tags": ["NSD Management interface"]
- },
- "put": {
- "operationId": "api_nsd_v1_pnf_descriptors_pnfd_content_update",
- "description": "Upload PNFD content",
- "parameters": [],
- "responses": {
- "204": {
- "description": "No content"
- },
- "500": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/SUBSCRIPTION_ProblemDetailsSerializer"
- }
- }
- },
- "tags": ["NSD Management interface"]
- },
- "parameters": [{
- "name": "pnfdInfoId",
- "in": "path",
- "required": true,
- "type": "string"
- }]
- },
- "/api/nsd/v1/subscriptions": {
- "get": {
- "operationId": "api_nsd_v1_subscriptions_list",
- "description": "Query subscriptions for Nsd Management",
- "parameters": [],
- "responses": {
- "200": {
- "description": "",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/NsdmSubscription"
- }
- }
- },
- "400": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/SUBSCRIPTION_ProblemDetailsSerializer"
- }
- },
- "404": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/SUBSCRIPTION_ProblemDetailsSerializer"
- }
- },
- "500": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/SUBSCRIPTION_ProblemDetailsSerializer"
- }
- }
- },
- "tags": ["NSD Management interface"]
- },
- "post": {
- "operationId": "api_nsd_v1_subscriptions_create",
- "description": "Create Subscription for NSD Management",
- "parameters": [{
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/NsdmSubscriptionRequest"
- }
- }],
- "responses": {
- "201": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/NsdmSubscription"
- }
- },
- "303": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/SUBSCRIPTION_ProblemDetailsSerializer"
- }
- },
- "400": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/SUBSCRIPTION_ProblemDetailsSerializer"
- }
- },
- "500": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/SUBSCRIPTION_ProblemDetailsSerializer"
- }
- }
- },
- "tags": ["NSD Management interface"]
- },
- "parameters": []
- },
- "/api/nsd/v1/subscriptions/{subscriptionId}": {
- "get": {
- "operationId": "api_nsd_v1_subscriptions_read",
- "description": "Query subscriptions for Nsd Management",
- "parameters": [],
- "responses": {
- "200": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/NsdmSubscription"
- }
- },
- "400": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/SUBSCRIPTION_ProblemDetailsSerializer"
- }
- },
- "404": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/SUBSCRIPTION_ProblemDetailsSerializer"
- }
- },
- "500": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/SUBSCRIPTION_ProblemDetailsSerializer"
- }
- }
- },
- "tags": ["NSD Management interface"]
- },
- "delete": {
- "operationId": "api_nsd_v1_subscriptions_delete",
- "description": "Delete subscription for Nsd Management",
- "parameters": [],
- "responses": {
- "204": {
- "description": "No_Content"
- },
- "400": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/SUBSCRIPTION_ProblemDetailsSerializer"
- }
- },
- "404": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/SUBSCRIPTION_ProblemDetailsSerializer"
- }
- },
- "500": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/SUBSCRIPTION_ProblemDetailsSerializer"
- }
- }
- },
- "tags": ["NSD Management interface"]
- },
- "parameters": [{
- "name": "subscriptionId",
- "in": "path",
- "required": true,
- "type": "string"
- }]
- },
- "/api/parser/v1/health_check": {
- "get": {
- "operationId": "api_parser_v1_health_check_list",
- "description": "",
- "parameters": [],
- "responses": {
- "200": {
- "description": "Active"
- }
- },
- "tags": ["Health Check interface"]
- },
- "parameters": []
- },
- "/api/parser/v1/parser": {
- "post": {
- "operationId": "api_parser_v1_parser_create",
- "description": "Parse model(NS, Service, VNF, PNF)",
- "parameters": [{
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/ParseModelRequest"
- }
- }],
- "responses": {
- "202": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/ParseModelResponse"
- }
- },
- "500": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/InternalErrorRequest"
- }
- }
- },
- "tags": ["Parser interface"]
- },
- "parameters": []
- },
- "/api/parser/v1/parsernsd": {
- "post": {
- "operationId": "api_parser_v1_parsernsd_create",
- "description": "Parse NS model",
- "parameters": [{
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/ParseModelRequest"
- }
- }],
- "responses": {
- "202": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/ParseModelResponse"
- }
- },
- "500": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/InternalErrorRequest"
- }
- }
- },
- "tags": ["Parser interface"]
- },
- "parameters": []
- },
- "/api/parser/v1/parserpnfd": {
- "post": {
- "operationId": "api_parser_v1_parserpnfd_create",
- "description": "Parse PNF model",
- "parameters": [{
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/ParseModelRequest"
- }
- }],
- "responses": {
- "202": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/ParseModelResponse"
- }
- },
- "500": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/InternalErrorRequest"
- }
- }
- },
- "tags": ["Parser interface"]
- },
- "parameters": []
- },
- "/api/parser/v1/parservnfd": {
- "post": {
- "operationId": "api_parser_v1_parservnfd_create",
- "description": "Parse NF model",
- "parameters": [{
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/ParseModelRequest"
- }
- }],
- "responses": {
- "202": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/ParseModelResponse"
- }
- },
- "500": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/InternalErrorRequest"
- }
- }
- },
- "tags": ["Parser interface"]
- },
- "parameters": []
- },
- "/api/vnfpkgm/v1/health_check": {
- "get": {
- "operationId": "api_vnfpkgm_v1_health_check_list",
- "description": "",
- "parameters": [],
- "responses": {
- "200": {
- "description": "Active"
- }
- },
- "tags": ["Health Check interface"]
- },
- "parameters": []
- },
- "/api/vnfpkgm/v1/subscriptions": {
- "get": {
- "operationId": "api_vnfpkgm_v1_subscriptions_list",
- "description": "",
- "parameters": [],
- "responses": {
- "200": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/PkgmSubscription"
- }
- },
- "400": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/SUBSCRIPTION_ProblemDetailsSerializer"
- }
- },
- "500": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/SUBSCRIPTION_ProblemDetailsSerializer"
- }
- }
- },
- "tags": ["VNF Package Management interface"]
- },
- "post": {
- "operationId": "api_vnfpkgm_v1_subscriptions_create",
- "description": "",
- "parameters": [{
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/PkgmSubscriptionRequest"
- }
- }],
- "responses": {
- "201": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/PkgmSubscription"
- }
- },
- "400": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/SUBSCRIPTION_ProblemDetailsSerializer"
- }
- },
- "500": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/SUBSCRIPTION_ProblemDetailsSerializer"
- }
- }
- },
- "tags": ["VNF Package Management interface"]
- },
- "parameters": []
- },
- "/api/vnfpkgm/v1/subscriptions/{subscriptionId}": {
- "get": {
- "operationId": "api_vnfpkgm_v1_subscriptions_read",
- "description": "",
- "parameters": [],
- "responses": {
- "200": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/PkgmSubscription"
- }
- },
- "404": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/SUBSCRIPTION_ProblemDetailsSerializer"
- }
- },
- "500": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/SUBSCRIPTION_ProblemDetailsSerializer"
- }
- }
- },
- "tags": ["VNF Package Management interface"]
- },
- "delete": {
- "operationId": "api_vnfpkgm_v1_subscriptions_delete",
- "description": "",
- "parameters": [],
- "responses": {
- "204": {
- "description": ""
- },
- "404": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/SUBSCRIPTION_ProblemDetailsSerializer"
- }
- },
- "500": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/SUBSCRIPTION_ProblemDetailsSerializer"
- }
- }
- },
- "tags": ["VNF Package Management interface"]
- },
- "parameters": [{
- "name": "subscriptionId",
- "in": "path",
- "required": true,
- "type": "string"
- }]
- },
- "/api/vnfpkgm/v1/vnf_packages": {
- "get": {
- "operationId": "api_vnfpkgm_v1_vnf_packages_list",
- "description": "Query multiple VNF package resource",
- "parameters": [],
- "responses": {
- "200": {
- "description": "",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/VnfPkgInfo"
- }
- }
- },
- "500": {
- "description": "Internal error",
- "schema": {
- "type": "string"
- }
- }
- },
- "tags": ["VNF Package Management interface"]
- },
- "post": {
- "operationId": "api_vnfpkgm_v1_vnf_packages_create",
- "description": "Create an individual VNF package resource",
- "parameters": [{
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/CreateVnfPkgInfoRequest"
- }
- }],
- "responses": {
- "201": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/VnfPkgInfo"
- }
- },
- "400": {
- "description": "Bad Request",
- "schema": {
- "type": "string"
- }
- },
- "500": {
- "description": "Internal error",
- "schema": {
- "type": "string"
- }
- }
- },
- "tags": ["VNF Package Management interface"]
- },
- "parameters": []
- },
- "/api/vnfpkgm/v1/vnf_packages/{vnfPkgId}": {
- "get": {
- "operationId": "api_vnfpkgm_v1_vnf_packages_read",
- "description": "Query an individual VNF package resource",
- "parameters": [],
- "responses": {
- "200": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/VnfPkgInfo"
- }
- },
- "404": {
- "description": "VNF package does not exist",
- "schema": {
- "type": "string"
- }
- },
- "500": {
- "description": "Internal error",
- "schema": {
- "type": "string"
- }
- }
- },
- "tags": ["VNF Package Management interface"]
- },
- "delete": {
- "operationId": "api_vnfpkgm_v1_vnf_packages_delete",
- "description": "Delete an individual VNF package resource",
- "parameters": [],
- "responses": {
- "204": {
- "description": "No content"
- },
- "500": {
- "description": "Internal error",
- "schema": {
- "type": "string"
- }
- }
- },
- "tags": ["VNF Package Management interface"]
- },
- "parameters": [{
- "name": "vnfPkgId",
- "in": "path",
- "required": true,
- "type": "string"
- }]
- },
- "/api/vnfpkgm/v1/vnf_packages/{vnfPkgId}/artifacts/{artifactPath}": {
- "get": {
- "operationId": "api_vnfpkgm_v1_vnf_packages_artifacts_read",
- "description": "",
- "parameters": [],
- "responses": {
- "200": {
- "description": "Return the artifact file",
- "schema": {
- "type": "string",
- "format": "binary"
- }
- },
- "404": {
- "description": "Artifact not found",
- "schema": {
- "type": "string"
- }
- },
- "500": {
- "description": "Internal error",
- "schema": {
- "type": "string"
- }
- }
- },
- "produces": ["application/octet-stream", "application/json"],
- "tags": ["VNF Package Management interface"]
- },
- "parameters": [{
- "name": "artifactPath",
- "in": "path",
- "required": true,
- "type": "string"
- }, {
- "name": "vnfPkgId",
- "in": "path",
- "required": true,
- "type": "string"
- }]
- },
- "/api/vnfpkgm/v1/vnf_packages/{vnfPkgId}/package_content": {
- "get": {
- "operationId": "api_vnfpkgm_v1_vnf_packages_package_content_list",
- "description": "Fetch VNF package content",
- "parameters": [],
- "responses": {
- "200": {
- "description": "VNF package file",
- "schema": {
- "type": "string",
- "format": "binary"
- }
- },
- "404": {
- "description": "VNF package does not exist",
- "schema": {
- "type": "string"
- }
- },
- "500": {
- "description": "Internal error",
- "schema": {
- "type": "string"
- }
- }
- },
- "produces": ["application/octet-stream", "application/json"],
- "tags": ["VNF Package Management interface"]
- },
- "put": {
- "operationId": "api_vnfpkgm_v1_vnf_packages_package_content_update",
- "description": "Upload VNF package content",
- "parameters": [],
- "responses": {
- "202": {
- "description": "Successfully"
- },
- "500": {
- "description": "Internal error",
- "schema": {
- "type": "string"
- }
- }
- },
- "tags": ["VNF Package Management interface"]
- },
- "parameters": [{
- "name": "vnfPkgId",
- "in": "path",
- "required": true,
- "type": "string"
- }]
- },
- "/api/vnfpkgm/v1/vnf_packages/{vnfPkgId}/package_content/upload_from_uri": {
- "post": {
- "operationId": "api_vnfpkgm_v1_vnf_packages_package_content_upload_from_uri_create",
- "description": "Upload VNF package content from uri",
- "parameters": [{
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/UploadVnfPackageFromUriRequest"
- }
- }],
- "responses": {
- "202": {
- "description": "Successfully"
- },
- "400": {
- "description": "Bad Request",
- "schema": {
- "type": "string"
- }
- },
- "500": {
- "description": "Internal error",
- "schema": {
- "type": "string"
- }
- }
- },
- "tags": ["VNF Package Management interface"]
- },
- "parameters": [{
- "name": "vnfPkgId",
- "in": "path",
- "required": true,
- "type": "string"
- }]
- },
- "/api/vnfpkgm/v1/vnf_packages/{vnfPkgId}/vnfd": {
- "get": {
- "operationId": "VNFD of an on-boarded VNF package",
- "description": "Read VNFD of an on-boarded VNF package",
- "parameters": [],
- "responses": {
- "200": {
- "description": "VNFD of an on-boarded VNF package",
- "schema": {
- "type": "string",
- "format": "binary"
- }
- },
- "404": {
- "description": "VNF package does not exist",
- "schema": {
- "type": "string"
- }
- },
- "500": {
- "description": "Internal error",
- "schema": {
- "type": "string"
- }
- }
- },
- "produces": ["application/octet-stream", "application/json"],
- "tags": ["VNF Package Management interface"]
- },
- "parameters": [{
- "name": "vnfPkgId",
- "in": "path",
- "required": true,
- "type": "string"
- }]
- },
- "/samples/": {
- "get": {
- "operationId": "samples_list",
- "description": "List all samples.",
- "parameters": [],
- "responses": {
- "200": {
- "description": ""
- }
- },
- "tags": ["Sample interface"]
- },
- "parameters": []
- }
- },
- "definitions": {
- "JobResponseHistoryList": {
- "description": "Response History List",
- "type": "object",
- "properties": {
- "status": {
- "title": "Status",
- "description": "Status",
- "type": "string",
- "minLength": 1
- },
- "progress": {
- "title": "Progress",
- "description": "Job Progress",
- "type": "string",
- "minLength": 1
- },
- "statusDescription": {
- "title": "Statusdescription",
- "description": "Status Description",
- "type": "string",
- "minLength": 1
- },
- "errorCode": {
- "title": "Errorcode",
- "description": "Error Code",
- "type": "string",
- "minLength": 1,
- "x-nullable": true
- },
- "responseId": {
- "title": "Responseid",
- "description": "Response Id",
- "type": "string",
- "minLength": 1
- }
- }
- },
- "JobResponseDescriptor": {
- "title": "Responsedescriptor",
- "description": "Job Response Descriptor",
- "type": "object",
- "properties": {
- "status": {
- "title": "Status",
- "description": "Status",
- "type": "string",
- "minLength": 1
- },
- "progress": {
- "title": "Progress",
- "description": "Job Progress",
- "type": "string",
- "minLength": 1
- },
- "statusDescription": {
- "title": "Statusdescription",
- "description": "Status Description",
- "type": "string",
- "minLength": 1
- },
- "errorCode": {
- "title": "Errorcode",
- "description": "Error Code",
- "type": "string",
- "minLength": 1,
- "x-nullable": true
- },
- "responseId": {
- "title": "Responseid",
- "description": "Response Id",
- "type": "string",
- "minLength": 1
- },
- "responseHistoryList": {
- "description": "Response History List",
- "type": "array",
- "items": {
- "$ref": "#/definitions/JobResponseHistoryList"
- }
- }
- }
- },
- "GetJobResponse": {
- "type": "object",
- "properties": {
- "jobId": {
- "title": "Jobid",
- "description": "Job Id",
- "type": "string",
- "minLength": 1
- },
- "responseDescriptor": {
- "$ref": "#/definitions/JobResponseDescriptor"
- }
- }
- },
- "PostJobResponseResult": {
- "required": ["result"],
- "type": "object",
- "properties": {
- "result": {
- "title": "Result",
- "description": "Result",
- "type": "string",
- "minLength": 1
- },
- "msg": {
- "title": "Msg",
- "description": "Message",
- "type": "string",
- "minLength": 1
- }
- }
- },
- "PostJobRequest": {
- "type": "object",
- "properties": {
- "progress": {
- "title": "Progress",
- "description": "Job Progress",
- "type": "string",
- "minLength": 1
- },
- "desc": {
- "title": "Desc",
- "description": "Description",
- "type": "string",
- "minLength": 1
- },
- "errcode": {
- "title": "Errcode",
- "description": "Error Code",
- "type": "string",
- "minLength": 1
- }
- }
- },
- "NsPackageInfo": {
- "title": "Packageinfo",
- "description": "NS Package Info",
- "type": "object",
- "properties": {
- "nsdId": {
- "title": "Nsdid",
- "description": "NSD ID",
- "type": "string",
- "minLength": 1,
- "x-nullable": true
- },
- "nsPackageId": {
- "title": "Nspackageid",
- "description": "NS Package ID",
- "type": "string",
- "x-nullable": true
- },
- "nsdProvider": {
- "title": "Nsdprovider",
- "description": "NSD Provider",
- "type": "string",
- "x-nullable": true
- },
- "nsdVersion": {
- "title": "Nsdversion",
- "description": "NSD Version",
- "type": "string",
- "x-nullable": true
- },
- "csarName": {
- "title": "Csarname",
- "description": "CSAR name",
- "type": "string",
- "x-nullable": true
- },
- "nsdModel": {
- "title": "Nsdmodel",
- "description": "NSD Model",
- "type": "string",
- "x-nullable": true
- },
- "downloadUrl": {
- "title": "Downloadurl",
- "description": "URL to download NSD Model",
- "type": "string",
- "minLength": 1,
- "x-nullable": true
- }
- },
- "x-nullable": true
- },
- "NsPackage": {
- "type": "object",
- "properties": {
- "csarId": {
- "title": "Csarid",
- "description": "CSAR ID",
- "type": "string",
- "minLength": 1,
- "x-nullable": true
- },
- "packageInfo": {
- "$ref": "#/definitions/NsPackageInfo"
- }
- }
- },
- "InternalErrorRequest": {
- "required": ["error"],
- "type": "object",
- "properties": {
- "error": {
- "title": "Error",
- "description": "Error",
- "type": "string",
- "minLength": 1
- },
- "errorMessage": {
- "title": "Errormessage",
- "description": "Error Message",
- "type": "string",
- "minLength": 1
- }
- }
- },
- "NsPackageDistributeRequest": {
- "required": ["csarId"],
- "type": "object",
- "properties": {
- "csarId": {
- "title": "Csarid",
- "description": "csarId",
- "type": "string",
- "minLength": 1
- }
- }
- },
- "NsPackageDistributeResponse": {
- "required": ["status", "statusDescription", "errorCode"],
- "type": "object",
- "properties": {
- "status": {
- "title": "Status",
- "description": "status",
- "type": "string",
- "minLength": 1
- },
- "statusDescription": {
- "title": "Statusdescription",
- "description": "statusDescription",
- "type": "string",
- "minLength": 1
- },
- "errorCode": {
- "title": "Errorcode",
- "description": "errorCode",
- "type": "string",
- "minLength": 1
- }
- }
- },
- "ServicePackageInfo": {
- "title": "Packageinfo",
- "description": "Service Package Info",
- "type": "object",
- "properties": {
- "servicedId": {
- "title": "Servicedid",
- "description": "ServiceD ID",
- "type": "string",
- "minLength": 1,
- "x-nullable": true
- },
- "servicePackageId": {
- "title": "Servicepackageid",
- "description": "Service Package ID",
- "type": "string",
- "x-nullable": true
- },
- "servicedProvider": {
- "title": "Servicedprovider",
- "description": "ServiceD Provider",
- "type": "string",
- "x-nullable": true
- },
- "servicedVersion": {
- "title": "Servicedversion",
- "description": "ServiceD Version",
- "type": "string",
- "x-nullable": true
- },
- "csarName": {
- "title": "Csarname",
- "description": "CSAR name",
- "type": "string",
- "x-nullable": true
- },
- "servicedModel": {
- "title": "Servicedmodel",
- "description": "ServiceD Model",
- "type": "string",
- "x-nullable": true
- },
- "downloadUrl": {
- "title": "Downloadurl",
- "description": "URL to download ServiceD Model",
- "type": "string",
- "minLength": 1,
- "x-nullable": true
- }
- },
- "x-nullable": true
- },
- "ServicePackage": {
- "type": "object",
- "properties": {
- "csarId": {
- "title": "Csarid",
- "description": "CSAR ID",
- "type": "string",
- "minLength": 1,
- "x-nullable": true
- },
- "packageInfo": {
- "$ref": "#/definitions/ServicePackageInfo"
- }
- }
- },
- "ServicePackageDistributeRequest": {
- "required": ["csarId"],
- "type": "object",
- "properties": {
- "csarId": {
- "title": "Csarid",
- "description": "csarId",
- "type": "string",
- "minLength": 1
- }
- }
- },
- "NfPackageInfo": {
- "title": "Packageinfo",
- "description": "VNF Package Info",
- "required": ["vnfPackageId"],
- "type": "object",
- "properties": {
- "vnfdId": {
- "title": "Vnfdid",
- "description": "VNFD ID",
- "type": "string",
- "x-nullable": true
- },
- "vnfPackageId": {
- "title": "Vnfpackageid",
- "description": "VNF Package ID",
- "type": "string",
- "minLength": 1
- },
- "vnfdProvider": {
- "title": "Vnfdprovider",
- "description": "VNFD Provider",
- "type": "string",
- "x-nullable": true
- },
- "vnfdVersion": {
- "title": "Vnfdversion",
- "description": "VNFD Version",
- "type": "string",
- "x-nullable": true
- },
- "vnfVersion": {
- "title": "Vnfversion",
- "description": "VNF Version",
- "type": "string",
- "x-nullable": true
- },
- "csarName": {
- "title": "Csarname",
- "description": "CSAR Name",
- "type": "string",
- "x-nullable": true
- },
- "vnfdModel": {
- "title": "Vnfdmodel",
- "description": "VNFD Model",
- "type": "string",
- "x-nullable": true
- },
- "downloadUrl": {
- "title": "Downloadurl",
- "description": "URL to download VNFD Model",
- "type": "string",
- "x-nullable": true
- }
- }
- },
- "NfImageInfo": {
- "description": "Image Info",
- "required": ["index", "fileName", "imageId", "vimId", "vimUser", "tenant", "status"],
- "type": "object",
- "properties": {
- "index": {
- "title": "Index",
- "description": "Index of VNF Image",
- "type": "string",
- "minLength": 1
- },
- "fileName": {
- "title": "Filename",
- "description": "Image file name",
- "type": "string",
- "minLength": 1
- },
- "imageId": {
- "title": "Imageid",
- "description": "Image ID",
- "type": "string",
- "minLength": 1
- },
- "vimId": {
- "title": "Vimid",
- "description": "VIM ID",
- "type": "string",
- "minLength": 1
- },
- "vimUser": {
- "title": "Vimuser",
- "description": "User of VIM",
- "type": "string",
- "minLength": 1
- },
- "tenant": {
- "title": "Tenant",
- "description": "Tenant",
- "type": "string",
- "minLength": 1
- },
- "status": {
- "title": "Status",
- "description": "Status",
- "type": "string",
- "minLength": 1
- }
- }
- },
- "NfPackage": {
- "required": ["csarId", "packageInfo"],
- "type": "object",
- "properties": {
- "csarId": {
- "title": "Csarid",
- "description": "CSAR ID",
- "type": "string",
- "minLength": 1
- },
- "packageInfo": {
- "$ref": "#/definitions/NfPackageInfo"
- },
- "imageInfo": {
- "description": "Image Info",
- "type": "array",
- "items": {
- "$ref": "#/definitions/NfImageInfo"
- },
- "x-nullable": true
- }
- }
- },
- "NfPackageDistributeRequest": {
- "required": ["csarId"],
- "type": "object",
- "properties": {
- "csarId": {
- "title": "Csarid",
- "description": "CSAR ID",
- "type": "string",
- "minLength": 1
- },
- "vimIds": {
- "description": "A string for vimIds",
- "type": "array",
- "items": {
- "type": "string",
- "minLength": 1
- }
- },
- "labVimId": {
- "title": "Labvimid",
- "description": "A list of VIM IDs.",
- "type": "string"
- }
- }
- },
- "PostJobResponse": {
- "required": ["jobId"],
- "type": "object",
- "properties": {
- "jobId": {
- "title": "Jobid",
- "description": "jobId",
- "type": "string",
- "minLength": 1
- }
- }
- },
- "ProblemDetails": {
- "title": "Onboardingfailuredetails",
- "description": "Failure details of current onboarding procedure.It shall be present when the nsdOnboardingState attribute is CREATED and the uploading or processing fails in NFVO.",
- "required": ["title", "detail"],
- "type": "object",
- "properties": {
- "type": {
- "title": "Type",
- "description": "A URI reference according to IETF RFC 3986 [10] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".",
- "type": "string",
- "x-nullable": true
- },
- "title": {
- "title": "Title",
- "description": "The HTTP status code for this occurrence of the problem.",
- "type": "integer"
- },
- "detail": {
- "title": "Detail",
- "description": "A human-readable explanation specific to this occurrence of the problem.",
- "type": "string",
- "minLength": 1
- },
- "instance": {
- "title": "Instance",
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.",
- "type": "string",
- "x-nullable": true
- },
- "additional_attributes": {
- "title": "Additional attributes",
- "description": "Any number of additional attributes, as defined in a specification or by an implementation.",
- "type": "object",
- "additionalProperties": {
- "description": "Additional attribute",
- "type": "string"
- },
- "x-nullable": true
- }
- }
- },
- "UriLink": {
- "title": "Self",
- "description": "URI of this resource.",
- "required": ["href"],
- "type": "object",
- "properties": {
- "href": {
- "title": "Href",
- "description": "URI of the referenced resource",
- "type": "string",
- "minLength": 1
- }
- }
- },
- "NSD_LinkSerializer": {
- "title": " links",
- "description": "Links to resources related to this resource.",
- "required": ["self", "nsd_content"],
- "type": "object",
- "properties": {
- "self": {
- "$ref": "#/definitions/UriLink"
- },
- "nsd_content": {
- "$ref": "#/definitions/UriLink"
- }
- }
- },
- "NsdInfo": {
- "required": ["id", "nsdOnboardingState", "nsdOperationalState", "nsdUsageState", "_links"],
- "type": "object",
- "properties": {
- "id": {
- "title": "Id",
- "description": "Identifier of the onboarded individual NS descriptor resource.This identifier is allocated by the NFVO.",
- "type": "string",
- "minLength": 1
- },
- "nsdId": {
- "title": "Nsdid",
- "description": "This identifier, which is allocated by the NSD designer,identifies the NSD in a globally unique way.It is copied from the NSD content and shall be present after the NSD content is on-boarded.",
- "type": "string",
- "x-nullable": true
- },
- "nsdName": {
- "title": "Nsdname",
- "description": "Name of the onboarded NSD.This information is copied from the NSD content and shall be present after the NSD content is on-boarded.",
- "type": "string",
- "x-nullable": true
- },
- "nsdVersion": {
- "title": "Nsdversion",
- "description": "Version of the on-boarded NSD.This information is copied from the NSD content and shall be present after the NSD content is on-boarded.",
- "type": "string",
- "x-nullable": true
- },
- "nsdDesigner": {
- "title": "Nsddesigner",
- "description": "Designer of the on-boarded NSD.This information is copied from the NSD content and shall be present after the NSD content is on-boarded.",
- "type": "string",
- "x-nullable": true
- },
- "nsdInvariantId": {
- "title": "Nsdinvariantid",
- "description": "This identifier, which is allocated by the NSD designer,identifies an NSD in a version independent manner.This information is copied from the NSD content and shall be present after the NSD content is on-boarded.",
- "type": "string",
- "x-nullable": true
- },
- "vnfPkgIds": {
- "description": "Identifies the VNF package for the VNFD referenced by the on-boarded NS descriptor resource.",
- "type": "array",
- "items": {
- "description": "Identifier of the VNF package",
- "type": "string"
- },
- "x-nullable": true
- },
- "pnfdInfoIds": {
- "description": "Identifies the PnfdInfo element for the PNFD referenced by the on-boarded NS descriptor resource.",
- "type": "array",
- "items": {
- "description": "Identifier of the PnfdInfo element",
- "type": "string"
- },
- "x-nullable": true
- },
- "nestedNsdInfoIds": {
- "description": "Identifies the NsdInfo element for the nested NSD referenced by the on-boarded NS descriptor resource.",
- "type": "array",
- "items": {
- "description": "Identifier of the NsdInfo element",
- "type": "string"
- },
- "x-nullable": true
- },
- "nsdOnboardingState": {
- "title": "Nsdonboardingstate",
- "description": "Onboarding state of the individual NS descriptor resource.",
- "type": "string",
- "enum": ["CREATED", "UPLOADING", "PROCESSING", "ONBOARDED"]
- },
- "onboardingFailureDetails": {
- "$ref": "#/definitions/ProblemDetails"
- },
- "nsdOperationalState": {
- "title": "Nsdoperationalstate",
- "description": "Operational state of the individual NS descriptor resource.This attribute can be modified with the PATCH method.",
- "type": "string",
- "enum": ["ENABLED", "DISABLED"]
- },
- "nsdUsageState": {
- "title": "Nsdusagestate",
- "description": "Usage state of the individual NS descriptor resource.",
- "type": "string",
- "enum": ["IN_USE", "NOT_IN_USE"]
- },
- "userDefinedData": {
- "title": "Userdefineddata",
- "description": "User defined data for the individual NS descriptor resource.This attribute can be modified with the PATCH method.",
- "type": "object",
- "additionalProperties": {
- "description": "Key Value Pairs",
- "type": "string"
- },
- "x-nullable": true
- },
- "_links": {
- "$ref": "#/definitions/NSD_LinkSerializer"
- }
- }
- },
- "CreateNsdInfoRequest": {
- "type": "object",
- "properties": {
- "userDefinedData": {
- "title": "Userdefineddata",
- "description": "User-defined data for the NS descriptor resource to be created.It shall be present when the user defined data is set for the individual NS descriptor resource to be created.",
- "type": "object",
- "additionalProperties": {
- "description": "Key Value Pairs",
- "type": "string"
- },
- "x-nullable": true
- }
- }
- },
- "PNFD_LinkSerializer": {
- "title": " links",
- "description": "Links to resources related to this resource.",
- "required": ["self", "pnfd_content"],
- "type": "object",
- "properties": {
- "self": {
- "$ref": "#/definitions/UriLink"
- },
- "pnfd_content": {
- "$ref": "#/definitions/UriLink"
- }
- }
- },
- "PnfdInfo": {
- "required": ["id", "pnfdOnboardingState", "pnfdUsageState", "_links"],
- "type": "object",
- "properties": {
- "id": {
- "title": "Id",
- "description": "Identifier of the onboarded individual PNF descriptor resource. This identifier is allocated by the NFVO.",
- "type": "string",
- "minLength": 1
- },
- "pnfdId": {
- "title": "Pnfdid",
- "description": "This identifier, which is allocated by the PNFD designer, identifies the PNFD in a globally unique way. It is copied from the PNFD content and shall be present after the PNFD content is on-boarded.",
- "type": "string",
- "x-nullable": true
- },
- "pnfdName": {
- "title": "Pnfdname",
- "description": "Name of the onboarded PNFD. This information is copied from the PNFD content and shall be present after the PNFD content is on-boarded.",
- "type": "string",
- "x-nullable": true
- },
- "pnfdVersion": {
- "title": "Pnfdversion",
- "description": "Version of the on-boarded PNFD. This information is copied from the PNFD content and shall be present after the PNFD content is on-boarded.",
- "type": "string",
- "x-nullable": true
- },
- "pnfdProvider": {
- "title": "Pnfdprovider",
- "description": "Provider of the on-boarded PNFD. This information is copied from the PNFD content and shall be present after the PNFD content is on-boarded.",
- "type": "string",
- "x-nullable": true
- },
- "pnfdInvariantId": {
- "title": "Pnfdinvariantid",
- "description": "Identifies a PNFD in a version independent manner. This attribute is invariant across versions of PNFD.",
- "type": "string",
- "x-nullable": true
- },
- "pnfdOnboardingState": {
- "title": "Pnfdonboardingstate",
- "description": "Onboarding state of the individual PNF descriptor resource.",
- "type": "string",
- "enum": ["CREATED", "UPLOADING", "PROCESSING", "ONBOARDED"]
- },
- "onboardingFailureDetails": {
- "$ref": "#/definitions/ProblemDetails"
- },
- "pnfdUsageState": {
- "title": "Pnfdusagestate",
- "description": "Usage state of the individual PNF descriptor resource.",
- "type": "string",
- "enum": ["IN_USE", "NOT_IN_USE"]
- },
- "userDefinedData": {
- "title": "Userdefineddata",
- "description": "User defined data for the individual PNF descriptor resource. This attribute can be modified with the PATCH method.",
- "type": "object",
- "additionalProperties": {
- "description": "Key Value Pairs",
- "type": "string"
- },
- "x-nullable": true
- },
- "_links": {
- "$ref": "#/definitions/PNFD_LinkSerializer"
- }
- }
- },
- "SUBSCRIPTION_ProblemDetailsSerializer": {
- "required": ["status", "detail"],
- "type": "object",
- "properties": {
- "type": {
- "title": "Type",
- "description": "Type",
- "type": "string",
- "minLength": 1,
- "x-nullable": true
- },
- "title": {
- "title": "Title",
- "description": "Title",
- "type": "string",
- "minLength": 1,
- "x-nullable": true
- },
- "status": {
- "title": "Status",
- "description": "Status",
- "type": "integer"
- },
- "detail": {
- "title": "Detail",
- "description": "Detail",
- "type": "string",
- "minLength": 1
- },
- "instance": {
- "title": "Instance",
- "description": "Instance",
- "type": "string",
- "minLength": 1,
- "x-nullable": true
- },
- "additional_details": {
- "description": "Any number of additional attributes, as defined in a specification or by an implementation.",
- "type": "array",
- "items": {
- "type": "string"
- },
- "x-nullable": true
- }
- }
- },
- "CreatePnfdInfoRequest": {
- "type": "object",
- "properties": {
- "userDefinedData": {
- "title": "Userdefineddata",
- "description": "User-defined data for the PNF descriptor resource to be created.It shall be present when the user defined data is set for the individual PNF descriptor resource to be created.",
- "type": "object",
- "additionalProperties": {
- "description": "Key Value Pairs",
- "type": "string"
- },
- "x-nullable": true
- }
- }
- },
- "NsdmNotificationsFilter": {
- "title": "Filter",
- "description": "Filter settings for this subscription, to define the of all notifications this subscription relates to.",
- "type": "object",
- "properties": {
- "notificationTypes": {
- "description": "Match particular notification types",
- "type": "array",
- "items": {
- "type": "string",
- "enum": ["NsdOnBoardingNotification", "NsdOnboardingFailureNotification", "NsdChangeNotification", "NsdDeletionNotification", "PnfdOnBoardingNotification", "PnfdOnBoardingFailureNotification", "PnfdDeletionNotification"]
- }
- },
- "nsdInfoId": {
- "description": "Match NS packages with particular nsdInfoIds",
- "type": "array",
- "items": {
- "type": "string",
- "minLength": 1
- }
- },
- "nsdId": {
- "description": "Match NS Packages with particular nsdIds",
- "type": "array",
- "items": {
- "type": "string",
- "minLength": 1
- }
- },
- "nsdName": {
- "description": "Match NS Packages with particular nsdNames",
- "type": "array",
- "items": {
- "type": "string",
- "maxLength": 255,
- "minLength": 1
- }
- },
- "nsdVersion": {
- "description": "match NS packages that belong to certain nsdversion",
- "type": "array",
- "items": {
- "type": "string",
- "maxLength": 255,
- "minLength": 1
- }
- },
- "nsdInvariantId": {
- "description": "Match NS Packages with particular nsdInvariantIds",
- "type": "array",
- "items": {
- "type": "string",
- "minLength": 1
- }
- },
- "vnfPkgIds": {
- "description": "Match NS Packages that has VNF PackageIds",
- "type": "array",
- "items": {
- "type": "string",
- "minLength": 1
- }
- },
- "nestedNsdInfoIds": {
- "description": "Match NS Packages with particular nsdInvariantIds",
- "type": "array",
- "items": {
- "type": "string",
- "minLength": 1
- }
- },
- "nsdOnboardingState": {
- "description": "Match NS Packages with particular NS Onboarding State",
- "type": "array",
- "items": {
- "type": "string",
- "enum": ["CREATED", "UPLOADING", "PROCESSING", "ONBOARDED"]
- }
- },
- "nsdOperationalState": {
- "description": "Match NS Packages with particular NS Operational State",
- "type": "array",
- "items": {
- "type": "string",
- "enum": ["ENABLED", "DISABLED"]
- }
- },
- "nsdUsageState": {
- "description": "Match NS Packages with particular NS Usage State",
- "type": "array",
- "items": {
- "type": "string",
- "enum": ["IN_USE", "NOT_IN_USE"]
- }
- },
- "pnfdInfoIds": {
- "description": "Match PF packages with particular pnfdInfoIds",
- "type": "array",
- "items": {
- "type": "string",
- "minLength": 1
- }
- },
- "pnfdId": {
- "description": "Match PF packages with particular pnfdInfoIds",
- "type": "array",
- "items": {
- "type": "string",
- "minLength": 1
- }
- },
- "pnfdName": {
- "description": "Match PF Packages with particular pnfdNames",
- "type": "array",
- "items": {
- "type": "string",
- "maxLength": 255,
- "minLength": 1
- }
- },
- "pnfdVersion": {
- "description": "match PF packages that belong to certain pnfd version",
- "type": "array",
- "items": {
- "type": "string",
- "maxLength": 255,
- "minLength": 1
- }
- },
- "pnfdProvider": {
- "description": "Match PF Packages with particular pnfdProvider",
- "type": "array",
- "items": {
- "type": "string",
- "maxLength": 255,
- "minLength": 1
- }
- },
- "pnfdInvariantId": {
- "description": "Match PF Packages with particular pnfdInvariantIds",
- "type": "array",
- "items": {
- "type": "string",
- "minLength": 1
- }
- },
- "pnfdOnboardingState": {
- "description": "Match PF Packages with particular PNF Onboarding State ",
- "type": "array",
- "items": {
- "type": "string",
- "enum": ["CREATED", "UPLOADING", "PROCESSING", "ONBOARDED"]
- }
- },
- "pnfdUsageState": {
- "description": "Match PF Packages with particular PNF usage State",
- "type": "array",
- "items": {
- "type": "string",
- "enum": ["IN_USE", "NOT_IN_USE"]
- }
- }
- }
- },
- "NSDM_SUB_LinkSerializer": {
- "title": " links",
- "description": "Links to resources related to this resource.",
- "required": ["self"],
- "type": "object",
- "properties": {
- "self": {
- "$ref": "#/definitions/UriLink"
- }
- }
- },
- "NsdmSubscription": {
- "required": ["id", "callbackUri", "_links"],
- "type": "object",
- "properties": {
- "id": {
- "title": "Id",
- "description": "Identifier of this subscription resource.",
- "type": "string",
- "maxLength": 255,
- "minLength": 1
- },
- "callbackUri": {
- "title": "Callbackuri",
- "description": "The URI of the endpoint to send the notification to.",
- "type": "string",
- "maxLength": 255,
- "minLength": 1
- },
- "filter": {
- "$ref": "#/definitions/NsdmNotificationsFilter"
- },
- "_links": {
- "$ref": "#/definitions/NSDM_SUB_LinkSerializer"
- }
- }
- },
- "BasicAuth": {
- "title": "Paramsbasic",
- "description": "Parameters for authentication/authorization using BASIC.",
- "type": "object",
- "properties": {
- "userName": {
- "title": "Username",
- "description": "Username to be used in HTTP Basic authentication.",
- "type": "string",
- "maxLength": 255,
- "minLength": 1
- },
- "password": {
- "title": "Password",
- "description": "Password to be used in HTTP Basic authentication.",
- "type": "string",
- "maxLength": 255,
- "minLength": 1
- }
- }
- },
- "OAuthCredentials": {
- "title": "Paramsoauth2clientcredentials",
- "description": "Parameters for authentication/authorization using OAUTH2_CLIENT_CREDENTIALS.",
- "type": "object",
- "properties": {
- "clientId": {
- "title": "Clientid",
- "description": "Client identifier to be used in the access token request of the OAuth 2.0 client credentials grant type.",
- "type": "string",
- "maxLength": 255,
- "minLength": 1
- },
- "clientPassword": {
- "title": "Clientpassword",
- "description": "Client password to be used in the access token request of the OAuth 2.0 client credentials grant type.",
- "type": "string",
- "maxLength": 255,
- "minLength": 1
- },
- "tokenEndpoint": {
- "title": "Tokenendpoint",
- "description": "The token endpoint from which the access token can be obtained.",
- "type": "string",
- "maxLength": 255,
- "minLength": 1
- }
- }
- },
- "SubscriptionAuthentication": {
- "title": "Authentication",
- "description": "Authentication parameters to configure the use of Authorization when sending notifications corresponding to this subscription.",
- "required": ["authType"],
- "type": "object",
- "properties": {
- "authType": {
- "description": "Defines the types of Authentication / Authorization which the API consumer is willing to accept when receiving a notification.",
- "type": "array",
- "items": {
- "type": "string",
- "enum": ["BASIC", "OAUTH2_CLIENT_CREDENTIALS", "TLS_CERT"]
- }
- },
- "paramsBasic": {
- "$ref": "#/definitions/BasicAuth"
- },
- "paramsOauth2ClientCredentials": {
- "$ref": "#/definitions/OAuthCredentials"
- }
- }
- },
- "NsdmSubscriptionRequest": {
- "required": ["callbackUri"],
- "type": "object",
- "properties": {
- "callbackUri": {
- "title": "Callbackuri",
- "description": "The URI of the endpoint to send the notification to.",
- "type": "string",
- "minLength": 1
- },
- "filter": {
- "$ref": "#/definitions/NsdmNotificationsFilter"
- },
- "authentication": {
- "$ref": "#/definitions/SubscriptionAuthentication"
- }
- }
- },
- "ParseModelRequest": {
- "required": ["csarId"],
- "type": "object",
- "properties": {
- "csarId": {
- "title": "Csarid",
- "description": "CSAR ID",
- "type": "string",
- "minLength": 1
- },
- "packageType": {
- "title": "Packagetype",
- "description": "Package type: VNF, PNF, NS, Service",
- "type": "string",
- "minLength": 1
- },
- "inputs": {
- "title": "Inputs",
- "description": "Inputs",
- "type": "object"
- }
- }
- },
- "ParseModelResponse": {
- "required": ["model"],
- "type": "object",
- "properties": {
- "model": {
- "title": "Model",
- "description": "Model",
- "type": "object"
- }
- }
- },
- "VNF_SUBSCRIPTION_LINKSERIALIZER": {
- "title": "Self",
- "description": "URI of this resource.",
- "required": ["href"],
- "type": "object",
- "properties": {
- "href": {
- "title": "Href",
- "description": "URI of the referenced resource.",
- "type": "string",
- "minLength": 1
- }
- }
- },
- "LinkSelf": {
- "title": " links",
- "description": "Links to resources related to this resource.",
- "required": ["self"],
- "type": "object",
- "properties": {
- "self": {
- "$ref": "#/definitions/VNF_SUBSCRIPTION_LINKSERIALIZER"
- }
- }
- },
- "Version": {
- "required": ["vnfSoftwareVersion"],
- "type": "object",
- "properties": {
- "vnfSoftwareVersion": {
- "title": "Vnfsoftwareversion",
- "description": "VNF software version to match.",
- "type": "string",
- "maxLength": 255,
- "minLength": 1
- },
- "vnfdVersions": {
- "description": "Match VNF packages that contain VNF products with certain VNFD versions",
- "type": "array",
- "items": {
- "type": "string",
- "minLength": 1
- }
- }
- }
- },
- "vnfProducts": {
- "required": ["vnfProductName"],
- "type": "object",
- "properties": {
- "vnfProductName": {
- "title": "Vnfproductname",
- "description": "Name of the VNF product to match.",
- "type": "string",
- "maxLength": 255,
- "minLength": 1
- },
- "versions": {
- "description": "match VNF packages that contain VNF products with certain versions",
- "type": "array",
- "items": {
- "$ref": "#/definitions/Version"
- }
- }
- }
- },
- "vnfProductsProviders": {
- "required": ["vnfProvider"],
- "type": "object",
- "properties": {
- "vnfProvider": {
- "title": "Vnfprovider",
- "description": "Name of the VNFprovider to match.",
- "type": "string",
- "maxLength": 255,
- "minLength": 1
- },
- "vnfProducts": {
- "description": "match VNF packages that contain VNF products with certain product names, from one particular provider",
- "type": "array",
- "items": {
- "$ref": "#/definitions/vnfProducts"
- }
- }
- }
- },
- "PkgmNotificationsFilter": {
- "title": "Filter",
- "description": "Filter settings for this subscription, to define the subset of all notifications this subscription relates to",
- "type": "object",
- "properties": {
- "notificationTypes": {
- "description": "Match particular notification types",
- "type": "array",
- "items": {
- "type": "string",
- "enum": ["VnfPackageOnboardingNotification", "VnfPackageChangeNotification"]
- }
- },
- "vnfProductsFromProviders": {
- "description": "Match VNF packages that contain VNF products from certain providers.",
- "type": "array",
- "items": {
- "$ref": "#/definitions/vnfProductsProviders"
- }
- },
- "vnfdId": {
- "description": "Match VNF packages with a VNFD identifierlisted in the attribute",
- "type": "array",
- "items": {
- "type": "string",
- "minLength": 1
- }
- },
- "vnfPkgId": {
- "description": "Match VNF packages with a VNFD identifierlisted in the attribute",
- "type": "array",
- "items": {
- "type": "string",
- "minLength": 1
- }
- },
- "operationalState": {
- "description": "Operational state of the VNF package.",
- "type": "array",
- "items": {
- "type": "string",
- "enum": ["ENABLED", "DISABLED"]
- }
- },
- "usageState": {
- "description": "Operational state of the VNF package.",
- "type": "array",
- "items": {
- "type": "string",
- "enum": ["IN_USE", "NOT_IN_USE"]
- }
- }
- }
- },
- "PkgmSubscription": {
- "required": ["id", "callbackUri", "_links"],
- "type": "object",
- "properties": {
- "id": {
- "title": "Id",
- "description": "Identifier of this subscription resource.",
- "type": "string",
- "minLength": 1
- },
- "callbackUri": {
- "title": "Callbackuri",
- "description": "The URI of the endpoint to send the notification to.",
- "type": "string",
- "format": "uri",
- "minLength": 1
- },
- "_links": {
- "$ref": "#/definitions/LinkSelf"
- },
- "filter": {
- "$ref": "#/definitions/PkgmNotificationsFilter"
- }
- }
- },
- "PkgmSubscriptionRequest": {
- "required": ["callbackUri"],
- "type": "object",
- "properties": {
- "filter": {
- "$ref": "#/definitions/PkgmNotificationsFilter"
- },
- "callbackUri": {
- "title": "Callbackuri",
- "description": "Callback URI to sendthe notification",
- "type": "string",
- "format": "uri",
- "minLength": 1
- },
- "authentication": {
- "$ref": "#/definitions/SubscriptionAuthentication"
- }
- }
- },
- "Checksum": {
- "title": "Checksum",
- "description": "Checksum of the on-boarded VNF package.",
- "required": ["algorithm", "hash"],
- "type": "object",
- "properties": {
- "algorithm": {
- "title": "Algorithm",
- "description": "Name of the algorithm used to generate the checksum.",
- "type": "string",
- "minLength": 1
- },
- "hash": {
- "title": "Hash",
- "description": "The hexadecimal value of the checksum.",
- "type": "string",
- "minLength": 1
- }
- }
- },
- "VnfPackageSoftwareImageInfo": {
- "description": "Information about VNF package artifacts that are software images.",
- "required": ["id", "name", "provider", "version", "checksum", "containerFormat", "diskFormat", "createdAt", "minDisk", "minRam", "size", "imagePath"],
- "type": "object",
- "properties": {
- "id": {
- "title": "Id",
- "description": "Identifier of the software image.",
- "type": "string",
- "minLength": 1
- },
- "name": {
- "title": "Name",
- "description": "Name of the software image.",
- "type": "string",
- "minLength": 1
- },
- "provider": {
- "title": "Provider",
- "description": "Provider of the software image.",
- "type": "string",
- "minLength": 1
- },
- "version": {
- "title": "Version",
- "description": "Version of the software image.",
- "type": "string",
- "minLength": 1
- },
- "checksum": {
- "$ref": "#/definitions/Checksum"
- },
- "containerFormat": {
- "title": "Containerformat",
- "description": "terminationType: Indicates whether forceful or graceful termination is requested.",
- "type": "string",
- "enum": ["AKI", "AMI", "ARI", "BARE", "DOCKER", "OVA", "OVF"]
- },
- "diskFormat": {
- "title": "Diskformat",
- "description": "Disk format of a software image is the format of the underlying disk image.",
- "type": "string",
- "enum": ["AKI", "AMI", "ARI", "ISO", "QCOW2", "RAW", "VDI", "VHD", "VHDX", "VMDK"]
- },
- "createdAt": {
- "title": "Createdat",
- "description": "Time when this software image was created.",
- "type": "string",
- "format": "date-time"
- },
- "minDisk": {
- "title": "Mindisk",
- "description": "The minimal disk for this software image in bytes.",
- "type": "integer"
- },
- "minRam": {
- "title": "Minram",
- "description": "The minimal RAM for this software image in bytes.",
- "type": "integer"
- },
- "size": {
- "title": "Size",
- "description": "Size of this software image in bytes.",
- "type": "integer"
- },
- "userMetadata": {
- "title": "Usermetadata",
- "description": "User-defined data.",
- "type": "object",
- "additionalProperties": {
- "description": "KeyValue Pairs",
- "type": "string"
- },
- "x-nullable": true
- },
- "imagePath": {
- "title": "Imagepath",
- "description": "Path in the VNF package.",
- "type": "string",
- "minLength": 1
- }
- }
- },
- "VnfPackageArtifactInfo": {
- "description": "Information about VNF package artifacts contained in the VNF package that are not software images.",
- "required": ["artifactPath", "checksum"],
- "type": "object",
- "properties": {
- "artifactPath": {
- "title": "Artifactpath",
- "description": "Path in the VNF package.",
- "type": "string",
- "minLength": 1
- },
- "checksum": {
- "$ref": "#/definitions/Checksum"
- },
- "metadata": {
- "title": "Metadata",
- "description": "The metadata of the artifact that are available in the VNF package",
- "type": "object",
- "additionalProperties": {
- "description": "KeyValue Pairs",
- "type": "string"
- },
- "x-nullable": true
- }
- }
- },
- "VNF_PKGM_Link_Serializer": {
- "title": " links",
- "description": "Links to resources related to this resource.",
- "required": ["self", "packageContent"],
- "type": "object",
- "properties": {
- "self": {
- "$ref": "#/definitions/UriLink"
- },
- "vnfd": {
- "$ref": "#/definitions/UriLink"
- },
- "packageContent": {
- "$ref": "#/definitions/UriLink"
- }
- }
- },
- "VnfPkgInfo": {
- "required": ["id", "onboardingState", "operationalState", "usageState", "_links"],
- "type": "object",
- "properties": {
- "id": {
- "title": "Id",
- "description": "Identifier of the on-boarded VNF package.",
- "type": "string",
- "minLength": 1
- },
- "vnfdId": {
- "title": "Vnfdid",
- "description": "This identifier, which is managed by the VNF provider, identifies the VNF package and the VNFD in a globally unique way.",
- "type": "string",
- "x-nullable": true
- },
- "vnfProvider": {
- "title": "Vnfprovider",
- "description": "Provider of the VNF package and the VNFD.",
- "type": "string",
- "x-nullable": true
- },
- "vnfProductName": {
- "title": "Vnfproductname",
- "description": "Name to identify the VNF product.",
- "type": "string",
- "x-nullable": true
- },
- "vnfSoftwareVersion": {
- "title": "Vnfsoftwareversion",
- "description": "Software version of the VNF.",
- "type": "string",
- "x-nullable": true
- },
- "vnfdVersion": {
- "title": "Vnfdversion",
- "description": "The version of the VNvFD.",
- "type": "string",
- "x-nullable": true
- },
- "checksum": {
- "$ref": "#/definitions/Checksum"
- },
- "softwareImages": {
- "description": "Information about VNF package artifacts that are software images.",
- "type": "array",
- "items": {
- "$ref": "#/definitions/VnfPackageSoftwareImageInfo"
- },
- "x-nullable": true
- },
- "additionalArtifacts": {
- "description": "Information about VNF package artifacts contained in the VNF package that are not software images.",
- "type": "array",
- "items": {
- "$ref": "#/definitions/VnfPackageArtifactInfo"
- },
- "x-nullable": true
- },
- "onboardingState": {
- "title": "Onboardingstate",
- "description": "On-boarding state of the VNF package.",
- "type": "string",
- "enum": ["CREATED", "UPLOADING", "PROCESSING", "ONBOARDED"]
- },
- "operationalState": {
- "title": "Operationalstate",
- "description": "Operational state of the VNF package.",
- "type": "string",
- "enum": ["ENABLED", "DISABLED"]
- },
- "usageState": {
- "title": "Usagestate",
- "description": "Usage state of the VNF package.",
- "type": "string",
- "enum": ["IN_USE", "NOT_IN_USE"]
- },
- "userDefinedData": {
- "title": "Userdefineddata",
- "description": "User defined data for the VNF package.",
- "type": "object",
- "additionalProperties": {
- "description": "KeyValue Pairs",
- "type": "string"
- },
- "x-nullable": true
- },
- "_links": {
- "$ref": "#/definitions/VNF_PKGM_Link_Serializer"
- }
- }
- },
- "CreateVnfPkgInfoRequest": {
- "type": "object",
- "properties": {
- "userDefinedData": {
- "title": "Userdefineddata",
- "description": "User defined data for the VNF package.",
- "type": "object",
- "additionalProperties": {
- "description": "KeyValue Pairs",
- "type": "string"
- },
- "x-nullable": true
- }
- }
- },
- "UploadVnfPackageFromUriRequest": {
- "required": ["addressInformation"],
- "type": "object",
- "properties": {
- "addressInformation": {
- "title": "Addressinformation",
- "description": "Address information of the VNF package content.",
- "type": "string",
- "minLength": 1
- },
- "userName": {
- "title": "Username",
- "description": "User name to be used for authentication.",
- "type": "string",
- "minLength": 1
- },
- "password": {
- "title": "Password",
- "description": "Password to be used for authentication.",
- "type": "string",
- "minLength": 1
- }
- }
- }
- }
-} \ No newline at end of file
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-ext-clients/src/main/resources/SOL003-VNFPackageManagement-Notification-API.json b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-ext-clients/src/main/resources/SOL003-VNFPackageManagement-Notification-API.json
deleted file mode 100644
index 32e002f0e7..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/etsi-sol003-pkgm-ext-clients/src/main/resources/SOL003-VNFPackageManagement-Notification-API.json
+++ /dev/null
@@ -1,1778 +0,0 @@
-{
- "swagger": "2.0",
- "info": {
- "version": "1.2.0-impl:etsi.org:ETSI_NFV_OpenAPI:1",
- "title": "SOL003 - VNF Package Management Notification interface",
- "description": "SOL003 - VNF Package Management Notification interface\n\nIMPORTANT: Please note that this file might be not aligned to the current version of the ETSI Group Specification it refers to. In case of discrepancies the published ETSI Group Specification takes precedence.\n\nIn clause 4.3.2 of ETSI GS NFV-SOL 003 v2.4.1, an attribute-based filtering mechanism is defined. This mechanism is currently not included in the corresponding OpenAPI design for this GS version. Changes to the attribute-based filtering mechanism are being considered in v2.5.1 of this GS for inclusion in the corresponding future ETSI NFV OpenAPI design.\nPlease report bugs to https://forge.etsi.org/bugzilla/buglist.cgi?component=Nfv-Openapis&list_id=61&product=NFV&resolution=\n",
- "license": {
- "name": "ETSI Forge copyright notice",
- "url": "https://forge.etsi.org/etsi-forge-copyright-notice.txt"
- }
- },
- "externalDocs": {
- "description": "ETSI GS NFV-SOL 003 V2.5.1",
- "url": "https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/003/02.05.01_60/gs_nfv-sol003v020501p.pdf"
- },
- "basePath": "/callback/v1",
- "schemes": ["https"],
- "consumes": ["application/json"],
- "produces": ["application/json"],
- "paths": {
- "/URI-is-provided-by-the-client-when-creating-the-subscription-VnfPackageOnboardingNotification": {
- "post": {
- "description": "Notify\n\nThe POST method delivers a notification from the server to the client.\n",
- "parameters": [{
- "name": "VnfPackageOnboardingNotification",
- "description": "A notification about on-boarding of a VNF package.",
- "in": "body",
- "required": true,
- "schema": {
- "description": "This type represents a VNF package management notification, which informs the receiver that the onboarding process of a VNF package is complete and the package is ready for use. The notification shall be triggered by the NFVO when the \"onboardingState\" attribute of a new VNF package has changed to \"ONBOARDED\".\n",
- "type": "object",
- "required": ["id", "notificationType", "subscriptionId", "timeStamp", "vnfPkgId", "vnfdId", "_links"],
- "properties": {
- "id": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "notificationType": {
- "description": "Discriminator for the different notification types. Shall be set to \"VnfPackageOnboardingNotification\" for this notification type.\n",
- "type": "string",
- "enum": ["VnfPackageOnboardingNotification"]
- },
- "subscriptionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "timeStamp": {
- "description": "Date-time stamp. Representation: String formatted according to IETF RFC 3339.\n",
- "type": "string",
- "format": "date-time"
- },
- "vnfPkgId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vnfdId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "_links": {
- "description": "This type represents the links to resources that a VNF package management notification can contain.\n",
- "type": "object",
- "required": ["vnfPackage", "subscription"],
- "properties": {
- "vnfPackage": {
- "description": "This type represents a link to a resource in a notification, using an absolute or relative URI. It shall comply with the provisions defined in table 4.4.1.3a-1.\n",
- "type": "object",
- "required": ["href"],
- "properties": {
- "href": {
- "description": "String formatted according to IETF RFC 3986.\n",
- "type": "string"
- }
- }
- },
- "subscription": {
- "description": "This type represents a link to a resource in a notification, using an absolute or relative URI. It shall comply with the provisions defined in table 4.4.1.3a-1.\n",
- "type": "object",
- "required": ["href"],
- "properties": {
- "href": {
- "description": "String formatted according to IETF RFC 3986.\n",
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }, {
- "name": "Authorization",
- "description": "The authorization token for the request. Reference: IETF RFC 7235\n",
- "in": "header",
- "required": false,
- "type": "string"
- }, {
- "name": "Content-Type",
- "description": "The MIME type of the body of the request. Reference: IETF RFC 7231\n",
- "in": "header",
- "required": true,
- "type": "string"
- }, {
- "name": "Version",
- "description": "Version of the API requested to use when responding to this request.\n",
- "in": "header",
- "required": true,
- "type": "string"
- }],
- "responses": {
- "204": {
- "description": "204 NO CONTENT\nThe notification was delivered successfully.\n",
- "headers": {
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- }
- },
- "400": {
- "description": "400 BAD REQUEST\n400 code can be returned in the following specified cases, the specific cause has to be proper specified in the \"ProblemDetails\" structure to be returned.\nIf the request is malformed or syntactically incorrect (e.g. if the request URI contains incorrect query parameters or the payload body contains a syntactically incorrect data structure), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem.\nIf the response to a GET request which queries a container resource would be so big that the performance of the API producer is adversely affected, and the API producer does not support paging for the affected resource, it shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem.\nIf there is an application error related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\nIf the request contains a malformed access token, the API producer should respond with this response. The details of the error shall be returned in the WWW Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\nThe use of this HTTP error response code described above is applicable to the use of the OAuth 2.0 for the authorization of API requests and notifications, as defined in clauses 4.5.3.3 and 4.5.3.4.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "401": {
- "description": "401 UNAUTHORIZED\nIf the request contains no access token even though one is required, or if the request contains an authorization token that is invalid (e.g. expired or revoked), the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "403": {
- "description": "403 FORBIDDEN\nIf the API consumer is not allowed to perform a particular request to a particular resource, the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided. It should include in the \"detail\" attribute information about the source of the problem, and may indicate how to solve it.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "404": {
- "description": "404 NOT FOUND\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request or is not willing to disclose that one exists, it shall respond with this response code. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the source of the problem, e.g. a wrong resource URI variable.\nThis response code is not appropriate in case the resource addressed by the URI is a container resource which is designed to contain child resources, but does not contain any child resource at the time the request is received. For a GET request to an existing empty container resource, a typical response contains a 200 OK response code and a payload body with an empty array.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "406": {
- "description": "406 NOT ACCEPTABLE\nIf the \"Accept\" header does not contain at least one name of a content type that is acceptable to the API producer, the API producer shall respond with this response code. The \"ProblemDetails\" structure may be omitted.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "500": {
- "description": "500 INTERNAL SERVER ERROR\nIf there is an application error not related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "503": {
- "description": "503 SERVICE UNAVAILABLE\nIf the API producer encounters an internal overload situation of itself or of a system it relies on, it should respond with this response code, following the provisions in IETF RFC 7231 for the use of the \"Retry-After\" HTTP header and for the alternative to refuse the connection. The \"ProblemDetails\" structure may be omitted.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- }
- }
- },
- "get": {
- "description": "The GET method allows the server to test the notification endpoint that is provided by the client, e.g. during subscription.\n",
- "parameters": [{
- "name": "Authorization",
- "description": "The authorization token for the request. Reference: IETF RFC 7235\n",
- "in": "header",
- "required": false,
- "type": "string"
- }, {
- "name": "Version",
- "description": "Version of the API requested to use when responding to this request.\n",
- "in": "header",
- "required": true,
- "type": "string"
- }],
- "responses": {
- "204": {
- "description": "204 NO CONTENT\nThe notification endpoint was tested successfully. The response body shall be empty.\n",
- "headers": {
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- }
- },
- "400": {
- "description": "400 BAD REQUEST\n400 code can be returned in the following specified cases, the specific cause has to be proper specified in the \"ProblemDetails\" structure to be returned.\nIf the request is malformed or syntactically incorrect (e.g. if the request URI contains incorrect query parameters or the payload body contains a syntactically incorrect data structure), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem.\nIf the response to a GET request which queries a container resource would be so big that the performance of the API producer is adversely affected, and the API producer does not support paging for the affected resource, it shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem.\nIf there is an application error related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\nIf the request contains a malformed access token, the API producer should respond with this response. The details of the error shall be returned in the WWW Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\nThe use of this HTTP error response code described above is applicable to the use of the OAuth 2.0 for the authorization of API requests and notifications, as defined in clauses 4.5.3.3 and 4.5.3.4.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "401": {
- "description": "401 UNAUTHORIZED\nIf the request contains no access token even though one is required, or if the request contains an authorization token that is invalid (e.g. expired or revoked), the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "403": {
- "description": "403 FORBIDDEN\nIf the API consumer is not allowed to perform a particular request to a particular resource, the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided. It should include in the \"detail\" attribute information about the source of the problem, and may indicate how to solve it.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "404": {
- "description": "404 NOT FOUND\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request or is not willing to disclose that one exists, it shall respond with this response code. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the source of the problem, e.g. a wrong resource URI variable.\nThis response code is not appropriate in case the resource addressed by the URI is a container resource which is designed to contain child resources, but does not contain any child resource at the time the request is received. For a GET request to an existing empty container resource, a typical response contains a 200 OK response code and a payload body with an empty array.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "406": {
- "description": "406 NOT ACCEPTABLE\nIf the \"Accept\" header does not contain at least one name of a content type that is acceptable to the API producer, the API producer shall respond with this response code. The \"ProblemDetails\" structure may be omitted.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "500": {
- "description": "500 INTERNAL SERVER ERROR\nIf there is an application error not related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "503": {
- "description": "503 SERVICE UNAVAILABLE\nIf the API producer encounters an internal overload situation of itself or of a system it relies on, it should respond with this response code, following the provisions in IETF RFC 7231 for the use of the \"Retry-After\" HTTP header and for the alternative to refuse the connection. The \"ProblemDetails\" structure may be omitted.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- }
- }
- }
- },
- "/URI-is-provided-by-the-client-when-creating-the-subscription-VnfPackageChangeNotification": {
- "post": {
- "description": "Notify\n\nThe POST method delivers a notification from the server to the client.\n",
- "parameters": [{
- "name": "VnfPackageChangeNotification",
- "description": "A notification about changes of status in a VNF package.\n",
- "in": "body",
- "required": true,
- "schema": {
- "description": "This type represents a VNF package management notification, which informs the receiver of a change of the status in an on-boarded VNF package. Only changes in the \"operationalState\" attribute of an on-boarded VNF package and the deletion NF package will be reported. Changes in the \"usageState\" and \"onboardingState\" attributes are not reported. The notification shall be triggered by the NFVO when there is a change in the status of an onboarded VNF package, as follows: * The \"operationalState\" attribute of a VNF package has changed, and the \"onboardingState\" attribute of the package has the value \"ONBOARDED\"\n (i.e. the package has been onboarded previously).\n* The on-boarded VNF package has been deleted.\n",
- "type": "object",
- "required": ["id", "notificationType", "subscriptionId", "timeStamp", "vnfPkgId", "vnfdId", "changeType", "_links"],
- "properties": {
- "id": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "notificationType": {
- "description": "Discriminator for the different notification types. Shall be set to \"VnfPackageChangeNotification\" for this notification type.\n",
- "type": "string",
- "enum": ["VnfPackageChangeNotification"]
- },
- "subscriptionId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "timeStamp": {
- "description": "Date-time stamp. Representation: String formatted according to IETF RFC 3339.\n",
- "type": "string",
- "format": "date-time"
- },
- "vnfPkgId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "vnfdId": {
- "description": "An identifier with the intention of being globally unique.\n",
- "type": "string"
- },
- "changeType": {
- "description": "- OP_STATE_CHANGE: The \"operationalState\" attribute has been changed. - PKG_DELETE: The VNF package has been deleted.\n",
- "type": "string",
- "enum": ["OP_STATE_CHANGE", "PKG_DELETE"]
- },
- "operationalState": {
- "description": "- ENABLED: The VNF package is enabled, i.e. it can be used for instantiation of new VNF instances.\n- DISABLED: The VNF package is disabled, i.e. it cannot be used for further VNF instantiation requests (unless and until the VNF package\n is re-enabled).\n",
- "type": "string",
- "enum": ["ENABLED", "DISABLED"]
- },
- "_links": {
- "description": "This type represents the links to resources that a VNF package management notification can contain.\n",
- "type": "object",
- "required": ["vnfPackage", "subscription"],
- "properties": {
- "vnfPackage": {
- "description": "This type represents a link to a resource in a notification, using an absolute or relative URI. It shall comply with the provisions defined in table 4.4.1.3a-1.\n",
- "type": "object",
- "required": ["href"],
- "properties": {
- "href": {
- "description": "String formatted according to IETF RFC 3986.\n",
- "type": "string"
- }
- }
- },
- "subscription": {
- "description": "This type represents a link to a resource in a notification, using an absolute or relative URI. It shall comply with the provisions defined in table 4.4.1.3a-1.\n",
- "type": "object",
- "required": ["href"],
- "properties": {
- "href": {
- "description": "String formatted according to IETF RFC 3986.\n",
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }, {
- "name": "Authorization",
- "description": "The authorization token for the request. Reference: IETF RFC 7235\n",
- "in": "header",
- "required": false,
- "type": "string"
- }, {
- "name": "Content-Type",
- "description": "The MIME type of the body of the request. Reference: IETF RFC 7231\n",
- "in": "header",
- "required": true,
- "type": "string"
- }, {
- "name": "Version",
- "description": "Version of the API requested to use when responding to this request.\n",
- "in": "header",
- "required": true,
- "type": "string"
- }],
- "responses": {
- "204": {
- "description": "204 NO CONTENT\nThe notification was delivered successfully.\n",
- "headers": {
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- }
- },
- "400": {
- "description": "400 BAD REQUEST\n400 code can be returned in the following specified cases, the specific cause has to be proper specified in the \"ProblemDetails\" structure to be returned.\nIf the request is malformed or syntactically incorrect (e.g. if the request URI contains incorrect query parameters or the payload body contains a syntactically incorrect data structure), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem.\nIf the response to a GET request which queries a container resource would be so big that the performance of the API producer is adversely affected, and the API producer does not support paging for the affected resource, it shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem.\nIf there is an application error related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\nIf the request contains a malformed access token, the API producer should respond with this response. The details of the error shall be returned in the WWW Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\nThe use of this HTTP error response code described above is applicable to the use of the OAuth 2.0 for the authorization of API requests and notifications, as defined in clauses 4.5.3.3 and 4.5.3.4.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "401": {
- "description": "401 UNAUTHORIZED\nIf the request contains no access token even though one is required, or if the request contains an authorization token that is invalid (e.g. expired or revoked), the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "403": {
- "description": "403 FORBIDDEN\nIf the API consumer is not allowed to perform a particular request to a particular resource, the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided. It should include in the \"detail\" attribute information about the source of the problem, and may indicate how to solve it.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "404": {
- "description": "404 NOT FOUND\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request or is not willing to disclose that one exists, it shall respond with this response code. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the source of the problem, e.g. a wrong resource URI variable.\nThis response code is not appropriate in case the resource addressed by the URI is a container resource which is designed to contain child resources, but does not contain any child resource at the time the request is received. For a GET request to an existing empty container resource, a typical response contains a 200 OK response code and a payload body with an empty array.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "406": {
- "description": "406 NOT ACCEPTABLE\nIf the \"Accept\" header does not contain at least one name of a content type that is acceptable to the API producer, the API producer shall respond with this response code. The \"ProblemDetails\" structure may be omitted.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "500": {
- "description": "500 INTERNAL SERVER ERROR\nIf there is an application error not related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "503": {
- "description": "503 SERVICE UNAVAILABLE\nIf the API producer encounters an internal overload situation of itself or of a system it relies on, it should respond with this response code, following the provisions in IETF RFC 7231 for the use of the \"Retry-After\" HTTP header and for the alternative to refuse the connection. The \"ProblemDetails\" structure may be omitted.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- }
- }
- },
- "get": {
- "description": "The GET method allows the server to test the notification endpoint that is provided by the client, e.g. during subscription.\n",
- "parameters": [{
- "name": "Authorization",
- "description": "The authorization token for the request. Reference: IETF RFC 7235\n",
- "in": "header",
- "required": false,
- "type": "string"
- }, {
- "name": "Version",
- "description": "Version of the API requested to use when responding to this request.\n",
- "in": "header",
- "required": true,
- "type": "string"
- }],
- "responses": {
- "204": {
- "description": "204 NO CONTENT\nThe notification endpoint was tested successfully. The response body shall be empty.\n",
- "headers": {
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- }
- },
- "400": {
- "description": "400 BAD REQUEST\n400 code can be returned in the following specified cases, the specific cause has to be proper specified in the \"ProblemDetails\" structure to be returned.\nIf the request is malformed or syntactically incorrect (e.g. if the request URI contains incorrect query parameters or the payload body contains a syntactically incorrect data structure), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem.\nIf the response to a GET request which queries a container resource would be so big that the performance of the API producer is adversely affected, and the API producer does not support paging for the affected resource, it shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and should include in the \"detail\" attribute more information about the source of the problem.\nIf there is an application error related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\nIf the request contains a malformed access token, the API producer should respond with this response. The details of the error shall be returned in the WWW Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\nThe use of this HTTP error response code described above is applicable to the use of the OAuth 2.0 for the authorization of API requests and notifications, as defined in clauses 4.5.3.3 and 4.5.3.4.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "401": {
- "description": "401 UNAUTHORIZED\nIf the request contains no access token even though one is required, or if the request contains an authorization token that is invalid (e.g. expired or revoked), the API producer should respond with this response. The details of the error shall be returned in the WWW-Authenticate HTTP header, as defined in IETF RFC 6750 and IETF RFC 7235. The ProblemDetails structure may be provided.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "403": {
- "description": "403 FORBIDDEN\nIf the API consumer is not allowed to perform a particular request to a particular resource, the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided. It should include in the \"detail\" attribute information about the source of the problem, and may indicate how to solve it.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "404": {
- "description": "404 NOT FOUND\nIf the API producer did not find a current representation for the resource addressed by the URI passed in the request or is not willing to disclose that one exists, it shall respond with this response code. The \"ProblemDetails\" structure may be provided, including in the \"detail\" attribute information about the source of the problem, e.g. a wrong resource URI variable.\nThis response code is not appropriate in case the resource addressed by the URI is a container resource which is designed to contain child resources, but does not contain any child resource at the time the request is received. For a GET request to an existing empty container resource, a typical response contains a 200 OK response code and a payload body with an empty array.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "406": {
- "description": "406 NOT ACCEPTABLE\nIf the \"Accept\" header does not contain at least one name of a content type that is acceptable to the API producer, the API producer shall respond with this response code. The \"ProblemDetails\" structure may be omitted.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "500": {
- "description": "500 INTERNAL SERVER ERROR\nIf there is an application error not related to the client's input that cannot be easily mapped to any other HTTP response code (\"catch all error\"), the API producer shall respond with this response code. The \"ProblemDetails\" structure shall be provided, and shall include in the \"detail\" attribute more information about the source of the problem.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- },
- "503": {
- "description": "503 SERVICE UNAVAILABLE\nIf the API producer encounters an internal overload situation of itself or of a system it relies on, it should respond with this response code, following the provisions in IETF RFC 7231 for the use of the \"Retry-After\" HTTP header and for the alternative to refuse the connection. The \"ProblemDetails\" structure may be omitted.\n",
- "headers": {
- "Content-Type": {
- "description": "The MIME type of the body of the response.",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- },
- "WWW-Authenticate": {
- "description": "Challenge if the corresponding HTTP request has not provided authorization, or error details if the corresponding HTTP request has provided an invalid authorization token.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 0
- },
- "Version": {
- "description": "Version of the API used in the response.\n",
- "type": "string",
- "maximum": 1,
- "minimum": 1
- }
- },
- "schema": {
- "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced inthis structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n",
- "type": "object",
- "required": ["status", "detail"],
- "properties": {
- "type": {
- "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
- "type": "string",
- "format": "URI"
- },
- "title": {
- "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n",
- "type": "integer"
- },
- "detail": {
- "description": "A human-readable explanation specific to this occurrence of the problem.\n",
- "type": "string"
- },
- "instance": {
- "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
- "type": "string",
- "format": "URI"
- }
- }
- }
- }
- }
- }
- }
- }
-} \ No newline at end of file
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/pom.xml b/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/pom.xml
deleted file mode 100644
index 37f9e2efee..0000000000
--- a/adapters/etsi-sol003-adapter/etsi-sol003-pkgm/pom.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.onap.so.adapters</groupId>
- <artifactId>etsi-sol003-adapter</artifactId>
- <version>1.7.1-SNAPSHOT</version>
- </parent>
- <artifactId>etsi-sol003-pkgm</artifactId>
- <name>ETSI SOL003 VNF Package Management</name>
- <packaging>pom</packaging>
- <modules>
- <module>etsi-sol003-pkgm-api</module>
- <module>etsi-sol003-pkgm-ext-clients</module>
- <module>etsi-sol003-pkgm-adapter</module>
- </modules>
-</project> \ No newline at end of file
diff --git a/adapters/etsi-sol003-adapter/pom.xml b/adapters/etsi-sol003-adapter/pom.xml
deleted file mode 100644
index ceaaab42d0..0000000000
--- a/adapters/etsi-sol003-adapter/pom.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.onap.so</groupId>
- <artifactId>adapters</artifactId>
- <version>1.7.1-SNAPSHOT</version>
- </parent>
- <groupId>org.onap.so.adapters</groupId>
- <artifactId>etsi-sol003-adapter</artifactId>
- <name>ETSI SOL003 Adapter</name>
- <packaging>pom</packaging>
-
- <properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
- <version-swagger-codegen>2.3.1</version-swagger-codegen>
- <gson-fire-version>1.8.2</gson-fire-version>
- <retrofit-version>2.7.2</retrofit-version>
- <threetenbp-version>1.3.5</threetenbp-version>
- <oltu-version>1.0.1</oltu-version>
- <swagger-core-version>1.5.21</swagger-core-version>
- <okhttp3-version>3.14.0</okhttp3-version>
- <okhttp-version>2.7.5</okhttp-version>
- <okio-version>1.13.0</okio-version>
- <spring-security-oauth2-version>2.3.6.RELEASE</spring-security-oauth2-version>
- </properties>
-
- <modules>
- <module>etsi-sol003-adapter-common</module>
- <module>etsi-sol003-pkgm</module>
- <module>etsi-sol003-lcm</module>
- <module>etsi-sol003-adapter-application</module>
- </modules>
-</project>
diff --git a/adapters/mso-adapter-utils/pom.xml b/adapters/mso-adapter-utils/pom.xml
index 6c9c23a59b..3057b47ebd 100644
--- a/adapters/mso-adapter-utils/pom.xml
+++ b/adapters/mso-adapter-utils/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.onap.so</groupId>
<artifactId>adapters</artifactId>
- <version>1.7.1-SNAPSHOT</version>
+ <version>1.8.0-SNAPSHOT</version>
</parent>
<groupId>org.onap.so.adapters</groupId>
<artifactId>mso-adapter-utils</artifactId>
@@ -84,7 +84,7 @@
<dependency>
<groupId>ch.vorburger.mariaDB4j</groupId>
<artifactId>mariaDB4j</artifactId>
- <version>2.2.3</version>
+ <version>2.3.0</version>
<scope>test</scope>
</dependency>
<dependency>
diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java
index 1df5fe36ab..be42ff10bb 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java
@@ -212,7 +212,7 @@ public class MsoMulticloudUtils extends MsoHeatUtils implements VduPlugin {
if (response.hasEntity()) {
multicloudResponseBody = getCreateBody((java.io.InputStream) response.getEntity());
}
- if (response.getStatus() == Response.Status.CREATED.getStatusCode() && response.hasEntity()) {
+ if (response.getStatus() == Response.Status.CREATED.getStatusCode() && multicloudResponseBody != null) {
String canonicalName = stackName + "/";
if (multicloudResponseBody != null) {
canonicalName = canonicalName + multicloudResponseBody.getWorkloadId();
diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsTest.java
index f20f6f1448..5ee4987e38 100644
--- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsTest.java
+++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsTest.java
@@ -439,6 +439,7 @@ public class MsoHeatUtilsTest extends MsoHeatUtils {
String requestId = getRequestId();
doReturn(heatClient).when(heatUtils).getHeatClient(cloudSiteId, tenantId);
+ doNothing().when(heatUtils).saveStackRequest(eq(createStackParam), isNull(), eq("stackName"));
doReturn(stackResource).when(heatClient).getStacks();
doReturn(mockCreateStack).when(stackResource).create(createStackParam);
diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsWithUpdateTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsWithUpdateTest.java
index acd42dd8da..c6111a16cb 100644
--- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsWithUpdateTest.java
+++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsWithUpdateTest.java
@@ -95,7 +95,6 @@ public class MsoHeatUtilsWithUpdateTest extends TestDataSetup {
StackInfo expectedStackInfo = new StackInfo("stackName", HeatStatus.UPDATED, "stackStatusReason", null);
expectedStackInfo.setCanonicalName("stackName/id");
- doReturn(Optional.of(cloudSite)).when(cloudConfig).getCloudSite(isA(String.class));
doReturn(heatClient).when(heatUtils).getHeatClient(isA(String.class), isA(String.class));
doReturn(null).when(heatUtils).executeAndRecordOpenstackRequest(isA(OpenStackRequest.class));
doReturn("0").when(environment).getProperty(isA(String.class), isA(String.class));
@@ -120,7 +119,6 @@ public class MsoHeatUtilsWithUpdateTest extends TestDataSetup {
StackInfo expectedStackInfo = new StackInfo("stackName", HeatStatus.UPDATED, "stackStatusReason", null);
expectedStackInfo.setCanonicalName("stackName/id");
- doReturn(Optional.of(cloudSite)).when(cloudConfig).getCloudSite(isA(String.class));
doReturn(heatClient).when(heatUtils).getHeatClient(isA(String.class), isA(String.class));
doReturn(null).when(heatUtils).executeAndRecordOpenstackRequest(isA(OpenStackRequest.class));
@@ -147,7 +145,6 @@ public class MsoHeatUtilsWithUpdateTest extends TestDataSetup {
StackInfo expectedStackInfo = new StackInfo("stackName", HeatStatus.UPDATED, "stackStatusReason", null);
expectedStackInfo.setCanonicalName("stackName/id");
- doReturn(Optional.of(cloudSite)).when(cloudConfig).getCloudSite(isA(String.class));
doReturn(heatClient).when(heatUtils).getHeatClient(isA(String.class), isA(String.class));
doReturn(null).when(heatUtils).executeAndRecordOpenstackRequest(isA(OpenStackRequest.class));
doReturn("0").when(environment).getProperty(isA(String.class), isA(String.class));
diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoMulticloudUtilsTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoMulticloudUtilsTest.java
index 44a9bc3e10..7adfe091d3 100644
--- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoMulticloudUtilsTest.java
+++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoMulticloudUtilsTest.java
@@ -181,12 +181,12 @@ public class MsoMulticloudUtilsTest extends BaseTest {
@Test
public void createStackEmptyResponseEntity() throws MsoException {
- wireMockServer.stubFor(post(urlPathEqualTo(MULTICLOUD_CREATE_PATH)).willReturn(
- aResponse().withHeader("Content-Type", "application/json").withStatus(HttpStatus.SC_CREATED)));
+ wireMockServer.stubFor(post(urlPathEqualTo(MULTICLOUD_CREATE_PATH)).willReturn(aResponse()
+ .withHeader("Content-Type", "application/json").withStatus(HttpStatus.SC_CREATED).withBody("{}")));
StackInfo result = multicloudUtils.createStack("MTN14", "CloudOwner", "TEST-tenant", "TEST-stack",
new VduModelInfo(), "TEST-heat", new HashMap<>(), false, 200, "TEST-env", new HashMap<>(),
new HashMap<>(), false, false);
assertNotNull(result);
- assertEquals("TEST-stack/", result.getName());
+ assertEquals("TEST-stack", result.getName());
}
}
diff --git a/adapters/mso-adapters-rest-interface/pom.xml b/adapters/mso-adapters-rest-interface/pom.xml
index 9e86f41af3..015efd2c4b 100644
--- a/adapters/mso-adapters-rest-interface/pom.xml
+++ b/adapters/mso-adapters-rest-interface/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.onap.so</groupId>
<artifactId>adapters</artifactId>
- <version>1.7.1-SNAPSHOT</version>
+ <version>1.8.0-SNAPSHOT</version>
</parent>
<groupId>org.onap.so.adapters</groupId>
<artifactId>mso-adapters-rest-interface</artifactId>
diff --git a/adapters/mso-catalog-db-adapter/pom.xml b/adapters/mso-catalog-db-adapter/pom.xml
index 9b51e35c57..7ba222a86a 100644
--- a/adapters/mso-catalog-db-adapter/pom.xml
+++ b/adapters/mso-catalog-db-adapter/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.onap.so</groupId>
<artifactId>adapters</artifactId>
- <version>1.7.1-SNAPSHOT</version>
+ <version>1.8.0-SNAPSHOT</version>
</parent>
<groupId>org.onap.so.adapters</groupId>
@@ -185,7 +185,7 @@
<dependency>
<groupId>ch.vorburger.mariaDB4j</groupId>
<artifactId>mariaDB4j</artifactId>
- <version>2.2.3</version>
+ <version>2.3.0</version>
<scope>test</scope>
</dependency>
<dependency>
diff --git a/adapters/mso-catalog-db-adapter/src/main/java/db/migration/R__CloudConfigMigration.java b/adapters/mso-catalog-db-adapter/src/main/java/db/migration/R__CloudConfigMigration.java
index 691ae60afd..86cfa6ee0c 100644
--- a/adapters/mso-catalog-db-adapter/src/main/java/db/migration/R__CloudConfigMigration.java
+++ b/adapters/mso-catalog-db-adapter/src/main/java/db/migration/R__CloudConfigMigration.java
@@ -22,19 +22,6 @@
package db.migration;
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
-import org.flywaydb.core.api.MigrationVersion;
-import org.flywaydb.core.api.migration.MigrationChecksumProvider;
-import org.flywaydb.core.api.migration.MigrationInfoProvider;
-import org.flywaydb.core.api.migration.jdbc.JdbcMigration;
-import org.onap.so.db.catalog.beans.CloudIdentity;
-import org.onap.so.db.catalog.beans.CloudSite;
-import org.onap.so.db.catalog.beans.CloudifyManager;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
@@ -45,13 +32,24 @@ import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Collection;
+import org.flywaydb.core.api.MigrationVersion;
+import org.flywaydb.core.api.migration.BaseJavaMigration;
+import org.onap.so.db.catalog.beans.CloudIdentity;
+import org.onap.so.db.catalog.beans.CloudSite;
+import org.onap.so.db.catalog.beans.CloudifyManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
/**
* Performs migration using JDBC Connection from the cloud config provided in the environment
* (application-{profile}.yaml) and persist data (when not already present) to the catalod database.
*/
@JsonIgnoreProperties(ignoreUnknown = true)
-public class R__CloudConfigMigration implements JdbcMigration, MigrationInfoProvider, MigrationChecksumProvider {
+public class R__CloudConfigMigration extends BaseJavaMigration {
public static final String FLYWAY = "FLYWAY";
private static final Logger logger = LoggerFactory.getLogger(R__CloudConfigMigration.class);
@@ -63,7 +61,6 @@ public class R__CloudConfigMigration implements JdbcMigration, MigrationInfoProv
return false;
}
- @Override
public void migrate(Connection connection) throws Exception {
logger.debug("Starting migration for CloudConfig");
@@ -238,5 +235,11 @@ public class R__CloudConfigMigration implements JdbcMigration, MigrationInfoProv
public Integer getChecksum() {
return Math.toIntExact(System.currentTimeMillis() / 1000);
}
+
+ @Override
+ public void migrate(org.flywaydb.core.api.migration.Context context) throws Exception {
+ migrate(context.getConnection());
+
+ }
}
diff --git a/adapters/mso-cnf-adapter/pom.xml b/adapters/mso-cnf-adapter/pom.xml
deleted file mode 100644
index 8cfb2dc581..0000000000
--- a/adapters/mso-cnf-adapter/pom.xml
+++ /dev/null
@@ -1,153 +0,0 @@
-<!--
- ~*
- ~============LICENSE_START=======================================================
- ~* ONAP - SO
- ~*================================================================================
- ~* Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
- ~*================================================================================
- ~* Licensed under the Apache License, Version 2.0 (the "License");
- ~* you may not use this file except in compliance with the License.
- ~* You may obtain a copy of the License at
- ~*
- ~* http://www.apache.org/licenses/LICENSE-2.0
- ~*
- ~* Unless required by applicable law or agreed to in writing, software
- ~* distributed under the License is distributed on an "AS IS" BASIS,
- ~* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~* See the License for the specific language governing permissions and
- ~* limitations under the License.
- ~* ============LICENSE_END=========================================================
- ~*/
- -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.onap.so</groupId>
- <artifactId>adapters</artifactId>
- <version>1.7.1-SNAPSHOT</version>
- </parent>
- <groupId>org.onap.so.adapters</groupId>
- <artifactId>mso-cnf-adapter</artifactId>
- <packaging>jar</packaging>
- <name>mso-cnf-adapter</name>
- <description>Web service endpoint for cnf operations</description>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-dependencies</artifactId>
- <version>${springboot.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
- <build>
- <finalName>${project.artifactId}-${project.version}</finalName>
- <plugins>
- <plugin>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-maven-plugin</artifactId>
- <configuration>
- <mainClass>org.onap.so.adapters.cnf.MSOCnfApplication</mainClass>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>repackage</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.jacoco</groupId>
- <artifactId>jacoco-maven-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-actuator</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-web</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-jdbc</artifactId>
- <exclusions>
- <exclusion>
- <groupId>org.apache.tomcat</groupId>
- <artifactId>tomcat-jdbc</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-spring-boot-starter-jaxws</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-spring-boot-starter-jaxrs</artifactId>
- </dependency>
- <!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpmime -->
- <dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpmime</artifactId>
- </dependency>
- <!-- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-rs-service-description-swagger</artifactId>
- <version>${cxf.version}</version>
- </dependency> -->
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-data-jpa</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-test</artifactId>
- <scope>test</scope>
- </dependency>
- <!-- <dependency>
- <groupId>org.onap.so</groupId>
- <artifactId>mso-requests-db</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.so</groupId>
- <artifactId>mso-requests-db-repositories</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.mariadb.jdbc</groupId>
- <artifactId>mariadb-java-client</artifactId>
- </dependency>
- <dependency>
- <groupId>ch.vorburger.mariaDB4j</groupId>
- <artifactId>mariaDB4j</artifactId>
- <version>2.2.3</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-configuration-processor</artifactId>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>com.squareup.okhttp3</groupId>
- <artifactId>okhttp</artifactId>
- <version>3.14.0</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.projectlombok</groupId>
- <artifactId>lombok</artifactId>
- <version>1.18.2</version>
- </dependency> -->
- </dependencies>
-</project>
diff --git a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/MSOCnfApplication.java b/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/MSOCnfApplication.java
deleted file mode 100644
index 0ba40e2700..0000000000
--- a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/MSOCnfApplication.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.cnf;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
-import org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration;
-import org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration;
-import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
-import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ComponentScan;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.web.client.RestTemplate;
-
-@SpringBootApplication
-@ComponentScan(basePackages = {"org.onap.so.adapters.cnf"})
-@EnableAutoConfiguration(exclude = {LiquibaseAutoConfiguration.class, HibernateJpaAutoConfiguration.class,
- DataSourceAutoConfiguration.class, DataSourceTransactionManagerAutoConfiguration.class,
- SecurityAutoConfiguration.class})
-@Configuration
-public class MSOCnfApplication {
-
- public static void main(String... args) {
- SpringApplication.run(MSOCnfApplication.class, args);
- }
-
- @Bean
- public RestTemplate restTemplate() {
- return new RestTemplate();
- }
-}
diff --git a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/WebSecurityConfig.java b/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/WebSecurityConfig.java
deleted file mode 100644
index 03bfd54eef..0000000000
--- a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/WebSecurityConfig.java
+++ /dev/null
@@ -1,35 +0,0 @@
-
-package org.onap.so.adapters.cnf;
-/*
- * ============LICENSE_START==================================================== === ONAP - SO
- * ============================================================================= === Copyright (C) 2020 Huawei
- * Technologies Co., Ltd. All rights reserved.
- * ============================================================================= === Licensed under the Apache License,
- * Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- * ============LICENSE_END====================================================== ===
- *
- */
-
-import org.springframework.context.annotation.Configuration;
-import org.springframework.security.config.annotation.web.builders.HttpSecurity;
-import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
-import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
-
-@EnableWebSecurity
-
-@Configuration
-public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
-
- @Override
- protected void configure(HttpSecurity http) throws Exception {
- http.csrf().disable();
- }
-
-}
diff --git a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/exceptions/ApplicationException.java b/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/exceptions/ApplicationException.java
deleted file mode 100644
index c950cf6b2a..0000000000
--- a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/exceptions/ApplicationException.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.cnf.exceptions;
-
-import static org.onap.so.adapters.cnf.util.CNfAdapterUtil.marshal;
-import org.onap.so.adapters.cnf.model.ErrorResponse;
-import org.springframework.http.ResponseEntity;
-
-public class ApplicationException extends Exception {
-
- private static final long serialVersionUID = 1L;
-
- private int errorCode;
-
- private String errorMsg;
-
- public ApplicationException(int errorCode, String errorMsg) {
- this.errorCode = errorCode;
- this.errorMsg = errorMsg;
- }
-
- public int getErrorCode() {
- return errorCode;
- }
-
- public void setErrorCode(int errorCode) {
- this.errorCode = errorCode;
- }
-
- public String getErrorMsg() {
- return errorMsg;
- }
-
- public void setErrorMsg(String errorMsg) {
- this.errorMsg = errorMsg;
- }
-
- public ResponseEntity buildErrorResponse() {
- String message;
- try {
- ErrorResponse err = new ErrorResponse(errorCode, errorMsg);
- message = marshal(err);
- } catch (ApplicationException e) {
- return ResponseEntity.status(500).body("Internal Server Error");
- }
- return ResponseEntity.status(errorCode).body(message);
- }
-}
diff --git a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/BpmnInstanceRequest.java b/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/BpmnInstanceRequest.java
deleted file mode 100644
index 2e76d51da2..0000000000
--- a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/BpmnInstanceRequest.java
+++ /dev/null
@@ -1,87 +0,0 @@
-package org.onap.so.adapters.cnf.model;
-
-import java.util.Map;
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-@JsonIgnoreProperties(value = "true")
-public class BpmnInstanceRequest {
-
- @JsonProperty(value = "modelInvariantId")
- private String modelInvariantId;
-
- @JsonProperty(value = "modelVersionId")
- private String modelVersionId;
-
- @JsonProperty(value = "k8sRBProfileName")
- private String k8sRBProfileName;
-
- @JsonProperty(value = "cloudRegionId")
- private String cloudRegionId;
-
- @JsonProperty(value = "vfModuleUUID")
- private String vfModuleUUID;
-
- @JsonProperty(value = "labels")
- private Map<String, String> labels;
-
- @JsonProperty(value = "overrideValues")
- private Map<String, String> overrideValues;
-
- public String getModelInvariantId() {
- return modelInvariantId;
- }
-
- public void setModelInvariantId(String modelInvariantId) {
- this.modelInvariantId = modelInvariantId;
- }
-
- public String getModelVersionId() {
- return modelVersionId;
- }
-
- public void setModelVersionId(String modelVersionId) {
- this.modelVersionId = modelVersionId;
- }
-
- public String getK8sRBProfileName() {
- return k8sRBProfileName;
- }
-
- public void setK8sRBProfileName(String k8sRBProfileName) {
- this.k8sRBProfileName = k8sRBProfileName;
- }
-
- public String getCloudRegionId() {
- return cloudRegionId;
- }
-
- public void setCloudRegionId(String cloudRegionId) {
- this.cloudRegionId = cloudRegionId;
- }
-
- public String getVfModuleUUID() {
- return vfModuleUUID;
- }
-
- public void setVfModuleUUID(String vfModuleUUID) {
- this.vfModuleUUID = vfModuleUUID;
- }
-
- public Map<String, String> getLabels() {
- return labels;
- }
-
- public void setLabels(Map<String, String> labels) {
- this.labels = labels;
- }
-
- public Map<String, String> getOverrideValues() {
- return overrideValues;
- }
-
- public void setOverrideValues(Map<String, String> overrideValues) {
- this.overrideValues = overrideValues;
- }
-
-}
diff --git a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/Config.java b/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/Config.java
deleted file mode 100644
index b901a39706..0000000000
--- a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/Config.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package org.onap.so.adapters.cnf.model;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-@JsonIgnoreProperties(value = "true")
-public class Config {
-
- @JsonProperty(value = "config-version")
- private String configVersion;
-
- @JsonProperty(value = "config-tag")
- private String configTag;
-
- public Object getConfigVersion() {
- return configVersion;
- }
-
- public void setConfigVersion(String configVersion) {
- this.configVersion = configVersion;
- }
-
- public Object getConfigTag() {
- return configTag;
- }
-
- public void setConfigTag(String configTag) {
- this.configTag = configTag;
- }
-
-}
diff --git a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/ConfigTemplateEntity.java b/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/ConfigTemplateEntity.java
deleted file mode 100644
index 2ed35b865f..0000000000
--- a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/ConfigTemplateEntity.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package org.onap.so.adapters.cnf.model;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-@JsonIgnoreProperties(value = "true")
-public class ConfigTemplateEntity {
-
- @JsonProperty(value = "template-name")
- private String templateName;
-
- @JsonProperty(value = "description")
- private String description;
-
- @JsonProperty(value = "chart-name")
- private String chartName;
-
- public String getTemplateName() {
- return templateName;
- }
-
- public void setTemplateName(String templateName) {
- this.templateName = templateName;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public String getChartName() {
- return chartName;
- }
-
- public void setChartName(String chartName) {
- this.chartName = chartName;
- }
-
-}
diff --git a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/ConfigurationEntity.java b/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/ConfigurationEntity.java
deleted file mode 100644
index 7f6ae865e2..0000000000
--- a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/ConfigurationEntity.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package org.onap.so.adapters.cnf.model;
-
-import java.util.Map;
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-@JsonIgnoreProperties(value = "true")
-public class ConfigurationEntity {
-
- @JsonProperty(value = "template-name")
- private String templateName;
-
- @JsonProperty(value = "config-name")
- private String configName;
-
- @JsonProperty(value = "description")
- private String description;
-
- @JsonProperty(value = "values")
- private Map<String, Object> values;
-
- public String getTemplateName() {
- return templateName;
- }
-
- public void setTemplateName(String templateName) {
- this.templateName = templateName;
- }
-
- public String getConfigName() {
- return configName;
- }
-
- public void setConfigName(String configName) {
- this.configName = configName;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public Map<String, Object> getValues() {
- return values;
- }
-
- public void setValues(Map<String, Object> values) {
- this.values = values;
- }
-
-}
diff --git a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/ConfigurationRollbackEntity.java b/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/ConfigurationRollbackEntity.java
deleted file mode 100644
index bf78d9c049..0000000000
--- a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/ConfigurationRollbackEntity.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package org.onap.so.adapters.cnf.model;
-
-import java.util.List;
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-@JsonIgnoreProperties(value = "true")
-public class ConfigurationRollbackEntity {
-
- // TODO
- @JsonProperty(value = "anyOf")
- private List<Config> anyOf;
-
- public List<Config> getAnyOf() {
- return anyOf;
- }
-
- public void setAnyOf(List<Config> anyOf) {
- this.anyOf = anyOf;
- }
-
-}
diff --git a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/ConnectivityInfo.java b/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/ConnectivityInfo.java
deleted file mode 100644
index a2554d1618..0000000000
--- a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/ConnectivityInfo.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package org.onap.so.adapters.cnf.model;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-@JsonIgnoreProperties(value = "true")
-public class ConnectivityInfo {
-
- @JsonProperty(value = "cloud-region")
- private String cloudRegion;
-
- @JsonProperty(value = "cloud-owner")
- private String cloudOwner;
-
- @JsonProperty(value = "kubeconfig")
- private String kubeconfig;
-
- @JsonProperty(value = "other-connectivity-list")
- private OtherConnectivityListEntity otherConnectivityListEntity;
-
- public String getCloudRegion() {
- return cloudRegion;
- }
-
- public void setCloudRegion(String cloudRegion) {
- this.cloudRegion = cloudRegion;
- }
-
- public String getCloudOwner() {
- return cloudOwner;
- }
-
- public void setCloudOwner(String cloudOwner) {
- this.cloudOwner = cloudOwner;
- }
-
- public OtherConnectivityListEntity getOtherConnectivityListEntity() {
- return otherConnectivityListEntity;
- }
-
- public void setOtherConnectivityListEntity(OtherConnectivityListEntity otherConnectivityListEntity) {
- this.otherConnectivityListEntity = otherConnectivityListEntity;
- }
-
- public String getKubeconfig() {
- return kubeconfig;
- }
-
- public void setKubeconfig(String kubeconfig) {
- this.kubeconfig = kubeconfig;
- }
-
-}
diff --git a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/ConnectivityRecords.java b/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/ConnectivityRecords.java
deleted file mode 100644
index 06cfdf1602..0000000000
--- a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/ConnectivityRecords.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package org.onap.so.adapters.cnf.model;
-
-import java.util.Map;
-
-public class ConnectivityRecords {
-
- /*
- * private String connectivityRecordName; private String fQDNOrIP; private String caCertToVerifyServer; private
- * String sslInitiator; private String userName; private String password; private String privateKey; private String
- * certToPresent;
- */
-
- private Map<String, String> records;
-
- public Map<String, String> getRecords() {
- return records;
- }
-
- public void setRecords(Map<String, String> records) {
- this.records = records;
- }
-
-}
diff --git a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/ErrorResponse.java b/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/ErrorResponse.java
deleted file mode 100644
index 135adcc143..0000000000
--- a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/ErrorResponse.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.cnf.model;
-
-public class ErrorResponse {
-
- private int status;
-
- private String error;
-
- private String message;
-
- public ErrorResponse(int status, String message) {
- this.status = status;
- this.message = message;
- this.error = "Bad Request";
- }
-
- public int getStatus() {
- return status;
- }
-
- public void setStatus(int status) {
- this.status = status;
- }
-
- public String getError() {
- if (status == 500) {
- this.error = "Internal Server Error";
- }
- return error;
- }
-
- public void setError(String error) {
- this.error = error;
- }
-
- public String getMessage() {
- return message;
- }
-
- public void setMessage(String message) {
- this.message = message;
- }
-}
diff --git a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/GroupVersionKind.java b/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/GroupVersionKind.java
deleted file mode 100644
index bfa5505ccc..0000000000
--- a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/GroupVersionKind.java
+++ /dev/null
@@ -1,66 +0,0 @@
-
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.adapters.cnf.model;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({"Group", "Version", "Kind"})
-public class GroupVersionKind {
- @JsonProperty("Group")
- private String group;
- @JsonProperty("Version")
- private String version;
- @JsonProperty("Kind")
- private String kind;
-
- @JsonProperty("Group")
- public String getGroup() {
- return group;
- }
-
- @JsonProperty("Group")
- public void setGroup(String group) {
- this.group = group;
- }
-
- @JsonProperty("Version")
- public String getVersion() {
- return version;
- }
-
- @JsonProperty("Version")
- public void setVersion(String version) {
- this.version = version;
- }
-
- @JsonProperty("Kind")
- public String getKind() {
- return kind;
- }
-
- @JsonProperty("Kind")
- public void setKind(String kind) {
- this.kind = kind;
- }
-}
diff --git a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/InstanceMiniResponse.java b/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/InstanceMiniResponse.java
deleted file mode 100644
index 58040826dd..0000000000
--- a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/InstanceMiniResponse.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.cnf.model;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonInclude;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonIgnoreProperties(value = "true")
-public class InstanceMiniResponse extends Response {
-
- private String id;
- private MulticloudInstanceRequest request;
- private String nameSpace;
-
- public InstanceMiniResponse(String errorMsg) {
- super(errorMsg);
- }
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public MulticloudInstanceRequest getRequest() {
- return request;
- }
-
- public void setRequest(MulticloudInstanceRequest request) {
- this.request = request;
- }
-
- public String getNameSpace() {
- return nameSpace;
- }
-
- public void setNameSpace(String nameSpace) {
- this.nameSpace = nameSpace;
- }
-
-}
diff --git a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/InstanceMiniResponseList.java b/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/InstanceMiniResponseList.java
deleted file mode 100644
index ad70fbb7d0..0000000000
--- a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/InstanceMiniResponseList.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.cnf.model;
-
-import java.util.List;
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonInclude;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonIgnoreProperties(value = "true")
-public class InstanceMiniResponseList extends Response {
-
- public InstanceMiniResponseList(String errorMsg) {
- super(errorMsg);
- }
-
- private List<InstanceMiniResponse> instancList;
-
- public List<InstanceMiniResponse> getInstancList() {
- return instancList;
- }
-
- public void setInstancList(List<InstanceMiniResponse> instancList) {
- this.instancList = instancList;
- }
-
-}
diff --git a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/InstanceResponse.java b/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/InstanceResponse.java
deleted file mode 100644
index ae63f86c8a..0000000000
--- a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/InstanceResponse.java
+++ /dev/null
@@ -1,99 +0,0 @@
-
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.adapters.cnf.model;
-
-import java.util.List;
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({"id", "request", "namespace", "release-name", "resources"})
-@JsonIgnoreProperties(value = "true")
-public class InstanceResponse {
-
- @JsonProperty("id")
- private String id;
-
- @JsonProperty("request")
- private MulticloudInstanceRequest request;
-
- @JsonProperty("namespace")
- private String namespace;
-
- @JsonProperty("release-name")
- private String releaseName;
-
- @JsonProperty("resources")
- private List<Resource> resources;
-
- @JsonProperty("id")
- public String getId() {
- return id;
- }
-
- @JsonProperty("id")
- public void setId(String id) {
- this.id = id;
- }
-
- @JsonProperty("request")
- public MulticloudInstanceRequest getRequest() {
- return request;
- }
-
- @JsonProperty("request")
- public void setRequest(MulticloudInstanceRequest request) {
- this.request = request;
- }
-
- @JsonProperty("namespace")
- public String getNamespace() {
- return namespace;
- }
-
- @JsonProperty("namespace")
- public void setNamespace(String namespace) {
- this.namespace = namespace;
- }
-
- @JsonProperty("resources")
- public List<Resource> getResources() {
- return resources;
- }
-
- @JsonProperty("resources")
- public void setResources(List<Resource> resources) {
- this.resources = resources;
- }
-
- @JsonProperty("release-name")
- public String getReleaseName() {
- return releaseName;
- }
-
- @JsonProperty("release-name")
- public void setReleaseName(String releaseName) {
- this.releaseName = releaseName;
- }
-
-}
diff --git a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/InstanceStatusResponse.java b/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/InstanceStatusResponse.java
deleted file mode 100644
index 2472684bc0..0000000000
--- a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/InstanceStatusResponse.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.adapters.cnf.model;
-
-import java.util.List;
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonInclude;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonIgnoreProperties(value = "true")
-public class InstanceStatusResponse extends Response {
-
- public InstanceStatusResponse(String errorMsg) {
- super(errorMsg);
- }
-
- private MulticloudInstanceRequest request;
-
- private boolean ready;
-
- private String resourceCount;
-
- private List<PodStatus> podStatuses;
-
- private List<?> servicesStatuses;
-
- public MulticloudInstanceRequest getRequest() {
- return request;
- }
-
- public void setRequest(MulticloudInstanceRequest request) {
- this.request = request;
- }
-
- public boolean isReady() {
- return ready;
- }
-
- public void setReady(boolean ready) {
- this.ready = ready;
- }
-
- public String getResourceCount() {
- return resourceCount;
- }
-
- public void setResourceCount(String resourceCount) {
- this.resourceCount = resourceCount;
- }
-
- public List<PodStatus> getPodStatuses() {
- return podStatuses;
- }
-
- public void setPodStatuses(List<PodStatus> podStatuses) {
- this.podStatuses = podStatuses;
- }
-
- public List<?> getServicesStatuses() {
- return servicesStatuses;
- }
-
- public void setServicesStatuses(List<?> servicesStatuses) {
- this.servicesStatuses = servicesStatuses;
- }
-
-}
diff --git a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/MulticloudInstanceRequest.java b/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/MulticloudInstanceRequest.java
deleted file mode 100644
index b1719cbd7d..0000000000
--- a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/MulticloudInstanceRequest.java
+++ /dev/null
@@ -1,87 +0,0 @@
-package org.onap.so.adapters.cnf.model;
-
-import java.util.Map;
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-@JsonIgnoreProperties(value = "true")
-public class MulticloudInstanceRequest {
-
- @JsonProperty(value = "cloud-region")
- private String cloudRegion;
-
- @JsonProperty(value = "rb-name")
- private String rbName;
-
- @JsonProperty(value = "rb-version")
- private String rbVersion;
-
- @JsonProperty(value = "profile-name")
- private String profileName;
-
- @JsonProperty(value = "labels")
- private Map<String, String> labels;
-
- @JsonProperty(value = "override-values")
- private Map<String, String> overrideValues;
-
- @JsonProperty(value = "release-name")
- private String vfModuleUuid;
-
- public String getCloudRegion() {
- return cloudRegion;
- }
-
- public void setCloudRegion(String cloudRegion) {
- this.cloudRegion = cloudRegion;
- }
-
- public String getRbName() {
- return rbName;
- }
-
- public void setRbName(String rbName) {
- this.rbName = rbName;
- }
-
- public String getRbVersion() {
- return rbVersion;
- }
-
- public void setRbVersion(String rbVersion) {
- this.rbVersion = rbVersion;
- }
-
- public String getProfileName() {
- return profileName;
- }
-
- public void setProfileName(String profileName) {
- this.profileName = profileName;
- }
-
- public Map<String, String> getLabels() {
- return labels;
- }
-
- public void setLabels(Map<String, String> labels) {
- this.labels = labels;
- }
-
- public Map<String, String> getOverrideValues() {
- return overrideValues;
- }
-
- public void setOverrideValues(Map<String, String> overrideValues) {
- this.overrideValues = overrideValues;
- }
-
- public String getVfModuleUuid() {
- return vfModuleUuid;
- }
-
- public void setVfModuleUuid(String vfModuleUuid) {
- this.vfModuleUuid = vfModuleUuid;
- }
-
-}
diff --git a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/OtherConnectivityListEntity.java b/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/OtherConnectivityListEntity.java
deleted file mode 100644
index dd10252a0b..0000000000
--- a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/OtherConnectivityListEntity.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package org.onap.so.adapters.cnf.model;
-
-import java.util.List;
-import java.util.Map;
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-@JsonIgnoreProperties(value = "true")
-public class OtherConnectivityListEntity {
-
- @JsonProperty(value = "connectivity-records")
- private List<Map<String, String>> connectivityRecordsList;
-
- public List<Map<String, String>> getConnectivityRecordsList() {
- return connectivityRecordsList;
- }
-
- public void setConnectivityRecordsList(List<Map<String, String>> connectivityRecordsList) {
- this.connectivityRecordsList = connectivityRecordsList;
- }
-
-
-}
diff --git a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/PodStatus.java b/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/PodStatus.java
deleted file mode 100644
index ed04601b2c..0000000000
--- a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/PodStatus.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.cnf.model;
-
-public class PodStatus {
-
- private String name;
- private String nameSpace;
- private boolean ready;
- private String status;
- private String[] ipAddresses;
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getNameSpace() {
- return nameSpace;
- }
-
- public void setNameSpace(String nameSpace) {
- this.nameSpace = nameSpace;
- }
-
- public boolean isReady() {
- return ready;
- }
-
- public void setReady(boolean ready) {
- this.ready = ready;
- }
-
- public String getStatus() {
- return status;
- }
-
- public void setStatus(String status) {
- this.status = status;
- }
-
- public String[] getIpAddresses() {
- return ipAddresses;
- }
-
- public void setIpAddresses(String[] ipAddresses) {
- this.ipAddresses = ipAddresses;
- }
-
-}
diff --git a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/ProfileEntity.java b/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/ProfileEntity.java
deleted file mode 100644
index 875ef0d9a1..0000000000
--- a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/ProfileEntity.java
+++ /dev/null
@@ -1,74 +0,0 @@
-package org.onap.so.adapters.cnf.model;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-@JsonIgnoreProperties(value = "true")
-public class ProfileEntity {
-
- @JsonProperty(value = "rb-name")
- private String rbName;
-
- @JsonProperty(value = "rb-version")
- private String rbVersion;
-
- @JsonProperty(value = "profile-name")
- private String profileName;
-
- @JsonProperty(value = "release-name")
- private String releaseName;
-
- @JsonProperty(value = "namespace")
- private String nameSpace;
-
- @JsonProperty(value = "kubernetes-version")
- private String kubernetesVersion;
-
- public String getRbName() {
- return rbName;
- }
-
- public void setRbName(String rbName) {
- this.rbName = rbName;
- }
-
- public String getRbVersion() {
- return rbVersion;
- }
-
- public void setRbVersion(String rbVersion) {
- this.rbVersion = rbVersion;
- }
-
- public String getProfileName() {
- return profileName;
- }
-
- public void setProfileName(String profileName) {
- this.profileName = profileName;
- }
-
- public String getReleaseName() {
- return releaseName;
- }
-
- public void setReleaseName(String releaseName) {
- this.releaseName = releaseName;
- }
-
- public String getNameSpace() {
- return nameSpace;
- }
-
- public void setNameSpace(String nameSpace) {
- this.nameSpace = nameSpace;
- }
-
- public String getKubernetesVersion() {
- return kubernetesVersion;
- }
-
- public void setKubernetesVersion(String kubernetesVersion) {
- this.kubernetesVersion = kubernetesVersion;
- }
-}
diff --git a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/Resource.java b/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/Resource.java
deleted file mode 100644
index d18cd76039..0000000000
--- a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/Resource.java
+++ /dev/null
@@ -1,54 +0,0 @@
-
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.adapters.cnf.model;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({"GVK", "Name"})
-public class Resource {
- @JsonProperty("GVK")
- private GroupVersionKind gVK;
- @JsonProperty("Name")
- private String name;
-
- @JsonProperty("GVK")
- public GroupVersionKind getGVK() {
- return gVK;
- }
-
- @JsonProperty("GVK")
- public void setGVK(GroupVersionKind gVK) {
- this.gVK = gVK;
- }
-
- @JsonProperty("Name")
- public String getName() {
- return name;
- }
-
- @JsonProperty("Name")
- public void setName(String name) {
- this.name = name;
- }
-}
diff --git a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/ResourceBundleEntity.java b/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/ResourceBundleEntity.java
deleted file mode 100644
index bc3a8ad34b..0000000000
--- a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/ResourceBundleEntity.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package org.onap.so.adapters.cnf.model;
-
-import java.util.Map;
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-@JsonIgnoreProperties(value = "true")
-public class ResourceBundleEntity {
-
- @JsonProperty(value = "rb-name")
- private String rbName;
-
- @JsonProperty(value = "rb-version")
- private String rbVersion;
-
- @JsonProperty(value = "chart-name")
- private String chartName;
-
- @JsonProperty(value = "description")
- private String description;
-
- @JsonProperty(value = "labels")
- private Map<String, String> labels;
-
- public String getRbName() {
- return rbName;
- }
-
- public void setRbName(String rbName) {
- this.rbName = rbName;
- }
-
- public String getRbVersion() {
- return rbVersion;
- }
-
- public void setRbVersion(String rbVersion) {
- this.rbVersion = rbVersion;
- }
-
- public String getChartName() {
- return chartName;
- }
-
- public void setChartName(String chartName) {
- this.chartName = chartName;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public Map<String, String> getLabels() {
- return labels;
- }
-
- public void setLabels(Map<String, String> labels) {
- this.labels = labels;
- }
-
-}
diff --git a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/Response.java b/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/Response.java
deleted file mode 100644
index 423022393c..0000000000
--- a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/Response.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.cnf.model;
-
-public class Response {
-
- private String errorMsg;
-
- public Response(String errorMsg) {
- this.errorMsg = errorMsg;
- }
-
- public String getErrorMsg() {
- return errorMsg;
- }
-
- public void setErrorMsg(String errorMsg) {
- this.errorMsg = errorMsg;
- }
-
-}
diff --git a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/Tag.java b/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/Tag.java
deleted file mode 100644
index 70faefa150..0000000000
--- a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/Tag.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package org.onap.so.adapters.cnf.model;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-@JsonIgnoreProperties(value = "true")
-public class Tag {
-
- @JsonProperty(value = "tag-name")
- private String tagName;
-
- public String getTagName() {
- return tagName;
- }
-
- public void setTagName(String tagName) {
- this.tagName = tagName;
- }
-
-}
diff --git a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/rest/CnfAdapterRest.java b/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/rest/CnfAdapterRest.java
deleted file mode 100644
index c69b63fe16..0000000000
--- a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/rest/CnfAdapterRest.java
+++ /dev/null
@@ -1,677 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.cnf.rest;
-
-import java.io.File;
-import java.io.IOException;
-import org.apache.http.HttpEntity;
-import org.apache.http.client.methods.CloseableHttpResponse;
-import org.apache.http.client.methods.HttpDelete;
-import org.apache.http.client.methods.HttpGet;
-import org.apache.http.client.methods.HttpPost;
-import org.apache.http.client.methods.HttpPut;
-import org.apache.http.entity.ContentType;
-import org.apache.http.entity.StringEntity;
-import org.apache.http.entity.mime.HttpMultipartMode;
-import org.apache.http.entity.mime.MultipartEntityBuilder;
-import org.apache.http.entity.mime.content.FileBody;
-import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.impl.client.HttpClients;
-import org.apache.http.util.EntityUtils;
-import org.onap.so.adapters.cnf.model.BpmnInstanceRequest;
-import org.onap.so.adapters.cnf.model.ConfigTemplateEntity;
-import org.onap.so.adapters.cnf.model.ConfigurationEntity;
-import org.onap.so.adapters.cnf.model.ConfigurationRollbackEntity;
-import org.onap.so.adapters.cnf.model.ConnectivityInfo;
-import org.onap.so.adapters.cnf.model.ProfileEntity;
-import org.onap.so.adapters.cnf.model.ResourceBundleEntity;
-import org.onap.so.adapters.cnf.model.Tag;
-import org.onap.so.adapters.cnf.service.CnfAdapterService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.ResponseBody;
-import org.springframework.web.bind.annotation.RestController;
-import org.springframework.web.multipart.MultipartFile;
-import com.fasterxml.jackson.core.JsonParseException;
-import com.fasterxml.jackson.databind.JsonMappingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.SerializationFeature;
-
-@RestController
-public class CnfAdapterRest {
-
- private static final Logger logger = LoggerFactory.getLogger(CnfAdapterRest.class);
- private final CloseableHttpClient httpClient = HttpClients.createDefault();
-
- @Autowired
- private CnfAdapterService cnfAdapterService;
-
- @ResponseBody
- @RequestMapping(value = {"/api/cnf-adapter/v1/healthcheck"}, method = RequestMethod.GET,
- produces = "application/json")
- public String healthCheck() throws Exception {
-
- logger.info("healthCheck called.");
- return cnfAdapterService.healthCheck();
-
- }
-
- @ResponseBody
- @RequestMapping(value = {"/api/cnf-adapter/v1/instance"}, method = RequestMethod.POST,
- produces = "application/json", consumes = "application/json")
- public String createInstance(@RequestBody BpmnInstanceRequest bpmnInstanceRequest)
- throws JsonParseException, JsonMappingException, IOException {
-
- logger.info("createInstance called.");
- return cnfAdapterService.createInstance(bpmnInstanceRequest);
- }
-
- @ResponseBody
- @RequestMapping(value = {"/api/cnf-adapter/v1/instance/{instID}"}, method = RequestMethod.GET,
- produces = "application/json")
- public String getInstanceByInstanceId(@PathVariable("instID") String instanceId)
- throws JsonParseException, JsonMappingException, IOException {
-
- logger.info("getInstanceByInstanceId called.");
-
- return cnfAdapterService.getInstanceByInstanceId(instanceId);
-
- }
-
- @ResponseBody
- @RequestMapping(value = {"/api/cnf-adapter/v1/instance/{instID}/status"}, method = RequestMethod.GET,
- produces = "application/json")
- public String getInstanceStatusByInstanceId(@PathVariable("instID") String instanceId)
- throws JsonParseException, JsonMappingException, IOException {
-
- logger.info("getInstanceStatusByInstanceId called.");
-
- return cnfAdapterService.getInstanceStatusByInstanceId(instanceId);
-
- }
-
- @RequestMapping(value = {"/api/cnf-adapter/v1/instance"}, method = RequestMethod.GET, produces = "application/json")
- public String getInstanceByRBNameOrRBVersionOrProfileName(
- @RequestParam(value = "rb-name", required = false) String rbName,
- @RequestParam(value = "rb-version", required = false) String rbVersion,
- @RequestParam(value = "profile-name", required = false) String profileName)
- throws JsonParseException, JsonMappingException, IOException {
-
- logger.info("getInstanceByRBNameOrRBVersionOrProfileName called.");
- return cnfAdapterService.getInstanceByRBNameOrRBVersionOrProfileName(rbName, rbVersion, profileName);
-
- }
-
- @ResponseBody
- @RequestMapping(value = {"/api/cnf-adapter/v1/instance/{instID}"}, method = RequestMethod.DELETE,
- produces = "application/json")
- public String deleteInstanceByInstanceId(@PathVariable("instID") String instanceID)
- throws JsonParseException, JsonMappingException, IOException {
-
- logger.info("deleteInstanceByInstanceId called.");
- return cnfAdapterService.deleteInstanceByInstanceId(instanceID);
-
- }
-
- @ResponseBody
- @RequestMapping(value = {"/api/cnf-adapter/v1/rb/definition"}, method = RequestMethod.POST,
- produces = "application/json")
- public String createRB(@RequestBody ResourceBundleEntity rB) throws Exception {
-
- logger.info("ResourceBundleEntity:" + rB.toString());
-
- // TODO
- // Below URL should be changed as appropriate multicloud URL.
- HttpPost post = new HttpPost("http://multicloud-k8s:9015/v1/rb/definition");
- ObjectMapper objectMapper = new ObjectMapper();
- objectMapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
- String requestBody = objectMapper.writeValueAsString(rB);
- StringEntity requestEntity = new StringEntity(requestBody, ContentType.APPLICATION_JSON);
- post.setEntity(requestEntity);
-
- try (CloseableHttpClient httpClient = HttpClients.createDefault();
- CloseableHttpResponse response = httpClient.execute(post)) {
- logger.info("response:" + response.getEntity());
- return EntityUtils.toString(response.getEntity());
- }
- }
-
- @ResponseBody
- @RequestMapping(value = {"/api/cnf-adapter/v1/rb/definition/{rb-name}/{rb-version}"}, method = RequestMethod.GET,
- produces = "application/json")
- public String getRB(@PathVariable("rb-name") String rbName, @PathVariable("rb-version") String rbVersion)
- throws Exception {
-
- logger.info("get RB called.");
-
- // TODO
- // Below URL should be changed as appropriate multicloud URL.
- HttpGet req = new HttpGet("http://multicloud-k8s:9015/v1/rb/definition/" + rbName + "/" + rbVersion);
- try (CloseableHttpResponse response = httpClient.execute(req)) {
- logger.info("response:" + response.getEntity());
- return EntityUtils.toString(response.getEntity());
- }
- }
-
- @ResponseBody
- @RequestMapping(value = {"/api/cnf-adapter/v1/rb/definition/{rb-name}/{rb-version}"}, method = RequestMethod.DELETE,
- produces = "application/json")
- public String deleteRB(@PathVariable("rb-name") String rbName, @PathVariable("rb-version") String rbVersion)
- throws Exception {
-
- logger.info("delete RB called.");
-
- // TODO
- // Below URL should be changed as appropriate multicloud URL.
- HttpDelete req = new HttpDelete("http://multicloud-k8s:9015/v1/rb/definition/" + rbName + "/" + rbVersion);
-
- try (CloseableHttpResponse response = httpClient.execute(req)) {
- logger.info("response:" + response.getEntity());
- return EntityUtils.toString(response.getEntity());
- }
-
- }
-
- @ResponseBody
- @RequestMapping(value = {"/api/cnf-adapter/v1/rb/definition/{rb-name}"}, method = RequestMethod.GET,
- produces = "application/json")
- public String getListOfRB(@PathVariable("rb-name") String rbName) throws Exception {
-
- logger.info("getListOfRB called.");
-
- // TODO
- // Below URL should be changed as appropriate multicloud URL.
- HttpGet req = new HttpGet("http://multicloud-k8s:9015/v1/rb/definition/" + rbName);
-
- try (CloseableHttpResponse response = httpClient.execute(req)) {
- logger.info("response:" + response.getEntity());
- return EntityUtils.toString(response.getEntity());
- }
-
- }
-
- @ResponseBody
- @RequestMapping(value = {"/api/cnf-adapter/v1/rb/definition"}, method = RequestMethod.GET,
- produces = "application/json")
- public String getListOfRBWithoutUsingRBName() throws Exception {
-
- logger.info("getListOfRBWithoutUsingRBName called.");
-
- // TODO
- // Below URL should be changed as appropriate multicloud URL.
- HttpGet req = new HttpGet("http://multicloud-k8s:9015/v1/rb/definition");
-
- try (CloseableHttpResponse response = httpClient.execute(req)) {
- logger.info("response:" + response.getEntity());
- return EntityUtils.toString(response.getEntity());
- }
-
- }
-
- @ResponseBody
- @RequestMapping(value = {"/api/cnf-adapter/v1/rb/definition/{rb-name}/{rb-version}/content"},
- method = RequestMethod.POST, produces = "multipart/form-data")
- public String uploadArtifactForRB(@RequestParam("file") MultipartFile file, @PathVariable("rb-name") String rbName,
- @PathVariable("rb-version") String rbVersion) throws Exception {
-
- logger.info("Upload Artifact For RB called.");
-
- File convFile = new File(file.getOriginalFilename());
- file.transferTo(convFile);
- FileBody fileBody = new FileBody(convFile, ContentType.DEFAULT_BINARY);
- MultipartEntityBuilder builder = MultipartEntityBuilder.create();
- builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);
- builder.addPart("file", fileBody);
- HttpEntity entity = builder.build();
-
- // TODO
- // Below URL should be changed as appropriate multicloud URL.
- HttpPost post =
- new HttpPost("http://multicloud-k8s:9015/v1/rb/definition/" + rbName + "/" + rbVersion + "/content");
- post.setHeader("Content-Type", "multipart/form-data");
- logger.info(String.valueOf(post));
- post.setEntity(entity);
-
- try (CloseableHttpClient httpClient = HttpClients.createDefault();
- CloseableHttpResponse response = httpClient.execute(post)) {
- logger.info("response:" + response.getEntity());
- return EntityUtils.toString(response.getEntity());
- }
- }
-
- @ResponseBody
- @RequestMapping(value = {"/api/cnf-adapter/v1/rb/definition/{rb-name}/{rb-version}/profile"},
- method = RequestMethod.POST, produces = "application/json")
- public String createProfile(@RequestBody ProfileEntity fE, @PathVariable("rb-name") String rbName,
- @PathVariable("rb-version") String rbVersion) throws Exception {
-
- logger.info("create Profile called.");
-
- // TODO
- // Below URL should be changed as appropriate multicloud URL.
- HttpPost post =
- new HttpPost("http://multicloud-k8s:9015/v1/rb/definition/" + rbName + "/" + rbVersion + "/profile");
- ObjectMapper objectMapper = new ObjectMapper();
- String requestBody = objectMapper.writeValueAsString(fE);
- StringEntity requestEntity = new StringEntity(requestBody, ContentType.APPLICATION_JSON);
- post.setEntity(requestEntity);
-
- try (CloseableHttpClient httpClient = HttpClients.createDefault();
- CloseableHttpResponse response = httpClient.execute(post)) {
- logger.info("response:" + response.getEntity());
- return EntityUtils.toString(response.getEntity());
- }
- }
-
- @ResponseBody
- @RequestMapping(value = {"/api/cnf-adapter/v1/rb/definition/{rb-name}/{rb-version}/profile/{pr-name}"},
- method = RequestMethod.GET, produces = "application/json")
- public String getProfile(@PathVariable("rb-name") String rbName, @PathVariable("rb-version") String rbVersion,
- @PathVariable("pr-name") String prName) throws Exception {
-
- logger.info("get Profile called.");
-
- // TODO
- // Below URL should be changed as appropriate multicloud URL.
- HttpGet req = new HttpGet(
- "http://multicloud-k8s:9015/v1/rb/definition/" + rbName + "/" + rbVersion + "/profile/" + prName);
-
- try (CloseableHttpResponse response = httpClient.execute(req)) {
- logger.info("response:" + response.getEntity());
- return EntityUtils.toString(response.getEntity());
- }
- }
-
- @ResponseBody
- @RequestMapping(value = {"/api/cnf-adapter/v1/rb/definition/{rb-name}/{rb-version}/profile"},
- method = RequestMethod.GET, produces = "application/json")
- public String getListOfProfile(@PathVariable("rb-name") String rbName, @PathVariable("rb-version") String rbVersion)
- throws Exception {
-
- logger.info("getListOfProfile called.");
-
- // TODO
- // Below URL should be changed as appropriate multicloud URL.
- HttpGet req =
- new HttpGet("http://multicloud-k8s:9015/v1/rb/definition/" + rbName + "/" + rbVersion + "/profile");
-
- try (CloseableHttpResponse response = httpClient.execute(req)) {
- logger.info("response:" + response.getEntity());
- return EntityUtils.toString(response.getEntity());
- }
- }
-
- @ResponseBody
- @RequestMapping(value = {"/api/cnf-adapter/v1/rb/definition/{rb-name}/{rb-version}/profile/{pr-name}"},
- method = RequestMethod.DELETE, produces = "application/json")
- public String deleteProfile(@PathVariable("rb-name") String rbName, @PathVariable("rb-version") String rbVersion,
- @PathVariable("pr-name") String prName) throws Exception {
-
- logger.info("delete Profile called.");
-
- // TODO
- // Below URL should be changed as appropriate multicloud URL.
- HttpDelete req = new HttpDelete(
- "http://multicloud-k8s:9015/v1/rb/definition/" + rbName + "/" + rbVersion + "/profile/" + prName);
-
- try (CloseableHttpResponse response = httpClient.execute(req)) {
- logger.info("response:" + response.getEntity());
- return EntityUtils.toString(response.getEntity());
- }
-
- }
-
- @ResponseBody
- @RequestMapping(value = {"/api/cnf-adapter/v1/rb/definition/{rb-name}/{rb-version}/profile/{pr-name}/content"},
- method = RequestMethod.POST, produces = "multipart/form-data")
- public String uploadArtifactForProfile(@RequestParam("file") MultipartFile file,
- @PathVariable("rb-name") String rbName, @PathVariable("rb-version") String rbVersion,
- @PathVariable("pr-name") String prName) throws Exception {
-
- logger.info("Upload Artifact For Profile called.");
-
- File convFile = new File(file.getOriginalFilename());
- file.transferTo(convFile);
- FileBody fileBody = new FileBody(convFile, ContentType.DEFAULT_BINARY);
- MultipartEntityBuilder builder = MultipartEntityBuilder.create();
- builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);
- builder.addPart("file", fileBody);
- HttpEntity entity = builder.build();
-
- // TODO
- // Below URL should be changed as appropriate multicloud URL.
- HttpPost post = new HttpPost("http://multicloud-k8s:9015/v1/rb/definition/" + rbName + "/" + rbVersion
- + "/profile/" + prName + "/content");
- post.setHeader("Content-Type", "multipart/form-data");
-
- logger.info(String.valueOf(post));
- post.setEntity(entity);
-
- try (CloseableHttpClient httpClient = HttpClients.createDefault();
- CloseableHttpResponse response = httpClient.execute(post)) {
- logger.info("response:" + response.getEntity());
- return EntityUtils.toString(response.getEntity());
- }
- }
-
- @ResponseBody
- @RequestMapping(value = {"/api/cnf-adapter/v1/definition/{rb-name}/{rb-version}/profile/{profile-name}/config"},
- method = RequestMethod.POST, produces = "application/json")
- public String createConfiguration(@RequestBody ConfigurationEntity cE, @PathVariable("rb-name") String rbName,
- @PathVariable("rb-version") String rbVersion, @PathVariable("profile-name") String prName)
- throws Exception {
-
- logger.info("create Configuration called.");
-
- // TODO
- // Below URL should be changed as appropriate multicloud URL.
- HttpPost post = new HttpPost("http://multicloud-k8s:9015/v1/definition/" + rbName + "/" + rbVersion
- + "/profile/" + prName + "/config");
- ObjectMapper objectMapper = new ObjectMapper();
- String requestBody = objectMapper.writeValueAsString(cE);
- StringEntity requestEntity = new StringEntity(requestBody, ContentType.APPLICATION_JSON);
- post.setEntity(requestEntity);
-
- try (CloseableHttpClient httpClient = HttpClients.createDefault();
- CloseableHttpResponse response = httpClient.execute(post)) {
- logger.info("response:" + response.getEntity());
- return EntityUtils.toString(response.getEntity());
- }
- }
-
- @ResponseBody
- @RequestMapping(
- value = {"/api/cnf-adapter/v1/definition/{rb-name}/{rb-version}/profile/{profile-name}/config/{cfg-name}"},
- method = RequestMethod.GET, produces = "application/json")
- public String getConfiguration(@PathVariable("rb-name") String rbName, @PathVariable("rb-version") String rbVersion,
- @PathVariable("profile-name") String prName, @PathVariable("cfg-name") String cfgName) throws Exception {
-
- logger.info("get Configuration called.");
-
- // TODO
- // Below URL should be changed as appropriate multicloud URL.
- HttpGet req = new HttpGet("http://multicloud-k8s:9015/v1/definition/" + rbName + "/" + rbVersion + "/profile/"
- + prName + "/config/" + cfgName);
-
- try (CloseableHttpResponse response = httpClient.execute(req)) {
- logger.info("response:" + response.getEntity());
- return EntityUtils.toString(response.getEntity());
- }
- }
-
- @ResponseBody
- @RequestMapping(
- value = {"/api/cnf-adapter/v1/definition/{rb-name}/{rb-version}/profile/{profile-name}/config/{cfg-name}"},
- method = RequestMethod.DELETE, produces = "application/json")
- public String deleteConfiguration(@PathVariable("rb-name") String rbName,
- @PathVariable("rb-version") String rbVersion, @PathVariable("profile-name") String prName,
- @PathVariable("cfg-name") String cfgName) throws Exception {
-
- logger.info("delete Configuration called.");
-
- // TODO
- // Below URL should be changed as appropriate multicloud URL.
- HttpDelete req = new HttpDelete("http://multicloud-k8s:9015/v1/definition/" + rbName + "/" + rbVersion
- + "/profile/" + prName + "/config/" + cfgName);
-
- try (CloseableHttpResponse response = httpClient.execute(req)) {
- logger.info("response:" + response.getEntity());
- return EntityUtils.toString(response.getEntity());
- }
-
- }
-
- @ResponseBody
- @RequestMapping(
- value = {"/api/cnf-adapter/v1/definition/{rb-name}/{rb-version}/profile/{profile-name}/config/{cfg-name}"},
- method = RequestMethod.PUT, produces = "application/json")
- public String updateConfiguration(@RequestBody ConfigurationEntity cE, @PathVariable("rb-name") String rbName,
- @PathVariable("rb-version") String rbVersion, @PathVariable("profile-name") String prName,
- @PathVariable("cfg-name") String cfgName) throws Exception {
-
- logger.info("update Configuration called.");
-
- // TODO
- // Below URL should be changed as appropriate multicloud URL.
- HttpPut post = new HttpPut("http://multicloud-k8s:9015/v1/definition/" + rbName + "/" + rbVersion + "/profile/"
- + prName + "/config/" + cfgName);
- ObjectMapper objectMapper = new ObjectMapper();
- String requestBody = objectMapper.writeValueAsString(cE);
- StringEntity requestEntity = new StringEntity(requestBody, ContentType.APPLICATION_JSON);
- post.setEntity(requestEntity);
-
- try (CloseableHttpClient httpClient = HttpClients.createDefault();
- CloseableHttpResponse response = httpClient.execute(post)) {
- logger.info("response:" + response.getEntity());
- return EntityUtils.toString(response.getEntity());
- }
- }
-
- @ResponseBody
- @RequestMapping(value = {"/api/cnf-adapter/v1/definition/{rb-name}/{rb-version}/profile/{profile-name}/tagit"},
- method = RequestMethod.POST, produces = "application/json")
- public String tagConfigurationValue(@RequestBody Tag tag, @PathVariable("rb-name") String rbName,
- @PathVariable("rb-version") String rbVersion, @PathVariable("pr-name") String prName) throws Exception {
- logger.info("Tag Configuration called.");
-
- // TODO
- // Below URL should be changed as appropriate multicloud URL.
- HttpPost post = new HttpPost("http://multicloud-k8s:9015/v1/definition/" + rbName + "/" + rbVersion
- + "/profile/" + prName + "/config/tagit");
-
- ObjectMapper objectMapper = new ObjectMapper();
- String requestBody = objectMapper.writeValueAsString(tag);
- StringEntity requestEntity = new StringEntity(requestBody, ContentType.APPLICATION_JSON);
- post.setEntity(requestEntity);
-
- try (CloseableHttpClient httpClient = HttpClients.createDefault();
- CloseableHttpResponse response = httpClient.execute(post)) {
- logger.info("response:" + response.getEntity());
- return EntityUtils.toString(response.getEntity());
- }
- }
-
- @ResponseBody
- @RequestMapping(value = {"/api/cnf-adapter/v1/connectivity-info"}, method = RequestMethod.POST,
- produces = "application/json")
- public String createConnectivityInfo(@RequestBody ConnectivityInfo cIE) throws Exception {
-
- logger.info("create ConnectivityInfo called.");
-
- // TODO
- // Below URL should be changed as appropriate multicloud URL.
- HttpPost post = new HttpPost("http://multicloud-k8s:9015/v1/connectivity-info");
- ObjectMapper objectMapper = new ObjectMapper();
- String requestBody = objectMapper.writeValueAsString(cIE);
- StringEntity requestEntity = new StringEntity(requestBody, ContentType.APPLICATION_JSON);
- post.setEntity(requestEntity);
-
- try (CloseableHttpClient httpClient = HttpClients.createDefault();
- CloseableHttpResponse response = httpClient.execute(post)) {
- logger.info("response:" + response.getEntity());
- return EntityUtils.toString(response.getEntity());
- }
- }
-
- @ResponseBody
- @RequestMapping(value = {"/api/cnf-adapter/v1/connectivity-info/{connname}"}, method = RequestMethod.GET,
- produces = "application/json")
- public String getConnectivityInfo(@PathVariable("connname") String connName) throws Exception {
-
- logger.info("get Connectivity Info called.");
-
- // TODO
- // Below URL should be changed as appropriate multicloud URL.
- HttpGet req = new HttpGet("http://multicloud-k8s:9015/v1/connectivity-info/" + connName);
-
- try (CloseableHttpResponse response = httpClient.execute(req)) {
- logger.info("response:" + response.getEntity());
- return EntityUtils.toString(response.getEntity());
- }
- }
-
- @ResponseBody
- @RequestMapping(value = {"/api/cnf-adapter/v1/connectivity-info/{connname}"}, method = RequestMethod.DELETE,
- produces = "application/json")
- public String deleteConnectivityInfo(@PathVariable("connname") String connName) throws Exception {
-
- logger.info("delete Connectivity Info called.");
-
- // TODO
- // Below URL should be changed as appropriate multicloud URL.
- HttpDelete req = new HttpDelete("http://multicloud-k8s:9015/v1/connectivity-info/" + connName);
-
- try (CloseableHttpResponse response = httpClient.execute(req)) {
- logger.info("response:" + response.getEntity());
- return EntityUtils.toString(response.getEntity());
- }
-
- }
-
- @ResponseBody
- @RequestMapping(value = {"/api/cnf-adapter/v1/rb/definition/{rb-name}/{rb-version}/config-template"},
- method = RequestMethod.POST, produces = "application/json")
- public String createConfigTemplate(@RequestBody ConfigTemplateEntity tE, @PathVariable("rb-name") String rbName,
- @PathVariable("rb-version") String rbVersion) throws Exception {
-
- logger.info("createConfigTemplate called.");
-
- // TODO
- // Below URL should be changed as appropriate multicloud URL.
- HttpPost post = new HttpPost(
- "http://multicloud-k8s:9015/v1/rb/definition/" + rbName + "/" + rbVersion + "/config-template");
- ObjectMapper objectMapper = new ObjectMapper();
- String requestBody = objectMapper.writeValueAsString(tE);
- StringEntity requestEntity = new StringEntity(requestBody, ContentType.APPLICATION_JSON);
- post.setEntity(requestEntity);
-
- try (CloseableHttpClient httpClient = HttpClients.createDefault();
- CloseableHttpResponse response = httpClient.execute(post)) {
- logger.info("response:" + response.getEntity());
- return EntityUtils.toString(response.getEntity());
- }
- }
-
- @ResponseBody
- @RequestMapping(value = {"/api/cnf-adapter/v1/rb/definition/{rb-name}/{rb-version}/config-template/{tname}"},
- method = RequestMethod.GET, produces = "application/json")
- public String getConfigTemplate(@PathVariable("rb-name") String rbName,
- @PathVariable("rb-version") String rbVersion, @PathVariable("tname") String tName) throws Exception {
-
- logger.info("getConfigTemplate called.");
-
- // TODO
- // Below URL should be changed as appropriate multicloud URL.
- HttpGet req = new HttpGet("http://multicloud-k8s:9015/v1/rb/definition/" + rbName + "/" + rbVersion
- + "/config-template/" + tName);
-
- try (CloseableHttpResponse response = httpClient.execute(req)) {
- logger.info("response:" + response.getEntity());
- return EntityUtils.toString(response.getEntity());
- }
- }
-
- @ResponseBody
- @RequestMapping(value = {"/api/cnf-adapter/v1/rb/definition/{rb-name}/{rb-version}/config-template/{tname}"},
- method = RequestMethod.DELETE, produces = "application/json")
- public String deleteTemplate(@PathVariable("rb-name") String rbName, @PathVariable("rb-version") String rbVersion,
- @PathVariable("tname") String tName) throws Exception {
-
- logger.info("deleteTemplate called.");
-
- // TODO
- // Below URL should be changed as appropriate multicloud URL.
- HttpDelete req = new HttpDelete("http://multicloud-k8s:9015/v1/rb/definition/" + rbName + "/" + rbVersion
- + "/config-template/" + tName);
-
- try (CloseableHttpResponse response = httpClient.execute(req)) {
- logger.info("response:" + response.getEntity());
- return EntityUtils.toString(response.getEntity());
- }
-
- }
-
- @ResponseBody
- @RequestMapping(
- value = {"/api/cnf-adapter/v1/rb/definition/{rb-name}/{rb-version}/config-template/{tname}/content"},
- method = RequestMethod.POST, produces = "multipart/form-data")
- public String uploadTarFileForTemplate(@RequestParam("file") MultipartFile file,
- @PathVariable("rb-name") String rbName, @PathVariable("rb-version") String rbVersion,
- @PathVariable("tname") String tName) throws Exception {
-
- logger.info("uploadTarFileForTemplate called.");
-
- File convFile = new File(file.getOriginalFilename());
- file.transferTo(convFile);
- FileBody fileBody = new FileBody(convFile, ContentType.DEFAULT_BINARY);
- MultipartEntityBuilder builder = MultipartEntityBuilder.create();
- builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);
- builder.addPart("file", fileBody);
- HttpEntity entity = builder.build();
-
- // TODO
- // Below URL should be changed as appropriate multicloud URL.
- HttpPost post = new HttpPost("http://multicloud-k8s:9015/v1/rb/definition/" + rbName + "/" + rbVersion
- + "/config-template/" + tName + "/content");
- post.setHeader("Content-Type", "multipart/form-data");
-
- logger.info(String.valueOf(post));
- post.setEntity(entity);
-
- try (CloseableHttpClient httpClient = HttpClients.createDefault();
- CloseableHttpResponse response = httpClient.execute(post)) {
- logger.info("response:" + response.getEntity());
- return EntityUtils.toString(response.getEntity());
- }
- }
-
- @ResponseBody
- @RequestMapping(value = {"/api/cnf-adapter/v1/definition/{rbName}/{rbVersion}/profile/{prName}/config/rollback"},
- method = RequestMethod.DELETE, produces = "application/json")
- public String rollbackConfiguration(@RequestBody ConfigurationRollbackEntity rE,
- @PathVariable("rbName") String rbName, @PathVariable("rbVersion") String rbVersion,
- @PathVariable("prName") String prName) throws Exception {
- logger.info("rollbackConfiguration called.");
-
- // TODO
- // Below URL should be changed as appropriate multicloud URL.
- HttpPost post = new HttpPost("http://multicloud-k8s:9015/v1/definition/" + rbName + "/" + rbVersion
- + "/profile/" + prName + "/config/rollback");
-
- ObjectMapper objectMapper = new ObjectMapper();
- String requestBody = objectMapper.writeValueAsString(rE);
- StringEntity requestEntity = new StringEntity(requestBody, ContentType.APPLICATION_JSON);
- post.setEntity(requestEntity);
-
- try (CloseableHttpClient httpClient = HttpClients.createDefault();
- CloseableHttpResponse response = httpClient.execute(post)) {
- logger.info("response:" + response.getEntity());
- return EntityUtils.toString(response.getEntity());
- }
- }
-
-}
diff --git a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/service/CnfAdapterService.java b/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/service/CnfAdapterService.java
deleted file mode 100644
index a134bace1f..0000000000
--- a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/service/CnfAdapterService.java
+++ /dev/null
@@ -1,251 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.cnf.service;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import javax.persistence.EntityNotFoundException;
-import javax.ws.rs.core.UriBuilder;
-import org.apache.http.HttpStatus;
-import org.onap.so.adapters.cnf.model.BpmnInstanceRequest;
-import org.onap.so.adapters.cnf.model.MulticloudInstanceRequest;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpEntity;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.HttpMethod;
-import org.springframework.http.MediaType;
-import org.springframework.http.ResponseEntity;
-import org.springframework.stereotype.Service;
-import org.springframework.web.client.HttpClientErrorException;
-import org.springframework.web.client.HttpStatusCodeException;
-import org.springframework.web.client.RestTemplate;
-import com.fasterxml.jackson.core.JsonParseException;
-import com.fasterxml.jackson.databind.JsonMappingException;
-
-@Service
-public class CnfAdapterService {
- private static final Logger logger = LoggerFactory.getLogger(CnfAdapterService.class);
- @Autowired
- private RestTemplate restTemplate;
- private static final String INSTANCE_CREATE_PATH = "/v1/instance";
- private static final String HEALTH_CHECK = "/v1/healthcheck";
-
- public String healthCheck() {
-
- logger.info("CnfAdapterService healthCheck called");
- ResponseEntity<String> result = null;
- try {
-
- // String uri = env.getRequiredProperty("multicloud.endpoint"); //TODO:
- // This needs to be added as well
- // for configuration
- String uri = "http://multicloud-k8s:9015"; // TODO: What is the correct uri?
- String endpoint = UriBuilder.fromUri(uri).path(HEALTH_CHECK).build().toString();
- HttpEntity<?> requestEntity = new HttpEntity<>(getHttpHeaders());
- result = restTemplate.exchange(endpoint, HttpMethod.GET, requestEntity, String.class);
- return result.getBody();
- } catch (HttpClientErrorException e) {
- logger.error("Error Calling Multicloud, e");
- if (HttpStatus.SC_NOT_FOUND == e.getStatusCode().value()) {
- throw new EntityNotFoundException(e.getResponseBodyAsString());
- }
- throw e;
- } catch (HttpStatusCodeException e) {
- logger.error("Error in Multicloud, e");
- throw e;
- }
- }
-
- public String createInstance(BpmnInstanceRequest bpmnInstanceRequest)
- throws JsonParseException, JsonMappingException, IOException {
- try {
- logger.info("CnfAdapterService createInstance called");
- MulticloudInstanceRequest multicloudInstanceRequest = new MulticloudInstanceRequest();
- ResponseEntity<String> instanceResponse = null;
- if (bpmnInstanceRequest.getK8sRBProfileName() != null) {
- multicloudInstanceRequest.setCloudRegion(bpmnInstanceRequest.getCloudRegionId());
- multicloudInstanceRequest.setLabels(bpmnInstanceRequest.getLabels());
- multicloudInstanceRequest.setOverrideValues(bpmnInstanceRequest.getOverrideValues());
- multicloudInstanceRequest.setProfileName(bpmnInstanceRequest.getK8sRBProfileName());
- multicloudInstanceRequest.setRbName(bpmnInstanceRequest.getModelInvariantId());
- multicloudInstanceRequest.setRbVersion(bpmnInstanceRequest.getModelVersionId());
- multicloudInstanceRequest.setVfModuleUuid(bpmnInstanceRequest.getVfModuleUUID());
- } else {
- logger.error("k8sProfileName should not be null");
- // return instanceResponse;
- }
- // String uri = env.getRequiredProperty("multicloud.endpoint"); //TODO:
- // This needs to be added as well
- // for configuration
- String uri = "http://multicloud-k8s:9015"; // TODO: What is the correct uri?
- String endpoint = UriBuilder.fromUri(uri).path(INSTANCE_CREATE_PATH).build().toString();
- HttpEntity<?> entity = getHttpEntity(multicloudInstanceRequest);
- instanceResponse = restTemplate.exchange(endpoint, HttpMethod.POST, entity, String.class);
- return instanceResponse.getBody();
- } catch (HttpClientErrorException e) {
- logger.error("Error Calling Multicloud, e");
- if (HttpStatus.SC_NOT_FOUND == e.getStatusCode().value()) {
- throw new EntityNotFoundException(e.getResponseBodyAsString());
- }
- throw e;
- } catch (HttpStatusCodeException e) {
- logger.error("Error in Multicloud, e");
- throw e;
- }
- }
-
- public String getInstanceByInstanceId(String instanceId)
- throws JsonParseException, JsonMappingException, IOException {
-
- logger.info("CnfAdapterService getInstanceByInstanceId called");
- ResponseEntity<String> instanceResponse = null;
- try {
-
- // String uri = env.getRequiredProperty("multicloud.endpoint"); //TODO:
- // This needs to be added as well
- // for configuration
- String uri = "http://multicloud-k8s:9015"; // TODO: What is the correct uri?
- String path = "/v1/instance/" + instanceId;
- String endpoint = UriBuilder.fromUri(uri).path(path).build().toString();
- HttpEntity<?> requestEntity = new HttpEntity<>(getHttpHeaders());
- instanceResponse = restTemplate.exchange(endpoint, HttpMethod.GET, requestEntity, String.class);
- return instanceResponse.getBody();
- } catch (HttpClientErrorException e) {
- logger.error("Error Calling Multicloud, e");
- if (HttpStatus.SC_NOT_FOUND == e.getStatusCode().value()) {
- throw new EntityNotFoundException(e.getResponseBodyAsString());
- }
- throw e;
- } catch (HttpStatusCodeException e) {
- logger.error("Error in Multicloud, e");
- throw e;
- }
- }
-
- public String getInstanceStatusByInstanceId(String instanceId)
- throws JsonParseException, JsonMappingException, IOException {
-
- logger.info("CnfAdapterService getInstanceStatusByInstanceId called");
- ResponseEntity<String> instanceResponse = null;
- try {
-
- // String uri = env.getRequiredProperty("multicloud.endpoint"); //TODO:
- // This needs to be added as well
- // for configuration
- String uri = "http://multicloud-k8s:9015"; // TODO: What is the correct uri?
- String path = "/v1/instance/" + instanceId + "/status";
- String endpoint = UriBuilder.fromUri(uri).path(path).build().toString();
- HttpEntity<?> requestEntity = new HttpEntity<>(getHttpHeaders());
- instanceResponse = restTemplate.exchange(endpoint, HttpMethod.GET, requestEntity, String.class);
- return instanceResponse.getBody();
- } catch (HttpClientErrorException e) {
- logger.error("Error Calling Multicloud, e");
- if (HttpStatus.SC_NOT_FOUND == e.getStatusCode().value()) {
- throw new EntityNotFoundException(e.getResponseBodyAsString());
- }
- throw e;
- } catch (HttpStatusCodeException e) {
- logger.error("Error in Multicloud, e");
- throw e;
- }
-
- }
-
- public String getInstanceByRBNameOrRBVersionOrProfileName(String rbName, String rbVersion, String profileName)
- throws JsonParseException, JsonMappingException, IOException {
-
- logger.info("CnfAdapterService getInstanceByRBNameOrRBVersionOrProfileName called");
- ResponseEntity<String> instanceMiniResponseList = null;
- try {
-
- // String uri = env.getRequiredProperty("multicloud.endpoint"); //TODO:
- // This needs to be added as well
- // for configuration
- String uri = "http://multicloud-k8s:9015"; // TODO: What is the correct uri?
- String path =
- "/v1/instance" + "?rb-name=" + rbName + "&rb-version=" + rbVersion + "&profile-name=" + profileName;
- String endPoint = uri + path;
- HttpEntity<?> requestEntity = new HttpEntity<>(getHttpHeaders());
- instanceMiniResponseList = restTemplate.exchange(endPoint, HttpMethod.GET, requestEntity, String.class);
- return instanceMiniResponseList.getBody();
- } catch (HttpClientErrorException e) {
- logger.error("Error Calling Multicloud, e");
- if (HttpStatus.SC_NOT_FOUND == e.getStatusCode().value()) {
- throw new EntityNotFoundException(e.getResponseBodyAsString());
- }
- throw e;
- } catch (HttpStatusCodeException e) {
- logger.error("Error in Multicloud, e");
- throw e;
- }
- }
-
- public String deleteInstanceByInstanceId(String instanceId)
- throws JsonParseException, JsonMappingException, IOException {
-
- logger.info("CnfAdapterService deleteInstanceByInstanceId called");
- ResponseEntity<String> result = null;
- try {
-
- // String uri = env.getRequiredProperty("multicloud.endpoint"); //TODO:
- // This needs to be added as well
- // for configuration
- String uri = "http://multicloud-k8s:9015"; // TODO: What is the correct uri?
- String path = "/v1/instance/" + instanceId;
- String endpoint = UriBuilder.fromUri(uri).path(path).build().toString();
- HttpEntity<?> requestEntity = new HttpEntity<>(getHttpHeaders());
- result = restTemplate.exchange(endpoint, HttpMethod.DELETE, requestEntity, String.class);
- return result.getBody();
- } catch (HttpClientErrorException e) {
- logger.error("Error Calling Multicloud, e");
- if (HttpStatus.SC_NOT_FOUND == e.getStatusCode().value()) {
- throw new EntityNotFoundException(e.getResponseBodyAsString());
- }
- throw e;
- } catch (HttpStatusCodeException e) {
- logger.error("Error in Multicloud, e");
- throw e;
- }
- }
-
- protected HttpHeaders getHttpHeaders() {
- HttpHeaders headers = new HttpHeaders();
- List<MediaType> acceptableMediaTypes = new ArrayList<>();
- acceptableMediaTypes.add(MediaType.APPLICATION_JSON);
- headers.setAccept(acceptableMediaTypes);
- headers.setContentType(MediaType.APPLICATION_JSON);
- /*
- * try { String userCredentials = CryptoUtils.decrypt(env.getRequiredProperty("mso.cnf.adapter.auth"),
- * env.getRequiredProperty("mso.msoKey")); if (userCredentials != null) { headers.add(HttpHeaders.AUTHORIZATION,
- * "Basic " + DatatypeConverter.printBase64Binary(userCredentials.getBytes())); } } catch
- * (GeneralSecurityException e) { logger.error("Security exception", e); }
- */
- return headers;
- }
-
- protected HttpEntity<?> getHttpEntity(MulticloudInstanceRequest request) {
- HttpHeaders headers = getHttpHeaders();
- return new HttpEntity<>(request, headers);
- }
-}
diff --git a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/util/CNfAdapterUtil.java b/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/util/CNfAdapterUtil.java
deleted file mode 100644
index 25e506c55e..0000000000
--- a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/util/CNfAdapterUtil.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.cnf.util;
-
-import com.fasterxml.jackson.databind.ObjectMapper;
-import java.io.IOException;
-import org.onap.so.adapters.cnf.exceptions.ApplicationException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.onap.logging.filter.base.ErrorCode;
-import static org.onap.so.logger.LoggingAnchor.THREE;
-import static org.onap.so.logger.MessageEnum.RA_NS_EXC;
-
-public class CNfAdapterUtil {
-
- private static final Logger LOGGER = LoggerFactory.getLogger(CNfAdapterUtil.class);
-
- public static final int BAD_REQUEST = 400;
-
- private static final String UNMARSHAL_FAIL_MSG = "Failed to unmarshal json";
-
- private static final String MARSHAL_FAIL_MSG = "Failed to marshal object";
-
- private static final ObjectMapper MAPPER = new ObjectMapper();
-
- public static class StatusDesc {
-
- public static final String ALLOCATE_NSS_SUCCESS = "Allocating nss is " + "successful";
-
- public static final String CREATE_NSS_SUCCESS = "Creating nss is " + "successful";
-
- public static final String DEALLOCATE_NSS_SUCCESS = "Deallocate nss " + "is successful";
-
- public static final String ACTIVATE_NSS_SUCCESS = "Activate nss " + "is successful";
-
- public static final String DEACTIVATE_NSS_SUCCESS = "Deactivate nss " + "is successful";
-
- public static final String QUERY_JOB_STATUS_FAILED = "Query job " + "status failed";
-
- public static final String QUERY_JOB_STATUS_SUCCESS = "Query job " + "status is successful";
-
- private StatusDesc() {
-
- }
- }
-
- private CNfAdapterUtil() {
-
- }
-
- public static void assertObjectNotNull(Object object) throws ApplicationException {
- if (null == object) {
- LOGGER.error("Object is null.");
- throw new ApplicationException(BAD_REQUEST, "An object is null.");
- }
- }
-
- public static <T> T unMarshal(String jsonstr, Class<T> type) throws ApplicationException {
- try {
- return MAPPER.readValue(jsonstr, type);
- } catch (IOException e) {
- LOGGER.error(THREE, RA_NS_EXC.toString(), ErrorCode.BusinessProcessError.getValue(), UNMARSHAL_FAIL_MSG, e);
- throw new ApplicationException(BAD_REQUEST, UNMARSHAL_FAIL_MSG);
- }
- }
-
- public static String marshal(Object srcObj) throws ApplicationException {
- try {
- return MAPPER.writerWithDefaultPrettyPrinter().writeValueAsString(srcObj);
- } catch (IOException e) {
- LOGGER.error(THREE, RA_NS_EXC.toString(), ErrorCode.BusinessProcessError.getValue(), MARSHAL_FAIL_MSG, e);
- throw new ApplicationException(BAD_REQUEST, MARSHAL_FAIL_MSG);
- }
- }
-
-}
diff --git a/adapters/mso-cnf-adapter/src/main/resources/META-INF/services/org.onap.so.client.RestProperties b/adapters/mso-cnf-adapter/src/main/resources/META-INF/services/org.onap.so.client.RestProperties
deleted file mode 100644
index bccd43aea7..0000000000
--- a/adapters/mso-cnf-adapter/src/main/resources/META-INF/services/org.onap.so.client.RestProperties
+++ /dev/null
@@ -1 +0,0 @@
-org.onap.so.adapters.cnf.extclients.aai.AaiClientPropertiesImpl \ No newline at end of file
diff --git a/adapters/mso-cnf-adapter/src/main/resources/application.yaml b/adapters/mso-cnf-adapter/src/main/resources/application.yaml
deleted file mode 100644
index 5a9adbfd04..0000000000
--- a/adapters/mso-cnf-adapter/src/main/resources/application.yaml
+++ /dev/null
@@ -1,61 +0,0 @@
-#
-# ============LICENSE_START=======================================================
-# ONAP - SO
-# ================================================================================
-# Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
-# ================================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# ============LICENSE_END=========================================================
-#/
-#aai:
-# auth: 2A11B07DB6214A839394AA1EC5844695F5114FC407FF5422625FB00175A3DCB8A1FF745F22867EFA72D5369D599BBD88DA8BED4233CF5586
-# endpoint: https://aai.onap:30233
-#logging:
-# path: logs
-
-#spring:
-# datasource:
- # driver-class-name: org.mariadb.jdbc.Driver
-# jdbcUrl: jdbc:mariadb://192.168.235.44:30444/requestdb
- # username: root
- # password: secretpassword
-
- # jpa:
- # show-sql: false
- # hibernate:
- # dialect: org.hibernate.dialect.MySQL5Dialect
- # ddl-auto: validate
- # naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy
- # enable-lazy-load-no-trans: true
-server:
- port: 9012
- tomcat:
- max-threads: 50
-
-#mso:
- # key: 07a7159d3bf51a0e53be7a8f89699be7
- # site-name: localSite
-# logPath: ./logs/cnf
- # msb-ip: msb-iag.{{ include "common.namespace" . }}
- # msb-port: 80
- # adapters:
- # requestDb:
- # endpoint: https://so-request-db-adapter.{{ include "common.namespace" . }}:8083
- # auth: Basic YnBlbDpwYXNzd29yZDEk
-
-#Actuator
-#management:
-# security:
- # enabled: false
- # basic:
-# enabled: false \ No newline at end of file
diff --git a/adapters/mso-cnf-adapter/src/test/java/org/onap/so/adapters/cnf/CnfAdapterRestTest.java b/adapters/mso-cnf-adapter/src/test/java/org/onap/so/adapters/cnf/CnfAdapterRestTest.java
deleted file mode 100644
index ee7a771034..0000000000
--- a/adapters/mso-cnf-adapter/src/test/java/org/onap/so/adapters/cnf/CnfAdapterRestTest.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
-
-
-package org.onap.so.adapters.cnf;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.InjectMocks;
-import org.onap.so.adapters.cnf.model.BpmnInstanceRequest;
-import org.onap.so.adapters.cnf.rest.CnfAdapterRest;
-import org.springframework.test.context.junit4.SpringRunner;
-
-@RunWith(SpringRunner.class)
-public class CnfAdapterRestTest {
-
- @InjectMocks
- CnfAdapterRest cnfAdapterRest;
-
- @Test
- public void createInstanceTest() throws Exception {
-
- Map<String, String> labels = new HashMap<String, String>();
- labels.put("custom-label-1", "label1");
- Map<String, String> overrideValues = new HashMap<String, String>();
- labels.put("image.tag", "latest");
- labels.put("dcae_collector_ip", "1.2.3.4");
- BpmnInstanceRequest bpmnInstanceRequest = new BpmnInstanceRequest();
- bpmnInstanceRequest.setCloudRegionId("v1");
- bpmnInstanceRequest.setLabels(labels);
- bpmnInstanceRequest.setModelInvariantId("krd");
- bpmnInstanceRequest.setModelVersionId("p1");
- bpmnInstanceRequest.setOverrideValues(overrideValues);
- bpmnInstanceRequest.setVfModuleUUID("20200824");
-
- String mockedResponse = "K8sRBProfileName is required";
- String actualResponse = cnfAdapterRest.createInstance(bpmnInstanceRequest);
- assertNotNull(actualResponse);
- assertEquals(mockedResponse, actualResponse);
- }
-
-}
-*/
diff --git a/adapters/mso-cnf-adapter/src/test/java/org/onap/so/adapters/cnf/rest/CnfAdapterRestTest.java b/adapters/mso-cnf-adapter/src/test/java/org/onap/so/adapters/cnf/rest/CnfAdapterRestTest.java
deleted file mode 100644
index 30197bc7c5..0000000000
--- a/adapters/mso-cnf-adapter/src/test/java/org/onap/so/adapters/cnf/rest/CnfAdapterRestTest.java
+++ /dev/null
@@ -1,106 +0,0 @@
-// TODO
-/*
- *
- * ============LICENSE_START==================================================== === ONAP - SO
- * ============================================================================= === Copyright (C) 2020 Huawei
- * Technologies Co., Ltd. All rights reserved.
- * ============================================================================= === Licensed under the Apache License,
- * Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- * ============LICENSE_END====================================================== ===
- *
- *
- * package org.onap.so.adapters.cnf.rest;
- *
- *
- * import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import
- * org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.InjectMocks; import
- * org.mockito.Mock; import org.mockito.Mockito; import org.onap.so.adapters.cnf.model.BpmnInstanceRequest; import
- * org.onap.so.adapters.cnf.model.InstanceMiniResponse; import org.onap.so.adapters.cnf.model.InstanceMiniResponseList;
- * import org.onap.so.adapters.cnf.model.InstanceResponse; import org.onap.so.adapters.cnf.model.InstanceStatusResponse;
- * import org.onap.so.adapters.cnf.model.MulticloudInstanceRequest; import org.onap.so.adapters.cnf.model.Resource;
- * import org.onap.so.adapters.cnf.service.CnfAdapterService; import org.springframework.http.HttpStatus; import
- * org.springframework.http.ResponseEntity; import org.springframework.test.context.junit4.SpringRunner;
- *
- *
- * @RunWith(SpringRunner.class) public class CnfAdapterRestTest {
- *
- * @InjectMocks CnfAdapterRest cnfAdapterRest;
- *
- * @Mock CnfAdapterService cnfAdapterService;
- *
- * @Mock ResponseEntity<InstanceMiniResponseList> instacneMiniResponseList;
- *
- * @Mock ResponseEntity<InstanceStatusResponse> instanceStatusResponse;
- *
- * @Test public void healthCheckTest() throws Exception {
- *
- * ResponseEntity<String> response = new ResponseEntity<String>(HttpStatus.OK); CnfAdapterService cnfAdapterService =
- * Mockito.mock(CnfAdapterService.class); Mockito.when(cnfAdapterService.healthCheck()).thenReturn(response);
- * cnfAdapterRest.healthCheck(); Assert.assertNotNull(response); Assert.assertEquals(HttpStatus.OK,
- * response.getStatusCode()); }
- *
- * @Test public void createInstanceTest() throws Exception {
- *
- * Map<String, String> labels = new HashMap<String, String>(); labels.put("custom-label-1", "label1"); Map<String,
- * String> overrideValues = new HashMap<String, String>(); labels.put("image.tag", "latest");
- * labels.put("dcae_collector_ip", "1.2.3.4"); BpmnInstanceRequest bpmnInstanceRequest = new BpmnInstanceRequest();
- * bpmnInstanceRequest.setCloudRegionId("v1"); bpmnInstanceRequest.setLabels(labels);
- * bpmnInstanceRequest.setModelInvariantId("krd"); bpmnInstanceRequest.setModelVersionId("p1");
- * bpmnInstanceRequest.setOverrideValues(overrideValues); bpmnInstanceRequest.setVfModuleUUID("20200824");
- * List<Resource> resourceList = new ArrayList<Resource>(); InstanceResponse instanceResponse = new InstanceResponse();
- * instanceResponse.setId("123"); instanceResponse.setNamespace("testNamespace"); instanceResponse.setRequest(new
- * MulticloudInstanceRequest()); instanceResponse.setResources(resourceList); String createInstanceResponse = new
- * ResponseEntity<InstanceResponse>(instanceResponse, HttpStatus.CREATED); CnfAdapterService cnfAdapterService =
- * Mockito.mock(CnfAdapterService.class); Mockito.when(cnfAdapterService.createInstance(bpmnInstanceRequest)).
- * thenReturn(createInstanceResponse); cnfAdapterRest.createInstance(bpmnInstanceRequest);
- * Assert.assertNotNull(createInstanceResponse); Assert.assertEquals(HttpStatus.CREATED,
- * createInstanceResponse.getStatusCode()); }
- *
- * @Test public void getInstanceByInstanceIdTest() throws Exception {
- *
- * String instanceId = "123"; String createInstanceResponse = new ResponseEntity<InstanceResponse>(HttpStatus.OK);
- * CnfAdapterService cnfAdapterService = Mockito.mock(CnfAdapterService.class);
- * Mockito.when(cnfAdapterService.getInstanceByInstanceId(instanceId)). thenReturn(createInstanceResponse);
- * cnfAdapterRest.getInstanceByInstanceId(instanceId); Assert.assertNotNull(createInstanceResponse);
- * Assert.assertEquals(HttpStatus.OK, createInstanceResponse.getStatusCode()); }
- *
- * @Test public void deleteInstanceByInstanceIdTest() throws Exception {
- *
- * String instanceId = "123"; ResponseEntity<String> response = new ResponseEntity<String>(HttpStatus.OK);
- * CnfAdapterService cnfAdapterService = Mockito.mock(CnfAdapterService.class);
- * Mockito.when(cnfAdapterService.deleteInstanceByInstanceId(instanceId)). thenReturn(response);
- * cnfAdapterRest.deleteInstanceByInstanceId(instanceId); Assert.assertNotNull(response);
- * Assert.assertEquals(HttpStatus.OK, response.getStatusCode()); }
- *
- * @Test public void getInstanceStatusByInstanceIdTest() throws Exception {
- *
- * String instanceId = "123"; instanceStatusResponse = new ResponseEntity<InstanceStatusResponse>(HttpStatus.OK);
- * CnfAdapterService cnfAdapterService = Mockito.mock(CnfAdapterService.class);
- * Mockito.when(cnfAdapterService.getInstanceStatusByInstanceId(instanceId)). thenReturn(instanceStatusResponse);
- * cnfAdapterRest.getInstanceStatusByInstanceId(instanceId); Assert.assertNotNull(instanceStatusResponse);
- * Assert.assertEquals(HttpStatus.OK, instanceStatusResponse.getStatusCode()); }
- *
- * @Test public void getInstanceByRBNameOrRBVersionOrProfileNameTest() throws Exception {
- *
- * String rbName = "xyz"; String rbVersion = "v1"; String profileName = "p1"; InstanceMiniResponse instanceMiniResponse
- * = new InstanceMiniResponse(HttpStatus.OK.toString()); List<InstanceMiniResponse> instancList = new
- * ArrayList<InstanceMiniResponse>(); instancList.add(instanceMiniResponse); InstanceMiniResponseList
- * instanceMiniRespList = new InstanceMiniResponseList(HttpStatus.OK.toString());
- * instanceMiniRespList.setInstancList(instancList); instanceMiniRespList.setErrorMsg(HttpStatus.OK.toString());
- * ResponseEntity<InstanceMiniResponseList> respone = new ResponseEntity<InstanceMiniResponseList>(instanceMiniRespList,
- * HttpStatus.OK); CnfAdapterService cnfAdapterService = Mockito.mock(CnfAdapterService.class);
- * Mockito.when(cnfAdapterService.getInstanceByRBNameOrRBVersionOrProfileName( rbName, rbVersion, profileName))
- * .thenReturn(instacneMiniResponseList); cnfAdapterRest.getInstanceByRBNameOrRBVersionOrProfileName(rbName, rbVersion,
- * profileName); Assert.assertNotNull(instacneMiniResponseList); Assert.assertEquals(HttpStatus.OK.toString(),
- * instanceMiniRespList.getErrorMsg()); }
- *
- * }
- *
- */
diff --git a/adapters/mso-cnf-adapter/src/test/java/org/onap/so/adapters/cnf/service/CnfAdapterServiceTest.java b/adapters/mso-cnf-adapter/src/test/java/org/onap/so/adapters/cnf/service/CnfAdapterServiceTest.java
deleted file mode 100644
index e114f44a1d..0000000000
--- a/adapters/mso-cnf-adapter/src/test/java/org/onap/so/adapters/cnf/service/CnfAdapterServiceTest.java
+++ /dev/null
@@ -1,104 +0,0 @@
-// TODO
-/*
- * package org.onap.so.adapters.cnf.service;
- *
- * import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.InjectMocks;
- * import org.mockito.Matchers; import org.mockito.Mock; import org.mockito.Mockito; import
- * org.onap.so.adapters.cnf.model.BpmnInstanceRequest; import org.onap.so.adapters.cnf.model.InstanceMiniResponseList;
- * import org.onap.so.adapters.cnf.model.InstanceResponse; import org.onap.so.adapters.cnf.model.InstanceStatusResponse;
- * import org.springframework.http.HttpEntity; import org.springframework.http.HttpMethod; import
- * org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import
- * org.springframework.test.context.junit4.SpringRunner; import org.springframework.web.client.RestTemplate;
- *
- * @RunWith(SpringRunner.class) public class CnfAdapterServiceTest {
- *
- * @InjectMocks CnfAdapterService cnfAdapterService;
- *
- * @Mock ResponseEntity<InstanceResponse> createInstanceResponse;
- *
- * @Mock ResponseEntity<InstanceMiniResponseList> instacneMiniResponseList;
- *
- * @Mock ResponseEntity<InstanceStatusResponse> instanceStatusResponse;
- *
- * @Mock private RestTemplate restTemplate;
- *
- * @Test public void healthCheckTest() throws Exception {
- *
- * ResponseEntity<String> response = new ResponseEntity<String>(HttpStatus.OK);
- *
- * Mockito.when(restTemplate.exchange(Matchers.anyString(), Matchers.any(HttpMethod.class),
- * Matchers.<HttpEntity<?>>any(), Matchers.<Class<String>>any())).thenReturn(response);
- *
- * ResponseEntity<String> actualResponse = cnfAdapterService.healthCheck(); Assert.assertNotNull(actualResponse);
- * Assert.assertEquals(HttpStatus.OK, actualResponse.getStatusCode());
- *
- * }
- *
- * @Test public void createInstanceTest() throws Exception {
- *
- * ResponseEntity<InstanceResponse> response = new ResponseEntity<InstanceResponse>(HttpStatus.OK); BpmnInstanceRequest
- * bpmnInstanceRequest = new BpmnInstanceRequest(); bpmnInstanceRequest.setK8sRBProfileName("k8sRBProfileName");
- * Mockito.when(restTemplate.exchange(Matchers.anyString(), Matchers.any(HttpMethod.class),
- * Matchers.<HttpEntity<?>>any(), Matchers.<Class<InstanceResponse>>any())).thenReturn(response);
- *
- * ResponseEntity<InstanceResponse> actualResponse = cnfAdapterService.createInstance(bpmnInstanceRequest);
- * Assert.assertNotNull(response); Assert.assertEquals(actualResponse.getStatusCode(), response.getStatusCode());
- *
- * }
- *
- * @Test public void createInstanceExceptionTest() throws Exception {
- *
- * BpmnInstanceRequest bpmnInstanceRequest = new BpmnInstanceRequest(); ResponseEntity<InstanceResponse> response =
- * cnfAdapterService.createInstance(bpmnInstanceRequest); Assert.assertNull(response);
- *
- * }
- *
- * @Test public void getInstanceByInstanceIdTest() throws Exception {
- *
- * ResponseEntity<InstanceResponse> response = new ResponseEntity<InstanceResponse>(HttpStatus.OK); String instanceId =
- * "123"; Mockito.when(restTemplate.exchange(Matchers.anyString(), Matchers.any(HttpMethod.class),
- * Matchers.<HttpEntity<?>>any(), Matchers.<Class<InstanceResponse>>any())).thenReturn(response);
- *
- * ResponseEntity<InstanceResponse> actualResponse = cnfAdapterService.getInstanceByInstanceId(instanceId);
- * Assert.assertNotNull(actualResponse); Assert.assertEquals(HttpStatus.OK, actualResponse.getStatusCode());
- *
- * }
- *
- * @Test public void getInstanceStatusByInstanceIdTest() throws Exception {
- *
- * ResponseEntity<InstanceStatusResponse> response = new ResponseEntity<InstanceStatusResponse>(HttpStatus.OK); String
- * instanceId = "123"; Mockito.when(restTemplate.exchange(Matchers.anyString(), Matchers.any(HttpMethod.class),
- * Matchers.<HttpEntity<?>>any(), Matchers.<Class<InstanceStatusResponse>>any())).thenReturn(response);
- *
- * ResponseEntity<InstanceStatusResponse> actualResponse = cnfAdapterService .getInstanceStatusByInstanceId(instanceId);
- * Assert.assertNotNull(actualResponse); Assert.assertEquals(HttpStatus.OK, response.getStatusCode());
- *
- * }
- *
- * @Test public void getInstanceByRBNameOrRBVersionOrProfileNameTest() throws Exception {
- *
- * ResponseEntity<InstanceMiniResponseList> response = new ResponseEntity<InstanceMiniResponseList>(HttpStatus.OK);
- * String rbName = "xyz"; String rbVersion = "v1"; String profileName = "p1";
- *
- * Mockito.when(restTemplate.exchange(Matchers.anyString(), Matchers.any(HttpMethod.class),
- * Matchers.<HttpEntity<?>>any(), Matchers.<Class<InstanceMiniResponseList>>any())).thenReturn(response);
- *
- * ResponseEntity<InstanceMiniResponseList> actualResponse = cnfAdapterService
- * .getInstanceByRBNameOrRBVersionOrProfileName(rbName, rbVersion, profileName); Assert.assertNotNull(actualResponse);
- * Assert.assertEquals(HttpStatus.OK, actualResponse.getStatusCode());
- *
- * }
- *
- * @Test public void deleteInstanceByInstanceIdTest() throws Exception {
- *
- * ResponseEntity<String> response = new ResponseEntity<String>(HttpStatus.OK); String instanceId = "123";
- * Mockito.when(restTemplate.exchange(Matchers.anyString(), Matchers.any(HttpMethod.class),
- * Matchers.<HttpEntity<?>>any(), Matchers.<Class<String>>any())).thenReturn(response);
- *
- * ResponseEntity<String> actualResponse = cnfAdapterService.deleteInstanceByInstanceId(instanceId);
- * Assert.assertNotNull(response); Assert.assertEquals(HttpStatus.OK, response.getStatusCode());
- *
- * }
- *
- * }
- */
diff --git a/adapters/mso-nssmf-adapter/pom.xml b/adapters/mso-nssmf-adapter/pom.xml
deleted file mode 100644
index 0099bb3091..0000000000
--- a/adapters/mso-nssmf-adapter/pom.xml
+++ /dev/null
@@ -1,164 +0,0 @@
-<!--
- ~*
- ~============LICENSE_START=======================================================
- ~* ONAP - SO
- ~*================================================================================
- ~* Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
- ~*================================================================================
- ~* Licensed under the Apache License, Version 2.0 (the "License");
- ~* you may not use this file except in compliance with the License.
- ~* You may obtain a copy of the License at
- ~*
- ~* http://www.apache.org/licenses/LICENSE-2.0
- ~*
- ~* Unless required by applicable law or agreed to in writing, software
- ~* distributed under the License is distributed on an "AS IS" BASIS,
- ~* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~* See the License for the specific language governing permissions and
- ~* limitations under the License.
- ~* ============LICENSE_END=========================================================
- ~*/
- -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.onap.so</groupId>
- <artifactId>adapters</artifactId>
- <version>1.7.1-SNAPSHOT</version>
- </parent>
- <groupId>org.onap.so.adapters</groupId>
- <artifactId>mso-nssmf-adapter</artifactId>
- <packaging>jar</packaging>
- <name>mso-nssmf-adapter</name>
- <description>Web service endpoint for nssmf operations</description>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-dependencies</artifactId>
- <version>${springboot.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
- <build>
- <finalName>${project.artifactId}-${project.version}</finalName>
- <plugins>
- <plugin>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-maven-plugin</artifactId>
- <configuration>
- <mainClass>org.onap.so.adapters.nssmf.MSONssmfApplication</mainClass>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>repackage</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.jacoco</groupId>
- <artifactId>jacoco-maven-plugin</artifactId>
- </plugin>
- </plugins>
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- <filtering>true</filtering>
- <excludes>
- <exclude>**/*.p12</exclude>
- <exclude>**/*.jks</exclude>
- </excludes>
- </resource>
- <resource>
- <directory>src/main/resources</directory>
- <filtering>false</filtering>
- <includes>
- <include>**/*.p12</include>
- <include>**/*.jks</include>
- </includes>
- </resource>
- </resources>
- </build>
- <dependencies>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-actuator</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-web</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-jdbc</artifactId>
- <exclusions>
- <exclusion>
- <groupId>org.apache.tomcat</groupId>
- <artifactId>tomcat-jdbc</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-spring-boot-starter-jaxws</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-spring-boot-starter-jaxrs</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-rs-service-description-swagger</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-data-jpa</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-test</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.onap.so</groupId>
- <artifactId>mso-requests-db</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.so</groupId>
- <artifactId>mso-requests-db-repositories</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.mariadb.jdbc</groupId>
- <artifactId>mariadb-java-client</artifactId>
- </dependency>
- <dependency>
- <groupId>ch.vorburger.mariaDB4j</groupId>
- <artifactId>mariaDB4j</artifactId>
- <version>2.2.3</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-configuration-processor</artifactId>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>com.squareup.okhttp3</groupId>
- <artifactId>okhttp</artifactId>
- <version>3.14.0</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.projectlombok</groupId>
- <artifactId>lombok</artifactId>
- </dependency>
- </dependencies>
-</project>
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/MSONssmfApplication.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/MSONssmfApplication.java
deleted file mode 100644
index 83a09dc343..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/MSONssmfApplication.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.nssmf;
-
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-
-@SpringBootApplication(scanBasePackages = {"org.onap.so"})
-public class MSONssmfApplication {
-
- public static void main(String... args) {
- SpringApplication.run(MSONssmfApplication.class, args);
- }
-}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/annotation/RequestLogger.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/annotation/RequestLogger.java
deleted file mode 100644
index 44f814aa10..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/annotation/RequestLogger.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- # Copyright (c) 2020, CMCC Technologies Co., Ltd.
- #
- # Licensed under the Apache License, Version 2.0 (the "License")
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.nssmf.annotation;
-
-
-import java.lang.annotation.*;
-
-@Target({ElementType.METHOD, ElementType.TYPE})
-@Retention(RetentionPolicy.RUNTIME)
-@Documented
-public @interface RequestLogger {
- boolean ignore() default false;
-}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/annotation/ServiceLogger.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/annotation/ServiceLogger.java
deleted file mode 100644
index 1de29bcc2b..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/annotation/ServiceLogger.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- # Copyright (c) 2020, CMCC Technologies Co., Ltd.
- #
- # Licensed under the Apache License, Version 2.0 (the "License")
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.nssmf.annotation;
-
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-@Target({ElementType.METHOD, ElementType.TYPE})
-@Retention(RetentionPolicy.RUNTIME)
-public @interface ServiceLogger {
-
- String value() default "";
-
- boolean ignore() default false;
-}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/config/NssmfAdapterConfig.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/config/NssmfAdapterConfig.java
deleted file mode 100644
index 6a592448a6..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/config/NssmfAdapterConfig.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- # Copyright (c) 2020, CMCC Technologies Co., Ltd.
- #
- # Licensed under the Apache License, Version 2.0 (the "License")
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.nssmf.config;
-
-import lombok.Getter;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.context.annotation.Configuration;
-
-@Configuration
-@Getter
-public class NssmfAdapterConfig {
-
- @Value("${mso.infra.endpoint}")
- private String infraEndpoint;
-
- @Value("${mso.infra.auth}")
- private String infraAuth;
-}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/config/RequestDbConfig.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/config/RequestDbConfig.java
deleted file mode 100644
index dcb5d6198c..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/config/RequestDbConfig.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.nssmf.config;
-
-import javax.persistence.EntityManagerFactory;
-import javax.sql.DataSource;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.boot.jdbc.DataSourceBuilder;
-import org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Primary;
-import org.springframework.context.annotation.Profile;
-import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
-import org.springframework.orm.jpa.JpaTransactionManager;
-import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
-import org.springframework.transaction.PlatformTransactionManager;
-import org.springframework.transaction.annotation.EnableTransactionManagement;
-
-@Profile({"!test"})
-@Configuration
-@EnableTransactionManagement
-@EnableJpaRepositories(entityManagerFactoryRef = "requestEntityManagerFactory",
- transactionManagerRef = "requestTransactionManager", basePackages = {"org.onap.so.db.request.data.repository"})
-public class RequestDbConfig {
-
- @Primary
- @Bean(name = "requestDataSource")
- @ConfigurationProperties(prefix = "spring.datasource")
- public DataSource dataSource() {
- return DataSourceBuilder.create().build();
- }
-
- @Primary
- @Bean(name = "requestEntityManagerFactory")
- public LocalContainerEntityManagerFactoryBean entityManagerFactory(EntityManagerFactoryBuilder builder,
- @Qualifier("requestDataSource") DataSource dataSource) {
- return builder.dataSource(dataSource).packages("org.onap.so.db.request.beans").persistenceUnit("requestDB")
- .build();
- }
-
- @Primary
- @Bean(name = "requestTransactionManager")
- public PlatformTransactionManager transactionManager(
- @Qualifier("requestEntityManagerFactory") EntityManagerFactory entityManagerFactory) {
- return new JpaTransactionManager(entityManagerFactory);
- }
-
-}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/consts/NssmfAdapterConsts.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/consts/NssmfAdapterConsts.java
deleted file mode 100644
index a24f8ef0c7..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/consts/NssmfAdapterConsts.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- # Copyright (c) 2020, CMCC Technologies Co., Ltd.
- #
- # Licensed under the Apache License, Version 2.0 (the "License")
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.nssmf.consts;
-
-import org.onap.so.adapters.nssmf.entity.NssmfUrlInfo;
-import org.onap.so.adapters.nssmf.enums.ActionType;
-import org.onap.so.adapters.nssmf.enums.ExecutorType;
-import org.onap.so.adapters.nssmf.enums.HttpMethod;
-import org.onap.so.beans.nsmf.NetworkType;
-import java.util.HashMap;
-import java.util.Map;
-
-public class NssmfAdapterConsts {
-
- public final static String ONAP_INTERNAL_TAG = "ONAP_internal";
-
- public final static String CURRENT_INTERNAL_NSSMF_API_VERSION = "v1";
-
- private static Map<String, NssmfUrlInfo> urlInfoMap = new HashMap<>();
-
- private final static String EXTERNAL_CN_ALLOCATE_URL = "/api/rest/provMns/{apiVersion}/NSS/SliceProfiles";
-
- private final static String EXTERNAL_TN_ALLOCATE_URL = "/api/rest/provMns/{apiVersion}/tn/NSS/SliceProfiles";
-
- private final static String EXTERNAL_AN_ALLOCATE_URL = "/ObjectManagement/NSS/SliceProfiles";
-
- private final static String INTERNAL_ALLOCATE_URL = "/onap/so/infra/3gppservices/{apiVersion}/allocate";
-
- private final static String EXTERNAL_CN_DEALLOCATE_URL =
- "/api/rest/provMns/{apiVersion}/NSS/SliceProfiles/{sliceProfileId}";
-
- private final static String EXTERNAL_TN_DEALLOCATE_URL =
- "/api/rest/provMns/{apiVersion}/tn/NSS/SliceProfiles/{sliceProfileId}";
-
- private final static String EXTERNAL_AN_DEALLOCATE_URL = "/ObjectManagement/NSS/SliceProfiles/{sliceProfileId}";
-
- private final static String INTERNAL_DEALLOCATE_URL = "/onap/so/infra/3gppservices/{apiVersion}/deAllocate";
-
- private final static String EXTERNAL_CN_ACTIVATE_URL = "/api/rest/provMns/{apiVersion}/NSS/{snssai}/activation";
-
- private final static String EXTERNAL_TN_ACTIVATE_URL = "/api/rest/provMns/{apiVersion}/tn/NSS/{snssai}/activation";
-
- private final static String EXTERNAL_AN_ACTIVATE_URL = "/api/rest/provMns/{apiVersion}/an/NSS/{snssai}/activations";
-
- private final static String INTERNAL_ACTIVATE_URL = "/onap/so/infra/3gppservices/{apiVersion}/activate";
-
- private final static String EXTERNAL_CN_DEACTIVATE_URL = "/api/rest/provMns/{apiVersion}/NSS/{snssai}/deactivation";
-
- private final static String EXTERNAL_TN_DEACTIVATE_URL =
- "/api/rest/provMns/{apiVersion}/tn/NSS/{snssai}/deactivation";
-
- private final static String EXTERNAL_AN_DEACTIVATE_URL =
- "/api/rest/provMns/{apiVersion}/an/NSS/{snssai}/deactivation";
-
- private final static String INTERNAL_DEACTIVATE_URL = "/onap/so/infra/3gppservices/{apiVersion}/deActivate";
-
- //
- private final static String EXTERNAL_CN_TERMINATE_URL =
- "/api/rest/provMns/{apiVersion}/NSS/SliceProfiles/{SliceProfileId}";
-
- private final static String EXTERNAL_TN_TERMINATE_URL =
- "/api/rest/provMns/{apiVersion}/tn/NSS/SliceProfiles/{SliceProfileId}";
-
- private final static String EXTERNAL_AN_TERMINATE_URL =
- "/api/rest/provMns/{apiVersion}/an/NSS/SliceProfiles/{SliceProfileId}";
-
- private final static String INTERNAL_TERMINATE_URL = "/onap/so/infra/3gppservices/{apiVersion}/terminate";
-
- //
- private final static String EXTERNAL_AN_MODIFY_URL =
- "/api/rest/provMns/{apiVersion}/an/NSS/SliceProfiles/{SliceProfileId}";
-
- private final static String INTERNAL_MODIFY_URL = "/onap/so/infra/3gppservices/{apiVersion}/modify";
-
- //
- private final static String EXTERNAL_QUERY_JOB_STATUS = "/api/rest/provMns/{apiVersion}/NSS/jobs/{jobId}";
-
- private final static String INTERNAL_QUERY_SUB_NET_CAPABILITY =
- "/onap/so/infra/3gppservices/{apiVersion}/subnetCapabilityQuery";
-
- static {
- urlInfoMap.put(generateKey(ExecutorType.EXTERNAL, NetworkType.ACCESS, ActionType.ALLOCATE),
- new NssmfUrlInfo(EXTERNAL_AN_ALLOCATE_URL, HttpMethod.POST));
- urlInfoMap.put(generateKey(ExecutorType.EXTERNAL, NetworkType.TRANSPORT, ActionType.ALLOCATE),
- new NssmfUrlInfo(EXTERNAL_TN_ALLOCATE_URL, HttpMethod.POST));
- urlInfoMap.put(generateKey(ExecutorType.EXTERNAL, NetworkType.CORE, ActionType.ALLOCATE),
- new NssmfUrlInfo(EXTERNAL_CN_ALLOCATE_URL, HttpMethod.POST));
- urlInfoMap.put(generateKey(ExecutorType.INTERNAL, null, ActionType.ALLOCATE),
- new NssmfUrlInfo(INTERNAL_ALLOCATE_URL, HttpMethod.POST));
-
- urlInfoMap.put(generateKey(ExecutorType.EXTERNAL, NetworkType.ACCESS, ActionType.DEALLOCATE),
- new NssmfUrlInfo(EXTERNAL_AN_DEALLOCATE_URL, HttpMethod.DELETE));
- urlInfoMap.put(generateKey(ExecutorType.EXTERNAL, NetworkType.TRANSPORT, ActionType.DEALLOCATE),
- new NssmfUrlInfo(EXTERNAL_TN_DEALLOCATE_URL, HttpMethod.DELETE));
- urlInfoMap.put(generateKey(ExecutorType.EXTERNAL, NetworkType.CORE, ActionType.DEALLOCATE),
- new NssmfUrlInfo(EXTERNAL_CN_DEALLOCATE_URL, HttpMethod.DELETE));
- urlInfoMap.put(generateKey(ExecutorType.INTERNAL, null, ActionType.DEALLOCATE),
- new NssmfUrlInfo(INTERNAL_DEALLOCATE_URL, HttpMethod.DELETE));
-
- urlInfoMap.put(generateKey(ExecutorType.EXTERNAL, NetworkType.ACCESS, ActionType.ACTIVATE),
- new NssmfUrlInfo(EXTERNAL_AN_ACTIVATE_URL, HttpMethod.PUT));
- urlInfoMap.put(generateKey(ExecutorType.EXTERNAL, NetworkType.TRANSPORT, ActionType.ACTIVATE),
- new NssmfUrlInfo(EXTERNAL_TN_ACTIVATE_URL, HttpMethod.PUT));
- urlInfoMap.put(generateKey(ExecutorType.EXTERNAL, NetworkType.CORE, ActionType.ACTIVATE),
- new NssmfUrlInfo(EXTERNAL_CN_ACTIVATE_URL, HttpMethod.PUT));
- urlInfoMap.put(generateKey(ExecutorType.INTERNAL, null, ActionType.ACTIVATE),
- new NssmfUrlInfo(INTERNAL_ACTIVATE_URL, HttpMethod.POST));
-
- urlInfoMap.put(generateKey(ExecutorType.EXTERNAL, NetworkType.ACCESS, ActionType.DEACTIVATE),
- new NssmfUrlInfo(EXTERNAL_AN_DEACTIVATE_URL, HttpMethod.PUT));
- urlInfoMap.put(generateKey(ExecutorType.EXTERNAL, NetworkType.TRANSPORT, ActionType.DEACTIVATE),
- new NssmfUrlInfo(EXTERNAL_TN_DEACTIVATE_URL, HttpMethod.PUT));
- urlInfoMap.put(generateKey(ExecutorType.EXTERNAL, NetworkType.CORE, ActionType.DEACTIVATE),
- new NssmfUrlInfo(EXTERNAL_CN_DEACTIVATE_URL, HttpMethod.PUT));
- urlInfoMap.put(generateKey(ExecutorType.INTERNAL, null, ActionType.DEACTIVATE),
- new NssmfUrlInfo(INTERNAL_DEACTIVATE_URL, HttpMethod.POST));
-
- urlInfoMap.put(generateKey(ExecutorType.EXTERNAL, NetworkType.ACCESS, ActionType.TERMINATE),
- new NssmfUrlInfo(EXTERNAL_AN_TERMINATE_URL, HttpMethod.DELETE));
- urlInfoMap.put(generateKey(ExecutorType.EXTERNAL, NetworkType.TRANSPORT, ActionType.TERMINATE),
- new NssmfUrlInfo(EXTERNAL_TN_TERMINATE_URL, HttpMethod.DELETE));
- urlInfoMap.put(generateKey(ExecutorType.EXTERNAL, NetworkType.CORE, ActionType.TERMINATE),
- new NssmfUrlInfo(EXTERNAL_CN_TERMINATE_URL, HttpMethod.DELETE));
- urlInfoMap.put(generateKey(ExecutorType.INTERNAL, null, ActionType.TERMINATE),
- new NssmfUrlInfo(INTERNAL_TERMINATE_URL, HttpMethod.DELETE));
-
- urlInfoMap.put(generateKey(ExecutorType.EXTERNAL, NetworkType.ACCESS, ActionType.MODIFY),
- new NssmfUrlInfo(EXTERNAL_AN_MODIFY_URL, HttpMethod.PUT));
- urlInfoMap.put(generateKey(ExecutorType.EXTERNAL, NetworkType.CORE, ActionType.MODIFY),
- new NssmfUrlInfo(EXTERNAL_CN_ALLOCATE_URL, HttpMethod.PUT));
- urlInfoMap.put(generateKey(ExecutorType.INTERNAL, null, ActionType.MODIFY),
- new NssmfUrlInfo(INTERNAL_MODIFY_URL, HttpMethod.PUT));
-
-
- urlInfoMap.put(generateKey(ExecutorType.EXTERNAL, NetworkType.CORE, ActionType.QUERY_JOB_STATUS),
- new NssmfUrlInfo(EXTERNAL_QUERY_JOB_STATUS, HttpMethod.GET));
- urlInfoMap.put(generateKey(ExecutorType.EXTERNAL, NetworkType.ACCESS, ActionType.QUERY_JOB_STATUS),
- new NssmfUrlInfo(EXTERNAL_QUERY_JOB_STATUS, HttpMethod.GET));
- urlInfoMap.put(generateKey(ExecutorType.EXTERNAL, NetworkType.TRANSPORT, ActionType.QUERY_JOB_STATUS),
- new NssmfUrlInfo(EXTERNAL_QUERY_JOB_STATUS, HttpMethod.GET));
-
- urlInfoMap.put(generateKey(ExecutorType.INTERNAL, null, ActionType.QUERY_SUB_NET_CAPABILITY),
- new NssmfUrlInfo(INTERNAL_QUERY_SUB_NET_CAPABILITY, HttpMethod.GET));
- }
-
- /**
- * get nssmf url info from consts
- *
- * @param executorType {@link ExecutorType}
- * @param networkType {@link NetworkType}
- * @param actionType {@link ActionType}
- * @return {@link NssmfUrlInfo}
- */
- public static NssmfUrlInfo getNssmfUrlInfo(ExecutorType executorType, NetworkType networkType,
- ActionType actionType) {
-
- return urlInfoMap.get(generateKey(executorType, networkType, actionType));
- }
-
- private static String generateKey(ExecutorType executorType, NetworkType networkType, ActionType actionType) {
- if (ExecutorType.EXTERNAL.equals(executorType)) {
- return executorType.name() + "_" + networkType.name() + "_" + actionType.name();
- }
- return executorType.name() + "_" + actionType.name();
- }
-
-
-}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/controller/NssmfAdapterController.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/controller/NssmfAdapterController.java
deleted file mode 100644
index 3732e2c256..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/controller/NssmfAdapterController.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package org.onap.so.adapters.nssmf.controller;
-
-import org.onap.so.adapters.nssmf.annotation.RequestLogger;
-import org.onap.so.adapters.nssmf.service.NssmfManagerService;
-import org.onap.so.beans.nsmf.*;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.ResponseEntity;
-import org.springframework.web.bind.annotation.*;
-import static javax.ws.rs.core.MediaType.APPLICATION_JSON;
-
-@RestController
-@RequestMapping(value = "/api/rest/provMns/v1", produces = {APPLICATION_JSON}, consumes = {APPLICATION_JSON})
-@RequestLogger
-public class NssmfAdapterController {
-
- @Autowired
- private NssmfManagerService nssmfManagerService;
-
- @PostMapping(value = "/NSS/SliceProfiles")
- public ResponseEntity allocateNssi(@RequestBody NssmfAdapterNBIRequest nbiRequest) {
- return nssmfManagerService.allocateNssi(nbiRequest);
- }
-
- @PostMapping(value = "/NSS/SliceProfiles/{sliceProfileId}")
- public ResponseEntity deAllocateNssi(@RequestBody NssmfAdapterNBIRequest nbiRequest,
- @PathVariable("sliceProfileId") final String sliceProfileId) {
- return nssmfManagerService.deAllocateNssi(nbiRequest, sliceProfileId);
- }
-
-
- @PostMapping(value = "/NSS/{snssai}/activation")
- public ResponseEntity activateNssi(@RequestBody NssmfAdapterNBIRequest nbiRequest,
- @PathVariable("snssai") String snssai) {
- return nssmfManagerService.activateNssi(nbiRequest, snssai);
- }
-
- @PostMapping(value = "/NSS/{snssai}/deactivation")
- public ResponseEntity deactivateNssi(@RequestBody NssmfAdapterNBIRequest nbiRequest,
- @PathVariable("snssai") String snssai) {
- return nssmfManagerService.deActivateNssi(nbiRequest, snssai);
- }
-
- @PostMapping(value = "/NSS/jobs/{jobId}")
- public ResponseEntity queryJobStatus(@RequestBody NssmfAdapterNBIRequest nbiRequest,
- @PathVariable("jobId") String jobId) {
- return nssmfManagerService.queryJobStatus(nbiRequest, jobId);
- }
-
- @PostMapping(value = "/NSS/NSSISelectionCapability")
- public ResponseEntity queryNSSISelectionCapability(@RequestBody NssmfAdapterNBIRequest nbiRequest) {
- return nssmfManagerService.queryNSSISelectionCapability(nbiRequest);
- }
-
- @PostMapping(value = "/NSS/subnetCapabilityQuery")
- public ResponseEntity querySubnetCapability(@RequestBody NssmfAdapterNBIRequest nbiRequest) {
- return nssmfManagerService.querySubnetCapability(nbiRequest);
- }
-
-}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/entity/ErrorResponse.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/entity/ErrorResponse.java
deleted file mode 100644
index a8653f8d73..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/entity/ErrorResponse.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.nssmf.entity;
-
-public class ErrorResponse {
-
- private int status;
-
- private String error;
-
- private String message;
-
- public ErrorResponse(int status, String message) {
- this.status = status;
- this.message = message;
- this.error = "Bad Request";
- }
-
- public int getStatus() {
- return status;
- }
-
- public void setStatus(int status) {
- this.status = status;
- }
-
- public String getError() {
- if (status == 500) {
- this.error = "Internal Server Error";
- }
- return error;
- }
-
- public void setError(String error) {
- this.error = error;
- }
-
- public String getMessage() {
- return message;
- }
-
- public void setMessage(String message) {
- this.message = message;
- }
-}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/entity/NssmfInfo.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/entity/NssmfInfo.java
deleted file mode 100644
index af26264074..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/entity/NssmfInfo.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.nssmf.entity;
-
-import lombok.Data;
-
-@Data
-public class NssmfInfo {
-
- private String url;
-
- private String ipAddress;
-
- private String port;
-
- private String insecure;
-
- private String cacert;
-
- private String userName;
-
- private String password;
-}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/entity/NssmfUrlInfo.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/entity/NssmfUrlInfo.java
deleted file mode 100644
index f55ff10f1c..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/entity/NssmfUrlInfo.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package org.onap.so.adapters.nssmf.entity;
-
-import lombok.Data;
-import org.onap.so.adapters.nssmf.enums.HttpMethod;
-
-@Data
-public class NssmfUrlInfo {
-
- private String url;
-
- private HttpMethod httpMethod;
-
- public NssmfUrlInfo(String url, HttpMethod httpMethod) {
- this.url = url;
- this.httpMethod = httpMethod;
- }
-}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/entity/RestResponse.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/entity/RestResponse.java
deleted file mode 100644
index 218867c1ab..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/entity/RestResponse.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.nssmf.entity;
-
-import java.util.Map;
-
-public class RestResponse {
-
- // the response content
- private String responseContent;
-
- // the response status
- private int status;
-
- // the response header
- private Map<String, String> respHeaderMap;
-
- public RestResponse() {
- this.status = -1;
-
- this.respHeaderMap = null;
- }
-
- public int getStatus() {
- return this.status;
- }
-
- public void setStatus(int status) {
- this.status = status;
- }
-
- public Map<String, String> getRespHeaderMap() {
- return this.respHeaderMap;
- }
-
- public void setRespHeaderMap(Map<String, String> header) {
- this.respHeaderMap = header;
- }
-
- public int getRespHeaderInt(String key) {
- if (this.respHeaderMap != null) {
- String result = this.respHeaderMap.get(key);
- if (result != null) {
- return Integer.parseInt(result);
- }
- }
- return -1;
- }
-
- public long getRespHeaderLong(String key) {
- if (this.respHeaderMap != null) {
- String result = this.respHeaderMap.get(key);
- if (result != null) {
- return Long.parseLong(result);
- }
- }
- return -1L;
- }
-
- public String getRespHeaderStr(String key) {
- if (this.respHeaderMap != null) {
- return this.respHeaderMap.get(key);
- }
- return null;
- }
-
- public String getResponseContent() {
- return this.responseContent;
- }
-
- public void setResponseContent(String responseString) {
- this.responseContent = responseString;
- }
-}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/entity/TokenRequest.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/entity/TokenRequest.java
deleted file mode 100644
index bfcb875290..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/entity/TokenRequest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.nssmf.entity;
-
-import lombok.Data;
-
-@Data
-public class TokenRequest {
-
- private String grantType;
-
- private String userName;
-
- private String value;
-}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/entity/TokenResponse.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/entity/TokenResponse.java
deleted file mode 100644
index 552612a6fb..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/entity/TokenResponse.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.nssmf.entity;
-
-
-import lombok.Data;
-
-@Data
-public class TokenResponse {
-
- private String accessToken;
-
- private int expires;
-}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/enums/ActionType.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/enums/ActionType.java
deleted file mode 100644
index 530cc1be0d..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/enums/ActionType.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- # Copyright (c) 2020, CMCC Technologies Co., Ltd.
- #
- # Licensed under the Apache License, Version 2.0 (the "License")
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.nssmf.enums;
-
-import lombok.Getter;
-
-@Getter
-public enum ActionType {
- /**
- * allocate
- */
- ALLOCATE("allocate"),
-
- DEALLOCATE("deallocate"),
-
- CREATE("create"),
-
- TERMINATE("terminate"),
-
- ACTIVATE("activate"),
-
- DEACTIVATE("deactivate"),
-
- QUERY_JOB_STATUS("query_job_status"),
-
- MODIFY_BY_ID("modify_by_id"),
-
- MODIFY("modify"),
-
- QUERY_NSSI_SELECTION_CAPABILITY("query_nssi_selection_capability"),
-
- QUERY_SUB_NET_CAPABILITY("query_sub_net_capability"),;
-
- private String type;
-
-
- ActionType(String type) {
- this.type = type;
- }
-
- public static ActionType getActionType(String value) {
- for (ActionType actionType : ActionType.values()) {
- if (actionType.type.equalsIgnoreCase(value)) {
- return actionType;
- }
- }
- return null;
- }
-}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/enums/ExecutorType.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/enums/ExecutorType.java
deleted file mode 100644
index a76a54c348..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/enums/ExecutorType.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- # Copyright (c) 2020, CMCC Technologies Co., Ltd.
- #
- # Licensed under the Apache License, Version 2.0 (the "License")
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.nssmf.enums;
-
-public enum ExecutorType {
- INTERNAL, EXTERNAL
-}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/enums/HttpMethod.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/enums/HttpMethod.java
deleted file mode 100644
index 9271bb50b3..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/enums/HttpMethod.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.nssmf.enums;
-
-public enum HttpMethod {
- GET, POST, PUT, DELETE, PATCH;
-
- public static HttpMethod fromString(String s) {
- if (s == null)
- return null;
- if (("get").equalsIgnoreCase(s))
- return GET;
- if (("post").equalsIgnoreCase(s))
- return POST;
- if (("put").equalsIgnoreCase(s))
- return PUT;
- if (("delete").equalsIgnoreCase(s))
- return DELETE;
- if (("patch").equalsIgnoreCase(s))
- return PATCH;
- throw new IllegalArgumentException("Invalid value for HTTP Method: " + s);
- }
-}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/enums/JobStatus.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/enums/JobStatus.java
deleted file mode 100644
index d5cc1df377..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/enums/JobStatus.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.nssmf.enums;
-
-import org.onap.so.adapters.nssmf.exceptions.ApplicationException;
-
-
-public enum JobStatus {
- STARTED, PROCESSING, FINISHED, ERROR;
-
- public static JobStatus fromString(String s) throws ApplicationException {
- if (s == null)
- return null;
- if (("started").equalsIgnoreCase(s))
- return STARTED;
- if (("processing").equalsIgnoreCase(s))
- return PROCESSING;
- if (("finished").equalsIgnoreCase(s))
- return FINISHED;
- if (("error").equalsIgnoreCase(s))
- return ERROR;
- throw new ApplicationException(500, "Invalid value for Job " + "Status: " + s);
- }
-}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/enums/SelectionType.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/enums/SelectionType.java
deleted file mode 100644
index 420dfdce49..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/enums/SelectionType.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- # Copyright (c) 2020, CMCC Technologies Co., Ltd.
- #
- # Licensed under the Apache License, Version 2.0 (the "License")
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.nssmf.enums;
-
-public enum SelectionType {
- NSSMF,
-
- NSMF
-}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/exceptions/ApplicationException.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/exceptions/ApplicationException.java
deleted file mode 100644
index 2461f5ca78..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/exceptions/ApplicationException.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.nssmf.exceptions;
-
-import org.onap.so.adapters.nssmf.entity.ErrorResponse;
-import org.springframework.http.ResponseEntity;
-import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.marshal;
-
-public class ApplicationException extends Exception {
-
- private static final long serialVersionUID = 1L;
-
- private int errorCode;
-
- private String errorMsg;
-
- public ApplicationException(int errorCode, String errorMsg) {
- this.errorCode = errorCode;
- this.errorMsg = errorMsg;
- }
-
- public int getErrorCode() {
- return errorCode;
- }
-
- public void setErrorCode(int errorCode) {
- this.errorCode = errorCode;
- }
-
- public String getErrorMsg() {
- return errorMsg;
- }
-
- public void setErrorMsg(String errorMsg) {
- this.errorMsg = errorMsg;
- }
-
- public ResponseEntity buildErrorResponse() {
- String message;
- try {
- ErrorResponse err = new ErrorResponse(errorCode, errorMsg);
- message = marshal(err);
- } catch (ApplicationException e) {
- return ResponseEntity.status(500).body("Internal Server Error");
- }
- return ResponseEntity.status(errorCode).body(message);
- }
-}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/extclients/aai/AaiClientPropertiesImpl.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/extclients/aai/AaiClientPropertiesImpl.java
deleted file mode 100644
index 61adfcf061..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/extclients/aai/AaiClientPropertiesImpl.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.nssmf.extclients.aai;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import org.onap.aaiclient.client.aai.AAIProperties;
-import org.onap.aaiclient.client.aai.AAIVersion;
-import org.onap.so.spring.SpringContextHelper;
-import org.springframework.context.ApplicationContext;
-
-public class AaiClientPropertiesImpl implements AAIProperties {
-
- private final String endpoint;
-
- private final String encryptedBasicAuth;
-
- private final String encrytptionKey;
-
- public AaiClientPropertiesImpl() {
- final ApplicationContext context = SpringContextHelper.getAppContext();
- this.endpoint = context.getEnvironment().getProperty("aai.endpoint");
- this.encryptedBasicAuth = context.getEnvironment().getProperty("aai.auth");
- this.encrytptionKey = context.getEnvironment().getProperty("mso.key");
- }
-
- @Override
- public AAIVersion getDefaultVersion() {
- return AAIVersion.LATEST;
- }
-
- @Override
- public String getAuth() {
- return encryptedBasicAuth;
- }
-
- @Override
- public String getKey() {
- return encrytptionKey;
- }
-
- @Override
- public URL getEndpoint() throws MalformedURLException {
- return new URL(endpoint);
- }
-
- @Override
- public String getSystemName() {
- return "MSO";
- }
-}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/extclients/aai/AaiClientProvider.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/extclients/aai/AaiClientProvider.java
deleted file mode 100644
index 5959b0e6d9..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/extclients/aai/AaiClientProvider.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.nssmf.extclients.aai;
-
-import org.onap.aaiclient.client.aai.AAIResourcesClient;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-@Configuration
-public class AaiClientProvider {
-
- @Bean
- public AAIResourcesClient getAaiClient() {
- return new AAIResourcesClient();
- }
-}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/extclients/aai/AaiServiceProvider.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/extclients/aai/AaiServiceProvider.java
deleted file mode 100644
index 4df2fa16e1..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/extclients/aai/AaiServiceProvider.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.nssmf.extclients.aai;
-
-import org.onap.aai.domain.yang.EsrSystemInfoList;
-import org.onap.aai.domain.yang.EsrThirdpartySdncList;
-import org.onap.aai.domain.yang.ServiceInstance;
-
-public interface AaiServiceProvider {
-
- EsrThirdpartySdncList invokeGetThirdPartySdncList();
-
- EsrSystemInfoList invokeGetThirdPartySdncEsrSystemInfo(String sdncId);
-
- void invokeCreateServiceInstance(ServiceInstance nssiInstance, String globalSubscriberId, String serviceType,
- String serviceInstanceId);
-
- void invokeUpdateServiceInstance(ServiceInstance nssiInstance, String globalSubscriberId, String serviceType,
- String serviceInstanceId);
-
- ServiceInstance invokeGetServiceInstance(String globalSubscriberId, String serviceType, String serviceInstanceId);
-
- void invokeDeleteServiceInstance(String globalSubscriberId, String serviceType, String serviceInstanceId);
-}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/extclients/aai/AaiServiceProviderImpl.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/extclients/aai/AaiServiceProviderImpl.java
deleted file mode 100644
index 688012efe7..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/extclients/aai/AaiServiceProviderImpl.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.nssmf.extclients.aai;
-
-
-import org.onap.aai.domain.yang.EsrSystemInfoList;
-import org.onap.aai.domain.yang.EsrThirdpartySdncList;
-import org.onap.aai.domain.yang.ServiceInstance;
-import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
-import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-@Service
-public class AaiServiceProviderImpl implements AaiServiceProvider {
-
- private static final Logger logger = LoggerFactory.getLogger(AaiServiceProviderImpl.class);
-
- private final AaiClientProvider aaiClientProvider;
-
- @Autowired
- public AaiServiceProviderImpl(final AaiClientProvider aaiClientProvider) {
- this.aaiClientProvider = aaiClientProvider;
- }
-
- @Override
- public EsrThirdpartySdncList invokeGetThirdPartySdncList() {
- return aaiClientProvider.getAaiClient()
- .get(EsrThirdpartySdncList.class,
- AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.externalSystem().esrThirdpartySdncList()))
- .orElseGet(() -> {
- logger.debug("No VNFMs in AAI");
- return null;
- });
- }
-
- @Override
- public EsrSystemInfoList invokeGetThirdPartySdncEsrSystemInfo(String sdncId) {
- return aaiClientProvider.getAaiClient()
- .get(EsrSystemInfoList.class,
- AAIUriFactory.createResourceUri(
- AAIFluentTypeBuilder.externalSystem().esrThirdpartySdnc((sdncId)).esrSystemInfoList()))
- .orElseGet(() -> {
- logger.debug("VNFM not found in AAI");
- return null;
- });
- }
-
-
- @Override
- public void invokeCreateServiceInstance(ServiceInstance nssiInstance, String globalSubscriberId, String serviceType,
- String serviceInstanceId) {
- AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business()
- .customer(globalSubscriberId).serviceSubscription(serviceType).serviceInstance(serviceInstanceId));
- aaiClientProvider.getAaiClient().create(uri, nssiInstance);
- }
-
- @Override
- public void invokeUpdateServiceInstance(ServiceInstance nssiInstance, String globalSubscriberId, String serviceType,
- String serviceInstanceId) {
- AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business()
- .customer(globalSubscriberId).serviceSubscription(serviceType).serviceInstance(serviceInstanceId));
- aaiClientProvider.getAaiClient().update(uri, nssiInstance);
- }
-
- @Override
- public ServiceInstance invokeGetServiceInstance(String globalSubscriberId, String serviceType,
- String serviceInstanceId) {
- AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business()
- .customer(globalSubscriberId).serviceSubscription(serviceType).serviceInstance(serviceInstanceId));
-
- return aaiClientProvider.getAaiClient().get(ServiceInstance.class, uri).orElseGet(() -> {
- logger.debug("ServiceInstance " + serviceInstanceId + " not found in AAI");
- return null;
- });
- }
-
- @Override
- public void invokeDeleteServiceInstance(String globalSubscriberId, String serviceType, String serviceInstanceId) {
- AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business()
- .customer(globalSubscriberId).serviceSubscription(serviceType).serviceInstance(serviceInstanceId));
-
- aaiClientProvider.getAaiClient().delete(uri);
- }
-}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/interceptor/LoggerInterceptor.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/interceptor/LoggerInterceptor.java
deleted file mode 100644
index bca4a12d4b..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/interceptor/LoggerInterceptor.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- # Copyright (c) 2020, CMCC Technologies Co., Ltd.
- #
- # Licensed under the Apache License, Version 2.0 (the "License")
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.nssmf.interceptor;
-
-import org.apache.logging.log4j.ThreadContext;
-import org.springframework.stereotype.Component;
-import org.springframework.web.servlet.HandlerInterceptor;
-import org.springframework.web.servlet.ModelAndView;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.util.UUID;
-
-@Component
-public class LoggerInterceptor implements HandlerInterceptor {
-
- private final static String TRACE_ID = "traceId";
-
- @Override
- public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
- throws Exception {
- String traceId = UUID.randomUUID().toString().replaceAll("-", "").toUpperCase();
- ThreadContext.put(TRACE_ID, traceId);
- return true;
- }
-
- @Override
- public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,
- ModelAndView modelAndView) throws Exception {
-
- }
-
- @Override
- public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)
- throws Exception {
- ThreadContext.remove(TRACE_ID);
- }
-}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/interceptor/RequestLogAspect.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/interceptor/RequestLogAspect.java
deleted file mode 100644
index 95f26b4ad5..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/interceptor/RequestLogAspect.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- # Copyright (c) 2020, CMCC Technologies Co., Ltd.
- #
- # Licensed under the Apache License, Version 2.0 (the "License")
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.adapters.nssmf.interceptor;
-
-import lombok.Data;
-import lombok.ToString;
-import org.aspectj.lang.JoinPoint;
-import org.aspectj.lang.ProceedingJoinPoint;
-import org.aspectj.lang.annotation.*;
-import org.aspectj.lang.reflect.MethodSignature;
-import org.onap.so.adapters.nssmf.annotation.RequestLogger;
-import org.onap.so.adapters.nssmf.annotation.ServiceLogger;
-import org.onap.so.adapters.nssmf.exceptions.ApplicationException;
-import org.onap.so.adapters.nssmf.util.NssmfAdapterUtil;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.core.annotation.Order;
-import org.springframework.stereotype.Component;
-import org.springframework.web.context.request.RequestContextHolder;
-import org.springframework.web.context.request.ServletRequestAttributes;
-import org.springframework.web.multipart.MultipartFile;
-import javax.servlet.http.HttpServletRequest;
-import java.lang.reflect.Method;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * support to print logger of service method
- */
-@Aspect
-@Order(100)
-@Component
-public class RequestLogAspect {
-
- private static final Logger logger = LoggerFactory.getLogger(RequestLogAspect.class);
-
- @Pointcut("execution(* org.onap.so.adapters.nssmf.service..*(..))")
- public void serviceLogger() {
-
- }
-
- @Around("serviceLogger()")
- public Object around(ProceedingJoinPoint joinPoint) {
- try {
- MethodSignature signature = (MethodSignature) joinPoint.getSignature();
- Method method = signature.getMethod();
-
- Class<?> targetClass = method.getDeclaringClass();
-
- StringBuilder classAndMethod = new StringBuilder();
- ServiceLogger classAnnotation = targetClass.getAnnotation(ServiceLogger.class);
- ServiceLogger methodAnnotation = method.getAnnotation(ServiceLogger.class);
-
- if (classAnnotation == null && methodAnnotation == null) {
- return joinPoint.proceed();
- }
-
- if (classAnnotation != null) {
- if (classAnnotation.ignore()) {
- return joinPoint.proceed();
- }
- classAndMethod.append(classAnnotation.value()).append("-");
- }
-
- String target = targetClass.getName() + "#" + method.getName();
-
- String params = NssmfAdapterUtil.marshal(joinPoint.getArgs());
-
- logger.info("{} Start: Method = {} \nParams = {}", classAndMethod.toString(), target, params);
-
- long start = System.currentTimeMillis();
- Object result = joinPoint.proceed();
- long timeConsuming = System.currentTimeMillis() - start;
-
- logger.info("\n{} End: Method = {}, Spend time = {}ms \nResult = {}", classAndMethod.toString(), target,
- timeConsuming, NssmfAdapterUtil.marshal(result));
- return result;
-
- } catch (Throwable e) {
- logger.error(e.getMessage(), e);
- }
- return null;
- }
-
- @Pointcut("execution(* org.onap.so.adapters.nssmf.controller..*(..))")
- public void controllerLogger() {
-
- }
-
- @Around("controllerLogger()")
- public Object doAroundRequest(ProceedingJoinPoint point) throws Throwable {
- MethodSignature signature = (MethodSignature) point.getSignature();
- Method method = signature.getMethod();
- Class<?> targetClass = method.getDeclaringClass();
-
- RequestLogger classAnnotation = targetClass.getAnnotation(RequestLogger.class);
- RequestLogger methodAnnotation = method.getAnnotation(RequestLogger.class);
-
- if ((classAnnotation == null && methodAnnotation == null)
- || (classAnnotation != null && classAnnotation.ignore())
- || (methodAnnotation != null && methodAnnotation.ignore())) {
- return point.proceed();
- }
-
- long start = System.currentTimeMillis();
- ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
-
- assert attributes != null;
- HttpServletRequest request = attributes.getRequest();
- Object result = point.proceed();
- RequestInfo requestInfo = new RequestInfo();
- requestInfo.setIp(request.getRemoteAddr());
- requestInfo.setUrl(request.getRequestURL().toString());
- requestInfo.setHttpMethod(request.getMethod());
- requestInfo.setClassMethod(String.format("%s.%s", signature.getDeclaringTypeName(), signature.getName()));
- requestInfo.setRequestParams(getRequestParamsByProceedingJoinPoint(point));
- requestInfo.setResult(result);
- requestInfo.setTimeCost(System.currentTimeMillis() - start);
- logger.info("Request Info : {}", NssmfAdapterUtil.marshal(requestInfo));
- return result;
- }
-
- @AfterThrowing(pointcut = "controllerLogger()", throwing = "e")
- public void doAfterRequestThrow(JoinPoint joinPoint, RuntimeException e) {
- MethodSignature signature = (MethodSignature) joinPoint.getSignature();
- Method method = signature.getMethod();
- Class<?> targetClass = method.getDeclaringClass();
-
- RequestLogger classAnnotation = targetClass.getAnnotation(RequestLogger.class);
- RequestLogger methodAnnotation = method.getAnnotation(RequestLogger.class);
-
- if ((classAnnotation == null && methodAnnotation == null)
- || (classAnnotation != null && classAnnotation.ignore())
- || (methodAnnotation != null && methodAnnotation.ignore())) {
- return;
- }
- ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
- assert attributes != null;
- HttpServletRequest request = attributes.getRequest();
- RequestErrorInfo requestErrorInfo = new RequestErrorInfo();
- requestErrorInfo.setIp(request.getRemoteAddr());
- requestErrorInfo.setUrl(request.getRequestURL().toString());
- requestErrorInfo.setHttpMethod(request.getMethod());
- requestErrorInfo.setClassMethod(String.format("%s.%s", joinPoint.getSignature().getDeclaringTypeName(),
- joinPoint.getSignature().getName()));
- requestErrorInfo.setRequestParams(getRequestParamsByJoinPoint(joinPoint));
- requestErrorInfo.setException(e);
- String res;
- try {
- res = NssmfAdapterUtil.marshal(requestErrorInfo);
- logger.info("Error Request Info : {}", res);
- } catch (ApplicationException ex) {
- logger.info("Error Request Info : {}", requestErrorInfo);
- }
- }
-
- private Map<String, Object> getRequestParamsByJoinPoint(JoinPoint joinPoint) {
- String[] paramNames = ((MethodSignature) joinPoint.getSignature()).getParameterNames();
- Object[] paramValues = joinPoint.getArgs();
-
- return buildRequestParam(paramNames, paramValues);
- }
-
-
- private Map<String, Object> getRequestParamsByProceedingJoinPoint(ProceedingJoinPoint proceedingJoinPoint) {
- String[] paramNames = ((MethodSignature) proceedingJoinPoint.getSignature()).getParameterNames();
- Object[] paramValues = proceedingJoinPoint.getArgs();
-
- return buildRequestParam(paramNames, paramValues);
- }
-
- private Map<String, Object> buildRequestParam(String[] paramNames, Object[] paramValues) {
- Map<String, Object> requestParams = new HashMap<>();
- for (int i = 0; i < paramNames.length; i++) {
- Object value = paramValues[i];
-
- if (value instanceof MultipartFile) {
- MultipartFile file = (MultipartFile) value;
- value = file.getOriginalFilename();
- }
-
- requestParams.put(paramNames[i], value);
- }
-
- return requestParams;
- }
-
- @Data
- @ToString
- private class RequestInfo {
- private String ip;
- private String url;
- private String httpMethod;
- private String classMethod;
- private Object requestParams;
- private Object result;
- private Long timeCost;
- }
-
- @Data
- @ToString
- private class RequestErrorInfo {
- private String ip;
- private String url;
- private String httpMethod;
- private String classMethod;
- private Object requestParams;
- private RuntimeException exception;
- }
-}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/NssmfManager.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/NssmfManager.java
deleted file mode 100644
index 54ef1e09dd..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/NssmfManager.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- # Copyright (c) 2020, CMCC Technologies Co., Ltd.
- #
- # Licensed under the Apache License, Version 2.0 (the "License")
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.nssmf.manager;
-
-import org.onap.so.adapters.nssmf.exceptions.ApplicationException;
-import org.onap.so.adapters.nssmf.entity.RestResponse;
-import org.onap.so.beans.nsmf.*;
-
-public interface NssmfManager {
-
- RestResponse allocateNssi(NssmfAdapterNBIRequest nssmfRequest) throws ApplicationException;
-
- RestResponse deAllocateNssi(NssmfAdapterNBIRequest nssmfRequest, String sliceId) throws ApplicationException;
-
- RestResponse activateNssi(NssmfAdapterNBIRequest nssmfRequest, String snssai) throws ApplicationException;
-
- RestResponse deActivateNssi(NssmfAdapterNBIRequest nssmfRequest, String snssai) throws ApplicationException;
-
- RestResponse queryJobStatus(NssmfAdapterNBIRequest jobReq, String jobId) throws ApplicationException;
-
- RestResponse queryNSSISelectionCapability(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException;
-
- RestResponse querySubnetCapability(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException;
-
- RestResponse modifyNssi(NssmfAdapterNBIRequest modifyRequest) throws ApplicationException;
-}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/NssmfManagerBuilder.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/NssmfManagerBuilder.java
deleted file mode 100644
index e397201e4b..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/NssmfManagerBuilder.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- # Copyright (c) 2020, CMCC Technologies Co., Ltd.
- #
- # Licensed under the Apache License, Version 2.0 (the "License")
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.nssmf.manager;
-
-import org.onap.so.adapters.nssmf.config.NssmfAdapterConfig;
-import org.onap.so.adapters.nssmf.consts.NssmfAdapterConsts;
-import org.onap.so.adapters.nssmf.enums.ActionType;
-import org.onap.so.adapters.nssmf.enums.ExecutorType;
-import org.onap.so.adapters.nssmf.exceptions.ApplicationException;
-import org.onap.so.adapters.nssmf.manager.impl.external.ExternalAnNssmfManager;
-import org.onap.so.adapters.nssmf.manager.impl.external.ExternalCnNssmfManager;
-import org.onap.so.adapters.nssmf.manager.impl.internal.InternalAnNssmfManager;
-import org.onap.so.adapters.nssmf.manager.impl.internal.InternalCnNssmfManager;
-import org.onap.so.adapters.nssmf.manager.impl.internal.InternalTnNssmfManager;
-import org.onap.so.adapters.nssmf.manager.impl.*;
-import org.onap.so.adapters.nssmf.util.RestUtil;
-import org.onap.so.beans.nsmf.EsrInfo;
-import org.onap.so.beans.nsmf.NetworkType;
-import org.onap.so.beans.nsmf.ServiceInfo;
-import org.onap.so.db.request.data.repository.ResourceOperationStatusRepository;
-
-public class NssmfManagerBuilder {
-
- private BaseNssmfManager nssmfManger;
-
- private RestUtil restUtil;
-
- private ActionType actionType;
-
- private ResourceOperationStatusRepository repository;
-
- private ServiceInfo serviceInfo;
-
- private NssmfAdapterConfig adapterConfig;
-
- public NssmfManagerBuilder(EsrInfo esrInfo) throws ApplicationException {
-
- ExecutorType executorType = getExecutorType(esrInfo);
- NetworkType networkType = esrInfo.getNetworkType();
-
- if (ExecutorType.INTERNAL.equals(executorType) && NetworkType.CORE.equals(networkType)) {
- this.nssmfManger = new InternalCnNssmfManager().setEsrInfo(esrInfo).setExecutorType(executorType);
- return;
- }
-
- if (ExecutorType.INTERNAL.equals(executorType) && NetworkType.TRANSPORT.equals(networkType)) {
- this.nssmfManger = new InternalTnNssmfManager().setEsrInfo(esrInfo).setExecutorType(executorType);
- return;
- }
-
- if (ExecutorType.INTERNAL.equals(executorType) && NetworkType.ACCESS.equals(networkType)) {
- this.nssmfManger = new InternalAnNssmfManager().setEsrInfo(esrInfo).setExecutorType(executorType);
- return;
- }
-
- if (ExecutorType.EXTERNAL.equals(executorType) && NetworkType.CORE.equals(networkType)) {
- this.nssmfManger = new ExternalCnNssmfManager().setEsrInfo(esrInfo).setExecutorType(executorType)
- .setInitStatus("deactivated");
- return;
- }
-
- if (ExecutorType.EXTERNAL.equals(executorType) && NetworkType.TRANSPORT.equals(networkType)) {
- this.nssmfManger = new ExternalAnNssmfManager().setEsrInfo(esrInfo).setExecutorType(executorType)
- .setInitStatus("activated");
- return;
- }
-
- if (ExecutorType.EXTERNAL.equals(executorType) && NetworkType.ACCESS.equals(networkType)) {
- this.nssmfManger = new ExternalAnNssmfManager().setEsrInfo(esrInfo).setExecutorType(executorType)
- .setInitStatus("activated");
- return;
- }
-
- throw new ApplicationException(404, "invalid domain and simulator");
- }
-
- private ExecutorType getExecutorType(EsrInfo esrInfo) {
- if (NssmfAdapterConsts.ONAP_INTERNAL_TAG.equals(esrInfo.getVendor())) {
- return ExecutorType.INTERNAL;
- }
- return ExecutorType.EXTERNAL;
- }
-
- public NssmfManagerBuilder setRestUtil(RestUtil restUtil) {
- this.restUtil = restUtil;
- return this;
- }
-
- public NssmfManagerBuilder setActionType(ActionType actionType) {
- this.actionType = actionType;
- return this;
- }
-
- public NssmfManagerBuilder setRepository(ResourceOperationStatusRepository repository) {
- this.repository = repository;
- return this;
- }
-
- public NssmfManagerBuilder setServiceInfo(ServiceInfo serviceInfo) {
- this.serviceInfo = serviceInfo;
- return this;
- }
-
- public NssmfManagerBuilder setAdapterConfig(NssmfAdapterConfig adapterConfig) {
- this.adapterConfig = adapterConfig;
- return this;
- }
-
- public NssmfManager build() {
- return this.nssmfManger.setRestUtil(restUtil).setAdapterConfig(adapterConfig).setRepository(repository)
- .setActionType(actionType).setServiceInfo(serviceInfo);
- }
-}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/BaseNssmfManager.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/BaseNssmfManager.java
deleted file mode 100644
index 0456c90fae..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/BaseNssmfManager.java
+++ /dev/null
@@ -1,282 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- # Copyright (c) 2020, CMCC Technologies Co., Ltd.
- #
- # Licensed under the Apache License, Version 2.0 (the "License")
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.nssmf.manager.impl;
-
-import org.onap.so.adapters.nssmf.config.NssmfAdapterConfig;
-import org.onap.so.adapters.nssmf.consts.NssmfAdapterConsts;
-import org.onap.so.adapters.nssmf.entity.NssmfUrlInfo;
-import org.onap.so.adapters.nssmf.enums.*;
-import org.onap.so.adapters.nssmf.exceptions.ApplicationException;
-import org.onap.so.adapters.nssmf.entity.RestResponse;
-import org.onap.so.adapters.nssmf.manager.NssmfManager;
-import org.onap.so.adapters.nssmf.util.RestUtil;
-import org.onap.so.beans.nsmf.*;
-import org.onap.so.db.request.beans.ResourceOperationStatus;
-import org.onap.so.db.request.data.repository.ResourceOperationStatusRepository;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.data.domain.Example;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Optional;
-import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.marshal;
-
-public abstract class BaseNssmfManager implements NssmfManager {
-
- private static final Logger logger = LoggerFactory.getLogger(BaseNssmfManager.class);
-
- protected RestUtil restUtil;
-
- protected ResourceOperationStatusRepository repository;
-
- protected NssmfAdapterConfig adapterConfig;
-
- protected ActionType actionType;
-
- protected EsrInfo esrInfo;
-
- protected String nssmfUrl;
-
- protected HttpMethod httpMethod;
-
- protected String initStatus;
-
- protected ServiceInfo serviceInfo;
-
- protected RestResponse restResponse;
-
- private ExecutorType executorType = ExecutorType.INTERNAL;
-
- private Map<String, String> params = new HashMap<>(); // request params
-
- @Override
- public RestResponse allocateNssi(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException {
-
- this.params.clear();
- this.urlHandler();
- String requestBody = wrapAllocateReqBody(nbiRequest);
-
- this.restResponse = sendRequest(requestBody);
-
- this.afterRequest();
-
- return restResponse;
- }
-
- protected abstract String wrapAllocateReqBody(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException;
-
- @Override
- public RestResponse modifyNssi(NssmfAdapterNBIRequest modifyRequest) throws ApplicationException {
- this.params.clear();
- this.urlHandler();
- String requestBody = wrapModifyReqBody(modifyRequest);
-
- this.restResponse = sendRequest(requestBody);
-
- this.afterRequest();
-
- return restResponse;
- }
-
- protected abstract String wrapModifyReqBody(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException;
-
- @Override
- public RestResponse deAllocateNssi(NssmfAdapterNBIRequest nbiRequest, String sliceId) throws ApplicationException {
- this.params.clear();
- this.params.put("sliceProfileId", sliceId);
-
- this.urlHandler();
-
- String reqBody = wrapDeAllocateReqBody(nbiRequest.getDeAllocateNssi());
-
- this.restResponse = sendRequest(reqBody);
-
- this.afterRequest();
-
- return restResponse;
- }
-
- protected abstract String wrapDeAllocateReqBody(DeAllocateNssi deAllocateNssi) throws ApplicationException;
-
- protected abstract String wrapReqBody(Object object) throws ApplicationException;
-
- @Override
- public RestResponse activateNssi(NssmfAdapterNBIRequest nbiRequest, String snssai) throws ApplicationException {
- this.params.clear();
- this.params.put("snssai", snssai);
-
- this.urlHandler();
-
- String reqBody = wrapActDeActReqBody(nbiRequest.getActDeActNssi());
-
- this.restResponse = sendRequest(reqBody);
-
- this.afterRequest();
-
- return restResponse;
- }
-
- @Override
- public RestResponse deActivateNssi(NssmfAdapterNBIRequest nbiRequest, String snssai) throws ApplicationException {
- return activateNssi(nbiRequest, snssai);
- }
-
- protected abstract String wrapActDeActReqBody(ActDeActNssi actDeActNssi) throws ApplicationException;
-
- @Override
- public RestResponse queryJobStatus(NssmfAdapterNBIRequest jobReq, String jobId) throws ApplicationException {
- this.params.clear();
- this.params.put("jobId", jobId);
- if (jobReq.getResponseId() != null) {
- this.params.put("responseId", jobReq.getResponseId());
- }
- this.urlHandler();
-
- /**
- * find by jobId and nsiId jobId -> OperationId nsiId -> ServiceId serviceUuid -> resourceTemplateUUID
- */
- ResourceOperationStatus status =
- getOperationStatus(serviceInfo.getNsiId(), jobId, serviceInfo.getServiceUuid());
-
- logger.info("ResourceOperationStatus = {}", status);
- this.restResponse = doQueryJobStatus(status);
-
- afterQueryJobStatus(status);
- return restResponse;
- }
-
- protected abstract RestResponse doQueryJobStatus(ResourceOperationStatus status) throws ApplicationException;
-
-
- protected abstract void afterQueryJobStatus(ResourceOperationStatus status);
-
- private ResourceOperationStatus getOperationStatus(String nsiId, String jobId, String serviceUuid) {
-
- logger.info("Query operations: nsiId = [{}], jobId = [{}], serviceUuid = [{}]", nsiId, jobId, serviceUuid);
-
- List<ResourceOperationStatus> resourceOperationStatuses =
- repository.findByServiceIdAndOperationId(nsiId, jobId);
-
- logger.info("resourceOperationStatuses = {}", resourceOperationStatuses);
- if (resourceOperationStatuses.size() == 0) {
- return null;
- }
- return resourceOperationStatuses.get(0);
- }
-
- @Override
- public RestResponse queryNSSISelectionCapability(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException {
- SelectionType res = doQueryNSSISelectionCapability();
- HashMap<String, String> hashMap = new HashMap<>();
- hashMap.put("selection", res.name());
- RestResponse restResponse = new RestResponse();
- restResponse.setStatus(200);
- restResponse.setResponseContent(marshal(hashMap));
- return restResponse;
- }
-
- protected abstract SelectionType doQueryNSSISelectionCapability();
-
- @Override
- public RestResponse querySubnetCapability(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException {
- this.params.clear();
- this.urlHandler();
-
- return doQuerySubnetCapability(nbiRequest.getSubnetCapabilityQuery());
- }
-
- protected abstract RestResponse doQuerySubnetCapability(QuerySubnetCapability req) throws ApplicationException;
-
- /**
- * send request to nssmf
- *
- * @param content request body
- * @return response
- * @throws ApplicationException
- */
- protected abstract RestResponse sendRequest(String content) throws ApplicationException;
-
- /**
- * handle the url before request to nssmf, include get the nssmf request url, replace the path variable
- */
- private void urlHandler() {
- NssmfUrlInfo nssmfUrlInfo =
- NssmfAdapterConsts.getNssmfUrlInfo(this.executorType, this.esrInfo.getNetworkType(), actionType);
- if (nssmfUrlInfo != null) {
- this.nssmfUrl = nssmfUrlInfo.getUrl();
- this.httpMethod = nssmfUrlInfo.getHttpMethod();
- this.nssmfUrl = nssmfUrl.replaceAll("\\{apiVersion}", getApiVersion());
- this.params.forEach((k, v) -> this.nssmfUrl = this.nssmfUrl.replaceAll("\\{" + k + "}", v));
- }
- }
-
- /**
- * after request
- */
- protected abstract void afterRequest() throws ApplicationException;
-
- protected abstract String getApiVersion();
-
- public RestUtil getRestUtil() {
- return restUtil;
- }
-
- public BaseNssmfManager setEsrInfo(EsrInfo esrInfo) {
- this.esrInfo = esrInfo;
- return this;
- }
-
- public BaseNssmfManager setExecutorType(ExecutorType executorType) {
- this.executorType = executorType;
- return this;
- }
-
- public BaseNssmfManager setRestUtil(RestUtil restUtil) {
- this.restUtil = restUtil;
- return this;
- }
-
- public BaseNssmfManager setActionType(ActionType actionType) {
- this.actionType = actionType;
- return this;
- }
-
- public BaseNssmfManager setRepository(ResourceOperationStatusRepository repository) {
- this.repository = repository;
- return this;
- }
-
- public BaseNssmfManager setServiceInfo(ServiceInfo serviceInfo) {
- this.serviceInfo = serviceInfo;
- return this;
- }
-
- public BaseNssmfManager setInitStatus(String initStatus) {
- this.initStatus = initStatus;
- return this;
- }
-
- public BaseNssmfManager setAdapterConfig(NssmfAdapterConfig adapterConfig) {
- this.adapterConfig = adapterConfig;
- return this;
- }
-}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/ExternalNssmfManager.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/ExternalNssmfManager.java
deleted file mode 100644
index 7c4bd50852..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/ExternalNssmfManager.java
+++ /dev/null
@@ -1,243 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- # Copyright (c) 2020, CMCC Technologies Co., Ltd.
- #
- # Licensed under the Apache License, Version 2.0 (the "License")
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.nssmf.manager.impl;
-
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.core.type.TypeReference;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import org.apache.http.Header;
-import org.apache.http.HttpStatus;
-import org.apache.http.message.BasicHeader;
-import org.onap.aai.domain.yang.ServiceInstance;
-import org.onap.so.adapters.nssmf.entity.NssmfInfo;
-import org.onap.so.adapters.nssmf.entity.RestResponse;
-import org.onap.so.adapters.nssmf.enums.ActionType;
-import org.onap.so.adapters.nssmf.enums.JobStatus;
-import org.onap.so.adapters.nssmf.exceptions.ApplicationException;
-import org.onap.so.adapters.nssmf.util.NssmfAdapterUtil;
-import org.onap.so.beans.nsmf.*;
-import org.onap.so.db.request.beans.ResourceOperationStatus;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import java.io.InputStream;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import static java.lang.String.valueOf;
-import static org.onap.so.adapters.nssmf.enums.JobStatus.*;
-import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.StatusDesc.QUERY_JOB_STATUS_FAILED;
-import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.StatusDesc.QUERY_JOB_STATUS_SUCCESS;
-import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.marshal;
-import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.unMarshal;
-
-public abstract class ExternalNssmfManager extends BaseNssmfManager {
-
- private static final Logger logger = LoggerFactory.getLogger(ExternalNssmfManager.class);
-
- @Override
- protected String wrapAllocateReqBody(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException {
- return doWrapExtAllocateReqBody(nbiRequest);
- }
-
- protected abstract String doWrapExtAllocateReqBody(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException;
-
- @Override
- protected String wrapModifyReqBody(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException {
- return doWrapModifyReqBody(nbiRequest);
- }
-
- protected abstract String doWrapModifyReqBody(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException;
-
- @Override
- protected String wrapDeAllocateReqBody(DeAllocateNssi deAllocateNssi) throws ApplicationException {
- return doWrapDeAllocateReqBody(deAllocateNssi);
- }
-
- protected abstract String doWrapDeAllocateReqBody(DeAllocateNssi deAllocateNssi) throws ApplicationException;
-
- @Override
- protected void afterQueryJobStatus(ResourceOperationStatus status) {
- logger.info("afterQueryJobStatus = " + status);
- if (Integer.parseInt(status.getProgress()) == 100) {
- logger.info("after query finished = " + status);
- ActionType jobOperType = ActionType.valueOf(status.getOperType());
-
- if (ActionType.ALLOCATE.equals(jobOperType)) {
- ServiceInstance nssiInstance = restUtil.getServiceInstance(serviceInfo);
- if (nssiInstance == null) {
- nssiInstance = new ServiceInstance();
- }
-
- nssiInstance.setServiceInstanceId(serviceInfo.getNssiId());
- nssiInstance.setServiceInstanceName(serviceInfo.getNssiName());
- nssiInstance.setServiceType(serviceInfo.getSST());
-
- nssiInstance.setOrchestrationStatus(initStatus);
- nssiInstance.setModelInvariantId(serviceInfo.getServiceInvariantUuid());
- nssiInstance.setModelVersionId(serviceInfo.getServiceUuid());
- nssiInstance.setServiceInstanceLocationId(serviceInfo.getPLMNIdList());
- nssiInstance.setEnvironmentContext(esrInfo.getNetworkType().getNetworkType());
- nssiInstance.setServiceRole("nssi");
-
- restUtil.createServiceInstance(nssiInstance, serviceInfo);
- } else if (ActionType.DEALLOCATE.equals(jobOperType)) {
- // TODO
- restUtil.deleteServiceInstance(serviceInfo);
- }
- }
- }
-
- @Override
- protected String wrapActDeActReqBody(ActDeActNssi actDeActNssi) throws ApplicationException {
- return marshal(actDeActNssi);
- }
-
- @Override
- protected RestResponse doQueryJobStatus(ResourceOperationStatus status) throws ApplicationException {
- return doResponseStatus(status);
- }
-
- private RestResponse doResponseStatus(ResourceOperationStatus status) throws ApplicationException {
- RestResponse restResponse = sendRequest(null);
- JobStatusResponse jobStatusResponse = unMarshal(restResponse.getResponseContent(), JobStatusResponse.class);
-
- ResponseDescriptor rspDesc = jobStatusResponse.getResponseDescriptor();
-
- logger.info("status = {}", status);
- rspDesc.setNssiId(status.getResourceInstanceID());
-
- jobStatusResponse.setResponseDescriptor(rspDesc);
- restResponse.setResponseContent(marshal(jobStatusResponse));
- updateRequestDbJobStatus(rspDesc, status, restResponse);
- return restResponse;
- }
-
- @Override
- protected String wrapReqBody(Object object) throws ApplicationException {
- return marshal(object);
- }
-
- @Override
- protected RestResponse sendRequest(String content) throws ApplicationException {
- return sendExternalRequest(content);
- }
-
- @Override
- protected String getApiVersion() {
- return "v1";
- }
-
-
- // external
- protected RestResponse sendExternalRequest(String content) throws ApplicationException {
- NssmfInfo nssmfInfo = restUtil.getNssmfHost(esrInfo);
- Header header = new BasicHeader("X-Auth-Token", restUtil.getToken(nssmfInfo));
- String nssmfUrl = nssmfInfo.getUrl() + this.nssmfUrl;
- return restUtil.send(nssmfUrl, this.httpMethod, content, header);
- }
-
- protected void updateRequestDbJobStatus(ResponseDescriptor rspDesc, ResourceOperationStatus status,
- RestResponse rsp) throws ApplicationException {
- status.setProgress(Integer.toString(rspDesc.getProgress()));
- switch (fromString(rspDesc.getStatus())) {
- case STARTED:
- updateDbStatus(status, rsp.getStatus(), STARTED, QUERY_JOB_STATUS_SUCCESS);
- break;
- case PROCESSING:
- updateDbStatus(status, rsp.getStatus(), PROCESSING, QUERY_JOB_STATUS_SUCCESS);
- break;
- case FINISHED:
- if (rspDesc.getProgress() == 100) {
- updateDbStatus(status, rsp.getStatus(), FINISHED, QUERY_JOB_STATUS_SUCCESS);
- }
- break;
- case ERROR:
- updateDbStatus(status, rsp.getStatus(), ERROR, QUERY_JOB_STATUS_FAILED);
- throw new ApplicationException(500, QUERY_JOB_STATUS_FAILED);
- default:
- throw new ApplicationException(500, QUERY_JOB_STATUS_FAILED);
- }
- }
-
- protected void updateDbStatus(ResourceOperationStatus status, int rspStatus, JobStatus jobStatus,
- String description) {
- status.setErrorCode(valueOf(rspStatus));
- status.setStatus(jobStatus.toString());
- status.setStatusDescription(description);
- repository.save(status);
- }
-
- @Override
- protected RestResponse doQuerySubnetCapability(QuerySubnetCapability req) throws ApplicationException {
-
- ObjectMapper oMapper = new ObjectMapper();
- InputStream inputStream = TypeReference.class.getResourceAsStream("/subnetCapability.json");
- Map subnetCapability = new HashMap<>();
- try {
- subnetCapability = oMapper.readValue(inputStream, Map.class);
- } catch (Exception e) {
- logger.debug("Exception while reading subnet capability value from json", e);
- }
- Map<String, Object> responseMap = new HashMap<>();
- List<String> subnetTypes = req.getSubnetTypes();
- for (String value : subnetTypes) {
- if (subnetCapability.containsKey(value)) {
- responseMap.put(value, subnetCapability.get(value));
- }
- }
- String response = null;
- try {
- response = oMapper.writeValueAsString(responseMap);
- } catch (JsonProcessingException e) {
- logger.debug("Exception while converting subnet capability object to String {}", e.getMessage());
- }
-
- RestResponse rsp = new RestResponse();
- rsp.setStatus(HttpStatus.SC_OK);
- rsp.setResponseContent(response);
- return rsp;
- }
-
- /**
- * after request, if response code is 2XX, continue handle, else return
- */
- @Override
- protected void afterRequest() throws ApplicationException {
- if (valueOf(restResponse.getStatus()).startsWith("2")) {
- doAfterRequest();
- }
- }
-
-
- protected void doAfterRequest() throws ApplicationException {
- //
- NssiResponse response = unMarshal(restResponse.getResponseContent(), NssiResponse.class);
- ResourceOperationStatus status =
- new ResourceOperationStatus(serviceInfo.getNsiId(), response.getJobId(), serviceInfo.getServiceUuid());
- status.setResourceInstanceID(response.getNssiId());
- status.setOperType(actionType.toString());
- status.setProgress("0");
-
- response.setStatus(STARTED.toString());
- restResponse.setResponseContent(marshal(response));
- updateDbStatus(status, restResponse.getStatus(), STARTED, NssmfAdapterUtil.getStatusDesc(actionType));
- }
-}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/InternalNssmfManager.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/InternalNssmfManager.java
deleted file mode 100644
index 64ab199bc1..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/InternalNssmfManager.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- # Copyright (c) 2020, CMCC Technologies Co., Ltd.
- #
- # Licensed under the Apache License, Version 2.0 (the "License")
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.nssmf.manager.impl;
-
-import org.apache.http.Header;
-import org.apache.http.message.BasicHeader;
-import org.onap.so.adapters.nssmf.consts.NssmfAdapterConsts;
-import org.onap.so.adapters.nssmf.entity.RestResponse;
-import org.onap.so.adapters.nssmf.enums.SelectionType;
-import org.onap.so.adapters.nssmf.exceptions.ApplicationException;
-import org.onap.so.beans.nsmf.*;
-import org.onap.so.db.request.beans.ResourceOperationStatus;
-import static org.onap.so.adapters.nssmf.enums.JobStatus.PROCESSING;
-import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.marshal;
-
-public abstract class InternalNssmfManager extends BaseNssmfManager {
-
- @Override
- protected String wrapAllocateReqBody(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException {
- return doWrapAllocateReqBody(nbiRequest);
- }
-
- protected abstract String doWrapAllocateReqBody(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException;
-
- @Override
- protected String wrapReqBody(Object object) throws ApplicationException {
- NssmfRequest nssmfRequest = new NssmfRequest(serviceInfo, esrInfo.getNetworkType(), object);
- return marshal(nssmfRequest);
- }
-
-
- @Override
- protected String wrapActDeActReqBody(ActDeActNssi actDeActNssi) throws ApplicationException {
-
- return wrapReqBody(actDeActNssi);
- }
-
-
- @Override
- protected String wrapDeAllocateReqBody(DeAllocateNssi deAllocateNssi) throws ApplicationException {
- return wrapReqBody(deAllocateNssi);
- }
-
-
- @Override
- protected RestResponse doQueryJobStatus(ResourceOperationStatus status) throws ApplicationException {
- return responseDBStatus(status);
- }
-
- private RestResponse responseDBStatus(ResourceOperationStatus status) throws ApplicationException {
- JobStatusResponse statusResponse = new JobStatusResponse();
- ResponseDescriptor descriptor = new ResponseDescriptor();
- if (status == null) {
- descriptor.setProgress(0);
- descriptor.setStatus(PROCESSING.name());
- descriptor.setStatusDescription("Initiating Nssi Instance");
- } else {
- descriptor.setStatus(status.getStatus());
- descriptor.setStatusDescription(status.getStatusDescription());
- descriptor.setProgress(Integer.parseInt(status.getProgress()));
- descriptor.setNssiId(status.getResourceInstanceID());
- }
- statusResponse.setResponseDescriptor(descriptor);
- return restUtil.createResponse(200, marshal(statusResponse));
- }
-
- @Override
- protected RestResponse sendRequest(String content) {
- return sendInternalRequest(content);
- }
-
- @Override
- protected void afterRequest() {
- //
- }
-
- @Override
- protected void afterQueryJobStatus(ResourceOperationStatus status) {
- // internal
- }
-
- // internal
- private RestResponse sendInternalRequest(String content) {
- Header header = new BasicHeader("Authorization", adapterConfig.getInfraAuth());
- this.nssmfUrl = adapterConfig.getInfraEndpoint() + this.nssmfUrl;
- return restUtil.send(this.nssmfUrl, this.httpMethod, content, header);
- }
-
- @Override
- protected String getApiVersion() {
- return NssmfAdapterConsts.CURRENT_INTERNAL_NSSMF_API_VERSION;
- }
-
-
- @Override
- protected SelectionType doQueryNSSISelectionCapability() {
- return SelectionType.NSSMF;
- }
-
- @Override
- protected String wrapModifyReqBody(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException {
- return doWrapModifyReqBody(nbiRequest);
- }
-
- protected abstract String doWrapModifyReqBody(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException;
-
- @Override
- protected RestResponse doQuerySubnetCapability(QuerySubnetCapability req) throws ApplicationException {
- // handler
- return sendRequest(marshal(req));
- }
-}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/external/ExternalAnNssmfManager.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/external/ExternalAnNssmfManager.java
deleted file mode 100644
index 1af6d15c06..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/external/ExternalAnNssmfManager.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- # Copyright (c) 2020, CMCC Technologies Co., Ltd.
- #
- # Licensed under the Apache License, Version 2.0 (the "License")
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.nssmf.manager.impl.external;
-
-import org.onap.so.adapters.nssmf.entity.RestResponse;
-import org.onap.so.adapters.nssmf.enums.ActionType;
-import org.onap.so.adapters.nssmf.enums.JobStatus;
-import org.onap.so.adapters.nssmf.enums.SelectionType;
-import org.onap.so.adapters.nssmf.exceptions.ApplicationException;
-import org.onap.so.adapters.nssmf.manager.impl.ExternalNssmfManager;
-import org.onap.so.adapters.nssmf.util.NssmfAdapterUtil;
-import org.onap.so.beans.nsmf.AnSliceProfile;
-import org.onap.so.beans.nsmf.DeAllocateNssi;
-import org.onap.so.beans.nsmf.NssiResponse;
-import org.onap.so.beans.nsmf.NssmfAdapterNBIRequest;
-import org.onap.so.beans.nsmf.ResponseDescriptor;
-import org.onap.so.beans.nsmf.JobStatusResponse;
-import org.onap.so.db.request.beans.ResourceOperationStatus;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.UUID;
-import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.marshal;
-import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.unMarshal;
-
-
-public class ExternalAnNssmfManager extends ExternalNssmfManager {
-
- /**
- * request body params
- */
- private Map<String, String> bodyParams = new HashMap<>();
-
- @Override
- protected String doWrapExtAllocateReqBody(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException {
- Map<String, Object> request = new HashMap<>();
-
- AnSliceProfile anSliceProfile = nbiRequest.getAllocateAnNssi().getSliceProfile();
-
- RanSliceProfile ranSliceProfile = new RanSliceProfile();
- ranSliceProfile.setSliceProfileId(anSliceProfile.getSliceProfileId());
- ranSliceProfile.setSNSSAIList(anSliceProfile.getSNSSAIList());
- ranSliceProfile.setPLMNIdList(anSliceProfile.getPLMNIdList());
- ranSliceProfile.setPerfReq(anSliceProfile.getPerfReq());
- ranSliceProfile.setMaxNumberofUEs(anSliceProfile.getMaxNumberOfUEs());
- ranSliceProfile.setCoverageAreaTAList(anSliceProfile.getCoverageAreaTAList());
- ranSliceProfile.setLatency(anSliceProfile.getLatency());
- ranSliceProfile.setUEMobilityLevel(anSliceProfile.getUeMobilityLevel());
- ranSliceProfile.setResourceSharingLevel(anSliceProfile.getResourceSharingLevel());
-
- request.put("attributeListIn", ranSliceProfile);
- return marshal(request);
- }
-
- @Override
- protected void doAfterRequest() throws ApplicationException {
- if (ActionType.ALLOCATE.equals(actionType) || ActionType.DEALLOCATE.equals(actionType)) {
- String nssiId;
- if (ActionType.ALLOCATE.equals(actionType)) {
- @SuppressWarnings("unchecked")
- Map<String, String> response = unMarshal(restResponse.getResponseContent(), Map.class);
- nssiId = response.get("href");
- } else {
- nssiId = this.bodyParams.get("nssiId");
- }
-
- NssiResponse resp = new NssiResponse();
- resp.setJobId(UUID.randomUUID().toString());
- resp.setNssiId(nssiId);
-
- RestResponse returnRsp = new RestResponse();
-
- returnRsp.setStatus(202);
- returnRsp.setResponseContent(marshal(resp));
- restResponse = returnRsp;
-
- ResourceOperationStatus status =
- new ResourceOperationStatus(serviceInfo.getNsiId(), resp.getJobId(), serviceInfo.getServiceUuid());
- status.setResourceInstanceID(nssiId);
- status.setOperType(actionType.toString());
-
- updateDbStatus(status, restResponse.getStatus(), JobStatus.STARTED,
- NssmfAdapterUtil.getStatusDesc(actionType));
- }
- // todo
- }
-
- @Override
- protected String doWrapModifyReqBody(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException {
- // TODO
- return null;
- }
-
- @Override
- protected String doWrapDeAllocateReqBody(DeAllocateNssi deAllocateNssi) throws ApplicationException {
- this.bodyParams.clear();
- this.bodyParams.put("nssiId", deAllocateNssi.getNssiId());
-
- Map<String, String> request = new HashMap<>();
- request.put("nSSId", deAllocateNssi.getNssiId());
- return marshal(request);
- }
-
-
- @Override
- public RestResponse modifyNssi(NssmfAdapterNBIRequest modifyRequest) throws ApplicationException {
- // TODO
- return null;
- }
-
- @Override
- public RestResponse activateNssi(NssmfAdapterNBIRequest nbiRequest, String snssai) throws ApplicationException {
- // TODO
- NssiResponse resp = new NssiResponse();
- String nssiId = nbiRequest.getActDeActNssi().getNssiId();
- resp.setJobId(UUID.randomUUID().toString());
- resp.setNssiId(nssiId);
-
- RestResponse returnRsp = new RestResponse();
-
- returnRsp.setStatus(202);
- returnRsp.setResponseContent(marshal(resp));
-
- ResourceOperationStatus status =
- new ResourceOperationStatus(serviceInfo.getNsiId(), resp.getJobId(), serviceInfo.getServiceUuid());
- status.setResourceInstanceID(nssiId);
- status.setOperType(actionType.toString());
-
- updateDbStatus(status, returnRsp.getStatus(), JobStatus.FINISHED, NssmfAdapterUtil.getStatusDesc(actionType));
- return returnRsp;
- }
-
- @Override
- protected RestResponse doQueryJobStatus(ResourceOperationStatus status) throws ApplicationException {
- ResponseDescriptor responseDescriptor = new ResponseDescriptor();
- responseDescriptor.setStatus(JobStatus.FINISHED.toString());
- responseDescriptor.setProgress(100);
- responseDescriptor.setStatusDescription("Finished");
-
- JobStatusResponse jobStatusResponse = new JobStatusResponse();
- jobStatusResponse.setResponseDescriptor(responseDescriptor);
-
- RestResponse restResponse = new RestResponse();
- restResponse.setStatus(200);
- restResponse.setResponseContent(marshal(jobStatusResponse));
-
- updateRequestDbJobStatus(responseDescriptor, status, restResponse);
-
- status.setProgress(Integer.toString(responseDescriptor.getProgress()));
-
- return restResponse;
- }
-
- @Override
- protected SelectionType doQueryNSSISelectionCapability() {
- return SelectionType.NSSMF;
- }
-}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/external/ExternalCnNssmfManager.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/external/ExternalCnNssmfManager.java
deleted file mode 100644
index 08c464e46b..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/external/ExternalCnNssmfManager.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- # Copyright (c) 2020, CMCC Technologies Co., Ltd.
- #
- # Licensed under the Apache License, Version 2.0 (the "License")
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.nssmf.manager.impl.external;
-
-import org.onap.aai.domain.yang.ServiceInstance;
-import org.onap.so.adapters.nssmf.enums.ActionType;
-import org.onap.so.adapters.nssmf.enums.SelectionType;
-import org.onap.so.adapters.nssmf.exceptions.ApplicationException;
-import org.onap.so.adapters.nssmf.manager.impl.ExternalNssmfManager;
-import org.onap.so.beans.nsmf.DeAllocateNssi;
-import org.onap.so.beans.nsmf.NssmfAdapterNBIRequest;
-import org.onap.so.db.request.beans.ResourceOperationStatus;
-import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.marshal;
-
-public class ExternalCnNssmfManager extends ExternalNssmfManager {
-
- @Override
- protected String doWrapExtAllocateReqBody(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException {
- return marshal(nbiRequest.getAllocateCnNssi());
- }
-
- @Override
- protected String doWrapModifyReqBody(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException {
- return marshal(nbiRequest.getAllocateCnNssi());
- }
-
- @Override
- protected String doWrapDeAllocateReqBody(DeAllocateNssi deAllocateNssi) throws ApplicationException {
- return marshal(deAllocateNssi);
- }
-
- @Override
- protected void afterQueryJobStatus(ResourceOperationStatus status) {
- super.afterQueryJobStatus(status);
- ActionType jobOperType = ActionType.valueOf(status.getOperType());
- if (Integer.parseInt(status.getProgress()) == 100) {
- if (ActionType.ACTIVATE.equals(jobOperType)) {
- ServiceInstance nssiInstance = restUtil.getServiceInstance(serviceInfo);
- nssiInstance.setOrchestrationStatus("activated");
- restUtil.updateServiceInstance(nssiInstance, serviceInfo);
- } else if (ActionType.DEACTIVATE.equals(jobOperType)) {
- ServiceInstance nssiInstance = restUtil.getServiceInstance(serviceInfo);
- nssiInstance.setOrchestrationStatus("deactivated");
- restUtil.updateServiceInstance(nssiInstance, serviceInfo);
- }
- }
- }
-
- @Override
- protected SelectionType doQueryNSSISelectionCapability() {
-
- return SelectionType.NSMF;
- }
-
-}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/external/RanSliceProfile.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/external/RanSliceProfile.java
deleted file mode 100644
index 7035456d75..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/external/RanSliceProfile.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.nssmf.manager.impl.external;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import lombok.Data;
-import java.io.Serializable;
-import java.util.List;
-import org.onap.so.beans.nsmf.PerfReq;
-import org.onap.so.beans.nsmf.UeMobilityLevel;
-import org.onap.so.beans.nsmf.ResourceSharingLevel;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@Data
-public class RanSliceProfile implements Serializable {
- /*
- * Reference 3GPP TS 28.541 V16.5.0, Section 6.3.4.
- */
-
- private static final long serialVersionUID = 172447042469370448L;
-
- @JsonProperty(value = "sliceProfileId", required = true)
- private String sliceProfileId;
-
- @JsonProperty(value = "sNSSAIList", required = true)
- private List<String> sNSSAIList;
-
- @JsonProperty(value = "pLMNIdList", required = true)
- private List<String> pLMNIdList;
-
- @JsonProperty(value = "perfReq", required = true)
- private PerfReq perfReq;
-
- @JsonInclude(JsonInclude.Include.NON_DEFAULT)
- @JsonProperty(value = "maxNumberofUEs")
- private long maxNumberofUEs;
-
- @JsonProperty(value = "coverageAreaTAList")
- private List<Integer> coverageAreaTAList;
-
- @JsonInclude(JsonInclude.Include.NON_DEFAULT)
- @JsonProperty(value = "latency")
- private int latency;
-
- @JsonProperty(value = "uEMobilityLevel")
- private UeMobilityLevel uEMobilityLevel;
-
- @JsonProperty(value = "resourceSharingLevel")
- private ResourceSharingLevel resourceSharingLevel;
-
-}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/internal/InternalAnNssmfManager.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/internal/InternalAnNssmfManager.java
deleted file mode 100644
index dc6528381b..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/internal/InternalAnNssmfManager.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- # Copyright (c) 2020, CMCC Technologies Co., Ltd.
- #
- # Licensed under the Apache License, Version 2.0 (the "License")
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.nssmf.manager.impl.internal;
-
-import org.onap.so.adapters.nssmf.exceptions.ApplicationException;
-import org.onap.so.adapters.nssmf.manager.impl.InternalNssmfManager;
-import org.onap.so.beans.nsmf.*;
-import java.util.HashMap;
-import java.util.Map;
-import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.marshal;
-
-
-public class InternalAnNssmfManager extends InternalNssmfManager {
-
- @Override
- protected String doWrapAllocateReqBody(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException {
- NssmfRequest request =
- new NssmfRequest(serviceInfo, nbiRequest.getEsrInfo().getNetworkType(), nbiRequest.getAllocateAnNssi());
- request.setName(nbiRequest.getAllocateAnNssi().getNssiName());
- return marshal(request);
- }
-
- @Override
- protected String doWrapModifyReqBody(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException {
- AllocateAnNssi allocateAnNssi = nbiRequest.getAllocateAnNssi();
- AnSliceProfile sliceProfile = allocateAnNssi.getSliceProfile();
- Map<String, Object> additional = new HashMap<>();
- additional.put("modifyAction", "allocate");
- additional.put("snssaiList", sliceProfile.getSNSSAIList());
- additional.put("sliceProfileId", sliceProfile.getSliceProfileId());
- additional.put("nsiInfo", allocateAnNssi.getNsiInfo());
- additional.put("scriptName", allocateAnNssi.getScriptName());
- NssmfRequest request = new NssmfRequest(serviceInfo, esrInfo.getNetworkType(), additional);
- return marshal(request);
- }
-}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/internal/InternalCnNssmfManager.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/internal/InternalCnNssmfManager.java
deleted file mode 100644
index 4a93b3007c..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/internal/InternalCnNssmfManager.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- # Copyright (c) 2020, CMCC Technologies Co., Ltd.
- #
- # Licensed under the Apache License, Version 2.0 (the "License")
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.nssmf.manager.impl.internal;
-
-import org.onap.so.adapters.nssmf.exceptions.ApplicationException;
-import org.onap.so.adapters.nssmf.manager.impl.InternalNssmfManager;
-import org.onap.so.beans.nsmf.*;
-import java.util.HashMap;
-import java.util.Map;
-import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.marshal;
-
-public class InternalCnNssmfManager extends InternalNssmfManager {
-
- @Override
- protected String doWrapAllocateReqBody(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException {
-
- NssmfRequest request =
- new NssmfRequest(serviceInfo, nbiRequest.getEsrInfo().getNetworkType(), nbiRequest.getAllocateCnNssi());
- request.setName(nbiRequest.getAllocateCnNssi().getNssiName());
- return marshal(request);
- }
-
- @Override
- protected String doWrapModifyReqBody(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException {
- AllocateCnNssi allocateCnNssi = nbiRequest.getAllocateCnNssi();
- CnSliceProfile cnSliceProfile = allocateCnNssi.getSliceProfile();
- Map<String, Object> additional = new HashMap<>();
- additional.put("modifyAction", "allocate");
- additional.put("nsiInfo", allocateCnNssi.getNsiInfo());
- additional.put("scriptName", allocateCnNssi.getScriptName());
- additional.put("snssaiList", cnSliceProfile.getSnssaiList());
- additional.put("sliceProfileId", cnSliceProfile.getSliceProfileId());
-
- NssmfRequest request = new NssmfRequest(serviceInfo, esrInfo.getNetworkType(), additional);
- return marshal(request);
- }
-
-}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/internal/InternalTnNssmfManager.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/internal/InternalTnNssmfManager.java
deleted file mode 100644
index 1b4a9e9fca..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/internal/InternalTnNssmfManager.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- # Copyright (c) 2020, CMCC Technologies Co., Ltd.
- #
- # Licensed under the Apache License, Version 2.0 (the "License")
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.nssmf.manager.impl.internal;
-
-import org.onap.so.adapters.nssmf.exceptions.ApplicationException;
-import org.onap.so.adapters.nssmf.manager.impl.InternalNssmfManager;
-import org.onap.so.beans.nsmf.*;
-import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.marshal;
-
-public class InternalTnNssmfManager extends InternalNssmfManager {
-
- @Override
- protected String doWrapAllocateReqBody(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException {
-
- return marshal(new NssmfRequest(serviceInfo, nbiRequest.getEsrInfo().getNetworkType(),
- nbiRequest.getAllocateTnNssi()));
- }
-
- @Override
- protected String doWrapModifyReqBody(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException {
- // TODO
- return doWrapAllocateReqBody(nbiRequest);
- }
-}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/rest/NssmfAdapterRest.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/rest/NssmfAdapterRest.java
deleted file mode 100644
index 4fdcbf110f..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/rest/NssmfAdapterRest.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.nssmf.rest;
-
-import org.onap.so.adapters.nssmf.entity.RestResponse;
-import org.onap.so.adapters.nssmf.exceptions.ApplicationException;
-import org.onap.so.beans.nsmf.JobStatusRequest;
-import org.onap.so.beans.nsmf.NssiActDeActRequest;
-import org.onap.so.beans.nsmf.NssiAllocateRequest;
-import org.onap.so.beans.nsmf.NssiCreateRequest;
-import org.onap.so.beans.nsmf.NssiDeAllocateRequest;
-import org.onap.so.beans.nsmf.NssiTerminateRequest;
-import org.onap.so.beans.nsmf.NssiUpdateRequest;
-import org.onap.so.beans.nsmf.NssiUpdateRequestById;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.ResponseEntity;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import static javax.ws.rs.core.MediaType.APPLICATION_JSON;
-import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.assertObjectNotNull;
-
-@Deprecated
-@Controller
-@RequestMapping(value = "/api/rest/provMns/v1", produces = {APPLICATION_JSON}, consumes = {APPLICATION_JSON})
-public class NssmfAdapterRest {
-
- private static final Logger logger = LoggerFactory.getLogger(NssmfAdapterRest.class);
-
- @Autowired
- private NssmfManager nssmfMgr;
-
-
- @PostMapping(value = "/NSS/nssi")
- public ResponseEntity createNssi(@RequestBody NssiCreateRequest create) {
- try {
- logger.info("Nssmf create request is invoked");
- assertObjectNotNull(create);
- RestResponse rsp = getNssmfMgr().createNssi(create);
- return buildResponse(rsp);
- } catch (ApplicationException e) {
- return e.buildErrorResponse();
- }
- }
-
- @PostMapping(value = "/NSS/nssi/{nssiId}")
- public ResponseEntity terminateNssi(@RequestBody NssiTerminateRequest terminate,
- @PathVariable("nssiId") String nssiId) {
- try {
- logger.info("Nssmf terminate request is invoked");
- assertObjectNotNull(terminate);
- RestResponse rsp = getNssmfMgr().terminateNssi(terminate, nssiId);
- return buildResponse(rsp);
- } catch (ApplicationException e) {
- return e.buildErrorResponse();
- }
- }
-
- @PutMapping(value = "/NSS/SliceProfiles/{sliceProfileId}")
- public ResponseEntity modifyNssi(@RequestBody NssiUpdateRequest update,
- @PathVariable("sliceProfileId") String sliceId) {
- try {
- logger.info("Nssmf modify request is invoked");
- assertObjectNotNull(update);
- RestResponse rsp = getNssmfMgr().updateNssi(update, sliceId);
- return buildResponse(rsp);
- } catch (ApplicationException e) {
- return e.buildErrorResponse();
- }
- }
-
- @PutMapping(value = "/NSS/nssi/{nssiId}")
- public ResponseEntity modifyNssiById(@RequestBody NssiUpdateRequestById updateById,
- @PathVariable("nssiId") String nssiId) {
- try {
- logger.info("Nssmf modify by ID request is invoked");
- assertObjectNotNull(updateById);
- RestResponse rsp = getNssmfMgr().updateNssiById(updateById, nssiId);
- return buildResponse(rsp);
- } catch (ApplicationException e) {
- return e.buildErrorResponse();
- }
- }
-
-
- @GetMapping(value = "/vendor/{vendorName}/type/{networkType}/NSS" + "/SliceProfiles/{sliceProfileId}")
- public ResponseEntity queryNssi(@PathVariable("vendorName") String vendorName,
- @PathVariable("networktype") String networkType, @PathVariable("sliceProfileId") String sliceId) {
- try {
- logger.info("Nssmf query nssi request is invoked");
- RestResponse rsp = getNssmfMgr().queryNssi(vendorName, networkType, sliceId);
- return buildResponse(rsp);
- } catch (ApplicationException e) {
- return e.buildErrorResponse();
- }
- }
-
- @GetMapping(value = "/vendor/{vendorName}/type/{networkType}/NSS/nssi" + "/{nssiId}")
- public ResponseEntity queryNssiById(@PathVariable("vendorName") String vendorName,
- @PathVariable("networkTtype") String networkType, @PathVariable("nssiId") String nssiId) {
- try {
- logger.info("Nssmf query nssi by ID request is invoked");
- RestResponse rsp = getNssmfMgr().queryNssiById(vendorName, networkType, nssiId);
- return buildResponse(rsp);
- } catch (ApplicationException e) {
- return e.buildErrorResponse();
- }
- }
-
- public void setNssmfMgr(NssmfManager nssmfMgr) {
- this.nssmfMgr = nssmfMgr;
- }
-
- public NssmfManager getNssmfMgr() {
- return nssmfMgr;
- }
-
- private ResponseEntity buildResponse(RestResponse rsp) {
- return ResponseEntity.status(rsp.getStatus()).body(rsp.getResponseContent());
- }
-}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/rest/NssmfManager.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/rest/NssmfManager.java
deleted file mode 100644
index 2d0980f60e..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/rest/NssmfManager.java
+++ /dev/null
@@ -1,549 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.nssmf.rest;
-
-import org.onap.so.adapters.nssmf.entity.RestResponse;
-import org.onap.so.adapters.nssmf.enums.JobStatus;
-import org.onap.so.adapters.nssmf.exceptions.ApplicationException;
-import org.onap.so.adapters.nssmf.util.RestUtil;
-import org.onap.so.beans.nsmf.ActDeActNssi;
-import org.onap.so.beans.nsmf.AllocateAnNssi;
-import org.onap.so.beans.nsmf.AllocateCnNssi;
-import org.onap.so.beans.nsmf.AllocateTnNssi;
-import org.onap.so.beans.nsmf.CreateCnNssi;
-import org.onap.so.beans.nsmf.DeAllocateNssi;
-import org.onap.so.beans.nsmf.EsrInfo;
-import org.onap.so.beans.nsmf.JobStatusRequest;
-import org.onap.so.beans.nsmf.JobStatusResponse;
-import org.onap.so.beans.nsmf.NetworkType;
-import org.onap.so.beans.nsmf.NssiActDeActRequest;
-import org.onap.so.beans.nsmf.NssiAllocateRequest;
-import org.onap.so.beans.nsmf.NssiCreateRequest;
-import org.onap.so.beans.nsmf.NssiDeAllocateRequest;
-import org.onap.so.beans.nsmf.NssiResponse;
-import org.onap.so.beans.nsmf.NssiTerminateRequest;
-import org.onap.so.beans.nsmf.NssiUpdateRequest;
-import org.onap.so.beans.nsmf.NssiUpdateRequestById;
-import org.onap.so.beans.nsmf.ResponseDescriptor;
-import org.onap.so.beans.nsmf.TerminateNssi;
-import org.onap.so.beans.nsmf.UpdateCnNssi;
-import org.onap.so.beans.nsmf.UpdateCnNssiById;
-import org.onap.so.db.request.beans.ResourceOperationStatus;
-import org.onap.so.db.request.data.repository.ResourceOperationStatusRepository;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.Primary;
-import org.springframework.data.domain.Example;
-import org.springframework.stereotype.Component;
-import static java.lang.String.valueOf;
-import static org.onap.so.adapters.nssmf.enums.HttpMethod.DELETE;
-import static org.onap.so.adapters.nssmf.enums.HttpMethod.GET;
-import static org.onap.so.adapters.nssmf.enums.HttpMethod.POST;
-import static org.onap.so.adapters.nssmf.enums.HttpMethod.PUT;
-import static org.onap.so.adapters.nssmf.enums.JobStatus.ERROR;
-import static org.onap.so.adapters.nssmf.enums.JobStatus.FINISHED;
-import static org.onap.so.adapters.nssmf.enums.JobStatus.PROCESSING;
-import static org.onap.so.adapters.nssmf.enums.JobStatus.STARTED;
-import static org.onap.so.adapters.nssmf.enums.JobStatus.fromString;
-import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.StatusDesc.ACTIVATE_NSS_SUCCESS;
-import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.StatusDesc.ALLOCATE_NSS_SUCCESS;
-import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.StatusDesc.CREATE_NSS_SUCCESS;
-import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.StatusDesc.DEACTIVATE_NSS_SUCCESS;
-import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.StatusDesc.DEALLOCATE_NSS_SUCCESS;
-import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.StatusDesc.QUERY_JOB_STATUS_FAILED;
-import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.StatusDesc.QUERY_JOB_STATUS_SUCCESS;
-import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.assertObjectNotNull;
-import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.marshal;
-import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.unMarshal;
-import static org.onap.so.beans.nsmf.ActDeActNssi.ACT_URL;
-import static org.onap.so.beans.nsmf.ActDeActNssi.DE_ACT_URL;
-
-@Component
-@Primary
-@Deprecated
-public class NssmfManager {
-
- private static final Logger logger = LoggerFactory.getLogger(NssmfManager.class);
-
- public final static String QUERY = "/api/rest/provMns/v1/NSS" + "/SliceProfiles/{sliceProfileId}";
-
- public final static String QUERY_BY_ID = "/api/rest/provMns/v1/NSS/nssi" + "/{nssiId}";
-
- @Autowired
- private ResourceOperationStatusRepository rscOperStatusRepo;
-
- @Autowired
- private RestUtil restUtil;
-
-
- public RestResponse allocateNssi(NssiAllocateRequest nssmiAllocate) throws ApplicationException {
-
- assertObjectNotNull(nssmiAllocate.getEsrInfo());
- assertObjectNotNull(nssmiAllocate.getEsrInfo().getNetworkType());
- assertObjectNotNull(nssmiAllocate.getEsrInfo().getVendor());
-
- String nsiId = null;
- String allocateReq = null;
- String allocateUrl = null;
- logger.info("Allocate Nssi for " + nssmiAllocate.getEsrInfo().getNetworkType() + " Network has begun");
-
- switch (nssmiAllocate.getEsrInfo().getNetworkType()) {
-
- case CORE:
- AllocateCnNssi cn = nssmiAllocate.getAllocateCnNssi();
- assertObjectNotNull(cn);
- assertObjectNotNull(cn.getNsiInfo());
- assertObjectNotNull(cn.getNsiInfo().getNsiId());
- nsiId = cn.getNsiInfo().getNsiId();
- assertObjectNotNull(nsiId);
- allocateReq = marshal(cn);
- allocateUrl = AllocateCnNssi.URL;
- break;
-
- case ACCESS:
- AllocateAnNssi an = nssmiAllocate.getAllocateAnNssi();
- assertObjectNotNull(an);
- assertObjectNotNull(an.getNsiInfo());
- assertObjectNotNull(an.getNsiInfo().getNsiId());
- nsiId = an.getNsiInfo().getNsiId();
- assertObjectNotNull(nsiId);
- allocateReq = marshal(an);
- allocateUrl = AllocateAnNssi.URL;
- break;
-
- case TRANSPORT:
- AllocateTnNssi tn = nssmiAllocate.getAllocateTnNssi();
- assertObjectNotNull(tn);
- // assertObjectNotNull(tn.getNsiInfo());
- // assertObjectNotNull(tn.getNsiInfo().getNsiId());
- // nsiId = tn.getNsiInfo().getNsiId();
- allocateReq = marshal(tn);
- // allocateUrl = AllocateTnNssi.URL;
- break;
-
- }
-
- RestResponse rsp = restUtil.sendRequest(allocateUrl, POST, allocateReq, nssmiAllocate.getEsrInfo());
- assertObjectNotNull(rsp);
-
- if (valueOf(rsp.getStatus()).startsWith("2")) {
- NssiResponse allocateRes = unMarshal(rsp.getResponseContent(), NssiResponse.class);
-
- ResourceOperationStatus status =
- new ResourceOperationStatus(allocateRes.getNssiId(), allocateRes.getJobId(), nsiId);
- logger.info("save segment and operaton info -> begin");
- updateDbStatus(status, rsp.getStatus(), STARTED, ALLOCATE_NSS_SUCCESS);
- logger.info("save segment and operation info -> end");
- }
- return rsp;
- }
-
-
-
- public RestResponse createNssi(NssiCreateRequest nssiCreate) throws ApplicationException {
-
- assertObjectNotNull(nssiCreate.getEsrInfo());
- assertObjectNotNull(nssiCreate.getEsrInfo().getNetworkType());
- assertObjectNotNull(nssiCreate.getEsrInfo().getVendor());
-
- String nsiId = null;
- String createReq = null;
- String createUrl = null;
- logger.info("Create Nssi for " + nssiCreate.getEsrInfo().getNetworkType() + " Network has begun");
-
- switch (nssiCreate.getEsrInfo().getNetworkType()) {
- case CORE:
- CreateCnNssi cn = nssiCreate.getCreateCnNssi();
- nsiId = cn.getNsiInfo().getNsiId();
- assertObjectNotNull(nsiId);
- createReq = marshal(cn);
- createUrl = AllocateCnNssi.URL;
- break;
-
- case ACCESS:
- case TRANSPORT:
- throw new ApplicationException(1, "Create Nssi doesn't " + "support the Network type:"
- + nssiCreate.getEsrInfo().getNetworkType());
- }
- RestResponse rsp = restUtil.sendRequest(createUrl, POST, createReq, nssiCreate.getEsrInfo());
- assertObjectNotNull(rsp);
-
- if (valueOf(rsp.getStatus()).startsWith("2")) {
- NssiResponse allocateRes = unMarshal(rsp.getResponseContent(), NssiResponse.class);
-
- ResourceOperationStatus status =
- new ResourceOperationStatus(allocateRes.getNssiId(), allocateRes.getJobId(), nsiId);
- logger.info("save segment and operaton info -> begin");
- updateDbStatus(status, rsp.getStatus(), STARTED, CREATE_NSS_SUCCESS);
- logger.info("save segment and operaton info -> end");
- }
- return rsp;
- }
-
- @Deprecated
- public RestResponse deAllocateNssi(NssiDeAllocateRequest nssiDeallocate, String sliceId)
- throws ApplicationException {
-
- assertObjectNotNull(nssiDeallocate.getEsrInfo());
- assertObjectNotNull(nssiDeallocate.getEsrInfo().getNetworkType());
- assertObjectNotNull(nssiDeallocate.getEsrInfo().getVendor());
-
- DeAllocateNssi deAllocate = nssiDeallocate.getDeAllocateNssi();
-
- assertObjectNotNull(sliceId);
- assertObjectNotNull(deAllocate.getNssiId());
- assertObjectNotNull(deAllocate.getNsiId());
-
- String deallocateUrl = formTnAndAnUrl(nssiDeallocate.getEsrInfo(), DeAllocateNssi.URL, sliceId);
- String deAllocateReq = marshal(deAllocate);
-
- logger.info("Deallocate Nssi has begun");
-
- RestResponse rsp = restUtil.sendRequest(deallocateUrl, DELETE, deAllocateReq, nssiDeallocate.getEsrInfo());
- assertObjectNotNull(rsp);
-
- if (valueOf(rsp.getStatus()).startsWith("2")) {
- NssiResponse res = unMarshal(rsp.getResponseContent(), NssiResponse.class);
-
- ResourceOperationStatus status =
- new ResourceOperationStatus(deAllocate.getNssiId(), res.getJobId(), deAllocate.getNsiId());
- logger.info("save segment and operaton info -> begin");
- updateDbStatus(status, rsp.getStatus(), STARTED, DEALLOCATE_NSS_SUCCESS);
- logger.info("save segment and operaton info -> end");
- }
- return rsp;
- }
-
- private String formTnAndAnUrl(EsrInfo esrInfo, String origUrl, String variable) {
-
- origUrl = formatUrl(origUrl, variable);
- String[] val;
-
- switch (esrInfo.getNetworkType()) {
-
- case TRANSPORT:
- val = origUrl.split("v1");
- return val[0] + "v1/tn" + val[1];
-
- case ACCESS:
- val = origUrl.split("v1");
- return val[0] + "v1/an" + val[1];
-
- case CORE:
- return origUrl;
- }
- return origUrl;
- }
-
- private String formatUrl(String origUrl, String variable) {
-
- if (variable != null) {
- origUrl = String.format(origUrl, variable);
- }
- return origUrl;
- }
-
-
- public RestResponse terminateNssi(NssiTerminateRequest nssiTerminate, String nssiId) throws ApplicationException {
-
- assertObjectNotNull(nssiTerminate.getEsrInfo());
- assertObjectNotNull(nssiTerminate.getEsrInfo().getNetworkType());
- assertObjectNotNull(nssiTerminate.getEsrInfo().getVendor());
-
- TerminateNssi terminate = nssiTerminate.getTerminateNssi();
-
- assertObjectNotNull(nssiId);
- assertObjectNotNull(terminate.getNsiId());
-
- logger.info("Terminate Nssi has begun");
-
- String terminateUrl = formTnAndAnUrl(nssiTerminate.getEsrInfo(), TerminateNssi.URL, nssiId);
- String terminateReq = marshal(terminate);
-
- RestResponse rsp = restUtil.sendRequest(terminateUrl, DELETE, terminateReq, nssiTerminate.getEsrInfo());
- assertObjectNotNull(rsp);
-
- if (valueOf(rsp.getStatus()).startsWith("2")) {
- NssiResponse res = unMarshal(rsp.getResponseContent(), NssiResponse.class);
-
- ResourceOperationStatus status = new ResourceOperationStatus(nssiId, res.getJobId(), terminate.getNsiId());
- logger.info("save segment and operaton info -> begin");
- updateDbStatus(status, rsp.getStatus(), STARTED, DEALLOCATE_NSS_SUCCESS);
- logger.info("save segment and operaton info -> end");
- }
- return rsp;
- }
-
- public RestResponse activateNssi(NssiActDeActRequest nssiActivate, String snssai) throws ApplicationException {
-
- assertObjectNotNull(nssiActivate.getEsrInfo());
- assertObjectNotNull(nssiActivate.getEsrInfo().getNetworkType());
- assertObjectNotNull(nssiActivate.getEsrInfo().getVendor());
-
- ActDeActNssi activate = nssiActivate.getActDeActNssi();
-
- assertObjectNotNull(snssai);
- assertObjectNotNull(activate.getNssiId());
- assertObjectNotNull(activate.getNsiId());
-
- logger.info("Activate Nssi has begun");
-
- String activateUrl = formTnAndAnUrl(nssiActivate.getEsrInfo(), ACT_URL, snssai);
- String activateReq = marshal(activate);
-
- RestResponse rsp = restUtil.sendRequest(activateUrl, PUT, activateReq, nssiActivate.getEsrInfo());
- assertObjectNotNull(rsp);
-
- if (valueOf(rsp.getStatus()).startsWith("2")) {
- NssiResponse activateRes = unMarshal(rsp.getResponseContent(), NssiResponse.class);
-
- ResourceOperationStatus status =
- new ResourceOperationStatus(activate.getNssiId(), activateRes.getJobId(), activate.getNsiId());
- logger.info("save segment and operaton info -> begin");
- updateDbStatus(status, rsp.getStatus(), STARTED, ACTIVATE_NSS_SUCCESS);
- logger.info("save segment and operaton info -> end");
- }
- return rsp;
- }
-
- public RestResponse deActivateNssi(NssiActDeActRequest nssiDeActivate, String snssai) throws ApplicationException {
-
- assertObjectNotNull(nssiDeActivate.getEsrInfo());
- assertObjectNotNull(nssiDeActivate.getEsrInfo().getNetworkType());
- assertObjectNotNull(nssiDeActivate.getEsrInfo().getVendor());
-
- logger.info("Deactivate Nssi has begun");
-
- ActDeActNssi deActivate = nssiDeActivate.getActDeActNssi();
-
- assertObjectNotNull(snssai);
- assertObjectNotNull(deActivate.getNssiId());
- assertObjectNotNull(deActivate.getNsiId());
-
- String deActivateUrl = formTnAndAnUrl(nssiDeActivate.getEsrInfo(), DE_ACT_URL, snssai);
- String deActivateReq = marshal(deActivate);
-
- RestResponse rsp = restUtil.sendRequest(deActivateUrl, PUT, deActivateReq, nssiDeActivate.getEsrInfo());
- assertObjectNotNull(rsp);
-
- if (valueOf(rsp.getStatus()).startsWith("2")) {
- NssiResponse deActivateRes = unMarshal(rsp.getResponseContent(), NssiResponse.class);
-
- ResourceOperationStatus status = new ResourceOperationStatus(deActivate.getNssiId(),
- deActivateRes.getJobId(), deActivate.getNsiId());
- logger.info("save segment and operaton info -> begin");
- updateDbStatus(status, rsp.getStatus(), STARTED, DEACTIVATE_NSS_SUCCESS);
- logger.info("save segment and operaton info -> end");
- }
- return rsp;
- }
-
- public RestResponse queryJobStatus(JobStatusRequest jobReq, String jobId) throws ApplicationException {
-
- assertObjectNotNull(jobReq.getEsrInfo());
- assertObjectNotNull(jobReq.getEsrInfo().getNetworkType());
- assertObjectNotNull(jobReq.getEsrInfo().getVendor());
- assertObjectNotNull(jobId);
- assertObjectNotNull(jobReq.getNssiId());
- assertObjectNotNull(jobReq.getNsiId());
-
- logger.info("Query job status has begun");
-
- ResourceOperationStatus status = new ResourceOperationStatus(jobReq.getNssiId(), jobId, jobReq.getNsiId());
- status = rscOperStatusRepo.findOne(Example.of(status))
- .orElseThrow(() -> new ApplicationException(404, "Cannot Find Operation Status"));
-
- String statusUrl = formatUrl(JobStatusRequest.URL, jobId);
- if (jobReq.getResponseId() != null) {
- statusUrl = statusUrl + "?responseId=" + jobReq.getResponseId();
- }
-
- RestResponse rsp = restUtil.sendRequest(statusUrl, GET, "", jobReq.getEsrInfo());
- assertObjectNotNull(rsp);
-
- if (!valueOf(rsp.getStatus()).startsWith("2")) {
- updateDbStatus(status, rsp.getStatus(), ERROR, QUERY_JOB_STATUS_FAILED);
- throw new ApplicationException(500, QUERY_JOB_STATUS_FAILED);
- }
-
- ResponseDescriptor rspDesc =
- unMarshal(rsp.getResponseContent(), JobStatusResponse.class).getResponseDescriptor();
- logger.info("save segment and operaton info -> begin");
- updateRequestDbJobStatus(rspDesc, status, rsp);
- logger.info("save segment and operaton info -> end");
- return rsp;
- }
-
-
- public RestResponse updateNssi(NssiUpdateRequest nssiUpdate, String sliceId) throws ApplicationException {
-
- assertObjectNotNull(nssiUpdate.getEsrInfo());
- assertObjectNotNull(nssiUpdate.getEsrInfo().getNetworkType());
- assertObjectNotNull(nssiUpdate.getEsrInfo().getVendor());
- assertObjectNotNull(sliceId);
-
- String nsiId = null;
- String nssiId = null;
- String updateReq = null;
- String updateUrl = null;
- logger.info("Update Nssi for " + nssiUpdate.getEsrInfo().getNetworkType() + " Network has begun");
-
- switch (nssiUpdate.getEsrInfo().getNetworkType()) {
- case CORE:
- UpdateCnNssi cn = nssiUpdate.getUpdateCnNssi();
- nsiId = cn.getNsiInfo().getNsiId();
- nssiId = cn.getNssiId();
- assertObjectNotNull(nsiId);
- assertObjectNotNull(nssiId);
- updateReq = marshal(cn);
- updateUrl = formatUrl(UpdateCnNssi.URL, sliceId);
- break;
-
- case ACCESS:
- case TRANSPORT:
- throw new ApplicationException(1, "Update Nssi doesn't " + "support the Network type:"
- + nssiUpdate.getEsrInfo().getNetworkType());
- }
-
- RestResponse rsp = restUtil.sendRequest(updateUrl, PUT, updateReq, nssiUpdate.getEsrInfo());
- assertObjectNotNull(rsp);
-
- if (valueOf(rsp.getStatus()).startsWith("2")) {
- NssiResponse allocateRes = unMarshal(rsp.getResponseContent(), NssiResponse.class);
-
- ResourceOperationStatus status = new ResourceOperationStatus(nssiId, allocateRes.getJobId(), nsiId);
- logger.info("save segment and operaton info -> begin");
- updateDbStatus(status, rsp.getStatus(), STARTED, ALLOCATE_NSS_SUCCESS);
- logger.info("save segment and operaton info -> end");
- }
- return rsp;
- }
-
- public RestResponse updateNssiById(NssiUpdateRequestById nssiUpdateById, String nssiId)
- throws ApplicationException {
-
- assertObjectNotNull(nssiUpdateById.getEsrInfo());
- assertObjectNotNull(nssiUpdateById.getEsrInfo().getNetworkType());
- assertObjectNotNull(nssiUpdateById.getEsrInfo().getVendor());
- assertObjectNotNull(nssiId);
-
- String nsiId = null;
- String updateReq = null;
- String updateUrl = null;
- logger.info("Update Nssi by ID for " + nssiUpdateById.getEsrInfo().getNetworkType() + " Network has begun");
-
- switch (nssiUpdateById.getEsrInfo().getNetworkType()) {
- case CORE:
- UpdateCnNssiById cn = nssiUpdateById.getUpdateCnNssiById();
- nsiId = cn.getNsiInfo().getNsiId();
- assertObjectNotNull(nsiId);
- updateReq = marshal(cn);
- updateUrl = formatUrl(UpdateCnNssiById.URL, nssiId);
- break;
-
- case ACCESS:
- case TRANSPORT:
- throw new ApplicationException(1, "Update Nssi doesn't " + "support the Network type:"
- + nssiUpdateById.getEsrInfo().getNetworkType());
- }
-
- RestResponse rsp = restUtil.sendRequest(updateUrl, PUT, updateReq, nssiUpdateById.getEsrInfo());
- assertObjectNotNull(rsp);
-
- if (valueOf(rsp.getStatus()).startsWith("2")) {
- NssiResponse allocateRes = unMarshal(rsp.getResponseContent(), NssiResponse.class);
-
- ResourceOperationStatus status = new ResourceOperationStatus(nssiId, allocateRes.getJobId(), nsiId);
- logger.info("save segment and operaton info -> begin");
- updateDbStatus(status, rsp.getStatus(), STARTED, ALLOCATE_NSS_SUCCESS);
- logger.info("save segment and operaton info -> end");
- }
- return rsp;
- }
-
- public RestResponse queryNssi(String vendor, String type, String sliceId) throws ApplicationException {
-
- logger.info("Query Nssi has begun");
- String getUrl = formatUrl(QUERY, sliceId);
- EsrInfo esr = new EsrInfo();
- esr.setVendor(vendor);
- esr.setNetworkType(NetworkType.valueOf(type));
- RestResponse rsp = restUtil.sendRequest(getUrl, GET, "", esr);
- assertObjectNotNull(rsp);
- return rsp;
- }
-
- public RestResponse queryNssiById(String vendor, String type, String nssiId) throws ApplicationException {
-
- logger.info("Query Nssi by ID has begun");
- String getUrl = formatUrl(QUERY_BY_ID, nssiId);
- EsrInfo esr = new EsrInfo();
- esr.setVendor(vendor);
- esr.setNetworkType(NetworkType.valueOf(type));
- RestResponse rsp = restUtil.sendRequest(getUrl, GET, "", esr);
- assertObjectNotNull(rsp);
- return rsp;
- }
-
- private void updateRequestDbJobStatus(ResponseDescriptor rspDesc, ResourceOperationStatus status, RestResponse rsp)
- throws ApplicationException {
-
- switch (fromString(rspDesc.getStatus())) {
-
- case STARTED:
- updateDbStatus(status, rsp.getStatus(), STARTED, QUERY_JOB_STATUS_SUCCESS);
- break;
-
- case ERROR:
- updateDbStatus(status, rsp.getStatus(), ERROR, QUERY_JOB_STATUS_FAILED);
- throw new ApplicationException(500, QUERY_JOB_STATUS_FAILED);
-
- case FINISHED:
- if (rspDesc.getProgress() == 100) {
- updateDbStatus(status, rsp.getStatus(), FINISHED, QUERY_JOB_STATUS_SUCCESS);
- }
- break;
-
- case PROCESSING:
- updateDbStatus(status, rsp.getStatus(), PROCESSING, QUERY_JOB_STATUS_SUCCESS);
- break;
- }
- }
-
- private void updateDbStatus(ResourceOperationStatus status, int rspStatus, JobStatus jobStatus,
- String description) {
- status.setErrorCode(valueOf(rspStatus));
- status.setStatus(jobStatus.toString());
- status.setStatusDescription(description);
- logger.info("Updating DB status");
- rscOperStatusRepo.save(status);
- logger.info("Updating successful");
- }
-
- public void setRscOperStatusRepo(ResourceOperationStatusRepository rscOperStatusRepo) {
- this.rscOperStatusRepo = rscOperStatusRepo;
- }
-
- public void setRestUtil(RestUtil restUtil) {
- this.restUtil = restUtil;
- }
-}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/rest/TrustAllHostNameVerifier.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/rest/TrustAllHostNameVerifier.java
deleted file mode 100644
index fc0f3ddde5..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/rest/TrustAllHostNameVerifier.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.nssmf.rest;
-
-import javax.net.ssl.HostnameVerifier;
-import javax.net.ssl.SSLSession;
-
-@Deprecated
-public class TrustAllHostNameVerifier implements HostnameVerifier {
-
- public boolean verify(String hostname, SSLSession session) {
- return true;
- }
-
-}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/service/NssmfManagerService.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/service/NssmfManagerService.java
deleted file mode 100644
index 92fe5576dd..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/service/NssmfManagerService.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- # Copyright (c) 2020, CMCC Technologies Co., Ltd.
- #
- # Licensed under the Apache License, Version 2.0 (the "License")
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.nssmf.service;
-
-import org.onap.so.adapters.nssmf.annotation.ServiceLogger;
-import org.onap.so.beans.nsmf.*;
-import org.springframework.http.ResponseEntity;
-import org.springframework.stereotype.Service;
-
-@Service
-@ServiceLogger
-public interface NssmfManagerService {
- ResponseEntity allocateNssi(NssmfAdapterNBIRequest allocateRequest);
-
- ResponseEntity deAllocateNssi(NssmfAdapterNBIRequest allocateRequest, String sliceProfileId);
-
- ResponseEntity activateNssi(NssmfAdapterNBIRequest deActRequest, String snssai);
-
- ResponseEntity deActivateNssi(NssmfAdapterNBIRequest nssiDeActivate, String snssai);
-
- ResponseEntity queryJobStatus(NssmfAdapterNBIRequest jobReq, String jobId);
-
- ResponseEntity queryNSSISelectionCapability(NssmfAdapterNBIRequest nbiRequest);
-
- ResponseEntity querySubnetCapability(NssmfAdapterNBIRequest nbiRequest);
-
-}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/service/impl/NssmfManagerServiceImpl.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/service/impl/NssmfManagerServiceImpl.java
deleted file mode 100644
index 5b53856f2f..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/service/impl/NssmfManagerServiceImpl.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- # Copyright (c) 2020, CMCC Technologies Co., Ltd.
- #
- # Licensed under the Apache License, Version 2.0 (the "License")
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.nssmf.service.impl;
-
-import org.apache.commons.lang3.StringUtils;
-import org.onap.so.adapters.nssmf.annotation.ServiceLogger;
-import org.onap.so.adapters.nssmf.config.NssmfAdapterConfig;
-import org.onap.so.adapters.nssmf.enums.ActionType;
-import org.onap.so.adapters.nssmf.exceptions.ApplicationException;
-import org.onap.so.adapters.nssmf.manager.NssmfManagerBuilder;
-import org.onap.so.adapters.nssmf.entity.RestResponse;
-import org.onap.so.adapters.nssmf.manager.NssmfManager;
-import org.onap.so.adapters.nssmf.service.NssmfManagerService;
-import org.onap.so.adapters.nssmf.util.RestUtil;
-import org.onap.so.beans.nsmf.*;
-import org.onap.so.db.request.data.repository.ResourceOperationStatusRepository;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.ResponseEntity;
-import org.springframework.stereotype.Service;
-
-
-@Service
-@ServiceLogger
-public class NssmfManagerServiceImpl implements NssmfManagerService {
-
- @Autowired
- private RestUtil restUtil;
-
- @Autowired
- private ResourceOperationStatusRepository repository;
-
- @Autowired
- private NssmfAdapterConfig nssmfAdapterConfig;
-
- @Override
- public ResponseEntity allocateNssi(NssmfAdapterNBIRequest request) {
- try {
-
- if (StringUtils.isNotBlank(request.getServiceInfo().getNssiId())) {
- return buildResponse(buildNssmfManager(request, ActionType.MODIFY).modifyNssi(request));
- }
-
- return buildResponse(buildNssmfManager(request, ActionType.ALLOCATE).allocateNssi(request));
-
- } catch (ApplicationException e) {
- return e.buildErrorResponse();
- }
- }
-
- @Override
- public ResponseEntity deAllocateNssi(NssmfAdapterNBIRequest request, String sliceProfileId) {
- try {
- return buildResponse(
- buildNssmfManager(request, ActionType.DEALLOCATE).deAllocateNssi(request, sliceProfileId));
- } catch (ApplicationException e) {
- return e.buildErrorResponse();
- }
- }
-
- @Override
- public ResponseEntity activateNssi(NssmfAdapterNBIRequest request, String snssai) {
- try {
- return buildResponse(buildNssmfManager(request, ActionType.ACTIVATE).activateNssi(request, snssai));
- } catch (ApplicationException e) {
- return e.buildErrorResponse();
- }
- }
-
- @Override
- public ResponseEntity deActivateNssi(NssmfAdapterNBIRequest request, String snssai) {
- try {
- return buildResponse(buildNssmfManager(request, ActionType.DEACTIVATE).deActivateNssi(request, snssai));
- } catch (ApplicationException e) {
- return e.buildErrorResponse();
- }
- }
-
- @Override
- public ResponseEntity queryJobStatus(NssmfAdapterNBIRequest jobReq, String jobId) {
- try {
- return buildResponse(buildNssmfManager(jobReq, ActionType.QUERY_JOB_STATUS).queryJobStatus(jobReq, jobId));
- } catch (ApplicationException e) {
- return e.buildErrorResponse();
- }
- }
-
- @Override
- public ResponseEntity queryNSSISelectionCapability(NssmfAdapterNBIRequest nbiRequest) {
- EsrInfo esrInfo = nbiRequest.getEsrInfo();
- try {
- return buildResponse(buildNssmfManager(esrInfo, ActionType.QUERY_NSSI_SELECTION_CAPABILITY, null)
- .queryNSSISelectionCapability(nbiRequest));
- } catch (ApplicationException e) {
- return e.buildErrorResponse();
- }
- }
-
- @Override
- public ResponseEntity querySubnetCapability(NssmfAdapterNBIRequest nbiRequest) {
- EsrInfo esrInfo = nbiRequest.getEsrInfo();
- try {
- return buildResponse(buildNssmfManager(esrInfo, ActionType.QUERY_SUB_NET_CAPABILITY, null)
- .querySubnetCapability(nbiRequest));
- } catch (ApplicationException e) {
- return e.buildErrorResponse();
- }
- }
-
- private ResponseEntity buildResponse(RestResponse rsp) {
- return ResponseEntity.status(rsp.getStatus()).body(rsp.getResponseContent());
- }
-
-
- private NssmfManager buildNssmfManager(NssmfAdapterNBIRequest request, ActionType actionType)
- throws ApplicationException {
- return buildNssmfManager(request.getEsrInfo(), actionType, request.getServiceInfo());
- }
-
- private NssmfManager buildNssmfManager(EsrInfo esrInfo, ActionType actionType, ServiceInfo serviceInfo)
- throws ApplicationException {
-
- return new NssmfManagerBuilder(esrInfo).setActionType(actionType).setRepository(repository)
- .setRestUtil(restUtil).setAdapterConfig(nssmfAdapterConfig).setServiceInfo(serviceInfo).build();
- }
-}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/util/NssmfAdapterUtil.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/util/NssmfAdapterUtil.java
deleted file mode 100644
index 090417ddc2..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/util/NssmfAdapterUtil.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.nssmf.util;
-
-import com.fasterxml.jackson.databind.ObjectMapper;
-import java.io.IOException;
-import org.onap.so.adapters.nssmf.enums.ActionType;
-import org.onap.so.adapters.nssmf.exceptions.ApplicationException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.onap.logging.filter.base.ErrorCode;
-import org.springframework.stereotype.Component;
-import static org.onap.so.logger.LoggingAnchor.THREE;
-import static org.onap.so.logger.MessageEnum.RA_NS_EXC;
-
-public class NssmfAdapterUtil {
-
- private static final Logger LOGGER = LoggerFactory.getLogger(NssmfAdapterUtil.class);
-
- public static final int BAD_REQUEST = 400;
-
- private static final String UNMARSHAL_FAIL_MSG = "Failed to unmarshal json";
-
- private static final String MARSHAL_FAIL_MSG = "Failed to marshal object";
-
- private static final ObjectMapper MAPPER = new ObjectMapper();
-
- public static class StatusDesc {
-
- public static final String ALLOCATE_NSS_SUCCESS = "Allocating nss is " + "successful";
-
- public static final String MODIFY_NSS_SUCCESS = "Modify nss is " + "successful";
-
- public static final String CREATE_NSS_SUCCESS = "Creating nss is " + "successful";
-
- public static final String DEALLOCATE_NSS_SUCCESS = "Deallocate nss " + "is successful";
-
- public static final String ACTIVATE_NSS_SUCCESS = "Activate nss " + "is successful";
-
- public static final String DEACTIVATE_NSS_SUCCESS = "Deactivate nss " + "is successful";
-
- public static final String QUERY_JOB_STATUS_FAILED = "Query job " + "status failed";
-
- public static final String QUERY_JOB_STATUS_SUCCESS = "Query job " + "status is successful";
-
- private StatusDesc() {
-
- }
- }
-
- private NssmfAdapterUtil() {
-
- }
-
- public static void assertObjectNotNull(Object object) throws ApplicationException {
- if (null == object) {
- LOGGER.error("Object is null.");
- throw new ApplicationException(BAD_REQUEST, "An object is null.");
- }
- }
-
- public static <T> T unMarshal(String jsonstr, Class<T> type) throws ApplicationException {
- try {
- return MAPPER.readValue(jsonstr, type);
- } catch (IOException e) {
- LOGGER.error(THREE, RA_NS_EXC.toString(), ErrorCode.BusinessProcessError.getValue(), UNMARSHAL_FAIL_MSG, e);
- throw new ApplicationException(BAD_REQUEST, UNMARSHAL_FAIL_MSG);
- }
- }
-
- public static String marshal(Object srcObj) throws ApplicationException {
- try {
- return MAPPER.writerWithDefaultPrettyPrinter().writeValueAsString(srcObj);
- } catch (IOException e) {
- LOGGER.error(THREE, RA_NS_EXC.toString(), ErrorCode.BusinessProcessError.getValue(), MARSHAL_FAIL_MSG, e);
- throw new ApplicationException(BAD_REQUEST, MARSHAL_FAIL_MSG);
- }
- }
-
-
- public static String getStatusDesc(ActionType actionType) {
- String desc = "";
- switch (actionType) {
- case ALLOCATE:
- desc = StatusDesc.ALLOCATE_NSS_SUCCESS;
- break;
- case DEALLOCATE:
- desc = StatusDesc.DEALLOCATE_NSS_SUCCESS;
- break;
- case ACTIVATE:
- desc = StatusDesc.ACTIVATE_NSS_SUCCESS;
- break;
- case DEACTIVATE:
- desc = StatusDesc.DEACTIVATE_NSS_SUCCESS;
- break;
- case MODIFY:
- desc = StatusDesc.MODIFY_NSS_SUCCESS;
- break;
- default:
- break;
- }
-
- return desc;
- }
-}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/util/RestUtil.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/util/RestUtil.java
deleted file mode 100644
index 60bf423ed8..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/util/RestUtil.java
+++ /dev/null
@@ -1,358 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.nssmf.util;
-
-import javax.net.ssl.*;
-import javax.ws.rs.core.UriBuilder;
-import java.net.SocketTimeoutException;
-import java.net.URI;
-import org.apache.http.Header;
-import org.apache.http.HttpResponse;
-import org.apache.http.client.HttpClient;
-import org.apache.http.client.config.RequestConfig;
-import org.apache.http.client.methods.*;
-import org.apache.http.conn.ConnectTimeoutException;
-import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
-import org.apache.http.entity.StringEntity;
-import org.apache.http.impl.client.HttpClients;
-import org.apache.http.message.BasicHeader;
-import org.apache.http.util.EntityUtils;
-import org.onap.aai.domain.yang.*;
-import org.onap.so.adapters.nssmf.exceptions.ApplicationException;
-import org.onap.so.adapters.nssmf.extclients.aai.AaiServiceProvider;
-import org.onap.so.adapters.nssmf.entity.TokenRequest;
-import org.onap.so.adapters.nssmf.entity.TokenResponse;
-import org.onap.so.adapters.nssmf.enums.HttpMethod;
-import org.onap.so.adapters.nssmf.entity.NssmfInfo;
-import org.onap.so.adapters.nssmf.entity.RestResponse;
-import org.onap.so.beans.nsmf.EsrInfo;
-import org.onap.so.beans.nsmf.ServiceInfo;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-import static org.apache.http.entity.ContentType.APPLICATION_JSON;
-import static org.onap.so.adapters.nssmf.enums.HttpMethod.POST;
-import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.BAD_REQUEST;
-import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.marshal;
-import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.unMarshal;
-import static org.onap.logging.filter.base.ErrorCode.AvailabilityError;
-import static org.onap.so.logger.LoggingAnchor.FOUR;
-import static org.onap.so.logger.MessageEnum.RA_NS_EXC;
-
-@Component
-public class RestUtil {
-
- private static final Logger logger = LoggerFactory.getLogger(RestUtil.class);
-
- private static final int DEFAULT_TIME_OUT = 60000;
-
- private static final String NSSMI_ADAPTER = "NSSMI Adapter";
-
- private static final String TOKEN_URL = "/api/rest/securityManagement/v1" + "/oauth/token";
-
- @Autowired
- private AaiServiceProvider aaiSvcProv;
-
- public void createServiceInstance(ServiceInstance serviceInstance, ServiceInfo serviceInfo) {
- aaiSvcProv.invokeCreateServiceInstance(serviceInstance, serviceInfo.getGlobalSubscriberId(),
- serviceInfo.getSubscriptionServiceType(), serviceInfo.getNssiId());
- }
-
- public void updateServiceInstance(ServiceInstance serviceInstance, ServiceInfo serviceInfo) {
- aaiSvcProv.invokeUpdateServiceInstance(serviceInstance, serviceInfo.getGlobalSubscriberId(),
- serviceInfo.getSubscriptionServiceType(), serviceInfo.getNssiId());
- }
-
- public ServiceInstance getServiceInstance(ServiceInfo serviceInfo) {
- return aaiSvcProv.invokeGetServiceInstance(serviceInfo.getGlobalSubscriberId(),
- serviceInfo.getSubscriptionServiceType(), serviceInfo.getNssiId());
- }
-
- public void deleteServiceInstance(ServiceInfo serviceInfo) {
- aaiSvcProv.invokeDeleteServiceInstance(serviceInfo.getGlobalSubscriberId(),
- serviceInfo.getSubscriptionServiceType(), serviceInfo.getNssiId());
- }
-
- public NssmfInfo getNssmfHost(EsrInfo esrInfo) throws ApplicationException {
- EsrThirdpartySdncList sdncList = aaiSvcProv.invokeGetThirdPartySdncList();
- if (sdncList != null && sdncList.getEsrThirdpartySdnc() != null) {
- for (EsrThirdpartySdnc sdncEsr : sdncList.getEsrThirdpartySdnc()) {
-
- EsrSystemInfoList sysInfoList =
- aaiSvcProv.invokeGetThirdPartySdncEsrSystemInfo(sdncEsr.getThirdpartySdncId());
-
- if (sysInfoList != null && sysInfoList.getEsrSystemInfo() != null) {
- for (EsrSystemInfo esr : sysInfoList.getEsrSystemInfo()) {
- if (esr != null && esr.getType().equals(esrInfo.getNetworkType().getNetworkType())
- && esr.getVendor().equals(esrInfo.getVendor())) {
- logger.info("Found an entry with vendor name " + esrInfo.getVendor() + " and network type "
- + esrInfo.getNetworkType() + " in ESR.");
- NssmfInfo nssmfInfo = new NssmfInfo();
- nssmfInfo.setIpAddress(esr.getIpAddress());
- nssmfInfo.setPort(esr.getPort());
- nssmfInfo.setCacert(esr.getSslCacert());
- nssmfInfo.setUserName(esr.getUserName());
- nssmfInfo.setPassword(esr.getPassword());
- String endPoint = UriBuilder.fromPath("").host(esr.getIpAddress())
- .port(Integer.valueOf(esr.getPort())).scheme("https").build().toString();
- nssmfInfo.setUrl(endPoint);
- return nssmfInfo;
- }
- }
- }
-
- }
- }
-
- throw new ApplicationException(BAD_REQUEST, "ESR information is improper");
- }
-
-
- public String getToken(NssmfInfo nssmfInfo) throws ApplicationException {
-
-
- TokenRequest req = new TokenRequest();
- req.setGrantType("password");
- req.setUserName(nssmfInfo.getUserName());
- req.setValue(nssmfInfo.getPassword());
-
- String tokenReq = marshal(req);
-
- logger.info("Sending token request to NSSMF: " + tokenReq);
- RestResponse tokenRes = send(nssmfInfo.getUrl() + TOKEN_URL, POST, tokenReq, null);
-
- TokenResponse res = unMarshal(tokenRes.getResponseContent(), TokenResponse.class);
-
- return res.getAccessToken();
- }
-
-
- public RestResponse send(String url, HttpMethod methodType, String content, Header header) {
-
- HttpRequestBase req = null;
- HttpResponse res = null;
-
- logger.debug("Beginning to send message {}: {}", methodType, url);
-
- try {
- int timeout = DEFAULT_TIME_OUT;
-
- RequestConfig config = RequestConfig.custom().setSocketTimeout(timeout).setConnectTimeout(timeout)
- .setConnectionRequestTimeout(timeout).build();
- logger.debug("Sending request to NSSMF: " + content);
- req = getHttpReq(url, methodType, header, config, content);
- res = getHttpsClient().execute(req);
-
- String resContent = null;
- if (res.getEntity() != null) {
- resContent = EntityUtils.toString(res.getEntity(), "UTF-8");
- }
-
- int statusCode = res.getStatusLine().getStatusCode();
- String statusMessage = res.getStatusLine().getReasonPhrase();
- logger.info("NSSMF Response: {} {}", statusCode,
- statusMessage + (resContent == null ? "" : System.lineSeparator() + resContent));
-
- if (res.getStatusLine().getStatusCode() >= 300) {
- String errMsg = "{\n \"errorCode\": " + res.getStatusLine().getStatusCode()
- + "\n \"errorDescription\": " + statusMessage + "\n}";
- logError(errMsg);
- return createResponse(statusCode, errMsg);
- }
- if (null != req) {
- req.reset();
- }
- req = null;
-
- return createResponse(statusCode, resContent);
-
- } catch (SocketTimeoutException | ConnectTimeoutException e) {
- String errMsg = "Request to NSSMF timed out";
- logError(errMsg, e);
- return createResponse(408, errMsg);
- } catch (Exception e) {
- String errMsg = "Error processing request to NSSMF";
- logError(errMsg, e);
- return createResponse(500, errMsg);
- } finally {
- if (res != null) {
- try {
- EntityUtils.consume(res.getEntity());
- } catch (Exception e) {
- logger.debug("Exception :", e);
- }
- }
- if (req != null) {
- try {
- req.reset();
- } catch (Exception e) {
- logger.debug("Exception :", e);
- }
- }
- }
- }
-
- public RestResponse createResponse(int statusCode, String errMsg) {
- RestResponse restResponse = new RestResponse();
- restResponse.setStatus(statusCode);
- restResponse.setResponseContent(errMsg);
- return restResponse;
- }
-
- private HttpRequestBase getHttpReq(String url, HttpMethod method, Header header, RequestConfig config,
- String content) throws ApplicationException {
- HttpRequestBase base;
- switch (method) {
- case POST:
- HttpPost post = new HttpPost(url);
- post.setEntity(new StringEntity(content, APPLICATION_JSON));
- base = post;
- break;
-
- case GET:
- HttpGetWithBody get = new HttpGetWithBody(url);
- if (content != null) {
- get.setEntity(new StringEntity(content, APPLICATION_JSON));
- }
- base = get;
- break;
-
- case PUT:
- HttpPut put = new HttpPut(url);
- put.setEntity(new StringEntity(content, APPLICATION_JSON));
- base = put;
- break;
-
- case PATCH:
- base = new HttpPatch(url);
- break;
-
- case DELETE:
- HttpDeleteWithBody delete = new HttpDeleteWithBody(url);
- if (content != null) {
- delete.setEntity(new StringEntity(content, APPLICATION_JSON));
- }
- base = delete;
- break;
- default:
- throw new ApplicationException(404, "invalid method: " + method);
-
- }
- base.setConfig(config);
- if (header != null) {
- base.setHeader(header);
- }
- return base;
- }
-
- public RestResponse sendRequest(String allocateUrl, HttpMethod post, String allocateReq, EsrInfo esrInfo)
- throws ApplicationException {
- NssmfInfo nssmfInfo = getNssmfHost(esrInfo);
- Header header = new BasicHeader("X-Auth-Token", getToken(nssmfInfo));
- String nssmfUrl = nssmfInfo.getUrl() + allocateUrl;
- return send(nssmfUrl, post, allocateReq, header);
- }
-
- class HttpDeleteWithBody extends HttpEntityEnclosingRequestBase {
- public static final String METHOD_NAME = "DELETE";
-
- @Override
- public String getMethod() {
- return METHOD_NAME;
- }
-
- public HttpDeleteWithBody(final String uri) {
- super();
- setURI(URI.create(uri));
- }
-
- public HttpDeleteWithBody(final URI uri) {
- super();
- setURI(uri);
- }
-
- public HttpDeleteWithBody() {
- super();
- }
- }
-
- class HttpGetWithBody extends HttpEntityEnclosingRequestBase {
- public static final String METHOD_NAME = "GET";
-
- public HttpGetWithBody() {
- super();
- }
-
- public HttpGetWithBody(final String uri) {
- super();
- setURI(URI.create(uri));
- }
-
- public HttpGetWithBody(final URI uri) {
- super();
- setURI(uri);
- }
-
- @Override
- public String getMethod() {
- return METHOD_NAME;
- }
- }
-
-
- public HttpClient getHttpsClient() {
-
- TrustManager[] trustAllCerts = new TrustManager[] {new X509TrustManager() {
- @Override
- public java.security.cert.X509Certificate[] getAcceptedIssuers() {
- return null;
- }
-
- @Override
- public void checkClientTrusted(java.security.cert.X509Certificate[] certs, String authType) {}
-
- @Override
- public void checkServerTrusted(java.security.cert.X509Certificate[] certs, String authType) {}
- }};
-
- // Install the all-trusting trust manager
- try {
- SSLContext sc = SSLContext.getInstance("SSL");
- sc.init(null, trustAllCerts, new java.security.SecureRandom());
-
- SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sc,
- new String[] {"TLSv1", "TLSv1.1", "TLSv1.2", "TLSv1.3"}, null, (s, sslSession) -> true);
- return HttpClients.custom().setSSLSocketFactory(sslsf).build();
- } catch (Exception e) {
- throw new IllegalArgumentException(e);
- }
- }
-
- private static void logError(String errMsg, Throwable t) {
- logger.error(FOUR, RA_NS_EXC.toString(), NSSMI_ADAPTER, AvailabilityError.getValue(), errMsg, t);
- }
-
- private static void logError(String errMsg) {
- logger.error(FOUR, RA_NS_EXC.toString(), NSSMI_ADAPTER, AvailabilityError.toString(), errMsg);
- }
-}
-
diff --git a/adapters/mso-nssmf-adapter/src/main/resources/META-INF/services/org.onap.so.client.RestProperties b/adapters/mso-nssmf-adapter/src/main/resources/META-INF/services/org.onap.so.client.RestProperties
deleted file mode 100644
index f93ec63f37..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/resources/META-INF/services/org.onap.so.client.RestProperties
+++ /dev/null
@@ -1 +0,0 @@
-org.onap.so.adapters.nssmf.extclients.aai.AaiClientPropertiesImpl \ No newline at end of file
diff --git a/adapters/mso-nssmf-adapter/src/main/resources/application-aaf.yaml b/adapters/mso-nssmf-adapter/src/main/resources/application-aaf.yaml
deleted file mode 100644
index e69de29bb2..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/resources/application-aaf.yaml
+++ /dev/null
diff --git a/adapters/mso-nssmf-adapter/src/main/resources/application-basic.yaml b/adapters/mso-nssmf-adapter/src/main/resources/application-basic.yaml
deleted file mode 100644
index e69de29bb2..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/resources/application-basic.yaml
+++ /dev/null
diff --git a/adapters/mso-nssmf-adapter/src/main/resources/application-test.yaml b/adapters/mso-nssmf-adapter/src/main/resources/application-test.yaml
deleted file mode 100644
index 8e10dfb72b..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/resources/application-test.yaml
+++ /dev/null
@@ -1,60 +0,0 @@
-
-aai:
- auth: 2A11B07DB6214A839394AA1EC5844695F5114FC407FF5422625FB00175A3DCB8A1FF745F22867EFA72D5369D599BBD88DA8BED4233CF5586
- endpoint: https://aai.onap:30233
-logging:
- path: logs
-
-spring:
- datasource:
- jdbcUrl: jdbc:mariadb://49.232.146.162:8989/requestdb
- username: root
- password: 123456
- driver-class-name: org.mariadb.jdbc.Driver
- initialization-mode: always
- jpa:
- generate-ddl: false
- show-sql: false
- hibernate:
- ddl-auto: none
- naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy
- enable-lazy-load-no-trans: true
- database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
- security:
- usercredentials:
- - username: bpel
- password: '$2a$10$Fh9ffgPw2vnmsghsRD3ZauBL1aKXebigbq3BB1RPWtE62UDILsjke'
- role: BPEL-Client
- - username: mso_admin
- password: '$2a$10$Fh9ffgPw2vnmsghsRD3ZauBL1aKXebigbq3BB1RPWtE62UDILsjke'
- role: ACTUATOR
-server:
- port: 8080
- tomcat:
- max-threads: 50
-
-mso:
- key: 07a7159d3bf51a0e53be7a8f89699be7
- site-name: localSite
- logPath: ./logs/nssmf
- adapters:
- requestDb:
- endpoint: https://so-request-db-adapter.onap:8083
- auth: Basic YnBlbDpwYXNzd29yZDEk
- infra:
- endpoint: https://so.onap:8080
- auth: Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==
-
-#Actuator
-management:
- endpoints:
- web:
- base-path: /manage
- exposure:
- include: "*"
- metrics:
- se-global-registry: false
- export:
- prometheus:
- enabled: true # Whether exporting of metrics to Prometheus is enabled.
- step: 1m # Step size (i.e. reporting frequency) to use. \ No newline at end of file
diff --git a/adapters/mso-nssmf-adapter/src/main/resources/application.yaml b/adapters/mso-nssmf-adapter/src/main/resources/application.yaml
deleted file mode 100644
index 5501fba88f..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/resources/application.yaml
+++ /dev/null
@@ -1,77 +0,0 @@
-#
-# ============LICENSE_START=======================================================
-# ONAP - SO
-# ================================================================================
-# Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
-# ================================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# ============LICENSE_END=========================================================
-#/
-aai:
- auth: 2A11B07DB6214A839394AA1EC5844695F5114FC407FF5422625FB00175A3DCB8A1FF745F22867EFA72D5369D599BBD88DA8BED4233CF5586
- endpoint: https://aai.onap:30233
-logging:
- path: logs
-
-spring:
- datasource:
- jdbc-url: jdbc:mariadb://${DB_HOST}:${DB_PORT}/requestdb
- username: ${DB_USERNAME}
- password: ${DB_PASSWORD}
- driver-class-name: org.mariadb.jdbc.Driver
- jpa:
- show-sql: false
- hibernate:
- dialect: org.hibernate.dialect.MySQL5Dialect
- ddl-auto: validate
- naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy
- enable-lazy-load-no-trans: true
- security:
- usercredentials:
- - username: bpel
- password: '$2a$10$Fh9ffgPw2vnmsghsRD3ZauBL1aKXebigbq3BB1RPWtE62UDILsjke'
- role: BPEL-Client
- - username: mso_admin
- password: '$2a$10$Fh9ffgPw2vnmsghsRD3ZauBL1aKXebigbq3BB1RPWtE62UDILsjke'
- role: ACTUATOR
-
-server:
- port: 8080
- tomcat:
- max-threads: 50
-
-mso:
- key: 07a7159d3bf51a0e53be7a8f89699be7
- site-name: localSite
- logPath: ./logs/nssmf
- adapters:
- requestDb:
- endpoint: https://so-request-db-adapter.{{ include "common.namespace" . }}:8083
- auth: Basic YnBlbDpwYXNzd29yZDEk
- infra:
- endpoint: http://so.onap:8080
- auth: Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==
-
-#Actuator
-management:
- endpoints:
- web:
- base-path: /manage
- exposure:
- include: "*"
- metrics:
- se-global-registry: false
- export:
- prometheus:
- enabled: true # Whether exporting of metrics to Prometheus is enabled.
- step: 1m # Step size (i.e. reporting frequency) to use.
diff --git a/adapters/mso-nssmf-adapter/src/main/resources/org.onap.so.p12 b/adapters/mso-nssmf-adapter/src/main/resources/org.onap.so.p12
deleted file mode 100644
index 79631bf344..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/resources/org.onap.so.p12
+++ /dev/null
Binary files differ
diff --git a/adapters/mso-nssmf-adapter/src/main/resources/org.onap.so.trust.jks b/adapters/mso-nssmf-adapter/src/main/resources/org.onap.so.trust.jks
deleted file mode 100644
index 6f8168d896..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/resources/org.onap.so.trust.jks
+++ /dev/null
Binary files differ
diff --git a/adapters/mso-nssmf-adapter/src/main/resources/subnetCapability.json b/adapters/mso-nssmf-adapter/src/main/resources/subnetCapability.json
deleted file mode 100644
index 8753e85ea2..0000000000
--- a/adapters/mso-nssmf-adapter/src/main/resources/subnetCapability.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "AN": {
- "latency": 5,
- "maxNumberofUEs": "100"
- },
- "CN": {
- "latency": 5,
- "maxNumberofConns": "100"
- }
-}
diff --git a/adapters/mso-nssmf-adapter/src/test/java/org/onap/so/adapters/nssmf/NssmfAdapterRestTest.java b/adapters/mso-nssmf-adapter/src/test/java/org/onap/so/adapters/nssmf/NssmfAdapterRestTest.java
deleted file mode 100644
index f78bfd297a..0000000000
--- a/adapters/mso-nssmf-adapter/src/test/java/org/onap/so/adapters/nssmf/NssmfAdapterRestTest.java
+++ /dev/null
@@ -1,400 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.nssmf;
-
-import static java.nio.charset.StandardCharsets.UTF_8;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.Mockito.doAnswer;
-import static org.mockito.Mockito.when;
-import static org.mockito.MockitoAnnotations.initMocks;
-import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.marshal;
-import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.unMarshal;
-import static org.onap.so.beans.nsmf.NetworkType.CORE;
-import static org.onap.so.beans.nsmf.ResourceSharingLevel.NON_SHARED;
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.util.LinkedList;
-import java.util.List;
-import org.apache.http.Header;
-import org.apache.http.HttpEntity;
-import org.apache.http.HttpResponse;
-import org.apache.http.StatusLine;
-import org.apache.http.client.HttpClient;
-import org.apache.http.client.methods.HttpRequestBase;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.invocation.InvocationOnMock;
-import org.mockito.stubbing.Answer;
-import org.onap.so.adapters.nssmf.entity.TokenResponse;
-import org.onap.so.adapters.nssmf.enums.HttpMethod;
-import org.onap.so.adapters.nssmf.rest.NssmfAdapterRest;
-import org.onap.so.adapters.nssmf.entity.NssmfInfo;
-import org.onap.so.adapters.nssmf.rest.NssmfManager;
-import org.onap.so.adapters.nssmf.util.RestUtil;
-import org.onap.so.beans.nsmf.ActDeActNssi;
-import org.onap.so.beans.nsmf.AllocateCnNssi;
-import org.onap.so.beans.nsmf.CnSliceProfile;
-import org.onap.so.beans.nsmf.DeAllocateNssi;
-import org.onap.so.beans.nsmf.EsrInfo;
-import org.onap.so.beans.nsmf.JobStatusRequest;
-import org.onap.so.beans.nsmf.NsiInfo;
-import org.onap.so.beans.nsmf.NssiActDeActRequest;
-import org.onap.so.beans.nsmf.NssiAllocateRequest;
-import org.onap.so.beans.nsmf.NssiDeAllocateRequest;
-import org.onap.so.beans.nsmf.NssiResponse;
-import org.onap.so.beans.nsmf.PerfReq;
-import org.onap.so.beans.nsmf.PerfReqEmbb;
-import org.onap.so.db.request.data.repository.ResourceOperationStatusRepository;
-import org.skyscreamer.jsonassert.JSONAssert;
-import org.springframework.http.ResponseEntity;
-import org.springframework.test.context.junit4.SpringRunner;
-
-@RunWith(SpringRunner.class)
-public class NssmfAdapterRestTest {
-
- private final static String ALLOCATE = "{\n" + " \"esrInfo\" : {\n" + " \"vendor\" : \"huawei\",\n"
- + " \"networkType\" : \"cn\"\n" + " },\n" + " \"allocateCnNssi\" : {\n"
- + " \"nssiId\" : \"NSST-C-001-HDBNJ-NSSMF-01-A-ZX\",\n" + " \"nssiName\" : \"eMBB-001\",\n"
- + " \"sliceProfile\" : {\n" + " \"snssaiList\" : [ \"001-100001\" ],\n"
- + " \"maxNumberofPDUSession\" : 10,\n"
- + " \"sliceProfileId\" : \"ab9af40f13f721b5f13539d87484098\",\n"
- + " \"plmnIdList\" : [ \"460-00\", \"460-01\" ],\n" + " \"perfReq\" : {\n"
- + " \"perfReqEmbbList\" : [ {\n" + " \"activityFactor\" : 50\n" + " } ]\n"
- + " },\n" + " \"maxNumberofUEs\" : 200,\n"
- + " \"coverageAreaTAList\" : [ \"1\", \"2\", \"3\" ],\n" + " \"latency\" : 6,\n"
- + " \"resourceSharingLevel\" : \"non-shared\"\n" + " },\n" + " \"scriptName\" : \"CN1\",\n"
- + " \"nsiInfo\" : {\n" + " \"nsiName\" : \"eMBB-001\",\n"
- + " \"nsiId\" : \"NSI-M-001-HDBNJ-NSMF-01-A-ZX\"\n" + " }\n" + " }\n" + "}";
-
- private NssmfManager nssmfMgr;
-
- @Mock
- private ResourceOperationStatusRepository rscOperStatusRepo;
-
- @Mock
- private RestUtil restUtil;
-
- @Mock
- private NssmfAdapterRest nssmfRest;
-
- @Mock
- private HttpResponse tokenResponse;
-
- @Mock
- private HttpEntity tokenEntity;
-
- @Mock
- private HttpResponse commonResponse;
-
- @Mock
- private HttpEntity commonEntity;
-
- @Mock
- private StatusLine statusLine;
-
- @Mock
- private HttpClient httpClient;
-
- private InputStream postStream;
-
- private InputStream tokenStream;
-
- @Before
- public void setUp() {
- initMocks(this);
- nssmfMgr = new NssmfManager();
- nssmfMgr.setRestUtil(restUtil);
- nssmfMgr.setRscOperStatusRepo(rscOperStatusRepo);
- }
-
- private void createCommonMock(int statusCode, NssmfInfo nssmf) throws Exception {
- when(this.restUtil.send(any(String.class), any(HttpMethod.class), any(String.class), any(Header.class)))
- .thenCallRealMethod();
- when(this.restUtil.createResponse(any(Integer.class), any(String.class))).thenCallRealMethod();
- when(nssmfRest.getNssmfMgr()).thenReturn(nssmfMgr);
- // when(nssmfRest.createAllocateNssi(any(NssiAllocateRequest.class))).thenCallRealMethod();
- // when(nssmfRest.deAllocateNssi(any(NssiDeAllocateRequest.class), any(String.class))).thenCallRealMethod();
- // when(nssmfRest.activateNssi(any(NssiActDeActRequest.class), any(String.class))).thenCallRealMethod();
- // when(nssmfRest.deactivateNssi(any(NssiActDeActRequest.class), any(String.class))).thenCallRealMethod();
- //
- // when(nssmfRest.queryJobStatus(any(JobStatusRequest.class), any(String.class))).thenCallRealMethod();
- when(restUtil.sendRequest(any(String.class), any(HttpMethod.class), any(String.class), any(EsrInfo.class)))
- .thenCallRealMethod();
- when(restUtil.getHttpsClient()).thenReturn(httpClient);
-
- when(statusLine.getStatusCode()).thenReturn(200);
- when(restUtil.getNssmfHost(any(EsrInfo.class))).thenReturn(nssmf);
-
- when(tokenResponse.getEntity()).thenReturn(tokenEntity);
- when(tokenResponse.getStatusLine()).thenReturn(statusLine);
- when(tokenEntity.getContent()).thenReturn(tokenStream);
-
- when(commonResponse.getEntity()).thenReturn(commonEntity);
- when(commonResponse.getStatusLine()).thenReturn(statusLine);
- when(commonEntity.getContent()).thenReturn(postStream);
-
- Answer<HttpResponse> answer = new Answer<HttpResponse>() {
-
- public HttpResponse answer(InvocationOnMock invocation) throws Throwable {
- Object[] arguments = invocation.getArguments();
- if (arguments != null && arguments.length == 1 && arguments[0] != null) {
-
- HttpRequestBase base = (HttpRequestBase) arguments[0];
- if (base.getURI().toString().endsWith("/oauth/token")) {
- return tokenResponse;
- } else {
- return commonResponse;
- }
- }
- return commonResponse;
- }
- };
- doAnswer(answer).when(httpClient).execute(any(HttpRequestBase.class));
- }
-
- // @Test
- // public void testNssiAllocate() throws Exception {
- // NssmfInfo nssmf = new NssmfInfo();
- // nssmf.setUserName("nssmf-user");
- // nssmf.setPassword("nssmf-pass");
- // nssmf.setPort("8080");
- // nssmf.setIpAddress("127.0.0.1");
- //
- // NssiResponse nssiRes = new NssiResponse();
- // nssiRes.setJobId("4b45d919816ccaa2b762df5120f72067");
- // nssiRes.setNssiId("NSSI-C-001-HDBNJ-NSSMF-01-A-ZX");
- //
- // TokenResponse token = new TokenResponse();
- // token.setAccessToken("7512eb3feb5249eca5ddd742fedddd39");
- // token.setExpires(1800);
- //
- // postStream = new ByteArrayInputStream(marshal(nssiRes).getBytes(UTF_8));
- // tokenStream = new ByteArrayInputStream(marshal(token).getBytes(UTF_8));
- //
- // createCommonMock(200, nssmf);
- // // assertEquals(prettyPrint(createAllocateNssi()), ALLOCATE);
- // ResponseEntity res = nssmfRest.createAllocateNssi(createAllocateNssi());
- // assertNotNull(res);
- // assertNotNull(res.getBody());
- // NssiResponse allRes = unMarshal(res.getBody().toString(), NssiResponse.class);
- // assertEquals(allRes.getJobId(), "4b45d919816ccaa2b762df5120f72067");
- // assertEquals(allRes.getNssiId(), "NSSI-C-001-HDBNJ-NSSMF-01-A-ZX");
- // }
- //
- // @Test
- // public void testNssiDeAllocate() throws Exception {
- // NssmfInfo nssmf = new NssmfInfo();
- // nssmf.setUserName("nssmf-user");
- // nssmf.setPassword("nssmf-pass");
- // nssmf.setPort("8080");
- // nssmf.setIpAddress("127.0.0.1");
- //
- // NssiResponse nssiRes = new NssiResponse();
- // nssiRes.setJobId("4b45d919816ccaa2b762df5120f72067");
- //
- // TokenResponse token = new TokenResponse();
- // token.setAccessToken("7512eb3feb5249eca5ddd742fedddd39");
- // token.setExpires(1800);
- //
- // postStream = new ByteArrayInputStream(marshal(nssiRes).getBytes(UTF_8));
- // tokenStream = new ByteArrayInputStream(marshal(token).getBytes(UTF_8));
- //
- // createCommonMock(200, nssmf);
- // ResponseEntity res = nssmfRest.deAllocateNssi(deAllocateNssi(), "ab9af40f13f721b5f13539d87484098");
- // assertNotNull(res);
- // assertNotNull(res.getBody());
- // NssiResponse allRes = unMarshal(res.getBody().toString(), NssiResponse.class);
- // assertEquals(allRes.getJobId(), "4b45d919816ccaa2b762df5120f72067");
- // }
- //
- // @Test
- // public void testNssiActivate() throws Exception {
- // NssmfInfo nssmf = new NssmfInfo();
- // nssmf.setUserName("nssmf-user");
- // nssmf.setPassword("nssmf-pass");
- // nssmf.setPort("8080");
- // nssmf.setIpAddress("127.0.0.1");
- //
- // NssiResponse nssiRes = new NssiResponse();
- // nssiRes.setJobId("4b45d919816ccaa2b762df5120f72067");
- //
- // TokenResponse token = new TokenResponse();
- // token.setAccessToken("7512eb3feb5249eca5ddd742fedddd39");
- // token.setExpires(1800);
- //
- // postStream = new ByteArrayInputStream(marshal(nssiRes).getBytes(UTF_8));
- // tokenStream = new ByteArrayInputStream(marshal(token).getBytes(UTF_8));
- //
- // createCommonMock(200, nssmf);
- // ResponseEntity res = nssmfRest.activateNssi(activateNssi(), "001-100001");
- // assertNotNull(res);
- // assertNotNull(res.getBody());
- // NssiResponse allRes = unMarshal(res.getBody().toString(), NssiResponse.class);
- // assertEquals(allRes.getJobId(), "4b45d919816ccaa2b762df5120f72067");
- // }
- //
- // @Test
- // public void testNssiDeActivate() throws Exception {
- // NssmfInfo nssmf = new NssmfInfo();
- // nssmf.setUserName("nssmf-user");
- // nssmf.setPassword("nssmf-pass");
- // nssmf.setPort("8080");
- // nssmf.setIpAddress("127.0.0.1");
- //
- // NssiResponse nssiRes = new NssiResponse();
- // nssiRes.setJobId("4b45d919816ccaa2b762df5120f72067");
- //
- // TokenResponse token = new TokenResponse();
- // token.setAccessToken("7512eb3feb5249eca5ddd742fedddd39");
- // token.setExpires(1800);
- //
- // postStream = new ByteArrayInputStream(marshal(nssiRes).getBytes(UTF_8));
- // tokenStream = new ByteArrayInputStream(marshal(token).getBytes(UTF_8));
- //
- // createCommonMock(200, nssmf);
- // ResponseEntity res = nssmfRest.deactivateNssi(deActivateNssi(), "001-100001");
- // assertNotNull(res);
- // assertNotNull(res.getBody());
- // NssiResponse allRes = unMarshal(res.getBody().toString(), NssiResponse.class);
- // assertEquals(allRes.getJobId(), "4b45d919816ccaa2b762df5120f72067");
- // }
- //
- @Test
- public void testAllocateJsonSerDeSer() throws Exception {
- JSONAssert.assertEquals(marshal(allocateNssi()), ALLOCATE, false);
- NssiAllocateRequest all = unMarshal(ALLOCATE, NssiAllocateRequest.class);
- assertNotNull(all);
- assertNotNull(all.getAllocateCnNssi());
- assertNotNull(all.getAllocateCnNssi().getSliceProfile());
- assertEquals(all.getAllocateCnNssi().getSliceProfile().getResourceSharingLevel(), NON_SHARED);
- assertNotNull(all.getAllocateCnNssi().getSliceProfile().getPerfReq());
- assertNotNull(all.getAllocateCnNssi().getSliceProfile().getPerfReq().getPerfReqEmbbList());
- PerfReqEmbb embb =
- all.getAllocateCnNssi().getSliceProfile().getPerfReq().getPerfReqEmbbList().iterator().next();
- assertNotNull(embb);
- assertEquals(embb.getActivityFactor(), 50);
- }
-
- public NssiAllocateRequest allocateNssi() throws Exception {
- CnSliceProfile sP = new CnSliceProfile();
- List<String> sns = new LinkedList<>();
- sns.add("001-100001");
- List<String> plmn = new LinkedList<>();
- plmn.add("460-00");
- plmn.add("460-01");
- PerfReqEmbb embb = new PerfReqEmbb();
- embb.setActivityFactor(50);
- List<PerfReqEmbb> embbList = new LinkedList<>();
- embbList.add(embb);
- PerfReq perfReq = new PerfReq();
- perfReq.setPerfReqEmbbList(embbList);
- List<String> taList = new LinkedList<>();
- taList.add("1");
- taList.add("2");
- taList.add("3");
- sP.setSnssaiList(sns);
- sP.setSliceProfileId("ab9af40f13f721b5f13539d87484098");
- sP.setPLMNIdList(plmn);
- sP.setPerfReq(perfReq);
- sP.setMaxNumberOfUEs(200);
- sP.setCoverageAreaTAList(taList);
- sP.setLatency(6);
- sP.setResourceSharingLevel(NON_SHARED);
- sP.setMaxNumberOfPDUSession(10);
- NsiInfo nsiInfo = new NsiInfo();
- nsiInfo.setNsiId("NSI-M-001-HDBNJ-NSMF-01-A-ZX");
- nsiInfo.setNsiName("eMBB-001");
- AllocateCnNssi cnNssi = new AllocateCnNssi();
- cnNssi.setNssiId("NSST-C-001-HDBNJ-NSSMF-01-A-ZX");
- cnNssi.setNssiName("eMBB-001");
- cnNssi.setScriptName("CN1");
- cnNssi.setSliceProfile(sP);
- cnNssi.setNsiInfo(nsiInfo);
- EsrInfo esrInfo = new EsrInfo();
- esrInfo.setVendor("huawei");
- esrInfo.setNetworkType(CORE);
- NssiAllocateRequest allocate = new NssiAllocateRequest();
- allocate.setAllocateCnNssi(cnNssi);
- allocate.setEsrInfo(esrInfo);
- return allocate;
- }
-
- //
- // public NssiDeAllocateRequest deAllocateNssi() throws Exception {
- // DeAllocateNssi deAllocateNssi = new DeAllocateNssi();
- // deAllocateNssi.setTerminateNssiOption(0);
- // List<String> snssai = new LinkedList<>();
- // snssai.add("001-100001");
- // deAllocateNssi.setNsiId("NSI-M-001-HDBNJ-NSMF-01-A-ZX");
- // deAllocateNssi.setNssiId("NSSI-C-001-HDBNJ-NSSMF-01-A-ZX");
- // deAllocateNssi.setScriptName("CN1");
- // deAllocateNssi.setSnssaiList(snssai);
- // EsrInfo esrInfo = new EsrInfo();
- // esrInfo.setVendor("huawei");
- // esrInfo.setNetworkType(CORE);
- // NssiDeAllocateRequest deAllocate = new NssiDeAllocateRequest();
- // deAllocate.setDeAllocateNssi(deAllocateNssi);
- // deAllocate.setEsrInfo(esrInfo);
- // return deAllocate;
- // }
- //
- // public NssiActDeActRequest activateNssi() throws Exception {
- // EsrInfo esrInfo = new EsrInfo();
- // esrInfo.setVendor("huawei");
- // esrInfo.setNetworkType(CORE);
- // ActDeActNssi act = new ActDeActNssi();
- // act.setNsiId("NSI-M-001-HDBNJ-NSMF-01-A-ZX");
- // act.setNssiId("NSSI-C-001-HDBNJ-NSSMF-01-A-ZX");
- // NssiActDeActRequest actReq = new NssiActDeActRequest();
- // actReq.setActDeActNssi(act);
- // actReq.setEsrInfo(esrInfo);
- // return actReq;
- // }
- //
- // public NssiActDeActRequest deActivateNssi() throws Exception {
- // EsrInfo esrInfo = new EsrInfo();
- // esrInfo.setVendor("huawei");
- // esrInfo.setNetworkType(CORE);
- // ActDeActNssi deAct = new ActDeActNssi();
- // deAct.setNsiId("NSI-M-001-HDBNJ-NSMF-01-A-ZX");
- // deAct.setNssiId("NSSI-C-001-HDBNJ-NSSMF-01-A-ZX");
- // NssiActDeActRequest deActReq = new NssiActDeActRequest();
- // deActReq.setActDeActNssi(deAct);
- // deActReq.setEsrInfo(esrInfo);
- // return deActReq;
- // }
- //
- public String queryJobStatusNssi() throws Exception {
- EsrInfo esrInfo = new EsrInfo();
- esrInfo.setVendor("huawei");
- esrInfo.setNetworkType(CORE);
-
- JobStatusRequest jobStatus = new JobStatusRequest();
- jobStatus.setEsrInfo(esrInfo);
- jobStatus.setNsiId("NSI-M-001-HDBNJ-NSMF-01-A-ZX");
- jobStatus.setNssiId("NSSI-C-001-HDBNJ-NSSMF-01-A-ZX");
- return marshal(jobStatus);
- }
-}
diff --git a/adapters/mso-nssmf-adapter/src/test/java/org/onap/so/adapters/nssmf/service/impl/NssmfManagerServiceImplTest.java b/adapters/mso-nssmf-adapter/src/test/java/org/onap/so/adapters/nssmf/service/impl/NssmfManagerServiceImplTest.java
deleted file mode 100644
index 26904fa8a4..0000000000
--- a/adapters/mso-nssmf-adapter/src/test/java/org/onap/so/adapters/nssmf/service/impl/NssmfManagerServiceImplTest.java
+++ /dev/null
@@ -1,442 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- # Copyright (c) 2020, CMCC Technologies Co., Ltd.
- #
- # Licensed under the Apache License, Version 2.0 (the "License")
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.nssmf.service.impl;
-
-
-import org.apache.http.Header;
-import org.apache.http.HttpEntity;
-import org.apache.http.HttpResponse;
-import org.apache.http.StatusLine;
-import org.apache.http.client.HttpClient;
-import org.apache.http.client.methods.HttpRequestBase;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.stubbing.Answer;
-import org.onap.so.adapters.nssmf.consts.NssmfAdapterConsts;
-import org.onap.so.adapters.nssmf.entity.NssmfInfo;
-import org.onap.so.adapters.nssmf.entity.TokenResponse;
-import org.onap.so.adapters.nssmf.enums.ActionType;
-import org.onap.so.adapters.nssmf.enums.HttpMethod;
-import org.onap.so.adapters.nssmf.util.RestUtil;
-import org.onap.so.beans.nsmf.*;
-import org.onap.so.beans.nsmf.oof.SubnetCapability;
-import org.onap.so.db.request.beans.ResourceOperationStatus;
-import org.onap.so.db.request.data.repository.ResourceOperationStatusRepository;
-import org.springframework.http.ResponseEntity;
-import org.springframework.test.context.junit4.SpringRunner;
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.lang.reflect.Field;
-import java.util.*;
-import static java.nio.charset.StandardCharsets.UTF_8;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.Mockito.doAnswer;
-import static org.mockito.Mockito.when;
-import static org.mockito.MockitoAnnotations.initMocks;
-import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.marshal;
-import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.unMarshal;
-import static org.onap.so.beans.nsmf.NetworkType.CORE;
-import static org.onap.so.beans.nsmf.ResourceSharingLevel.NON_SHARED;
-
-@RunWith(SpringRunner.class)
-public class NssmfManagerServiceImplTest {
-
- @Mock
- private RestUtil restUtil;
-
-
- private NssmfManagerServiceImpl nssiManagerService;
-
- @Mock
- private HttpResponse tokenResponse;
-
- @Mock
- private HttpEntity tokenEntity;
-
- @Mock
- private HttpResponse commonResponse;
-
- @Mock
- private HttpEntity commonEntity;
-
- @Mock
- private StatusLine statusLine;
-
- @Mock
- private HttpClient httpClient;
-
- private InputStream postStream;
-
- private InputStream tokenStream;
-
- @Mock
- private ResourceOperationStatusRepository repository;
-
- @Before
- public void setUp() throws Exception {
- initMocks(this);
-
- nssiManagerService = new NssmfManagerServiceImpl();
-
- Field restUtil = nssiManagerService.getClass().getDeclaredField("restUtil");
- restUtil.setAccessible(true);
- restUtil.set(nssiManagerService, this.restUtil);
-
- Field repository = nssiManagerService.getClass().getDeclaredField("repository");
- repository.setAccessible(true);
- repository.set(nssiManagerService, this.repository);
- // nssiManagerService.setRestUtil(this.restUtil);
-
- when(this.restUtil.send(any(String.class), any(HttpMethod.class), any(), any(Header.class)))
- .thenCallRealMethod();
- when(this.restUtil.createResponse(any(Integer.class), any(String.class))).thenCallRealMethod();
- }
-
- private void createCommonMock(int statusCode, NssmfInfo nssmf) throws Exception {
- when(restUtil.getToken(any(NssmfInfo.class))).thenReturn("7512eb3feb5249eca5ddd742fedddd39");
- when(restUtil.getHttpsClient()).thenReturn(httpClient);
-
- when(statusLine.getStatusCode()).thenReturn(statusCode);
- when(restUtil.getNssmfHost(any(EsrInfo.class))).thenReturn(nssmf);
-
- when(tokenResponse.getEntity()).thenReturn(tokenEntity);
- when(tokenResponse.getStatusLine()).thenReturn(statusLine);
- when(tokenEntity.getContent()).thenReturn(tokenStream);
-
- when(commonResponse.getEntity()).thenReturn(commonEntity);
- when(commonResponse.getStatusLine()).thenReturn(statusLine);
- when(commonEntity.getContent()).thenReturn(postStream);
-
- Answer<HttpResponse> answer = invocation -> {
- Object[] arguments = invocation.getArguments();
- if (arguments != null && arguments.length == 1 && arguments[0] != null) {
-
- HttpRequestBase base = (HttpRequestBase) arguments[0];
- if (base.getURI().toString().endsWith("/oauth/token")) {
- return tokenResponse;
- } else {
- return commonResponse;
- }
- }
- return commonResponse;
- };
-
- doAnswer(answer).when(httpClient).execute(any(HttpRequestBase.class));
-
- }
-
- @Test
- public void allocateNssi() throws Exception {
-
- NssmfInfo nssmf = new NssmfInfo();
- nssmf.setUserName("nssmf-user");
- nssmf.setPassword("nssmf-pass");
- nssmf.setPort("8080");
- nssmf.setIpAddress("127.0.0.1");
- nssmf.setUrl("http://127.0.0.1:8080");
-
- NssiResponse nssiRes = new NssiResponse();
- nssiRes.setJobId("4b45d919816ccaa2b762df5120f72067");
- nssiRes.setNssiId("NSSI-C-001-HDBNJ-NSSMF-01-A-ZX");
-
- TokenResponse token = new TokenResponse();
- token.setAccessToken("7512eb3feb5249eca5ddd742fedddd39");
- token.setExpires(1800);
-
- postStream = new ByteArrayInputStream(marshal(nssiRes).getBytes(UTF_8));
- tokenStream = new ByteArrayInputStream(marshal(token).getBytes(UTF_8));
-
- createCommonMock(200, nssmf);
-
-
- NssmfAdapterNBIRequest nbiRequest = createAllocateNssi();
- assertNotNull(nbiRequest);
- System.out.println(marshal(nbiRequest));
- ResponseEntity res = nssiManagerService.allocateNssi(nbiRequest);
- assertNotNull(res);
- assertNotNull(res.getBody());
- NssiResponse allRes = unMarshal(res.getBody().toString(), NssiResponse.class);
- assertEquals(allRes.getJobId(), "4b45d919816ccaa2b762df5120f72067");
- assertEquals(allRes.getNssiId(), "NSSI-C-001-HDBNJ-NSSMF-01-A-ZX");
-
- System.out.println(res);
- }
-
-
-
- private NssmfAdapterNBIRequest createAllocateNssi() {
- CnSliceProfile sP = new CnSliceProfile();
- List<String> sns = new LinkedList<>();
- sns.add("001-100001");
- List<String> plmn = new LinkedList<>();
- plmn.add("460-00");
- plmn.add("460-01");
- PerfReqEmbb embb = new PerfReqEmbb();
- embb.setActivityFactor(50);
- List<PerfReqEmbb> embbList = new LinkedList<>();
- embbList.add(embb);
- PerfReq perfReq = new PerfReq();
- perfReq.setPerfReqEmbbList(embbList);
- List<String> taList = new LinkedList<>();
- taList.add("1");
- taList.add("2");
- taList.add("3");
- sP.setSnssaiList(sns);
- sP.setSliceProfileId("ab9af40f13f721b5f13539d87484098");
- sP.setPLMNIdList(plmn);
- sP.setPerfReq(perfReq);
- sP.setMaxNumberOfUEs(200);
- sP.setCoverageAreaTAList(taList);
- sP.setLatency(6);
- sP.setResourceSharingLevel(NON_SHARED);
- NsiInfo nsiInfo = new NsiInfo();
- nsiInfo.setNsiId("NSI-M-001-HDBNJ-NSMF-01-A-ZX");
- nsiInfo.setNsiName("eMBB-001");
- AllocateCnNssi cnNssi = new AllocateCnNssi();
- cnNssi.setNssiId("NSST-C-001-HDBNJ-NSSMF-01-A-ZX");
- cnNssi.setNssiName("eMBB-001");
- cnNssi.setScriptName("CN1");
- cnNssi.setSliceProfile(sP);
- cnNssi.setNsiInfo(nsiInfo);
-
- NssmfAdapterNBIRequest nbiRequest = createNbiRequest();
- nbiRequest.setAllocateCnNssi(cnNssi);
- return nbiRequest;
- }
-
- @Test
- public void deAllocateNssi() throws Exception {
- DeAllocateNssi deAllocateNssi = new DeAllocateNssi();
- deAllocateNssi.setTerminateNssiOption(0);
- List<String> snssai = new LinkedList<>();
- snssai.add("001-100001");
- deAllocateNssi.setNsiId("NSI-M-001-HDBNJ-NSMF-01-A-ZX");
- deAllocateNssi.setNssiId("NSSI-C-001-HDBNJ-NSSMF-01-A-ZX");
- deAllocateNssi.setScriptName("CN1");
- deAllocateNssi.setSnssaiList(snssai);
-
- NssmfAdapterNBIRequest nbiRequest = createNbiRequest();
- nbiRequest.setDeAllocateNssi(deAllocateNssi);
-
- NssmfInfo nssmf = new NssmfInfo();
- nssmf.setUserName("nssmf-user");
- nssmf.setPassword("nssmf-pass");
- nssmf.setPort("8080");
- nssmf.setIpAddress("127.0.0.1");
-
- NssiResponse nssiRes = new NssiResponse();
- nssiRes.setJobId("4b45d919816ccaa2b762df5120f72067");
-
- TokenResponse token = new TokenResponse();
- token.setAccessToken("7512eb3feb5249eca5ddd742fedddd39");
- token.setExpires(1800);
-
- postStream = new ByteArrayInputStream(marshal(nssiRes).getBytes(UTF_8));
- tokenStream = new ByteArrayInputStream(marshal(token).getBytes(UTF_8));
-
- createCommonMock(202, nssmf);
- ResponseEntity res = nssiManagerService.deAllocateNssi(nbiRequest, "ab9af40f13f721b5f13539d87484098");
- assertNotNull(res);
- assertNotNull(res.getBody());
- NssiResponse allRes = unMarshal(res.getBody().toString(), NssiResponse.class);
- assertEquals(allRes.getJobId(), "4b45d919816ccaa2b762df5120f72067");
- assertNotNull(res);
- assertNotNull(res.getBody());
- }
-
- @Test
- public void activateNssi() throws Exception {
- NssmfInfo nssmf = new NssmfInfo();
- nssmf.setUserName("nssmf-user");
- nssmf.setPassword("nssmf-pass");
- nssmf.setPort("8080");
- nssmf.setIpAddress("127.0.0.1");
-
- NssiResponse nssiRes = new NssiResponse();
- nssiRes.setJobId("4b45d919816ccaa2b762df5120f72067");
-
- TokenResponse token = new TokenResponse();
- token.setAccessToken("7512eb3feb5249eca5ddd742fedddd39");
- token.setExpires(1800);
-
- postStream = new ByteArrayInputStream(marshal(nssiRes).getBytes(UTF_8));
- tokenStream = new ByteArrayInputStream(marshal(token).getBytes(UTF_8));
-
- ActDeActNssi act = new ActDeActNssi();
- act.setNsiId("NSI-M-001-HDBNJ-NSMF-01-A-ZX");
- act.setNssiId("NSSI-C-001-HDBNJ-NSSMF-01-A-ZX");
-
- NssmfAdapterNBIRequest nbiRequest = createNbiRequest();
- nbiRequest.setActDeActNssi(act);
-
- createCommonMock(200, nssmf);
- ResponseEntity res = nssiManagerService.activateNssi(nbiRequest, "001-100001");
- assertNotNull(res);
- assertNotNull(res.getBody());
- NssiResponse allRes = unMarshal(res.getBody().toString(), NssiResponse.class);
- assertEquals(allRes.getJobId(), "4b45d919816ccaa2b762df5120f72067");
- }
-
- @Test
- public void deActivateNssi() throws Exception {
- NssmfInfo nssmf = new NssmfInfo();
- nssmf.setUserName("nssmf-user");
- nssmf.setPassword("nssmf-pass");
- nssmf.setPort("8080");
- nssmf.setIpAddress("127.0.0.1");
-
- NssiResponse nssiRes = new NssiResponse();
- nssiRes.setJobId("4b45d919816ccaa2b762df5120f72067");
-
- TokenResponse token = new TokenResponse();
- token.setAccessToken("7512eb3feb5249eca5ddd742fedddd39");
- token.setExpires(1800);
-
- postStream = new ByteArrayInputStream(marshal(nssiRes).getBytes(UTF_8));
- tokenStream = new ByteArrayInputStream(marshal(token).getBytes(UTF_8));
-
- ActDeActNssi act = new ActDeActNssi();
- act.setNsiId("NSI-M-001-HDBNJ-NSMF-01-A-ZX");
- act.setNssiId("NSSI-C-001-HDBNJ-NSSMF-01-A-ZX");
-
- NssmfAdapterNBIRequest nbiRequest = createNbiRequest();
- nbiRequest.setActDeActNssi(act);
-
- createCommonMock(200, nssmf);
- ResponseEntity res = nssiManagerService.deActivateNssi(nbiRequest, "001-100001");
- assertNotNull(res);
- assertNotNull(res.getBody());
- NssiResponse allRes = unMarshal(res.getBody().toString(), NssiResponse.class);
- assertEquals(allRes.getJobId(), "4b45d919816ccaa2b762df5120f72067");
- }
-
- @Test
- public void queryJobStatus() throws Exception {
- NssmfInfo nssmf = new NssmfInfo();
- nssmf.setUserName("nssmf-user");
- nssmf.setPassword("nssmf-pass");
- nssmf.setPort("8080");
- nssmf.setIpAddress("127.0.0.1");
-
- JobStatusResponse jobStatusResponse = new JobStatusResponse();
- ResponseDescriptor descriptor = new ResponseDescriptor();
- descriptor.setResponseId("7512eb3feb5249eca5ddd742fedddd39");
- descriptor.setProgress(20);
- descriptor.setStatusDescription("Initiating VNF Instance");
- descriptor.setStatus("processing");
- jobStatusResponse.setResponseDescriptor(descriptor);
-
- TokenResponse token = new TokenResponse();
- token.setAccessToken("7512eb3feb5249eca5ddd742fedddd39");
- token.setExpires(1800);
-
- postStream = new ByteArrayInputStream(marshal(jobStatusResponse).getBytes(UTF_8));
- tokenStream = new ByteArrayInputStream(marshal(token).getBytes(UTF_8));
-
- ResourceOperationStatus operationStatus = new ResourceOperationStatus();
- operationStatus.setOperationId("4b45d919816ccaa2b762df5120f72067");
- operationStatus.setResourceTemplateUUID("8ee5926d-720b-4bb2-86f9-d20e921c143b");
- operationStatus.setServiceId("NSI-M-001-HDBNJ-NSMF-01-A-ZX");
- operationStatus.setOperType(ActionType.ALLOCATE.toString());
-
- NssmfAdapterNBIRequest nbiRequest = createNbiRequest();
- nbiRequest.setResponseId("7512eb3feb5249eca5ddd742fedddd39");
- List<ResourceOperationStatus> optional = new ArrayList<>();
- optional.add(operationStatus);
-
- doAnswer(invocation -> optional).when(repository).findByServiceIdAndOperationId(any(), any());
-
- createCommonMock(200, nssmf);
-
- ResponseEntity res = nssiManagerService.queryJobStatus(nbiRequest, "4b45d919816ccaa2b762df5120f72067");
- assertNotNull(res);
- assertNotNull(res.getBody());
- JobStatusResponse allRes = unMarshal(res.getBody().toString(), JobStatusResponse.class);
- assertEquals(allRes.getResponseDescriptor().getProgress(), 20);
- assertEquals(allRes.getResponseDescriptor().getStatus(), "processing");
- assertEquals(allRes.getResponseDescriptor().getResponseId(), "7512eb3feb5249eca5ddd742fedddd39");
-
- }
-
- @Test
- public void queryNSSISelectionCapability() throws Exception {
-
- NssmfAdapterNBIRequest nbiRequest = createNbiRequest();
- ResponseEntity res = nssiManagerService.queryNSSISelectionCapability(nbiRequest);
- assertNotNull(res);
- assertNotNull(res.getBody());
- Map allRes = unMarshal(res.getBody().toString(), Map.class);
- assertEquals(allRes.get("selection"), "NSMF");
-
- System.out.println(res);
-
- nbiRequest.getEsrInfo().setVendor(NssmfAdapterConsts.ONAP_INTERNAL_TAG);
- res = nssiManagerService.queryNSSISelectionCapability(nbiRequest);
- assertNotNull(res);
- assertNotNull(res.getBody());
- allRes = unMarshal(res.getBody().toString(), Map.class);
- assertEquals(allRes.get("selection"), "NSSMF");
-
- System.out.println(res);
-
- nbiRequest.getEsrInfo().setNetworkType(NetworkType.ACCESS);
- res = nssiManagerService.queryNSSISelectionCapability(nbiRequest);
- assertNotNull(res);
- assertNotNull(res.getBody());
- allRes = unMarshal(res.getBody().toString(), Map.class);
- assertEquals(allRes.get("selection"), "NSSMF");
-
- System.out.println(res);
- }
-
- private NssmfAdapterNBIRequest createNbiRequest() {
- NssmfAdapterNBIRequest nbiRequest = new NssmfAdapterNBIRequest();
- EsrInfo esrInfo = new EsrInfo();
- esrInfo.setVendor("huawei");
- esrInfo.setNetworkType(CORE);
- ServiceInfo serviceInfo = new ServiceInfo();
- serviceInfo.setServiceUuid("8ee5926d-720b-4bb2-86f9-d20e921c143b");
- serviceInfo.setServiceInvariantUuid("e75698d9-925a-4cdd-a6c0-edacbe6a0b51");
- serviceInfo.setGlobalSubscriberId("5GCustomer");
- serviceInfo.setServiceType("5G");
- serviceInfo.setNsiId("NSI-M-001-HDBNJ-NSMF-01-A-ZX");
- nbiRequest.setEsrInfo(esrInfo);
- nbiRequest.setServiceInfo(serviceInfo);
- return nbiRequest;
- }
-
- @Test
- public void querySubnetCapability() {
- NssmfAdapterNBIRequest nbiRequest = createNbiRequest();
-
- QuerySubnetCapability subnetCapabilityQuery = new QuerySubnetCapability();
- List<String> subnetTypes = Arrays.asList("TN-FH", "TN-MH", "TN-BH");
- subnetCapabilityQuery.setSubnetTypes(subnetTypes);
- nbiRequest.setSubnetCapabilityQuery(subnetCapabilityQuery);
- ResponseEntity res = nssiManagerService.queryNSSISelectionCapability(nbiRequest);
- assertNotNull(res);
- assertNotNull(res.getBody());
- }
-}
diff --git a/adapters/mso-nssmf-adapter/src/test/resources/application-test.yaml b/adapters/mso-nssmf-adapter/src/test/resources/application-test.yaml
deleted file mode 100644
index fa323e887b..0000000000
--- a/adapters/mso-nssmf-adapter/src/test/resources/application-test.yaml
+++ /dev/null
@@ -1,60 +0,0 @@
-
-aai:
- auth: 2A11B07DB6214A839394AA1EC5844695F5114FC407FF5422625FB00175A3DCB8A1FF745F22867EFA72D5369D599BBD88DA8BED4233CF5586
- endpoint: https://aai.onap:30233
-logging:
- path: logs
-
-spring:
- datasource:
- username: root
- password: 123456
- driver-class-name: org.mariadb.jdbc.Driver
- initialization-mode: always
- url: jdbc:mariadb://49.232.146.162:8989/requestdb
- jpa:
- generate-ddl: false
- show-sql: false
- hibernate:
- ddl-auto: none
- naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy
- enable-lazy-load-no-trans: true
- database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
- security:
- usercredentials:
- - username: bpel
- password: '$2a$10$Fh9ffgPw2vnmsghsRD3ZauBL1aKXebigbq3BB1RPWtE62UDILsjke'
- role: BPEL-Client
- - username: mso_admin
- password: '$2a$10$Fh9ffgPw2vnmsghsRD3ZauBL1aKXebigbq3BB1RPWtE62UDILsjke'
- role: ACTUATOR
-server:
- port: 8080
- tomcat:
- max-threads: 50
-
-mso:
- key: 07a7159d3bf51a0e53be7a8f89699be7
- site-name: localSite
- logPath: ./logs/nssmf
- adapters:
- requestDb:
- endpoint: https://so-request-db-adapter.{{ include "common.namespace" . }}:8083
- auth: Basic YnBlbDpwYXNzd29yZDEk
- infra:
- endpoint: https://so.{{ include "common.namespace" . }}:8080
- auth: Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==
-
-#Actuator
-management:
- endpoints:
- web:
- base-path: /manage
- exposure:
- include: "*"
- metrics:
- se-global-registry: false
- export:
- prometheus:
- enabled: true # Whether exporting of metrics to Prometheus is enabled.
- step: 1m # Step size (i.e. reporting frequency) to use. \ No newline at end of file
diff --git a/adapters/mso-oof-adapter/.gitignore b/adapters/mso-oof-adapter/.gitignore
deleted file mode 100644
index 549e00a2a9..0000000000
--- a/adapters/mso-oof-adapter/.gitignore
+++ /dev/null
@@ -1,33 +0,0 @@
-HELP.md
-target/
-!.mvn/wrapper/maven-wrapper.jar
-!**/src/main/**/target/
-!**/src/test/**/target/
-
-### STS ###
-.apt_generated
-.classpath
-.factorypath
-.project
-.settings
-.springBeans
-.sts4-cache
-
-### IntelliJ IDEA ###
-.idea
-*.iws
-*.iml
-*.ipr
-
-### NetBeans ###
-/nbproject/private/
-/nbbuild/
-/dist/
-/nbdist/
-/.nb-gradle/
-build/
-!**/src/main/**/build/
-!**/src/test/**/build/
-
-### VS Code ###
-.vscode/
diff --git a/adapters/mso-oof-adapter/pom.xml b/adapters/mso-oof-adapter/pom.xml
deleted file mode 100644
index a986052551..0000000000
--- a/adapters/mso-oof-adapter/pom.xml
+++ /dev/null
@@ -1,118 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.onap.so</groupId>
- <artifactId>adapters</artifactId>
- <version>1.7.1-SNAPSHOT</version>
- </parent>
- <groupId>org.onap.so.adapters</groupId>
- <artifactId>mso-oof-adapter</artifactId>
- <name>mso-oof-adapter</name>
- <description>mso oof adapter</description>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-dependencies</artifactId>
- <version>${springboot.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-web</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-webflux</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-spring-boot-starter-jaxrs</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-rs-service-description-swagger</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-test</artifactId>
- <scope>test</scope>
- <exclusions>
- <exclusion>
- <groupId>org.junit.vintage</groupId>
- <artifactId>junit-vintage-engine</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.junit.jupiter</groupId>
- <artifactId>junit-jupiter-api</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.junit.jupiter</groupId>
- <artifactId>junit-jupiter-engine</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.junit.vintage</groupId>
- <artifactId>junit-vintage-engine</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
- <build>
- <finalName>${project.artifactId}-${project.version}</finalName>
- <testSourceDirectory>${project.basedir}/src/test/java</testSourceDirectory>
- <plugins>
- <plugin>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-maven-plugin</artifactId>
- <configuration>
- <mainClass>org.onap.so.adapters.oof.MsoOofAdapterApplication</mainClass>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>repackage</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.jacoco</groupId>
- <artifactId>jacoco-maven-plugin</artifactId>
- </plugin>
- </plugins>
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- <filtering>true</filtering>
- <excludes>
- <exclude>**/*.p12</exclude>
- <exclude>**/*.jks</exclude>
- </excludes>
- </resource>
- <resource>
- <directory>src/main/resources</directory>
- <filtering>false</filtering>
- <includes>
- <include>**/*.p12</include>
- <include>**/*.jks</include>
- </includes>
- </resource>
- </resources>
- </build>
-</project>
diff --git a/adapters/mso-oof-adapter/src/main/java/org/onap/so/adapters/oof/MsoOofAdapterApplication.java b/adapters/mso-oof-adapter/src/main/java/org/onap/so/adapters/oof/MsoOofAdapterApplication.java
deleted file mode 100644
index 78fbe6e271..0000000000
--- a/adapters/mso-oof-adapter/src/main/java/org/onap/so/adapters/oof/MsoOofAdapterApplication.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Wipro Limited. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.oof;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-
-@SpringBootApplication
-public class MsoOofAdapterApplication {
-
- public static void main(String[] args) {
- SpringApplication.run(MsoOofAdapterApplication.class, args);
- }
-}
diff --git a/adapters/mso-oof-adapter/src/main/java/org/onap/so/adapters/oof/OofAdapterClientConfig.java b/adapters/mso-oof-adapter/src/main/java/org/onap/so/adapters/oof/OofAdapterClientConfig.java
deleted file mode 100644
index 5e13c592b7..0000000000
--- a/adapters/mso-oof-adapter/src/main/java/org/onap/so/adapters/oof/OofAdapterClientConfig.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Wipro Limited. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.oof;
-
-import javax.net.ssl.HostnameVerifier;
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.SSLSession;
-import javax.net.ssl.TrustManager;
-import javax.net.ssl.X509TrustManager;
-import org.apache.http.client.HttpClient;
-import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
-import org.apache.http.impl.client.HttpClients;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
-import org.springframework.web.client.RestTemplate;
-
-@Configuration
-public class OofAdapterClientConfig {
-
- @Bean
- public RestTemplate getRestTemplate() {
- HttpComponentsClientHttpRequestFactory requestFactory =
- new HttpComponentsClientHttpRequestFactory(getHttpsClient());
- requestFactory.setConnectTimeout(60000);
- requestFactory.setReadTimeout(60000);
- return new RestTemplate(requestFactory);
- }
-
- private HttpClient getHttpsClient() {
- TrustManager[] trustAllCerts = new TrustManager[] {new X509TrustManager() {
- public java.security.cert.X509Certificate[] getAcceptedIssuers() {
- return null;
- }
-
- public void checkClientTrusted(java.security.cert.X509Certificate[] certs, String authType) {}
-
- public void checkServerTrusted(java.security.cert.X509Certificate[] certs, String authType) {}
- }};
-
- // Install the all-trusting trust manager
- try {
- SSLContext sc = SSLContext.getInstance("SSL");
- sc.init(null, trustAllCerts, new java.security.SecureRandom());
- HostnameVerifier hostnameVerifier = new HostnameVerifier() {
- @Override
- public boolean verify(String hostname, SSLSession session) {
- return true;
- }
- };
- SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sc,
- new String[] {"TLSv1", "TLSv1.1", "TLSv1.2", "TLSv1.3"}, null, hostnameVerifier);
- return HttpClients.custom().setSSLSocketFactory(sslsf).build();
- } catch (Exception e) {
- throw new IllegalArgumentException(e);
- }
- }
-}
diff --git a/adapters/mso-oof-adapter/src/main/java/org/onap/so/adapters/oof/WebSecurityConfig.java b/adapters/mso-oof-adapter/src/main/java/org/onap/so/adapters/oof/WebSecurityConfig.java
deleted file mode 100644
index 9a07b0119f..0000000000
--- a/adapters/mso-oof-adapter/src/main/java/org/onap/so/adapters/oof/WebSecurityConfig.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Wipro Limited. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.oof;
-
-import org.springframework.context.annotation.Configuration;
-import org.springframework.security.config.annotation.web.builders.HttpSecurity;
-import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
-import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
-
-@EnableWebSecurity
-@Configuration
-public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
-
- @Override
- protected void configure(HttpSecurity http) throws Exception {
- http.csrf().disable();
- }
-
-}
diff --git a/adapters/mso-oof-adapter/src/main/java/org/onap/so/adapters/oof/constants/Constants.java b/adapters/mso-oof-adapter/src/main/java/org/onap/so/adapters/oof/constants/Constants.java
deleted file mode 100644
index 5d91bf38f8..0000000000
--- a/adapters/mso-oof-adapter/src/main/java/org/onap/so/adapters/oof/constants/Constants.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Wipro Limited. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.adapters.oof.constants;
-
-public class Constants {
-
- public static final String OOF_ENDPOINT = "mso.oof.endpoint";
- public static final String OOF_AUTH = "mso.oof.auth";
- public static final String MSO_KEY = "mso.msoKey";
- public static final String CAMUNDA_URL = "mso.camundaURL";
- public static final String CAMUNDA_AUTH = "mso.camundaAuth";
- public static final String WORKFLOW_MESSAGE_ENPOINT = "mso.workflow.message.endpoint";
-
-}
diff --git a/adapters/mso-oof-adapter/src/main/java/org/onap/so/adapters/oof/exceptions/OofAdapterException.java b/adapters/mso-oof-adapter/src/main/java/org/onap/so/adapters/oof/exceptions/OofAdapterException.java
deleted file mode 100644
index ff16d7442c..0000000000
--- a/adapters/mso-oof-adapter/src/main/java/org/onap/so/adapters/oof/exceptions/OofAdapterException.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Wipro Limited. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.oof.exceptions;
-
-public class OofAdapterException extends Exception {
-
- private static final long serialVersionUID = 1L;
-
- public OofAdapterException(String message) {
- super(message);
- }
-
- public OofAdapterException(Throwable e) {
- super(e);
- }
-
- public OofAdapterException(String message, Throwable e) {
- super(message, e);
- }
-
-}
diff --git a/adapters/mso-oof-adapter/src/main/java/org/onap/so/adapters/oof/model/OofRequest.java b/adapters/mso-oof-adapter/src/main/java/org/onap/so/adapters/oof/model/OofRequest.java
deleted file mode 100644
index 1eb694fd96..0000000000
--- a/adapters/mso-oof-adapter/src/main/java/org/onap/so/adapters/oof/model/OofRequest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Wipro Limited. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.adapters.oof.model;
-
-/**
- * POJO representing generic request payload from BPMN processes
- */
-public class OofRequest {
-
- private String apiPath;
-
- private Object requestDetails;
-
- public String getApiPath() {
- return apiPath;
- }
-
- public void setApiPath(String apiPath) {
- this.apiPath = apiPath;
- }
-
- public Object getRequestDetails() {
- return requestDetails;
- }
-
- public void setRequestDetails(Object requestDetails) {
- this.requestDetails = requestDetails;
- }
-
- @Override
- public String toString() {
- return "{\"apiPath:\"\"" + apiPath + "\"\", requestDetails:\"\"" + requestDetails + "}";
- }
-
-}
diff --git a/adapters/mso-oof-adapter/src/main/java/org/onap/so/adapters/oof/rest/OofCallbackHandler.java b/adapters/mso-oof-adapter/src/main/java/org/onap/so/adapters/oof/rest/OofCallbackHandler.java
deleted file mode 100644
index f8da6c6d2e..0000000000
--- a/adapters/mso-oof-adapter/src/main/java/org/onap/so/adapters/oof/rest/OofCallbackHandler.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Wipro Limited. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.oof.rest;
-
-import org.onap.so.adapters.oof.exceptions.OofAdapterException;
-import org.onap.so.adapters.oof.utils.OofUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpEntity;
-import org.springframework.http.ResponseEntity;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import org.springframework.web.client.RestTemplate;
-
-/**
- * A generic call back handler to receive async response from OOF
- */
-@RestController
-@RequestMapping("/so/adapters/oof/callback/")
-public class OofCallbackHandler {
-
- @Autowired
- OofUtils utils;
-
- @Autowired
- RestTemplate restTemplate;
-
- private static final Logger logger = LoggerFactory.getLogger(OofCallbackHandler.class);
-
- @PostMapping("/{version:[vV][1]}/{messageEventName}/{correlator}")
- public ResponseEntity<String> processCallback(@PathVariable("messageEventName") String messageEventName,
- @PathVariable("correlator") String correlator, @RequestBody String oofCallbackRequest)
- throws OofAdapterException {
- logger.debug("Oof Async response received for event : {} , callback request body : {} ", messageEventName,
- oofCallbackRequest);
- String camundaMsgUrl = utils.getCamundaMsgUrl(messageEventName, correlator);
- HttpEntity<String> request = new HttpEntity<String>(oofCallbackRequest, utils.getCamundaHeaders());
- try {
- ResponseEntity<String> response = restTemplate.postForEntity(camundaMsgUrl, request, String.class);
- logger.debug("Response from BPMN : {} ", response);
- return response;
- } catch (Exception e) {
- logger.warn("Error injecting message event into BPMN {} {} ", e.getCause(), e.getMessage());
- throw new OofAdapterException(e);
- }
-
- }
-
-}
diff --git a/adapters/mso-oof-adapter/src/main/java/org/onap/so/adapters/oof/rest/OofClient.java b/adapters/mso-oof-adapter/src/main/java/org/onap/so/adapters/oof/rest/OofClient.java
deleted file mode 100644
index 3a91ec495e..0000000000
--- a/adapters/mso-oof-adapter/src/main/java/org/onap/so/adapters/oof/rest/OofClient.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Wipro Limited. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.oof.rest;
-
-import org.onap.so.adapters.oof.exceptions.OofAdapterException;
-import org.onap.so.adapters.oof.model.OofRequest;
-import org.onap.so.adapters.oof.utils.OofUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpEntity;
-import org.springframework.http.ResponseEntity;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import org.springframework.web.client.RestTemplate;
-
-/**
- * A generic client class to call OOF with request from BPMN
- */
-@RestController
-@RequestMapping("/so/adapters/oof/")
-public class OofClient {
-
- @Autowired
- RestTemplate restTemplate;
-
- @Autowired
- OofUtils utils;
-
- private static final Logger logger = LoggerFactory.getLogger(OofClient.class);
-
- @PostMapping("/{version:[vV][1]}")
- public ResponseEntity<String> callOof(@RequestBody OofRequest oofRequest) throws OofAdapterException {
- try {
- logger.debug("Received Request from BPEL {} ", oofRequest);
- String oofUrl = utils.getOofurl(oofRequest.getApiPath());
- HttpEntity<?> request = new HttpEntity<>(oofRequest.getRequestDetails(), utils.getOofHttpHeaders());
- ResponseEntity<String> response = restTemplate.postForEntity(oofUrl, request, String.class);
- logger.debug("Response from OOF : {} ", response);
- return response;
- } catch (Exception e) {
- logger.warn("Error while calling OOF {} {} ", e.getCause(), e.getMessage());
- throw new OofAdapterException(e);
- }
- }
-
-}
diff --git a/adapters/mso-oof-adapter/src/main/java/org/onap/so/adapters/oof/utils/OofUtils.java b/adapters/mso-oof-adapter/src/main/java/org/onap/so/adapters/oof/utils/OofUtils.java
deleted file mode 100644
index f45baa30fe..0000000000
--- a/adapters/mso-oof-adapter/src/main/java/org/onap/so/adapters/oof/utils/OofUtils.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Wipro Limited. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.oof.utils;
-
-import java.security.GeneralSecurityException;
-import java.util.ArrayList;
-import java.util.List;
-import javax.xml.bind.DatatypeConverter;
-import org.onap.so.adapters.oof.constants.Constants;
-import org.onap.so.utils.CryptoUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.core.env.Environment;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.MediaType;
-import org.springframework.stereotype.Component;
-
-@Component
-public class OofUtils {
- private static Logger logger = LoggerFactory.getLogger(OofUtils.class);
-
- @Autowired
- private Environment env;
-
- /**
- * @param messageEventName
- * @param correlator
- * @return
- */
- public String getCamundaMsgUrl(String messageEventName, String correlator) {
- System.out.println(env);
- String camundaMsgUrl = new StringBuilder(env.getRequiredProperty(Constants.WORKFLOW_MESSAGE_ENPOINT))
- .append("/").append(messageEventName).append("/").append(correlator).toString();
- return camundaMsgUrl;
- }
-
- /**
- * @return
- */
- public HttpHeaders getCamundaHeaders() {
- HttpHeaders headers = new HttpHeaders();
- List<MediaType> acceptableMediaTypes = new ArrayList<>();
- acceptableMediaTypes.add(MediaType.ALL);
- headers.setAccept(acceptableMediaTypes);
- headers.setContentType(MediaType.APPLICATION_JSON);
- headers.add(HttpHeaders.AUTHORIZATION, addAuthorizationHeader(env.getRequiredProperty(Constants.CAMUNDA_AUTH),
- env.getRequiredProperty(Constants.MSO_KEY)));
- return headers;
- }
-
- /**
- * @param auth
- * @param msoKey
- * @return
- */
- protected String addAuthorizationHeader(String auth, String msoKey) {
- String basicAuth = null;
- try {
- String userCredentials = CryptoUtils.decrypt(auth, msoKey);
- if (userCredentials != null) {
- basicAuth = "Basic " + DatatypeConverter.printBase64Binary(userCredentials.getBytes());
- }
- } catch (GeneralSecurityException e) {
- logger.error("Security exception", e);
- }
- return basicAuth;
- }
-
- /**
- * @return
- * @throws Exception
- */
- public HttpHeaders getOofHttpHeaders() throws Exception {
- HttpHeaders headers = new HttpHeaders();
- List<MediaType> acceptableMediaTypes = new ArrayList<>();
- acceptableMediaTypes.add(MediaType.APPLICATION_JSON);
- headers.setAccept(acceptableMediaTypes);
- headers.setContentType(MediaType.APPLICATION_JSON);
- return headers;
- }
-
- /**
- * @param apiPath
- * @return
- */
- public String getOofurl(String apiPath) {
- return new StringBuilder(env.getRequiredProperty(Constants.OOF_ENDPOINT)).append(apiPath).toString();
- }
-
-
-}
diff --git a/adapters/mso-oof-adapter/src/test/java/org/onap/so/adapters/oof/rest/OofCallbackHandlerTest.java b/adapters/mso-oof-adapter/src/test/java/org/onap/so/adapters/oof/rest/OofCallbackHandlerTest.java
deleted file mode 100644
index 3a2f7f5e11..0000000000
--- a/adapters/mso-oof-adapter/src/test/java/org/onap/so/adapters/oof/rest/OofCallbackHandlerTest.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Wipro Limited. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.oof.rest;
-
-import static org.mockito.Mockito.when;
-import java.io.File;
-import java.io.IOException;
-import org.junit.Before;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.Mockito;
-import org.onap.so.adapters.oof.utils.OofUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
-import org.springframework.boot.test.mock.mockito.MockBean;
-import org.springframework.boot.test.web.client.TestRestTemplate;
-import org.springframework.core.io.ClassPathResource;
-import org.springframework.http.HttpEntity;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.MediaType;
-import org.springframework.http.ResponseEntity;
-import org.springframework.web.client.RestTemplate;
-import com.fasterxml.jackson.databind.ObjectMapper;
-
-
-@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
-class OofCallbackHandlerTest {
-
- @Autowired
- TestRestTemplate restTemplate;
-
- @MockBean
- OofUtils oofutils;
-
- @MockBean
- RestTemplate mockrestTemplate;
-
- @Before
- void prepareMocks() throws Exception {
- ResponseEntity<Object> responseEntity = new ResponseEntity<>(HttpStatus.OK);
- when(oofutils.getCamundaHeaders()).thenReturn(new HttpHeaders());
- when(oofutils.getCamundaMsgUrl(Mockito.anyString(), Mockito.anyString())).thenReturn("oofurl");
- when(mockrestTemplate.postForEntity(Mockito.anyString(), Mockito.any(), Mockito.any()))
- .thenReturn(responseEntity);
- }
-
- @Test
- void processCallbackTest() throws Exception {
- Object request = prepareOofResponse();
- HttpHeaders headers = new HttpHeaders();
- headers.setContentType(MediaType.APPLICATION_JSON);
- HttpEntity<Object> entity = new HttpEntity<Object>(request, headers);
- ResponseEntity<String> response = restTemplate.postForEntity(
- "/so/adapters/oof/callback/v1/NSISelectionResponse/d88da85c-d9e8-4f73-b837-3a72a431622a", entity,
- String.class);
- Assertions.assertEquals(HttpStatus.OK, response.getStatusCode());
- }
-
- private Object prepareOofResponse() throws IOException {
- File file = new ClassPathResource("testInputs/NsiSelectionResponse.json").getFile();
- ObjectMapper objectMapper = new ObjectMapper();
- return objectMapper.readValue(file, Object.class);
- }
-
-}
diff --git a/adapters/mso-oof-adapter/src/test/java/org/onap/so/adapters/oof/rest/OofClientTest.java b/adapters/mso-oof-adapter/src/test/java/org/onap/so/adapters/oof/rest/OofClientTest.java
deleted file mode 100644
index ff38a9af63..0000000000
--- a/adapters/mso-oof-adapter/src/test/java/org/onap/so/adapters/oof/rest/OofClientTest.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Wipro Limited. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.oof.rest;
-
-import static org.mockito.Mockito.when;
-import java.io.File;
-import java.io.IOException;
-import org.junit.Before;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mockito;
-import org.onap.so.adapters.oof.model.OofRequest;
-import org.onap.so.adapters.oof.utils.OofUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
-import org.springframework.boot.test.mock.mockito.MockBean;
-import org.springframework.boot.test.web.client.TestRestTemplate;
-import org.springframework.core.io.ClassPathResource;
-import org.springframework.http.HttpEntity;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.MediaType;
-import org.springframework.http.ResponseEntity;
-import org.springframework.web.client.RestTemplate;
-import com.fasterxml.jackson.databind.ObjectMapper;
-
-@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
-class OofClientTest {
-
- @Autowired
- TestRestTemplate restTemplate;
-
- @MockBean
- OofUtils oofutils;
-
- @MockBean
- RestTemplate mockrestTemplate;
-
- @Before
- void prepareMocks() throws Exception {
- ResponseEntity<Object> responseEntity = new ResponseEntity<>(HttpStatus.OK);
- when(oofutils.getOofHttpHeaders()).thenReturn(new HttpHeaders());
- when(oofutils.getOofurl(Mockito.anyString())).thenReturn("oofurl");
- when(mockrestTemplate.postForEntity(Mockito.anyString(), Mockito.any(), Mockito.any()))
- .thenReturn(responseEntity);
- }
-
- @Test
- void callOofTest() throws Exception {
- OofRequest request = prepareOofRequest();
- System.out.println(request);
- HttpHeaders headers = new HttpHeaders();
- headers.setContentType(MediaType.APPLICATION_JSON);
- HttpEntity<OofRequest> entity = new HttpEntity<OofRequest>(request, headers);
- ResponseEntity<String> response = restTemplate.postForEntity("/so/adapters/oof/v1", entity, String.class);
- Assertions.assertEquals(HttpStatus.OK, response.getStatusCode());
- }
-
- private OofRequest prepareOofRequest() throws IOException {
- File file = new ClassPathResource("testInputs/NsiSelectionOofRequest.json").getFile();
- ObjectMapper objectMapper = new ObjectMapper();
- return objectMapper.readValue(file, OofRequest.class);
- }
-
-
-}
diff --git a/adapters/mso-oof-adapter/src/test/java/org/onap/so/adapters/oof/utils/OofUtilsTest.java b/adapters/mso-oof-adapter/src/test/java/org/onap/so/adapters/oof/utils/OofUtilsTest.java
deleted file mode 100644
index e68fa10c3e..0000000000
--- a/adapters/mso-oof-adapter/src/test/java/org/onap/so/adapters/oof/utils/OofUtilsTest.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Wipro Limited. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.oof.utils;
-
-import static org.mockito.Mockito.when;
-import java.security.GeneralSecurityException;
-import javax.xml.bind.DatatypeConverter;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.ExtendWith;
-import org.mockito.InjectMocks;
-import org.mockito.Mock;
-import org.mockito.Mockito;
-import org.onap.so.utils.CryptoUtils;
-import org.springframework.core.env.Environment;
-import org.springframework.http.HttpHeaders;
-import org.springframework.test.context.junit.jupiter.SpringExtension;
-
-@ExtendWith(SpringExtension.class)
-class OofUtilsTest {
-
- @InjectMocks
- OofUtils oofUtils;
-
- @Mock
- Environment env;
-
- @Test
- void testGetCamundaMsgUrl() {
- when(env.getRequiredProperty(Mockito.anyString())).thenReturn("dummyString");
- String camundamsgUrl = oofUtils.getCamundaMsgUrl("samplemessage", "sampleCorrelator");
- Assertions.assertNotNull(camundamsgUrl);
- }
-
-
- void testGetCamundaHeaders() throws GeneralSecurityException {
- when(env.getRequiredProperty(Mockito.anyString())).thenReturn("dummyString");
- when(CryptoUtils.decrypt(Mockito.anyString(), Mockito.anyString())).thenReturn("decryptedString");
- HttpHeaders headers = oofUtils.getCamundaHeaders();
- Assertions.assertNotNull(headers);
- }
-
-
- @Test
- void testGetOofHttpHeaders() throws Exception {
- when(env.getRequiredProperty(Mockito.anyString())).thenReturn("dummyString");
- HttpHeaders headers = oofUtils.getOofHttpHeaders();
- Assertions.assertNotNull(headers);
- }
-
- @Test
- void testGetOofurl() {
- when(env.getRequiredProperty(Mockito.anyString())).thenReturn("dummyString");
- String oofurl = oofUtils.getOofurl("/api/v1/");
- Assertions.assertNotNull(oofurl);
- }
-
-}
diff --git a/adapters/mso-oof-adapter/src/test/resources/testInputs/NsiSelectionOofRequest.json b/adapters/mso-oof-adapter/src/test/resources/testInputs/NsiSelectionOofRequest.json
deleted file mode 100644
index 569aae9f38..0000000000
--- a/adapters/mso-oof-adapter/src/test/resources/testInputs/NsiSelectionOofRequest.json
+++ /dev/null
@@ -1,84 +0,0 @@
-{
- "apiPath":"/api/oof/selection/nsi/v1",
- "requestDetails":{
- "serviceProfile":{
- "blob":"content"
- },
- "requestInfo":{
- "transactionId":"d290f1ee-6c54-4b01-90e6-d701748f0851",
- "requestId":"d290f1ee-6c54-4b01-90e6-d701748f0851",
- "callbackUrl":"myDomain.com/myCallback",
- "callbackHeader":{
- "blob":"content"
- },
- "sourceId":"d290f1ee-6c54-4b01-90e6-d701748f0851",
- "timeout":5,
- "numSolutions":1
- },
- "NSTInfo":{
- "UUID":"3fa85f64-5717-4562-b3fc-2c963f66afa1",
- "invariantUUID":"7ua85f64-5717-4562-b3fc-2c963f66afa6",
- "name":"embb-nst"
- },
- "NSSTInfo":[
- {
- "UUID":"3fa85f64-5717-4562-b3fc-2c963f66afa2",
- "invariantUUID":"2fa85f64-5717-4562-b3fc-2c963f66afa6",
- "name":"embb-an-nf"
- },
- {
- "UUID":"3fa85f64-5717-4562-b3fc-2c963f66afa3",
- "invariantUUID":"4fa85f64-5717-4562-b3fc-2c963f66afa6",
- "name":"embb-cn"
- },
- {
- "UUID":"3fa85f64-5717-4562-b3fc-2c963f66afa4",
- "invariantUUID":"5ta85f64-5717-4562-b3fc-2c963f66afa6",
- "name":"embb-tn-fh"
- },
- {
- "UUID":"3fa85f64-5717-4562-b3fc-2c963f66afa5",
- "invariantUUID":"6ya85f64-5717-4562-b3fc-2c963f66afa6",
- "name":"embb-tn-mh"
- },
- {
- "UUID":"3fa85f64-5717-4562-b3fc-2c963f66afa7",
- "invariantUUID":"7ua85f64-5717-4562-b3fc-2c963f66afa6",
- "name":"embb-tn-bh"
- }
- ],
- "preferReuse":false,
- "subnetCapabilities":[
- {
- "domainType":"AN-NF",
- "capabilityDetails":{
- "blob":"content"
- }
- },
- {
- "domainType":"CN",
- "capabilityDetails":{
- "blob":"content"
- }
- },
- {
- "domainType":"TN-FH",
- "capabilityDetails":{
- "blob":"content"
- }
- },
- {
- "domainType":"TN-MH",
- "capabilityDetails":{
- "blob":"content"
- }
- },
- {
- "domainType":"TN-BH",
- "capabilityDetails":{
- "blob":"content"
- }
- }
- ]
-}
-} \ No newline at end of file
diff --git a/adapters/mso-oof-adapter/src/test/resources/testInputs/NsiSelectionResponse.json b/adapters/mso-oof-adapter/src/test/resources/testInputs/NsiSelectionResponse.json
deleted file mode 100644
index 4ddca3eaf9..0000000000
--- a/adapters/mso-oof-adapter/src/test/resources/testInputs/NsiSelectionResponse.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "transactionId": "s4r0f1ee-6c54-4b01-90e6-d701748f0851",
- "requestId": "r500f1ee-6c54-4b01-90e6-d701748f0851",
- "requestStatus": "completed",
- "solutions": [
- {
- "existingNSI": false,
- "newNSISolution": {
- "sliceProfiles": [
- {
- "domainType":"CN"
- }
- ],
- "matchLevel": {
- "blob": "content"
- }
- }
- }
- ]
-}
diff --git a/adapters/mso-openstack-adapters/pom.xml b/adapters/mso-openstack-adapters/pom.xml
index 7d5e8cc6fd..e975425852 100644
--- a/adapters/mso-openstack-adapters/pom.xml
+++ b/adapters/mso-openstack-adapters/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.onap.so</groupId>
<artifactId>adapters</artifactId>
- <version>1.7.1-SNAPSHOT</version>
+ <version>1.8.0-SNAPSHOT</version>
</parent>
<artifactId>mso-openstack-adapters</artifactId>
<packaging>jar</packaging>
@@ -15,7 +15,6 @@
</properties>
<build>
<finalName>${project.artifactId}-${project.version}</finalName>
-
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
@@ -26,9 +25,7 @@
<executions>
<execution>
<goals>
- <goal>
- repackage
- </goal>
+ <goal>repackage</goal>
</goals>
</execution>
</executions>
@@ -87,8 +84,6 @@
</executions>
</plugin>
</plugins>
-
-
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build
@@ -140,17 +135,7 @@
</plugins>
</pluginManagement>
</build>
-
<dependencies>
- <!-- added for spring boot support -->
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-actuator</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-web</artifactId>
- </dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
@@ -177,14 +162,6 @@
<artifactId>janino</artifactId>
<version>2.5.15</version>
</dependency>
-
- <!-- end added for spring boot support -->
-
- <dependency>
- <groupId>org.pacesys</groupId>
- <artifactId>openstack4j-core</artifactId>
- <version>3.2.0</version>
- </dependency>
<dependency>
<groupId>org.pacesys.openstack4j.connectors</groupId>
<artifactId>openstack4j-jersey2</artifactId>
@@ -210,7 +187,6 @@
<artifactId>commons-collections</artifactId>
<version>3.2.2</version>
</dependency>
-
<dependency>
<groupId>com.typesafe</groupId>
<artifactId>config</artifactId>
@@ -221,14 +197,11 @@
<artifactId>jsr305</artifactId>
<version>1.3.9</version>
</dependency>
-
<dependency>
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
<version>1.4.1</version>
</dependency>
-
- <!-- added for unit testing -->
<dependency>
<groupId>org.onap.so.adapters</groupId>
<artifactId>mso-adapter-utils</artifactId>
@@ -249,14 +222,9 @@
<artifactId>mariadb-java-client</artifactId>
</dependency>
<dependency>
- <groupId>org.onap.so</groupId>
- <artifactId>common</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
<groupId>ch.vorburger.mariaDB4j</groupId>
<artifactId>mariaDB4j</artifactId>
- <version>2.2.3</version>
+ <version>2.3.0</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -278,12 +246,16 @@
<dependency>
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-external-task-client</artifactId>
- <version>1.1.1</version>
+ <version>1.4.0</version>
</dependency>
<dependency>
<groupId>com.github.seancfoley</groupId>
<artifactId>ipaddress</artifactId>
<version>2.0.0</version>
</dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-validation</artifactId>
+ </dependency>
</dependencies>
</project>
diff --git a/adapters/mso-requests-db-adapter/pom.xml b/adapters/mso-requests-db-adapter/pom.xml
index 66b9a6b993..a488558610 100644
--- a/adapters/mso-requests-db-adapter/pom.xml
+++ b/adapters/mso-requests-db-adapter/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.onap.so</groupId>
<artifactId>adapters</artifactId>
- <version>1.7.1-SNAPSHOT</version>
+ <version>1.8.0-SNAPSHOT</version>
</parent>
<groupId>org.onap.so.adapters</groupId>
@@ -16,11 +16,7 @@
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-web</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-jdbc</artifactId>
+ <artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
@@ -67,7 +63,7 @@
<dependency>
<groupId>ch.vorburger.mariaDB4j</groupId>
<artifactId>mariaDB4j</artifactId>
- <version>2.2.3</version>
+ <version>2.3.0</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -90,17 +86,9 @@
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
- <artifactId>micrometer-core</artifactId>
- </dependency>
- <dependency>
- <groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>
<dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-data-rest</artifactId>
- </dependency>
- <dependency>
<groupId>org.onap.so</groupId>
<artifactId>cxf-logging</artifactId>
<version>${project.version}</version>
@@ -136,7 +124,6 @@
<artifactId>cxf-rt-frontend-simple</artifactId>
<version>3.3.3</version>
</dependency>
-
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-ri</artifactId>
@@ -184,7 +171,6 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
- <version>${springboot.version}</version>
<configuration>
<mainClass>org.onap.so.adapters.requestsdb.application.MSORequestDBApplication</mainClass>
</configuration>
diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java
index 4fe49e38dd..89c26232bd 100644
--- a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java
+++ b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java
@@ -78,7 +78,9 @@ public class ArchiveInfraRequestsScheduler {
+ "-" + calendar.get(Calendar.YEAR));
List<InfraActiveRequests> requestsByEndTime = new ArrayList<>();
- PageRequest pageRequest = new PageRequest(0, 100);
+
+ PageRequest pageRequest = PageRequest.of(0, 100); // Could use sorting here
+
do {
requestsByEndTime = infraActiveRepo.findByEndTimeLessThan(archivingDate, pageRequest);
logger.debug("{} requests to be archived based on End Time", requestsByEndTime.size());
diff --git a/adapters/mso-sdnc-adapter/pom.xml b/adapters/mso-sdnc-adapter/pom.xml
index 590121966e..cad9c9fbc0 100644
--- a/adapters/mso-sdnc-adapter/pom.xml
+++ b/adapters/mso-sdnc-adapter/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.onap.so</groupId>
<artifactId>adapters</artifactId>
- <version>1.7.1-SNAPSHOT</version>
+ <version>1.8.0-SNAPSHOT</version>
</parent>
<artifactId>mso-sdnc-adapter</artifactId>
<properties>
@@ -131,45 +131,20 @@
</dependency>
</dependencies>
</dependencyManagement>
-
<dependencies>
<dependency>
- <groupId>com.sun.activation</groupId>
- <artifactId>javax.activation</artifactId>
- <version>1.2.0</version>
- </dependency>
- <dependency>
- <groupId>javax.xml.bind</groupId>
- <artifactId>jaxb-api</artifactId>
- <version>2.3.0</version>
- </dependency>
- <dependency>
- <groupId>com.sun.xml.bind</groupId>
- <artifactId>jaxb-core</artifactId>
- <version>2.3.0</version>
- </dependency>
- <dependency>
- <groupId>com.sun.xml.bind</groupId>
- <artifactId>jaxb-impl</artifactId>
- <version>2.3.0</version>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-web</artifactId>
- </dependency>
- <dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-jersey2-jaxrs</artifactId>
<version>1.5.16</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-actuator</artifactId>
+ <artifactId>spring-boot-starter-test</artifactId>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-test</artifactId>
- <scope>test</scope>
+ <artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>org.onap.so.adapters</groupId>
@@ -206,10 +181,6 @@
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
- <artifactId>micrometer-core</artifactId>
- </dependency>
- <dependency>
- <groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>
<dependency>
diff --git a/adapters/mso-sdnc-adapter/src/test/resources/application-test.properties b/adapters/mso-sdnc-adapter/src/test/resources/application-test.properties
index e4f6903e23..0c77e30fe6 100644
--- a/adapters/mso-sdnc-adapter/src/test/resources/application-test.properties
+++ b/adapters/mso-sdnc-adapter/src/test/resources/application-test.properties
@@ -88,6 +88,19 @@ org.onap.so.adapters.sdnc..security-zone-topology-operation.deactivate=POST|2700
server.port=8080
server.tomcat.max-threads=50
ssl-enable: false
+spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
+spring.datasource.url=jdbc:mariadb://localhost:3307/camundabpmn
+spring.datasource.username=root
+spring.datasource.password=password
+spring.datasource.initialization-mode=always
+spring.jpa.generate-ddl=false
+spring.jpa.hibernate.ddl-auto=none
+spring.jpa.hibernate.naming-strategy=org.hibernate.cfg.ImprovedNamingStrategy
+spring.jpa.hibernate.enable-lazy-load-no-trans=true
+spring.jpa.database-platform=org.hibernate.dialect.MySQL5InnoDBDialect
+mariaDB4j.dataDir=
+mariaDB4j.port=3307
+mariaDB4j.databaseName=camundabpmn
spring.security.usercredentials[0].username=test
spring.security.usercredentials[0].password=$2a$12$Zi3AuYcZoZO/gBQyUtST2.F5N6HqcTtaNci2Et.ufsQhski56srIu
spring.security.usercredentials[0].role=SDNC-Client
diff --git a/adapters/mso-vfc-adapter/.springBeans b/adapters/mso-vfc-adapter/.springBeans
deleted file mode 100644
index 7f46cc45af..0000000000
--- a/adapters/mso-vfc-adapter/.springBeans
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beansProjectDescription>
- <version>1</version>
- <pluginVersion><![CDATA[3.8.4.201703310634-RELEASE]]></pluginVersion>
- <configSuffixes>
- <configSuffix><![CDATA[xml]]></configSuffix>
- </configSuffixes>
- <enableImports><![CDATA[false]]></enableImports>
- <configs>
- <config>java:org.onap.so.adapters.vfc.MSOVfcApplication</config>
- </configs>
- <autoconfigs>
- </autoconfigs>
- <configSets>
- </configSets>
-</beansProjectDescription> \ No newline at end of file
diff --git a/adapters/mso-vfc-adapter/README b/adapters/mso-vfc-adapter/README
deleted file mode 100644
index 233430c16a..0000000000
--- a/adapters/mso-vfc-adapter/README
+++ /dev/null
@@ -1 +0,0 @@
-This is the adapter for VFC \ No newline at end of file
diff --git a/adapters/mso-vfc-adapter/pom.xml b/adapters/mso-vfc-adapter/pom.xml
deleted file mode 100644
index eae6745866..0000000000
--- a/adapters/mso-vfc-adapter/pom.xml
+++ /dev/null
@@ -1,113 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.onap.so</groupId>
- <artifactId>adapters</artifactId>
- <version>1.7.1-SNAPSHOT</version>
- </parent>
- <groupId>org.onap.so.adapters</groupId>
- <artifactId>mso-vfc-adapter</artifactId>
- <name>mso-vfc-adapter</name>
- <description>Web service endpoint for vfc operations</description>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-dependencies</artifactId>
- <version>${springboot.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
- <build>
- <finalName>${project.artifactId}-${project.version}</finalName>
- <plugins>
- <plugin>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-maven-plugin</artifactId>
- <configuration>
- <mainClass>org.onap.so.adapters.vfc.MSOVfcApplication</mainClass>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>repackage</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.jacoco</groupId>
- <artifactId>jacoco-maven-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-actuator</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-web</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-jdbc</artifactId>
- <exclusions>
- <exclusion>
- <groupId>org.apache.tomcat</groupId>
- <artifactId>tomcat-jdbc</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-spring-boot-starter-jaxws</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-spring-boot-starter-jaxrs</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-rs-service-description-swagger</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-data-jpa</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-test</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.onap.so</groupId>
- <artifactId>mso-requests-db</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.so</groupId>
- <artifactId>mso-requests-db-repositories</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.mariadb.jdbc</groupId>
- <artifactId>mariadb-java-client</artifactId>
- </dependency>
- <dependency>
- <groupId>ch.vorburger.mariaDB4j</groupId>
- <artifactId>mariaDB4j</artifactId>
- <version>2.2.3</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-configuration-processor</artifactId>
- <optional>true</optional>
- </dependency>
- </dependencies>
-</project>
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/CXFConfiguration.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/CXFConfiguration.java
deleted file mode 100644
index dd875c573e..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/CXFConfiguration.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.vfc;
-
-import java.util.Arrays;
-import org.apache.cxf.Bus;
-import org.apache.cxf.endpoint.Server;
-import org.apache.cxf.feature.LoggingFeature;
-import org.apache.cxf.jaxrs.JAXRSServerFactoryBean;
-import org.apache.cxf.jaxrs.swagger.Swagger2Feature;
-import org.apache.cxf.transport.servlet.CXFServlet;
-import org.onap.so.adapters.vfc.rest.VfcAdapterRest;
-import org.onap.so.logging.jaxrs.filter.SOAuditLogContainerFilter;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.web.servlet.ServletRegistrationBean;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider;
-
-
-@Configuration
-public class CXFConfiguration {
-
- @Autowired
- private Bus bus;
-
- @Autowired
- private VfcAdapterRest vfcAdapterRest;
-
- @Autowired
- private SOAuditLogContainerFilter soAuditLogContainerFilter;
-
- @Autowired
- private ObjectMapper mapper;
-
- @Bean
- public ServletRegistrationBean cxfServlet() {
- return new ServletRegistrationBean(new CXFServlet(), "/services/*");
- }
-
- @Bean
- public Server rsServer() {
- JAXRSServerFactoryBean endpoint = new JAXRSServerFactoryBean();
- endpoint.setBus(bus);
- endpoint.setServiceBeans(Arrays.<Object>asList(vfcAdapterRest));
- endpoint.setAddress("/");
- endpoint.setFeatures(Arrays.asList(createSwaggerFeature(), new LoggingFeature()));
- endpoint.setProviders(Arrays.asList(new JacksonJsonProvider(mapper), soAuditLogContainerFilter));
- return endpoint.create();
- }
-
- @Bean
- public Swagger2Feature createSwaggerFeature() {
- Swagger2Feature swagger2Feature = new Swagger2Feature();
- swagger2Feature.setPrettyPrint(true);
- swagger2Feature.setTitle("SO VFC Adapter");
- swagger2Feature.setContact("The ONAP SO team");
- swagger2Feature.setDescription("This project is the SO Orchestration Engine");
- swagger2Feature.setVersion("1.0.0");
- swagger2Feature.setResourcePackage("org.onap.so.adapters.vfc.rest");
- swagger2Feature.setScan(true);
- return swagger2Feature;
- }
-
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/MSOVfcApplication.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/MSOVfcApplication.java
deleted file mode 100644
index 62234f910d..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/MSOVfcApplication.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Modifications Copyright (C) 2018 IBM.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.vfc;
-
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-
-
-
-@SpringBootApplication(scanBasePackages = {"org.onap.so"})
-public class MSOVfcApplication {
-
- public static void main(String... args) {
- SpringApplication.run(MSOVfcApplication.class, args);
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/RequestDBConfig.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/RequestDBConfig.java
deleted file mode 100644
index d7397c8df3..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/RequestDBConfig.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.vfc;
-
-
-import javax.persistence.EntityManagerFactory;
-import javax.sql.DataSource;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.boot.jdbc.DataSourceBuilder;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Primary;
-import org.springframework.context.annotation.Profile;
-import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
-import org.springframework.orm.jpa.JpaTransactionManager;
-import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
-import org.springframework.transaction.PlatformTransactionManager;
-import org.springframework.transaction.annotation.EnableTransactionManagement;
-
-@Profile({"!test"})
-@Configuration
-@EnableTransactionManagement
-@EnableJpaRepositories(entityManagerFactoryRef = "requestEntityManagerFactory",
- transactionManagerRef = "requestTransactionManager", basePackages = {"org.onap.so.db.request.data.repository"})
-public class RequestDBConfig {
-
- @Primary
- @Bean(name = "requestDataSource")
- @ConfigurationProperties(prefix = "spring.datasource")
- public DataSource dataSource() {
- return DataSourceBuilder.create().build();
- }
-
- @Primary
- @Bean(name = "requestEntityManagerFactory")
- public LocalContainerEntityManagerFactoryBean entityManagerFactory(EntityManagerFactoryBuilder builder,
- @Qualifier("requestDataSource") DataSource dataSource) {
- return builder.dataSource(dataSource).packages("org.onap.so.db.request.beans").persistenceUnit("requestDB")
- .build();
- }
-
- @Primary
- @Bean(name = "requestTransactionManager")
- public PlatformTransactionManager transactionManager(
- @Qualifier("requestEntityManagerFactory") EntityManagerFactory entityManagerFactory) {
- return new JpaTransactionManager(entityManagerFactory);
- }
-
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/constant/CommonConstant.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/constant/CommonConstant.java
deleted file mode 100644
index 51a0fc0c97..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/constant/CommonConstant.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.vfc.constant;
-
-/**
- * CommonConstant <br>
- * <p>
- * </p>
- *
- * @author
- * @version ONAP Amsterdam Release 2017-08-28
- */
-public class CommonConstant {
-
- public static final String STR_EMPTY = "";
-
- public static final String NFVO_CREATE_URL = "/api/nslcm/v1/ns";
- public static final String SOL005_NFVO_CREATE_URL = "/api/nslcm/v1/ns_instances";
-
- public static final String NFVO_INSTANTIATE_URL = "/api/nslcm/v1/ns/%s/instantiate";
- public static final String SOL005_NFVO_INSTANTIATE_URL = "/api/nslcm/v1/ns_instances/%s/instantiate";
-
- public static final String NFVO_TERMINATE_URL = "/api/nslcm/v1/ns/%s/terminate";
- public static final String SOL005_NFVO_TERMINATE_URL = "/api/nslcm/v1/ns_instances/%s/terminate";
-
- public static final String NFVO_DELETE_URL = "/api/nslcm/v1/ns/%s";
- public static final String SOL005_NFVO_DELETE_URL = "/api/nslcm/v1/ns_instances/%s";
-
- public static final String NFVO_QUERY_URL = "/api/nslcm/v1/jobs/%s";
- public static final String SOL005_NFVO_QUERY_URL = "/api/nslcm/v1/ns_lcm_op_occs/%s";
-
- public static final String NFVO_SCALE_URL = "/api/nslcm/v1/ns/%s/scale";
-
- public enum operationState {
- PROCESSING, COMPLETED, PARTIALLY_COMPLETED, FAILED_TEMP, FAILED, ROLLING_BACK, ROLLED_BACK
- }
- public enum lcmOperationType {
- INSTANTIATE, SCALE, UPDATE, TERMINATE, HEAL
- };
- public enum cancelMode {
- GRACEFUL, FORCEFUL
- };
-
- /**
- *
- * <br>
- * <p>
- * </p>
- *
- * @author
- * @version ONAP Amsterdam Release 2017-08-28
- */
- public static class MethodType {
-
- public static final String POST = "post";
-
- public static final String DELETE = "delete";
-
- public static final String PUT = "put";
-
- public static final String GET = "get";
-
- private MethodType() {
-
- }
- }
-
- /**
- *
- * <br>
- * <p>
- * </p>
- *
- * @author
- * @version ONAP Amsterdam Release 2017-08-28
- */
- public static class Step {
-
- public static final String CREATE = "create";
-
- public static final String INSTANTIATE = "instantiate";
-
- public static final String STATUS = "status";
-
- public static final String TERMINATE = "terminate";
-
- public static final String QUERY = "query";
-
- public static final String DELETE = "delete";
-
- public static final String SCALE = "scale";
-
- private Step() {
-
- }
-
- }
-
-
- public static final String NSD_ID = "nsdId";
-
- public static final String NS_NAME = "nsName";
-
- public static final String DESC = "description";
-
- public static final String NS_INSTANCE_ID = "nsInstanceId";
- public static final String SOL005_NS_INSTANCE_ID = "id";
-
-
- public static final String JOB_ID = "jobId";
- public static final String JOB_URI = "Location";
-
- public static final String ADDITIONAL_PARAM_FOR_NS = "additionalParamForNs";
-
- public static final String LOCAL_HOST = "localhost";
-
- public static class StatusDesc {
-
- public static final String INSTANTIATE_NS_FAILED = "instantiate ns failed";
-
- public static final String QUERY_JOB_STATUS_FAILED = "query job status failed";
-
- public static final String TERMINATE_NS_FAILED = "terminate ns failed";
-
- public static final String DELETE_NS_FAILED = "delete ns failed";
-
- public static final String CREATE_NS_FAILED = "create ns failed";
-
- public static final String SCALE_NS_FAILED = "scale ns failed";
-
- private StatusDesc() {
-
- }
- }
-
- private CommonConstant() {
-
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/constant/DriverExceptionID.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/constant/DriverExceptionID.java
deleted file mode 100644
index 61330027c5..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/constant/DriverExceptionID.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.vfc.constant;
-
-/**
- * <br>
- * <p>
- * </p>
- * identification of adapter exception
- *
- * @author
- * @version ONAP Amsterdam Release 2017-9-6
- */
-public class DriverExceptionID {
-
- public static final String INVALID_RESPONSE_FROM_INSTANTIATE_OPERATION =
- "Invalid response from instantiate operation";
-
- public static final String INVALID_RESPONSEE_FROM_CREATE_OPERATION = "Invalid response from create operation";
-
- public static final String FAIL_TO_INSTANTIATE_NS = "Fail to instantiate ns";
-
- public static final String FAIL_TO_CREATE_NS = "Fail to create ns";
-
- public static final String INVALID_RESPONSE_FROM_TERMINATE_OPERATION = "Invalid response from terminate operation";
-
- public static final String FAIL_TO_DELETE_NS = "Fail to delete ns";
-
- public static final String FAIL_TO_TERMINATE_NS = "Fail to terminate ns";
-
- public static final String JOB_STATUS_ERROR = "Job status error";
-
- public static final String FAIL_TO_QUERY_JOB_STATUS = "Fail to query job status";
-
- public static final String FAIL_TO_SCALE_NS = "Fail to scale network service";
-
- public static final String INVALID_RESPONSE_FROM_SCALE_OPERATION = "Invalid response from scale operation";
-
-
- private DriverExceptionID() {
-
- }
-
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/constant/HttpCode.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/constant/HttpCode.java
deleted file mode 100644
index e08c1573cc..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/constant/HttpCode.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.vfc.constant;
-
-/**
- * Constant Class.<br/>
- * <p>
- * Define constant for http operation.
- * </p>
- *
- * @author
- * @version ONAP Amsterdam 2016/8/4
- */
-public class HttpCode {
-
- /**
- * Fail to request.
- */
- public static final int BAD_REQUEST = 400;
-
- /**
- * Inner error
- */
- public static final int INTERNAL_SERVER_ERROR = 500;
-
- /**
- * Not accept request.
- */
- public static final int NOT_ACCEPTABLE = 406;
-
- /**
- * Not found service.
- */
- public static final int NOT_FOUND = 404;
-
- /**
- * Accept request.
- */
- public static final int RESPOND_ACCEPTED = 202;
-
- /**
- * Http response is ok.
- */
- public static final int RESPOND_OK = 200;
-
- public static final int CREATED_OK = 201;
-
- /**
- * Conflict
- */
- public static final int RESPOND_CONFLICT = 409;
-
- /**
- * Constructor<br/>
- * <p>
- * </p>
- *
- * @since ONAP Amsterdam Release 2017-9-6
- */
- private HttpCode() {
-
- }
-
- /**
- * Whether request is successful.<br/>
- *
- * @param httpCode response code
- * @return true or false
- * @since ONAP Amsterdam Release 2017-9-6
- */
- public static boolean isSucess(int httpCode) {
- return httpCode / 100 == 2;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/exceptions/ApplicationException.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/exceptions/ApplicationException.java
deleted file mode 100644
index 88260a7100..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/exceptions/ApplicationException.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.vfc.exceptions;
-
-import javax.ws.rs.core.Response;
-
-public class ApplicationException extends Exception {
-
- /**
- * Serial number.
- */
- private static final long serialVersionUID = 1L;
-
- private int errorCode;
-
- private String errorMsg;
-
- /**
- * Constructor<br/>
- * <p>
- * </p>
- *
- * @param errorCode error status
- * @param errorMsg error detail
- * @since ONAP Amsterdam Release 2017-9-6
- */
- public ApplicationException(int errorCode, String errorMsg) {
- this.errorCode = errorCode;
- this.errorMsg = errorMsg;
- }
-
- public int getErrorCode() {
- return errorCode;
- }
-
- public void setErrorCode(int errorCode) {
- this.errorCode = errorCode;
- }
-
- public String getErrorMsg() {
- return errorMsg;
- }
-
- public void setErrorMsg(String errorMsg) {
- this.errorMsg = errorMsg;
- }
-
- /**
- * build error Response <br>
- *
- * @return
- * @since ONAP Amsterdam Release
- */
- public Response buildErrorResponse() {
- return Response.status(errorCode).entity(errorMsg).build();
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/AddPnfData.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/AddPnfData.java
deleted file mode 100644
index d312501fd7..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/AddPnfData.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/***
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-
-package org.onap.so.adapters.vfc.model;
-
-import java.util.List;
-
-public class AddPnfData {
- private String pnfId;
- private String pnfName;
- private String pnfdId;
- private String pnfProfileId;
- private List<PnfExtCpData> cpData;
-
- /***
- *
- * @return id of pnf
- */
- public String getPnfId() {
- return pnfId;
- }
-
- public void setPnfId(String pnfId) {
- this.pnfId = pnfId;
- }
-
- public String getPnfName() {
- return pnfName;
- }
-
- public void setPnfName(String pnfName) {
- this.pnfName = pnfName;
- }
-
- public String getPnfdId() {
- return pnfdId;
- }
-
- public void setPnfdId(String pnfdId) {
- this.pnfdId = pnfdId;
- }
-
- public String getPnfProfileId() {
- return pnfProfileId;
- }
-
- public void setPnfProfileId(String pnfProfileId) {
- this.pnfProfileId = pnfProfileId;
- }
-
- public List<PnfExtCpData> getCpData() {
- return cpData;
- }
-
- public void setCpData(List<PnfExtCpData> cpData) {
- this.cpData = cpData;
- }
-}
-
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/AddressRange.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/AddressRange.java
deleted file mode 100644
index 9f357a549d..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/AddressRange.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/***
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-public class AddressRange {
- private String minAddress;
- private String maxAddress;
-
- public String getMinAddress() {
- return minAddress;
- }
-
- public void setMinAddress(String minAddress) {
- this.minAddress = minAddress;
- }
-
- public String getMaxAddress() {
- return maxAddress;
- }
-
- public void setMaxAddress(String maxAddress) {
- this.maxAddress = maxAddress;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/AffectedNs.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/AffectedNs.java
deleted file mode 100644
index fa502f3962..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/AffectedNs.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/***
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-public class AffectedNs {
- private String nsInstanceId;
- private String nsdId;
-
- private enum changeType {
- ADD, REMOVE, INSTANTIATE, TERMINATE, SCALE, UPDATE, HEAL
- }
- private enum changeResult {
- COMPLETED, ROLLED_BACK, FAILED, PARTIALLY_COMPLETED
- }
-
- public String getNsInstanceId() {
- return nsInstanceId;
- }
-
- public void setNsInstanceId(String nsInstanceId) {
- this.nsInstanceId = nsInstanceId;
- }
-
- public String getNsdId() {
- return nsdId;
- }
-
- public void setNsdId(String nsdId) {
- this.nsdId = nsdId;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/AffectedPnf.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/AffectedPnf.java
deleted file mode 100644
index 9d98e1c256..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/AffectedPnf.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/***
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-public class AffectedPnf {
- private String pnfid;
- private String pnfdid;
- private String pnfProfileId;
- private String pnfName;
- private String cpInstanceId;
-
- private enum changeType {
- ADD, REMOVE, MODIFY
- }
- private enum changeResult {
- COMPLETED, ROLLED_BACK, FAILED
- }
-
- public String getPnfid() {
- return pnfid;
- }
-
- public void setPnfid(String pnfid) {
- this.pnfid = pnfid;
- }
-
- public String getPnfdid() {
- return pnfdid;
- }
-
- public void setPnfdid(String pnfdid) {
- this.pnfdid = pnfdid;
- }
-
- public String getPnfProfileId() {
- return pnfProfileId;
- }
-
- public void setPnfProfileId(String pnfProfileId) {
- this.pnfProfileId = pnfProfileId;
- }
-
- public String getPnfName() {
- return pnfName;
- }
-
- public void setPnfName(String pnfName) {
- this.pnfName = pnfName;
- }
-
- public String getCpInstanceId() {
- return cpInstanceId;
- }
-
- public void setCpInstanceId(String cpInstanceId) {
- this.cpInstanceId = cpInstanceId;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/AffectedSap.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/AffectedSap.java
deleted file mode 100644
index 62f4f92fa9..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/AffectedSap.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/***
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-public class AffectedSap {
- private String sapInstanceId;
- private String sapdId;
- private String sapName;
-
- private enum changeType {
- ADD, REMOVE, MODIFY
- }
- private enum changeResult {
- COMPLETED, ROLLED_BACK, FAILED
- }
-
- public String getSapInstanceId() {
- return sapInstanceId;
- }
-
- public void setSapInstanceId(String sapInstanceId) {
- this.sapInstanceId = sapInstanceId;
- }
-
- public String getSapdId() {
- return sapdId;
- }
-
- public void setSapdId(String sapdId) {
- this.sapdId = sapdId;
- }
-
- public String getSapName() {
- return sapName;
- }
-
- public void setSapName(String sapName) {
- this.sapName = sapName;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/AffectedVirtualLink.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/AffectedVirtualLink.java
deleted file mode 100644
index ecaa1c5d3b..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/AffectedVirtualLink.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/***
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-public class AffectedVirtualLink {
- private String nsVirtualLinkInstanceId;
- private String nsVirtualLinkDescId;
- private String vlProfileId;
-
- private enum changeType {
- ADD, DELETE, MODIFY, ADD_LINK_PORT, REMOVE_LINK_PORT
- };
- private enum changeResult {
- COMPLETED, ROLLED_BACK, FAILED
- }
-
- public String getNsVirtualLinkInstanceId() {
- return nsVirtualLinkInstanceId;
- }
-
- public void setNsVirtualLinkInstanceId(String nsVirtualLinkInstanceId) {
- this.nsVirtualLinkInstanceId = nsVirtualLinkInstanceId;
- }
-
- public String getNsVirtualLinkDescId() {
- return nsVirtualLinkDescId;
- }
-
- public void setNsVirtualLinkDescId(String nsVirtualLinkDescId) {
- this.nsVirtualLinkDescId = nsVirtualLinkDescId;
- }
-
- public String getVlProfileId() {
- return vlProfileId;
- }
-
- public void setVlProfileId(String vlProfileId) {
- this.vlProfileId = vlProfileId;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/AffectedVnf.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/AffectedVnf.java
deleted file mode 100644
index 6463c7a129..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/AffectedVnf.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/***
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-public class AffectedVnf {
- private String vnfInstanceId;
- private String vnfdId;
- private String vnfProfileId;
- private String vnfName;
-
- private enum changeType {
- ADD,
- REMOVE,
- INSTANTIATE,
- TERMINATE,
- SCALE,
- CHANGE_FLAVOUR,
- HEAL,
- OPERATE,
- MODIFY_INFORMATION,
- CHANGE_EXTERNAL_VNF_CONNECTIVITY
- };
- private enum changeResult {
- COMPLETED, ROLLED_BACK, FAILED
- }
-
- private ChangedInfo changedInfo;
-
-
- public String getVnfInstanceId() {
- return vnfInstanceId;
- }
-
- public void setVnfInstanceId(String vnfInstanceId) {
- this.vnfInstanceId = vnfInstanceId;
- }
-
- public String getVnfdId() {
- return vnfdId;
- }
-
- public void setVnfdId(String vnfdId) {
- this.vnfdId = vnfdId;
- }
-
- public String getVnfProfileId() {
- return vnfProfileId;
- }
-
- public void setVnfProfileId(String vnfProfileId) {
- this.vnfProfileId = vnfProfileId;
- }
-
- public String getVnfName() {
- return vnfName;
- }
-
- public void setVnfName(String vnfName) {
- this.vnfName = vnfName;
- }
-
- public ChangedInfo getChangedInfo() {
- return changedInfo;
- }
-
- public void setChangedInfo(ChangedInfo changedInfo) {
- this.changedInfo = changedInfo;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/AffectedVnffg.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/AffectedVnffg.java
deleted file mode 100644
index 04e9481190..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/AffectedVnffg.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/***
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-public class AffectedVnffg {
- private String vnffgInstanceId;
- private String vnffgdId;
-
- private enum changeType {
- ADD, REMOVE, MODIFY
- }
- private enum changeResult {
- COMPLETED, ROLLED_BACK, FAILED
- }
-
- public String getVnffgInstanceId() {
- return vnffgInstanceId;
- }
-
- public void setVnffgInstanceId(String vnffgInstanceId) {
- this.vnffgInstanceId = vnffgInstanceId;
- }
-
- public String getVnffgdId() {
- return vnffgdId;
- }
-
- public void setVnffgdId(String vnffgdId) {
- this.vnffgdId = vnffgdId;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/AffinityOrAntiAffinityRule.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/AffinityOrAntiAffinityRule.java
deleted file mode 100644
index 7f019bcf40..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/AffinityOrAntiAffinityRule.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/***
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import java.util.List;
-
-public class AffinityOrAntiAffinityRule {
- private String vnfdId;
- private List<String> vnfProfileId;
- private List<String> vnfInstanceId;
-
- private enum affinityOrAntiAffiinty {
- AFFINITY, ANTI_AFFIINTY
- };
- private enum scope {
- NFVI_POP, ZONE, ZONE_GROUP, NFVI_NODE
- };
-
- public String getVnfdId() {
- return vnfdId;
- }
-
- public void setVnfdId(String vnfdId) {
- this.vnfdId = vnfdId;
- }
-
- public List<String> getVnfProfileId() {
- return vnfProfileId;
- }
-
- public void setVnfProfileId(List<String> vnfProfileId) {
- this.vnfProfileId = vnfProfileId;
- }
-
- public List<String> getVnfInstanceId() {
- return vnfInstanceId;
- }
-
- public void setVnfInstanceId(List<String> vnfInstanceId) {
- this.vnfInstanceId = vnfInstanceId;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ChangedInfo.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ChangedInfo.java
deleted file mode 100644
index 5de6cbf139..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ChangedInfo.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/***
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-public class ChangedInfo {
- private ModifyVnfInfoData changedVnfInfo;
- private ExtVirtualLinkInfo changedExtConnectivity;
-
- public ModifyVnfInfoData getChangedVnfInfo() {
- return changedVnfInfo;
- }
-
- public void setChangedVnfInfo(ModifyVnfInfoData changedVnfInfo) {
- this.changedVnfInfo = changedVnfInfo;
- }
-
- public ExtVirtualLinkInfo getChangedExtConnectivity() {
- return changedExtConnectivity;
- }
-
- public void setChangedExtConnectivity(ExtVirtualLinkInfo changedExtConnectivity) {
- this.changedExtConnectivity = changedExtConnectivity;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/CivicAddressElement.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/CivicAddressElement.java
deleted file mode 100644
index 2a63d39be0..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/CivicAddressElement.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/***
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-public class CivicAddressElement {
- private int caType;
- private String caValue;
-
- public int getCaType() {
- return caType;
- }
-
- public void setCaType(int caType) {
- this.caType = caType;
- }
-
- public String getCaValue() {
- return caValue;
- }
-
- public void setCaValue(String caValue) {
- this.caValue = caValue;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/CpProtocolData.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/CpProtocolData.java
deleted file mode 100644
index 27272ea22a..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/CpProtocolData.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/***
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-public class CpProtocolData {
- private String layerProtocol;
- private IpOverEthernetAddressData ipOverEthernet;
-
- public String getLayerProtocol() {
- return layerProtocol;
- }
-
- public void setLayerProtocol(String layerProtocol) {
- this.layerProtocol = layerProtocol;
- }
-
- public IpOverEthernetAddressData getIpOverEthernet() {
- return ipOverEthernet;
- }
-
- public void setIpOverEthernet(IpOverEthernetAddressData ipOverEthernet) {
- this.ipOverEthernet = ipOverEthernet;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/CpProtocolInfo.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/CpProtocolInfo.java
deleted file mode 100644
index 5f1191efe9..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/CpProtocolInfo.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import javax.validation.constraints.NotNull;
-
-public class CpProtocolInfo {
- @NotNull
- private enum layerProtocol {
- IP_OVER_ETHERNET
- };
-
- private IpOverEthernetAddressData ipOverEthernet;
-
- public IpOverEthernetAddressData getIpOverEthernet() {
- return ipOverEthernet;
- }
-
- public void setIpOverEthernet(IpOverEthernetAddressData ipOverEthernet) {
- this.ipOverEthernet = ipOverEthernet;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/CreateNsRequest.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/CreateNsRequest.java
deleted file mode 100644
index 878ce60ba1..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/CreateNsRequest.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/***
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-public class CreateNsRequest {
-
- String nsdId;
-
- String nsName;
-
- String nsDescription;
-
-
- public String getNsdId() {
- return nsdId;
- }
-
- public void setNsdId(String nsdId) {
- this.nsdId = nsdId;
- }
-
- public String getNsDescription() {
- return nsDescription;
- }
-
- public void setNsDescription(String nsDescription) {
- this.nsDescription = nsDescription;
- }
-
- /**
- * @return Returns the nsName.
- */
- public String getNsName() {
- return nsName;
- }
-
- /**
- * @param nsName The nsName to set.
- */
- public void setNsName(String nsName) {
- this.nsName = nsName;
- }
-
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/CustomerModel.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/CustomerModel.java
deleted file mode 100644
index e54f0dfb6d..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/CustomerModel.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.vfc.model;
-
-/**
- * The Customer Model <br>
- * <p>
- * </p>
- *
- * @author
- * @version ONAP Amsterdam Release 2017-10-12
- */
-public class CustomerModel {
-
- String globalCustomerId;
-
- String serviceType;
-
-
- /**
- * @return Returns the globalCustomerId.
- */
- public String getGlobalCustomerId() {
- return globalCustomerId;
- }
-
-
- /**
- * @param globalCustomerId The globalCustomerId to set.
- */
- public void setGlobalCustomerId(String globalCustomerId) {
- this.globalCustomerId = globalCustomerId;
- }
-
-
- /**
- * @return Returns the serviceType.
- */
- public String getServiceType() {
- return serviceType;
- }
-
-
- /**
- * @param serviceType The serviceType to set.
- */
- public void setServiceType(String serviceType) {
- this.serviceType = serviceType;
- }
-
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ExtCpInfo.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ExtCpInfo.java
deleted file mode 100644
index 63ca66bd43..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ExtCpInfo.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import javax.validation.constraints.NotNull;
-import java.util.List;
-
-public class ExtCpInfo {
- @NotNull
- private String id;
- @NotNull
- private String cpdId;
- private List<CpProtocolData> cpProtocolInfo;
- private List<String> extLinkPortId;
-
-
-
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ExtLinkPortInfo.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ExtLinkPortInfo.java
deleted file mode 100644
index a1ab3fdb97..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ExtLinkPortInfo.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/***
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-public class ExtLinkPortInfo {
- private String id;
- private ResourceHandle resourceHandle;
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public ResourceHandle getResourceHandle() {
- return resourceHandle;
- }
-
- public void setResourceHandle(ResourceHandle resourceHandle) {
- this.resourceHandle = resourceHandle;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ExtManagedVirtualLinkInfo.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ExtManagedVirtualLinkInfo.java
deleted file mode 100644
index 3f643a8330..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ExtManagedVirtualLinkInfo.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import javax.validation.constraints.NotNull;
-import java.util.List;
-
-public class ExtManagedVirtualLinkInfo {
- @NotNull
- private String id;
- @NotNull
- private String vnfVirtualLinkDescId;
- @NotNull
- private ResourceHandle networkResource;
- private List<VnfLinkPortInfo> vnfLinkPorts;
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public String getVnfVirtualLinkDescId() {
- return vnfVirtualLinkDescId;
- }
-
- public void setVnfVirtualLinkDescId(String vnfVirtualLinkDescId) {
- this.vnfVirtualLinkDescId = vnfVirtualLinkDescId;
- }
-
- public ResourceHandle getNetworkResource() {
- return networkResource;
- }
-
- public void setNetworkResource(ResourceHandle networkResource) {
- this.networkResource = networkResource;
- }
-
- public List<VnfLinkPortInfo> getVnfLinkPorts() {
- return vnfLinkPorts;
- }
-
- public void setVnfLinkPorts(List<VnfLinkPortInfo> vnfLinkPorts) {
- this.vnfLinkPorts = vnfLinkPorts;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ExtVirtualLinkInfo.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ExtVirtualLinkInfo.java
deleted file mode 100644
index ce7d1cfe6d..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ExtVirtualLinkInfo.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/***
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-public class ExtVirtualLinkInfo {
- private String id;
- private ResourceHandle resourceHandle;
- private ExtLinkPortInfo extLinkPorts;
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public ResourceHandle getResourceHandle() {
- return resourceHandle;
- }
-
- public void setResourceHandle(ResourceHandle resourceHandle) {
- this.resourceHandle = resourceHandle;
- }
-
- public ExtLinkPortInfo getExtLinkPorts() {
- return extLinkPorts;
- }
-
- public void setExtLinkPorts(ExtLinkPortInfo extLinkPorts) {
- this.extLinkPorts = extLinkPorts;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/InstantiateNsRequest.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/InstantiateNsRequest.java
deleted file mode 100644
index ff0730a527..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/InstantiateNsRequest.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/***
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import java.util.List;
-import java.util.Map;
-
-public class InstantiateNsRequest {
-
- private String nsFlavourId;
- private List<SapData> sapData;
- private List<AddPnfData> addpnfData;
- private List<VnfInstanceData> vnfInstanceData;
- private List<String> nestedNsInstanceId;
- private List<VnfLocationConstraint> localizationLanguage;
- private Map<String, Object> aditionalParamsForNs;
- private List<ParamsForVnf> additionalParamsForVnf;
- private String startTime;
- private String nsInstantiationLevelId;
- private List<AffinityOrAntiAffinityRule> additionalAffinityOrAntiAffiniityRule;
-
- /***
- *
- * @return nsFlavourId
- */
- public String getNsFlavourId() {
- return nsFlavourId;
- }
-
- /***
- *
- * @param nsFlavourId
- */
- public void setNsFlavourId(String nsFlavourId) {
- this.nsFlavourId = nsFlavourId;
- }
-
- /***
- *
- * @return
- */
- public List<SapData> getSapData() {
- return sapData;
- }
-
- /***
- *
- * @param sapData
- */
- public void setSapData(List<SapData> sapData) {
- this.sapData = sapData;
- }
-
- /***
- *
- * @return
- */
- public List<AddPnfData> getAddpnfData() {
- return addpnfData;
- }
-
- /***
- *
- * @param addpnfData
- */
- public void setAddpnfData(List<AddPnfData> addpnfData) {
- this.addpnfData = addpnfData;
- }
-
- /***
- *
- * @return
- */
- public List<VnfInstanceData> getVnfInstanceData() {
- return vnfInstanceData;
- }
-
- /***
- *
- * @param vnfInstanceData
- */
- public void setVnfInstanceData(List<VnfInstanceData> vnfInstanceData) {
- this.vnfInstanceData = vnfInstanceData;
- }
-
- /***
- *
- * @return
- */
- public List<String> getNestedNsInstanceId() {
- return nestedNsInstanceId;
- }
-
- /***
- *
- * @param nestedNsInstanceId
- */
- public void setNestedNsInstanceId(List<String> nestedNsInstanceId) {
- this.nestedNsInstanceId = nestedNsInstanceId;
- }
-
- /***
- *
- * @return
- */
- public List<VnfLocationConstraint> getLocalizationLanguage() {
- return localizationLanguage;
- }
-
- /***
- *
- * @param localizationLanguage
- */
- public void setLocalizationLanguage(List<VnfLocationConstraint> localizationLanguage) {
- this.localizationLanguage = localizationLanguage;
- }
-
- /***
- *
- * @return
- */
- public Map<String, Object> getAditionalParamsForNs() {
- return aditionalParamsForNs;
- }
-
- /***
- *
- * @param aditionalParamsForNs
- */
- public void setAditionalParamsForNs(Map<String, Object> aditionalParamsForNs) {
- this.aditionalParamsForNs = aditionalParamsForNs;
- }
-
- /***
- *
- * @return
- */
- public List<ParamsForVnf> getAdditionalParamsForVnf() {
- return additionalParamsForVnf;
- }
-
- /***
- *
- * @param additionalParamsForVnf
- */
- public void setAdditionalParamsForVnf(List<ParamsForVnf> additionalParamsForVnf) {
- this.additionalParamsForVnf = additionalParamsForVnf;
- }
-
- /***
- *
- * @return
- */
- public String getStartTime() {
- return startTime;
- }
-
- /***
- *
- * @param startTime
- */
- public void setStartTime(String startTime) {
- this.startTime = startTime;
- }
-
- /***
- *
- * @return
- */
- public String getNsInstantiationLevelId() {
- return nsInstantiationLevelId;
- }
-
- /***
- *
- * @param nsInstantiationLevelId
- */
- public void setNsInstantiationLevelId(String nsInstantiationLevelId) {
- this.nsInstantiationLevelId = nsInstantiationLevelId;
- }
-
- /***
- *
- * @return
- */
- public List<AffinityOrAntiAffinityRule> getAdditionalAffinityOrAntiAffiniityRule() {
- return additionalAffinityOrAntiAffiniityRule;
- }
-
- /***
- *
- * @param additionalAffinityOrAntiAffiniityRule
- */
- public void setAdditionalAffinityOrAntiAffiniityRule(
- List<AffinityOrAntiAffinityRule> additionalAffinityOrAntiAffiniityRule) {
- this.additionalAffinityOrAntiAffiniityRule = additionalAffinityOrAntiAffiniityRule;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/InstantiatedVnfInfo.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/InstantiatedVnfInfo.java
deleted file mode 100644
index e66bb90bbd..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/InstantiatedVnfInfo.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import javax.validation.constraints.NotNull;
-import java.util.List;
-
-public class InstantiatedVnfInfo {
- @NotNull
- private String flavourId;
- @NotNull
- private String vnfState;
- private List<VnfScaleInfo> vnfScaleInfos;
- @NotNull
- private List<ExtCpInfo> extCpInfo;
- private List<ExtVirtualLinkInfo> extVirtualLinkInfo;
- private List<ExtManagedVirtualLinkInfo> extManagedVirtualLinkInfo;
- // Defination of MonitoringParameter is not there in ETSI document
- // considering as String
- private List<String> monitoringParameters;
- private String localizationLanguage;
-
- private List<VnfcResourceInfo> vnfcResourceInfo;
- // Defination of VirtualStorageResourceInfo is not there in ETSI document
- // considering as String
- private List<String> virtualStorageResourceInfo;
-
- public String getFlavourId() {
- return flavourId;
- }
-
- public void setFlavourId(String flavourId) {
- this.flavourId = flavourId;
- }
-
- public String getVnfState() {
- return vnfState;
- }
-
- public void setVnfState(String vnfState) {
- this.vnfState = vnfState;
- }
-
- public List<VnfScaleInfo> getVnfScaleInfos() {
- return vnfScaleInfos;
- }
-
- public void setVnfScaleInfos(List<VnfScaleInfo> vnfScaleInfos) {
- this.vnfScaleInfos = vnfScaleInfos;
- }
-
- public List<ExtCpInfo> getExtCpInfo() {
- return extCpInfo;
- }
-
- public void setExtCpInfo(List<ExtCpInfo> extCpInfo) {
- this.extCpInfo = extCpInfo;
- }
-
- public List<ExtVirtualLinkInfo> getExtVirtualLinkInfo() {
- return extVirtualLinkInfo;
- }
-
- public void setExtVirtualLinkInfo(List<ExtVirtualLinkInfo> extVirtualLinkInfo) {
- this.extVirtualLinkInfo = extVirtualLinkInfo;
- }
-
- public List<ExtManagedVirtualLinkInfo> getExtManagedVirtualLinkInfo() {
- return extManagedVirtualLinkInfo;
- }
-
- public void setExtManagedVirtualLinkInfo(List<ExtManagedVirtualLinkInfo> extManagedVirtualLinkInfo) {
- this.extManagedVirtualLinkInfo = extManagedVirtualLinkInfo;
- }
-
- public List<String> getMonitoringParameters() {
- return monitoringParameters;
- }
-
- public void setMonitoringParameters(List<String> monitoringParameters) {
- this.monitoringParameters = monitoringParameters;
- }
-
- public String getLocalizationLanguage() {
- return localizationLanguage;
- }
-
- public void setLocalizationLanguage(String localizationLanguage) {
- this.localizationLanguage = localizationLanguage;
- }
-
- public List<VnfcResourceInfo> getVnfcResourceInfo() {
- return vnfcResourceInfo;
- }
-
- public void setVnfcResourceInfo(List<VnfcResourceInfo> vnfcResourceInfo) {
- this.vnfcResourceInfo = vnfcResourceInfo;
- }
-
- public List<String> getVirtualStorageResourceInfo() {
- return virtualStorageResourceInfo;
- }
-
- public void setVirtualStorageResourceInfo(List<String> virtualStorageResourceInfo) {
- this.virtualStorageResourceInfo = virtualStorageResourceInfo;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/IpAddresses.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/IpAddresses.java
deleted file mode 100644
index 32c5571d96..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/IpAddresses.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/***
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import java.util.List;
-
-public class IpAddresses {
- private String type;
- private List<String> fixedAddresses;
- private int numDynamicAddresses;
- private AddressRange addressRange;
- private String subnetId;
-
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public List<String> getFixedAddresses() {
- return fixedAddresses;
- }
-
- public void setFixedAddresses(List<String> fixedAddresses) {
- this.fixedAddresses = fixedAddresses;
- }
-
- public int getNumDynamicAddresses() {
- return numDynamicAddresses;
- }
-
- public void setNumDynamicAddresses(int numDynamicAddresses) {
- this.numDynamicAddresses = numDynamicAddresses;
- }
-
- public AddressRange getAddressRange() {
- return addressRange;
- }
-
- public void setAddressRange(AddressRange addressRange) {
- this.addressRange = addressRange;
- }
-
- public String getSubnetId() {
- return subnetId;
- }
-
- public void setSubnetId(String subnetId) {
- this.subnetId = subnetId;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/IpOverEthernetAddressData.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/IpOverEthernetAddressData.java
deleted file mode 100644
index 48529e5f76..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/IpOverEthernetAddressData.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/***
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import java.util.List;
-
-public class IpOverEthernetAddressData {
- private String macAddress;
- private List<IpAddresses> ipAddresses;
-
- public String getMacAddress() {
- return macAddress;
- }
-
- public void setMacAddress(String macAddress) {
- this.macAddress = macAddress;
- }
-
- public List<IpAddresses> getIpAddresses() {
- return ipAddresses;
- }
-
- public void setIpAddresses(List<IpAddresses> ipAddresses) {
- this.ipAddresses = ipAddresses;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/Link.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/Link.java
deleted file mode 100644
index 2459346826..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/Link.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/***
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-public class Link {
- private String href;
-
- public String getHref() {
- return href;
- }
-
- public void setHref(String href) {
- this.href = href;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/Links.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/Links.java
deleted file mode 100644
index 8ad8f000c1..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/Links.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/***
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-public class Links {
- private Link self;
- private Link nsInstance;
- private Link cancel;
- private Link retry;
- private Link rollback;
- private Link continues;
- private Link fail;
-
- public Link getSelf() {
- return self;
- }
-
- public void setSelf(Link self) {
- this.self = self;
- }
-
- public Link getNsInstance() {
- return nsInstance;
- }
-
- public void setNsInstance(Link nsInstance) {
- this.nsInstance = nsInstance;
- }
-
- public Link getCancel() {
- return cancel;
- }
-
- public void setCancel(Link cancel) {
- this.cancel = cancel;
- }
-
- public Link getRetry() {
- return retry;
- }
-
- public void setRetry(Link retry) {
- this.retry = retry;
- }
-
- public Link getRollback() {
- return rollback;
- }
-
- public void setRollback(Link rollback) {
- this.rollback = rollback;
- }
-
- public Link getContinues() {
- return continues;
- }
-
- public void setContinues(Link continues) {
- this.continues = continues;
- }
-
- public Link getFail() {
- return fail;
- }
-
- public void setFail(Link fail) {
- this.fail = fail;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/LocationConstraint.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/LocationConstraint.java
deleted file mode 100644
index b79565d7a9..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/LocationConstraint.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.vfc.model;
-
-/**
- * <br>
- * <p>
- * </p>
- *
- * @author
- * @version ONAP Amsterdam Release 2017-9-6
- */
-public class LocationConstraint {
-
- /**
- * vnf profile id
- */
- private String vnfProfileId;
-
- /**
- * location constraints: vimId
- */
- private VimLocation locationConstraints;
-
- /**
- * @return Returns the vnfProfileId.
- */
- public String getVnfProfileId() {
- return vnfProfileId;
- }
-
- /**
- * @param vnfProfileId The vnfProfileId to set.
- */
- public void setVnfProfileId(String vnfProfileId) {
- this.vnfProfileId = vnfProfileId;
- }
-
-
- /**
- * @return Returns the locationConstraints.
- */
- public VimLocation getLocationConstraints() {
- return locationConstraints;
- }
-
-
- /**
- * @param locationConstraints The locationConstraints to set.
- */
- public void setLocationConstraints(VimLocation locationConstraints) {
- this.locationConstraints = locationConstraints;
- }
-
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/LocationConstraints.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/LocationConstraints.java
deleted file mode 100644
index b636d49edf..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/LocationConstraints.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/***
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-public class LocationConstraints {
- private String countryCode;
- private CivicAddressElement civicAddressElement;
-
- public String getCountryCode() {
- return countryCode;
- }
-
- public void setCountryCode(String countryCode) {
- this.countryCode = countryCode;
- }
-
- public CivicAddressElement getCivicAddressElement() {
- return civicAddressElement;
- }
-
- public void setCivicAddressElement(CivicAddressElement civicAddressElement) {
- this.civicAddressElement = civicAddressElement;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/Mask.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/Mask.java
deleted file mode 100644
index 352f47e19f..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/Mask.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import javax.validation.constraints.NotNull;
-
-public class Mask {
- @NotNull
- private int startingPoint;
- @NotNull
- private int length;
- @NotNull
- private String value;
-
- public int getStartingPoint() {
- return startingPoint;
- }
-
- public void setStartingPoint(int startingPoint) {
- this.startingPoint = startingPoint;
- }
-
- public int getLength() {
- return length;
- }
-
- public void setLength(int length) {
- this.length = length;
- }
-
- public String getValue() {
- return value;
- }
-
- public void setValue(String value) {
- this.value = value;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ModifyVnfInfoData.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ModifyVnfInfoData.java
deleted file mode 100644
index 55ab21e8e2..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ModifyVnfInfoData.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/***
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import java.util.Map;
-
-public class ModifyVnfInfoData {
- private String vnfInstanceId;
- private String vnfInstanceName;
- private String vnfInstanceDescription;
- private String vnfPkgId;
- private Map<String, Object> vnfConfigurableProperties;
- private Map<String, Object> Metadata;
- private Map<String, Object> Extensions;
-
- public String getVnfInstanceId() {
- return vnfInstanceId;
- }
-
- public void setVnfInstanceId(String vnfInstanceId) {
- this.vnfInstanceId = vnfInstanceId;
- }
-
- public String getVnfInstanceName() {
- return vnfInstanceName;
- }
-
- public void setVnfInstanceName(String vnfInstanceName) {
- this.vnfInstanceName = vnfInstanceName;
- }
-
- public String getVnfInstanceDescription() {
- return vnfInstanceDescription;
- }
-
- public void setVnfInstanceDescription(String vnfInstanceDescription) {
- this.vnfInstanceDescription = vnfInstanceDescription;
- }
-
- public String getVnfPkgId() {
- return vnfPkgId;
- }
-
- public void setVnfPkgId(String vnfPkgId) {
- this.vnfPkgId = vnfPkgId;
- }
-
- public Map<String, Object> getVnfConfigurableProperties() {
- return vnfConfigurableProperties;
- }
-
- public void setVnfConfigurableProperties(Map<String, Object> vnfConfigurableProperties) {
- this.vnfConfigurableProperties = vnfConfigurableProperties;
- }
-
- public Map<String, Object> getMetadata() {
- return Metadata;
- }
-
- public void setMetadata(Map<String, Object> metadata) {
- Metadata = metadata;
- }
-
- public Map<String, Object> getExtensions() {
- return Extensions;
- }
-
- public void setExtensions(Map<String, Object> extensions) {
- Extensions = extensions;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NSResourceInputParameter.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NSResourceInputParameter.java
deleted file mode 100644
index 266e5ee5d8..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NSResourceInputParameter.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
- * Copyright (C) 2018 CMCC All rights reserved.
- * Modifications Copyright (c) 2019 Samsung
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import java.io.ByteArrayOutputStream;
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.Marshaller;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.SerializationFeature;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * NS Create Input Parameter For VFC Adapter<br>
- * <p>
- * </p>
- *
- * @version ONAP Amsterdam Release 2017/1/7
- */
-public class NSResourceInputParameter {
-
- private static final Logger logger = LoggerFactory.getLogger(NSResourceInputParameter.class);
-
- private NsOperationKey nsOperationKey;
-
- private String nsServiceName;
-
- private String nsServiceDescription;
-
- private String nsServiceModelUUID;
-
- private NsParameters nsParameters;
-
- private NsScaleParameters nsScaleParameters;
-
-
- /**
- * @return Returns the nsServiceName.
- */
- public String getNsServiceName() {
- return nsServiceName;
- }
-
-
- /**
- * @param nsServiceName The nsServiceName to set.
- */
- public void setNsServiceName(String nsServiceName) {
- this.nsServiceName = nsServiceName;
- }
-
-
- /**
- * @return Returns the nsServiceDescription.
- */
- public String getNsServiceDescription() {
- return nsServiceDescription;
- }
-
-
- /**
- * @param nsServiceDescription The nsServiceDescription to set.
- */
- public void setNsServiceDescription(String nsServiceDescription) {
- this.nsServiceDescription = nsServiceDescription;
- }
-
- /**
- * @return Returns the nsParameters.
- */
- public NsParameters getNsParameters() {
- return nsParameters;
- }
-
- /**
- * @param nsParameters The nsParameters to set.
- */
- public void setNsParameters(NsParameters nsParameters) {
- this.nsParameters = nsParameters;
- }
-
- public NsOperationKey getNsOperationKey() {
- return nsOperationKey;
- }
-
- public void setNsOperationKey(NsOperationKey nsOperationKey) {
- this.nsOperationKey = nsOperationKey;
- }
-
- public String toJsonString() {
- String jsonString = null;
- try {
- ObjectMapper mapper = new ObjectMapper();
- mapper.enable(SerializationFeature.WRAP_ROOT_VALUE);
- jsonString = mapper.writeValueAsString(this);
- } catch (Exception e) {
- logger.debug("Exception:", e);
- }
- return jsonString;
- }
-
- public String toXmlString() {
- try {
- ByteArrayOutputStream bs = new ByteArrayOutputStream();
- JAXBContext context = JAXBContext.newInstance(this.getClass());
- Marshaller marshaller = context.createMarshaller();
- marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); // pretty print XML
- marshaller.marshal(this, bs);
- return bs.toString();
- } catch (Exception e) {
- logger.debug("Exception:", e);
- return "";
- }
- }
-
- public NsScaleParameters getNsScaleParameters() {
- return nsScaleParameters;
- }
-
- public void setNsScaleParameters(NsScaleParameters nsScaleParameters) {
- this.nsScaleParameters = nsScaleParameters;
- }
-
-
- public String getNsServiceModelUUID() {
- return nsServiceModelUUID;
- }
-
-
- public void setNsServiceModelUUID(String nsServiceModelUUID) {
- this.nsServiceModelUUID = nsServiceModelUUID;
- }
-
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NfpInfo.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NfpInfo.java
deleted file mode 100644
index a6e3963725..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NfpInfo.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import javax.validation.constraints.NotNull;
-import java.util.List;
-
-public class NfpInfo {
- @NotNull
- private String id;
- private String nfpdId;
- private String nfpName;
- private String description;
- @NotNull
- private List<NsCpHandle> nscpHandle;
- private int totalCp;
- @NotNull
- private NfpRule nfpRule;
-
- @NotNull
- private enum nfpState {
- ENABLED, DISABLED
- };
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public String getNfpdId() {
- return nfpdId;
- }
-
- public void setNfpdId(String nfpdId) {
- this.nfpdId = nfpdId;
- }
-
- public String getNfpName() {
- return nfpName;
- }
-
- public void setNfpName(String nfpName) {
- this.nfpName = nfpName;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public List<NsCpHandle> getNscpHandle() {
- return nscpHandle;
- }
-
- public void setNscpHandle(List<NsCpHandle> nscpHandle) {
- this.nscpHandle = nscpHandle;
- }
-
- public int getTotalCp() {
- return totalCp;
- }
-
- public void setTotalCp(int totalCp) {
- this.totalCp = totalCp;
- }
-
- public NfpRule getNfpRule() {
- return nfpRule;
- }
-
- public void setNfpRule(NfpRule nfpRule) {
- this.nfpRule = nfpRule;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NfpRule.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NfpRule.java
deleted file mode 100644
index b4f684a3e2..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NfpRule.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import java.util.List;
-
-public class NfpRule {
- private String etherDestinationAddress;
- private String etherSourceAddress;
-
- private enum etherType {
- IPV4, IPV6
- };
-
- private List<String> vlanTag;
-
- private enum protocol {
- TCP, UDP, ICMP
- }
-
- private String dscp;
- private PortRange sourcePortRange;
- private PortRange destinationPortRange;
- private String sourceIpAddressPrefix;
- private String destinationIpAddressPrefix;
- private List<Mask> extendedCriteria;
-
- public String getEtherDestinationAddress() {
- return etherDestinationAddress;
- }
-
- public void setEtherDestinationAddress(String etherDestinationAddress) {
- this.etherDestinationAddress = etherDestinationAddress;
- }
-
- public String getEtherSourceAddress() {
- return etherSourceAddress;
- }
-
- public void setEtherSourceAddress(String etherSourceAddress) {
- this.etherSourceAddress = etherSourceAddress;
- }
-
- public List<String> getVlanTag() {
- return vlanTag;
- }
-
- public void setVlanTag(List<String> vlanTag) {
- this.vlanTag = vlanTag;
- }
-
- public String getDscp() {
- return dscp;
- }
-
- public void setDscp(String dscp) {
- this.dscp = dscp;
- }
-
- public PortRange getSourcePortRange() {
- return sourcePortRange;
- }
-
- public void setSourcePortRange(PortRange sourcePortRange) {
- this.sourcePortRange = sourcePortRange;
- }
-
- public PortRange getDestinationPortRange() {
- return destinationPortRange;
- }
-
- public void setDestinationPortRange(PortRange destinationPortRange) {
- this.destinationPortRange = destinationPortRange;
- }
-
- public String getSourceIpAddressPrefix() {
- return sourceIpAddressPrefix;
- }
-
- public void setSourceIpAddressPrefix(String sourceIpAddressPrefix) {
- this.sourceIpAddressPrefix = sourceIpAddressPrefix;
- }
-
- public String getDestinationIpAddressPrefix() {
- return destinationIpAddressPrefix;
- }
-
- public void setDestinationIpAddressPrefix(String destinationIpAddressPrefix) {
- this.destinationIpAddressPrefix = destinationIpAddressPrefix;
- }
-
- public List<Mask> getExtendedCriteria() {
- return extendedCriteria;
- }
-
- public void setExtendedCriteria(List<Mask> extendedCriteria) {
- this.extendedCriteria = extendedCriteria;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsCpHandle.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsCpHandle.java
deleted file mode 100644
index 326488fb76..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsCpHandle.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-public class NsCpHandle {
- private String vnfInstanceId;
- private String vnfExtCpInstanceId;
- private String pnfInfoId;
- private String pnfExtCpInstanceId;
- private String nsInstanceId;
- private String nsSapInstanceId;
-
- public String getVnfInstanceId() {
- return vnfInstanceId;
- }
-
- public void setVnfInstanceId(String vnfInstanceId) {
- this.vnfInstanceId = vnfInstanceId;
- }
-
- public String getVnfExtCpInstanceId() {
- return vnfExtCpInstanceId;
- }
-
- public void setVnfExtCpInstanceId(String vnfExtCpInstanceId) {
- this.vnfExtCpInstanceId = vnfExtCpInstanceId;
- }
-
- public String getPnfInfoId() {
- return pnfInfoId;
- }
-
- public void setPnfInfoId(String pnfInfoId) {
- this.pnfInfoId = pnfInfoId;
- }
-
- public String getPnfExtCpInstanceId() {
- return pnfExtCpInstanceId;
- }
-
- public void setPnfExtCpInstanceId(String pnfExtCpInstanceId) {
- this.pnfExtCpInstanceId = pnfExtCpInstanceId;
- }
-
- public String getNsInstanceId() {
- return nsInstanceId;
- }
-
- public void setNsInstanceId(String nsInstanceId) {
- this.nsInstanceId = nsInstanceId;
- }
-
- public String getNsSapInstanceId() {
- return nsSapInstanceId;
- }
-
- public void setNsSapInstanceId(String nsSapInstanceId) {
- this.nsSapInstanceId = nsSapInstanceId;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsCreateReq.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsCreateReq.java
deleted file mode 100644
index 63358cb384..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsCreateReq.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.vfc.model;
-
-/**
- * Network Service Request<br/>
- * <p>
- * </p>
- *
- * @author
- * @version ONAP Amsterdam Sep 2, 2016
- */
-public class NsCreateReq {
-
- CustomerModel context;
-
- String csarId;
-
- String nsName;
-
- String description;
-
-
- /**
- * @return Returns the context.
- */
- public CustomerModel getContext() {
- return context;
- }
-
-
-
- /**
- * @param context The context to set.
- */
- public void setContext(CustomerModel context) {
- this.context = context;
- }
-
-
- /**
- * @return Returns the csarId.
- */
- public String getCsarId() {
- return csarId;
- }
-
-
- /**
- * @param csarId The csarId to set.
- */
- public void setCsarId(String csarId) {
- this.csarId = csarId;
- }
-
- /**
- * @return Returns the nsName.
- */
- public String getNsName() {
- return nsName;
- }
-
- /**
- * @param nsName The nsName to set.
- */
- public void setNsName(String nsName) {
- this.nsName = nsName;
- }
-
- /**
- * @return Returns the description.
- */
- public String getDescription() {
- return description;
- }
-
- /**
- * @param description The description to set.
- */
- public void setDescription(String description) {
- this.description = description;
- }
-
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsInstance.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsInstance.java
deleted file mode 100644
index d2d4b4e772..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsInstance.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import javax.validation.constraints.NotNull;
-import java.util.List;
-
-public class NsInstance {
- @NotNull
- private String id;
- @NotNull
- private String nsInstanceName;
- @NotNull
- private String nsInstanceDescription;
- @NotNull
- private String nsdId;
- @NotNull
- private String nsdInfoId;
- private String flavourId;
- private List<VnfInstance> vnfInstance;
- private List<PnfInfo> pnfInfo;
- private List<NsVirtualLinkInfo> virtualLinkInfo;
- private List<VnffgInfo> vnffgInfo;
- private List<SapInfo> sapInfo;
- private List<String> nestedNsInstanceId;
-
- @NotNull
- private enum nsState {
- NOT_INSTANTIATED, INSTANTIATED
- };
-
- private List<NsScaleInfo> nsScaleStatus;
- private List<AffinityOrAntiAffinityRule> additionalAffinityOrAntiAffinityRule;
- @NotNull
- private NsInstanceLinks _links;
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public String getNsInstanceName() {
- return nsInstanceName;
- }
-
- public void setNsInstanceName(String nsInstanceName) {
- this.nsInstanceName = nsInstanceName;
- }
-
- public String getNsInstanceDescription() {
- return nsInstanceDescription;
- }
-
- public void setNsInstanceDescription(String nsInstanceDescription) {
- this.nsInstanceDescription = nsInstanceDescription;
- }
-
- public String getNsdId() {
- return nsdId;
- }
-
- public void setNsdId(String nsdId) {
- this.nsdId = nsdId;
- }
-
- public String getNsdInfoId() {
- return nsdInfoId;
- }
-
- public void setNsdInfoId(String nsdInfoId) {
- this.nsdInfoId = nsdInfoId;
- }
-
- public String getFlavourId() {
- return flavourId;
- }
-
- public void setFlavourId(String flavourId) {
- this.flavourId = flavourId;
- }
-
- public List<VnfInstance> getVnfInstance() {
- return vnfInstance;
- }
-
- public void setVnfInstance(List<VnfInstance> vnfInstance) {
- this.vnfInstance = vnfInstance;
- }
-
- public List<PnfInfo> getPnfInfo() {
- return pnfInfo;
- }
-
- public void setPnfInfo(List<PnfInfo> pnfInfo) {
- this.pnfInfo = pnfInfo;
- }
-
- public List<NsVirtualLinkInfo> getVirtualLinkInfo() {
- return virtualLinkInfo;
- }
-
- public void setVirtualLinkInfo(List<NsVirtualLinkInfo> virtualLinkInfo) {
- this.virtualLinkInfo = virtualLinkInfo;
- }
-
- public List<VnffgInfo> getVnffgInfo() {
- return vnffgInfo;
- }
-
- public void setVnffgInfo(List<VnffgInfo> vnffgInfo) {
- this.vnffgInfo = vnffgInfo;
- }
-
- public List<SapInfo> getSapInfo() {
- return sapInfo;
- }
-
- public void setSapInfo(List<SapInfo> sapInfo) {
- this.sapInfo = sapInfo;
- }
-
- public List<String> getNestedNsInstanceId() {
- return nestedNsInstanceId;
- }
-
- public void setNestedNsInstanceId(List<String> nestedNsInstanceId) {
- this.nestedNsInstanceId = nestedNsInstanceId;
- }
-
- public List<NsScaleInfo> getNsScaleStatus() {
- return nsScaleStatus;
- }
-
- public void setNsScaleStatus(List<NsScaleInfo> nsScaleStatus) {
- this.nsScaleStatus = nsScaleStatus;
- }
-
- public List<AffinityOrAntiAffinityRule> getAdditionalAffinityOrAntiAffinityRule() {
- return additionalAffinityOrAntiAffinityRule;
- }
-
- public void setAdditionalAffinityOrAntiAffinityRule(
- List<AffinityOrAntiAffinityRule> additionalAffinityOrAntiAffinityRule) {
- this.additionalAffinityOrAntiAffinityRule = additionalAffinityOrAntiAffinityRule;
- }
-
- public NsInstanceLinks get_links() {
- return _links;
- }
-
- public void set_links(NsInstanceLinks _links) {
- this._links = _links;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsInstanceLinks.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsInstanceLinks.java
deleted file mode 100644
index 08b3c63c08..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsInstanceLinks.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import javax.validation.constraints.NotNull;
-import java.util.List;
-
-public class NsInstanceLinks {
- @NotNull
- private Link self;
- private List<Link> nestedNsInstances;
- private Link instantiate;
- private Link terminate;
- private Link update;
- private Link scale;
- private Link heal;
-
- public Link getSelf() {
- return self;
- }
-
- public void setSelf(Link self) {
- this.self = self;
- }
-
- public List<Link> getNestedNsInstances() {
- return nestedNsInstances;
- }
-
- public void setNestedNsInstances(List<Link> nestedNsInstances) {
- this.nestedNsInstances = nestedNsInstances;
- }
-
- public Link getInstantiate() {
- return instantiate;
- }
-
- public void setInstantiate(Link instantiate) {
- this.instantiate = instantiate;
- }
-
- public Link getTerminate() {
- return terminate;
- }
-
- public void setTerminate(Link terminate) {
- this.terminate = terminate;
- }
-
- public Link getUpdate() {
- return update;
- }
-
- public void setUpdate(Link update) {
- this.update = update;
- }
-
- public Link getScale() {
- return scale;
- }
-
- public void setScale(Link scale) {
- this.scale = scale;
- }
-
- public Link getHeal() {
- return heal;
- }
-
- public void setHeal(Link heal) {
- this.heal = heal;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsInstantiateReq.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsInstantiateReq.java
deleted file mode 100644
index 4281026021..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsInstantiateReq.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.vfc.model;
-
-/**
- * <br>
- * <p>
- * </p>
- * request model for instatiate
- *
- * @author
- * @version ONAP Amsterdam Release 2017-9-6
- */
-public class NsInstantiateReq extends NsParameters {
-
- String nsInstanceId;
-
- /**
- * @return Returns the nsInstanceId.
- */
- public String getNsInstanceId() {
- return nsInstanceId;
- }
-
- /**
- * @param nsInstanceId The nsInstanceId to set.
- */
- public void setNsInstanceId(String nsInstanceId) {
- this.nsInstanceId = nsInstanceId;
- }
-
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsLcmOpOcc.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsLcmOpOcc.java
deleted file mode 100644
index 559b1f7ba7..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsLcmOpOcc.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/***
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import org.onap.so.adapters.vfc.constant.CommonConstant;
-
-public class NsLcmOpOcc {
- private String id;
- private CommonConstant.operationState operationState;
- private String statusEnteredTime;
- private String nsInstanceId;
- private CommonConstant.lcmOperationType lcmOperationType;
- private String startTime;
- private Boolean isAutomaticInvocation;
- private String operationParams;
- private Boolean isCancelPending;
- private CommonConstant.cancelMode cancelMode;
- private ProblemDetails error;
- private Links links;
-
- public CommonConstant.lcmOperationType getLcmOperationType() {
- return lcmOperationType;
- }
-
- public void setLcmOperationType(CommonConstant.lcmOperationType lcmOperationType) {
- this.lcmOperationType = lcmOperationType;
- }
-
- public CommonConstant.cancelMode getCancelMode() {
- return cancelMode;
- }
-
- public void setCancelMode(CommonConstant.cancelMode cancelMode) {
- this.cancelMode = cancelMode;
- }
-
- public CommonConstant.operationState getOperationState() {
- return operationState;
- }
-
- public void setOperationState(CommonConstant.operationState operationState) {
- this.operationState = operationState;
- }
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public String getStatusEnteredTime() {
- return statusEnteredTime;
- }
-
- public void setStatusEnteredTime(String statusEnteredTime) {
- this.statusEnteredTime = statusEnteredTime;
- }
-
- public String getNsInstanceId() {
- return nsInstanceId;
- }
-
- public void setNsInstanceId(String nsInstanceId) {
- this.nsInstanceId = nsInstanceId;
- }
-
- public String getStartTime() {
- return startTime;
- }
-
- public void setStartTime(String startTime) {
- this.startTime = startTime;
- }
-
- public Boolean getAutomaticInvocation() {
- return isAutomaticInvocation;
- }
-
- public void setAutomaticInvocation(Boolean automaticInvocation) {
- isAutomaticInvocation = automaticInvocation;
- }
-
- public String getOperationParams() {
- return operationParams;
- }
-
- public void setOperationParams(String operationParams) {
- this.operationParams = operationParams;
- }
-
- public Boolean getCancelPending() {
- return isCancelPending;
- }
-
- public void setCancelPending(Boolean cancelPending) {
- isCancelPending = cancelPending;
- }
-
- public ProblemDetails getError() {
- return error;
- }
-
- public void setError(ProblemDetails error) {
- this.error = error;
- }
-
- public Links getLinks() {
- return links;
- }
-
- public void setLinks(Links links) {
- this.links = links;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsLinkPortInfo.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsLinkPortInfo.java
deleted file mode 100644
index 2dff432c3b..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsLinkPortInfo.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import javax.validation.constraints.NotNull;
-
-public class NsLinkPortInfo {
- @NotNull
- private String id;
- @NotNull
- private ResourceHandle resourceHandle;
- private NsCpHandle nsCpHandle;
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public ResourceHandle getResourceHandle() {
- return resourceHandle;
- }
-
- public void setResourceHandle(ResourceHandle resourceHandle) {
- this.resourceHandle = resourceHandle;
- }
-
- public NsCpHandle getNsCpHandle() {
- return nsCpHandle;
- }
-
- public void setNsCpHandle(NsCpHandle nsCpHandle) {
- this.nsCpHandle = nsCpHandle;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsOperationKey.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsOperationKey.java
deleted file mode 100644
index 2088d68b56..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsOperationKey.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.vfc.model;
-
-/**
- * The operation key object for NS <br>
- * <p>
- * </p>
- *
- * @author
- * @version ONAP Amsterdam Release 2017-09-15
- */
-public class NsOperationKey {
-
- /**
- * The subscriber id
- */
- private String globalSubscriberId;
-
- /**
- * The serviceType
- */
- private String serviceType;
-
- /**
- * The service ID
- */
- private String serviceId;
-
- /**
- * The Operation ID
- */
- private String operationId;
-
- /**
- * the NS template uuid
- */
- private String nodeTemplateUUID;
-
- /**
- * @return Returns the globalSubscriberId.
- */
- public String getGlobalSubscriberId() {
- return globalSubscriberId;
- }
-
- /**
- * @param globalSubscriberId The globalSubscriberId to set.
- */
- public void setGlobalSubscriberId(String globalSubscriberId) {
- this.globalSubscriberId = globalSubscriberId;
- }
-
- /**
- * @return Returns the serviceType.
- */
- public String getServiceType() {
- return serviceType;
- }
-
- /**
- * @param serviceType The serviceType to set.
- */
- public void setServiceType(String serviceType) {
- this.serviceType = serviceType;
- }
-
- /**
- * <br>
- *
- * @return
- * @since ONAP Amsterdam Release
- */
- public String getServiceId() {
- return serviceId;
- }
-
- /**
- * <br>
- *
- * @param serviceId
- * @since ONAP Amsterdam Release
- */
- public void setServiceId(String serviceId) {
- this.serviceId = serviceId;
- }
-
- /**
- * <br>
- *
- * @return
- * @since ONAP Amsterdam Release
- */
- public String getOperationId() {
- return operationId;
- }
-
- /**
- * <br>
- *
- * @param operationId
- * @since ONAP Amsterdam Release
- */
- public void setOperationId(String operationId) {
- this.operationId = operationId;
- }
-
- /**
- * @return Returns the nodeTemplateUUID.
- */
- public String getNodeTemplateUUID() {
- return nodeTemplateUUID;
- }
-
- /**
- * @param nodeTemplateUUID The nodeTemplateUUID to set.
- */
- public void setNodeTemplateUUID(String nodeTemplateUUID) {
- this.nodeTemplateUUID = nodeTemplateUUID;
- }
-
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsParameters.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsParameters.java
deleted file mode 100644
index e82ee2a79a..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsParameters.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * <br>
- * <p>
- * </p>
- *
- * @author
- * @version ONAP Amsterdam Release 2017-9-6
- */
-public class NsParameters {
-
- private List<LocationConstraint> locationConstraints;
-
- private Map<String, Object> additionalParamForNs = new HashMap<>();
-
- /**
- * @return Returns the locationConstraints.
- */
- public List<LocationConstraint> getLocationConstraints() {
- return locationConstraints;
- }
-
- /**
- * @param locationConstraints The locationConstraints to set.
- */
- public void setLocationConstraints(List<LocationConstraint> locationConstraints) {
- this.locationConstraints = locationConstraints;
- }
-
-
- /**
- * @return Returns the additionalParamForNs.
- */
- public Map<String, Object> getAdditionalParamForNs() {
- return additionalParamForNs;
- }
-
-
- /**
- * @param additionalParamForNs The additionalParamForNs to set.
- */
- public void setAdditionalParamForNs(Map<String, Object> additionalParamForNs) {
- this.additionalParamForNs = additionalParamForNs;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsProgressStatus.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsProgressStatus.java
deleted file mode 100644
index a7e72efb62..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsProgressStatus.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import java.util.List;
-
-/**
- * <br>
- * <p>
- * </p>
- * response model of query operation status
- *
- * @author
- * @version ONAP Amsterdam Release 2017-9-6
- */
-public class NsProgressStatus {
-
- String jobId;
-
- ResponseDescriptor responseDescriptor;
-
- List<ResponseDescriptor> responseHistoryList;
-
- /**
- * @return Returns the jobId.
- */
- public String getJobId() {
- return jobId;
- }
-
- /**
- * @param jobId The jobId to set.
- */
- public void setJobId(String jobId) {
- this.jobId = jobId;
- }
-
- /**
- * @return Returns the responseDescriptor.
- */
- public ResponseDescriptor getResponseDescriptor() {
- return responseDescriptor;
- }
-
- /**
- * @param responseDescriptor The responseDescriptor to set.
- */
- public void setResponseDescriptor(ResponseDescriptor responseDescriptor) {
- this.responseDescriptor = responseDescriptor;
- }
-
- /**
- * @return Returns the responseHistoryList.
- */
- public List<ResponseDescriptor> getResponseHistoryList() {
- return responseHistoryList;
- }
-
- /**
- * @param responseHistoryList The responseHistoryList to set.
- */
- public void setResponseHistoryList(List<ResponseDescriptor> responseHistoryList) {
- this.responseHistoryList = responseHistoryList;
- }
-
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsScaleInfo.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsScaleInfo.java
deleted file mode 100644
index 59acf564c2..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsScaleInfo.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import javax.validation.constraints.NotNull;
-
-public class NsScaleInfo {
- @NotNull
- private String nsScalingAspectId;
- @NotNull
- private String nsScaleLevelId;
-
- public String getNsScalingAspectId() {
- return nsScalingAspectId;
- }
-
- public void setNsScalingAspectId(String nsScalingAspectId) {
- this.nsScalingAspectId = nsScalingAspectId;
- }
-
- public String getNsScaleLevelId() {
- return nsScaleLevelId;
- }
-
- public void setNsScaleLevelId(String nsScaleLevelId) {
- this.nsScaleLevelId = nsScaleLevelId;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsScaleParameters.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsScaleParameters.java
deleted file mode 100644
index 6d089c0479..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsScaleParameters.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 CMCC Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.adapters.vfc.model;
-
-import java.util.List;
-
-/**
- * <br>
- * <p>
- * </p>
- *
- * @author
- * @version ONAP Amsterdam Release 2017-9-26
- */
-public class NsScaleParameters {
-
- private List<ScaleNsByStepsData> scaleNsByStepsData;
-
- private String scaleType;
-
- /**
- * @return Returns the scaleNsByStepsData.
- */
- public List<ScaleNsByStepsData> getScaleNsByStepsData() {
- return scaleNsByStepsData;
- }
-
- /**
- * @param scaleNsByStepsData The scaleNsByStepsData to set.
- */
- public void setScaleNsByStepsData(List<ScaleNsByStepsData> scaleNsByStepsData) {
- this.scaleNsByStepsData = scaleNsByStepsData;
- }
-
- /**
- * @return Returns the scale Type.
- */
- public String getScaleType() {
- return scaleType;
- }
-
- /**
- * @param scaleType The scaleType to set.
- */
- public void setScaleType(String scaleType) {
- this.scaleType = scaleType;
- }
-
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsScaleReq.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsScaleReq.java
deleted file mode 100644
index 79ed02c69f..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsScaleReq.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 CMCC Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.adapters.vfc.model;
-
-/**
- * <br>
- * <p>
- * </p>
- * request model for scale
- *
- * @author
- * @version ONAP Amsterdam Release 2017-9-26
- */
-public class NsScaleReq extends NsScaleParameters {
-
- String nsInstanceId;
-
- /**
- * @return Returns the nsInstanceId.
- */
- public String getNsInstanceId() {
- return nsInstanceId;
- }
-
- /**
- * @param nsInstanceId The nsInstanceId to set.
- */
- public void setNsInstanceId(String nsInstanceId) {
- this.nsInstanceId = nsInstanceId;
- }
-
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsVirtualLinkInfo.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsVirtualLinkInfo.java
deleted file mode 100644
index ed2debd2e6..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/NsVirtualLinkInfo.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import javax.validation.constraints.NotNull;
-import java.util.List;
-
-public class NsVirtualLinkInfo {
- @NotNull
- private String id;
- @NotNull
- private String nsVirtualLinkDescId;
- @NotNull
- private List<ResourceHandle> resourceHandle;
- private List<NsLinkPortInfo> linkPort;
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public String getNsVirtualLinkDescId() {
- return nsVirtualLinkDescId;
- }
-
- public void setNsVirtualLinkDescId(String nsVirtualLinkDescId) {
- this.nsVirtualLinkDescId = nsVirtualLinkDescId;
- }
-
- public List<ResourceHandle> getResourceHandle() {
- return resourceHandle;
- }
-
- public void setResourceHandle(List<ResourceHandle> resourceHandle) {
- this.resourceHandle = resourceHandle;
- }
-
- public List<NsLinkPortInfo> getLinkPort() {
- return linkPort;
- }
-
- public void setLinkPort(List<NsLinkPortInfo> linkPort) {
- this.linkPort = linkPort;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ParamsForVnf.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ParamsForVnf.java
deleted file mode 100644
index b7324e50fe..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ParamsForVnf.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/***
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import java.util.Map;
-
-public class ParamsForVnf {
- private String vnfProfileId;
- private Map<String, Object> additionalParams;
-
- public String getVnfProfileId() {
- return vnfProfileId;
- }
-
- public void setVnfProfileId(String vnfProfileId) {
- this.vnfProfileId = vnfProfileId;
- }
-
- public Map<String, Object> getAdditionalParams() {
- return additionalParams;
- }
-
- public void setAdditionalParams(Map<String, Object> additionalParams) {
- this.additionalParams = additionalParams;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/PnfExtCpData.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/PnfExtCpData.java
deleted file mode 100644
index d5d091fcb1..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/PnfExtCpData.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/***
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import java.util.List;
-
-public class PnfExtCpData {
- private String cpInstanceI16;
- private String cpdId;
- private List<CpProtocolData> cpProtocolData;
-
- public String getCpInstanceI16() {
- return cpInstanceI16;
- }
-
- public void setCpInstanceI16(String cpInstanceI16) {
- this.cpInstanceI16 = cpInstanceI16;
- }
-
- public String getCpdId() {
- return cpdId;
- }
-
- public void setCpdId(String cpdId) {
- this.cpdId = cpdId;
- }
-
- public List<CpProtocolData> getCpProtocolData() {
- return cpProtocolData;
- }
-
- public void setCpProtocolData(List<CpProtocolData> cpProtocolData) {
- this.cpProtocolData = cpProtocolData;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/PnfExtCpInfo.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/PnfExtCpInfo.java
deleted file mode 100644
index 402cb83147..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/PnfExtCpInfo.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import javax.validation.constraints.NotNull;
-import java.util.List;
-
-public class PnfExtCpInfo {
- @NotNull
- private String cpInstanceId;
- @NotNull
- private String cpdId;
- @NotNull
- private List<CpProtocolData> cpProtocolData;
-
- public String getCpInstanceI16() {
- return cpInstanceId;
- }
-
- public void setCpInstanceI16(String cpInstanceI16) {
- this.cpInstanceId = cpInstanceI16;
- }
-
- public String getCpdId() {
- return cpdId;
- }
-
- public void setCpdId(String cpdId) {
- this.cpdId = cpdId;
- }
-
- public List<CpProtocolData> getCpProtocolData() {
- return cpProtocolData;
- }
-
- public void setCpProtocolData(List<CpProtocolData> cpProtocolData) {
- this.cpProtocolData = cpProtocolData;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/PnfInfo.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/PnfInfo.java
deleted file mode 100644
index a1cc11bd0c..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/PnfInfo.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import javax.validation.constraints.NotNull;
-import java.util.List;
-
-public class PnfInfo {
-
- @NotNull
- private String pnfId;
- @NotNull
- private String pnfName;
- @NotNull
- private String pnfdId;
- @NotNull
- private String pnfdInfoId;
- @NotNull
- private String pnfProfileId;
- private List<PnfExtCpData> cpData;
-
- /***
- *
- * @return id of pnf
- */
- public String getPnfId() {
- return pnfId;
- }
-
- public void setPnfId(String pnfId) {
- this.pnfId = pnfId;
- }
-
- public String getPnfName() {
- return pnfName;
- }
-
- public void setPnfName(String pnfName) {
- this.pnfName = pnfName;
- }
-
- public String getPnfdId() {
- return pnfdId;
- }
-
- public void setPnfdId(String pnfdId) {
- this.pnfdId = pnfdId;
- }
-
- public String getPnfProfileId() {
- return pnfProfileId;
- }
-
- public void setPnfProfileId(String pnfProfileId) {
- this.pnfProfileId = pnfProfileId;
- }
-
- public List<PnfExtCpData> getCpData() {
- return cpData;
- }
-
- public void setCpData(List<PnfExtCpData> cpData) {
- this.cpData = cpData;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/PortRange.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/PortRange.java
deleted file mode 100644
index 8318a8ccff..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/PortRange.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import javax.validation.constraints.NotNull;
-
-public class PortRange {
- @NotNull
- private int lowerPort;
- @NotNull
- private int upperPort;
-
- public int getLowerPort() {
- return lowerPort;
- }
-
- public void setLowerPort(int lowerPort) {
- this.lowerPort = lowerPort;
- }
-
- public int getUpperPort() {
- return upperPort;
- }
-
- public void setUpperPort(int upperPort) {
- this.upperPort = upperPort;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ProblemDetails.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ProblemDetails.java
deleted file mode 100644
index efaa5de7a8..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ProblemDetails.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/***
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-public class ProblemDetails {
- private String type;
- private String title;
- private int status;
- private String detail;
- private String instance;
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public String getTitle() {
- return title;
- }
-
- public void setTitle(String title) {
- this.title = title;
- }
-
- public int getStatus() {
- return status;
- }
-
- public void setStatus(int status) {
- this.status = status;
- }
-
- public String getDetail() {
- return detail;
- }
-
- public void setDetail(String detail) {
- this.detail = detail;
- }
-
- public String getInstance() {
- return instance;
- }
-
- public void setInstance(String instance) {
- this.instance = instance;
- }
-
-
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ResourceChanges.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ResourceChanges.java
deleted file mode 100644
index 062a6aa32a..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ResourceChanges.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/***
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import java.util.List;
-
-public class ResourceChanges {
- private List<AffectedVnf> affectedVnfs;
- private List<AffectedPnf> affectedPnfs;
- private List<AffectedVirtualLink> affectedVls;
- private List<AffectedVnffg> affectedVnffgs;
- private List<AffectedNs> affectedNss;
- private List<AffectedSap> affectedSaps;
-
- public List<AffectedVnf> getAffectedVnfs() {
- return affectedVnfs;
- }
-
- public void setAffectedVnfs(List<AffectedVnf> affectedVnfs) {
- this.affectedVnfs = affectedVnfs;
- }
-
- public List<AffectedPnf> getAffectedPnfs() {
- return affectedPnfs;
- }
-
- public void setAffectedPnfs(List<AffectedPnf> affectedPnfs) {
- this.affectedPnfs = affectedPnfs;
- }
-
- public List<AffectedVirtualLink> getAffectedVls() {
- return affectedVls;
- }
-
- public void setAffectedVls(List<AffectedVirtualLink> affectedVls) {
- this.affectedVls = affectedVls;
- }
-
- public List<AffectedVnffg> getAffectedVnffgs() {
- return affectedVnffgs;
- }
-
- public void setAffectedVnffgs(List<AffectedVnffg> affectedVnffgs) {
- this.affectedVnffgs = affectedVnffgs;
- }
-
- public List<AffectedNs> getAffectedNss() {
- return affectedNss;
- }
-
- public void setAffectedNss(List<AffectedNs> affectedNss) {
- this.affectedNss = affectedNss;
- }
-
- public List<AffectedSap> getAffectedSaps() {
- return affectedSaps;
- }
-
- public void setAffectedSaps(List<AffectedSap> affectedSaps) {
- this.affectedSaps = affectedSaps;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ResourceHandle.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ResourceHandle.java
deleted file mode 100644
index fbfecaa007..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ResourceHandle.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/***
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-public class ResourceHandle {
- private String vimId;
- private String resourceProviderId;
- private String resourceId;
- private String vimLevelResourceType;
-
- public String getVimId() {
- return vimId;
- }
-
- public void setVimId(String vimId) {
- this.vimId = vimId;
- }
-
- public String getResourceProviderId() {
- return resourceProviderId;
- }
-
- public void setResourceProviderId(String resourceProviderId) {
- this.resourceProviderId = resourceProviderId;
- }
-
- public String getResourceId() {
- return resourceId;
- }
-
- public void setResourceId(String resourceId) {
- this.resourceId = resourceId;
- }
-
- public String getVimLevelResourceType() {
- return vimLevelResourceType;
- }
-
- public void setVimLevelResourceType(String vimLevelResourceType) {
- this.vimLevelResourceType = vimLevelResourceType;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ResponseDescriptor.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ResponseDescriptor.java
deleted file mode 100644
index 3ea51c107b..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ResponseDescriptor.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.vfc.model;
-
-/**
- * <br>
- * <p>
- * </p>
- * response model of query operation status
- *
- * @author
- * @version SDNO 0.5 September 3, 2016
- */
-public class ResponseDescriptor {
-
- String status;
-
- String progress;
-
- String statusDescription;
-
- Integer errorCode;
-
- Integer responseId;
-
- /**
- * @return Returns the status.
- */
- public String getStatus() {
- return status;
- }
-
- /**
- * @param status The status to set.
- */
- public void setStatus(String status) {
- this.status = status;
- }
-
- /**
- * @return Returns the progress.
- */
- public String getProgress() {
- return progress;
- }
-
- /**
- * @param progress The progress to set.
- */
- public void setProgress(String progress) {
- this.progress = progress;
- }
-
- /**
- * @return Returns the statusDescription.
- */
- public String getStatusDescription() {
- return statusDescription;
- }
-
- /**
- * @param statusDescription The statusDescription to set.
- */
- public void setStatusDescription(String statusDescription) {
- this.statusDescription = statusDescription;
- }
-
- /**
- * @return Returns the errorCode.
- */
- public Integer getErrorCode() {
- return errorCode;
- }
-
- /**
- * @param errorCode The errorCode to set.
- */
- public void setErrorCode(Integer errorCode) {
- this.errorCode = errorCode;
- }
-
- /**
- * @return Returns the responseId.
- */
- public Integer getResponseId() {
- return responseId;
- }
-
- /**
- * @param responseId The responseId to set.
- */
- public void setResponseId(Integer responseId) {
- this.responseId = responseId;
- }
-
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/RestfulResponse.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/RestfulResponse.java
deleted file mode 100644
index 27c9a89282..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/RestfulResponse.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import java.util.Map;
-
-/**
- * The Unified Restful Reponse Class <br>
- * <p>
- * </p>
- *
- * @author
- * @version ONAP Amsterdam Release 2017-09-06
- */
-public class RestfulResponse {
-
- // the response content
- private String responseContent;
-
- // the response status
- private int status;
-
- // the response header
- private Map<String, String> respHeaderMap;
-
- public RestfulResponse() {
- this.status = -1;
-
- this.respHeaderMap = null;
- }
-
- public int getStatus() {
- return this.status;
- }
-
- public void setStatus(int status) {
- this.status = status;
- }
-
- public Map<String, String> getRespHeaderMap() {
- return this.respHeaderMap;
- }
-
- public void setRespHeaderMap(Map<String, String> header) {
- this.respHeaderMap = header;
- }
-
- public int getRespHeaderInt(String key) {
- if (this.respHeaderMap != null) {
- String result = this.respHeaderMap.get(key);
- if (result != null) {
- return Integer.parseInt(result);
- }
- }
- return -1;
- }
-
- public long getRespHeaderLong(String key) {
- if (this.respHeaderMap != null) {
- String result = this.respHeaderMap.get(key);
- if (result != null) {
- return Long.parseLong(result);
- }
- }
- return -1L;
- }
-
- public String getRespHeaderStr(String key) {
- if (this.respHeaderMap != null) {
- return this.respHeaderMap.get(key);
- }
- return null;
- }
-
- public String getResponseContent() {
- return this.responseContent;
- }
-
- public void setResponseContent(String responseString) {
- this.responseContent = responseString;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/SapData.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/SapData.java
deleted file mode 100644
index d8e96e22f5..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/SapData.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/***
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import java.util.List;
-
-public class SapData {
- private String sapdId;
- private String sapName;
- private String description;
- private List<CpProtocolData> sapProtocolData;
-
- public String getSapdId() {
- return sapdId;
- }
-
- public void setSapdId(String sapdId) {
- this.sapdId = sapdId;
- }
-
- public String getSapName() {
- return sapName;
- }
-
- public void setSapName(String sapName) {
- this.sapName = sapName;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public List<CpProtocolData> getSapProtocolData() {
- return sapProtocolData;
- }
-
- public void setSapProtocolData(List<CpProtocolData> sapProtocolData) {
- this.sapProtocolData = sapProtocolData;
- }
-
-
-
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/SapInfo.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/SapInfo.java
deleted file mode 100644
index 182aceb127..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/SapInfo.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import javax.validation.constraints.NotNull;
-import java.util.List;
-
-public class SapInfo {
- @NotNull
- private String id;
- @NotNull
- private String sapdId;
- @NotNull
- private String sapName;
- @NotNull
- private String description;
- @NotNull
- private List<CpProtocolInfo> sapProtocolInfo;
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public String getSapdId() {
- return sapdId;
- }
-
- public void setSapdId(String sapdId) {
- this.sapdId = sapdId;
- }
-
- public String getSapName() {
- return sapName;
- }
-
- public void setSapName(String sapName) {
- this.sapName = sapName;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public List<CpProtocolInfo> getSapProtocolInfo() {
- return sapProtocolInfo;
- }
-
- public void setSapProtocolInfo(List<CpProtocolInfo> sapProtocolInfo) {
- this.sapProtocolInfo = sapProtocolInfo;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ScaleNsByStepsData.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ScaleNsByStepsData.java
deleted file mode 100644
index f9d6274643..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ScaleNsByStepsData.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 CMCC Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.adapters.vfc.model;
-
-/**
- * <br>
- * <p>
- * </p>
- *
- * @author
- * @version ONAP Amsterdam Release 2017-9-26
- */
-public class ScaleNsByStepsData {
-
- /**
- * scaling Direction
- */
- private String scalingDirection;
-
- /**
- * aspect ID
- */
- private String aspectId;
-
- /**
- * number of Steps
- */
- private Integer numberOfSteps;
-
- /**
- * @return Returns the scalingDirection.
- */
- public String getScalingDirection() {
- return scalingDirection;
- }
-
- /**
- * @param scalingDirection The scalingDirection to set.
- */
- public void setScalingDirection(String scalingDirection) {
- this.scalingDirection = scalingDirection;
- }
-
- /**
- * @return Returns the aspectId.
- */
- public String getAspectId() {
- return aspectId;
- }
-
- /**
- * @param aspectId The aspectId to set.
- */
- public void setAspectId(String aspectId) {
- this.aspectId = aspectId;
- }
-
- /**
- * @return Returns the numberOfSteps.
- */
- public Integer getNumberOfSteps() {
- return numberOfSteps;
- }
-
- /**
- * @param numberOfSteps The numberOfSteps to set.
- */
- public void setNumberOfSteps(int numberOfSteps) {
- this.numberOfSteps = numberOfSteps;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ScaleNsData.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ScaleNsData.java
deleted file mode 100644
index bd50827549..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/ScaleNsData.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2018 CMCC Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import java.util.List;
-
-/**
- * aim to wrap List<ScaleNsByStepsData> as a new list then be provided for the usage of vfc json
- *
- * added on 2018/01/30 by Qihui Zhao from CMCC
- */
-
-public class ScaleNsData {
-
- private List<ScaleNsByStepsData> scaleNsByStepsData;
-
- /**
- * @return Returns the scaleNsByStepsData.
- */
- public List<ScaleNsByStepsData> getScaleNsByStepsData() {
- return scaleNsByStepsData;
- }
-
- /**
- * @param scaleNsByStepsData The scaleNsByStepsData to set.
- */
- public void setScaleNsByStepsData(List<ScaleNsByStepsData> scaleNsByStepsData) {
- this.scaleNsByStepsData = scaleNsByStepsData;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/VFCScaleData.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/VFCScaleData.java
deleted file mode 100644
index 1939fa4ec4..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/VFCScaleData.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2018 CMCC Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Object totally matches required VFC input json format JsonUtil.marshal will convert this Object to string
- *
- * added on 2018/01/30 by Qihui Zhao from CMCC
- */
-
-public class VFCScaleData {
-
- private String nsInstanceId;
-
- private String scaleType;
-
- private List<ScaleNsData> scaleNsData = new ArrayList<>();
-
- /**
- * @return Returns the nsInstanceId.
- */
- public String getNsInstanceId() {
- return nsInstanceId;
- }
-
- /**
- * @param nsInstanceId The nsInstanceId to set.
- */
- public void setNsInstanceId(String nsInstanceId) {
- this.nsInstanceId = nsInstanceId;
- }
-
- /**
- * @return Returns the scale Type.
- */
- public String getScaleType() {
- return scaleType;
- }
-
- /**
- * @param scaleType The scaleType to set.
- */
- public void setScaleType(String scaleType) {
- this.scaleType = scaleType;
- }
-
- /**
- * @return Returns the scaleNsDate.
- */
- public List<ScaleNsData> getScaleNsData() {
- return scaleNsData;
- }
-
- /**
- * The scaleNsData to set.
- */
- public void setScaleNsData(List<ScaleNsByStepsData> scaleNsByStepsData) {
- ScaleNsData scaleNsDataObj = new ScaleNsData();
- scaleNsDataObj.setScaleNsByStepsData(scaleNsByStepsData);
-
- this.scaleNsData.add(scaleNsDataObj);
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/VimLocation.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/VimLocation.java
deleted file mode 100644
index 456835b431..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/VimLocation.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.vfc.model;
-
-/**
- *
- * <br>
- * <p>
- * </p>
- *
- * @author
- * @version ONAP Amsterdam Release 2017-10-18
- */
-public class VimLocation {
- private String vimId;
-
-
- /**
- * @return Returns the vimId.
- */
- public String getVimId() {
- return vimId;
- }
-
-
- /**
- * @param vimId The vimId to set.
- */
- public void setVimId(String vimId) {
- this.vimId = vimId;
- }
-
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/VnfInstance.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/VnfInstance.java
deleted file mode 100644
index ccd6532ee0..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/VnfInstance.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import javax.validation.constraints.NotNull;
-import java.util.Map;
-
-public class VnfInstance {
- @NotNull
- private String id;
- private String vnfInstanceName;
- private String vnfInstanceDescription;
- @NotNull
- private String vnfdId;
- @NotNull
- private String vnfProvider;
- @NotNull
- private String vnfProductName;
- @NotNull
- private String vnfSoftwareVersion;
- @NotNull
- private String vnfdVersion;
- @NotNull
- private String vnfPkgId;
- private Map<String, Object> vnfConfigurableProperties;
- private String vimId;
-
- private enum instantiationState {
- NOT_INSTANTIATED, INSTANTIATED
- };
-
- private InstantiatedVnfInfo instantiatedVnfInfo;
- private Map<String, Object> metadata;
- private Map<String, Object> extensions;
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public String getVnfInstanceName() {
- return vnfInstanceName;
- }
-
- public void setVnfInstanceName(String vnfInstanceName) {
- this.vnfInstanceName = vnfInstanceName;
- }
-
- public String getVnfInstanceDescription() {
- return vnfInstanceDescription;
- }
-
- public void setVnfInstanceDescription(String vnfInstanceDescription) {
- this.vnfInstanceDescription = vnfInstanceDescription;
- }
-
- public String getVnfdId() {
- return vnfdId;
- }
-
- public void setVnfdId(String vnfdId) {
- this.vnfdId = vnfdId;
- }
-
- public String getVnfProvider() {
- return vnfProvider;
- }
-
- public void setVnfProvider(String vnfProvider) {
- this.vnfProvider = vnfProvider;
- }
-
- public String getVnfProductName() {
- return vnfProductName;
- }
-
- public void setVnfProductName(String vnfProductName) {
- this.vnfProductName = vnfProductName;
- }
-
- public String getVnfSoftwareVersion() {
- return vnfSoftwareVersion;
- }
-
- public void setVnfSoftwareVersion(String vnfSoftwareVersion) {
- this.vnfSoftwareVersion = vnfSoftwareVersion;
- }
-
- public String getVnfdVersion() {
- return vnfdVersion;
- }
-
- public void setVnfdVersion(String vnfdVersion) {
- this.vnfdVersion = vnfdVersion;
- }
-
- public String getVnfPkgId() {
- return vnfPkgId;
- }
-
- public void setVnfPkgId(String vnfPkgId) {
- this.vnfPkgId = vnfPkgId;
- }
-
- public Map<String, Object> getVnfConfigurableProperties() {
- return vnfConfigurableProperties;
- }
-
- public void setVnfConfigurableProperties(Map<String, Object> vnfConfigurableProperties) {
- this.vnfConfigurableProperties = vnfConfigurableProperties;
- }
-
- public String getVimId() {
- return vimId;
- }
-
- public void setVimId(String vimId) {
- this.vimId = vimId;
- }
-
- public InstantiatedVnfInfo getInstantiatedVnfInfo() {
- return instantiatedVnfInfo;
- }
-
- public void setInstantiatedVnfInfo(InstantiatedVnfInfo instantiatedVnfInfo) {
- this.instantiatedVnfInfo = instantiatedVnfInfo;
- }
-
- public Map<String, Object> getMetadata() {
- return metadata;
- }
-
- public void setMetadata(Map<String, Object> metadata) {
- this.metadata = metadata;
- }
-
- public Map<String, Object> getExtensions() {
- return extensions;
- }
-
- public void setExtensions(Map<String, Object> extensions) {
- this.extensions = extensions;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/VnfInstanceData.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/VnfInstanceData.java
deleted file mode 100644
index 83345fcb4c..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/VnfInstanceData.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/***
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-public class VnfInstanceData {
- private String vnfInstanceId;
- private String vnfProfileId;
-
- public String getVnfInstanceId() {
- return vnfInstanceId;
- }
-
- public void setVnfInstanceId(String vnfInstanceId) {
- this.vnfInstanceId = vnfInstanceId;
- }
-
- public String getVnfProfileId() {
- return vnfProfileId;
- }
-
- public void setVnfProfileId(String vnfProfileId) {
- this.vnfProfileId = vnfProfileId;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/VnfLinkPortInfo.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/VnfLinkPortInfo.java
deleted file mode 100644
index 0b09d066fa..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/VnfLinkPortInfo.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import javax.validation.constraints.NotNull;
-
-public class VnfLinkPortInfo {
- @NotNull
- private String id;
- @NotNull
- private ResourceHandle resourceHandle;
- private String cpInstanceId;
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public ResourceHandle getResourceHandle() {
- return resourceHandle;
- }
-
- public void setResourceHandle(ResourceHandle resourceHandle) {
- this.resourceHandle = resourceHandle;
- }
-
- public String getCpInstanceId() {
- return cpInstanceId;
- }
-
- public void setCpInstanceId(String cpInstanceId) {
- this.cpInstanceId = cpInstanceId;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/VnfLocationConstraint.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/VnfLocationConstraint.java
deleted file mode 100644
index 5db3060b88..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/VnfLocationConstraint.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/***
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-public class VnfLocationConstraint {
- private String vnfProfileId;
- private LocationConstraint locationConstraints;
-
- public String getVnfProfileId() {
- return vnfProfileId;
- }
-
- public void setVnfProfileId(String vnfProfileId) {
- this.vnfProfileId = vnfProfileId;
- }
-
- public LocationConstraint getLocationConstraints() {
- return locationConstraints;
- }
-
- public void setLocationConstraints(LocationConstraint locationConstraints) {
- this.locationConstraints = locationConstraints;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/VnfScaleInfo.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/VnfScaleInfo.java
deleted file mode 100644
index e702edc821..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/VnfScaleInfo.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import javax.validation.constraints.NotNull;
-
-public class VnfScaleInfo {
- @NotNull
- private String aspectlId;
- @NotNull
- private int scaleLevel;
-
- public String getAspectlId() {
- return aspectlId;
- }
-
- public void setAspectlId(String aspectlId) {
- this.aspectlId = aspectlId;
- }
-
- public int getScaleLevel() {
- return scaleLevel;
- }
-
- public void setScaleLevel(int scaleLevel) {
- this.scaleLevel = scaleLevel;
- }
-
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/VnfVirtualLinkResourceInfo.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/VnfVirtualLinkResourceInfo.java
deleted file mode 100644
index 9f41a383fc..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/VnfVirtualLinkResourceInfo.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import javax.validation.constraints.NotNull;
-import java.util.List;
-import java.util.Map;
-
-public class VnfVirtualLinkResourceInfo {
- @NotNull
- private String id;
- @NotNull
- private String virtualLinkDescId;
- @NotNull
- private ResourceHandle networkResource;
- private String reservationId;
- private List<VnfLinkPortInfo> vnfLinkPorts;
- Map<String, Object> metadata;
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public String getVirtualLinkDescId() {
- return virtualLinkDescId;
- }
-
- public void setVirtualLinkDescId(String virtualLinkDescId) {
- this.virtualLinkDescId = virtualLinkDescId;
- }
-
- public ResourceHandle getNetworkResource() {
- return networkResource;
- }
-
- public void setNetworkResource(ResourceHandle networkResource) {
- this.networkResource = networkResource;
- }
-
- public String getReservationId() {
- return reservationId;
- }
-
- public void setReservationId(String reservationId) {
- this.reservationId = reservationId;
- }
-
- public List<VnfLinkPortInfo> getVnfLinkPorts() {
- return vnfLinkPorts;
- }
-
- public void setVnfLinkPorts(List<VnfLinkPortInfo> vnfLinkPorts) {
- this.vnfLinkPorts = vnfLinkPorts;
- }
-
- public Map<String, Object> getMetadata() {
- return metadata;
- }
-
- public void setMetadata(Map<String, Object> metadata) {
- this.metadata = metadata;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/VnfcCpInfo.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/VnfcCpInfo.java
deleted file mode 100644
index ec629effd2..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/VnfcCpInfo.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import javax.validation.constraints.NotNull;
-import java.util.List;
-
-public class VnfcCpInfo {
- @NotNull
- private String id;
- @NotNull
- private String cpdId;
- private String vnfExtCpId;
- private List<CpProtocolInfo> cpProtocolInfo;
- private String vnfLinkPortId;
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public String getCpdId() {
- return cpdId;
- }
-
- public void setCpdId(String cpdId) {
- this.cpdId = cpdId;
- }
-
- public String getVnfExtCpId() {
- return vnfExtCpId;
- }
-
- public void setVnfExtCpId(String vnfExtCpId) {
- this.vnfExtCpId = vnfExtCpId;
- }
-
- public List<CpProtocolInfo> getCpProtocolInfo() {
- return cpProtocolInfo;
- }
-
- public void setCpProtocolInfo(List<CpProtocolInfo> cpProtocolInfo) {
- this.cpProtocolInfo = cpProtocolInfo;
- }
-
- public String getVnfLinkPortId() {
- return vnfLinkPortId;
- }
-
- public void setVnfLinkPortId(String vnfLinkPortId) {
- this.vnfLinkPortId = vnfLinkPortId;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/VnfcResourceInfo.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/VnfcResourceInfo.java
deleted file mode 100644
index 1f7aa67b8d..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/VnfcResourceInfo.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import javax.validation.constraints.NotNull;
-import java.util.List;
-import java.util.Map;
-
-public class VnfcResourceInfo {
- @NotNull
- private String id;
- @NotNull
- private String vduId;
- @NotNull
- private ResourceHandle computeResource;
- private List<String> storageResourceIds;
- private String reservationId;
- private List<VnfcCpInfo> vnfcCpInfo;
- private Map<String, Object> metadata;
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public String getVduId() {
- return vduId;
- }
-
- public void setVduId(String vduId) {
- this.vduId = vduId;
- }
-
- public ResourceHandle getComputeResource() {
- return computeResource;
- }
-
- public void setComputeResource(ResourceHandle computeResource) {
- this.computeResource = computeResource;
- }
-
- public List<String> getStorageResourceIds() {
- return storageResourceIds;
- }
-
- public void setStorageResourceIds(List<String> storageResourceIds) {
- this.storageResourceIds = storageResourceIds;
- }
-
- public String getReservationId() {
- return reservationId;
- }
-
- public void setReservationId(String reservationId) {
- this.reservationId = reservationId;
- }
-
- public List<VnfcCpInfo> getVnfcCpInfo() {
- return vnfcCpInfo;
- }
-
- public void setVnfcCpInfo(List<VnfcCpInfo> vnfcCpInfo) {
- this.vnfcCpInfo = vnfcCpInfo;
- }
-
- public Map<String, Object> getMetadata() {
- return metadata;
- }
-
- public void setMetadata(Map<String, Object> metadata) {
- this.metadata = metadata;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/VnffgInfo.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/VnffgInfo.java
deleted file mode 100644
index c02d5177db..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/model/VnffgInfo.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import javax.validation.constraints.NotNull;
-import java.util.List;
-
-public class VnffgInfo {
- @NotNull
- private String id;
- @NotNull
- private String vnffgdId;
- @NotNull
- private List<String> vnfInstanceId;
- private String pnfInfoId;
- @NotNull
- private List<String> nsVirtualLinkInfoId;
- @NotNull
- private List<NsCpHandle> nsCpHandle;
- @NotNull
- private List<NfpInfo> nfpInfo;
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public String getVnffgdId() {
- return vnffgdId;
- }
-
- public void setVnffgdId(String vnffgdId) {
- this.vnffgdId = vnffgdId;
- }
-
- public List<String> getVnfInstanceId() {
- return vnfInstanceId;
- }
-
- public void setVnfInstanceId(List<String> vnfInstanceId) {
- this.vnfInstanceId = vnfInstanceId;
- }
-
- public String getPnfInfoId() {
- return pnfInfoId;
- }
-
- public void setPnfInfoId(String pnfInfoId) {
- this.pnfInfoId = pnfInfoId;
- }
-
- public List<String> getNsVirtualLinkInfoId() {
- return nsVirtualLinkInfoId;
- }
-
- public void setNsVirtualLinkInfoId(List<String> nsVirtualLinkInfoId) {
- this.nsVirtualLinkInfoId = nsVirtualLinkInfoId;
- }
-
- public List<NsCpHandle> getNsCpHandle() {
- return nsCpHandle;
- }
-
- public void setNsCpHandle(List<NsCpHandle> nsCpHandle) {
- this.nsCpHandle = nsCpHandle;
- }
-
- public List<NfpInfo> getNfpInfo() {
- return nfpInfo;
- }
-
- public void setNfpInfo(List<NfpInfo> nfpInfo) {
- this.nfpInfo = nfpInfo;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/rest/AaiUtil.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/rest/AaiUtil.java
deleted file mode 100644
index 7f81dfbdaf..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/rest/AaiUtil.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.vfc.rest;
-
-import org.onap.so.adapters.vfc.model.RestfulResponse;
-
-/**
- * Implement class of operating aai database table <br>
- * <p>
- * </p>
- *
- * @author
- * @version ONAP Amsterdam Release 2017-08-28
- */
-public class AaiUtil {
-
- public static RestfulResponse addRelation(String globalSubsriberId, String serviceType, String serviceInstanceId,
- String resourceInstanceId) {
- // sent rest to aai to add relation for service and ns.
-
- return null;
- }
-
- public static RestfulResponse removeRelation(String globalSubsriberId, String serviceType, String serviceInstanceId,
- String resourceInstanceId) {
- // sent rest to aai to remove relation between service an ns.
- return null;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/rest/HealthCheckHandler.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/rest/HealthCheckHandler.java
deleted file mode 100644
index 2dcdf11316..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/rest/HealthCheckHandler.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Modifications Copyright (c) 2019 Samsung
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.vfc.rest;
-
-import javax.ws.rs.HEAD;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Response;
-import org.apache.http.HttpStatus;
-import org.springframework.stereotype.Component;
-
-/**
- * Health Check <br>
- * <p>
- * </p>
- *
- * @author
- * @version ONAP Amsterdam Release 2017-08-28
- */
-@Path("/")
-@Component
-public class HealthCheckHandler {
-
-
- private static final String CHECK_HTML =
- "<!DOCTYPE html><html><head><meta charset=\"ISO-8859-1\"><title>Health Check</title></head><body>Application ready</body></html>";
-
- public static final Response HEALTH_CHECK_RESPONSE = Response.status(HttpStatus.SC_OK).entity(CHECK_HTML).build();
-
- @HEAD
- @Path("/healthcheck")
- @Produces("text/html")
- public Response healthcheck(@QueryParam("requestId") String requestId) {
- return HEALTH_CHECK_RESPONSE;
- }
-
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/rest/VfcAdapterRest.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/rest/VfcAdapterRest.java
deleted file mode 100644
index 5a89c04a5a..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/rest/VfcAdapterRest.java
+++ /dev/null
@@ -1,265 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Modifications Copyright (C) 2018 IBM.
- * Modifications Copyright (c) 2019 Samsung
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.vfc.rest;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import org.onap.so.adapters.vfc.exceptions.ApplicationException;
-import org.onap.so.adapters.vfc.model.NSResourceInputParameter;
-import org.onap.so.adapters.vfc.model.NsOperationKey;
-import org.onap.so.adapters.vfc.model.RestfulResponse;
-import org.onap.so.adapters.vfc.util.JsonUtil;
-import org.onap.so.adapters.vfc.util.ValidateUtil;
-import org.onap.so.db.request.beans.InstanceNfvoMapping;
-import org.onap.so.db.request.data.repository.InstanceNfvoMappingRepository;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-/**
- * The rest class for VF-c Adapter <br>
- * <p>
- * </p>
- *
- * @author
- * @version ONAP Amsterdam Release 2017-08-28
- */
-@Component
-@Path("/v1/vfcadapter")
-public class VfcAdapterRest {
-
- private static final Logger logger = LoggerFactory.getLogger(VfcAdapterRest.class);
- private static final String REQUEST_DEBUG_MSG = "body from request is {}";
- private static final String APPLICATION_EXCEPTION = "ApplicationException: ";
- @Autowired
- private VfcManagerSol005 vfcManagerSol005;
-
- @Autowired
- private VfcManager driverMgr;
- @Autowired
- private InstanceNfvoMappingRepository instanceNfvoMappingRepository;
-
- public VfcAdapterRest() {
-
- }
-
- /**
- * Create a NS <br>
- *
- * @param data http request
- * @return
- * @since ONAP Amsterdam Release
- */
- @POST
- @Path("/ns")
- @Consumes({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
- @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
- public Response createNfvoNs(String data) {
- try {
- ValidateUtil.assertObjectNotNull(data);
- logger.debug(REQUEST_DEBUG_MSG + data);
- NSResourceInputParameter nsInput = JsonUtil.unMarshal(data, NSResourceInputParameter.class);
- RestfulResponse rsp;
- if (nsInput.getNsParameters().getAdditionalParamForNs().containsKey("isSol005Interface")) {
- rsp = vfcManagerSol005.createNs(nsInput);
- } else {
- rsp = driverMgr.createNs(nsInput);
- }
-
- return buildResponse(rsp);
- } catch (ApplicationException e) {
- logger.debug(APPLICATION_EXCEPTION, e);
- return e.buildErrorResponse();
- }
- }
-
- /**
- * Delete NS instance<br>
- *
- * @param data The http request
- * @param nsInstanceId The NS instance id
- * @return response
- * @since ONAP Amsterdam Release
- */
- @DELETE
- @Path("/ns/{nsInstanceId}")
- @Consumes({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
- @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
- public Response deleteNfvoNs(String data, @PathParam("nsInstanceId") String nsInstanceId) {
- try {
-
- ValidateUtil.assertObjectNotNull(data);
- logger.debug(REQUEST_DEBUG_MSG + data);
- NsOperationKey nsOperationKey = JsonUtil.unMarshal(data, NsOperationKey.class);
- RestfulResponse rsp;
- InstanceNfvoMapping instanceNfvoMapping = instanceNfvoMappingRepository.findOneByInstanceId(nsInstanceId);
- if (instanceNfvoMapping != null) {
- rsp = vfcManagerSol005.deleteNs(nsOperationKey, nsInstanceId);
- } else {
- rsp = driverMgr.deleteNs(nsOperationKey, nsInstanceId);
- }
- return buildResponse(rsp);
- } catch (ApplicationException e) {
- logger.debug(APPLICATION_EXCEPTION, e);
- return e.buildErrorResponse();
- }
- }
-
- /**
- * Query Operation job status <br>
- *
- * @param data The Http Request
- * @param jobId The job id
- * @return
- * @since ONAP Amsterdam Release
- */
- @POST
- @Path("/jobs/{jobId}")
- @Consumes({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
- @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
- public Response queryNfvoJobStatus(String data, @PathParam("jobId") String jobId) {
- try {
- ValidateUtil.assertObjectNotNull(data);
- logger.debug(REQUEST_DEBUG_MSG + data);
- NsOperationKey nsOperationKey = JsonUtil.unMarshal(data, NsOperationKey.class);
- RestfulResponse rsp;
- InstanceNfvoMapping instanceNfvoMapping = instanceNfvoMappingRepository.findOneByJobId(jobId);
- if (instanceNfvoMapping != null) {
- rsp = vfcManagerSol005.getNsProgress(nsOperationKey, jobId);
- } else {
- rsp = driverMgr.getNsProgress(nsOperationKey, jobId);
- }
- return buildResponse(rsp);
- } catch (ApplicationException e) {
- logger.debug(APPLICATION_EXCEPTION, e);
- return e.buildErrorResponse();
- }
- }
-
- /**
- * Instantiate NS instance <br>
- *
- * @param data The http request
- * @param nsInstanceId The NS instance id
- * @return
- * @since ONAP Amsterdam Release
- */
- @POST
- @Path("/ns/{nsInstanceId}/instantiate")
- @Consumes({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
- @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
- public Response instantiateNfvoNs(String data, @PathParam("nsInstanceId") String nsInstanceId) {
- try {
- ValidateUtil.assertObjectNotNull(data);
- logger.debug(REQUEST_DEBUG_MSG + data);
- NSResourceInputParameter nsInput = JsonUtil.unMarshal(data, NSResourceInputParameter.class);
- RestfulResponse rsp;
- if (nsInput.getNsParameters().getAdditionalParamForNs().containsKey("isSol005Interface")) {
- rsp = vfcManagerSol005.instantiateNs(nsInstanceId, nsInput);
- } else {
- rsp = driverMgr.instantiateNs(nsInstanceId, nsInput);
- }
- return buildResponse(rsp);
- } catch (ApplicationException e) {
- logger.debug(APPLICATION_EXCEPTION, e);
- return e.buildErrorResponse();
- }
- }
-
- /**
- * Terminate NS instance <br>
- *
- * @param data The http request
- * @param nsInstanceId The NS instance id
- * @return
- * @since ONAP Amsterdam Release
- */
- @POST
- @Path("/ns/{nsInstanceId}/terminate")
- @Consumes({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
- @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
- public Response terminateNfvoNs(String data, @PathParam("nsInstanceId") String nsInstanceId) {
- try {
- ValidateUtil.assertObjectNotNull(data);
- logger.debug(REQUEST_DEBUG_MSG + data);
- NsOperationKey nsOperationKey = JsonUtil.unMarshal(data, NsOperationKey.class);
- RestfulResponse rsp;
- InstanceNfvoMapping instanceNfvoMapping = instanceNfvoMappingRepository.findOneByInstanceId(nsInstanceId);
- if (instanceNfvoMapping != null) {
- rsp = vfcManagerSol005.terminateNs(nsOperationKey, nsInstanceId);
- } else {
- rsp = driverMgr.terminateNs(nsOperationKey, nsInstanceId);
- }
-
- return buildResponse(rsp);
- } catch (ApplicationException e) {
- logger.debug(APPLICATION_EXCEPTION, e);
- return e.buildErrorResponse();
- }
- }
-
- /**
- * Scale NS instance <br>
- *
- * @param servletReq The http request
- * @param nsInstanceId The NS instance id
- * @return
- * @since ONAP Amsterdam Release
- */
- @POST
- @Path("/ns/{nsInstanceId}/scale")
- @Consumes({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
- @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
- public Response scaleNfvoNs(String data, @PathParam("nsInstanceId") String nsInstanceId) {
- try {
- ValidateUtil.assertObjectNotNull(data);
- logger.debug("Scale Ns Request Received.Body from request is {}" + data);
- NSResourceInputParameter nsInput = JsonUtil.unMarshal(data, NSResourceInputParameter.class);
- RestfulResponse rsp = driverMgr.scaleNs(nsInstanceId, nsInput);
- return buildResponse(rsp);
- } catch (ApplicationException e) {
- logger.debug(APPLICATION_EXCEPTION, e);
- return e.buildErrorResponse();
- }
- }
-
-
- /**
- * build response from restful response <br>
- *
- * @param rsp general response object
- * @return
- * @since ONAP Amsterdam Release
- */
- private Response buildResponse(RestfulResponse rsp) {
- return Response.status(rsp.getStatus()).entity(rsp.getResponseContent()).build();
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/rest/VfcManager.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/rest/VfcManager.java
deleted file mode 100644
index b817b5bf9a..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/rest/VfcManager.java
+++ /dev/null
@@ -1,492 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.vfc.rest;
-
-import java.util.HashMap;
-import java.util.Map;
-import org.onap.so.adapters.vfc.constant.CommonConstant;
-import org.onap.so.adapters.vfc.constant.CommonConstant.Step;
-import org.onap.so.adapters.vfc.constant.DriverExceptionID;
-import org.onap.so.adapters.vfc.constant.HttpCode;
-import org.onap.so.adapters.vfc.exceptions.ApplicationException;
-import org.onap.so.adapters.vfc.model.CustomerModel;
-import org.onap.so.adapters.vfc.model.NSResourceInputParameter;
-import org.onap.so.adapters.vfc.model.NsCreateReq;
-import org.onap.so.adapters.vfc.model.NsInstantiateReq;
-import org.onap.so.adapters.vfc.model.NsOperationKey;
-import org.onap.so.adapters.vfc.model.NsParameters;
-import org.onap.so.adapters.vfc.model.NsProgressStatus;
-import org.onap.so.adapters.vfc.model.NsScaleParameters;
-import org.onap.so.adapters.vfc.model.ResponseDescriptor;
-import org.onap.so.adapters.vfc.model.RestfulResponse;
-import org.onap.so.adapters.vfc.model.VFCScaleData;
-import org.onap.so.adapters.vfc.util.JsonUtil;
-import org.onap.so.adapters.vfc.util.RestfulUtil;
-import org.onap.so.adapters.vfc.util.ValidateUtil;
-import org.onap.so.db.request.beans.ResourceOperationStatus;
-import org.onap.so.db.request.data.repository.ResourceOperationStatusRepository;
-import org.onap.so.requestsdb.RequestsDbConstant;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.Primary;
-import org.springframework.data.domain.Example;
-import org.springframework.stereotype.Component;
-
-/**
- * VF-C Manager <br>
- * <p>
- * </p>
- *
- * @author
- * @version ONAP Amsterdam Release 2017-08-28
- */
-@Component
-@Primary
-public class VfcManager {
-
- private static final Logger LOGGER = LoggerFactory.getLogger(VfcManager.class);
-
- /**
- * nfvo url map
- */
- private Map<String, String> nfvoUrlMap;
-
- @Autowired
- private ResourceOperationStatusRepository resourceOperationStatusRepository;
-
- @Autowired
- private RestfulUtil restfulUtil;
-
-
- public VfcManager() {
- nfvoUrlMap = new HashMap<>();
- nfvoUrlMap.put(Step.CREATE, CommonConstant.NFVO_CREATE_URL);
- nfvoUrlMap.put(Step.INSTANTIATE, CommonConstant.NFVO_INSTANTIATE_URL);
- nfvoUrlMap.put(Step.TERMINATE, CommonConstant.NFVO_TERMINATE_URL);
- nfvoUrlMap.put(Step.DELETE, CommonConstant.NFVO_DELETE_URL);
- nfvoUrlMap.put(Step.QUERY, CommonConstant.NFVO_QUERY_URL);
- nfvoUrlMap.put(Step.SCALE, CommonConstant.NFVO_SCALE_URL);
- }
-
- /**
- * create network service <br>
- *
- * @param segInput input parameters for current node from http request
- * @return
- * @since ONAP Amsterdam Release
- */
- public RestfulResponse createNs(NSResourceInputParameter segInput) throws ApplicationException {
-
- // Step1: get service template by node type
- String csarId = segInput.getNsServiceModelUUID();
- // nsdId for NFVO is "id" in the response, while for SDNO is "servcice template id"
- LOGGER.info("serviceTemplateId is {}, id is {}", csarId, csarId);
-
- LOGGER.info("create ns -> begin");
- // Step2: Prepare url and method type
- String url = getUrl(null, CommonConstant.Step.CREATE);
- String methodType = CommonConstant.MethodType.POST;
-
- // Step3: Prepare restful parameters and options
- NsCreateReq oRequest = new NsCreateReq();
- oRequest.setCsarId(csarId);
- oRequest.setNsName(segInput.getNsServiceName());
- oRequest.setDescription(segInput.getNsServiceDescription());
- CustomerModel context = new CustomerModel();
- context.setGlobalCustomerId(segInput.getNsOperationKey().getGlobalSubscriberId());
- context.setServiceType(segInput.getNsOperationKey().getServiceType());
- oRequest.setContext(context);
- String createReq = JsonUtil.marshal(oRequest);
-
- // Step4: Call NFVO or SDNO lcm to create ns
- RestfulResponse createRsp = restfulUtil.send(url, methodType, createReq);
- ValidateUtil.assertObjectNotNull(createRsp);
- LOGGER.info("create ns response status is : {}", createRsp.getStatus());
- LOGGER.info("create ns response content is : {}", createRsp.getResponseContent());
-
- // Step 5: save resource operation information
- ResourceOperationStatus status = new ResourceOperationStatus(segInput.getNsOperationKey().getServiceId(),
- segInput.getNsOperationKey().getOperationId(), segInput.getNsOperationKey().getNodeTemplateUUID());
- status.setStatus(RequestsDbConstant.Status.PROCESSING);
- status = resourceOperationStatusRepository.save(status);
- if (!HttpCode.isSucess(createRsp.getStatus())) {
- LOGGER.error("update segment operation status : fail to create ns");
- status.setProgress("40");
- status.setStatusDescription("NS is created");
- status.setStatus(RequestsDbConstant.Status.ERROR);
- status.setErrorCode(String.valueOf(createRsp.getStatus()));
- resourceOperationStatusRepository.save(status);
- throw new ApplicationException(HttpCode.INTERNAL_SERVER_ERROR, DriverExceptionID.FAIL_TO_CREATE_NS);
- }
- @SuppressWarnings("unchecked")
- Map<String, String> rsp = JsonUtil.unMarshal(createRsp.getResponseContent(), Map.class);
- String nsInstanceId = rsp.get(CommonConstant.NS_INSTANCE_ID);
- if (ValidateUtil.isStrEmpty(nsInstanceId)) {
- LOGGER.error("Invalid instanceId from create operation");
- throw new ApplicationException(HttpCode.INTERNAL_SERVER_ERROR,
- DriverExceptionID.INVALID_RESPONSEE_FROM_CREATE_OPERATION);
- }
- LOGGER.info("create ns -> end");
- LOGGER.info("save segment and operaton info -> begin");
- // Step 6: add relation between service and NS
- AaiUtil.addRelation(segInput.getNsOperationKey().getGlobalSubscriberId(),
- segInput.getNsOperationKey().getServiceType(), segInput.getNsOperationKey().getServiceId(),
- nsInstanceId);
- LOGGER.info("save segment and operation info -> end");
- return createRsp;
- }
-
- /**
- * delete network service <br>
- *
- * @param nsOperationKey The operation key of the NS resource
- * @param nsInstanceId The NS instance id
- * @return
- * @since ONAP Amsterdam Release
- */
- public RestfulResponse deleteNs(NsOperationKey nsOperationKey, String nsInstanceId) throws ApplicationException {
- LOGGER.info("delete ns -> begin");
- // Step1: prepare url and methodType
- String url = getUrl(nsInstanceId, CommonConstant.Step.DELETE);
- String methodType = CommonConstant.MethodType.DELETE;
-
- // Step2: prepare restful parameters and options
- RestfulResponse deleteRsp = restfulUtil.send(url, methodType, "");
- ValidateUtil.assertObjectNotNull(deleteRsp);
- LOGGER.info("delete ns response status is : {}", deleteRsp.getStatus());
- LOGGER.info("delete ns response content is : {}", deleteRsp.getResponseContent());
- LOGGER.info("delete ns -> end");
-
- ResourceOperationStatus status = new ResourceOperationStatus(nsOperationKey.getServiceId(),
- nsOperationKey.getOperationId(), nsOperationKey.getNodeTemplateUUID());
- if (!HttpCode.isSucess(deleteRsp.getStatus())) {
- LOGGER.error("fail to delete ns");
-
- status.setStatus(RequestsDbConstant.Status.ERROR);
- status.setErrorCode(String.valueOf(deleteRsp.getStatus()));
- status.setStatusDescription(CommonConstant.StatusDesc.TERMINATE_NS_FAILED);
- resourceOperationStatusRepository.save(status);
- throw new ApplicationException(HttpCode.INTERNAL_SERVER_ERROR, DriverExceptionID.FAIL_TO_DELETE_NS);
- }
-
- // Step3: remove relation info between service and ns
- AaiUtil.removeRelation(nsOperationKey.getGlobalSubscriberId(), nsOperationKey.getServiceType(),
- nsOperationKey.getServiceId(), nsInstanceId);
- LOGGER.info("delete segment information -> end");
-
- // Step4: update service segment operation status
- status.setStatus(RequestsDbConstant.Status.FINISHED);
- status.setErrorCode(String.valueOf(deleteRsp.getStatus()));
- status.setProgress("100");
- status.setStatusDescription("VFC resource deletion finished");
- resourceOperationStatusRepository.save(status);
- LOGGER.info("update segment operaton status for delete -> end");
-
- return deleteRsp;
-
- }
-
- /**
- * instantiate network service <br>
- *
- * @param nsInstanceId The NS instance id
- * @param segInput input parameters for current node from http request
- * @return
- * @since ONAP Amsterdam Release
- */
- public RestfulResponse instantiateNs(String nsInstanceId, NSResourceInputParameter segInput)
- throws ApplicationException {
- // Call the NFVO or SDNO service to instantiate service
- LOGGER.info("instantiate ns -> begin");
-
- // Step1: Prepare restful parameters and options
- NsInstantiateReq oRequest = new NsInstantiateReq();
- oRequest.setNsInstanceId(nsInstanceId);
- NsParameters nsParameters = segInput.getNsParameters();
- oRequest.setLocationConstraints(nsParameters.getLocationConstraints());
- oRequest.setAdditionalParamForNs(nsParameters.getAdditionalParamForNs());
- String instReq = JsonUtil.marshal(oRequest);
- // Step2: prepare url and
- String url = getUrl(nsInstanceId, CommonConstant.Step.INSTANTIATE);
- String methodType = CommonConstant.MethodType.POST;
-
- RestfulResponse instRsp = restfulUtil.send(url, methodType, instReq);
- ResourceOperationStatus status = new ResourceOperationStatus(segInput.getNsOperationKey().getServiceId(),
- segInput.getNsOperationKey().getOperationId(), segInput.getNsOperationKey().getNodeTemplateUUID());
- ValidateUtil.assertObjectNotNull(instRsp);
- if (!HttpCode.isSucess(instRsp.getStatus())) {
- LOGGER.error("update segment operation status : fail to instantiate ns");
- status.setStatus(RequestsDbConstant.Status.ERROR);
- status.setErrorCode(String.valueOf(instRsp.getStatus()));
- status.setStatusDescription(CommonConstant.StatusDesc.INSTANTIATE_NS_FAILED);
- resourceOperationStatusRepository.save(status);
- throw new ApplicationException(HttpCode.INTERNAL_SERVER_ERROR, DriverExceptionID.FAIL_TO_INSTANTIATE_NS);
- }
- LOGGER.info("instantiate ns response status is : {}", instRsp.getStatus());
- LOGGER.info("instantiate ns response content is : {}", instRsp.getResponseContent());
- ValidateUtil.assertObjectNotNull(instRsp.getResponseContent());
- @SuppressWarnings("unchecked")
- Map<String, String> rsp = JsonUtil.unMarshal(instRsp.getResponseContent(), Map.class);
- String jobId = rsp.get(CommonConstant.JOB_ID);
- if (ValidateUtil.isStrEmpty(jobId)) {
- LOGGER.error("Invalid jobId from instantiate operation");
- status.setStatus(RequestsDbConstant.Status.ERROR);
- status.setErrorCode(String.valueOf(instRsp.getStatus()));
- status.setStatusDescription(CommonConstant.StatusDesc.INSTANTIATE_NS_FAILED);
- resourceOperationStatusRepository.save(status);
- throw new ApplicationException(HttpCode.INTERNAL_SERVER_ERROR,
- DriverExceptionID.INVALID_RESPONSE_FROM_INSTANTIATE_OPERATION);
- }
- LOGGER.info("instantiate ns -> end");
- // Step 3: update segment operation job id
- LOGGER.info("update resource operation status job id -> begin");
- status.setJobId(jobId);
- status.setProgress("100");
- status.setStatusDescription("NS initiation completed.");
- resourceOperationStatusRepository.save(status);
- LOGGER.info("update segment operation job id -> end");
-
- return instRsp;
- }
-
- /**
- * terminate network service <br>
- *
- * @param nsOperationKey The operation key for NS resource
- * @param nsInstanceId The NS instance id
- * @return
- * @since ONAP Amsterdam Release
- */
- public RestfulResponse terminateNs(NsOperationKey nsOperationKey, String nsInstanceId) throws ApplicationException {
- // Step1: save segment operation info for delete process
- LOGGER.info("save segment operation for delete process");
- ResourceOperationStatus status = new ResourceOperationStatus(nsOperationKey.getServiceId(),
- nsOperationKey.getOperationId(), nsOperationKey.getNodeTemplateUUID());
- status.setStatus(RequestsDbConstant.Status.PROCESSING);
- resourceOperationStatusRepository.save(status);
-
- LOGGER.info("terminate ns -> begin");
- // Step2: prepare url and method type
- String url = getUrl(nsInstanceId, CommonConstant.Step.TERMINATE);
- String methodType = CommonConstant.MethodType.POST;
-
- // Step3: prepare restful parameters and options
- Map<String, String> reqBody = new HashMap<>();
- reqBody.put("nsInstanceId", nsInstanceId);
- reqBody.put("terminationType", "graceful");
- reqBody.put("gracefulTerminationTimeout", "60");
-
- // Step4: Call the NFVO or SDNO service to terminate service
- RestfulResponse terminateRsp = restfulUtil.send(url, methodType, JsonUtil.marshal(reqBody));
- ValidateUtil.assertObjectNotNull(terminateRsp);
- LOGGER.info("terminate ns response status is : {}", terminateRsp.getStatus());
- LOGGER.info("terminate ns response content is : {}", terminateRsp.getResponseContent());
- // Step 3: update segment operation
- if (!HttpCode.isSucess(terminateRsp.getStatus())) {
- LOGGER.error("fail to instantiate ns");
- status.setStatus(RequestsDbConstant.Status.ERROR);
- status.setErrorCode(String.valueOf(terminateRsp.getStatus()));
- status.setStatusDescription(CommonConstant.StatusDesc.TERMINATE_NS_FAILED);
- resourceOperationStatusRepository.save(status);
-
- throw new ApplicationException(HttpCode.INTERNAL_SERVER_ERROR, DriverExceptionID.FAIL_TO_TERMINATE_NS);
- }
- @SuppressWarnings("unchecked")
- Map<String, String> rsp = JsonUtil.unMarshal(terminateRsp.getResponseContent(), Map.class);
- String jobId = rsp.get(CommonConstant.JOB_ID);
- if (ValidateUtil.isStrEmpty(jobId)) {
- LOGGER.error("Invalid jobId from terminate operation");
- status.setStatus(RequestsDbConstant.Status.ERROR);
- status.setErrorCode(String.valueOf(terminateRsp.getStatus()));
- status.setStatusDescription(CommonConstant.StatusDesc.TERMINATE_NS_FAILED);
- resourceOperationStatusRepository.save(status);
- throw new ApplicationException(HttpCode.INTERNAL_SERVER_ERROR,
- DriverExceptionID.INVALID_RESPONSE_FROM_TERMINATE_OPERATION);
- }
- LOGGER.info("terminate ns -> end");
-
- LOGGER.info("update segment job id -> begin");
- status.setProgress("60");
- status.setStatusDescription("NS is termination completed");
- status.setJobId(jobId);
- resourceOperationStatusRepository.save(status);
- LOGGER.info("update segment job id -> end");
-
- return terminateRsp;
- }
-
- /**
- * get ns progress by job Id <br>
- *
- * @param nsOperationKey The OperationKey for NS resource
- * @param jobId the job id
- * @return
- * @since ONAP Amsterdam Release
- */
- public RestfulResponse getNsProgress(NsOperationKey nsOperationKey, String jobId) throws ApplicationException {
-
- ValidateUtil.assertObjectNotNull(jobId);
- // Step 1: query the current resource operation status
- ResourceOperationStatus status = new ResourceOperationStatus(nsOperationKey.getServiceId(),
- nsOperationKey.getOperationId(), nsOperationKey.getNodeTemplateUUID());
- status = resourceOperationStatusRepository.findOne(Example.of(status))
- .orElseThrow(() -> new ApplicationException(404, "Cannot Find Operation Status"));
- // Step 2: start query
- LOGGER.info("query ns status -> begin");
- String url = getUrl(jobId, CommonConstant.Step.QUERY);
- String methodType = CommonConstant.MethodType.GET;
- // prepare restful parameters and options
- RestfulResponse rsp = restfulUtil.send(url, methodType, "");
- ValidateUtil.assertObjectNotNull(rsp);
- LOGGER.info("query ns progress response status is : {}", rsp.getStatus());
- LOGGER.info("query ns progress response content is : {}", rsp.getResponseContent());
- // Step 3:check the response staus
- if (!HttpCode.isSucess(rsp.getStatus())) {
- LOGGER.info("fail to query job status");
- status.setErrorCode(String.valueOf(rsp.getStatus()));
- status.setStatus(RequestsDbConstant.Status.ERROR);
- status.setStatusDescription(CommonConstant.StatusDesc.QUERY_JOB_STATUS_FAILED);
- resourceOperationStatusRepository.save(status);
- throw new ApplicationException(HttpCode.INTERNAL_SERVER_ERROR, DriverExceptionID.FAIL_TO_QUERY_JOB_STATUS);
- }
- // Step 4: Process Network Service Instantiate Response
- NsProgressStatus nsProgress = JsonUtil.unMarshal(rsp.getResponseContent(), NsProgressStatus.class);
- ResponseDescriptor rspDesc = nsProgress.getResponseDescriptor();
- // Step 5: update segment operation progress
-
- status.setProgress(rspDesc.getProgress());
- status.setStatusDescription(rspDesc.getStatusDescription());
- resourceOperationStatusRepository.save(status);
-
- // Step 6: update segment operation status
- if (RequestsDbConstant.Progress.ONE_HUNDRED.equals(rspDesc.getProgress())
- && RequestsDbConstant.Status.FINISHED.equals(rspDesc.getStatus())) {
- LOGGER.info("job result is succeeded, operType is {}", status.getOperType());
- status.setErrorCode(String.valueOf(rsp.getStatus()));
- status.setStatusDescription(CommonConstant.StatusDesc.QUERY_JOB_STATUS_FAILED);
-
- if (RequestsDbConstant.OperationType.CREATE.equalsIgnoreCase(status.getOperType())
- || "createInstance".equalsIgnoreCase(status.getOperType())) {
- status.setStatus(RequestsDbConstant.Status.FINISHED);
- }
- resourceOperationStatusRepository.save(status);
- } else if (RequestsDbConstant.Status.ERROR.equals(rspDesc.getStatus())) {
- LOGGER.error("job result is failed, operType is {}", status.getOperType());
- status.setErrorCode(String.valueOf(rsp.getStatus()));
- status.setStatusDescription(CommonConstant.StatusDesc.QUERY_JOB_STATUS_FAILED);
- status.setStatus(RequestsDbConstant.Status.ERROR);
- resourceOperationStatusRepository.save(status);
- throw new ApplicationException(HttpCode.INTERNAL_SERVER_ERROR, DriverExceptionID.JOB_STATUS_ERROR);
- } else {
- LOGGER.error("unexcepted response status");
- }
- LOGGER.info("query ns status -> end");
-
- return rsp;
- }
-
- /**
- * Scale NS instance <br>
- *
- * @param nsInstanceId The NS instance id
- * @param segInput input parameters for current node from http request
- * @return
- * @since ONAP Amsterdam Release
- */
- public RestfulResponse scaleNs(String nsInstanceId, NSResourceInputParameter segInput) throws ApplicationException {
- // Call the NFVO to scale service
- LOGGER.info("scale ns -> begin");
-
- // Step1: Prepare restful parameters and options
- VFCScaleData oRequest = new VFCScaleData();
- oRequest.setNsInstanceId(nsInstanceId);
- NsScaleParameters nsScaleParameters = segInput.getNsScaleParameters();
- oRequest.setScaleType(nsScaleParameters.getScaleType());
- oRequest.setScaleNsData(nsScaleParameters.getScaleNsByStepsData());
- String scaleReq = JsonUtil.marshal(oRequest);
-
- // Step2: prepare url and method type
- String url = getUrl(nsInstanceId, CommonConstant.Step.SCALE);
- String methodType = CommonConstant.MethodType.POST;
- LOGGER.info("scale ns request is {}", scaleReq);
- // Step3: Call NFVO lcm to scale ns
- RestfulResponse scaleRsp = restfulUtil.send(url, methodType, scaleReq);
-
- ResourceOperationStatus status = new ResourceOperationStatus(segInput.getNsOperationKey().getServiceId(),
- segInput.getNsOperationKey().getOperationId(), segInput.getNsOperationKey().getNodeTemplateUUID());
- ResourceOperationStatus nsOperInfo = resourceOperationStatusRepository.findOne(Example.of(status))
- .orElseThrow(() -> new ApplicationException(404, "Cannot Find Operation Status"));
- ValidateUtil.assertObjectNotNull(scaleRsp);
- if (!HttpCode.isSucess(scaleRsp.getStatus())) {
- LOGGER.error("update segment operation status : fail to scale ns");
- nsOperInfo.setStatus(RequestsDbConstant.Status.ERROR);
- nsOperInfo.setErrorCode(String.valueOf(scaleRsp.getStatus()));
- nsOperInfo.setStatusDescription(CommonConstant.StatusDesc.SCALE_NS_FAILED);
- resourceOperationStatusRepository.save(nsOperInfo);
- throw new ApplicationException(HttpCode.INTERNAL_SERVER_ERROR, DriverExceptionID.FAIL_TO_SCALE_NS);
- }
- LOGGER.info("scale ns response status is {}", scaleRsp.getStatus());
- LOGGER.info("scale ns response content is {}", scaleRsp.getResponseContent());
-
- ValidateUtil.assertObjectNotNull(scaleRsp.getResponseContent());
- @SuppressWarnings("unchecked")
- Map<String, String> rsp = JsonUtil.unMarshal(scaleRsp.getResponseContent(), Map.class);
- String jobId = rsp.get(CommonConstant.JOB_ID);
- if (ValidateUtil.isStrEmpty(jobId)) {
- LOGGER.error("Invalid jobId from scale operation");
- nsOperInfo.setStatus(RequestsDbConstant.Status.ERROR);
- nsOperInfo.setErrorCode(String.valueOf(scaleRsp.getStatus()));
- nsOperInfo.setStatusDescription(CommonConstant.StatusDesc.SCALE_NS_FAILED);
- resourceOperationStatusRepository.save(nsOperInfo);
- throw new ApplicationException(HttpCode.INTERNAL_SERVER_ERROR,
- DriverExceptionID.INVALID_RESPONSE_FROM_SCALE_OPERATION);
- }
-
- LOGGER.info("update resource operation status job id -> begin");
- // Step 4: update segment operation job id
- nsOperInfo.setJobId(jobId);
- resourceOperationStatusRepository.save(nsOperInfo);
- LOGGER.info("update segment operation job id -> end");
- LOGGER.info("scale ns -> end");
-
- return scaleRsp;
- }
-
- /**
- * get url for the operation <br>
- *
- * @param variable variable should be put in the url
- * @param step step of the operation (terminate,query,delete)
- * @return
- * @since ONAP Amsterdam Release
- */
- private String getUrl(String variable, String step) {
-
- String url;
- String originalUrl;
- originalUrl = nfvoUrlMap.get(step);
- url = String.format(originalUrl, variable);
- return url;
-
- }
-
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/rest/VfcManagerSol005.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/rest/VfcManagerSol005.java
deleted file mode 100644
index 9033becf8a..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/rest/VfcManagerSol005.java
+++ /dev/null
@@ -1,620 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.rest;
-
-import java.time.LocalDateTime;
-import java.util.*;
-import org.onap.so.adapters.vfc.constant.CommonConstant;
-import org.onap.so.adapters.vfc.constant.CommonConstant.Step;
-import org.onap.so.adapters.vfc.constant.DriverExceptionID;
-import org.onap.so.adapters.vfc.constant.HttpCode;
-import org.onap.so.adapters.vfc.exceptions.ApplicationException;
-import org.onap.so.adapters.vfc.model.*;
-import org.onap.so.adapters.vfc.util.JsonUtil;
-import org.onap.so.adapters.vfc.util.RestfulUtil;
-import org.onap.so.adapters.vfc.util.ValidateUtil;
-import org.onap.so.db.request.beans.InstanceNfvoMapping;
-import org.onap.so.db.request.beans.OperationStatus;
-import org.onap.so.db.request.beans.ResourceOperationStatus;
-import org.onap.so.db.request.data.repository.InstanceNfvoMappingRepository;
-import org.onap.so.db.request.data.repository.OperationStatusRepository;
-import org.onap.so.db.request.data.repository.ResourceOperationStatusRepository;
-import org.onap.so.requestsdb.RequestsDbConstant;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.Primary;
-import org.springframework.data.domain.Example;
-import org.springframework.stereotype.Component;
-
-/**
- * VF-C Manager <br>
- * <p>
- * </p>
- *
- * @author
- * @version ONAP Amsterdam Release 2017-08-28
- */
-@Component
-@Primary
-public class VfcManagerSol005 {
-
- private static final Logger LOGGER = LoggerFactory.getLogger(VfcManagerSol005.class);
-
- /**
- * nfvo url map
- */
- private Map<String, String> nfvoUrlMap;
-
- @Autowired
- private ResourceOperationStatusRepository resourceOperationStatusRepository;
-
- @Autowired
- private RestfulUtil restfulUtil;
-
- @Autowired
- private OperationStatusRepository operationStatusRepository;
-
- @Autowired
- private InstanceNfvoMappingRepository instanceNfvoMappingRepository;
-
- private InstanceNfvoMapping instanceNfvoMapping = new InstanceNfvoMapping();
-
- public VfcManagerSol005() {
- nfvoUrlMap = new HashMap<>();
- nfvoUrlMap.put(Step.CREATE, CommonConstant.SOL005_NFVO_CREATE_URL);
- nfvoUrlMap.put(Step.INSTANTIATE, CommonConstant.SOL005_NFVO_INSTANTIATE_URL);
- nfvoUrlMap.put(Step.TERMINATE, CommonConstant.SOL005_NFVO_TERMINATE_URL);
- nfvoUrlMap.put(Step.DELETE, CommonConstant.SOL005_NFVO_DELETE_URL);
- nfvoUrlMap.put(Step.QUERY, CommonConstant.SOL005_NFVO_QUERY_URL);
- nfvoUrlMap.put(Step.SCALE, CommonConstant.NFVO_SCALE_URL);
- }
-
- /**
- * create network service <br>
- *
- * @param segInput input parameters for current node from http request
- * @return
- * @since ONAP Dubilin Release
- */
- public RestfulResponse createNs(NSResourceInputParameter segInput) throws ApplicationException {
-
- Map<String, String> nfvoDetails;
- // Step1: get service template by node type
- String nsdId = segInput.getNsServiceModelUUID();
- // nsdId for NFVO is "id" in the response, while for SDNO is "servcice template id"
- LOGGER.info("serviceTemplateId is {}, id is {}", nsdId, nsdId);
-
-
- LOGGER.info("SOL005 create ns -> begin");
- // Step2: Prepare url and method type
- String url = getUrl(null, CommonConstant.Step.CREATE);
- String methodType = CommonConstant.MethodType.POST;
-
- // Step3: Prepare restful parameters and options
- CreateNsRequest createNsRequest = new CreateNsRequest();
- createNsRequest.setNsDescription(segInput.getNsServiceDescription());
- createNsRequest.setNsdId(segInput.getNsServiceModelUUID());
- createNsRequest.setNsName(segInput.getNsServiceName());
-
- String createReq = JsonUtil.marshal(createNsRequest);
- RestfulResponse aaiRestfulResponse = null;
- NsParameters nsParameters = segInput.getNsParameters();
- if (nsParameters.getAdditionalParamForNs().containsKey("orchestrator")) {
- if (nsParameters.getAdditionalParamForNs().get("orchestrator") != null) {
- String nfvo = nsParameters.getAdditionalParamForNs().get("nfvo").toString();
- aaiRestfulResponse = restfulUtil.getNfvoFromAAI(nfvo);
- nfvoDetails = JsonUtil.unMarshal(aaiRestfulResponse.getResponseContent(), Map.class);
- url = nfvoDetails.get("url") + nfvoDetails.get("api-root") + url;
-
- }
- } else {
- LOGGER.error("Nfvo not present in AAI");
- throw new ApplicationException(HttpCode.INTERNAL_SERVER_ERROR, DriverExceptionID.FAIL_TO_CREATE_NS);
- }
-
-
- // Prepare request header for createNs request.
- Map<String, String> requestHeader = new HashMap<>();
- requestHeader.put("GLOBALCUSTOMERID", segInput.getNsOperationKey().getGlobalSubscriberId());
- requestHeader.put("SERVICETYPE", segInput.getNsOperationKey().getServiceType());
-
- // Step4: Call NFVO or SDNO lcm to create ns
- LOGGER.info("Request Payload for CreateNs: " + createReq);
-
- RestfulResponse createRsp = restfulUtil.send(url, methodType, createReq, requestHeader);
- ValidateUtil.assertObjectNotNull(createRsp);
- LOGGER.info("create ns response status is : {}", createRsp.getStatus());
- LOGGER.info("create ns response content is : {}", createRsp.getResponseContent());
-
- // Step 5: save resource operation information
- ResourceOperationStatus status = new ResourceOperationStatus(segInput.getNsOperationKey().getServiceId(),
- segInput.getNsOperationKey().getOperationId(), segInput.getNsOperationKey().getNodeTemplateUUID());
- status.setStatus(RequestsDbConstant.Status.PROCESSING);
- status = resourceOperationStatusRepository.save(status);
- if (!HttpCode.isSucess(createRsp.getStatus())) {
- LOGGER.error("update segment operation status : fail to create ns");
- status.setProgress("40");
- status.setStatusDescription("NS not created");
- status.setStatus(RequestsDbConstant.Status.ERROR);
- status.setErrorCode(String.valueOf(createRsp.getStatus()));
- resourceOperationStatusRepository.save(status);
- throw new ApplicationException(HttpCode.INTERNAL_SERVER_ERROR, DriverExceptionID.FAIL_TO_CREATE_NS);
- }
- // TODO: Capture all the content of the response. Currently fetching ID value alone.
- // Should be converted into the NsInstance.class
- @SuppressWarnings("unchecked")
- Map<String, String> rsp = JsonUtil.unMarshal(createRsp.getResponseContent(), Map.class);
- String nsInstanceId = rsp.get(CommonConstant.SOL005_NS_INSTANCE_ID);
- if (ValidateUtil.isStrEmpty(nsInstanceId)) {
- LOGGER.error("Invalid instanceId from create operation");
- throw new ApplicationException(HttpCode.INTERNAL_SERVER_ERROR,
- DriverExceptionID.INVALID_RESPONSEE_FROM_CREATE_OPERATION);
- }
-
- nfvoDetails = JsonUtil.unMarshal(aaiRestfulResponse.getResponseContent(), Map.class);
- instanceNfvoMapping.setInstanceId(nsInstanceId);
- instanceNfvoMapping.setPassword(nfvoDetails.get("password"));
- instanceNfvoMapping.setUsername(nfvoDetails.get("userName"));
- instanceNfvoMapping.setNfvoName(nfvoDetails.get("nfvoId"));
- instanceNfvoMapping.setEndpoint(nfvoDetails.get("url"));
- instanceNfvoMapping.setApiRoot(nfvoDetails.get("api-root"));
- instanceNfvoMappingRepository.save(instanceNfvoMapping);
- LOGGER.info("create ns -> end");
- LOGGER.info("save segment and operaton info -> begin");
- // Step 6: add relation between service and NS
- AaiUtil.addRelation(segInput.getNsOperationKey().getGlobalSubscriberId(),
- segInput.getNsOperationKey().getServiceType(), segInput.getNsOperationKey().getServiceId(),
- nsInstanceId);
- LOGGER.info("save segment and operation info -> end");
- return createRsp;
- }
-
- /**
- * delete network service <br>
- *
- * @param nsOperationKey The operation key of the NS resource
- * @param nsInstanceId The NS instance id
- * @return
- * @since ONAP Dublin Release
- */
- public RestfulResponse deleteNs(NsOperationKey nsOperationKey, String nsInstanceId) throws ApplicationException {
- LOGGER.info("SOL005 delete ns -> begin");
- // Step1: prepare url and methodType
- String url = getUrl(nsInstanceId, CommonConstant.Step.DELETE);
- String methodType = CommonConstant.MethodType.DELETE;
-
- // Step2: prepare restful parameters and options
- RestfulResponse deleteRsp = restfulUtil.send(url, methodType, "");
- ValidateUtil.assertObjectNotNull(deleteRsp);
- LOGGER.info("delete ns response status is : {}", deleteRsp.getStatus());
- LOGGER.info("delete ns response content is : {}", deleteRsp.getResponseContent());
- LOGGER.info("delete ns -> end");
-
- ResourceOperationStatus status = new ResourceOperationStatus(nsOperationKey.getServiceId(),
- nsOperationKey.getOperationId(), nsOperationKey.getNodeTemplateUUID());
- if (!HttpCode.isSucess(deleteRsp.getStatus())) {
- LOGGER.error("fail to delete ns");
-
- status.setStatus(RequestsDbConstant.Status.ERROR);
- status.setErrorCode(String.valueOf(deleteRsp.getStatus()));
- status.setStatusDescription(CommonConstant.StatusDesc.TERMINATE_NS_FAILED);
- resourceOperationStatusRepository.save(status);
- throw new ApplicationException(HttpCode.INTERNAL_SERVER_ERROR, DriverExceptionID.FAIL_TO_DELETE_NS);
- }
-
- // Step3: remove relation info between service and ns
- AaiUtil.removeRelation(nsOperationKey.getGlobalSubscriberId(), nsOperationKey.getServiceType(),
- nsOperationKey.getServiceId(), nsInstanceId);
- LOGGER.info("delete segment information -> end");
-
- // Step4: update service segment operation status
- status.setStatus(RequestsDbConstant.Status.FINISHED);
- status.setErrorCode(String.valueOf(deleteRsp.getStatus()));
- status.setProgress("100");
- status.setStatusDescription("VFC resource deletion finished");
- resourceOperationStatusRepository.save(status);
- LOGGER.info("update segment operaton status for delete -> end");
-
- return deleteRsp;
-
- }
-
- /**
- * instantiate network service <br>
- *
- * @param nsInstanceId The NS instance id
- * @param segInput input parameters for current node from http request
- * @return
- * @since ONAP Dublin Release
- */
- public RestfulResponse instantiateNs(String nsInstanceId, NSResourceInputParameter segInput)
- throws ApplicationException {
- // Call the NFVO or SDNO service to instantiate service
- LOGGER.info("SOL005 instantiate ns -> begin");
-
- // Step1: Prepare restful parameters and options
- InstantiateNsRequest instantiateNsRequest = new InstantiateNsRequest();
-
- NsInstantiateReq oRequest = new NsInstantiateReq();
- oRequest.setNsInstanceId(nsInstanceId);
- NsParameters nsParameters = segInput.getNsParameters();
-
- ArrayList<VnfLocationConstraint> vnfLocationConstraints = new ArrayList<VnfLocationConstraint>();
- for (LocationConstraint locationConstraint : nsParameters.getLocationConstraints()) {
- VnfLocationConstraint vnfLocationConstraint = new VnfLocationConstraint();
- vnfLocationConstraint.setVnfProfileId(locationConstraint.getVnfProfileId());
- vnfLocationConstraint.setLocationConstraints(null);
- vnfLocationConstraints.add(vnfLocationConstraint);
-
- }
- instantiateNsRequest.setAditionalParamsForNs(nsParameters.getAdditionalParamForNs());
- // Setting FlavourID which is a mandatory paramater to default
- // as UUI is not sending this parameter to so
- instantiateNsRequest.setNsFlavourId("default");
- String instReq = JsonUtil.marshal(instantiateNsRequest);
- LOGGER.info("Request Payload for InstantiateNs: " + instReq);
- // Step2: prepare url and
- String url = getUrl(nsInstanceId, CommonConstant.Step.INSTANTIATE);
- String methodType = CommonConstant.MethodType.POST;
- instanceNfvoMapping = instanceNfvoMappingRepository.findOneByInstanceId(nsInstanceId);
-
- if (instanceNfvoMapping != null) {
-
- url = instanceNfvoMapping.getEndpoint() + instanceNfvoMapping.getApiRoot() + url;
-
- } else {
- throw new ApplicationException(HttpCode.INTERNAL_SERVER_ERROR, DriverExceptionID.FAIL_TO_INSTANTIATE_NS);
-
- }
- // Step3: prepare restful parameters and options
- Map<String, String> reqBody = new HashMap<>();
- reqBody.put("terminationTime", LocalDateTime.now().toString());
- RestfulResponse instRsp = restfulUtil.send(url, methodType, instReq);
- ResourceOperationStatus status = new ResourceOperationStatus(segInput.getNsOperationKey().getServiceId(),
- segInput.getNsOperationKey().getOperationId(), segInput.getNsOperationKey().getNodeTemplateUUID());
- ValidateUtil.assertObjectNotNull(instRsp);
- if (!HttpCode.isSucess(instRsp.getStatus())) {
- LOGGER.error("update segment operation status : fail to instantiate ns");
- status.setStatus(RequestsDbConstant.Status.ERROR);
- status.setErrorCode(String.valueOf(instRsp.getStatus()));
- status.setStatusDescription(CommonConstant.StatusDesc.INSTANTIATE_NS_FAILED);
- resourceOperationStatusRepository.save(status);
- throw new ApplicationException(HttpCode.INTERNAL_SERVER_ERROR, DriverExceptionID.FAIL_TO_INSTANTIATE_NS);
- }
- LOGGER.info("instantiate ns response status is : {}", instRsp.getStatus());
- LOGGER.info("response payload is {}", instRsp.getResponseContent());
- String jobId = null;
- if (instRsp.getStatus() == 202) {
- String jobUri = instRsp.getRespHeaderStr(CommonConstant.JOB_URI);
- LOGGER.info("JOB URI" + jobUri);
- jobId = jobUri.split("/")[4];
- if (ValidateUtil.isStrEmpty(jobId)) {
- LOGGER.error("Invalid jobId from instantiate operation");
- status.setStatus(RequestsDbConstant.Status.ERROR);
- status.setErrorCode(String.valueOf(instRsp.getStatus()));
- status.setStatusDescription(CommonConstant.StatusDesc.INSTANTIATE_NS_FAILED);
- resourceOperationStatusRepository.save(status);
- throw new ApplicationException(HttpCode.INTERNAL_SERVER_ERROR,
- DriverExceptionID.INVALID_RESPONSE_FROM_INSTANTIATE_OPERATION);
- }
-
- } else if (instRsp.getStatus() > 400 && instRsp.getStatus() < 600) {
- LOGGER.error("ERROR while executing instantiateNs request");
- ProblemDetails problemDetails = JsonUtil.unMarshal(instRsp.getResponseContent(), ProblemDetails.class);
- status.setStatus(RequestsDbConstant.Status.ERROR);
- status.setErrorCode(String.valueOf(instRsp.getStatus()));
- status.setStatusDescription(CommonConstant.StatusDesc.INSTANTIATE_NS_FAILED + problemDetails.getDetail());
- resourceOperationStatusRepository.save(status);
- if (instRsp.getStatus() == 406) {
- throw new ApplicationException(HttpCode.NOT_ACCEPTABLE, DriverExceptionID.FAIL_TO_INSTANTIATE_NS);
- } else if (instRsp.getStatus() == 400) {
- throw new ApplicationException(HttpCode.BAD_REQUEST, DriverExceptionID.FAIL_TO_INSTANTIATE_NS);
- } else if (instRsp.getStatus() == 404) {
- throw new ApplicationException(HttpCode.NOT_FOUND, DriverExceptionID.FAIL_TO_INSTANTIATE_NS);
- } else if (instRsp.getStatus() == 409) {
- LOGGER.error("The operation cannot be executed currently,\n"
- + "due to a conflict with the state of the resource");
- throw new ApplicationException(HttpCode.RESPOND_CONFLICT, DriverExceptionID.FAIL_TO_INSTANTIATE_NS);
- } else if (instRsp.getStatus() == 500) {
- throw new ApplicationException(HttpCode.INTERNAL_SERVER_ERROR,
- DriverExceptionID.FAIL_TO_INSTANTIATE_NS);
- } else {
- throw new ApplicationException(HttpCode.INTERNAL_SERVER_ERROR,
- DriverExceptionID.FAIL_TO_INSTANTIATE_NS);
- }
-
- }
- LOGGER.info("Job id is " + jobId);
- LOGGER.info("Nfvo Details" + instanceNfvoMapping.toString());
- LOGGER.info("instantiate ns -> end");
- // Step 3: update segment operation job id
- LOGGER.info("update resource operation status job id -> begin");
- status.setJobId(jobId);
- status.setProgress("100");
- status.setStatusDescription("NS initiation completed.");
- resourceOperationStatusRepository.save(status);
- instanceNfvoMapping.setJobId(jobId);
- instanceNfvoMappingRepository.save(instanceNfvoMapping);
- LOGGER.info("update segment operation job id -> end" + instanceNfvoMapping.toString());
- return instRsp;
- }
-
- /**
- * terminate network service <br>
- *
- * @param nsOperationKey The operation key for NS resource
- * @param nsInstanceId The NS instance id
- * @return
- * @since ONAP Dublin Release
- */
- public RestfulResponse terminateNs(NsOperationKey nsOperationKey, String nsInstanceId) throws ApplicationException {
- // Step1: save segment operation info for delete process
- LOGGER.info("save segment operation for delete process");
- ResourceOperationStatus status = new ResourceOperationStatus(nsOperationKey.getServiceId(),
- nsOperationKey.getOperationId(), nsOperationKey.getNodeTemplateUUID());
- status.setStatus(RequestsDbConstant.Status.PROCESSING);
- resourceOperationStatusRepository.save(status);
-
- LOGGER.info("SOL005 terminate ns -> begin");
- // Step2: prepare url and method type
- String url = getUrl(nsInstanceId, CommonConstant.Step.TERMINATE);
- String methodType = CommonConstant.MethodType.POST;
-
- instanceNfvoMapping = instanceNfvoMappingRepository.findOneByInstanceId(nsInstanceId);
-
- if (instanceNfvoMapping != null) {
-
- url = instanceNfvoMapping.getEndpoint() + instanceNfvoMapping.getApiRoot() + url;
-
- } else {
- throw new ApplicationException(HttpCode.INTERNAL_SERVER_ERROR, DriverExceptionID.FAIL_TO_TERMINATE_NS);
- }
- // Step3: prepare restful parameters and options
- Map<String, String> reqBody = new HashMap<>();
- reqBody.put("terminationTime", LocalDateTime.now().toString());
-
- // Step4: Call the NFVO or SDNO service to terminate service
- LOGGER.info("request body for terminate NS" + JsonUtil.marshal(reqBody));
- RestfulResponse terminateRsp = restfulUtil.send(url, methodType, JsonUtil.marshal(reqBody));
- ValidateUtil.assertObjectNotNull(terminateRsp);
- LOGGER.info("terminate ns response status is : {}", terminateRsp.getStatus());
- LOGGER.info("terminate ns response content is : {}", terminateRsp.getResponseContent());
- // Step 3: update segment operation
- if (!HttpCode.isSucess(terminateRsp.getStatus())) {
- LOGGER.error("fail to terminate ns");
- status.setStatus(RequestsDbConstant.Status.ERROR);
- status.setErrorCode(String.valueOf(terminateRsp.getStatus()));
- status.setStatusDescription(CommonConstant.StatusDesc.TERMINATE_NS_FAILED);
- resourceOperationStatusRepository.save(status);
-
- throw new ApplicationException(HttpCode.INTERNAL_SERVER_ERROR, DriverExceptionID.FAIL_TO_TERMINATE_NS);
- }
- // @SuppressWarnings("unchecked")
- String jobId = null;
- Map<String, String> rsp = new HashMap<>();
- if (terminateRsp.getStatus() == 202) {
- String jobUri = terminateRsp.getRespHeaderStr(CommonConstant.JOB_URI);
- jobId = jobUri.split("/")[4];
- jobId.split("/");
- if (ValidateUtil.isStrEmpty(jobId)) {
- LOGGER.error("Invalid jobId from instantiate operation");
- status.setStatus(RequestsDbConstant.Status.ERROR);
- status.setErrorCode(String.valueOf(terminateRsp.getStatus()));
- status.setStatusDescription(CommonConstant.StatusDesc.INSTANTIATE_NS_FAILED);
- resourceOperationStatusRepository.save(status);
- throw new ApplicationException(HttpCode.INTERNAL_SERVER_ERROR,
- DriverExceptionID.INVALID_RESPONSE_FROM_INSTANTIATE_OPERATION);
- }
- rsp.put(CommonConstant.JOB_ID, jobId);
- LOGGER.info("terminate ns -> end");
- LOGGER.info("update segment job id -> begin");
- status.setProgress("60");
- status.setStatusDescription("NS is termination completed");
- status.setJobId(jobId);
- resourceOperationStatusRepository.save(status);
- LOGGER.info("update segment job id -> end");
- } else if (terminateRsp.getStatus() > 400 && terminateRsp.getStatus() < 600) {
- LOGGER.error("ERROR while executing instantiateNs request");
- ProblemDetails problemDetails = JsonUtil.unMarshal(terminateRsp.getResponseContent(), ProblemDetails.class);
- status.setStatus(RequestsDbConstant.Status.ERROR);
- status.setErrorCode(String.valueOf(terminateRsp.getStatus()));
- status.setStatusDescription(CommonConstant.StatusDesc.TERMINATE_NS_FAILED + problemDetails.getDetail());
- resourceOperationStatusRepository.save(status);
- if (terminateRsp.getStatus() == 406) {
- throw new ApplicationException(HttpCode.NOT_ACCEPTABLE, DriverExceptionID.FAIL_TO_TERMINATE_NS);
- } else if (terminateRsp.getStatus() == 400) {
- throw new ApplicationException(HttpCode.BAD_REQUEST, DriverExceptionID.FAIL_TO_TERMINATE_NS);
- } else if (terminateRsp.getStatus() == 404) {
- throw new ApplicationException(HttpCode.NOT_FOUND, DriverExceptionID.FAIL_TO_TERMINATE_NS);
- } else if (terminateRsp.getStatus() == 409) {
- LOGGER.error("The operation cannot be executed currently,\n"
- + "due to a conflict with the state of the resource");
- throw new ApplicationException(HttpCode.RESPOND_CONFLICT, DriverExceptionID.FAIL_TO_TERMINATE_NS);
- } else if (terminateRsp.getStatus() == 500) {
- throw new ApplicationException(HttpCode.INTERNAL_SERVER_ERROR, DriverExceptionID.FAIL_TO_TERMINATE_NS);
- } else {
- throw new ApplicationException(HttpCode.INTERNAL_SERVER_ERROR, DriverExceptionID.FAIL_TO_TERMINATE_NS);
- }
-
- }
- instanceNfvoMapping.setJobId(jobId);
- instanceNfvoMappingRepository.save(instanceNfvoMapping);
- terminateRsp.setResponseContent(rsp.toString());
- return terminateRsp;
- }
-
- /**
- * get ns progress by job Id <br>
- *
- * @param nsOperationKey The OperationKey for NS resource
- * @param jobId the job id
- * @return
- * @since ONAP Dublin Release
- */
- public RestfulResponse getNsProgress(NsOperationKey nsOperationKey, String jobId) throws ApplicationException {
-
- ValidateUtil.assertObjectNotNull(jobId);
- // Step 1: query the current resource operation status
- ResourceOperationStatus status = new ResourceOperationStatus(nsOperationKey.getServiceId(),
- nsOperationKey.getOperationId(), nsOperationKey.getNodeTemplateUUID());
- // status = resourceOperationStatusRepository.findOne(Example.of(status))
- // .orElseThrow(() -> new ApplicationException(404, "Cannot Find Operation Status"));
-
- // Get NFVO details
- instanceNfvoMapping = instanceNfvoMappingRepository.findOneByJobId(jobId);
-
- // Step 2: start query
- LOGGER.info("SOL005 query ns status -> begin");
- String url = getUrl(jobId, CommonConstant.Step.QUERY);
- String methodType = CommonConstant.MethodType.GET;
- if (instanceNfvoMapping != null) {
-
- url = instanceNfvoMapping.getEndpoint() + instanceNfvoMapping.getApiRoot() + url;
-
- } else {
- throw new ApplicationException(HttpCode.INTERNAL_SERVER_ERROR, DriverExceptionID.FAIL_TO_QUERY_JOB_STATUS);
- }
-
- // prepare restful parameters and options
- RestfulResponse rsp = restfulUtil.send(url, methodType, "");
- ValidateUtil.assertObjectNotNull(rsp);
- LOGGER.info("query ns progress response status is : {}", rsp.getStatus());
- LOGGER.info("query ns progress response content is : {}", rsp.getResponseContent());
- // Step 3:check the response staus
- if (!HttpCode.isSucess(rsp.getStatus())) {
- LOGGER.info("fail to query job status");
- ProblemDetails problemDetails = JsonUtil.unMarshal(rsp.getResponseContent(), ProblemDetails.class);
- status.setErrorCode(String.valueOf(rsp.getStatus()));
- status.setStatus(RequestsDbConstant.Status.ERROR);
- status.setStatusDescription(CommonConstant.StatusDesc.QUERY_JOB_STATUS_FAILED + problemDetails.getDetail());
- resourceOperationStatusRepository.save(status);
- throw new ApplicationException(HttpCode.INTERNAL_SERVER_ERROR, DriverExceptionID.FAIL_TO_QUERY_JOB_STATUS);
- }
- // Step 4: Process Network Service Instantiate Response
- NsLcmOpOcc nsProgress = JsonUtil.unMarshal(rsp.getResponseContent(), NsLcmOpOcc.class);
- if (CommonConstant.operationState.FAILED.equals(nsProgress.getOperationState())) {
- LOGGER.info("NS instantiate fails");
- status.setErrorCode(String.valueOf(rsp.getStatus()));
- status.setStatus(RequestsDbConstant.Status.ERROR);
- status.setStatusDescription(
- CommonConstant.StatusDesc.INSTANTIATE_NS_FAILED + nsProgress.getError().getDetail());
- resourceOperationStatusRepository.save(status);
- throw new ApplicationException(HttpCode.INTERNAL_SERVER_ERROR, DriverExceptionID.FAIL_TO_QUERY_JOB_STATUS);
- }
- // Step 5: update segment operation progress
-
- if (nsProgress.getOperationState().equals(CommonConstant.operationState.PROCESSING)) {
- status.setProgress("40");
- status.setStatus(RequestsDbConstant.Status.PROCESSING);
- status.setStatusDescription("NS operation is in progress");
- resourceOperationStatusRepository.save(status);
- updateOperationStatusBasedOnResourceStatus(status);
- } else if (nsProgress.getOperationState().equals(CommonConstant.operationState.PARTIALLY_COMPLETED)) {
- status.setProgress("60");
- status.setStatus(RequestsDbConstant.Status.PROCESSING);
- status.setStatusDescription("NS operation is partially completed");
- resourceOperationStatusRepository.save(status);
- } else if (nsProgress.getOperationState().equals(CommonConstant.operationState.COMPLETED)) {
- status.setStatus(RequestsDbConstant.Status.FINISHED);
- status.setProgress("100");
- status.setStatusDescription("NS operation is Completed");
- resourceOperationStatusRepository.save(status);
- updateOperationStatusBasedOnResourceStatus(status);
-
- } else if (nsProgress.getOperationState().equals(CommonConstant.operationState.FAILED)
- || nsProgress.getOperationState().equals(CommonConstant.operationState.FAILED_TEMP)) {
- status.setStatus(RequestsDbConstant.Status.ERROR);
- status.setProgress("0");
- status.setStatusDescription("NS operation Failed");
- resourceOperationStatusRepository.save(status);
- updateOperationStatusBasedOnResourceStatus(status);
- throw new ApplicationException(HttpCode.INTERNAL_SERVER_ERROR, DriverExceptionID.JOB_STATUS_ERROR);
- } else {
- LOGGER.error("unexcepted response status");
-
- }
- return rsp;
- }
-
- /**
- * get url for the operation <br>
- *
- * @param variable variable should be put in the url
- * @param step step of the operation (terminate,query,delete)
- * @return
- * @since ONAP Dublin Release
- */
- private String getUrl(String variable, String step) {
-
- String url;
- String originalUrl;
- originalUrl = nfvoUrlMap.get(step);
- url = String.format(originalUrl, variable);
- return url;
-
- }
-
- private void updateOperationStatusBasedOnResourceStatus(ResourceOperationStatus operStatus) {
- String serviceId = operStatus.getServiceId();
- String operationId = operStatus.getOperationId();
-
- LOGGER.debug("Request database - update Operation Status Based On Resource Operation Status with service Id: "
- + "{}, operationId: {}", serviceId, operationId);
-
- List<ResourceOperationStatus> lstResourceStatus =
- resourceOperationStatusRepository.findByServiceIdAndOperationId(serviceId, operationId);
- if (lstResourceStatus == null) {
- LOGGER.error("Unable to retrieve resourceOperStatus Object by ServiceId: {} operationId: {}", serviceId,
- operationId);
- return;
- }
-
- // count the total progress
- int resourceCount = lstResourceStatus.size();
- int progress = 0;
- boolean isFinished = true;
- for (ResourceOperationStatus lstResourceStatu : lstResourceStatus) {
- progress = progress + Integer.valueOf(lstResourceStatu.getProgress()) / resourceCount;
- if (RequestsDbConstant.Status.PROCESSING.equals(lstResourceStatu.getStatus())) {
- isFinished = false;
- }
- }
-
- OperationStatus serviceOperStatus =
- operationStatusRepository.findOneByServiceIdAndOperationId(serviceId, operationId);
- if (serviceOperStatus == null) {
- String error = "Entity not found. Unable to retrieve OperationStatus Object ServiceId: " + serviceId
- + " operationId: " + operationId;
- LOGGER.error(error);
-
- serviceOperStatus = new OperationStatus();
- serviceOperStatus.setOperationId(operationId);
- serviceOperStatus.setServiceId(serviceId);
- }
-
- progress = progress > 100 ? 100 : progress;
- serviceOperStatus.setProgress(String.valueOf(progress));
- serviceOperStatus.setOperationContent(operStatus.getStatusDescription());
- // if current resource failed. service failed.
- if (RequestsDbConstant.Status.ERROR.equals(operStatus.getStatus())) {
- serviceOperStatus.setResult(RequestsDbConstant.Status.ERROR);
- serviceOperStatus.setReason(operStatus.getStatusDescription());
- } else if (isFinished) {
- // if finished
- serviceOperStatus.setResult(RequestsDbConstant.Status.FINISHED);
- serviceOperStatus.setProgress(RequestsDbConstant.Progress.ONE_HUNDRED);
- }
-
- operationStatusRepository.save(serviceOperStatus);
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/JsonUtil.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/JsonUtil.java
deleted file mode 100644
index 04109bd89d..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/JsonUtil.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Modifications Copyright (C) 2018 IBM.
- * Modifications Copyright (c) 2019 Samsung
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.vfc.util;
-
-import java.io.IOException;
-import org.onap.so.logger.LoggingAnchor;
-import org.onap.so.adapters.vfc.constant.HttpCode;
-import org.onap.so.adapters.vfc.exceptions.ApplicationException;
-import org.onap.logging.filter.base.ErrorCode;
-import org.onap.so.logger.MessageEnum;
-import com.fasterxml.jackson.annotation.JsonInclude.Include;
-import com.fasterxml.jackson.core.type.TypeReference;
-import com.fasterxml.jackson.databind.DeserializationFeature;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Interface for json analyzing.<br/>
- * <p>
- * </p>
- *
- * @author
- * @version ONAP Amsterdam Release 2017-9-6
- */
-public class JsonUtil {
-
- /**
- * Log service
- */
- private static final Logger logger = LoggerFactory.getLogger(JsonUtil.class);
-
- /**
- * Mapper.
- */
- private static final ObjectMapper MAPPER = new ObjectMapper();
- private static final String UNMARSHAL_FAIL_MSG = "fail to unMarshal json";
- static {
- MAPPER.setConfig(MAPPER.getDeserializationConfig().without(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES));
- MAPPER.setSerializationInclusion(Include.NON_NULL);
- }
-
- /**
- * Constructor<br/>
- * <p>
- * </p>
- *
- * @since ONAP Amsterdam Release 2017-9-6
- */
- private JsonUtil() {
-
- }
-
- /**
- * Parse the string in form of json.<br/>
- *
- * @param jsonstr json string.
- * @param type that convert json string to
- * @return model object
- * @since ONAP Amsterdam Release 2017-9-6
- */
- public static <T> T unMarshal(String jsonstr, Class<T> type) throws ApplicationException {
- try {
- return MAPPER.readValue(jsonstr, type);
- } catch (IOException e) {
- logger.error(LoggingAnchor.THREE, MessageEnum.RA_NS_EXC.toString(),
- ErrorCode.BusinessProcessError.getValue(), UNMARSHAL_FAIL_MSG, e);
- throw new ApplicationException(HttpCode.BAD_REQUEST, UNMARSHAL_FAIL_MSG);
- }
- }
-
- /**
- * Parse the string in form of json.<br/>
- *
- * @param jsonstr json string.
- * @param type that convert json string to
- * @return model object
- * @since ONAP Amsterdam Release 2017-9-6
- */
- public static <T> T unMarshal(String jsonstr, TypeReference<T> type) throws ApplicationException {
- try {
- return MAPPER.readValue(jsonstr, type);
- } catch (IOException e) {
- logger.error(LoggingAnchor.THREE, MessageEnum.RA_NS_EXC.toString(),
- ErrorCode.BusinessProcessError.getValue(), UNMARSHAL_FAIL_MSG, e);
- throw new ApplicationException(HttpCode.BAD_REQUEST, UNMARSHAL_FAIL_MSG);
- }
- }
-
- /**
- * Convert object to json string.<br/>
- *
- * @param srcObj data object
- * @return json string
- * @since ONAP Amsterdam Release 2017-9-6
- */
- public static String marshal(Object srcObj) throws ApplicationException {
- try {
- return MAPPER.writeValueAsString(srcObj);
- } catch (IOException e) {
- logger.error(LoggingAnchor.THREE, MessageEnum.RA_NS_EXC.toString(),
- ErrorCode.BusinessProcessError.getValue(), "fail to marshal json", e);
- throw new ApplicationException(HttpCode.BAD_REQUEST, "srcObj marshal failed!");
- }
- }
-
- /**
- * Get mapper.<br/>
- *
- * @return mapper
- * @since ONAP Amsterdam Release 2017-9-6
- */
- public static ObjectMapper getMapper() {
- return MAPPER;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/RestfulUtil.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/RestfulUtil.java
deleted file mode 100644
index 54a2a98a00..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/RestfulUtil.java
+++ /dev/null
@@ -1,393 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Modifications Copyright (C) 2018.
- * Modifications Copyright (c) 2019 Samsung
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.vfc.util;
-
-import java.net.HttpURLConnection;
-import java.net.SocketTimeoutException;
-import java.util.Base64;
-import java.util.HashMap;
-import java.util.Map;
-import javax.ws.rs.core.UriBuilder;
-import org.onap.so.logger.LoggingAnchor;
-import org.apache.http.Header;
-import org.apache.http.HttpResponse;
-import org.apache.http.client.HttpClient;
-import org.apache.http.client.config.RequestConfig;
-import org.apache.http.client.methods.HttpDelete;
-import org.apache.http.client.methods.HttpGet;
-import org.apache.http.client.methods.HttpPost;
-import org.apache.http.client.methods.HttpPut;
-import org.apache.http.client.methods.HttpRequestBase;
-import org.apache.http.conn.ConnectTimeoutException;
-import org.apache.http.entity.ContentType;
-import org.apache.http.entity.StringEntity;
-import org.apache.http.impl.client.HttpClientBuilder;
-import org.apache.http.util.EntityUtils;
-import org.onap.so.adapters.vfc.model.RestfulResponse;
-import org.onap.logging.filter.base.ErrorCode;
-import org.onap.so.logger.MessageEnum;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.core.env.Environment;
-import org.springframework.stereotype.Component;
-
-/**
- * <br>
- * <p>
- * </p>
- * utility to invoke restclient
- *
- * @author
- * @version ONAP Amsterdam Release 2017-9-6
- */
-@Component
-public class RestfulUtil {
-
- /**
- * Log service
- */
- private static final Logger logger = LoggerFactory.getLogger(RestfulUtil.class);
-
- private static final int DEFAULT_TIME_OUT = 60000;
-
- private static final String ONAP_IP = "ONAP_IP";
-
- private static final String DEFAULT_MSB_IP = "127.0.0.1";
-
- private static final Integer DEFAULT_MSB_PORT = 80;
-
- private static final String VFC_ADAPTER = "VFC Adapter";
-
- @Autowired
- private Environment env;
-
- @Autowired
- private HttpClient client;
-
- public String getMsbHost() {
- // MSB_IP will be set as ONAP_IP environment parameter in install flow.
- String msbIp = System.getenv().get(ONAP_IP);
- // if ONAP IP is not set. get it from config file.
- if (null == msbIp || msbIp.isEmpty()) {
- msbIp = env.getProperty("mso.msb-ip", DEFAULT_MSB_IP);
- }
- Integer msbPort = env.getProperty("mso.msb-port", Integer.class, DEFAULT_MSB_PORT);
-
- String msbEndpoint = UriBuilder.fromPath("").host(msbIp).port(msbPort).scheme("http").build().toString();
- logger.debug("msbEndpoint in vfc adapter: {}", msbEndpoint);
-
- return msbEndpoint;
- }
-
- private RestfulUtil() {
-
- }
-
-
- public RestfulResponse send(String msbUrl, String methodType, String content, Map<String, String> requestHeader) {
- // String msbUrl = getMsbHost() + url;
- logger.debug("Begin to sent message " + methodType + ": " + msbUrl);
-
- HttpRequestBase method = null;
- HttpResponse httpResponse = null;
-
- try {
- int timeout = DEFAULT_TIME_OUT;
-
- RequestConfig requestConfig = RequestConfig.custom().setSocketTimeout(timeout).setConnectTimeout(timeout)
- .setConnectionRequestTimeout(timeout).build();
-
- HttpClient client = HttpClientBuilder.create().build();
-
- if ("POST".equalsIgnoreCase(methodType)) {
- HttpPost httpPost = new HttpPost(msbUrl);
- httpPost.setConfig(requestConfig);
- for (String key : requestHeader.keySet()) {
- httpPost.setHeader(key, requestHeader.get(key));
- }
- httpPost.setEntity(new StringEntity(content, ContentType.APPLICATION_JSON));
- method = httpPost;
- } else if ("PUT".equalsIgnoreCase(methodType)) {
- HttpPut httpPut = new HttpPut(msbUrl);
- httpPut.setConfig(requestConfig);
- httpPut.setEntity(new StringEntity(content, ContentType.APPLICATION_JSON));
- method = httpPut;
- } else if ("GET".equalsIgnoreCase(methodType)) {
- HttpGet httpGet = new HttpGet(msbUrl);
- httpGet.setConfig(requestConfig);
- method = httpGet;
- } else if ("DELETE".equalsIgnoreCase(methodType)) {
- HttpDelete httpDelete = new HttpDelete(msbUrl);
- httpDelete.setConfig(requestConfig);
- method = httpDelete;
- }
-
- // now VFC have no auth
- // String userCredentials =
- // SDNCAdapterProperties.getEncryptedProperty(Constants.SDNC_AUTH_PROP,
- // Constants.DEFAULT_SDNC_AUTH, Constants.ENCRYPTION_KEY);
- // String authorization = "Basic " +
- // DatatypeConverter.printBase64Binary(userCredentials.getBytes());
- // method.setHeader("Authorization", authorization);
-
- httpResponse = client.execute(method);
- Map<String, String> responseHeader = new HashMap<>();
- String responseContent = null;
- if (httpResponse.getEntity() != null) {
- responseContent = EntityUtils.toString(httpResponse.getEntity(), "UTF-8");
- Header[] httpResponseAllHeaders = httpResponse.getAllHeaders();
- for (Header header : httpResponseAllHeaders) {
- responseHeader.put(header.getName(), header.getValue());
-
- }
- }
-
- int statusCode = httpResponse.getStatusLine().getStatusCode();
- String statusMessage = httpResponse.getStatusLine().getReasonPhrase();
-
- logger.debug("VFC Response: {} {}", statusCode,
- statusMessage + (responseContent == null ? "" : System.lineSeparator() + responseContent));
-
- if (httpResponse.getStatusLine().getStatusCode() >= 300) {
- String errMsg = "VFC returned " + statusCode + " " + statusMessage;
- logError(errMsg);
- return createResponse(statusCode, errMsg);
- }
-
- httpResponse = null;
-
- if (null != method) {
- method.reset();
- } else {
- logger.debug("method is NULL:");
- }
-
- method = null;
- return createResponse(statusCode, responseContent, responseHeader);
-
- } catch (SocketTimeoutException | ConnectTimeoutException e) {
- String errMsg = "Request to VFC timed out";
- logError(errMsg, e);
- return createResponse(HttpURLConnection.HTTP_CLIENT_TIMEOUT, errMsg);
-
- } catch (Exception e) {
- String errMsg = "Error processing request to VFC";
- logError(errMsg, e);
- return createResponse(HttpURLConnection.HTTP_INTERNAL_ERROR, errMsg);
-
- } finally {
- if (httpResponse != null) {
- try {
- EntityUtils.consume(httpResponse.getEntity());
- } catch (Exception e) {
- logger.debug("Exception :", e);
- }
- }
-
- if (method != null) {
- try {
- method.reset();
- } catch (Exception e) {
- logger.debug("Exception :", e);
- }
- }
- }
- }
-
- public RestfulResponse send(String msbUrl, String methodType, String content) {
- if (!msbUrl.contains("http")) {
- msbUrl = getMsbHost() + msbUrl;
- }
- // String msbUrl = getMsbHost() + url;
- logger.debug("Begin to sent message " + methodType + ": " + msbUrl);
-
- HttpRequestBase method = null;
- HttpResponse httpResponse = null;
-
- try {
- int timeout = DEFAULT_TIME_OUT;
-
- RequestConfig requestConfig = RequestConfig.custom().setSocketTimeout(timeout).setConnectTimeout(timeout)
- .setConnectionRequestTimeout(timeout).build();
-
- if ("POST".equalsIgnoreCase(methodType)) {
- HttpPost httpPost = new HttpPost(msbUrl);
- httpPost.setConfig(requestConfig);
- httpPost.setEntity(new StringEntity(content, ContentType.APPLICATION_JSON));
- method = httpPost;
- } else if ("PUT".equalsIgnoreCase(methodType)) {
- HttpPut httpPut = new HttpPut(msbUrl);
- httpPut.setConfig(requestConfig);
- httpPut.setEntity(new StringEntity(content, ContentType.APPLICATION_JSON));
- method = httpPut;
- } else if ("GET".equalsIgnoreCase(methodType)) {
- HttpGet httpGet = new HttpGet(msbUrl);
- httpGet.setConfig(requestConfig);
- method = httpGet;
- } else if ("DELETE".equalsIgnoreCase(methodType)) {
- HttpDelete httpDelete = new HttpDelete(msbUrl);
- httpDelete.setConfig(requestConfig);
- method = httpDelete;
- }
-
- // now VFC have no auth
- // String userCredentials =
- // SDNCAdapterProperties.getEncryptedProperty(Constants.SDNC_AUTH_PROP,
- // Constants.DEFAULT_SDNC_AUTH, Constants.ENCRYPTION_KEY);
- // String authorization = "Basic " +
- // DatatypeConverter.printBase64Binary(userCredentials.getBytes());
- // method.setHeader("Authorization", authorization);
-
- httpResponse = client.execute(method);
- Map<String, String> responseHeader = new HashMap<>();
- String responseContent = null;
- if (httpResponse.getEntity() != null) {
- responseContent = EntityUtils.toString(httpResponse.getEntity(), "UTF-8");
- Header[] httpResponseAllHeaders = httpResponse.getAllHeaders();
- for (Header header : httpResponseAllHeaders) {
- responseHeader.put(header.getName(), header.getValue());
-
- }
- }
-
- int statusCode = httpResponse.getStatusLine().getStatusCode();
- String statusMessage = httpResponse.getStatusLine().getReasonPhrase();
-
- logger.debug("VFC Response: " + statusCode + " " + statusMessage
- + (responseContent == null ? "" : System.lineSeparator() + responseContent));
-
- if (httpResponse.getStatusLine().getStatusCode() >= 300) {
- String errMsg = "VFC returned " + statusCode + " " + statusMessage;
- logError(errMsg);
- return createResponse(statusCode, errMsg);
- }
-
- httpResponse = null;
-
- if (null != method) {
- method.reset();
- } else {
- logger.debug("method is NULL:");
- }
-
- method = null;
- return createResponse(statusCode, responseContent, responseHeader);
-
- } catch (SocketTimeoutException | ConnectTimeoutException e) {
- String errMsg = "Request to VFC timed out";
- logError(errMsg, e);
- return createResponse(HttpURLConnection.HTTP_CLIENT_TIMEOUT, errMsg);
-
- } catch (Exception e) {
- String errMsg = "Error processing request to VFC";
- logError(errMsg, e);
- return createResponse(HttpURLConnection.HTTP_INTERNAL_ERROR, errMsg);
-
- } finally {
- if (httpResponse != null) {
- try {
- EntityUtils.consume(httpResponse.getEntity());
- } catch (Exception e) {
- logger.debug("Exception :", e);
- }
- }
-
- if (method != null) {
- try {
- method.reset();
- } catch (Exception e) {
- logger.debug("Exception :", e);
- }
- }
- }
- }
-
- public RestfulResponse getNfvoFromAAI(String nfvo) {
- HttpRequestBase method = null;
- HttpResponse httpResponse = null;
- String endPoint = getMsbHost() + "/api/aai-esr-server/v1/nfvos/" + nfvo;
- logger.info("Endpoint URL" + endPoint);
- RequestConfig requestConfig = RequestConfig.custom().setSocketTimeout(DEFAULT_TIME_OUT)
- .setConnectTimeout(DEFAULT_TIME_OUT).setConnectionRequestTimeout(DEFAULT_TIME_OUT).build();
- HttpClient client = HttpClientBuilder.create().build();
- HttpGet httpGet = new HttpGet(endPoint);
- httpGet.setConfig(requestConfig);
- String encoding = Base64.getEncoder().encodeToString(("AAI:AAI").getBytes());
- httpGet.setHeader("Authorization", "Basic " + encoding);
- method = httpGet;
- String responseContent = null;
- Map<String, String> responseHeader = null;
- try {
- httpResponse = client.execute(method);
- if (httpResponse.getEntity() != null) {
- responseContent = EntityUtils.toString(httpResponse.getEntity(), "UTF-8");
- }
-
- int statusCode = httpResponse.getStatusLine().getStatusCode();
- String statusMessage = httpResponse.getStatusLine().getReasonPhrase();
-
- logger.debug("AAI Response: " + statusCode + " " + statusMessage
- + (responseContent == null ? "" : System.lineSeparator() + responseContent));
-
- if (httpResponse.getStatusLine().getStatusCode() >= 300) {
- String errMsg = "AAI returned " + statusCode + " " + statusMessage;
- logError(errMsg);
- return createResponse(statusCode, errMsg);
- }
- } catch (Exception e) {
- String errMsg = "Error processing request to AAI";
- logError(errMsg, e);
- return createResponse(HttpURLConnection.HTTP_INTERNAL_ERROR, errMsg);
- }
- return createResponse(200, responseContent);
- }
-
- private static void logError(String errMsg, Throwable t) {
- logger.error(LoggingAnchor.FOUR, MessageEnum.RA_NS_EXC.toString(), VFC_ADAPTER,
- ErrorCode.AvailabilityError.getValue(), errMsg, t);
- }
-
- private static void logError(String errMsg) {
- logger.error(LoggingAnchor.FOUR, MessageEnum.RA_NS_EXC.toString(), VFC_ADAPTER,
- ErrorCode.AvailabilityError.toString(), errMsg);
- }
-
- private static RestfulResponse createResponse(int statusCode, String content) {
- RestfulResponse rsp = new RestfulResponse();
- rsp.setStatus(statusCode);
- rsp.setResponseContent(content);
- return rsp;
- }
-
- private static RestfulResponse createResponse(int statusCode, String content, Map<String, String> responseHeader) {
- RestfulResponse rsp = new RestfulResponse();
- rsp.setStatus(statusCode);
- rsp.setRespHeaderMap(responseHeader);
- rsp.setResponseContent(content);
- return rsp;
- }
-
-}
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/ValidateUtil.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/ValidateUtil.java
deleted file mode 100644
index f56f5af05b..0000000000
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/ValidateUtil.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.vfc.util;
-
-import org.onap.so.adapters.vfc.constant.HttpCode;
-import org.onap.so.adapters.vfc.exceptions.ApplicationException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ValidateUtil {
-
- /**
- * Log server.
- */
- private static final Logger LOGGER = LoggerFactory.getLogger(ValidateUtil.class);
-
- /**
- * Constructor<br/>
- * <p>
- * </p>
- *
- * @since ONAP Amsterdam Release 2017-9-6
- */
- private ValidateUtil() {
-
- }
-
- /**
- * Assert String parameter.<br/>
- *
- * @param paramValue parameter data
- * @param paramName parameter name
- * @since ONAP Amsterdam Release 2017-9-6
- */
- public static void assertStringNotNull(String paramValue, String paramName) throws ApplicationException {
- if (null != paramValue && !paramValue.isEmpty()) {
- return;
- }
-
- LOGGER.error(paramName + ": Parameter is null or empty.");
- throw new ApplicationException(HttpCode.BAD_REQUEST, paramName + ": Invalid parameter.");
- }
-
- /**
- * Assert object is null.<br/>
- *
- * @param object data object
- * @since ONAP Amsterdam Release 2017-9-6
- */
- public static void assertObjectNotNull(Object object) throws ApplicationException {
- if (null == object) {
- LOGGER.error("Object is null.");
- throw new ApplicationException(HttpCode.BAD_REQUEST, "Object is null.");
- }
-
- }
-
- /**
- * <br>
- *
- * @param str
- * @return
- * @since ONAP Amsterdam Release
- */
- public static boolean isStrEmpty(String str) {
- return null == str || str.isEmpty();
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/main/resources/application-aaf.yaml b/adapters/mso-vfc-adapter/src/main/resources/application-aaf.yaml
deleted file mode 100644
index e69de29bb2..0000000000
--- a/adapters/mso-vfc-adapter/src/main/resources/application-aaf.yaml
+++ /dev/null
diff --git a/adapters/mso-vfc-adapter/src/main/resources/application-basic.yaml b/adapters/mso-vfc-adapter/src/main/resources/application-basic.yaml
deleted file mode 100644
index e69de29bb2..0000000000
--- a/adapters/mso-vfc-adapter/src/main/resources/application-basic.yaml
+++ /dev/null
diff --git a/adapters/mso-vfc-adapter/src/main/resources/application.yaml b/adapters/mso-vfc-adapter/src/main/resources/application.yaml
deleted file mode 100644
index 4a500b3a50..0000000000
--- a/adapters/mso-vfc-adapter/src/main/resources/application.yaml
+++ /dev/null
@@ -1,37 +0,0 @@
-
-server:
- port: 8080
- tomcat:
- max-threads: 50
-
-mso:
- site-name: unknown
- logPath: ./logs/vfc/
-
-spring:
- datasource:
- jdbc-url: jdbc:mariadb://${DB_HOST}:${DB_PORT}/requestdb
- username: ${DB_USERNAME}
- password: ${DB_PASSWORD}
- driver-class-name: org.mariadb.jdbc.Driver
- jpa:
- show-sql: false
- hibernate:
- dialect: org.hibernate.dialect.MySQL5Dialect
- ddl-auto: validate
- naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy
- enable-lazy-load-no-trans: true
-
-#Actuator
-management:
- endpoints:
- web:
- base-path: /manage
- exposure:
- include: "*"
- metrics:
- se-global-registry: false
- export:
- prometheus:
- enabled: true # Whether exporting of metrics to Prometheus is enabled.
- step: 1m # Step size (i.e. reporting frequency) to use. \ No newline at end of file
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/exceptions/ApplicationExceptionTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/exceptions/ApplicationExceptionTest.java
deleted file mode 100644
index c0305f18de..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/exceptions/ApplicationExceptionTest.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * ============LICENSE_START======================================================= ONAP : SO
- * ================================================================================ Copyright (C) 2018 TechMahindra
- * ================================================================================ Licensed under the Apache License,
- * Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.vfc.exceptions;
-
-import static org.junit.Assert.*;
-import org.junit.Test;
-
-public class ApplicationExceptionTest {
- private ApplicationException application = new ApplicationException(500, null);
-
- @Test
- public void testApplicationException() {
- application.setErrorCode(500);
- application.setErrorMsg("ErrorMsg");
- assertEquals(application.getErrorCode(), 500);
- assertEquals(application.getErrorMsg(), "ErrorMsg");
- }
-
- @Test
- public void testbuildErrorResponse() {
- assert (application.buildErrorResponse() != null);
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/AddPnfDataTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/AddPnfDataTest.java
deleted file mode 100644
index 1fedac9cc9..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/AddPnfDataTest.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import org.junit.Test;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ListIterator;
-import static org.junit.Assert.*;
-
-public class AddPnfDataTest {
- AddPnfData pnfData = new AddPnfData();
-
- @Test
- public void getPnfId() {
- pnfData.getPnfId();
- }
-
-
- @Test
- public void setPnfId() {
- pnfData.setPnfId("c9f0a95e-dea0-4698-96e5-5a79bc5a233d");
- }
-
- @Test
- public void getPnfName() {
- pnfData.getPnfName();
- }
-
- @Test
- public void setPnfName() {
- pnfData.setPnfName("Router");
- }
-
- @Test
- public void getPnfdId() {
- pnfData.getPnfdId();
- }
-
- @Test
- public void setPnfdId() {
- pnfData.setPnfdId("c9f0a95e-dea0-4698-96e5-5a79bc5a233d");
- }
-
- @Test
- public void getPnfProfileId() {
- pnfData.getPnfProfileId();
- }
-
- @Test
- public void setPnfProfileId() {
- pnfData.setPnfProfileId("c9f0a95e-dea0-4698-96e5-5a79bc5a233d");
- }
-
- @Test
- public void getCpData() {
- pnfData.getCpData();
- }
-
- @Test
- public void setCpData() {
- pnfData.setCpData(new List<PnfExtCpData>() {
- @Override
- public int size() {
- return 0;
- }
-
- @Override
- public boolean isEmpty() {
- return false;
- }
-
- @Override
- public boolean contains(Object o) {
- return false;
- }
-
- @Override
- public Iterator<PnfExtCpData> iterator() {
- return null;
- }
-
- @Override
- public Object[] toArray() {
- return new Object[0];
- }
-
- @Override
- public <T> T[] toArray(T[] a) {
- return null;
- }
-
- @Override
- public boolean add(PnfExtCpData pnfExtCpData) {
- return false;
- }
-
- @Override
- public boolean remove(Object o) {
- return false;
- }
-
- @Override
- public boolean containsAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public boolean addAll(Collection<? extends PnfExtCpData> c) {
- return false;
- }
-
- @Override
- public boolean addAll(int index, Collection<? extends PnfExtCpData> c) {
- return false;
- }
-
- @Override
- public boolean removeAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public boolean retainAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public void clear() {
-
- }
-
- @Override
- public PnfExtCpData get(int index) {
- return null;
- }
-
- @Override
- public PnfExtCpData set(int index, PnfExtCpData element) {
- return null;
- }
-
- @Override
- public void add(int index, PnfExtCpData element) {
-
- }
-
- @Override
- public PnfExtCpData remove(int index) {
- return null;
- }
-
- @Override
- public int indexOf(Object o) {
- return 0;
- }
-
- @Override
- public int lastIndexOf(Object o) {
- return 0;
- }
-
- @Override
- public ListIterator<PnfExtCpData> listIterator() {
- return null;
- }
-
- @Override
- public ListIterator<PnfExtCpData> listIterator(int index) {
- return null;
- }
-
- @Override
- public List<PnfExtCpData> subList(int fromIndex, int toIndex) {
- return null;
- }
- });
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/AddressRangeTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/AddressRangeTest.java
deleted file mode 100644
index 9444efd4c5..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/AddressRangeTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-public class AddressRangeTest {
- AddressRange addressRange = new AddressRange();
-
- @Test
- public void getMinAddress() {
- addressRange.getMinAddress();
- }
-
- @Test
- public void setMinAddress() {
- addressRange.setMinAddress("192.168.10.10");
- }
-
- @Test
- public void getMaxAddress() {
- addressRange.getMaxAddress();
- }
-
- @Test
- public void setMaxAddress() {
- addressRange.setMaxAddress("192.168.10.10");
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/AffectedNsTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/AffectedNsTest.java
deleted file mode 100644
index 06c52e2e52..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/AffectedNsTest.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-public class AffectedNsTest {
-
- AffectedNs affectedNs = new AffectedNs();
-
- @Test
- public void getNsInstanceId() {
- affectedNs.getNsInstanceId();
- }
-
- @Test
- public void setNsInstanceId() {
- affectedNs.setNsInstanceId("c9f0a95e-dea0-4698-96e5-5a79bc5a233d");
- }
-
- @Test
- public void getNsdId() {
- affectedNs.getNsdId();
- }
-
- @Test
- public void setNsdId() {
- affectedNs.setNsdId("c9f0a95e-dea0-4698-96e5-5a79bc5a233d");
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/AffectedPnfTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/AffectedPnfTest.java
deleted file mode 100644
index beecbe0675..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/AffectedPnfTest.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-public class AffectedPnfTest {
- AffectedPnf affectedPnf = new AffectedPnf();
-
- @Test
- public void getPnfid() {
- affectedPnf.getPnfid();
- }
-
- @Test
- public void setPnfid() {
- affectedPnf.setPnfid("c9f0a95e-dea0-4698-96e5-5a79bc5a233d");
- }
-
- @Test
- public void getPnfdid() {
- affectedPnf.getPnfdid();
- }
-
- @Test
- public void setPnfdid() {
- affectedPnf.setPnfdid("c9f0a95e-dea0-4698-96e5-5a79bc5a233d");
- }
-
- @Test
- public void getPnfProfileId() {
- affectedPnf.getPnfProfileId();
- }
-
- @Test
- public void setPnfProfileId() {
- affectedPnf.setPnfProfileId("c9f0a95e-dea0-4698-96e5-5a79bc5a233d");
- }
-
- @Test
- public void getPnfName() {
- affectedPnf.getPnfName();
- }
-
- @Test
- public void setPnfName() {
- affectedPnf.setPnfName("Router");
- }
-
- @Test
- public void getCpInstanceId() {
- affectedPnf.getCpInstanceId();
- }
-
- @Test
- public void setCpInstanceId() {
- affectedPnf.setCpInstanceId("c9f0a95e-dea0-4698-96e5-5a79bc5a233d");
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/AffectedSapTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/AffectedSapTest.java
deleted file mode 100644
index b96fe32836..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/AffectedSapTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-public class AffectedSapTest {
- AffectedSap affectedSap = new AffectedSap();
-
- @Test
- public void getSapInstanceId() {
- affectedSap.getSapInstanceId();
- }
-
- @Test
- public void setSapInstanceId() {
- affectedSap.setSapInstanceId("c9f0a95e-dea0-4698-96e5-5a79bc5a233d");
- }
-
- @Test
- public void getSapdId() {
- affectedSap.getSapdId();
- }
-
- @Test
- public void setSapdId() {
- affectedSap.setSapdId("c9f0a95e-dea0-4698-96e5-5a79bc5a233d");
- }
-
- @Test
- public void getSapName() {
- affectedSap.getSapName();
- }
-
- @Test
- public void setSapName() {
- affectedSap.setSapName("Dummy SAP");
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/AffectedVirtualLinkTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/AffectedVirtualLinkTest.java
deleted file mode 100644
index dbc6d0811f..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/AffectedVirtualLinkTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-public class AffectedVirtualLinkTest {
- AffectedVirtualLink affectedVirtualLink = new AffectedVirtualLink();
-
- @Test
- public void getNsVirtualLinkInstanceId() {
- affectedVirtualLink.getNsVirtualLinkInstanceId();
- }
-
- @Test
- public void setNsVirtualLinkInstanceId() {
- affectedVirtualLink.setNsVirtualLinkInstanceId("c9f0a95e-dea0-4698-96e5-5a79bc5a233d");
- }
-
- @Test
- public void getNsVirtualLinkDescId() {
- affectedVirtualLink.getNsVirtualLinkDescId();
- }
-
- @Test
- public void setNsVirtualLinkDescId() {
- affectedVirtualLink.setNsVirtualLinkDescId("c9f0a95e-dea0-4698-96e5-5a79bc5a233d");
- }
-
- @Test
- public void getVlProfileId() {
- affectedVirtualLink.getVlProfileId();
- }
-
- @Test
- public void setVlProfileId() {
- affectedVirtualLink.setVlProfileId("c9f0a95e-dea0-4698-96e5-5a79bc5a233d");
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/AffectedVnfTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/AffectedVnfTest.java
deleted file mode 100644
index 810f32d005..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/AffectedVnfTest.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-public class AffectedVnfTest {
- AffectedVnf affectedVnf = new AffectedVnf();
-
- @Test
- public void getVnfInstanceId() {
- affectedVnf.getVnfInstanceId();
- }
-
- @Test
- public void setVnfInstanceId() {
- affectedVnf.setVnfInstanceId("c9f0a95e-dea0-4698-96e5-5a79bc5a233d");
- }
-
- @Test
- public void getVnfdId() {
- affectedVnf.getVnfdId();
- }
-
- @Test
- public void setVnfdId() {
- affectedVnf.setVnfdId("c9f0a95e-dea0-4698-96e5-5a79bc5a233d");
- }
-
- @Test
- public void getVnfProfileId() {
- affectedVnf.getVnfProfileId();
- }
-
- @Test
- public void setVnfProfileId() {
- affectedVnf.setVnfProfileId("c9f0a95e-dea0-4698-96e5-5a79bc5a233d");
- }
-
- @Test
- public void getVnfName() {
- affectedVnf.getVnfName();
- }
-
- @Test
- public void setVnfName() {
- affectedVnf.setVnfName("Dummy Vnf Name");
- }
-
- @Test
- public void getChangedInfo() {
- affectedVnf.getChangedInfo();
- }
-
- @Test
- public void setChangedInfo() {
- affectedVnf.setChangedInfo(new ChangedInfo());
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/AffectedVnffgTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/AffectedVnffgTest.java
deleted file mode 100644
index 0d5670133d..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/AffectedVnffgTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-public class AffectedVnffgTest {
- AffectedVnffg affectedVnffg = new AffectedVnffg();
-
- @Test
- public void getVnffgInstanceId() {
- affectedVnffg.getVnffgInstanceId();
- }
-
- @Test
- public void setVnffgInstanceId() {
- affectedVnffg.setVnffgInstanceId("c9f0a95e-dea0-4698-96e5-5a79bc5a233d");
- }
-
- @Test
- public void getVnffgdId() {
- affectedVnffg.getVnffgdId();
- }
-
- @Test
- public void setVnffgdId() {
- affectedVnffg.setVnffgdId("c9f0a95e-dea0-4698-96e5-5a79bc5a233d");
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/AffinityOrAntiAffinityRuleTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/AffinityOrAntiAffinityRuleTest.java
deleted file mode 100644
index 99a40e4ee1..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/AffinityOrAntiAffinityRuleTest.java
+++ /dev/null
@@ -1,283 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import org.junit.Test;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ListIterator;
-import static org.junit.Assert.*;
-
-public class AffinityOrAntiAffinityRuleTest {
- AffinityOrAntiAffinityRule affinityOrAntiAffinityRule = new AffinityOrAntiAffinityRule();
-
- @Test
- public void getVnfdId() {
- affinityOrAntiAffinityRule.getVnfdId();
- }
-
- @Test
- public void setVnfdId() {
- affinityOrAntiAffinityRule.setVnfdId("c9f0a95e-dea0-4698-96e5-5a79bc5a233d");
- }
-
- @Test
- public void getVnfProfileId() {
- affinityOrAntiAffinityRule.getVnfProfileId();
- }
-
- @Test
- public void setVnfProfileId() {
- affinityOrAntiAffinityRule.setVnfProfileId(new List<String>() {
- @Override
- public int size() {
- return 0;
- }
-
- @Override
- public boolean isEmpty() {
- return false;
- }
-
- @Override
- public boolean contains(Object o) {
- return false;
- }
-
- @Override
- public Iterator<String> iterator() {
- return null;
- }
-
- @Override
- public Object[] toArray() {
- return new Object[0];
- }
-
- @Override
- public <T> T[] toArray(T[] a) {
- return null;
- }
-
- @Override
- public boolean add(String s) {
- return false;
- }
-
- @Override
- public boolean remove(Object o) {
- return false;
- }
-
- @Override
- public boolean containsAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public boolean addAll(Collection<? extends String> c) {
- return false;
- }
-
- @Override
- public boolean addAll(int index, Collection<? extends String> c) {
- return false;
- }
-
- @Override
- public boolean removeAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public boolean retainAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public void clear() {
-
- }
-
- @Override
- public String get(int index) {
- return null;
- }
-
- @Override
- public String set(int index, String element) {
- return null;
- }
-
- @Override
- public void add(int index, String element) {
-
- }
-
- @Override
- public String remove(int index) {
- return null;
- }
-
- @Override
- public int indexOf(Object o) {
- return 0;
- }
-
- @Override
- public int lastIndexOf(Object o) {
- return 0;
- }
-
- @Override
- public ListIterator<String> listIterator() {
- return null;
- }
-
- @Override
- public ListIterator<String> listIterator(int index) {
- return null;
- }
-
- @Override
- public List<String> subList(int fromIndex, int toIndex) {
- return null;
- }
- });
- }
-
- @Test
- public void getVnfInstanceId() {
- affinityOrAntiAffinityRule.getVnfInstanceId();
- }
-
- @Test
- public void setVnfInstanceId() {
- affinityOrAntiAffinityRule.setVnfInstanceId(new List<String>() {
- @Override
- public int size() {
- return 0;
- }
-
- @Override
- public boolean isEmpty() {
- return false;
- }
-
- @Override
- public boolean contains(Object o) {
- return false;
- }
-
- @Override
- public Iterator<String> iterator() {
- return null;
- }
-
- @Override
- public Object[] toArray() {
- return new Object[0];
- }
-
- @Override
- public <T> T[] toArray(T[] a) {
- return null;
- }
-
- @Override
- public boolean add(String s) {
- return false;
- }
-
- @Override
- public boolean remove(Object o) {
- return false;
- }
-
- @Override
- public boolean containsAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public boolean addAll(Collection<? extends String> c) {
- return false;
- }
-
- @Override
- public boolean addAll(int index, Collection<? extends String> c) {
- return false;
- }
-
- @Override
- public boolean removeAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public boolean retainAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public void clear() {
-
- }
-
- @Override
- public String get(int index) {
- return null;
- }
-
- @Override
- public String set(int index, String element) {
- return null;
- }
-
- @Override
- public void add(int index, String element) {
-
- }
-
- @Override
- public String remove(int index) {
- return null;
- }
-
- @Override
- public int indexOf(Object o) {
- return 0;
- }
-
- @Override
- public int lastIndexOf(Object o) {
- return 0;
- }
-
- @Override
- public ListIterator<String> listIterator() {
- return null;
- }
-
- @Override
- public ListIterator<String> listIterator(int index) {
- return null;
- }
-
- @Override
- public List<String> subList(int fromIndex, int toIndex) {
- return null;
- }
- });
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/ChangedInfoTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/ChangedInfoTest.java
deleted file mode 100644
index 41077fbe67..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/ChangedInfoTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-public class ChangedInfoTest {
- ChangedInfo changedInfo = new ChangedInfo();
-
- @Test
- public void getChangedVnfInfo() {
- changedInfo.getChangedVnfInfo();
- }
-
- @Test
- public void setChangedVnfInfo() {
- changedInfo.setChangedVnfInfo(new ModifyVnfInfoData());
- }
-
- @Test
- public void getChangedExtConnectivity() {
- changedInfo.getChangedExtConnectivity();
- }
-
- @Test
- public void setChangedExtConnectivity() {
- changedInfo.setChangedExtConnectivity(new ExtVirtualLinkInfo());
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/CivicAddressElementTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/CivicAddressElementTest.java
deleted file mode 100644
index e9c011b86a..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/CivicAddressElementTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-public class CivicAddressElementTest {
- CivicAddressElement civicAddressElement = new CivicAddressElement();
-
- @Test
- public void getCaType() {
- civicAddressElement.getCaType();
- }
-
- @Test
- public void setCaType() {
- civicAddressElement.setCaType(12);
- }
-
- @Test
- public void getCaValue() {
- civicAddressElement.getCaValue();
- }
-
- @Test
- public void setCaValue() {
- civicAddressElement.setCaValue("Dummy Ca value");
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/CpProtocolDataTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/CpProtocolDataTest.java
deleted file mode 100644
index e47d02c926..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/CpProtocolDataTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-public class CpProtocolDataTest {
- CpProtocolData cpProtocolData = new CpProtocolData();
-
- @Test
- public void getLayerProtocol() {
- cpProtocolData.getLayerProtocol();
- }
-
- @Test
- public void setLayerProtocol() {
- cpProtocolData.setLayerProtocol("BGP");
- }
-
- @Test
- public void getIpOverEthernet() {
- cpProtocolData.getIpOverEthernet();
- }
-
- @Test
- public void setIpOverEthernet() {
- cpProtocolData.setIpOverEthernet(new IpOverEthernetAddressData());
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/CreateNsRequestTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/CreateNsRequestTest.java
deleted file mode 100644
index a2a6ae4fe1..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/CreateNsRequestTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-public class CreateNsRequestTest {
- CreateNsRequest createNsRequest = new CreateNsRequest();
-
- @Test
- public void getNsdId() {
- createNsRequest.getNsdId();
- }
-
- @Test
- public void setNsdId() {
- createNsRequest.setNsdId("c9f0a95e-dea0-4698-96e5-5a79bc5a233d");
- }
-
- @Test
- public void getNsDescription() {
- createNsRequest.getNsDescription();
- }
-
- @Test
- public void setNsDescription() {
- createNsRequest.setNsDescription("Dummy description");
- }
-
- @Test
- public void getNsName() {
- createNsRequest.getNsName();
- }
-
- @Test
- public void setNsName() {
- createNsRequest.setNsName("Dummy Name");
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/CustomerModelTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/CustomerModelTest.java
deleted file mode 100644
index 548d8b3645..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/CustomerModelTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.adapters.vfc.model;
-
-import org.junit.Test;
-
-public class CustomerModelTest {
- // TODO: following test case is done for coverage
- // later it should be modified for proper test.
- CustomerModel customerModel = new CustomerModel();
-
- @Test
- public void getGlobalCustomerId() throws Exception {
- customerModel.getGlobalCustomerId();
- }
-
- @Test
- public void setGlobalCustomerId() throws Exception {
- customerModel.setGlobalCustomerId("test");
- }
-
- @Test
- public void getServiceType() throws Exception {
- customerModel.getServiceType();
- }
-
- @Test
- public void setServiceType() throws Exception {
- customerModel.setServiceType("service");
- }
-
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/ExtLinkPortInfoTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/ExtLinkPortInfoTest.java
deleted file mode 100644
index 92cec88b34..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/ExtLinkPortInfoTest.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-public class ExtLinkPortInfoTest {
-
- ExtLinkPortInfo extLinkPortInfo = new ExtLinkPortInfo();
-
- @Test
- public void getId() {
- extLinkPortInfo.getId();
- }
-
- @Test
- public void setId() {
- extLinkPortInfo.setId("c9f0a95e-dea0-4698-96e5-5a79bc5a233d");
- }
-
- @Test
- public void getResourceHandle() {
- extLinkPortInfo.getResourceHandle();
- }
-
- @Test
- public void setResourceHandle() {
- extLinkPortInfo.setResourceHandle(new ResourceHandle());
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/ExtVirtualLinkInfoTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/ExtVirtualLinkInfoTest.java
deleted file mode 100644
index c455b36a46..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/ExtVirtualLinkInfoTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-public class ExtVirtualLinkInfoTest {
- ExtVirtualLinkInfo extVirtualLinkInfo = new ExtVirtualLinkInfo();
-
- @Test
- public void getId() {
- extVirtualLinkInfo.getId();
- }
-
- @Test
- public void setId() {
- extVirtualLinkInfo.setId("c9f0a95e-dea0-4698-96e5-5a79bc5a233d");
- }
-
- @Test
- public void getResourceHandle() {
- extVirtualLinkInfo.getResourceHandle();
- }
-
- @Test
- public void setResourceHandle() {
- extVirtualLinkInfo.setResourceHandle(new ResourceHandle());
- }
-
- @Test
- public void getExtLinkPorts() {
- extVirtualLinkInfo.getExtLinkPorts();
- }
-
- @Test
- public void setExtLinkPorts() {
- extVirtualLinkInfo.setExtLinkPorts(new ExtLinkPortInfo());
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/InstantiateNsRequestTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/InstantiateNsRequestTest.java
deleted file mode 100644
index f27b041690..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/InstantiateNsRequestTest.java
+++ /dev/null
@@ -1,413 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import org.junit.Test;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ListIterator;
-import static org.junit.Assert.*;
-
-public class InstantiateNsRequestTest {
- InstantiateNsRequest instantiateNsRequest = new InstantiateNsRequest();
-
- @Test
- public void getNsFlavourId() {
- instantiateNsRequest.getNsFlavourId();
- }
-
- @Test
- public void setNsFlavourId() {
- instantiateNsRequest.setNsFlavourId("c9f0a95e-dea0-4698-96e5-5a79bc5a233d");
- }
-
- @Test
- public void getSapData() {
- instantiateNsRequest.getSapData();
- }
-
- @Test
- public void setSapData() {
- instantiateNsRequest.setSapData(new List<SapData>() {
- @Override
- public int size() {
- return 0;
- }
-
- @Override
- public boolean isEmpty() {
- return false;
- }
-
- @Override
- public boolean contains(Object o) {
- return false;
- }
-
- @Override
- public Iterator<SapData> iterator() {
- return null;
- }
-
- @Override
- public Object[] toArray() {
- return new Object[0];
- }
-
- @Override
- public <T> T[] toArray(T[] a) {
- return null;
- }
-
- @Override
- public boolean add(SapData sapData) {
- return false;
- }
-
- @Override
- public boolean remove(Object o) {
- return false;
- }
-
- @Override
- public boolean containsAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public boolean addAll(Collection<? extends SapData> c) {
- return false;
- }
-
- @Override
- public boolean addAll(int index, Collection<? extends SapData> c) {
- return false;
- }
-
- @Override
- public boolean removeAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public boolean retainAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public void clear() {
-
- }
-
- @Override
- public SapData get(int index) {
- return null;
- }
-
- @Override
- public SapData set(int index, SapData element) {
- return null;
- }
-
- @Override
- public void add(int index, SapData element) {
-
- }
-
- @Override
- public SapData remove(int index) {
- return null;
- }
-
- @Override
- public int indexOf(Object o) {
- return 0;
- }
-
- @Override
- public int lastIndexOf(Object o) {
- return 0;
- }
-
- @Override
- public ListIterator<SapData> listIterator() {
- return null;
- }
-
- @Override
- public ListIterator<SapData> listIterator(int index) {
- return null;
- }
-
- @Override
- public List<SapData> subList(int fromIndex, int toIndex) {
- return null;
- }
- });
- }
-
- @Test
- public void getAddpnfData() {
- instantiateNsRequest.getAddpnfData();
- }
-
- @Test
- public void setAddpnfData() {
- instantiateNsRequest.setAddpnfData(new List<AddPnfData>() {
- @Override
- public int size() {
- return 0;
- }
-
- @Override
- public boolean isEmpty() {
- return false;
- }
-
- @Override
- public boolean contains(Object o) {
- return false;
- }
-
- @Override
- public Iterator<AddPnfData> iterator() {
- return null;
- }
-
- @Override
- public Object[] toArray() {
- return new Object[0];
- }
-
- @Override
- public <T> T[] toArray(T[] a) {
- return null;
- }
-
- @Override
- public boolean add(AddPnfData addPnfData) {
- return false;
- }
-
- @Override
- public boolean remove(Object o) {
- return false;
- }
-
- @Override
- public boolean containsAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public boolean addAll(Collection<? extends AddPnfData> c) {
- return false;
- }
-
- @Override
- public boolean addAll(int index, Collection<? extends AddPnfData> c) {
- return false;
- }
-
- @Override
- public boolean removeAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public boolean retainAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public void clear() {
-
- }
-
- @Override
- public AddPnfData get(int index) {
- return null;
- }
-
- @Override
- public AddPnfData set(int index, AddPnfData element) {
- return null;
- }
-
- @Override
- public void add(int index, AddPnfData element) {
-
- }
-
- @Override
- public AddPnfData remove(int index) {
- return null;
- }
-
- @Override
- public int indexOf(Object o) {
- return 0;
- }
-
- @Override
- public int lastIndexOf(Object o) {
- return 0;
- }
-
- @Override
- public ListIterator<AddPnfData> listIterator() {
- return null;
- }
-
- @Override
- public ListIterator<AddPnfData> listIterator(int index) {
- return null;
- }
-
- @Override
- public List<AddPnfData> subList(int fromIndex, int toIndex) {
- return null;
- }
- });
- }
-
- @Test
- public void getVnfInstanceData() {
- instantiateNsRequest.getVnfInstanceData();
- }
-
- @Test
- public void setVnfInstanceData() {
- instantiateNsRequest.setVnfInstanceData(new List<VnfInstanceData>() {
- @Override
- public int size() {
- return 0;
- }
-
- @Override
- public boolean isEmpty() {
- return false;
- }
-
- @Override
- public boolean contains(Object o) {
- return false;
- }
-
- @Override
- public Iterator<VnfInstanceData> iterator() {
- return null;
- }
-
- @Override
- public Object[] toArray() {
- return new Object[0];
- }
-
- @Override
- public <T> T[] toArray(T[] a) {
- return null;
- }
-
- @Override
- public boolean add(VnfInstanceData vnfInstanceData) {
- return false;
- }
-
- @Override
- public boolean remove(Object o) {
- return false;
- }
-
- @Override
- public boolean containsAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public boolean addAll(Collection<? extends VnfInstanceData> c) {
- return false;
- }
-
- @Override
- public boolean addAll(int index, Collection<? extends VnfInstanceData> c) {
- return false;
- }
-
- @Override
- public boolean removeAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public boolean retainAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public void clear() {
-
- }
-
- @Override
- public VnfInstanceData get(int index) {
- return null;
- }
-
- @Override
- public VnfInstanceData set(int index, VnfInstanceData element) {
- return null;
- }
-
- @Override
- public void add(int index, VnfInstanceData element) {
-
- }
-
- @Override
- public VnfInstanceData remove(int index) {
- return null;
- }
-
- @Override
- public int indexOf(Object o) {
- return 0;
- }
-
- @Override
- public int lastIndexOf(Object o) {
- return 0;
- }
-
- @Override
- public ListIterator<VnfInstanceData> listIterator() {
- return null;
- }
-
- @Override
- public ListIterator<VnfInstanceData> listIterator(int index) {
- return null;
- }
-
- @Override
- public List<VnfInstanceData> subList(int fromIndex, int toIndex) {
- return null;
- }
- });
- }
-
- @Test
- public void getNestedNsInstanceId() {
- instantiateNsRequest.getNestedNsInstanceId();
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/IpAddressesTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/IpAddressesTest.java
deleted file mode 100644
index edf6346bca..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/IpAddressesTest.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import org.junit.Test;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ListIterator;
-import static org.junit.Assert.*;
-
-public class IpAddressesTest {
- IpAddresses ipAddresses = new IpAddresses();
-
- @Test
- public void getType() {
- ipAddresses.getType();
- }
-
- @Test
- public void setType() {
- ipAddresses.setType("Dummy Type");
- }
-
- @Test
- public void getFixedAddresses() {
- ipAddresses.getFixedAddresses();
- }
-
- @Test
- public void setFixedAddresses() {
- ipAddresses.setFixedAddresses(new List<String>() {
- @Override
- public int size() {
- return 0;
- }
-
- @Override
- public boolean isEmpty() {
- return false;
- }
-
- @Override
- public boolean contains(Object o) {
- return false;
- }
-
- @Override
- public Iterator<String> iterator() {
- return null;
- }
-
- @Override
- public Object[] toArray() {
- return new Object[0];
- }
-
- @Override
- public <T> T[] toArray(T[] a) {
- return null;
- }
-
- @Override
- public boolean add(String s) {
- return false;
- }
-
- @Override
- public boolean remove(Object o) {
- return false;
- }
-
- @Override
- public boolean containsAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public boolean addAll(Collection<? extends String> c) {
- return false;
- }
-
- @Override
- public boolean addAll(int index, Collection<? extends String> c) {
- return false;
- }
-
- @Override
- public boolean removeAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public boolean retainAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public void clear() {
-
- }
-
- @Override
- public String get(int index) {
- return null;
- }
-
- @Override
- public String set(int index, String element) {
- return null;
- }
-
- @Override
- public void add(int index, String element) {
-
- }
-
- @Override
- public String remove(int index) {
- return null;
- }
-
- @Override
- public int indexOf(Object o) {
- return 0;
- }
-
- @Override
- public int lastIndexOf(Object o) {
- return 0;
- }
-
- @Override
- public ListIterator<String> listIterator() {
- return null;
- }
-
- @Override
- public ListIterator<String> listIterator(int index) {
- return null;
- }
-
- @Override
- public List<String> subList(int fromIndex, int toIndex) {
- return null;
- }
- });
- }
-
- @Test
- public void getNumDynamicAddresses() {
- ipAddresses.getNumDynamicAddresses();
- }
-
- @Test
- public void setNumDynamicAddresses() {
- ipAddresses.setNumDynamicAddresses(5);
- }
-
- @Test
- public void getAddressRange() {
- ipAddresses.getAddressRange();
- }
-
- @Test
- public void setAddressRange() {
- ipAddresses.setAddressRange(new AddressRange());
- }
-
- @Test
- public void getSubnetId() {
- ipAddresses.getSubnetId();
- }
-
- @Test
- public void setSubnetId() {
- ipAddresses.setSubnetId("c9f0a95e-dea0-4698-96e5-5a79bc5a233d");
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/IpOverEthernetAddressDataTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/IpOverEthernetAddressDataTest.java
deleted file mode 100644
index 0088cdc50b..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/IpOverEthernetAddressDataTest.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import org.junit.Test;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ListIterator;
-import static org.junit.Assert.*;
-
-public class IpOverEthernetAddressDataTest {
- IpOverEthernetAddressData ipOverEthernetAddressData = new IpOverEthernetAddressData();
-
- @Test
- public void getMacAddress() {
- ipOverEthernetAddressData.getMacAddress();
- }
-
- @Test
- public void setMacAddress() {
- ipOverEthernetAddressData.setMacAddress("4e:86:9f:62:c1:bf");
- }
-
- @Test
- public void getIpAddresses() {
- ipOverEthernetAddressData.getIpAddresses();
- }
-
- @Test
- public void setIpAddresses() {
- ipOverEthernetAddressData.setIpAddresses(new List<IpAddresses>() {
- @Override
- public int size() {
- return 0;
- }
-
- @Override
- public boolean isEmpty() {
- return false;
- }
-
- @Override
- public boolean contains(Object o) {
- return false;
- }
-
- @Override
- public Iterator<IpAddresses> iterator() {
- return null;
- }
-
- @Override
- public Object[] toArray() {
- return new Object[0];
- }
-
- @Override
- public <T> T[] toArray(T[] a) {
- return null;
- }
-
- @Override
- public boolean add(IpAddresses ipAddresses) {
- return false;
- }
-
- @Override
- public boolean remove(Object o) {
- return false;
- }
-
- @Override
- public boolean containsAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public boolean addAll(Collection<? extends IpAddresses> c) {
- return false;
- }
-
- @Override
- public boolean addAll(int index, Collection<? extends IpAddresses> c) {
- return false;
- }
-
- @Override
- public boolean removeAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public boolean retainAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public void clear() {
-
- }
-
- @Override
- public IpAddresses get(int index) {
- return null;
- }
-
- @Override
- public IpAddresses set(int index, IpAddresses element) {
- return null;
- }
-
- @Override
- public void add(int index, IpAddresses element) {
-
- }
-
- @Override
- public IpAddresses remove(int index) {
- return null;
- }
-
- @Override
- public int indexOf(Object o) {
- return 0;
- }
-
- @Override
- public int lastIndexOf(Object o) {
- return 0;
- }
-
- @Override
- public ListIterator<IpAddresses> listIterator() {
- return null;
- }
-
- @Override
- public ListIterator<IpAddresses> listIterator(int index) {
- return null;
- }
-
- @Override
- public List<IpAddresses> subList(int fromIndex, int toIndex) {
- return null;
- }
- });
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/LinkTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/LinkTest.java
deleted file mode 100644
index e447c85ee7..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/LinkTest.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-public class LinkTest {
- Link link = new Link();
-
- @Test
- public void getHref() {
- link.getHref();
- }
-
- @Test
- public void setHref() {
- link.setHref("dummy href");
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/LinksTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/LinksTest.java
deleted file mode 100644
index aef87c47b1..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/LinksTest.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-public class LinksTest {
- Links links = new Links();
-
- @Test
- public void getSelf() {
- links.getSelf();
- }
-
- @Test
- public void setSelf() {
- links.setSelf(new Link());
- }
-
- @Test
- public void getNsInstance() {
- links.getNsInstance();
- }
-
- @Test
- public void setNsInstance() {
- links.setNsInstance(new Link());
- }
-
- @Test
- public void getCancel() {
- links.getCancel();
- }
-
- @Test
- public void setCancel() {
- links.setCancel(new Link());
- }
-
- @Test
- public void getRetry() {
- links.getRetry();
- }
-
- @Test
- public void setRetry() {
- links.setRetry(new Link());
- }
-
- @Test
- public void getRollback() {
- links.getRollback();
- }
-
- @Test
- public void setRollback() {
- links.setRollback(new Link());
- }
-
- @Test
- public void getContinues() {
- links.getContinues();
- }
-
- @Test
- public void setContinues() {
- links.setContinues(new Link());
- }
-
- @Test
- public void getFail() {
- links.getFail();
- }
-
- @Test
- public void setFail() {
- links.setFail(new Link());
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/LocationConstraintTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/LocationConstraintTest.java
deleted file mode 100644
index 2b217469e5..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/LocationConstraintTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.adapters.vfc.model;
-
-import org.junit.Test;
-
-public class LocationConstraintTest {
- // TODO: following test case is done for coverage
- // later it should be modified for proper test.
- LocationConstraint locationConstraint = new LocationConstraint();
-
- @Test
- public void getVnfProfileId() throws Exception {
- locationConstraint.getVnfProfileId();
- }
-
- @Test
- public void setVnfProfileId() throws Exception {
- locationConstraint.setVnfProfileId("profileID");
- }
-
- @Test
- public void getLocationConstraints() throws Exception {
- locationConstraint.getLocationConstraints();
- }
-
- @Test
- public void setLocationConstraints() throws Exception {
- locationConstraint.setLocationConstraints(new VimLocation());
- }
-
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/LocationConstraintsTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/LocationConstraintsTest.java
deleted file mode 100644
index e68b12a626..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/LocationConstraintsTest.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-public class LocationConstraintsTest {
- LocationConstraints locationConstraints = new LocationConstraints();
-
- @Test
- public void getCountryCode() {
- locationConstraints.getCountryCode();
- }
-
- @Test
- public void setCountryCode() {
- locationConstraints.setCountryCode("IND");
-
- }
-
- @Test
- public void getCivicAddressElement() {
- locationConstraints.getCivicAddressElement();
- }
-
- @Test
- public void setCivicAddressElement() {
- locationConstraints.setCivicAddressElement(new CivicAddressElement());
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/ModifyVnfInfoDataTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/ModifyVnfInfoDataTest.java
deleted file mode 100644
index c300923857..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/ModifyVnfInfoDataTest.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import org.junit.Test;
-import java.util.HashMap;
-import static org.junit.Assert.*;
-
-public class ModifyVnfInfoDataTest {
- ModifyVnfInfoData modifyVnfInfoData = new ModifyVnfInfoData();
-
- @Test
- public void getVnfInstanceId() {
- modifyVnfInfoData.getVnfInstanceId();
- }
-
- @Test
- public void setVnfInstanceId() {
- modifyVnfInfoData.setVnfInstanceId("c9f0a95e-dea0-4698-96e5-5a79bc5a233d");
- }
-
- @Test
- public void getVnfInstanceName() {
- modifyVnfInfoData.getVnfInstanceName();
- }
-
- @Test
- public void setVnfInstanceName() {
- modifyVnfInfoData.setVnfInstanceName("Dummy vnfInstanceName");
- }
-
- @Test
- public void getVnfInstanceDescription() {
- modifyVnfInfoData.getVnfInstanceDescription();
- }
-
- @Test
- public void setVnfInstanceDescription() {
- modifyVnfInfoData.setVnfInstanceDescription("Dummy vnfInstanceDescription");
- }
-
- @Test
- public void getVnfPkgId() {
- modifyVnfInfoData.getVnfPkgId();
- }
-
- @Test
- public void setVnfPkgId() {
- modifyVnfInfoData.setVnfPkgId("c9f0a95e-dea0-4698-96e5-5a79bc5a233d");
- }
-
- @Test
- public void getVnfConfigurableProperties() {
- modifyVnfInfoData.getVnfConfigurableProperties();
- }
-
- @Test
- public void setVnfConfigurableProperties() {
- modifyVnfInfoData.setVnfConfigurableProperties(new HashMap<>());
- }
-
- @Test
- public void getMetadata() {
- modifyVnfInfoData.getMetadata();
- }
-
- @Test
- public void setMetadata() {
- modifyVnfInfoData.setMetadata(new HashMap<>());
- }
-
- @Test
- public void getExtensions() {
- modifyVnfInfoData.getExtensions();
- }
-
- @Test
- public void setExtensions() {
- modifyVnfInfoData.setExtensions(new HashMap<>());
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/NSResourceInputParameterTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/NSResourceInputParameterTest.java
deleted file mode 100644
index 082d4e69f4..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/NSResourceInputParameterTest.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.adapters.vfc.model;
-
-import org.junit.Test;
-
-public class NSResourceInputParameterTest {
- // TODO: following test case is done for coverage
- // later it should be modified for proper test.
- NSResourceInputParameter nsResourceInputParameter = new NSResourceInputParameter();
-
- @Test
- public void getNsServiceName() throws Exception {
- nsResourceInputParameter.getNsServiceName();
- }
-
- @Test
- public void setNsServiceName() throws Exception {
- nsResourceInputParameter.setNsServiceName("service");
- }
-
- @Test
- public void getNsServiceDescription() throws Exception {
- nsResourceInputParameter.getNsServiceDescription();
- }
-
- @Test
- public void setNsServiceDescription() throws Exception {
- nsResourceInputParameter.setNsServiceDescription("desc");
- }
-
- @Test
- public void getNsParameters() throws Exception {
- nsResourceInputParameter.getNsParameters();
- }
-
- @Test
- public void setNsParameters() throws Exception {
- nsResourceInputParameter.setNsParameters(new NsParameters());
- }
-
- @Test
- public void getNsOperationKey() throws Exception {
- nsResourceInputParameter.getNsOperationKey();
- }
-
- @Test
- public void setNsOperationKey() throws Exception {
- nsResourceInputParameter.setNsOperationKey(new NsOperationKey());
- }
-
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/NsCreateReqTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/NsCreateReqTest.java
deleted file mode 100644
index c2e6b583af..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/NsCreateReqTest.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.adapters.vfc.model;
-
-import org.junit.Test;
-
-public class NsCreateReqTest {
- // TODO: following test case is done for coverage
- // later it should be modified for proper test.
- NsCreateReq nsCreateReq = new NsCreateReq();
-
- @Test
- public void getContext() throws Exception {
- nsCreateReq.getContext();
- }
-
- @Test
- public void setContext() throws Exception {
- nsCreateReq.setContext(new CustomerModel());
- }
-
- @Test
- public void getCsarId() throws Exception {
- nsCreateReq.getCsarId();
- }
-
- @Test
- public void setCsarId() throws Exception {
- nsCreateReq.setCsarId("csarid");
- }
-
- @Test
- public void getNsName() throws Exception {
- nsCreateReq.getNsName();
- }
-
- @Test
- public void setNsName() throws Exception {
- nsCreateReq.setNsName("nsname");
- }
-
- @Test
- public void getDescription() throws Exception {
- nsCreateReq.getDescription();
- }
-
- @Test
- public void setDescription() throws Exception {
- nsCreateReq.setDescription("desc");
- }
-
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/NsInstantiateReqTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/NsInstantiateReqTest.java
deleted file mode 100644
index 70e54a1c09..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/NsInstantiateReqTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.adapters.vfc.model;
-
-import org.junit.Test;
-
-public class NsInstantiateReqTest {
- // TODO: following test case is done for coverage
- // later it should be modified for proper test.
- NsInstantiateReq nsInstantiateReq = new NsInstantiateReq();
-
- @Test
- public void getNsInstanceId() throws Exception {
- nsInstantiateReq.getNsInstanceId();
- }
-
- @Test
- public void setNsInstanceId() throws Exception {
- nsInstantiateReq.setNsInstanceId("test");
- }
-
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/NsLcmOpOccTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/NsLcmOpOccTest.java
deleted file mode 100644
index f5d485a8c7..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/NsLcmOpOccTest.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import org.junit.Test;
-import org.onap.so.adapters.vfc.constant.CommonConstant;
-import java.time.LocalDateTime;
-import java.util.Date;
-import static org.junit.Assert.*;
-
-public class NsLcmOpOccTest {
- NsLcmOpOcc nsLcmOpOcc = new NsLcmOpOcc();
-
- @Test
- public void getLcmOperationType() {
- nsLcmOpOcc.getLcmOperationType();
- }
-
- @Test
- public void setLcmOperationType() {
- nsLcmOpOcc.setLcmOperationType(CommonConstant.lcmOperationType.INSTANTIATE);
- }
-
- @Test
- public void getCancelMode() {
- nsLcmOpOcc.getCancelMode();
- }
-
- @Test
- public void setCancelMode() {
- nsLcmOpOcc.setCancelMode(CommonConstant.cancelMode.GRACEFUL);
- }
-
- @Test
- public void getOperationState() {
- nsLcmOpOcc.getOperationState();
- }
-
- @Test
- public void setOperationState() {
- nsLcmOpOcc.setOperationState(CommonConstant.operationState.COMPLETED);
- }
-
- @Test
- public void getId() {
- nsLcmOpOcc.getId();
- }
-
- @Test
- public void setId() {
- nsLcmOpOcc.setId("c9f0a95e-dea0-4698-96e5-5a79bc5a233d");
- }
-
- @Test
- public void getStatusEnteredTime() {
- nsLcmOpOcc.getStatusEnteredTime();
- }
-
- @Test
- public void setStatusEnteredTime() {
- nsLcmOpOcc.setStatusEnteredTime(LocalDateTime.now().toString());
- }
-
- @Test
- public void getNsInstanceId() {
- nsLcmOpOcc.getNsInstanceId();
- }
-
- @Test
- public void setNsInstanceId() {
- nsLcmOpOcc.setNsInstanceId("c9f0a95e-dea0-4698-96e5-5a79bc5a233d");
- }
-
- @Test
- public void getStartTime() {
- nsLcmOpOcc.getStartTime();
- }
-
- @Test
- public void setStartTime() {
- nsLcmOpOcc.setStartTime(LocalDateTime.now().toString());
- }
-
- @Test
- public void getAutomaticInvocation() {
- nsLcmOpOcc.getAutomaticInvocation();
- }
-
- @Test
- public void setAutomaticInvocation() {
- nsLcmOpOcc.setAutomaticInvocation(true);
- }
-
- @Test
- public void getOperationParams() {
- nsLcmOpOcc.getOperationParams();
- }
-
- @Test
- public void setOperationParams() {
- nsLcmOpOcc.setOperationParams("Dummy operationParams");
- }
-
- @Test
- public void getCancelPending() {
- nsLcmOpOcc.getCancelPending();
- }
-
- @Test
- public void setCancelPending() {
- nsLcmOpOcc.setCancelPending(true);
- }
-
- @Test
- public void getError() {
- nsLcmOpOcc.getError();
- }
-
- @Test
- public void setError() {
- nsLcmOpOcc.setError(new ProblemDetails());
- }
-
- @Test
- public void getLinks() {
- nsLcmOpOcc.getLinks();
- }
-
- @Test
- public void setLinks() {
- nsLcmOpOcc.setLinks(new Links());
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/NsOperationKeyTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/NsOperationKeyTest.java
deleted file mode 100644
index a8939f8996..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/NsOperationKeyTest.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.adapters.vfc.model;
-
-import org.junit.Test;
-
-public class NsOperationKeyTest {
- // TODO: following test case is done for coverage
- // later it should be modified for proper test.
- NsOperationKey nsOperationKey = new NsOperationKey();
-
- @Test
- public void getGlobalSubscriberId() throws Exception {
- nsOperationKey.getGlobalSubscriberId();
- }
-
- @Test
- public void setGlobalSubscriberId() throws Exception {
- nsOperationKey.setGlobalSubscriberId("subscriberid");
- }
-
- @Test
- public void getServiceType() throws Exception {
- nsOperationKey.getServiceType();
- }
-
- @Test
- public void setServiceType() throws Exception {
- nsOperationKey.setServiceType("servicetype");
- }
-
- @Test
- public void getServiceId() throws Exception {
- nsOperationKey.getServiceId();
- }
-
- @Test
- public void setServiceId() throws Exception {
- nsOperationKey.setServiceId("serviceid");
- }
-
- @Test
- public void getOperationId() throws Exception {
- nsOperationKey.getOperationId();
- }
-
- @Test
- public void setOperationId() throws Exception {
- nsOperationKey.setOperationId("test");
- }
-
- @Test
- public void getNodeTemplateUUID() throws Exception {
- nsOperationKey.getNodeTemplateUUID();
- }
-
- @Test
- public void setNodeTemplateUUID() throws Exception {
- nsOperationKey.setNodeTemplateUUID("nodeTemplateid");
- }
-
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/NsParametersTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/NsParametersTest.java
deleted file mode 100644
index 45c46edd0d..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/NsParametersTest.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.adapters.vfc.model;
-
-import org.junit.Test;
-import java.util.Collections;
-import java.util.HashMap;
-
-public class NsParametersTest {
- // TODO: following test case is done for coverage
- // later it should be modified for proper test.
- NsParameters nsParameters = new NsParameters();
-
- @Test
- public void getLocationConstraints() throws Exception {
- nsParameters.getLocationConstraints();
- }
-
- @Test
- public void setLocationConstraints() throws Exception {
- nsParameters.setLocationConstraints(Collections.emptyList());
- }
-
- @Test
- public void getAdditionalParamForNs() throws Exception {
- nsParameters.getAdditionalParamForNs();
- }
-
- @Test
- public void setAdditionalParamForNs() throws Exception {
- nsParameters.setAdditionalParamForNs(new HashMap<>());
- }
-
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/NsProgressStatusTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/NsProgressStatusTest.java
deleted file mode 100644
index b1040ef463..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/NsProgressStatusTest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.adapters.vfc.model;
-
-import org.junit.Test;
-import java.util.Arrays;
-
-public class NsProgressStatusTest {
- // TODO: following test case is done for coverage
- // later it should be modified for proper test.
- NsProgressStatus nsProgressStatus = new NsProgressStatus();
-
- @Test
- public void getJobId() throws Exception {
- nsProgressStatus.getJobId();
- }
-
- @Test
- public void setJobId() throws Exception {
- nsProgressStatus.setJobId("jobid");
- }
-
- @Test
- public void getResponseDescriptor() throws Exception {
- nsProgressStatus.getResponseDescriptor();
- }
-
- @Test
- public void setResponseDescriptor() throws Exception {
- nsProgressStatus.setResponseDescriptor(new ResponseDescriptor());
- }
-
- @Test
- public void getResponseHistoryList() throws Exception {
- nsProgressStatus.getResponseHistoryList();
- }
-
- @Test
- public void setResponseHistoryList() throws Exception {
- nsProgressStatus.setResponseHistoryList(Arrays.asList(new ResponseDescriptor()));
- }
-
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/ParamsForVnfTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/ParamsForVnfTest.java
deleted file mode 100644
index e0455b0728..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/ParamsForVnfTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import org.junit.Test;
-import java.util.HashMap;
-import static org.junit.Assert.*;
-
-public class ParamsForVnfTest {
-
- ParamsForVnf paramsForVnf = new ParamsForVnf();
-
- @Test
- public void getVnfProfileId() {
- paramsForVnf.getVnfProfileId();
- }
-
- @Test
- public void setVnfProfileId() {
- paramsForVnf.setVnfProfileId("c9f0a95e-dea0-4698-96e5-5a79bc5a233d");
- }
-
- @Test
- public void getAdditionalParams() {
- paramsForVnf.getAdditionalParams();
- }
-
- @Test
- public void setAdditionalParams() {
- paramsForVnf.setAdditionalParams(new HashMap<>());
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/PnfExtCpDataTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/PnfExtCpDataTest.java
deleted file mode 100644
index c586c7eb65..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/PnfExtCpDataTest.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import org.junit.Test;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ListIterator;
-import static org.junit.Assert.*;
-
-public class PnfExtCpDataTest {
- PnfExtCpData pnfExtCpData = new PnfExtCpData();
-
- @Test
- public void getCpInstanceI16() {
- pnfExtCpData.getCpInstanceI16();
- }
-
- @Test
- public void setCpInstanceI16() {
- pnfExtCpData.setCpInstanceI16("c9f0a95e-dea0-4698-96e5-5a79bc5a233d");
- }
-
- @Test
- public void getCpdId() {
- pnfExtCpData.getCpdId();
- }
-
- @Test
- public void setCpdId() {
- pnfExtCpData.setCpdId("c9f0a95e-dea0-4698-96e5-5a79bc5a233d");
- }
-
- @Test
- public void getCpProtocolData() {
- pnfExtCpData.getCpProtocolData();
- }
-
- @Test
- public void setCpProtocolData() {
- pnfExtCpData.setCpProtocolData(new List<CpProtocolData>() {
- @Override
- public int size() {
- return 0;
- }
-
- @Override
- public boolean isEmpty() {
- return false;
- }
-
- @Override
- public boolean contains(Object o) {
- return false;
- }
-
- @Override
- public Iterator<CpProtocolData> iterator() {
- return null;
- }
-
- @Override
- public Object[] toArray() {
- return new Object[0];
- }
-
- @Override
- public <T> T[] toArray(T[] a) {
- return null;
- }
-
- @Override
- public boolean add(CpProtocolData cpProtocolData) {
- return false;
- }
-
- @Override
- public boolean remove(Object o) {
- return false;
- }
-
- @Override
- public boolean containsAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public boolean addAll(Collection<? extends CpProtocolData> c) {
- return false;
- }
-
- @Override
- public boolean addAll(int index, Collection<? extends CpProtocolData> c) {
- return false;
- }
-
- @Override
- public boolean removeAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public boolean retainAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public void clear() {
-
- }
-
- @Override
- public CpProtocolData get(int index) {
- return null;
- }
-
- @Override
- public CpProtocolData set(int index, CpProtocolData element) {
- return null;
- }
-
- @Override
- public void add(int index, CpProtocolData element) {
-
- }
-
- @Override
- public CpProtocolData remove(int index) {
- return null;
- }
-
- @Override
- public int indexOf(Object o) {
- return 0;
- }
-
- @Override
- public int lastIndexOf(Object o) {
- return 0;
- }
-
- @Override
- public ListIterator<CpProtocolData> listIterator() {
- return null;
- }
-
- @Override
- public ListIterator<CpProtocolData> listIterator(int index) {
- return null;
- }
-
- @Override
- public List<CpProtocolData> subList(int fromIndex, int toIndex) {
- return null;
- }
- });
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/ProblemDetailsTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/ProblemDetailsTest.java
deleted file mode 100644
index ddea6cca40..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/ProblemDetailsTest.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-public class ProblemDetailsTest {
- ProblemDetails problemDetails = new ProblemDetails();
-
- @Test
- public void getType() {
- problemDetails.getType();
- }
-
- @Test
- public void setType() {
- problemDetails.setType("Dummy Type");
- }
-
- @Test
- public void getTitle() {
- problemDetails.getTitle();
- }
-
- @Test
- public void setTitle() {
- problemDetails.setTitle("Dummy Title");
- }
-
- @Test
- public void getStatus() {
- problemDetails.getStatus();
- }
-
- @Test
- public void setStatus() {
- problemDetails.setStatus(200);
- }
-
- @Test
- public void getDetail() {
- problemDetails.getDetail();
- }
-
- @Test
- public void setDetail() {
- problemDetails.setTitle("Dummy Title");
- }
-
- @Test
- public void getInstance() {
- problemDetails.getInstance();
- }
-
- @Test
- public void setInstance() {
- problemDetails.setInstance("c9f0a95e-dea0-4698-96e5-5a79bc5a233d");
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/ResourceChangesTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/ResourceChangesTest.java
deleted file mode 100644
index 9c4a0295e6..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/ResourceChangesTest.java
+++ /dev/null
@@ -1,773 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import org.junit.Test;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ListIterator;
-import static org.junit.Assert.*;
-
-public class ResourceChangesTest {
- ResourceChanges resourceChanges = new ResourceChanges();
-
- @Test
- public void getAffectedVnfs() {
- resourceChanges.getAffectedVnfs();
- }
-
- @Test
- public void setAffectedVnfs() {
- resourceChanges.setAffectedVnfs(new List<AffectedVnf>() {
- @Override
- public int size() {
- return 0;
- }
-
- @Override
- public boolean isEmpty() {
- return false;
- }
-
- @Override
- public boolean contains(Object o) {
- return false;
- }
-
- @Override
- public Iterator<AffectedVnf> iterator() {
- return null;
- }
-
- @Override
- public Object[] toArray() {
- return new Object[0];
- }
-
- @Override
- public <T> T[] toArray(T[] a) {
- return null;
- }
-
- @Override
- public boolean add(AffectedVnf affectedVnf) {
- return false;
- }
-
- @Override
- public boolean remove(Object o) {
- return false;
- }
-
- @Override
- public boolean containsAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public boolean addAll(Collection<? extends AffectedVnf> c) {
- return false;
- }
-
- @Override
- public boolean addAll(int index, Collection<? extends AffectedVnf> c) {
- return false;
- }
-
- @Override
- public boolean removeAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public boolean retainAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public void clear() {
-
- }
-
- @Override
- public AffectedVnf get(int index) {
- return null;
- }
-
- @Override
- public AffectedVnf set(int index, AffectedVnf element) {
- return null;
- }
-
- @Override
- public void add(int index, AffectedVnf element) {
-
- }
-
- @Override
- public AffectedVnf remove(int index) {
- return null;
- }
-
- @Override
- public int indexOf(Object o) {
- return 0;
- }
-
- @Override
- public int lastIndexOf(Object o) {
- return 0;
- }
-
- @Override
- public ListIterator<AffectedVnf> listIterator() {
- return null;
- }
-
- @Override
- public ListIterator<AffectedVnf> listIterator(int index) {
- return null;
- }
-
- @Override
- public List<AffectedVnf> subList(int fromIndex, int toIndex) {
- return null;
- }
- });
- }
-
- @Test
- public void getAffectedPnfs() {
- resourceChanges.getAffectedPnfs();
- }
-
- @Test
- public void setAffectedPnfs() {
- resourceChanges.setAffectedPnfs(new List<AffectedPnf>() {
- @Override
- public int size() {
- return 0;
- }
-
- @Override
- public boolean isEmpty() {
- return false;
- }
-
- @Override
- public boolean contains(Object o) {
- return false;
- }
-
- @Override
- public Iterator<AffectedPnf> iterator() {
- return null;
- }
-
- @Override
- public Object[] toArray() {
- return new Object[0];
- }
-
- @Override
- public <T> T[] toArray(T[] a) {
- return null;
- }
-
- @Override
- public boolean add(AffectedPnf affectedPnf) {
- return false;
- }
-
- @Override
- public boolean remove(Object o) {
- return false;
- }
-
- @Override
- public boolean containsAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public boolean addAll(Collection<? extends AffectedPnf> c) {
- return false;
- }
-
- @Override
- public boolean addAll(int index, Collection<? extends AffectedPnf> c) {
- return false;
- }
-
- @Override
- public boolean removeAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public boolean retainAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public void clear() {
-
- }
-
- @Override
- public AffectedPnf get(int index) {
- return null;
- }
-
- @Override
- public AffectedPnf set(int index, AffectedPnf element) {
- return null;
- }
-
- @Override
- public void add(int index, AffectedPnf element) {
-
- }
-
- @Override
- public AffectedPnf remove(int index) {
- return null;
- }
-
- @Override
- public int indexOf(Object o) {
- return 0;
- }
-
- @Override
- public int lastIndexOf(Object o) {
- return 0;
- }
-
- @Override
- public ListIterator<AffectedPnf> listIterator() {
- return null;
- }
-
- @Override
- public ListIterator<AffectedPnf> listIterator(int index) {
- return null;
- }
-
- @Override
- public List<AffectedPnf> subList(int fromIndex, int toIndex) {
- return null;
- }
- });
- }
-
- @Test
- public void getAffectedVls() {
- resourceChanges.getAffectedVls();
- }
-
- @Test
- public void setAffectedVls() {
- resourceChanges.setAffectedVls(new List<AffectedVirtualLink>() {
- @Override
- public int size() {
- return 0;
- }
-
- @Override
- public boolean isEmpty() {
- return false;
- }
-
- @Override
- public boolean contains(Object o) {
- return false;
- }
-
- @Override
- public Iterator<AffectedVirtualLink> iterator() {
- return null;
- }
-
- @Override
- public Object[] toArray() {
- return new Object[0];
- }
-
- @Override
- public <T> T[] toArray(T[] a) {
- return null;
- }
-
- @Override
- public boolean add(AffectedVirtualLink affectedVirtualLink) {
- return false;
- }
-
- @Override
- public boolean remove(Object o) {
- return false;
- }
-
- @Override
- public boolean containsAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public boolean addAll(Collection<? extends AffectedVirtualLink> c) {
- return false;
- }
-
- @Override
- public boolean addAll(int index, Collection<? extends AffectedVirtualLink> c) {
- return false;
- }
-
- @Override
- public boolean removeAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public boolean retainAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public void clear() {
-
- }
-
- @Override
- public AffectedVirtualLink get(int index) {
- return null;
- }
-
- @Override
- public AffectedVirtualLink set(int index, AffectedVirtualLink element) {
- return null;
- }
-
- @Override
- public void add(int index, AffectedVirtualLink element) {
-
- }
-
- @Override
- public AffectedVirtualLink remove(int index) {
- return null;
- }
-
- @Override
- public int indexOf(Object o) {
- return 0;
- }
-
- @Override
- public int lastIndexOf(Object o) {
- return 0;
- }
-
- @Override
- public ListIterator<AffectedVirtualLink> listIterator() {
- return null;
- }
-
- @Override
- public ListIterator<AffectedVirtualLink> listIterator(int index) {
- return null;
- }
-
- @Override
- public List<AffectedVirtualLink> subList(int fromIndex, int toIndex) {
- return null;
- }
- });
- }
-
- @Test
- public void getAffectedVnffgs() {
- resourceChanges.getAffectedVnffgs();
- }
-
- @Test
- public void setAffectedVnffgs() {
- resourceChanges.setAffectedVnffgs(new List<AffectedVnffg>() {
- @Override
- public int size() {
- return 0;
- }
-
- @Override
- public boolean isEmpty() {
- return false;
- }
-
- @Override
- public boolean contains(Object o) {
- return false;
- }
-
- @Override
- public Iterator<AffectedVnffg> iterator() {
- return null;
- }
-
- @Override
- public Object[] toArray() {
- return new Object[0];
- }
-
- @Override
- public <T> T[] toArray(T[] a) {
- return null;
- }
-
- @Override
- public boolean add(AffectedVnffg affectedVnffg) {
- return false;
- }
-
- @Override
- public boolean remove(Object o) {
- return false;
- }
-
- @Override
- public boolean containsAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public boolean addAll(Collection<? extends AffectedVnffg> c) {
- return false;
- }
-
- @Override
- public boolean addAll(int index, Collection<? extends AffectedVnffg> c) {
- return false;
- }
-
- @Override
- public boolean removeAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public boolean retainAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public void clear() {
-
- }
-
- @Override
- public AffectedVnffg get(int index) {
- return null;
- }
-
- @Override
- public AffectedVnffg set(int index, AffectedVnffg element) {
- return null;
- }
-
- @Override
- public void add(int index, AffectedVnffg element) {
-
- }
-
- @Override
- public AffectedVnffg remove(int index) {
- return null;
- }
-
- @Override
- public int indexOf(Object o) {
- return 0;
- }
-
- @Override
- public int lastIndexOf(Object o) {
- return 0;
- }
-
- @Override
- public ListIterator<AffectedVnffg> listIterator() {
- return null;
- }
-
- @Override
- public ListIterator<AffectedVnffg> listIterator(int index) {
- return null;
- }
-
- @Override
- public List<AffectedVnffg> subList(int fromIndex, int toIndex) {
- return null;
- }
- });
- }
-
- @Test
- public void getAffectedNss() {
- resourceChanges.getAffectedNss();
- }
-
- @Test
- public void setAffectedNss() {
- resourceChanges.setAffectedNss(new List<AffectedNs>() {
- @Override
- public int size() {
- return 0;
- }
-
- @Override
- public boolean isEmpty() {
- return false;
- }
-
- @Override
- public boolean contains(Object o) {
- return false;
- }
-
- @Override
- public Iterator<AffectedNs> iterator() {
- return null;
- }
-
- @Override
- public Object[] toArray() {
- return new Object[0];
- }
-
- @Override
- public <T> T[] toArray(T[] a) {
- return null;
- }
-
- @Override
- public boolean add(AffectedNs affectedNs) {
- return false;
- }
-
- @Override
- public boolean remove(Object o) {
- return false;
- }
-
- @Override
- public boolean containsAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public boolean addAll(Collection<? extends AffectedNs> c) {
- return false;
- }
-
- @Override
- public boolean addAll(int index, Collection<? extends AffectedNs> c) {
- return false;
- }
-
- @Override
- public boolean removeAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public boolean retainAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public void clear() {
-
- }
-
- @Override
- public AffectedNs get(int index) {
- return null;
- }
-
- @Override
- public AffectedNs set(int index, AffectedNs element) {
- return null;
- }
-
- @Override
- public void add(int index, AffectedNs element) {
-
- }
-
- @Override
- public AffectedNs remove(int index) {
- return null;
- }
-
- @Override
- public int indexOf(Object o) {
- return 0;
- }
-
- @Override
- public int lastIndexOf(Object o) {
- return 0;
- }
-
- @Override
- public ListIterator<AffectedNs> listIterator() {
- return null;
- }
-
- @Override
- public ListIterator<AffectedNs> listIterator(int index) {
- return null;
- }
-
- @Override
- public List<AffectedNs> subList(int fromIndex, int toIndex) {
- return null;
- }
- });
- }
-
- @Test
- public void getAffectedSaps() {
- resourceChanges.getAffectedSaps();
- }
-
- @Test
- public void setAffectedSaps() {
- resourceChanges.setAffectedSaps(new List<AffectedSap>() {
- @Override
- public int size() {
- return 0;
- }
-
- @Override
- public boolean isEmpty() {
- return false;
- }
-
- @Override
- public boolean contains(Object o) {
- return false;
- }
-
- @Override
- public Iterator<AffectedSap> iterator() {
- return null;
- }
-
- @Override
- public Object[] toArray() {
- return new Object[0];
- }
-
- @Override
- public <T> T[] toArray(T[] a) {
- return null;
- }
-
- @Override
- public boolean add(AffectedSap affectedSap) {
- return false;
- }
-
- @Override
- public boolean remove(Object o) {
- return false;
- }
-
- @Override
- public boolean containsAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public boolean addAll(Collection<? extends AffectedSap> c) {
- return false;
- }
-
- @Override
- public boolean addAll(int index, Collection<? extends AffectedSap> c) {
- return false;
- }
-
- @Override
- public boolean removeAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public boolean retainAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public void clear() {
-
- }
-
- @Override
- public AffectedSap get(int index) {
- return null;
- }
-
- @Override
- public AffectedSap set(int index, AffectedSap element) {
- return null;
- }
-
- @Override
- public void add(int index, AffectedSap element) {
-
- }
-
- @Override
- public AffectedSap remove(int index) {
- return null;
- }
-
- @Override
- public int indexOf(Object o) {
- return 0;
- }
-
- @Override
- public int lastIndexOf(Object o) {
- return 0;
- }
-
- @Override
- public ListIterator<AffectedSap> listIterator() {
- return null;
- }
-
- @Override
- public ListIterator<AffectedSap> listIterator(int index) {
- return null;
- }
-
- @Override
- public List<AffectedSap> subList(int fromIndex, int toIndex) {
- return null;
- }
- });
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/ResourceHandleTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/ResourceHandleTest.java
deleted file mode 100644
index 6390c5afbd..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/ResourceHandleTest.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-public class ResourceHandleTest {
- ResourceHandle resourceHandle = new ResourceHandle();
-
- @Test
- public void getVimId() {
- resourceHandle.getVimId();
- }
-
- @Test
- public void setVimId() {
- resourceHandle.setVimId("c9f0a95e-dea0-4698-96e5-5a79bc5a233d");
- }
-
- @Test
- public void getResourceProviderId() {
- resourceHandle.getResourceProviderId();
- }
-
- @Test
- public void setResourceProviderId() {
- resourceHandle.setResourceProviderId("c9f0a95e-dea0-4698-96e5-5a79bc5a233d");
- }
-
- @Test
- public void getResourceId() {
- resourceHandle.getResourceId();
- }
-
- @Test
- public void setResourceId() {
- resourceHandle.setResourceId("c9f0a95e-dea0-4698-96e5-5a79bc5a233d");
- }
-
- @Test
- public void getVimLevelResourceType() {
- resourceHandle.getVimLevelResourceType();
- }
-
- @Test
- public void setVimLevelResourceType() {
- resourceHandle.setVimLevelResourceType("c9f0a95e-dea0-4698-96e5-5a79bc5a233d");
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/ResponseDescriptorTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/ResponseDescriptorTest.java
deleted file mode 100644
index 3f2f73531c..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/ResponseDescriptorTest.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.adapters.vfc.model;
-
-import org.junit.Test;
-
-public class ResponseDescriptorTest {
- // TODO: following test case is done for coverage
- // later it should be modified for proper test.
- ResponseDescriptor responseDescriptor = new ResponseDescriptor();
-
- @Test
- public void getStatus() throws Exception {
- responseDescriptor.getStatus();
- }
-
- @Test
- public void setStatus() throws Exception {
- responseDescriptor.setStatus("test");
- }
-
- @Test
- public void getProgress() throws Exception {
- responseDescriptor.getProgress();
- }
-
- @Test
- public void setProgress() throws Exception {
- responseDescriptor.setProgress("10");
- }
-
- @Test
- public void getStatusDescription() throws Exception {
- responseDescriptor.getStatusDescription();
- }
-
- @Test
- public void setStatusDescription() throws Exception {
- responseDescriptor.setStatusDescription("test");
- }
-
- @Test
- public void getErrorCode() throws Exception {
- responseDescriptor.getErrorCode();
- }
-
- @Test
- public void setErrorCode() throws Exception {
- responseDescriptor.setErrorCode(-1);
- }
-
- @Test
- public void getResponseId() throws Exception {
- responseDescriptor.getResponseId();
- }
-
- @Test
- public void setResponseId() throws Exception {
- responseDescriptor.setResponseId(1);
- }
-
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/RestfulResponseTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/RestfulResponseTest.java
deleted file mode 100644
index 64f8da65b4..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/RestfulResponseTest.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.adapters.vfc.model;
-
-import org.junit.Test;
-import java.util.HashMap;
-
-public class RestfulResponseTest {
- // TODO: following test case is done for coverage
- // later it should be modified for proper test.
- RestfulResponse restfulResponse = new RestfulResponse();
-
- @Test
- public void getStatus() throws Exception {
- restfulResponse.getStatus();
- }
-
- @Test
- public void setStatus() throws Exception {
- restfulResponse.setStatus(1);
- }
-
- @Test
- public void getRespHeaderMap() throws Exception {
- restfulResponse.getRespHeaderMap();
- }
-
- @Test
- public void setRespHeaderMap() throws Exception {
- restfulResponse.setRespHeaderMap(new HashMap<>());
- }
-
- @Test
- public void getRespHeaderInt() throws Exception {
- restfulResponse.getRespHeaderInt("1");
- }
-
- @Test
- public void getRespHeaderLong() throws Exception {
- restfulResponse.getRespHeaderLong("1");
- }
-
- @Test
- public void getRespHeaderStr() throws Exception {
- restfulResponse.getRespHeaderStr("test");
- }
-
- @Test
- public void getResponseContent() throws Exception {
- restfulResponse.getResponseContent();
- }
-
- @Test
- public void setResponseContent() throws Exception {
- restfulResponse.setResponseContent("responseString");
- }
-
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/SapDataTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/SapDataTest.java
deleted file mode 100644
index 2a455994b8..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/SapDataTest.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import org.junit.Test;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ListIterator;
-import static org.junit.Assert.*;
-
-public class SapDataTest {
-
- SapData sapData = new SapData();
-
- @Test
- public void getSapdId() {
- sapData.getSapdId();
- }
-
- @Test
- public void setSapdId() {
- sapData.setSapdId("c9f0a95e-dea0-4698-96e5-5a79bc5a233d");
- }
-
- @Test
- public void getSapName() {
- sapData.getSapName();
- }
-
- @Test
- public void setSapName() {
- sapData.setSapName("Dummy SapName");
- }
-
- @Test
- public void getDescription() {
- sapData.getDescription();
- }
-
- @Test
- public void setDescription() {
- sapData.setDescription("Dummy Description");
- }
-
- @Test
- public void getSapProtocolData() {
- sapData.getSapProtocolData();
- }
-
- @Test
- public void setSapProtocolData() {
- sapData.setSapProtocolData(new List<CpProtocolData>() {
- @Override
- public int size() {
- return 0;
- }
-
- @Override
- public boolean isEmpty() {
- return false;
- }
-
- @Override
- public boolean contains(Object o) {
- return false;
- }
-
- @Override
- public Iterator<CpProtocolData> iterator() {
- return null;
- }
-
- @Override
- public Object[] toArray() {
- return new Object[0];
- }
-
- @Override
- public <T> T[] toArray(T[] a) {
- return null;
- }
-
- @Override
- public boolean add(CpProtocolData cpProtocolData) {
- return false;
- }
-
- @Override
- public boolean remove(Object o) {
- return false;
- }
-
- @Override
- public boolean containsAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public boolean addAll(Collection<? extends CpProtocolData> c) {
- return false;
- }
-
- @Override
- public boolean addAll(int index, Collection<? extends CpProtocolData> c) {
- return false;
- }
-
- @Override
- public boolean removeAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public boolean retainAll(Collection<?> c) {
- return false;
- }
-
- @Override
- public void clear() {
-
- }
-
- @Override
- public CpProtocolData get(int index) {
- return null;
- }
-
- @Override
- public CpProtocolData set(int index, CpProtocolData element) {
- return null;
- }
-
- @Override
- public void add(int index, CpProtocolData element) {
-
- }
-
- @Override
- public CpProtocolData remove(int index) {
- return null;
- }
-
- @Override
- public int indexOf(Object o) {
- return 0;
- }
-
- @Override
- public int lastIndexOf(Object o) {
- return 0;
- }
-
- @Override
- public ListIterator<CpProtocolData> listIterator() {
- return null;
- }
-
- @Override
- public ListIterator<CpProtocolData> listIterator(int index) {
- return null;
- }
-
- @Override
- public List<CpProtocolData> subList(int fromIndex, int toIndex) {
- return null;
- }
- });
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/VimLocationTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/VimLocationTest.java
deleted file mode 100644
index 85d3a136af..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/VimLocationTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */package org.onap.so.adapters.vfc.model;
-
-import org.junit.Test;
-
-public class VimLocationTest {
- // TODO: following test case is done for coverage
- // later it should be modified for proper test.
- VimLocation vimLocation = new VimLocation();
-
- @Test
- public void getVimId() throws Exception {
- vimLocation.getVimId();
- }
-
- @Test
- public void setVimId() throws Exception {
- vimLocation.setVimId("vimid");
- }
-
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/VnfInstanceDataTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/VnfInstanceDataTest.java
deleted file mode 100644
index b9bdfe3f6e..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/VnfInstanceDataTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-public class VnfInstanceDataTest {
- VnfInstanceData vnfInstanceData = new VnfInstanceData();
-
- @Test
- public void getVnfInstanceId() {
- vnfInstanceData.getVnfInstanceId();
- }
-
- @Test
- public void setVnfInstanceId() {
- vnfInstanceData.setVnfInstanceId("c9f0a95e-dea0-4698-96e5-5a79bc5a233d");
- }
-
- @Test
- public void getVnfProfileId() {
- vnfInstanceData.getVnfProfileId();
- }
-
- @Test
- public void setVnfProfileId() {
- vnfInstanceData.setVnfProfileId("c9f0a95e-dea0-4698-96e5-5a79bc5a233d");
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/VnfLocationConstraintTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/VnfLocationConstraintTest.java
deleted file mode 100644
index b8f9b8e3e2..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/model/VnfLocationConstraintTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.model;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-public class VnfLocationConstraintTest {
- VnfLocationConstraint vnfLocationConstraint = new VnfLocationConstraint();
-
- @Test
- public void getVnfProfileId() {
- vnfLocationConstraint.getVnfProfileId();
- }
-
- @Test
- public void setVnfProfileId() {
- vnfLocationConstraint.setVnfProfileId("c9f0a95e-dea0-4698-96e5-5a79bc5a233d");
- }
-
- @Test
- public void getLocationConstraints() {
- vnfLocationConstraint.getLocationConstraints();
- }
-
- @Test
- public void setLocationConstraints() {
- vnfLocationConstraint.setLocationConstraints(new LocationConstraint());
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/rest/EmbeddedMariaDbConfig.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/rest/EmbeddedMariaDbConfig.java
deleted file mode 100644
index feb40f73e0..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/rest/EmbeddedMariaDbConfig.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.vfc.rest;
-
-import ch.vorburger.exec.ManagedProcessException;
-import ch.vorburger.mariadb4j.DBConfigurationBuilder;
-import ch.vorburger.mariadb4j.springframework.MariaDB4jSpringService;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.boot.jdbc.DataSourceBuilder;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Primary;
-import org.springframework.context.annotation.Profile;
-import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
-import org.springframework.orm.jpa.JpaTransactionManager;
-import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
-import org.springframework.transaction.PlatformTransactionManager;
-import org.springframework.transaction.annotation.EnableTransactionManagement;
-import javax.persistence.EntityManagerFactory;
-import javax.sql.DataSource;
-
-@Configuration
-@Profile({"test"})
-@EnableTransactionManagement
-@EnableJpaRepositories(entityManagerFactoryRef = "requestEntityManagerFactory",
- transactionManagerRef = "requestTransactionManager", basePackages = {"org.onap.so.db.request.data.repository"})
-public class EmbeddedMariaDbConfig {
-
- @Bean
- MariaDB4jSpringService mariaDB4jSpringService() {
- return new MariaDB4jSpringService();
- }
-
- @Primary
- @Bean(name = "requestDataSource")
- @ConfigurationProperties(prefix = "spring.datasource")
- DataSource dataSource(MariaDB4jSpringService mariaDB4jSpringService,
- @Value("${mariaDB4j.databaseName}") String databaseName,
- @Value("${spring.datasource.username}") String datasourceUsername,
- @Value("${spring.datasource.password}") String datasourcePassword,
- @Value("${spring.datasource.driver-class-name}") String datasourceDriver) throws ManagedProcessException {
- // Create our database with default root user and no password
- mariaDB4jSpringService.getDB().createDB(databaseName);
-
- DBConfigurationBuilder config = mariaDB4jSpringService.getConfiguration();
-
- return DataSourceBuilder.create().username(datasourceUsername).password(datasourcePassword)
- .url(config.getURL(databaseName)).driverClassName(datasourceDriver).build();
- }
-
- @Primary
- @Bean(name = "requestEntityManagerFactory")
- public LocalContainerEntityManagerFactoryBean entityManagerFactory(EntityManagerFactoryBuilder builder,
- @Qualifier("requestDataSource") DataSource dataSource) {
- return builder.dataSource(dataSource).packages("org.onap.so.db.request.beans").persistenceUnit("requestDB")
- .build();
- }
-
- @Primary
- @Bean(name = "requestTransactionManager")
- public PlatformTransactionManager transactionManager(
- @Qualifier("requestEntityManagerFactory") EntityManagerFactory entityManagerFactory) {
- return new JpaTransactionManager(entityManagerFactory);
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/rest/HealthCheckHandlerTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/rest/HealthCheckHandlerTest.java
deleted file mode 100644
index fe2bd0bb98..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/rest/HealthCheckHandlerTest.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.vfc.rest;
-
-import static org.junit.Assert.*;
-import javax.ws.rs.core.Response;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.onap.so.adapters.vfc.MSOVfcApplication;
-import org.springframework.boot.configurationprocessor.json.JSONException;
-import org.springframework.boot.web.server.LocalServerPort;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.boot.test.web.client.TestRestTemplate;
-import org.springframework.http.HttpEntity;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.HttpMethod;
-import org.springframework.http.ResponseEntity;
-import org.springframework.test.context.ActiveProfiles;
-import org.springframework.test.context.junit4.SpringRunner;
-
-
-@RunWith(SpringRunner.class)
-@SpringBootTest(classes = MSOVfcApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
-@ActiveProfiles("test")
-public class HealthCheckHandlerTest {
-
- @LocalServerPort
- private int port;
-
- TestRestTemplate restTemplate = new TestRestTemplate();
-
- HttpHeaders headers = new HttpHeaders();
-
-
- @Test
- public void testHealthcheck() throws JSONException {
-
- HttpEntity<String> entity = new HttpEntity<String>(null, headers);
-
- ResponseEntity<String> response =
- restTemplate.exchange(createURLWithPort("manage/health"), HttpMethod.GET, entity, String.class);
-
- assertEquals(Response.Status.OK.getStatusCode(), response.getStatusCode().value());
- }
-
- private String createURLWithPort(String uri) {
- return "http://localhost:" + port + uri;
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/rest/VfcManagerSol005Test.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/rest/VfcManagerSol005Test.java
deleted file mode 100644
index 799283ddb4..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/rest/VfcManagerSol005Test.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/*
- * Copyright (C) 2019 Verizon. All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-
-package org.onap.so.adapters.vfc.rest;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.InjectMocks;
-import org.mockito.Mock;
-import org.mockito.Mockito;
-import org.mockito.MockitoAnnotations;
-import org.onap.so.adapters.vfc.exceptions.ApplicationException;
-import org.onap.so.adapters.vfc.model.NSResourceInputParameter;
-import org.onap.so.adapters.vfc.model.RestfulResponse;
-import org.onap.so.adapters.vfc.util.JsonUtil;
-import org.onap.so.adapters.vfc.util.RestfulUtil;
-import org.onap.so.db.request.beans.InstanceNfvoMapping;
-import org.onap.so.db.request.beans.OperationStatus;
-import org.onap.so.db.request.beans.ResourceOperationStatus;
-import org.onap.so.db.request.data.repository.InstanceNfvoMappingRepository;
-import org.onap.so.db.request.data.repository.OperationStatusRepository;
-import org.onap.so.db.request.data.repository.ResourceOperationStatusRepository;
-import org.springframework.test.context.junit4.SpringRunner;
-import java.io.File;
-import java.nio.file.Files;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import static org.mockito.Mockito.when;
-
-@RunWith(SpringRunner.class)
-public class VfcManagerSol005Test {
- @InjectMocks
- VfcManagerSol005 vfcManagerSol005;
-
- @Mock
- InstanceNfvoMappingRepository instanceNfvoMappingRepository;
-
- @Mock
- ResourceOperationStatusRepository resourceOperationStatusRepository;
-
- @Mock
- OperationStatusRepository operationStatusRepository;
-
- @Mock
- RestfulUtil restfulUtil;
-
- OperationStatus operationStatus = new OperationStatus();
-
- InstanceNfvoMapping instanceNfvoMapping = new InstanceNfvoMapping();
- RestfulResponse restfulResponse = new RestfulResponse();
- RestfulResponse vfcrestfulResponse = new RestfulResponse();
- NSResourceInputParameter nsResourceInputParameter = new NSResourceInputParameter();
- ResourceOperationStatus resourceOperationStatus = new ResourceOperationStatus();
-
- @Test
- public void createNs() throws ApplicationException, Exception {
- restfulResponse.setStatus(200);
- ClassLoader classLoader = ClassLoader.getSystemClassLoader();
-
- File file = new File(classLoader.getResource("json/createNsReq.json").getFile());
- String content = new String(Files.readAllBytes(file.toPath())).replace("\n", "");
- nsResourceInputParameter = JsonUtil.unMarshal(content, NSResourceInputParameter.class);
- file = new File(classLoader.getResource("json/aainfvoResponse.json").getFile());
- content = new String(Files.readAllBytes(file.toPath())).replace("\n", "");
- restfulResponse.setResponseContent(content);
- // restfulResponse.setResponseContent("{\"nfvoId\":\"6ee79fe2-9579-475a-9bb9-20cf4358a19e\",\"name\":\"external_nfvo\",\"api-root\":\"xyz\",\"vendor\":\"vz\",\"version\":\"v1.0\",\"url\":\"http://sample.com/\",\"userName\":\"admin\",\"password\":\"sacjnasnc\"}");
- file = new File(classLoader.getResource("json/createNsSol005Response.json").getFile());
- content = new String(Files.readAllBytes(file.toPath())).replace("\n", "");
- vfcrestfulResponse.setStatus(202);
- vfcrestfulResponse.setResponseContent(content);
- // vfcrestfulResponse.setResponseContent("{\"_links\": {\"heal\": {\"href\": \"\"}, \"instantiate\": {\"href\":
- // \"\"}, \"nestedNsInstances\": {\"href\": \"\"}, \"scale\": {\"href\": \"\"}, \"self\": {\"href\": \"\"},
- // \"terminate\": {\"href\": \"\"}, \"update\": {\"href\": \"\"}}, \"additionalAffinityOrAntiAffiniityRule\":
- // [{\"Scope\": \"\", \"affinityOrAntiAffiinty\": \"\", \"vnfInstanceId\": [], \"vnfProfileId\": [], \"vnfdId\":
- // []}], \"flavourId\": \"\", \"id\": \"c9f0a95e-dea0-4698-96e5-5a79bc5a233d\", \"nestedNsInstanceId\": [],
- // \"nsInstanceDescription\": \"\", \"nsInstanceName\": \"\", \"nsScaleStatus\": [{\"nsScaleLevelId\": \"\",
- // \"nsScalingAspectId\": \"\"}], \"nsState\": \"\", \"nsdId\": \"\", \"nsdInfoId\": \"\", \"pnfInfo\":
- // [{\"cpInfo\": [{\"cpInstanceId\": \"\", \"cpProtocolData\": {\"ipOverEthernet\": {\"ipAddresses\":
- // {\"addressRange\": {\"maxAddress\": \"\", \"minAddress\": \"\"}, \"fixedAddresses\": \"\",
- // \"numDynamicAddresses\": 1, \"subnetId\": \"\", \"type\": \"\"}, \"macAddress\": {}}, \"layerProtocol\":
- // \"IP_OVER_ETHERNET\"}, \"cpdId\": \"\"}], \"pnfId\": \"\", \"pnfName\": \"\", \"pnfProfileId\": \"\",
- // \"pnfdId\": \"\", \"pnfdInfoId\": \"\"}], \"sapInfo\": [{\"description\": \"\", \"id\": \"\", \"sapName\":
- // \"\", \"sapProtocolInfo\": {\"ipOverEthernet\": {\"ipAddresses\": {\"addressRange\": {\"maxAddress\": \"\",
- // \"minAddress\": \"\"}, \"fixedAddresses\": \"\", \"numDynamicAddresses\": 1, \"subnetId\": \"\", \"type\":
- // \"\"}, \"macAddress\": \"\"}, \"layerProtocol\": \"IP_OVER_ETHERNET\"}, \"sapdId\": \"\"}],
- // \"virtualLinkInfo\": [{\"id\": \"\", \"linkPort\": [{\"id\": \"\", \"resourceHandle\": {\"resourceId\": \"\",
- // \"resourceProviderId\": \"\", \"vimId\": \"\", \"vimLevelResourceType\": \"\"}}], \"nsVirtualLinkDescId\":
- // \"\", \"resourceHandle\": [{\"resourceId\": \"\", \"resourceProviderId\": \"\", \"vimId\": \"\",
- // \"vimLevelResourceType\": \"\"}]}], \"vnfInstance\": [{\"vnfInstanceId\": \"\", \"vnfProfileId\": \"\"}],
- // \"vnffgInfo\": [{\"id\": \"\", \"nfpInfo\": [{\"description\": \"\", \"id\": \"\", \"nfpName\": \"\",
- // \"nfpRule\": {\"destinationIpAddressPrefix\": \"\", \"destinationPortRange\": \"\", \"dscp\": \"\",
- // \"etherDestinationAddress\": \"\", \"etherSourceAddress\": \"\", \"etherType\": \"\", \"extendedCriteria\":
- // [{\"length\": 1, \"startingPoint\": 1, \"value\": \"\"}], \"protocol\": \"\", \"sourceIpAddressPrefix\":
- // \"\", \"sourcePortRange\": \"\", \"vlanTag\": []}, \"nfpState\": \"\", \"nfpdId\": \"\", \"nscpHandle\":
- // [{\"nsInstanceId\": \"\", \"nsSapInstanceId\": \"\", \"pnfExtCpInstanceId\": \"\", \"pnfInfoId\": \"\",
- // \"vnfExtCpInstanceId\": \"\", \"vnfInstanceId\": \"\"}], \"totalCp\": 1}], \"nsCpHandle\":
- // [{\"nsInstanceId\": \"\", \"nsSapInstanceId\": \"\", \"pnfExtCpInstanceId\": \"\", \"pnfInfoId\": \"\",
- // \"vnfExtCpInstanceId\": \"\", \"vnfInstanceId\": \"\"}], \"nsVirtualLinkInfoId\": [], \"pnfInfoId\": [],
- // \"vnfInstanceId\": [], \"vnffgdId\": \"\"}]}");
-
- resourceOperationStatus.setStatus("processing");
- resourceOperationStatus.setOperationId(nsResourceInputParameter.getNsOperationKey().getOperationId());
- resourceOperationStatus.setServiceId(nsResourceInputParameter.getNsOperationKey().getServiceId());
- resourceOperationStatus
- .setResourceTemplateUUID(nsResourceInputParameter.getNsOperationKey().getNodeTemplateUUID());
- when(instanceNfvoMappingRepository.save(instanceNfvoMapping)).thenReturn(instanceNfvoMapping);
- when(restfulUtil.getNfvoFromAAI("b1bb0ce7-2222-4fa7-95ed-4840d70a1101")).thenReturn(restfulResponse);
- when(restfulUtil.send(Mockito.anyString(), Mockito.anyString(), Mockito.anyString(), Mockito.anyMap()))
- .thenReturn(vfcrestfulResponse);
- when(resourceOperationStatusRepository.save(resourceOperationStatus)).thenReturn(resourceOperationStatus);
- vfcManagerSol005.createNs(nsResourceInputParameter);
-
- }
-
- @Test
- public void terminateNs() throws Exception {
- instanceNfvoMapping.setInstanceId("b1bb0ce7-2222-4fa7-95ed-4840d70a1101");
- instanceNfvoMapping.setPassword("sacjnasnc");
- instanceNfvoMapping.setUsername("admin");
- instanceNfvoMapping.setNfvoName("external_nfvo");
- instanceNfvoMapping.setEndpoint("http://sample.com/");
- instanceNfvoMapping.setApiRoot("xyz");
- String nsInstanceId = "c9f0a95e-dea0-4698-96e5-5a79bc5a233d";
- ClassLoader classLoader = ClassLoader.getSystemClassLoader();
- File file = new File(classLoader.getResource("json/createNsReq.json").getFile());
- String content = new String(Files.readAllBytes(file.toPath())).replace("\n", "");
- nsResourceInputParameter = JsonUtil.unMarshal(content, NSResourceInputParameter.class);
- Map<String, String> header = new HashMap<>();
- header.put("Location", "http://192.168.10.57:5000/ns_lcm_op_ops/12204a12-7da2-4ddf-8c2f-992a1a1acebf");
- vfcrestfulResponse.setStatus(202);
- vfcrestfulResponse.setResponseContent(null);
- vfcrestfulResponse.setRespHeaderMap(header);
- when(instanceNfvoMappingRepository.findOneByInstanceId(nsInstanceId)).thenReturn(instanceNfvoMapping);
- when(restfulUtil.send(Mockito.anyString(), Mockito.anyString(), Mockito.anyString()))
- .thenReturn(vfcrestfulResponse);
- vfcManagerSol005.terminateNs(nsResourceInputParameter.getNsOperationKey(), nsInstanceId);
- }
-
- @Test
- public void getNsProgress() throws Exception {
- String jobId = "12204a12-7da2-4ddf-8c2f-992a1a1acebf";
- instanceNfvoMapping.setInstanceId("b1bb0ce7-2222-4fa7-95ed-4840d70a1101");
- instanceNfvoMapping.setPassword("sacjnasnc");
- instanceNfvoMapping.setUsername("admin");
- instanceNfvoMapping.setNfvoName("external_nfvo");
- instanceNfvoMapping.setEndpoint("http://sample.com/");
- instanceNfvoMapping.setApiRoot("xyz");
- instanceNfvoMapping.setJobId(jobId);
- ClassLoader classLoader = ClassLoader.getSystemClassLoader();
- File file = new File(classLoader.getResource("json/createNsReq.json").getFile());
- String content = new String(Files.readAllBytes(file.toPath())).replace("\n", "");
- nsResourceInputParameter = JsonUtil.unMarshal(content, NSResourceInputParameter.class);
- operationStatus.setProgress("40");
- operationStatus.setServiceId(nsResourceInputParameter.getNsOperationKey().getServiceId());
- operationStatus.setOperationId(nsResourceInputParameter.getNsOperationKey().getOperationId());
- ResourceOperationStatus resourceOperationStatus =
- new ResourceOperationStatus(nsResourceInputParameter.getNsOperationKey().getServiceId(),
- nsResourceInputParameter.getNsOperationKey().getOperationId(),
- nsResourceInputParameter.getNsOperationKey().getNodeTemplateUUID());
- file = new File(classLoader.getResource("json/lcmOperRsp.json").getFile());
- content = new String(Files.readAllBytes(file.toPath())).replace("\n", "");
- vfcrestfulResponse.setStatus(202);
- vfcrestfulResponse.setResponseContent(content);
- List<ResourceOperationStatus> resourceOperationStatuses = new ArrayList<>();
- resourceOperationStatuses.add(resourceOperationStatus);
- when(instanceNfvoMappingRepository.findOneByJobId(jobId)).thenReturn(instanceNfvoMapping);
- when(restfulUtil.send(Mockito.anyString(), Mockito.anyString(), Mockito.anyString()))
- .thenReturn(vfcrestfulResponse);
- when(operationStatusRepository.findOneByServiceIdAndOperationId(
- nsResourceInputParameter.getNsOperationKey().getServiceId(),
- nsResourceInputParameter.getNsOperationKey().getOperationId())).thenReturn(operationStatus);
- when(resourceOperationStatusRepository.findByServiceIdAndOperationId(
- nsResourceInputParameter.getNsOperationKey().getServiceId(),
- nsResourceInputParameter.getNsOperationKey().getOperationId())).thenReturn(resourceOperationStatuses);
- when(operationStatusRepository.save(operationStatus)).thenReturn(operationStatus);
- vfcManagerSol005.getNsProgress(nsResourceInputParameter.getNsOperationKey(), jobId);
-
- }
-
- @Test
- public void instantiateNs() throws Exception {
- String nsInstanceId = "c9f0a95e-dea0-4698-96e5-5a79bc5a233d";
- ClassLoader classLoader = ClassLoader.getSystemClassLoader();
- File file = new File(classLoader.getResource("json/createNsReq.json").getFile());
- String content = new String(Files.readAllBytes(file.toPath())).replace("\n", "");
- nsResourceInputParameter = JsonUtil.unMarshal(content, NSResourceInputParameter.class);
- instanceNfvoMapping.setInstanceId("b1bb0ce7-2222-4fa7-95ed-4840d70a1101");
- instanceNfvoMapping.setPassword("sacjnasnc");
- instanceNfvoMapping.setUsername("admin");
- instanceNfvoMapping.setNfvoName("external_nfvo");
- instanceNfvoMapping.setEndpoint("http://sample.com/");
- instanceNfvoMapping.setApiRoot("xyz");
- resourceOperationStatus.setStatus("processing");
- resourceOperationStatus.setOperationId(nsResourceInputParameter.getNsOperationKey().getOperationId());
- resourceOperationStatus.setServiceId(nsResourceInputParameter.getNsOperationKey().getServiceId());
- resourceOperationStatus
- .setResourceTemplateUUID(nsResourceInputParameter.getNsOperationKey().getNodeTemplateUUID());
- Map<String, String> header = new HashMap<>();
- header.put("Location", "http://192.168.10.57:5000/ns_lcm_op_ops/12204a12-7da2-4ddf-8c2f-992a1a1acebf");
- vfcrestfulResponse.setStatus(202);
- vfcrestfulResponse.setResponseContent(null);
- vfcrestfulResponse.setRespHeaderMap(header);
- when(instanceNfvoMappingRepository.findOneByInstanceId(nsInstanceId)).thenReturn(instanceNfvoMapping);
- when(restfulUtil.send(Mockito.anyString(), Mockito.anyString(), Mockito.anyString()))
- .thenReturn(vfcrestfulResponse);
- when(resourceOperationStatusRepository.save(resourceOperationStatus)).thenReturn(resourceOperationStatus);
- when(instanceNfvoMappingRepository.save(instanceNfvoMapping)).thenReturn(instanceNfvoMapping);
- vfcManagerSol005.instantiateNs(nsInstanceId, nsResourceInputParameter);
-
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/rest/VfcManagerTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/rest/VfcManagerTest.java
deleted file mode 100644
index 08fe6187ea..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/rest/VfcManagerTest.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (c) 2019 Samsung. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.vfc.rest;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.InjectMocks;
-import org.mockito.Mock;
-import org.mockito.Spy;
-import org.mockito.junit.MockitoJUnitRunner;
-import org.onap.so.adapters.vfc.constant.CommonConstant;
-import org.onap.so.adapters.vfc.model.NSResourceInputParameter;
-import org.onap.so.adapters.vfc.model.NsOperationKey;
-import org.onap.so.adapters.vfc.model.NsParameters;
-import org.onap.so.adapters.vfc.model.NsScaleParameters;
-import org.onap.so.adapters.vfc.model.RestfulResponse;
-import org.onap.so.adapters.vfc.util.RestfulUtil;
-import org.onap.so.db.request.beans.ResourceOperationStatus;
-import org.onap.so.db.request.data.repository.ResourceOperationStatusRepository;
-import org.springframework.http.HttpStatus;
-import static org.junit.Assert.*;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.Mockito.when;
-
-@RunWith(MockitoJUnitRunner.class)
-public class VfcManagerTest {
-
- @Mock
- private ResourceOperationStatusRepository resourceOperationStatusRepository;
-
- @Mock
- private RestfulUtil restfulUtil;
-
- @InjectMocks
- @Spy
- private VfcManager vfcManager;
-
- @Test
- public void createNs() throws Exception {
-
- NSResourceInputParameter segInput = new NSResourceInputParameter();
- segInput.setNsOperationKey(new NsOperationKey());
-
- RestfulResponse restfulResponse = new RestfulResponse();
- restfulResponse.setStatus(HttpStatus.OK.value());
- restfulResponse.setResponseContent("{\"" + CommonConstant.NS_INSTANCE_ID + "\": \"someNsInstanceId\"}");
- when(restfulUtil.send(any(), any(), any())).thenReturn(restfulResponse);
-
- RestfulResponse response = vfcManager.createNs(segInput);
- assertEquals(HttpStatus.OK.value(), restfulResponse.getStatus());
- }
-
- @Test
- public void deleteNs() throws Exception {
-
- RestfulResponse restfulResponse = new RestfulResponse();
- restfulResponse.setStatus(HttpStatus.OK.value());
- restfulResponse.setResponseContent("{\"" + CommonConstant.NS_INSTANCE_ID + "\": \"someNsInstanceId\"}");
- when(restfulUtil.send(any(), any(), any())).thenReturn(restfulResponse);
-
- NsOperationKey nsOperationKey = new NsOperationKey();
-
- RestfulResponse response = vfcManager.deleteNs(nsOperationKey, "someNsInstanceId");
- assertEquals(HttpStatus.OK.value(), restfulResponse.getStatus());
- }
-
- @Test
- public void instantiateNs() throws Exception {
-
- RestfulResponse restfulResponse = new RestfulResponse();
- restfulResponse.setStatus(HttpStatus.OK.value());
- restfulResponse.setResponseContent("{\"" + CommonConstant.JOB_ID + "\": \"someJobId\"}");
- when(restfulUtil.send(any(), any(), any())).thenReturn(restfulResponse);
-
- NsParameters nsParameters = new NsParameters();
- NSResourceInputParameter segInput = new NSResourceInputParameter();
- segInput.setNsParameters(nsParameters);
- segInput.setNsOperationKey(new NsOperationKey());
-
- RestfulResponse response = vfcManager.instantiateNs("someNsInstanceId", segInput);
- assertEquals(HttpStatus.OK.value(), restfulResponse.getStatus());
- }
-
- @Test
- public void terminateNs() throws Exception {
-
- NsOperationKey nsOperationKey = new NsOperationKey();
-
- RestfulResponse restfulResponse = new RestfulResponse();
- restfulResponse.setStatus(HttpStatus.OK.value());
- restfulResponse.setResponseContent("{\"" + CommonConstant.JOB_ID + "\": \"someJobId\"}");
- when(restfulUtil.send(any(), any(), any())).thenReturn(restfulResponse);
-
- RestfulResponse response = vfcManager.terminateNs(nsOperationKey, "someNsInstanceId");
- assertEquals(HttpStatus.OK.value(), response.getStatus());
- }
-
- @Test
- public void getNsProgress() throws Exception {
-
- NsOperationKey nsOperationKey = new NsOperationKey();
- ResourceOperationStatus resourceOperationStatus = new ResourceOperationStatus();
-
- RestfulResponse restfulResponse = new RestfulResponse();
- restfulResponse.setStatus(HttpStatus.OK.value());
- restfulResponse.setResponseContent(
- "{\"" + CommonConstant.JOB_ID + "\": \"someJobId\", " + "\"responseDescriptor\" : {}}");
- when(restfulUtil.send(any(), any(), any())).thenReturn(restfulResponse);
-
- when(resourceOperationStatusRepository.findOne(any()))
- .thenReturn(java.util.Optional.ofNullable(resourceOperationStatus));
-
- RestfulResponse response = vfcManager.getNsProgress(nsOperationKey, "someJobId");
- assertEquals(HttpStatus.OK.value(), response.getStatus());
- }
-
- @Test
- public void scaleNs() throws Exception {
-
- ResourceOperationStatus resourceOperationStatus = new ResourceOperationStatus();
- NSResourceInputParameter segInput = new NSResourceInputParameter();
- NsScaleParameters nsScaleParameters = new NsScaleParameters();
- segInput.setNsScaleParameters(nsScaleParameters);
-
- RestfulResponse restfulResponse = new RestfulResponse();
- restfulResponse.setStatus(HttpStatus.OK.value());
- segInput.setNsOperationKey(new NsOperationKey());
- restfulResponse.setResponseContent("{\"" + CommonConstant.JOB_ID + "\": \"someJobId\"}");
- when(restfulUtil.send(any(), any(), any())).thenReturn(restfulResponse);
-
- when(resourceOperationStatusRepository.findOne(any()))
- .thenReturn(java.util.Optional.ofNullable(resourceOperationStatus));
-
- RestfulResponse response = vfcManager.scaleNs("someNsInstanceId", segInput);
- assertEquals(HttpStatus.OK.value(), restfulResponse.getStatus());
- }
-
-}
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/util/RestfulUtilTest.java b/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/util/RestfulUtilTest.java
deleted file mode 100644
index 4b6baa5cf4..0000000000
--- a/adapters/mso-vfc-adapter/src/test/java/org/onap/so/adapters/vfc/util/RestfulUtilTest.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (c) 2019 Samsung. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.vfc.util;
-
-import org.apache.http.HttpEntity;
-import org.apache.http.HttpResponse;
-import org.apache.http.Header;
-import org.apache.http.message.BasicHeader;
-import org.apache.http.StatusLine;
-import org.apache.http.client.HttpClient;
-import org.apache.http.client.methods.HttpDelete;
-import org.apache.http.client.methods.HttpGet;
-import org.apache.http.client.methods.HttpPost;
-import org.apache.http.client.methods.HttpPut;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.InjectMocks;
-import org.mockito.Mock;
-import org.mockito.Spy;
-import org.mockito.junit.MockitoJUnitRunner;
-import org.onap.so.adapters.vfc.model.RestfulResponse;
-import org.springframework.http.HttpStatus;
-import javax.ws.rs.HttpMethod;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import static org.junit.Assert.assertEquals;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
-@RunWith(MockitoJUnitRunner.class)
-public class RestfulUtilTest {
-
- @InjectMocks
- @Spy
- private RestfulUtil restfulUtil;
-
- @Mock
- private HttpClient client;
-
- private HttpEntity httpEntity;
- private HttpResponse httpResponse;
- private StatusLine statusLine;
- private Header httpResponseHeader;
-
- @Before
- public void setUp() {
- httpEntity = mock(HttpEntity.class);
- httpResponse = mock(HttpResponse.class);
- statusLine = mock(StatusLine.class);
- httpResponseHeader = mock(Header.class);
- }
-
- private void sendInit() throws IOException {
-
- Header[] headerList = new BasicHeader[2];
- headerList[0] = new BasicHeader("Content-Type", "application/json");
- headerList[1] = new BasicHeader("cache-control", "no-cache");
- doReturn("https://testHost/").when(restfulUtil).getMsbHost();
-
- when(statusLine.getStatusCode()).thenReturn(HttpStatus.OK.value());
- when(httpResponse.getStatusLine()).thenReturn(statusLine);
- when(httpResponse.getEntity()).thenReturn(httpEntity);
- when(httpResponse.getAllHeaders()).thenReturn(headerList);
- }
-
- @Test
- public void sendGet() throws Exception {
-
- sendInit();
-
- ByteArrayInputStream responseStream = new ByteArrayInputStream(new String("GET").getBytes());
- when(client.execute(any(HttpGet.class))).thenReturn(httpResponse);
- when(httpEntity.getContent()).thenReturn(responseStream);
-
- RestfulResponse restfulResponse = restfulUtil.send("test", HttpMethod.GET, "some request content");
-
- assertEquals(HttpStatus.OK.value(), restfulResponse.getStatus());
- assertEquals("GET", restfulResponse.getResponseContent());
-
- }
-
- @Test
- public void sendPost() throws Exception {
-
- sendInit();
-
-
- ByteArrayInputStream responseStream = new ByteArrayInputStream(new String("POST").getBytes());
- when(client.execute(any(HttpPost.class))).thenReturn(httpResponse);
- when(httpEntity.getContent()).thenReturn(responseStream);
-
- RestfulResponse restfulResponse = restfulUtil.send("test", HttpMethod.POST, "some request content");
-
- assertEquals(HttpStatus.OK.value(), restfulResponse.getStatus());
- assertEquals("POST", restfulResponse.getResponseContent());
-
- }
-
- @Test
- public void sendPut() throws Exception {
-
- sendInit();
-
- ByteArrayInputStream responseStream = new ByteArrayInputStream(new String("PUT").getBytes());
- when(client.execute(any(HttpPut.class))).thenReturn(httpResponse);
- when(httpEntity.getContent()).thenReturn(responseStream);
-
- RestfulResponse restfulResponse = restfulUtil.send("test", HttpMethod.PUT, "some request content");
-
- assertEquals(HttpStatus.OK.value(), restfulResponse.getStatus());
- assertEquals("PUT", restfulResponse.getResponseContent());
-
- }
-
- @Test
- public void sendDelete() throws Exception {
-
- sendInit();
-
- ByteArrayInputStream responseStream = new ByteArrayInputStream(new String("DELETE").getBytes());
- when(client.execute(any(HttpDelete.class))).thenReturn(httpResponse);
- when(httpEntity.getContent()).thenReturn(responseStream);
-
- RestfulResponse restfulResponse = restfulUtil.send("test", HttpMethod.DELETE, "some request content");
-
- assertEquals(HttpStatus.OK.value(), restfulResponse.getStatus());
- assertEquals("DELETE", restfulResponse.getResponseContent());
-
- }
-
- @Test
- public void sendOptions() throws Exception {
-
- doReturn("https://testHost/").when(restfulUtil).getMsbHost();
-
- RestfulResponse restfulResponse = restfulUtil.send("test", HttpMethod.OPTIONS, "some request content");
-
- assertEquals(HttpStatus.INTERNAL_SERVER_ERROR.value(), restfulResponse.getStatus());
- assertEquals("Error processing request to VFC", restfulResponse.getResponseContent());
-
- }
-
-}
diff --git a/adapters/mso-vfc-adapter/src/test/resources/application-test.yaml b/adapters/mso-vfc-adapter/src/test/resources/application-test.yaml
deleted file mode 100644
index b43d382410..0000000000
--- a/adapters/mso-vfc-adapter/src/test/resources/application-test.yaml
+++ /dev/null
@@ -1,64 +0,0 @@
-
-server:
- port: 8080
- tomcat:
- max-threads: 50
-ssl-enable: false
-mso:
- adapters:
- requestDb:
- auth: Basic YnBlbDptc28tZGItMTUwNyE=
- endpoint: http://localhost:8081
- logPath: logs
- site-name: localSite
- infra-requests:
- archived:
- period: 1
-spring:
- datasource:
- jdbc-url: jdbc:mariadb://localhost:3307/requestdb
- username: root
- password: password
- driver-class-name: org.mariadb.jdbc.Driver
- initialize: true
- initialization-mode: never
- jpa:
- generate-ddl: false
- show-sql: false
- hibernate:
- ddl-auto: validate
- naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy
- enable-lazy-load-no-trans: true
- database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
- security:
- usercredentials:
- -
- username: test
- password: '$2a$12$Zi3AuYcZoZO/gBQyUtST2.F5N6HqcTtaNci2Et.ufsQhski56srIu'
- role: BPEL-Client
-mariaDB4j:
- dataDir:
- port: 3307
- databaseName: requestdb
-
-#Actuator
-management:
- endpoints:
- web:
- base-path: /manage
- server:
- servlet:
- context-path: /manage
- metrics:
- se-global-registry: false
- export:
- prometheus:
- enabled: true # Whether exporting of metrics to Prometheus is enabled.
- step: 1m # Step size (i.e. reporting frequency) to use.
-
-
-flyway:
- baseline-on-migrate: false
- url: jdbc:mariadb://localhost:3307/requestdb
- user: root
- password: password
diff --git a/adapters/mso-vfc-adapter/src/test/resources/json/LICENSE.txt b/adapters/mso-vfc-adapter/src/test/resources/json/LICENSE.txt
deleted file mode 100644
index bc40e66b0b..0000000000
--- a/adapters/mso-vfc-adapter/src/test/resources/json/LICENSE.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */ \ No newline at end of file
diff --git a/adapters/mso-vfc-adapter/src/test/resources/json/aainfvoResponse.json b/adapters/mso-vfc-adapter/src/test/resources/json/aainfvoResponse.json
deleted file mode 100644
index 35047a9c21..0000000000
--- a/adapters/mso-vfc-adapter/src/test/resources/json/aainfvoResponse.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "nfvoId":"6ee79fe2-9579-475a-9bb9-20cf4358a19e",
- "name":"external_nfvo",
- "api-root":"xyz",
- "vendor":"vz",
- "version":"v1.0",
- "url":"http://sample.com/",
- "userName":"admin",
- "password":"sacjnasnc"
-} \ No newline at end of file
diff --git a/adapters/mso-vfc-adapter/src/test/resources/json/createNsReq.json b/adapters/mso-vfc-adapter/src/test/resources/json/createNsReq.json
deleted file mode 100644
index aec8ae809d..0000000000
--- a/adapters/mso-vfc-adapter/src/test/resources/json/createNsReq.json
+++ /dev/null
@@ -1,56 +0,0 @@
-{
- "nsServiceName":"vcpe_e2e_vnf_test2",
- "nsServiceDescription":"null",
- "nsServiceModelUUID":"c9f0a95e-dea0-4698-96e5-5a79bc5a233d",
- "nsOperationKey":{
- "globalSubscriberId":"Demonstration",
- "serviceType":"vCPE",
- "serviceId":"996fadbb-e806-4a19-b0e5-3454ad6ac29e",
- "operationId":"1f1dd6b2-b027-4008-a9df-3b6c8274fb24",
- "nodeTemplateUUID":"4d3a835c-29c8-4a63-83a4-50de5f7ffe16"
- },
- "nsParameters":{
- "locationConstraints":[
- {
- "locationConstraints":{
- "vimId":"CloudOwner_regionOne"
- },
- "vnfProfileId":"b1bb0ce7-2222-4fa7-95ed-4840d70a1101"
- },
- {
- "locationConstraints":{
- "vimId":"CloudOwner_regionOne"
- },
- "vnfProfileId":"0408f076-e6c0-4c82-9940-272fddbb82de"
- },
- {
- "locationConstraints":{
- "vimId":"CloudOwner_regionOne"
- },
- "vnfProfileId":"b1bb0ce7-2222-4fa7-95ed-4840d70a1100"
- },
- {
- "locationConstraints":{
- "vimId":"CloudOwner_regionOne"
- },
- "vnfProfileId":"b1bb0ce7-2222-4fa7-95ed-4840d70a1102"
- },
- {
- "locationConstraints":{
- "vimId":"CloudOwner_regionOne"
- },
- "vnfProfileId":"3fca3543-07f5-492f-812c-ed462e4f94f4"
- }
- ],
- "additionalParamForNs":{
- "orchestrator":"",
- "nfvo":"b1bb0ce7-2222-4fa7-95ed-4840d70a1101",
- "nf_naming":"true",
- "multi_stage_design":"false",
- "availability_zone_max_count":"1",
- "xyz":"123",
- "nsd0_providing_service_invariant_uuid":"12204a12-7da2-4ddf-8c2f-992a1a1acebf",
- "nsd0_providing_service_uuid":"5791dbeb-19d4-43e8-bf44-5b327ccf6bca"
- }
- }
-}
diff --git a/adapters/mso-vfc-adapter/src/test/resources/json/createNsRsp.json b/adapters/mso-vfc-adapter/src/test/resources/json/createNsRsp.json
deleted file mode 100644
index ccd1d66909..0000000000
--- a/adapters/mso-vfc-adapter/src/test/resources/json/createNsRsp.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "nsInstanceId": "9b9f02c0-298b-458a-bc9c-be3692e4f354"
-} \ No newline at end of file
diff --git a/adapters/mso-vfc-adapter/src/test/resources/json/createNsSol005Response.json b/adapters/mso-vfc-adapter/src/test/resources/json/createNsSol005Response.json
deleted file mode 100644
index 938969a87f..0000000000
--- a/adapters/mso-vfc-adapter/src/test/resources/json/createNsSol005Response.json
+++ /dev/null
@@ -1,210 +0,0 @@
-{
- "_links":{
- "heal":{
- "href":""
- },
- "instantiate":{
- "href":""
- },
- "nestedNsInstances":{
- "href":""
- },
- "scale":{
- "href":""
- },
- "self":{
- "href":""
- },
- "terminate":{
- "href":""
- },
- "update":{
- "href":""
- }
- },
- "additionalAffinityOrAntiAffiniityRule":[
- {
- "Scope":"",
- "affinityOrAntiAffiinty":"",
- "vnfInstanceId":[
-
- ],
- "vnfProfileId":[
-
- ],
- "vnfdId":[
-
- ]
- }
- ],
- "flavourId":"",
- "id":"c9f0a95e-dea0-4698-96e5-5a79bc5a233d",
- "nestedNsInstanceId":[
-
- ],
- "nsInstanceDescription":"",
- "nsInstanceName":"",
- "nsScaleStatus":[
- {
- "nsScaleLevelId":"",
- "nsScalingAspectId":""
- }
- ],
- "nsState":"",
- "nsdId":"",
- "nsdInfoId":"",
- "pnfInfo":[
- {
- "cpInfo":[
- {
- "cpInstanceId":"",
- "cpProtocolData":{
- "ipOverEthernet":{
- "ipAddresses":{
- "addressRange":{
- "maxAddress":"",
- "minAddress":""
- },
- "fixedAddresses":"",
- "numDynamicAddresses":1,
- "subnetId":"",
- "type":""
- },
- "macAddress":{
-
- }
- },
- "layerProtocol":"IP_OVER_ETHERNET"
- },
- "cpdId":""
- }
- ],
- "pnfId":"",
- "pnfName":"",
- "pnfProfileId":"",
- "pnfdId":"",
- "pnfdInfoId":""
- }
- ],
- "sapInfo":[
- {
- "description":"",
- "id":"",
- "sapName":"",
- "sapProtocolInfo":{
- "ipOverEthernet":{
- "ipAddresses":{
- "addressRange":{
- "maxAddress":"",
- "minAddress":""
- },
- "fixedAddresses":"",
- "numDynamicAddresses":1,
- "subnetId":"",
- "type":""
- },
- "macAddress":""
- },
- "layerProtocol":"IP_OVER_ETHERNET"
- },
- "sapdId":""
- }
- ],
- "virtualLinkInfo":[
- {
- "id":"",
- "linkPort":[
- {
- "id":"",
- "resourceHandle":{
- "resourceId":"",
- "resourceProviderId":"",
- "vimId":"",
- "vimLevelResourceType":""
- }
- }
- ],
- "nsVirtualLinkDescId":"",
- "resourceHandle":[
- {
- "resourceId":"",
- "resourceProviderId":"",
- "vimId":"",
- "vimLevelResourceType":""
- }
- ]
- }
- ],
- "vnfInstance":[
- {
- "vnfInstanceId":"",
- "vnfProfileId":""
- }
- ],
- "vnffgInfo":[
- {
- "id":"",
- "nfpInfo":[
- {
- "description":"",
- "id":"",
- "nfpName":"",
- "nfpRule":{
- "destinationIpAddressPrefix":"",
- "destinationPortRange":"",
- "dscp":"",
- "etherDestinationAddress":"",
- "etherSourceAddress":"",
- "etherType":"",
- "extendedCriteria":[
- {
- "length":1,
- "startingPoint":1,
- "value":""
- }
- ],
- "protocol":"",
- "sourceIpAddressPrefix":"",
- "sourcePortRange":"",
- "vlanTag":[
-
- ]
- },
- "nfpState":"",
- "nfpdId":"",
- "nscpHandle":[
- {
- "nsInstanceId":"",
- "nsSapInstanceId":"",
- "pnfExtCpInstanceId":"",
- "pnfInfoId":"",
- "vnfExtCpInstanceId":"",
- "vnfInstanceId":""
- }
- ],
- "totalCp":1
- }
- ],
- "nsCpHandle":[
- {
- "nsInstanceId":"",
- "nsSapInstanceId":"",
- "pnfExtCpInstanceId":"",
- "pnfInfoId":"",
- "vnfExtCpInstanceId":"",
- "vnfInstanceId":""
- }
- ],
- "nsVirtualLinkInfoId":[
-
- ],
- "pnfInfoId":[
-
- ],
- "vnfInstanceId":[
-
- ],
- "vnffgdId":""
- }
- ]
-} \ No newline at end of file
diff --git a/adapters/mso-vfc-adapter/src/test/resources/json/deleteNsReq.json b/adapters/mso-vfc-adapter/src/test/resources/json/deleteNsReq.json
deleted file mode 100644
index ac095e6aa3..0000000000
--- a/adapters/mso-vfc-adapter/src/test/resources/json/deleteNsReq.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "globalSubscriberId":"9b9f02c0-298b-458a-bc9c-be3692e4f350",
- "serviceType":"service",
- "serviceId":"9b9f02c0-298b-458a-bc9c-be3692e4f351",
- "operationId":"9b9f02c0-298b-458a-bc9c-be3692e4f352",
- "nodeTemplateUUID":"9b9f02c0-298b-458a-bc9c-be3692e4f353"
-} \ No newline at end of file
diff --git a/adapters/mso-vfc-adapter/src/test/resources/json/instantiateNsReq.json b/adapters/mso-vfc-adapter/src/test/resources/json/instantiateNsReq.json
deleted file mode 100644
index 047c81081e..0000000000
--- a/adapters/mso-vfc-adapter/src/test/resources/json/instantiateNsReq.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
- "nsServiceName":"vIMS",
- "nsServiceDescription":"vIMS NS",
- "nsOperationKey":{
- "globalSubscriberId":"9b9f02c0-298b-458a-bc9c-be3692e4f350",
- "serviceType":"service",
- "serviceId":"9b9f02c0-298b-458a-bc9c-be3692e4f351",
- "operationId":"9b9f02c0-298b-458a-bc9c-be3692e4f352",
- "nodeTemplateUUID":"9b9f02c0-298b-458a-bc9c-be3692e4f353"
- },
- "nsParameters":{
- "locationConstraints":[
- {
- "vnfProfileId":"zte-CSCF-1.0",
- "locationConstraints":{
- "vimId":"1"
- }
- }
- ],
- "additionalParamForNs":{
- "externalDataNetworkName":"Flow_out_net",
- "m6000_mng_ip":"192.168.20.2",
- "externalCompanyFtpDataNetworkName":"Flow_out_net",
- "externalPluginManageNetworkName":"plugin_net_2014",
- "externalManageNetworkName":"mng_net_2017",
- "sfc_data_network":"sfc_data_net_2016",
- "NatIpRange":"210.1.1.10-210.1.1.20",
- "location":"4050083f-465f-4838-af1e-47a545222ad0",
- "sdncontroller":"9b9f02c0-298b-458a-bc9c-be3692e4f35e"
- }
- }
-} \ No newline at end of file
diff --git a/adapters/mso-vfc-adapter/src/test/resources/json/instantiateNsRsp.json b/adapters/mso-vfc-adapter/src/test/resources/json/instantiateNsRsp.json
deleted file mode 100644
index 51e4d010d0..0000000000
--- a/adapters/mso-vfc-adapter/src/test/resources/json/instantiateNsRsp.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "jobId":"1"
-} \ No newline at end of file
diff --git a/adapters/mso-vfc-adapter/src/test/resources/json/lcmOperRsp.json b/adapters/mso-vfc-adapter/src/test/resources/json/lcmOperRsp.json
deleted file mode 100644
index 111afc1a7c..0000000000
--- a/adapters/mso-vfc-adapter/src/test/resources/json/lcmOperRsp.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "id":"12204a12-7da2-4ddf-8c2f-992a1a1acebf",
- "lcmOperationType":"INSTANTIATE",
- "nsInstanceId":"c9f0a95e-dea0-4698-96e5-5a79bc5a233d",
- "operationState":"PROCESSING",
- "statusEnteredTime":"Time"
-} \ No newline at end of file
diff --git a/adapters/mso-vfc-adapter/src/test/resources/json/queryJobReq.json b/adapters/mso-vfc-adapter/src/test/resources/json/queryJobReq.json
deleted file mode 100644
index ac095e6aa3..0000000000
--- a/adapters/mso-vfc-adapter/src/test/resources/json/queryJobReq.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "globalSubscriberId":"9b9f02c0-298b-458a-bc9c-be3692e4f350",
- "serviceType":"service",
- "serviceId":"9b9f02c0-298b-458a-bc9c-be3692e4f351",
- "operationId":"9b9f02c0-298b-458a-bc9c-be3692e4f352",
- "nodeTemplateUUID":"9b9f02c0-298b-458a-bc9c-be3692e4f353"
-} \ No newline at end of file
diff --git a/adapters/mso-vfc-adapter/src/test/resources/json/queryJobRsp.json b/adapters/mso-vfc-adapter/src/test/resources/json/queryJobRsp.json
deleted file mode 100644
index 9238b472a7..0000000000
--- a/adapters/mso-vfc-adapter/src/test/resources/json/queryJobRsp.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "jobId": "1",
- "responseDescriptor": {
- "progress": "100",
- "status": "finished",
- "statusDescription": "OMC VMs are decommissioned in VIM",
- "errorCode": "",
- "responseId": "22"
- }
-} \ No newline at end of file
diff --git a/adapters/mso-vfc-adapter/src/test/resources/json/terminateNsReq.json b/adapters/mso-vfc-adapter/src/test/resources/json/terminateNsReq.json
deleted file mode 100644
index ac095e6aa3..0000000000
--- a/adapters/mso-vfc-adapter/src/test/resources/json/terminateNsReq.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "globalSubscriberId":"9b9f02c0-298b-458a-bc9c-be3692e4f350",
- "serviceType":"service",
- "serviceId":"9b9f02c0-298b-458a-bc9c-be3692e4f351",
- "operationId":"9b9f02c0-298b-458a-bc9c-be3692e4f352",
- "nodeTemplateUUID":"9b9f02c0-298b-458a-bc9c-be3692e4f353"
-} \ No newline at end of file
diff --git a/adapters/mso-vfc-adapter/src/test/resources/json/terminateNsRsp.json b/adapters/mso-vfc-adapter/src/test/resources/json/terminateNsRsp.json
deleted file mode 100644
index 51e4d010d0..0000000000
--- a/adapters/mso-vfc-adapter/src/test/resources/json/terminateNsRsp.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "jobId":"1"
-} \ No newline at end of file
diff --git a/adapters/mso-vfc-adapter/src/test/resources/logback-test.xml b/adapters/mso-vfc-adapter/src/test/resources/logback-test.xml
deleted file mode 100644
index c2e0098f5a..0000000000
--- a/adapters/mso-vfc-adapter/src/test/resources/logback-test.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<!-- ============LICENSE_START=======================================================
- ONAP SO ================================================================================
- Copyright (C) 2017 Huawei Intellectual Property. All rights reserved. ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License"); you may not
- use this file except in compliance with the License. You may obtain a copy
- of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
- by applicable law or agreed to in writing, software distributed under the
- License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
- OF ANY KIND, either express or implied. See the License for the specific
- language governing permissions and limitations under the License. ============LICENSE_END========================================================= -->
-
-<configuration>
-
-
- <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <encoder>
- <pattern>%d{MM/dd-HH:mm:ss.SSS}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}||%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}||%X{Timer}|%msg%n</pattern>
- </encoder>
- </appender>
-
-
- <logger name="com.att.eelf.audit" level="info" additivity="false">
- <appender-ref ref="STDOUT" />
- </logger>
-
- <logger name="com.att.eelf.metrics" level="info" additivity="false">
- <appender-ref ref="STDOUT" />
- </logger>
-
- <logger name="com.att.eelf.error" level="trace" additivity="false">
- <appender-ref ref="STDOUT" />
- </logger>
- <logger name="org.onap" level="${so.log.level:-DEBUG}"
- additivity="false">
- <appender-ref ref="STDOUT" />
- </logger>
- <root level="info">
- <appender-ref ref="STDOUT" />
- </root>
-
-
-</configuration>
diff --git a/adapters/pom.xml b/adapters/pom.xml
index 49f25b8102..ee480215f3 100644
--- a/adapters/pom.xml
+++ b/adapters/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.onap.so</groupId>
<artifactId>so</artifactId>
- <version>1.7.1-SNAPSHOT</version>
+ <version>1.8.0-SNAPSHOT</version>
</parent>
<artifactId>adapters</artifactId>
@@ -19,12 +19,7 @@
<module>mso-sdnc-adapter</module>
<module>mso-requests-db-adapter</module>
<module>mso-catalog-db-adapter</module>
- <module>mso-vfc-adapter</module>
- <module>mso-cnf-adapter</module>
<module>mso-openstack-adapters</module>
- <module>etsi-sol003-adapter</module>
- <module>mso-nssmf-adapter</module>
- <module>mso-oof-adapter</module>
<module>so-appc-orchestrator</module>
</modules>
diff --git a/adapters/so-appc-orchestrator/pom.xml b/adapters/so-appc-orchestrator/pom.xml
index 68814fc075..f01288f1b4 100644
--- a/adapters/so-appc-orchestrator/pom.xml
+++ b/adapters/so-appc-orchestrator/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.onap.so</groupId>
<artifactId>adapters</artifactId>
- <version>1.7.1-SNAPSHOT</version>
+ <version>1.8.0-SNAPSHOT</version>
</parent>
<groupId>org.onap.so.adapters</groupId>
@@ -143,38 +143,17 @@
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-actuator</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-web</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
- <groupId>io.micrometer</groupId>
- <artifactId>micrometer-core</artifactId>
- </dependency>
- <dependency>
- <groupId>io.micrometer</groupId>
- <artifactId>micrometer-registry-prometheus</artifactId>
- </dependency>
- <dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
- <groupId>org.onap.so</groupId>
- <artifactId>common</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-external-task-client</artifactId>
- <version>1.1.1</version>
+ <version>1.4.0</version>
</dependency>
<dependency>
<groupId>org.onap.so</groupId>