summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/onap/so/cloudify/utils/MsoCloudifyUtils.java26
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java18
-rw-r--r--adapters/mso-catalog-db-adapter/src/main/java/db/migration/R__CloudConfigMigration.java6
-rw-r--r--adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V7.2__UpdateCloudSiteTableSupportFabric.sql3
-rw-r--r--adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V7.3__UpdateVnfcCustResourceInputLength.sql4
-rw-r--r--adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V8.1__AddControllerActorAndBlueprint.sql23
-rw-r--r--adapters/mso-openstack-adapters/pom.xml7
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/create/CreateInventoryService.java4
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java14
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/NetworkAdapterRest.java10
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/BpelRestClient.java4
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapter.java2
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsyncImpl.java50
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java79
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImpl.java10
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImpl.java10
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VnfAdapterRest.java17
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VnfAdapterRestV2.java17
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VolumeAdapterRest.java10
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VolumeAdapterRestV2.java10
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeApi.java14
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeImpl.java134
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/constants/HeatBridgeConstants.java1
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/factory/MsoCloudClientFactory.java4
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/factory/MsoCloudClientFactoryImpl.java6
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/helpers/AaiHelper.java34
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/utils/HeatBridgeUtils.java16
-rw-r--r--adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfAdapterImplTest.java17
-rw-r--r--adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImplTest.java6
-rw-r--r--adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfMulticloudAdapterImplTest.java3
-rw-r--r--adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImplTest.java6
-rw-r--r--adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/VnfAdapterRestTest.java5
-rw-r--r--adapters/mso-openstack-adapters/src/test/java/org/onap/so/heatbridge/HeatBridgeImplTest.java2
-rw-r--r--adapters/mso-openstack-adapters/src/test/java/org/onap/so/heatbridge/factory/MsoCloudClientFactoryImplTest.java9
-rw-r--r--adapters/mso-openstack-adapters/src/test/resources/schema.sql7
-rw-r--r--adapters/mso-requests-db-adapter/pom.xml3
-rw-r--r--adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java6
-rw-r--r--adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/InfraActiveRequestsRepositoryCustomController.java5
-rw-r--r--adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapter.java5
-rw-r--r--adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java23
-rw-r--r--adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/application/MSORequestDBApplication.java10
-rw-r--r--adapters/mso-requests-db-adapter/src/main/resources/db/migration/V6.6__UpdateRequestProcessingData.sql9
-rw-r--r--adapters/mso-requests-db-adapter/src/main/resources/db/migration/V7.1__Drop_Columns_from_Infra_requests_archive_tables.sql17
-rw-r--r--adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestdb/rest/RequestProcessingDataRequestDbQueryTest.java28
-rw-r--r--adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsSchedulerTest.java2
-rw-r--r--adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/InfraActiveRequestsRepositoryCustomControllerTest.java65
-rw-r--r--adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/adapters/MSORequestDBImplTest.java26
-rw-r--r--adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/client/RequestsDbClientTest.java21
-rw-r--r--adapters/mso-requests-db-adapter/src/test/resources/db/migration/afterMigrate.sql22
-rw-r--r--adapters/mso-sdnc-adapter/pom.xml3
-rw-r--r--adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java8
-rw-r--r--adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/Utils.java2
-rw-r--r--adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/BPRestCallback.java6
-rw-r--r--adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCServiceRequestTask.java2
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/JsonUtil.java6
-rw-r--r--adapters/mso-vnfm-adapter/mso-vnfm-adapter-ext-clients/pom.xml43
-rw-r--r--adapters/mso-vnfm-adapter/mso-vnfm-adapter-ext-clients/src/main/resources/ETSI-Catalog-API.json3102
-rw-r--r--adapters/mso-vnfm-adapter/mso-vnfm-adapter-ext-clients/src/main/resources/SOL003-VNFPackageManagement-API.json7311
-rw-r--r--adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/Constants.java2
-rw-r--r--adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/vnfm/VnfmServiceProviderImpl.java24
-rw-r--r--adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/rest/Sol003PackageManagementController.java118
-rw-r--r--adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/rest/Sol003SubscriptionManagementController.java108
-rw-r--r--adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003PackageManagementControllerTest.java74
-rw-r--r--adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003SubscriptionManagementControllerTest.java67
-rw-r--r--asdc-controller/pom.xml5
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/activity/DeployActivitySpecs.java2
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java8
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/client/test/rest/ASDCRestInterface.java2
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/installer/ToscaResourceStructure.java5
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/installer/WorkflowArtifact.java3
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java295
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/util/ASDCNotificationLogging.java9
-rw-r--r--asdc-controller/src/test/java/org/onap/so/asdc/client/ASDCControllerITTest.java129
-rw-r--r--asdc-controller/src/test/java/org/onap/so/asdc/installer/heat/ToscaResourceInputTest.java65
-rw-r--r--asdc-controller/src/test/java/org/onap/so/asdc/installer/heat/ToscaResourceInstallerTest.java56
-rw-r--r--asdc-controller/src/test/resources/download/service-Svc140-VF-csar.csarbin35636 -> 0 bytes
-rw-r--r--asdc-controller/src/test/resources/download/service-Testservice140-csar.csarbin35457 -> 0 bytes
-rw-r--r--asdc-controller/src/test/resources/download/service-pnfservice.csarbin0 -> 27525 bytes
-rw-r--r--asdc-controller/src/test/resources/download/service-vnfservice.csarbin0 -> 27602 bytes
-rw-r--r--asdc-controller/src/test/resources/schema.sql27
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CompleteMsoProcess.groovy375
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/FalloutHandler.groovy472
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/recipe/BpmnRestClient.java2
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java46
-rw-r--r--bpmn/MSOCommonBPMN/src/main/resources/subprocess/CompleteMsoProcess.bpmn376
-rw-r--r--bpmn/MSOCommonBPMN/src/main/resources/subprocess/FalloutHandler.bpmn486
-rw-r--r--bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CompleteMsoProcessTest.groovy214
-rw-r--r--bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/FalloutHandlerTest.groovy333
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java95
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/Client/InfraActiveRequestExpected.json6
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/InfraActiveRequestExpected.json6
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/response/infraActiveRequestsResponse.json6
-rw-r--r--bpmn/mso-infrastructure-bpmn/pom.xml11
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowAsyncResource.java8
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/AsyncTaskExecutor.java21
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/BPMNProcessCompletePlugin.java51
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/workflow/service/WorkflowAsyncResourceTest.java59
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/DmaapClientTestImpl.java2
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/WorkflowActionBB.bpmn333
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClient.java40
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/DmaapClient.java4
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClient.java78
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/service/ServicePluginFactory.java2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CancelDmaapSubscriptionTest.java4
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/DmaapClientTestImpl.java15
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClientTest.java33
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/Constants.java3
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/InputParameterRetrieverTask.java60
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/AbstractInputParametersProvider.java66
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/InputParameter.java20
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/InputParametersProvider.java6
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/NullInputParameter.java25
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/SdncInputParametersProvider.java (renamed from bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/InputParametersProviderImpl.java)52
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/UserParamInputParametersProvider.java58
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/audit/AuditTasks.java5
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/exceptions/VnfNotFoundException.java7
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigAssignVnf.java11
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCRequestTasks.java3
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java62
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapper.java5
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java12
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/InputParameterRetrieverTaskTest.java128
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/TestConstants.java28
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/InputParameterRetrieverTaskTest.java248
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/InputParameterTest.java79
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/NullInputParameterTest.java62
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/SdncInputParametersProviderImplTest.java (renamed from bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/InputParametersProviderImplTest.java)14
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/UserParamInputParametersProviderTest.java98
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigAssignVnfTest.java70
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java24
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapperTest.java16
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapperPayloadTest.java33
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleAddonRequest.json1
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestBridgeEnabled.json71
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestDhcpDisabled.json1
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestMultipleDhcp.json1
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestNoUserParams.json1
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestTrueBackout.json1
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestWithCloudResources.json1
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestWithSingleAvailabilityZone.json1
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleWithNoEnvironmentAndWorkloadContextRequest.json1
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleWithVolumeGroupRequest.json1
-rw-r--r--common/pom.xml17
-rw-r--r--common/src/main/java/org/onap/so/logger/ErrorCode.java2
-rw-r--r--common/src/main/java/org/onap/so/logger/ScheduledTasksMDCSetup.java2
-rw-r--r--common/src/main/java/org/onap/so/serviceinstancebeans/RequestError.java11
-rw-r--r--common/src/main/java/org/onap/so/serviceinstancebeans/ServiceException.java3
-rw-r--r--common/src/main/java/org/onap/so/utils/CryptoUtils.java4
-rw-r--r--common/src/test/java/org/onap/so/client/dmaap/rest/DMaaPRestClientTest.java1
-rw-r--r--common/src/test/java/org/onap/so/client/policy/PolicyClientImplTest.java118
-rw-r--r--common/src/test/java/org/onap/so/logger/ScheduledTasksMDCSetupTest.java2
-rw-r--r--deployment-configs/src/main/resources/logger/logback-spring.xml2
-rw-r--r--docs/api/apis/serviceInstances-api.rst20
-rw-r--r--docs/release-notes.rst3
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/ResponseHandler.java16
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/filters/RequestIdFilter.java20
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/Action.java1
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/exceptions/ApiExceptionMapper.java61
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandler/filters/RequestIdFilterTest.java31
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandlerinfra/exceptions/ApiExceptionMapperTest.java54
-rw-r--r--mso-api-handlers/mso-api-handler-infra/pom.xml3
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/CamundaRequestHandler.java145
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/E2EServiceInstances.java16
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ManualTasks.java9
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/MsoRequest.java15
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/OrchestrationRequests.java13
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/RequestHandlerUtils.java27
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ResumeOrchestrationRequest.java5
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java94
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/TasksHandler.java2
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/BpmnRequestBuilder.java46
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/exception/AAIEntityNotFound.java4
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/handler/NetworkRestHandler.java1
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/handler/ServiceInstanceRestHandler.java1
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/handler/VFModuleRestHandler.java1
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/handler/VnfRestHandler.java1
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/handler/VolumeRestHandler.java1
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/CloudResourcesOrchestration.java9
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/TenantIsolationRequest.java1
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/dmaap/DmaapOperationalEnvClient.java2
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/SDCClientHelper.java4
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/process/ActivateVnfOperationalEnvironment.java6
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/process/ActivateVnfStatusOperationalEnvironment.java4
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/validation/CloudConfigurationValidation.java5
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/CamundaRequestHandlerTest.java321
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/CamundaRequestHandlerUnitTest.java378
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/E2EServiceInstancesTest.java3
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ManualTasksTest.java3
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/MsoRequestTest.java4
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsTest.java46
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/RequestHandlerUtilsUnitTest.java26
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstancesTest.java132
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstancesUnitTest.java100
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/BpmnRequestBuilderTest.java49
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/handler/NetworkRestHandlerTest.java1
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/handler/ServiceInstanceRestHandlerTest.java1
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/handler/VfModuleRestHandlerTest.java1
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/handler/VnfRestHandlerTest.java1
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/handler/VolumeRestHandlerTest.java1
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/CloudOrchestrationTest.java1
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/CloudResourcesOrchestrationTest.java2
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/CreateEcompOperationalEnvironmentTest.java4
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/CreateVnfOperationalEnvironmentTest.java4
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/DeactivateVnfOperationalEnvironmentTest.java4
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/InfraActiveRequestsReset.sql31
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/getRequestProcessingDataArray.json8
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/AAIEntityNotFoundResponse.json8
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ReplaceVfModuleNoCloudConfig.json28
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ReplaceVnfNoCloudConfig.json58
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/InfraActiveRequests/createInfraActiveRequests.json6
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/InfraActiveRequests/getInfraActiveRequest.json6
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/InfraActiveRequests/getInfraActiveRequestNoBody.json5
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/infra/VnfLookup.json30
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/data.sql31
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/schema.sql25
-rw-r--r--mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/ArchivedInfraRequestsRepository.java2
-rw-r--r--mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepository.java13
-rw-r--r--mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryCustom.java4
-rw-r--r--mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryImpl.java87
-rw-r--r--mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/RequestProcessingDataRepository.java3
-rw-r--r--mso-api-handlers/mso-requests-db-repositories/src/test/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryImplTest.java54
-rw-r--r--mso-api-handlers/mso-requests-db-repositories/src/test/resources/afterMigrate.sql14
-rw-r--r--mso-api-handlers/mso-requests-db-repositories/src/test/resources/schema.sql70
-rw-r--r--mso-api-handlers/mso-requests-db/pom.xml5
-rw-r--r--mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/ArchivedInfraRequests.java26
-rw-r--r--mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraActiveRequests.java29
-rw-r--r--mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraRequests.java88
-rw-r--r--mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/RequestProcessingData.java10
-rw-r--r--mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/client/RequestsDbClient.java82
-rw-r--r--mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/requestsdb/RequestsDBHelper.java6
-rw-r--r--mso-api-handlers/mso-requests-db/src/test/java/org/onap/so/db/request/client/RequestDbClientTest.java39
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/PnfResourceCustomization.java12
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/Service.java43
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VfModuleCustomization.java11
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfResourceCustomization.java12
-rw-r--r--mso-catalog-db/src/test/resources/schema.sql7
-rw-r--r--pom.xml22
-rw-r--r--so-monitoring/so-monitoring-service/src/main/java/org/onap/so/monitoring/rest/api/SoMonitoringController.java8
239 files changed, 15279 insertions, 4136 deletions
diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloudify/utils/MsoCloudifyUtils.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloudify/utils/MsoCloudifyUtils.java
index d7bc22aa7c..9042095e84 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloudify/utils/MsoCloudifyUtils.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloudify/utils/MsoCloudifyUtils.java
@@ -258,7 +258,7 @@ public class MsoCloudifyUtils extends MsoCommonUtils implements VduPlugin {
// The workflow completed with errors. Must try to back it out.
if (!backout) {
logger.warn("{} Deployment installation failed, backout deletion suppressed {} {}",
- MessageEnum.RA_CREATE_STACK_ERR, ErrorCode.BusinessProcesssError.getValue(),
+ MessageEnum.RA_CREATE_STACK_ERR, ErrorCode.BusinessProcessError.getValue(),
"Exception in Deployment Installation, backout suppressed");
} else {
// Poll on delete if we rollback - use same values for now
@@ -278,13 +278,13 @@ public class MsoCloudifyUtils extends MsoCommonUtils implements VduPlugin {
// Didn't uninstall successfully. Log this error
logger.error("{} Create Deployment: Cloudify error rolling back deployment install: {} {}",
MessageEnum.RA_CREATE_STACK_ERR, installWorkflow.getError(),
- ErrorCode.BusinessProcesssError.getValue());
+ ErrorCode.BusinessProcessError.getValue());
}
} catch (Exception e) {
// Catch-all for backout errors trying to uninstall/delete
// Log this error, and return the original exception
logger.error("{} Create Stack: Nested exception rolling back deployment install: {}",
- MessageEnum.RA_CREATE_STACK_ERR, ErrorCode.BusinessProcesssError.getValue(), e);
+ MessageEnum.RA_CREATE_STACK_ERR, ErrorCode.BusinessProcessError.getValue(), e);
}
}
@@ -299,7 +299,7 @@ public class MsoCloudifyUtils extends MsoCommonUtils implements VduPlugin {
if (!backout) {
logger.warn("{} Deployment installation failed, backout deletion suppressed {}",
- MessageEnum.RA_CREATE_STACK_ERR, ErrorCode.BusinessProcesssError.getValue());
+ MessageEnum.RA_CREATE_STACK_ERR, ErrorCode.BusinessProcessError.getValue());
} else {
// Poll on delete if we rollback - use same values for now
int deletePollInterval = createPollInterval;
@@ -318,7 +318,7 @@ public class MsoCloudifyUtils extends MsoCommonUtils implements VduPlugin {
// Catch-all for backout errors trying to uninstall/delete
// Log this error, and return the original exception
logger.error("{} Create Stack: Nested exception rolling back deployment install: {} ",
- MessageEnum.RA_CREATE_STACK_ERR, ErrorCode.BusinessProcesssError.getValue(), e);
+ MessageEnum.RA_CREATE_STACK_ERR, ErrorCode.BusinessProcessError.getValue(), e);
}
}
@@ -350,7 +350,7 @@ public class MsoCloudifyUtils extends MsoCommonUtils implements VduPlugin {
} catch (CloudifyConnectException ce) {
// Couldn't connect to Cloudify
logger.error("{} QueryDeploymentOutputs: Cloudify connection failure: {} ", MessageEnum.RA_CREATE_STACK_ERR,
- ErrorCode.BusinessProcesssError.getValue(), ce);
+ ErrorCode.BusinessProcessError.getValue(), ce);
throw new MsoIOException(ce.getMessage(), ce);
} catch (CloudifyResponseException re) {
if (re.getStatus() == 404) {
@@ -435,32 +435,32 @@ public class MsoCloudifyUtils extends MsoCommonUtils implements VduPlugin {
// Workflow failed. Log it and return the execution object (don't throw exception here)
logger.error("{} Cloudify workflow failure: {} {} Execute Workflow: Failed: {}",
MessageEnum.RA_CREATE_STACK_ERR, execution.getError(),
- ErrorCode.BusinessProcesssError.getValue(), execution.getError());
+ ErrorCode.BusinessProcessError.getValue(), execution.getError());
return execution;
} else if (status.equals(CANCELLED)) {
// Workflow was cancelled, leaving the deployment in an indeterminate state. Log it and return the
// execution object (don't throw exception here)
logger.error("{} Cloudify workflow cancelled. Deployment is in an indeterminate state {} {} {}",
- MessageEnum.RA_CREATE_STACK_ERR, ErrorCode.BusinessProcesssError.getValue(),
+ MessageEnum.RA_CREATE_STACK_ERR, ErrorCode.BusinessProcessError.getValue(),
"Execute Workflow cancelled: ", workflowId);
return execution;
} else {
// Can only get here after a timeout
logger.error("{} Cloudify workflow timeout {} Execute Workflow: Timed Out",
- MessageEnum.RA_CREATE_STACK_ERR, ErrorCode.BusinessProcesssError.getValue());
+ MessageEnum.RA_CREATE_STACK_ERR, ErrorCode.BusinessProcessError.getValue());
}
} catch (CloudifyConnectException ce) {
logger.error("{} {} Execute Workflow ({} {}): Cloudify connection failure {} ",
- MessageEnum.RA_CREATE_STACK_ERR, ErrorCode.BusinessProcesssError.getValue(), command, ce);
+ MessageEnum.RA_CREATE_STACK_ERR, ErrorCode.BusinessProcessError.getValue(), command, ce);
savedException = ce;
} catch (CloudifyResponseException re) {
logger.error("{} {} Execute Workflow ({}): Cloudify response error {} ", MessageEnum.RA_CREATE_STACK_ERR,
- ErrorCode.BusinessProcesssError.getValue(), command, re.getMessage(), re);
+ ErrorCode.BusinessProcessError.getValue(), command, re.getMessage(), re);
savedException = re;
} catch (RuntimeException e) {
// Catch-all
logger.error("{} {} Execute Workflow ({}): Internal error {}", MessageEnum.RA_CREATE_STACK_ERR,
- ErrorCode.BusinessProcesssError.getValue(), command, e.getMessage(), e);
+ ErrorCode.BusinessProcessError.getValue(), command, e.getMessage(), e);
savedException = e;
}
@@ -578,7 +578,7 @@ public class MsoCloudifyUtils extends MsoCommonUtils implements VduPlugin {
} catch (CloudifyConnectException ce) {
// Couldn't connect to Cloudify
logger.error("{} QueryDeployment: Cloudify connection failure: {} ", MessageEnum.RA_CREATE_STACK_ERR,
- ErrorCode.BusinessProcesssError.getValue(), ce);
+ ErrorCode.BusinessProcessError.getValue(), ce);
throw new MsoIOException(ce.getMessage(), ce);
} catch (CloudifyResponseException re) {
if (re.getStatus() == 404) {
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 c648cc2137..ca0180ae4b 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
@@ -578,7 +578,7 @@ public class MsoMulticloudUtils extends MsoHeatUtils implements VduPlugin {
if (!backout) {
logger.warn(String.format("%s %s %s %s %d %s", MessageEnum.RA_CREATE_STACK_ERR.toString(),
"Create Stack error, stack deletion suppressed", "", "",
- ErrorCode.BusinessProcesssError.getValue(),
+ ErrorCode.BusinessProcessError.getValue(),
"Exception in Create Stack, stack deletion suppressed"));
} else {
try {
@@ -621,7 +621,7 @@ public class MsoMulticloudUtils extends MsoHeatUtils implements VduPlugin {
logger.error(String.format("%s %s %s %s %d %s",
MessageEnum.RA_CREATE_STACK_ERR.toString(),
"Create Stack: Nested exception rolling back stack: " + e3, "", "",
- ErrorCode.BusinessProcesssError.getValue(),
+ ErrorCode.BusinessProcessError.getValue(),
"Create Stack: Nested exception rolling back stack on error on query"));
}
}
@@ -629,7 +629,7 @@ public class MsoMulticloudUtils extends MsoHeatUtils implements VduPlugin {
// Just log this one. We will report the original exception.
logger.error(String.format("%s %s %s %s %d %s", MessageEnum.RA_CREATE_STACK_ERR.toString(),
"Create Stack: Nested exception rolling back stack: " + e2, "", "",
- ErrorCode.BusinessProcesssError.getValue(),
+ ErrorCode.BusinessProcessError.getValue(),
"Create Stack: Nested exception rolling back stack"));
}
}
@@ -644,13 +644,13 @@ public class MsoMulticloudUtils extends MsoHeatUtils implements VduPlugin {
logger.error(String.format("%s %s %s %s %d %s", MessageEnum.RA_CREATE_STACK_ERR.toString(),
"Create Stack error: Polling complete with non-success status: " + stackInfo.getStatus() + ", "
+ stackInfo.getStatusMessage(),
- "", "", ErrorCode.BusinessProcesssError.getValue(), "Create Stack error"));
+ "", "", ErrorCode.BusinessProcessError.getValue(), "Create Stack error"));
// Rollback the stack creation, since it is in an indeterminate state.
if (!backout) {
logger.warn(String.format("%s %s %s %s %d %s", MessageEnum.RA_CREATE_STACK_ERR.toString(),
"Create Stack errored, stack deletion suppressed", "", "",
- ErrorCode.BusinessProcesssError.getValue(),
+ ErrorCode.BusinessProcessError.getValue(),
"Create Stack error, stack deletion suppressed"));
} else {
try {
@@ -685,7 +685,7 @@ public class MsoMulticloudUtils extends MsoHeatUtils implements VduPlugin {
logger.warn(String.format("%s %s %s %s %d %s",
MessageEnum.RA_CREATE_STACK_ERR.toString(),
"Create Stack errored, stack deletion FAILED", "", "",
- ErrorCode.BusinessProcesssError.getValue(),
+ ErrorCode.BusinessProcessError.getValue(),
"Create Stack error, stack deletion FAILED"));
logger.debug("Stack deletion FAILED on a rollback of a create - " + instanceId
+ ", status=" + queryInfo.getStatus() + ", reason="
@@ -699,7 +699,7 @@ public class MsoMulticloudUtils extends MsoHeatUtils implements VduPlugin {
logger.warn(String.format("%s %s %s %s %d %s",
MessageEnum.RA_CREATE_STACK_ERR.toString(),
"Create Stack errored, then stack deletion FAILED - exception thrown", "", "",
- ErrorCode.BusinessProcesssError.getValue(), me2.getContextMessage()));
+ ErrorCode.BusinessProcessError.getValue(), me2.getContextMessage()));
}
}
StringBuilder errorContextMessage;
@@ -717,7 +717,7 @@ public class MsoMulticloudUtils extends MsoHeatUtils implements VduPlugin {
// shouldn't happen - but handle
logger.error(String.format("%s %s %s %s %d %s", MessageEnum.RA_CREATE_STACK_ERR.toString(),
"Create Stack: Nested exception rolling back stack: " + e2, "", "",
- ErrorCode.BusinessProcesssError.getValue(),
+ ErrorCode.BusinessProcessError.getValue(),
"Exception in Create Stack: rolling back stack"));
}
}
@@ -840,7 +840,7 @@ public class MsoMulticloudUtils extends MsoHeatUtils implements VduPlugin {
return JSON_MAPPER.readTree(directives);
} catch (Exception e) {
logger.error(String.format("%s %s %s %s %d %s", MessageEnum.RA_CREATE_STACK_ERR.toString(),
- "Create Stack: " + e, "", "", ErrorCode.BusinessProcesssError.getValue(),
+ "Create Stack: " + e, "", "", ErrorCode.BusinessProcessError.getValue(),
"Exception in Create Stack: Invalid JSON format of directives" + directives));
MsoException me = new MsoAdapterException("Invalid JSON format of directives parameter: " + directives);
me.addContext(CREATE_STACK);
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 354c3d07f7..691ae60afd 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
@@ -128,8 +128,8 @@ public class R__CloudConfigMigration implements JdbcMigration, MigrationInfoProv
private void migrateCloudIdentity(Collection<CloudIdentity> entities, Connection connection) throws SQLException {
logger.debug("Starting migration for CloudConfig-->IdentityService");
String insert =
- "INSERT INTO `identity_services` (`ID`, `IDENTITY_URL`, `MSO_ID`, `MSO_PASS`, `ADMIN_TENANT`, `MEMBER_ROLE`, `TENANT_METADATA`, `IDENTITY_SERVER_TYPE`, `IDENTITY_AUTHENTICATION_TYPE`, `LAST_UPDATED_BY`) "
- + "VALUES (?,?,?,?,?,?,?,?,?,?);";
+ "INSERT INTO `identity_services` (`ID`, `IDENTITY_URL`, `MSO_ID`, `MSO_PASS`, `ADMIN_TENANT`, `MEMBER_ROLE`, `TENANT_METADATA`, `IDENTITY_SERVER_TYPE`, `IDENTITY_AUTHENTICATION_TYPE`, `LAST_UPDATED_BY`, `PROJECT_DOMAIN_NAME`, `USER_DOMAIN_NAME`) "
+ + "VALUES (?,?,?,?,?,?,?,?,?,?,?,?);";
try (Statement stmt = connection.createStatement();
PreparedStatement ps = connection.prepareStatement(insert)) {
@@ -157,6 +157,8 @@ public class R__CloudConfigMigration implements JdbcMigration, MigrationInfoProv
? cloudIdentity.getIdentityAuthenticationType().name()
: null);
ps.setString(10, FLYWAY);
+ ps.setString(11, cloudIdentity.getProjectDomainName());
+ ps.setString(12, cloudIdentity.getUserDomainName());
ps.executeUpdate();
}
}
diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V7.2__UpdateCloudSiteTableSupportFabric.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V7.2__UpdateCloudSiteTableSupportFabric.sql
new file mode 100644
index 0000000000..6578b5a297
--- /dev/null
+++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V7.2__UpdateCloudSiteTableSupportFabric.sql
@@ -0,0 +1,3 @@
+use catalogdb;
+
+UPDATE cloud_sites SET SUPPORT_FABRIC = b'0' WHERE CLOUD_VERSION != '1.0.0'; \ No newline at end of file
diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V7.3__UpdateVnfcCustResourceInputLength.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V7.3__UpdateVnfcCustResourceInputLength.sql
new file mode 100644
index 0000000000..66c01538f7
--- /dev/null
+++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V7.3__UpdateVnfcCustResourceInputLength.sql
@@ -0,0 +1,4 @@
+use catalogdb;
+
+ALTER TABLE vnfc_customization
+ MODIFY IF EXISTS RESOURCE_INPUT varchar(20000); \ No newline at end of file
diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V8.1__AddControllerActorAndBlueprint.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V8.1__AddControllerActorAndBlueprint.sql
new file mode 100644
index 0000000000..5560dcc0de
--- /dev/null
+++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V8.1__AddControllerActorAndBlueprint.sql
@@ -0,0 +1,23 @@
+use catalogdb;
+
+ALTER TABLE service
+ADD CONTROLLER_ACTOR varchar(200) null;
+
+ALTER TABLE service
+ADD CDS_BLUEPRINT_NAME varchar(200) null;
+
+ALTER TABLE service
+ADD CDS_BLUEPRINT_VERSION varchar(20) null;
+
+ALTER TABLE service
+ADD SKIP_POST_INSTANTIATION_CONFIGURATION boolean default true;
+
+ALTER TABLE vnf_resource_customization
+ADD CONTROLLER_ACTOR varchar(200) null;
+
+ALTER TABLE pnf_resource_customization
+ADD CONTROLLER_ACTOR varchar(200) null;
+
+ALTER TABLE vf_module_customization
+ADD SKIP_POST_INSTANTIATION_CONFIGURATION boolean default true;
+
diff --git a/adapters/mso-openstack-adapters/pom.xml b/adapters/mso-openstack-adapters/pom.xml
index 7ffcd8308c..f0c066aa05 100644
--- a/adapters/mso-openstack-adapters/pom.xml
+++ b/adapters/mso-openstack-adapters/pom.xml
@@ -153,6 +153,9 @@
<executions>
<execution>
<id>original</id>
+ <configuration>
+ <skip>false</skip>
+ </configuration>
</execution>
</executions>
</plugin>
@@ -243,12 +246,12 @@
<dependency>
<groupId>org.pacesys</groupId>
<artifactId>openstack4j-core</artifactId>
- <version>3.1.0</version>
+ <version>3.2.0</version>
</dependency>
<dependency>
<groupId>org.pacesys.openstack4j.connectors</groupId>
<artifactId>openstack4j-httpclient</artifactId>
- <version>3.1.0</version>
+ <version>3.2.0</version>
</dependency>
<dependency>
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/create/CreateInventoryService.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/create/CreateInventoryService.java
index c1cc7428ee..5261f8ae19 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/create/CreateInventoryService.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/create/CreateInventoryService.java
@@ -23,8 +23,6 @@ package org.onap.so.adapters.inventory.create;
import javax.annotation.PostConstruct;
import org.camunda.bpm.client.ExternalTaskClient;
import org.onap.so.utils.ExternalTaskServiceUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Profile;
import org.springframework.core.env.Environment;
@@ -34,8 +32,6 @@ import org.springframework.stereotype.Component;
@Profile("!test")
public class CreateInventoryService {
- private static final Logger logger = LoggerFactory.getLogger(CreateInventoryService.class);
-
@Autowired
public Environment env;
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java
index 5641186eca..97c715b44e 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java
@@ -231,7 +231,7 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter {
} catch (MsoException me) {
logger.error(
"{} {} Exception while querying network {} for CloudSite {} from Tenant {} from OpenStack ",
- MessageEnum.RA_QUERY_NETWORK_EXC, ErrorCode.BusinessProcesssError.getValue(), networkName,
+ MessageEnum.RA_QUERY_NETWORK_EXC, ErrorCode.BusinessProcessError.getValue(), networkName,
cloudSiteId, tenantId, me);
me.addContext(CREATE_NETWORK_CONTEXT);
throw new NetworkException(me);
@@ -568,7 +568,7 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter {
} catch (MsoException me) {
me.addContext(UPDATE_NETWORK_CONTEXT);
logger.error("{} {} Exception - queryNetwork query {} in {}/{} ", MessageEnum.RA_QUERY_NETWORK_EXC,
- ErrorCode.BusinessProcesssError.getValue(), networkId, cloudSiteId, tenantId, me);
+ ErrorCode.BusinessProcessError.getValue(), networkId, cloudSiteId, tenantId, me);
throw new NetworkException(me);
}
@@ -576,7 +576,7 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter {
String error = String.format("Update Nework: Network %s does not exist in %s/%s", networkId,
cloudSiteId, tenantId);
logger.error(LoggingAnchor.THREE, MessageEnum.RA_NETWORK_NOT_FOUND,
- ErrorCode.BusinessProcesssError.getValue(), error);
+ ErrorCode.BusinessProcessError.getValue(), error);
// Does not exist. Throw an exception (can't update a non-existent network)
throw new NetworkException(error, MsoExceptionCategory.USERDATA);
}
@@ -1105,7 +1105,7 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter {
} catch (MsoException me) {
me.addContext("RollbackNetwork");
logger.error("{} {} Exception - Rollback Network (neutron): {} in {}/{} ",
- MessageEnum.RA_DELETE_NETWORK_EXC, ErrorCode.BusinessProcesssError.getValue(), networkId,
+ MessageEnum.RA_DELETE_NETWORK_EXC, ErrorCode.BusinessProcessError.getValue(), networkId,
cloudSiteId, tenantId, me);
throw new NetworkException(me);
}
@@ -1115,7 +1115,7 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter {
} catch (MsoException me) {
me.addContext("RollbackNetwork");
logger.error("{} {} Exception - Rollback Network (heat): {} in {}/{} ",
- MessageEnum.RA_DELETE_NETWORK_EXC, ErrorCode.BusinessProcesssError.getValue(), networkId,
+ MessageEnum.RA_DELETE_NETWORK_EXC, ErrorCode.BusinessProcessError.getValue(), networkId,
cloudSiteId, tenantId, me);
throw new NetworkException(me);
}
@@ -1263,7 +1263,7 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter {
}
} else {
String error = "Null pFqdns at start of mergePolicyRefs";
- logger.error(LoggingAnchor.THREE, MessageEnum.RA_MARSHING_ERROR, ErrorCode.BusinessProcesssError.getValue(),
+ logger.error(LoggingAnchor.THREE, MessageEnum.RA_MARSHING_ERROR, ErrorCode.BusinessProcessError.getValue(),
error);
throw new MsoAdapterException(error);
}
@@ -1276,7 +1276,7 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter {
logger.debug("Json PolicyRefs Data:{}", jsonString);
} catch (Exception e) {
String error = "Error creating JsonNode for policyRefs Data";
- logger.error(LoggingAnchor.THREE, MessageEnum.RA_MARSHING_ERROR, ErrorCode.BusinessProcesssError.getValue(),
+ logger.error(LoggingAnchor.THREE, MessageEnum.RA_MARSHING_ERROR, ErrorCode.BusinessProcessError.getValue(),
error, e);
throw new MsoAdapterException(error);
}
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/NetworkAdapterRest.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/NetworkAdapterRest.java
index 4eb5d5637f..0c37837880 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/NetworkAdapterRest.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/NetworkAdapterRest.java
@@ -124,7 +124,7 @@ public class NetworkAdapterRest {
} catch (Exception e) {
// problem handling create, send generic failure as sync resp to caller
logger.error("{} {} Exception while create network ", MessageEnum.RA_CREATE_NETWORK_EXC,
- ErrorCode.BusinessProcesssError.getValue(), e);
+ ErrorCode.BusinessProcessError.getValue(), e);
return Response.serverError().build();
}
// send sync response (ACK) to caller
@@ -286,7 +286,7 @@ public class NetworkAdapterRest {
} catch (Exception e) {
// problem handling create, send generic failure as sync resp to caller
logger.error("{} {} Exception while delete network ", MessageEnum.RA_DELETE_NETWORK_EXC,
- ErrorCode.BusinessProcesssError.getValue(), e);
+ ErrorCode.BusinessProcessError.getValue(), e);
return Response.serverError().build();
}
// send sync response (ACK) to caller
@@ -403,7 +403,7 @@ public class NetworkAdapterRest {
return Response.status(respStatus).entity(new GenericEntity<QueryNetworkResponse>(resp) {}).build();
} catch (NetworkException e) {
logger.error("{} {} Exception when query VNF ", MessageEnum.RA_QUERY_VNF_ERR,
- ErrorCode.BusinessProcesssError.getValue(), e);
+ ErrorCode.BusinessProcessError.getValue(), e);
QueryNetworkError err = new QueryNetworkError();
err.setMessage(e.getMessage());
err.setCategory(MsoExceptionCategory.INTERNAL);
@@ -436,7 +436,7 @@ public class NetworkAdapterRest {
} catch (Exception e) {
// problem handling create, send generic failure as sync resp to caller
logger.error("{} {} Exception in rollbackNetwork ", MessageEnum.RA_ROLLBACK_NULL,
- ErrorCode.BusinessProcesssError.getValue(), e);
+ ErrorCode.BusinessProcessError.getValue(), e);
return Response.serverError().build();
}
// send sync response (ACK) to caller
@@ -529,7 +529,7 @@ public class NetworkAdapterRest {
} catch (Exception e) {
// problem handling create, send generic failure as sync resp to caller
logger.error("{} {} Exception in updateNetwork ", MessageEnum.RA_UPDATE_NETWORK_ERR,
- ErrorCode.BusinessProcesssError.getValue(), e);
+ ErrorCode.BusinessProcessError.getValue(), e);
return Response.serverError().build();
}
// send sync response (ACK) to caller
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/BpelRestClient.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/BpelRestClient.java
index 62e9d562a6..662ce33022 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/BpelRestClient.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/BpelRestClient.java
@@ -216,7 +216,7 @@ public class BpelRestClient {
if (totalretries >= retryCount) {
debug("Retried " + totalretries + " times, giving up.");
logger.error("{} {} Could not deliver response to BPEL after {} tries: {}",
- MessageEnum.RA_SEND_VNF_NOTIF_ERR, ErrorCode.BusinessProcesssError.getValue(), totalretries,
+ MessageEnum.RA_SEND_VNF_NOTIF_ERR, ErrorCode.BusinessProcessError.getValue(), totalretries,
toBpelStr);
return false;
}
@@ -273,7 +273,7 @@ public class BpelRestClient {
}
} catch (Exception e) {
logger.error("{} {} Exception - Error sending Bpel notification: {} ", MessageEnum.RA_SEND_VNF_NOTIF_ERR,
- ErrorCode.BusinessProcesssError.getValue(), toBpelStr, e);
+ ErrorCode.BusinessProcessError.getValue(), toBpelStr, e);
lastResponseCode = 900;
lastResponse = "";
}
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapter.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapter.java
index f6ea2261d7..39a380d2cf 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapter.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapter.java
@@ -121,6 +121,8 @@ public interface MsoVnfAdapter {
@WebParam(name = "cloudOwner") @XmlElement(required = false) String cloudOwner,
@WebParam(name = "tenantId") @XmlElement(required = true) String tenantId,
@WebParam(name = "vfName") @XmlElement(required = true) String vfName,
+ @WebParam(name = "vnfId") @XmlElement(required = true) String vnfId,
+ @WebParam(name = "vfModuleId") @XmlElement(required = true) String vfModuleId,
@WebParam(name = "request") MsoRequest msoRequest,
@WebParam(name = "vfModuleOutputs", mode = Mode.OUT) Holder<Map<String, String>> vfModuleOutputs)
throws VnfException;
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsyncImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsyncImpl.java
index 6713c2d069..e925e6037c 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsyncImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsyncImpl.java
@@ -135,7 +135,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
vnfRollback);
} catch (VnfException e) {
logger.error("{} {} VnfException in createVnfA ", MessageEnum.RA_CREATE_VNF_ERR,
- ErrorCode.BusinessProcesssError.getValue(), e);
+ ErrorCode.BusinessProcessError.getValue(), e);
org.onap.so.adapters.vnf.async.client.MsoExceptionCategory exCat = null;
String eMsg = null;
try {
@@ -144,7 +144,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
.fromValue(e.getFaultInfo().getCategory().name());
} catch (Exception e1) {
logger.error("{} {} Exception - Fault info ", MessageEnum.RA_FAULT_INFO_EXC,
- ErrorCode.BusinessProcesssError.getValue(), e1);
+ ErrorCode.BusinessProcessError.getValue(), e1);
}
// Build and send Asynchronous error response
try {
@@ -152,7 +152,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
notifyPort.createVnfNotification(messageId, false, exCat, eMsg, null, null, null);
} catch (Exception e1) {
logger.error("{} {} Exception sending createVnf notification ", MessageEnum.RA_SEND_VNF_NOTIF_ERR,
- ErrorCode.BusinessProcesssError.getValue(), e1);
+ ErrorCode.BusinessProcessError.getValue(), e1);
}
logger.info(LoggingAnchor.ONE, MessageEnum.RA_ASYNC_CREATE_VNF_COMPLETE);
return;
@@ -165,7 +165,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
copyVrb(vnfRollback));
} catch (Exception e) {
logger.error("{} {} Exception sending createVnf notification ", MessageEnum.RA_SEND_VNF_NOTIF_ERR,
- ErrorCode.BusinessProcesssError.getValue(), e);
+ ErrorCode.BusinessProcessError.getValue(), e);
}
logger.info("{} createVnfA", MessageEnum.RA_ASYNC_CREATE_VNF_COMPLETE);
return;
@@ -191,7 +191,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
volumeGroupHeatStackId, inputs, msoRequest, outputs, vnfRollback);
} catch (VnfException e) {
logger.error(EXCEPTION_UPDATEVNF_NOTIFICATION, MessageEnum.RA_UPDATE_VNF_ERR,
- ErrorCode.BusinessProcesssError.getValue(), e);
+ ErrorCode.BusinessProcessError.getValue(), e);
org.onap.so.adapters.vnf.async.client.MsoExceptionCategory exCat = null;
String eMsg = null;
try {
@@ -200,7 +200,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
.fromValue(e.getFaultInfo().getCategory().name());
} catch (Exception e1) {
logger.error("{} {} Exception - fault info ", MessageEnum.RA_FAULT_INFO_EXC,
- ErrorCode.BusinessProcesssError.getValue(), e1);
+ ErrorCode.BusinessProcessError.getValue(), e1);
}
// Build and send Asynchronous error response
try {
@@ -208,7 +208,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
notifyPort.updateVnfNotification(messageId, false, exCat, eMsg, null, null);
} catch (Exception e1) {
logger.error(EXCEPTION_UPDATEVNF_NOTIFICATION, MessageEnum.RA_SEND_VNF_NOTIF_ERR,
- ErrorCode.BusinessProcesssError.getValue(), e1);
+ ErrorCode.BusinessProcessError.getValue(), e1);
}
logger.info(UPDATE_VNFA, MessageEnum.RA_ASYNC_UPDATE_VNF_COMPLETE);
return;
@@ -221,7 +221,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
copyVrb(vnfRollback));
} catch (Exception e) {
logger.error(EXCEPTION_UPDATEVNF_NOTIFICATION, MessageEnum.RA_SEND_VNF_NOTIF_ERR,
- ErrorCode.BusinessProcesssError.getValue(), e);
+ ErrorCode.BusinessProcessError.getValue(), e);
}
logger.info(UPDATE_VNFA, MessageEnum.RA_ASYNC_UPDATE_VNF_COMPLETE);
return;
@@ -261,7 +261,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
outputs);
} catch (VnfException e) {
logger.error("{} {} Exception sending queryVnfA notification ", MessageEnum.RA_QUERY_VNF_ERR,
- ErrorCode.BusinessProcesssError.getValue(), e);
+ ErrorCode.BusinessProcessError.getValue(), e);
org.onap.so.adapters.vnf.async.client.MsoExceptionCategory exCat = null;
String eMsg = null;
try {
@@ -270,7 +270,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
.fromValue(e.getFaultInfo().getCategory().name());
} catch (Exception e1) {
logger.error("{} {} Exception - fault info ", MessageEnum.RA_FAULT_INFO_EXC,
- ErrorCode.BusinessProcesssError.getValue(), e1);
+ ErrorCode.BusinessProcessError.getValue(), e1);
}
// Build and send Asynchronous error response
try {
@@ -278,7 +278,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
notifyPort.queryVnfNotification(messageId, false, exCat, eMsg, null, null, null, null);
} catch (Exception e1) {
logger.error("{} {} Exception sending queryVnf notification ", MessageEnum.RA_SEND_VNF_NOTIF_ERR,
- ErrorCode.BusinessProcesssError.getValue(), e1);
+ ErrorCode.BusinessProcessError.getValue(), e1);
}
logger.info("{} queryVnfA", MessageEnum.RA_ASYNC_QUERY_VNF_COMPLETE);
return;
@@ -298,7 +298,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
copyQueryOutputs(outputs));
} catch (Exception e) {
logger.error("{} {} Exception sending queryVnf notification ", MessageEnum.RA_SEND_VNF_NOTIF_ERR,
- ErrorCode.BusinessProcesssError.getValue(), e);
+ ErrorCode.BusinessProcessError.getValue(), e);
}
logger.info("{} queryVnfA", MessageEnum.RA_ASYNC_QUERY_VNF_COMPLETE);
@@ -331,7 +331,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
vnfAdapter.deleteVnf(cloudSiteId, cloudOwner, tenantId, vnfName, msoRequest);
} catch (VnfException e) {
logger.error("{} {} Exception sending deleteVnfA notification ", MessageEnum.RA_DELETE_VNF_ERR,
- ErrorCode.BusinessProcesssError.getValue(), e);
+ ErrorCode.BusinessProcessError.getValue(), e);
org.onap.so.adapters.vnf.async.client.MsoExceptionCategory exCat = null;
String eMsg = null;
try {
@@ -340,7 +340,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
.fromValue(e.getFaultInfo().getCategory().name());
} catch (Exception e1) {
logger.error("{} {} Exception - fault info ", MessageEnum.RA_FAULT_INFO_EXC,
- ErrorCode.BusinessProcesssError.getValue(), e1);
+ ErrorCode.BusinessProcessError.getValue(), e1);
}
// Build and send Asynchronous error response
try {
@@ -348,7 +348,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
notifyPort.deleteVnfNotification(messageId, false, exCat, eMsg);
} catch (Exception e1) {
logger.error("{} {} Exception sending deleteVnfA notification ", MessageEnum.RA_SEND_VNF_NOTIF_ERR,
- ErrorCode.BusinessProcesssError.getValue(), e1);
+ ErrorCode.BusinessProcessError.getValue(), e1);
}
logger.info("{} deleteVnfA", MessageEnum.RA_ASYNC_DELETE_VNF_COMPLETE);
return;
@@ -362,7 +362,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
} catch (Exception e) {
logger.error("{} {} Exception sending deleteVnfA notification ", MessageEnum.RA_SEND_VNF_NOTIF_ERR,
- ErrorCode.BusinessProcesssError.getValue(), e);
+ ErrorCode.BusinessProcessError.getValue(), e);
}
logger.info("{} deleteVnfA", MessageEnum.RA_ASYNC_DELETE_VNF_COMPLETE);
@@ -391,7 +391,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
vnfAdapter.rollbackVnf(rollback);
} catch (VnfException e) {
logger.error("{} {} Exception sending rollbackVnfA notification ", MessageEnum.RA_ROLLBACK_VNF_ERR,
- ErrorCode.BusinessProcesssError.getValue(), e);
+ ErrorCode.BusinessProcessError.getValue(), e);
org.onap.so.adapters.vnf.async.client.MsoExceptionCategory exCat = null;
String eMsg = null;
try {
@@ -400,7 +400,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
.fromValue(e.getFaultInfo().getCategory().name());
} catch (Exception e1) {
logger.error("{} {} Exception - fault info ", MessageEnum.RA_FAULT_INFO_EXC,
- ErrorCode.BusinessProcesssError.getValue(), e1);
+ ErrorCode.BusinessProcessError.getValue(), e1);
}
// Build and send Asynchronous error response
try {
@@ -408,7 +408,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
notifyPort.rollbackVnfNotification(messageId, false, exCat, eMsg);
} catch (Exception e1) {
logger.error("{} {} Exception sending rollbackVnfA notification ", MessageEnum.RA_SEND_VNF_NOTIF_ERR,
- ErrorCode.BusinessProcesssError.getValue(), e1);
+ ErrorCode.BusinessProcessError.getValue(), e1);
}
logger.info("{} rollbackVnfA", MessageEnum.RA_ASYNC_ROLLBACK_VNF_COMPLETE);
return;
@@ -421,7 +421,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
notifyPort.rollbackVnfNotification(messageId, true, null, null);
} catch (Exception e) {
logger.error("{} {} Exception sending rollbackVnfA notification ", MessageEnum.RA_SEND_VNF_NOTIF_ERR,
- ErrorCode.BusinessProcesssError.getValue(), e);
+ ErrorCode.BusinessProcessError.getValue(), e);
}
logger.info("{} rollbackVnfA", MessageEnum.RA_ASYNC_ROLLBACK_VNF_COMPLETE);
@@ -519,17 +519,17 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
warWsdlLoc = Thread.currentThread().getContextClassLoader().getResource("VnfAdapterNotify.wsdl");
} catch (Exception e) {
logger.error("{} {} Exception - WSDL not found ", MessageEnum.RA_WSDL_NOT_FOUND,
- ErrorCode.BusinessProcesssError.getValue(), e);
+ ErrorCode.BusinessProcessError.getValue(), e);
}
if (warWsdlLoc == null) {
logger.error("{} {} WSDL not found", MessageEnum.RA_WSDL_NOT_FOUND,
- ErrorCode.BusinessProcesssError.getValue());
+ ErrorCode.BusinessProcessError.getValue());
} else {
try {
logger.debug("VnfAdpaterNotify.wsdl location:{}", warWsdlLoc.toURI().toString());
} catch (Exception e) {
logger.error("{} {} Exception - WSDL URL convention ", MessageEnum.RA_WSDL_URL_CONVENTION_EXC,
- ErrorCode.BusinessProcesssError.getValue(), e);
+ ErrorCode.BusinessProcessError.getValue(), e);
}
}
@@ -545,7 +545,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
epUrl = new URL(notificationUrl);
} catch (MalformedURLException e1) {
logger.error("{} {} MalformedURLException ", MessageEnum.RA_INIT_NOTIF_EXC,
- ErrorCode.BusinessProcesssError.getValue(), e1);
+ ErrorCode.BusinessProcessError.getValue(), e1);
}
if (null != epUrl) {
@@ -567,7 +567,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
headers.put("Authorization", Collections.singletonList(basicAuth));
} catch (Exception e) {
logger.error("{} {} Exception - Unable to set authorization in callback request ",
- MessageEnum.RA_SET_CALLBACK_AUTH_EXC, ErrorCode.BusinessProcesssError.getValue(), e);
+ MessageEnum.RA_SET_CALLBACK_AUTH_EXC, ErrorCode.BusinessProcessError.getValue(), e);
}
return notifyPort;
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java
index 2c78e593a1..fcb2d7c2bb 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java
@@ -25,15 +25,11 @@
package org.onap.so.adapters.vnf;
-import java.io.File;
-import java.io.IOException;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
-import java.util.concurrent.TimeUnit;
import javax.jws.WebService;
import javax.xml.ws.Holder;
import org.apache.commons.collections.CollectionUtils;
@@ -63,6 +59,7 @@ import org.onap.so.db.catalog.data.repository.VFModuleCustomizationRepository;
import org.onap.so.db.catalog.data.repository.VnfResourceRepository;
import org.onap.so.db.catalog.utils.MavenLikeVersioning;
import org.onap.so.entity.MsoRequest;
+import org.onap.so.heatbridge.HeatBridgeException;
import org.onap.so.heatbridge.HeatBridgeApi;
import org.onap.so.heatbridge.HeatBridgeImpl;
import org.onap.so.logger.ErrorCode;
@@ -414,34 +411,6 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
return new HashMap<>(stringInputs);
}
- protected boolean callHeatbridge(String heatStackId) {
- String executionDir = "/usr/local/lib/python2.7/dist-packages/heatbridge";
- String openstackIdentityUrl = "", username = "", password = "", tenant = "", region = "", owner = "";
- long waitTimeMs = 10000L;
- try {
- String[] cmdarray = {"/usr/bin/python", "HeatBridgeMain.py", openstackIdentityUrl, username, password,
- tenant, region, owner, heatStackId};
- String[] envp = null;
- File dir = new File(executionDir);
- logger.debug("Calling HeatBridgeMain.py in {} with arguments {}", dir, Arrays.toString(cmdarray));
- Runtime r = Runtime.getRuntime();
- Process p = r.exec(cmdarray, envp, dir);
- boolean wait = p.waitFor(waitTimeMs, TimeUnit.MILLISECONDS);
-
- logger.debug(" HeatBridgeMain.py returned {} with code {}", wait, p.exitValue());
- return wait && p.exitValue() == 0;
- } catch (IOException e) {
- logger.debug(" HeatBridgeMain.py failed with IO Exception! {}", e);
- return false;
- } catch (RuntimeException e) {
- logger.debug(" HeatBridgeMain.py failed during runtime! {}", e);
- return false;
- } catch (Exception e) {
- logger.debug(" HeatBridgeMain.py failed for unknown reasons! {}", e);
- return false;
- }
- }
-
private void heatbridge(StackInfo heatStack, String cloudOwner, String cloudSiteId, String tenantId,
String genericVnfName, String vfModuleId) {
try {
@@ -452,13 +421,17 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
List<String> oobMgtNetNames = new ArrayList<>();
- HeatBridgeApi heatBridgeClient =
- new HeatBridgeImpl(new AAIResourcesClient(), cloudIdentity, cloudOwner, cloudSiteId, tenantId);
+ HeatBridgeApi heatBridgeClient = new HeatBridgeImpl(new AAIResourcesClient(), cloudIdentity, cloudOwner,
+ cloudSiteId, cloudSite.getRegionId(), tenantId);
+
+ heatBridgeClient.authenticate();
List<Resource> stackResources = heatBridgeClient.queryNestedHeatStackResources(heatStackId);
List<Server> osServers = heatBridgeClient.getAllOpenstackServers(stackResources);
+ heatBridgeClient.createPserversAndPinterfacesIfNotPresentInAai(stackResources);
+
List<Image> osImages = heatBridgeClient.extractOpenstackImagesFromServers(osServers);
List<Flavor> osFlavors = heatBridgeClient.extractOpenstackFlavorsFromServers(osServers);
@@ -632,11 +605,6 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
vfRollback.setIsBase(isBaseRequest);
vfRollback.setModelCustomizationUuid(mcu);
- // Put data into A&AI through Heatstack
- if (enableBridge != null && enableBridge) {
- callHeatbridge(baseVfHeatStackId);
- }
-
// handle a nestedStackId if sent- this one would be for the volume - so applies to both Vf and Vnf
StackInfo nestedHeatStack = null;
Map<String, Object> nestedVolumeOutputs = null;
@@ -651,7 +619,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
String error = "Create VFModule: Attached heatStack ID Query " + nestedStackId + " in " + cloudOwner
+ "/" + cloudSiteId + "/" + tenantId + ": " + me;
logger.error(LoggingAnchor.NINE, MessageEnum.RA_QUERY_VNF_ERR.toString(), vfModuleName, cloudOwner,
- cloudSiteId, tenantId, OPENSTACK, QUERY_STACK, ErrorCode.BusinessProcesssError.getValue(),
+ cloudSiteId, tenantId, OPENSTACK, QUERY_STACK, ErrorCode.BusinessProcessError.getValue(),
"MsoException trying to query nested stack", me);
logger.debug("ERROR trying to query nested stack= {}", error);
throw new VnfException(me);
@@ -660,8 +628,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
String error = "Create VFModule: Attached heatStack ID DOES NOT EXIST " + nestedStackId + " in "
+ cloudOwner + "/" + cloudSiteId + "/" + tenantId + " " + USER_ERROR;
logger.error(LoggingAnchor.TEN, MessageEnum.RA_QUERY_VNF_ERR.toString(), vfModuleName, cloudOwner,
- cloudSiteId, tenantId, error, OPENSTACK, QUERY_STACK,
- ErrorCode.BusinessProcesssError.getValue(),
+ cloudSiteId, tenantId, error, OPENSTACK, QUERY_STACK, ErrorCode.BusinessProcessError.getValue(),
"Create VFModule: Attached heatStack ID " + "DOES NOT EXIST");
logger.debug(error);
throw new VnfException(error, MsoExceptionCategory.USERDATA);
@@ -685,7 +652,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
String error = "Create VFModule: Attached baseHeatStack ID Query " + nestedBaseStackId + " in "
+ cloudOwner + "/" + cloudSiteId + "/" + tenantId + ": " + me;
logger.error(LoggingAnchor.NINE, MessageEnum.RA_QUERY_VNF_ERR.toString(), vfModuleName, cloudOwner,
- cloudSiteId, tenantId, OPENSTACK, QUERY_STACK, ErrorCode.BusinessProcesssError.getValue(),
+ cloudSiteId, tenantId, OPENSTACK, QUERY_STACK, ErrorCode.BusinessProcessError.getValue(),
"MsoException trying to query nested base stack", me);
logger.debug("ERROR trying to query nested base stack= {}", error);
throw new VnfException(me);
@@ -694,8 +661,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
String error = "Create VFModule: Attached base heatStack ID DOES NOT EXIST " + nestedBaseStackId
+ " in " + cloudOwner + "/" + cloudSiteId + "/" + tenantId + " " + USER_ERROR;
logger.error(LoggingAnchor.TEN, MessageEnum.RA_QUERY_VNF_ERR.toString(), vfModuleName, cloudOwner,
- cloudSiteId, tenantId, error, OPENSTACK, QUERY_STACK,
- ErrorCode.BusinessProcesssError.getValue(),
+ cloudSiteId, tenantId, error, OPENSTACK, QUERY_STACK, ErrorCode.BusinessProcessError.getValue(),
"Create VFModule: Attached base heatStack ID DOES NOT EXIST");
logger.debug("Exception occurred", error);
throw new VnfException(error, MsoExceptionCategory.USERDATA);
@@ -827,7 +793,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
+ VERSION_MAX + " :" + maxVersionVnf + " NOT supported on Cloud: " + cloudSiteId
+ " with AIC_Version:" + cloudSiteOpt.get().getCloudVersion();
logger.error(LoggingAnchor.FIVE, MessageEnum.RA_CONFIG_EXC.toString(), error, OPENSTACK,
- ErrorCode.BusinessProcesssError.getValue(), "Exception - setVersion");
+ ErrorCode.BusinessProcessError.getValue(), "Exception - setVersion");
logger.debug(error);
throw new VnfException(error, MsoExceptionCategory.USERDATA);
}
@@ -1107,6 +1073,9 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
if (backout == null) {
backout = true;
}
+ if (failIfExists == null) {
+ failIfExists = false;
+ }
if (msoHeatUtils != null) {
heatStack = msoHeatUtils.createStack(cloudSiteId, cloudOwner, tenantId, vfModuleName, null,
template, goldenInputs, true, heatTemplate.getTimeoutMinutes(), newEnvironmentString,
@@ -1156,8 +1125,10 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
}
}
logger.debug("VF Module {} successfully created", vfModuleName);
- // call heatbridge
- heatbridge(heatStack, cloudOwner, cloudSiteId, tenantId, genericVnfName, vfModuleId);
+ if (enableBridge != null && enableBridge) {
+ // call heatbridge
+ heatbridge(heatStack, cloudOwner, cloudSiteId, tenantId, genericVnfName, vfModuleId);
+ }
} catch (Exception e) {
logger.debug("unhandled exception in create VF", e);
throw new VnfException("Exception during create VF " + e.getMessage());
@@ -1165,8 +1136,8 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
}
@Override
- public void deleteVfModule(String cloudSiteId, String cloudOwner, String tenantId, String vnfName,
- MsoRequest msoRequest, Holder<Map<String, String>> outputs) throws VnfException {
+ public void deleteVfModule(String cloudSiteId, String cloudOwner, String tenantId, String vnfName, String vnfId,
+ String vfModuleId, MsoRequest msoRequest, Holder<Map<String, String>> outputs) throws VnfException {
Map<String, Object> stackOutputs;
try {
stackOutputs = msoHeatUtils.queryStackForOutputs(cloudSiteId, cloudOwner, tenantId, vnfName);
@@ -1231,6 +1202,12 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
logger.error("Exception encountered while sending Confirm to Valet ", e);
}
}
+ // call heatbridge delete
+ try {
+ new HeatBridgeImpl().deleteVfModuleData(vnfId, vfModuleId);
+ } catch (HeatBridgeException e) {
+ logger.error("Heatbridge failed to delete AAI data for vf-module: " + vfModuleId, e);
+ }
}
@Override
@@ -1515,7 +1492,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
+ minVersionVnf + " " + VERSION_MAX + " :" + maxVersionVnf
+ " NOT supported on Cloud: " + cloudSiteId + " with AIC_Version:" + aicV;
logger.error(LoggingAnchor.FIVE, MessageEnum.RA_CONFIG_EXC.toString(), error, OPENSTACK,
- ErrorCode.BusinessProcesssError.getValue(), "Exception - setVersion");
+ ErrorCode.BusinessProcessError.getValue(), "Exception - setVersion");
logger.debug(error);
throw new VnfException(error, MsoExceptionCategory.USERDATA);
}
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImpl.java
index f09fa34cb9..d35c34a937 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImpl.java
@@ -601,7 +601,7 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter {
+ vnfResource.getModelUUID() + " VersionMin=" + vnfMin + " VersionMax:" + vnfMax
+ " NOT supported on Cloud: " + cloudSiteId + " with AIC_Version:" + cloudSite.getCloudVersion();
logger.error(LoggingAnchor.FIVE, MessageEnum.RA_CONFIG_EXC.toString(), error, OPENSTACK,
- ErrorCode.BusinessProcesssError.getValue(), "Exception - setVersion");
+ ErrorCode.BusinessProcessError.getValue(), "Exception - setVersion");
logger.debug(error);
throw new VnfException(error, MsoExceptionCategory.USERDATA);
}
@@ -725,7 +725,7 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter {
String error = "Create VFModule: Attached Volume Group DOES NOT EXIST " + volumeGroupId + " in "
+ cloudSiteId + "/" + tenantId + " USER ERROR";
logger.error(BRACKETS, MessageEnum.RA_QUERY_VNF_ERR.toString(), volumeGroupId, cloudSiteId, tenantId,
- error, CLOUDIFY, "queryDeployment(volume)", ErrorCode.BusinessProcesssError.getValue(),
+ error, CLOUDIFY, "queryDeployment(volume)", ErrorCode.BusinessProcessError.getValue(),
"Create VFModule: Attached Volume Group DOES NOT EXIST");
logger.debug(error);
throw new VnfException(error, MsoExceptionCategory.USERDATA);
@@ -774,7 +774,7 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter {
+ cloudSiteId + "/" + tenantId + " USER ERROR";
logger.error(BRACKETS, MessageEnum.RA_QUERY_VNF_ERR.toString(), baseVfModuleId, cloudSiteId,
tenantId, error, CLOUDIFY, "queryDeployment(Base)",
- ErrorCode.BusinessProcesssError.getValue(),
+ ErrorCode.BusinessProcessError.getValue(),
"Create VFModule: Base " + "Module DOES NOT EXIST");
logger.debug(error);
throw new VnfException(error, MsoExceptionCategory.USERDATA);
@@ -1081,8 +1081,8 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter {
}
- public void deleteVfModule(String cloudSiteId, String cloudOwner, String tenantId, String vnfName,
- MsoRequest msoRequest, Holder<Map<String, String>> outputs) throws VnfException {
+ public void deleteVfModule(String cloudSiteId, String cloudOwner, String tenantId, String vnfName, String vnfId,
+ String vfModuleId, MsoRequest msoRequest, Holder<Map<String, String>> outputs) throws VnfException {
logger.debug("Deleting VF " + vnfName + " in " + cloudOwner + "/" + cloudSiteId + "/" + tenantId);
// 1702 capture the output parameters on a delete
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImpl.java
index 41bcc8c481..561b21250f 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImpl.java
@@ -643,7 +643,7 @@ public class MsoVnfPluginAdapterImpl implements MsoVnfAdapter {
+ " VersionMin=" + vnfMin + " VersionMax:" + vnfMax + " NOT supported on Cloud: "
+ cloudSiteId + " with AIC_Version:" + cloudSite.getCloudVersion();
logger.error(LoggingAnchor.FIVE, MessageEnum.RA_CONFIG_EXC.toString(), error, "OpenStack",
- ErrorCode.BusinessProcesssError.getValue(), "Exception - setVersion");
+ ErrorCode.BusinessProcessError.getValue(), "Exception - setVersion");
logger.debug(error);
throw new VnfException(error, MsoExceptionCategory.USERDATA);
}
@@ -773,7 +773,7 @@ public class MsoVnfPluginAdapterImpl implements MsoVnfAdapter {
+ cloudOwner + "/" + cloudSiteId + "/" + tenantId + " USER ERROR";
logger.error(LoggingAnchor.TEN, MessageEnum.RA_QUERY_VNF_ERR.toString(), volumeGroupId, cloudOwner,
cloudSiteId, tenantId, error, "VDU", "queryVdu(volume)",
- ErrorCode.BusinessProcesssError.getValue(),
+ ErrorCode.BusinessProcessError.getValue(),
"Create VFModule: Attached Volume Group " + "DOES NOT EXIST");
logger.debug(error);
throw new VnfException(error, MsoExceptionCategory.USERDATA);
@@ -822,7 +822,7 @@ public class MsoVnfPluginAdapterImpl implements MsoVnfAdapter {
+ "/" + cloudSiteId + "/" + tenantId + " USER ERROR";
logger.error(LoggingAnchor.TEN, MessageEnum.RA_QUERY_VNF_ERR.toString(), baseVfModuleId, cloudOwner,
cloudSiteId, tenantId, error, "VDU", "queryVdu(Base)",
- ErrorCode.BusinessProcesssError.getValue(), "Create VFModule: Base Module DOES NOT EXIST");
+ ErrorCode.BusinessProcessError.getValue(), "Create VFModule: Base Module DOES NOT EXIST");
logger.debug(error);
throw new VnfException(error, MsoExceptionCategory.USERDATA);
} else {
@@ -1072,8 +1072,8 @@ public class MsoVnfPluginAdapterImpl implements MsoVnfAdapter {
}
- public void deleteVfModule(String cloudSiteId, String cloudOwner, String tenantId, String vfModuleId,
- MsoRequest msoRequest, Holder<Map<String, String>> outputs) throws VnfException {
+ public void deleteVfModule(String cloudSiteId, String cloudOwner, String tenantId, String vfModuleId, String vnfId,
+ String aaiVfModuleId, MsoRequest msoRequest, Holder<Map<String, String>> outputs) throws VnfException {
logger.debug("Deleting VF Module " + vfModuleId + " in " + cloudOwner + "/" + cloudSiteId + "/" + tenantId);
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VnfAdapterRest.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VnfAdapterRest.java
index 8c871c742e..58899b7f48 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VnfAdapterRest.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VnfAdapterRest.java
@@ -130,7 +130,7 @@ public class VnfAdapterRest {
} catch (Exception e) {
// problem handling delete, send generic failure as sync resp to caller
logger.error("", MessageEnum.RA_DELETE_VNF_ERR.toString(), "deleteVfModule",
- ErrorCode.BusinessProcesssError.getValue(), "Exception in deleteVfModule", e);
+ ErrorCode.BusinessProcessError.getValue(), "Exception in deleteVfModule", e);
return Response.serverError().build();
}
// send sync response (ACK) to caller
@@ -179,13 +179,14 @@ public class VnfAdapterRest {
Holder<Map<String, String>> outputs = new Holder<>();
if (cloudsite != null && !cloudsite.equals(TESTING_KEYWORD)) {
vnfAdapter.deleteVfModule(req.getCloudSiteId(), req.getCloudOwner(), req.getTenantId(),
- req.getVfModuleStackId(), req.getMsoRequest(), outputs);
+ req.getVfModuleStackId(), req.getVnfId(), req.getVfModuleId(), req.getMsoRequest(),
+ outputs);
}
response = new DeleteVfModuleResponse(req.getVnfId(), req.getVfModuleId(), Boolean.TRUE,
req.getMessageId(), outputs.value);
} catch (VnfException e) {
logger.error(LoggingAnchor.THREE, MessageEnum.RA_DELETE_VNF_ERR.toString(),
- ErrorCode.BusinessProcesssError.getValue(), "VnfException - Delete VNF Module", e);
+ ErrorCode.BusinessProcessError.getValue(), "VnfException - Delete VNF Module", e);
eresp = new VfModuleExceptionResponse(e.getMessage(), MsoExceptionCategory.INTERNAL, Boolean.TRUE,
req.getMessageId());
}
@@ -243,7 +244,7 @@ public class VnfAdapterRest {
return Response.status(respStatus).entity(new GenericEntity<QueryVfModuleResponse>(qryResp) {}).build();
} catch (VnfException e) {
logger.error(LoggingAnchor.FIVE, MessageEnum.RA_QUERY_VNF_ERR.toString(), vfModuleName, "queryVfModule",
- ErrorCode.BusinessProcesssError.getValue(), "VnfException - queryVfModule", e);
+ ErrorCode.BusinessProcessError.getValue(), "VnfException - queryVfModule", e);
VfModuleExceptionResponse excResp =
new VfModuleExceptionResponse(e.getMessage(), MsoExceptionCategory.INTERNAL, Boolean.FALSE, null);
return Response.status(HttpStatus.SC_INTERNAL_SERVER_ERROR)
@@ -290,7 +291,7 @@ public class VnfAdapterRest {
} catch (Exception e) {
// problem handling create, send generic failure as sync resp to caller
logger.error(LoggingAnchor.FOUR, MessageEnum.RA_CREATE_VNF_ERR, "createVfModule",
- ErrorCode.BusinessProcesssError, "Exception - createVfModule", e);
+ ErrorCode.BusinessProcessError, "Exception - createVfModule", e);
return Response.serverError().build();
}
// send sync response (ACK) to caller
@@ -405,7 +406,7 @@ public class VnfAdapterRest {
} catch (Exception e) {
// problem handling create, send generic failure as sync resp to caller
logger.error(LoggingAnchor.FOUR, MessageEnum.RA_UPDATE_VNF_ERR.toString(), "updateVfModule",
- ErrorCode.BusinessProcesssError.getValue(), "Exception - updateVfModule", e);
+ ErrorCode.BusinessProcessError.getValue(), "Exception - updateVfModule", e);
return Response.serverError().build();
}
// send sync response (ACK) to caller
@@ -509,7 +510,7 @@ public class VnfAdapterRest {
} catch (Exception e) {
// problem handling create, send generic failure as sync resp to caller
logger.error(LoggingAnchor.FOUR, MessageEnum.RA_ROLLBACK_VNF_ERR.toString(), "rollbackVfModule",
- ErrorCode.BusinessProcesssError.getValue(), "Exception - rollbackVfModule", e);
+ ErrorCode.BusinessProcessError.getValue(), "Exception - rollbackVfModule", e);
return Response.serverError().build();
}
// send sync response (ACK) to caller
@@ -560,7 +561,7 @@ public class VnfAdapterRest {
vnfAdapter.rollbackVnf(vrb);
response = new RollbackVfModuleResponse(Boolean.TRUE, req.getMessageId());
} catch (VnfException e) {
- logger.error(LoggingAnchor.THREE, MessageEnum.RA_ROLLBACK_VNF_ERR, ErrorCode.BusinessProcesssError,
+ logger.error(LoggingAnchor.THREE, MessageEnum.RA_ROLLBACK_VNF_ERR, ErrorCode.BusinessProcessError,
"Exception" + " - " + "rollbackVfModule", e);
eresp = new VfModuleExceptionResponse(e.getMessage(), MsoExceptionCategory.INTERNAL, false,
req.getMessageId());
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VnfAdapterRestV2.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VnfAdapterRestV2.java
index 9a7354c40c..0e70c6be53 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VnfAdapterRestV2.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VnfAdapterRestV2.java
@@ -140,7 +140,7 @@ public class VnfAdapterRestV2 {
} catch (Exception e) {
// problem handling delete, send generic failure as sync resp to caller
logger.error(BRACKETS, MessageEnum.RA_DELETE_VNF_ERR.toString(), "deleteVfModule",
- ErrorCode.BusinessProcesssError.getValue(), "Exception in deleteVfModule", e);
+ ErrorCode.BusinessProcessError.getValue(), "Exception in deleteVfModule", e);
return Response.serverError().build();
}
// send sync response (ACK) to caller
@@ -195,13 +195,14 @@ public class VnfAdapterRestV2 {
// Support different Adapter Implementations
MsoVnfAdapter adapter = vnfAdapterRestUtils.getVnfAdapterImpl(mode, cloudsite);
adapter.deleteVfModule(req.getCloudSiteId(), req.getCloudOwner(), req.getTenantId(),
- req.getVfModuleStackId(), req.getMsoRequest(), outputs);
+ req.getVfModuleStackId(), req.getVnfId(), req.getVfModuleId(), req.getMsoRequest(),
+ outputs);
}
response = new DeleteVfModuleResponse(req.getVnfId(), req.getVfModuleId(), Boolean.TRUE,
req.getMessageId(), outputs.value);
} catch (VnfException e) {
logger.error(LoggingAnchor.THREE, MessageEnum.RA_DELETE_VNF_ERR.toString(),
- ErrorCode.BusinessProcesssError.getValue(), "VnfException - " + "Delete VNF Module", e);
+ ErrorCode.BusinessProcessError.getValue(), "VnfException - " + "Delete VNF Module", e);
eresp = new VfModuleExceptionResponse(e.getMessage(), MsoExceptionCategory.INTERNAL, Boolean.TRUE,
req.getMessageId());
}
@@ -271,7 +272,7 @@ public class VnfAdapterRestV2 {
return Response.status(respStatus).entity(new GenericEntity<QueryVfModuleResponse>(qryResp) {}).build();
} catch (VnfException e) {
logger.error(LoggingAnchor.FIVE, MessageEnum.RA_QUERY_VNF_ERR.toString(), vfModuleName, "queryVfModule",
- ErrorCode.BusinessProcesssError.getValue(), "VnfException - queryVfModule", e);
+ ErrorCode.BusinessProcessError.getValue(), "VnfException - queryVfModule", e);
VfModuleExceptionResponse excResp =
new VfModuleExceptionResponse(e.getMessage(), MsoExceptionCategory.INTERNAL, Boolean.FALSE, null);
return Response.status(HttpStatus.SC_INTERNAL_SERVER_ERROR)
@@ -320,7 +321,7 @@ public class VnfAdapterRestV2 {
} catch (Exception e) {
// problem handling create, send generic failure as sync resp to caller
logger.error(BRACKETS, MessageEnum.RA_CREATE_VNF_ERR.toString(), "createVfModule",
- ErrorCode.BusinessProcesssError.getValue(), "Exception - createVfModule", e);
+ ErrorCode.BusinessProcessError.getValue(), "Exception - createVfModule", e);
return Response.serverError().build();
}
// send sync response (ACK) to caller
@@ -440,7 +441,7 @@ public class VnfAdapterRestV2 {
} catch (Exception e) {
// problem handling create, send generic failure as sync resp to caller
logger.error(BRACKETS, MessageEnum.RA_UPDATE_VNF_ERR.toString(), "updateVfModule",
- ErrorCode.BusinessProcesssError.getValue(), "Exception - updateVfModule", e);
+ ErrorCode.BusinessProcessError.getValue(), "Exception - updateVfModule", e);
return Response.serverError().build();
}
// send sync response (ACK) to caller
@@ -555,7 +556,7 @@ public class VnfAdapterRestV2 {
} catch (Exception e) {
// problem handling create, send generic failure as sync resp to caller
logger.error(BRACKETS, MessageEnum.RA_ROLLBACK_VNF_ERR.toString(), "rollbackVfModule",
- ErrorCode.BusinessProcesssError.getValue(), "Exception - rollbackVfModule", e);
+ ErrorCode.BusinessProcessError.getValue(), "Exception - rollbackVfModule", e);
return Response.serverError().build();
}
// send sync response (ACK) to caller
@@ -612,7 +613,7 @@ public class VnfAdapterRestV2 {
response = new RollbackVfModuleResponse(Boolean.TRUE, req.getMessageId());
} catch (VnfException e) {
logger.error(LoggingAnchor.THREE, MessageEnum.RA_ROLLBACK_VNF_ERR.toString(),
- ErrorCode.BusinessProcesssError.getValue(), "Exception - rollbackVfModule", e);
+ ErrorCode.BusinessProcessError.getValue(), "Exception - rollbackVfModule", e);
eresp = new VfModuleExceptionResponse(e.getMessage(), MsoExceptionCategory.INTERNAL, false,
req.getMessageId());
}
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VolumeAdapterRest.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VolumeAdapterRest.java
index 87df7fdc37..c9e046ca43 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VolumeAdapterRest.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VolumeAdapterRest.java
@@ -118,7 +118,7 @@ public class VolumeAdapterRest {
} catch (Exception e) {
// problem handling create, send generic failure as sync resp to caller
logger.error("{} {} Exception - createVNFVolumes: ", MessageEnum.RA_CREATE_VNF_ERR,
- ErrorCode.BusinessProcesssError.getValue(), e);
+ ErrorCode.BusinessProcessError.getValue(), e);
return Response.serverError().build();
}
// send sync response (ACK) to caller
@@ -270,7 +270,7 @@ public class VolumeAdapterRest {
} catch (Exception e) {
// problem handling create, send generic failure as sync resp to caller
logger.error("{} {} Exception - deleteVNFVolumes: ", MessageEnum.RA_DELETE_VNF_ERR,
- ErrorCode.BusinessProcesssError.getValue(), e);
+ ErrorCode.BusinessProcessError.getValue(), e);
return Response.serverError().build();
}
// send sync response (ACK) to caller
@@ -367,7 +367,7 @@ public class VolumeAdapterRest {
} catch (Exception e) {
// problem handling create, send generic failure as sync resp to caller
logger.error("{} {} Exception - rollbackVNFVolumes: ", MessageEnum.RA_ROLLBACK_VNF_ERR,
- ErrorCode.BusinessProcesssError.getValue(), e);
+ ErrorCode.BusinessProcessError.getValue(), e);
return Response.serverError().build();
}
// send sync response (ACK) to caller
@@ -463,7 +463,7 @@ public class VolumeAdapterRest {
} catch (Exception e) {
// problem handling create, send generic failure as sync resp to caller
logger.error("{} {} Exception - updateVNFVolumes: ", MessageEnum.RA_UPDATE_VNF_ERR,
- ErrorCode.BusinessProcesssError.getValue(), e);
+ ErrorCode.BusinessProcessError.getValue(), e);
return Response.serverError().build();
}
// send sync response (ACK) to caller
@@ -607,7 +607,7 @@ public class VolumeAdapterRest {
return Response.status(respStatus).entity(new GenericEntity<QueryVolumeGroupResponse>(qryResp) {}).build();
} catch (VnfException e) {
logger.error("{} {} AaiVolumeGroupId: {} VnfException - queryVNFVolumes", MessageEnum.RA_QUERY_VNF_ERR,
- ErrorCode.BusinessProcesssError.getValue(), aaiVolumeGroupId, e);
+ ErrorCode.BusinessProcessError.getValue(), aaiVolumeGroupId, e);
VolumeGroupExceptionResponse excResp = new VolumeGroupExceptionResponse(e.getMessage(),
MsoExceptionCategory.INTERNAL, Boolean.FALSE, null);
logger.debug("Query queryVNFVolumes exit");
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VolumeAdapterRestV2.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VolumeAdapterRestV2.java
index 89eb6a161d..2b7234aca6 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VolumeAdapterRestV2.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VolumeAdapterRestV2.java
@@ -118,7 +118,7 @@ public class VolumeAdapterRestV2 {
} catch (Exception e) {
// problem handling create, send generic failure as sync resp to caller
logger.error("{} {} Exception - createVNFVolumes: ", MessageEnum.RA_CREATE_VNF_ERR,
- ErrorCode.BusinessProcesssError.getValue(), e);
+ ErrorCode.BusinessProcessError.getValue(), e);
return Response.serverError().build();
}
// send sync response (ACK) to caller
@@ -253,7 +253,7 @@ public class VolumeAdapterRestV2 {
} catch (Exception e) {
// problem handling create, send generic failure as sync resp to caller
logger.error("{} {} Exception - deleteVNFVolumes: ", MessageEnum.RA_DELETE_VNF_ERR,
- ErrorCode.BusinessProcesssError.getValue(), e);
+ ErrorCode.BusinessProcessError.getValue(), e);
return Response.serverError().build();
}
// send sync response (ACK) to caller
@@ -355,7 +355,7 @@ public class VolumeAdapterRestV2 {
} catch (Exception e) {
// problem handling create, send generic failure as sync resp to caller
logger.error("{} {} Exception - rollbackVNFVolumes: ", MessageEnum.RA_ROLLBACK_VNF_ERR,
- ErrorCode.BusinessProcesssError.getValue(), e);
+ ErrorCode.BusinessProcessError.getValue(), e);
return Response.serverError().build();
}
// send sync response (ACK) to caller
@@ -455,7 +455,7 @@ public class VolumeAdapterRestV2 {
} catch (Exception e) {
// problem handling create, send generic failure as sync resp to caller
logger.error("{} {} Exception - updateVNFVolumes: ", MessageEnum.RA_UPDATE_VNF_ERR,
- ErrorCode.BusinessProcesssError.getValue(), e);
+ ErrorCode.BusinessProcessError.getValue(), e);
return Response.serverError().build();
}
// send sync response (ACK) to caller
@@ -594,7 +594,7 @@ public class VolumeAdapterRestV2 {
return Response.status(respStatus).entity(new GenericEntity<QueryVolumeGroupResponse>(qryResp) {}).build();
} catch (VnfException e) {
logger.error("{} {} AaiVolumeGroupId: {} VnfException - queryVNFVolumes: ", MessageEnum.RA_QUERY_VNF_ERR,
- ErrorCode.BusinessProcesssError.getValue(), aaiVolumeGroupId, e);
+ ErrorCode.BusinessProcessError.getValue(), aaiVolumeGroupId, e);
VolumeGroupExceptionResponse excResp = new VolumeGroupExceptionResponse(e.getMessage(),
MsoExceptionCategory.INTERNAL, Boolean.FALSE, null);
logger.debug("Query queryVNFVolumes exit");
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeApi.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeApi.java
index aebd04f32c..7eff09b692 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeApi.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeApi.java
@@ -138,9 +138,23 @@ public interface HeatBridgeApi {
void buildAddVserverLInterfacesToAaiAction(List<Resource> stackResources, List<String> oobMgtNetIds);
/**
+ * Query and build AAI actions for Openstack Compute resources to AAI's pserver and pinterface objects
+ *
+ * @param stackResources Openstack StackResources list
+ */
+ void createPserversAndPinterfacesIfNotPresentInAai(final List<Resource> stackResources) throws HeatBridgeException;
+
+ /**
* Execute AAI restful API to update the Openstack resources
*
* @throws HeatBridgeException when failing to add openstack resource PoJos to AAI
*/
void submitToAai() throws HeatBridgeException;
+
+ /**
+ * Delete heatbridge data for a given vf-module
+ *
+ * @throws HeatBridgeException when failing to remove heatbridge data from AAI for a given vf-module
+ */
+ void deleteVfModuleData(String vnfId, String vfModuleId) throws HeatBridgeException;
}
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeImpl.java
index ae15b70b00..e2022c9a6e 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeImpl.java
@@ -32,6 +32,7 @@
*/
package org.onap.so.heatbridge;
+import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
@@ -49,6 +50,7 @@ import org.onap.aai.domain.yang.Image;
import org.onap.aai.domain.yang.L3InterfaceIpv4AddressList;
import org.onap.aai.domain.yang.LInterface;
import org.onap.aai.domain.yang.PInterface;
+import org.onap.aai.domain.yang.Pserver;
import org.onap.aai.domain.yang.SriovPf;
import org.onap.aai.domain.yang.SriovPfs;
import org.onap.aai.domain.yang.SriovVf;
@@ -56,13 +58,17 @@ import org.onap.aai.domain.yang.SriovVfs;
import org.onap.aai.domain.yang.Vlan;
import org.onap.aai.domain.yang.Vlans;
import org.onap.aai.domain.yang.Vserver;
+import org.onap.aai.domain.yang.VfModule;
import org.onap.so.client.aai.AAIObjectType;
import org.onap.so.client.aai.AAIResourcesClient;
import org.onap.so.client.aai.AAISingleTransactionClient;
+import org.onap.so.client.aai.entities.AAIResultWrapper;
+import org.onap.so.client.aai.entities.Relationships;
import org.onap.so.client.aai.entities.uri.AAIResourceUri;
import org.onap.so.client.aai.entities.uri.AAIUriFactory;
import org.onap.so.client.graphinventory.entities.uri.Depth;
import org.onap.so.client.graphinventory.exceptions.BulkProcessFailed;
+import org.onap.so.client.PreconditionFailedException;
import org.onap.so.db.catalog.beans.CloudIdentity;
import org.onap.so.heatbridge.constants.HeatBridgeConstants;
import org.onap.so.heatbridge.factory.MsoCloudClientFactoryImpl;
@@ -99,33 +105,39 @@ public class HeatBridgeImpl implements HeatBridgeApi {
private AAISingleTransactionClient transaction;
private String cloudOwner;
private String cloudRegionId;
+ private String regionId;
private String tenantId;
private AaiHelper aaiHelper = new AaiHelper();
private CloudIdentity cloudIdentity;
-
public HeatBridgeImpl(AAIResourcesClient resourcesClient, final CloudIdentity cloudIdentity,
- @Nonnull final String cloudOwner, @Nonnull final String cloudRegionId, @Nonnull final String tenantId) {
+ @Nonnull final String cloudOwner, @Nonnull final String cloudRegionId, @Nonnull final String regionId,
+ @Nonnull final String tenantId) {
Objects.requireNonNull(cloudOwner, "Null cloud-owner value!");
Objects.requireNonNull(cloudRegionId, "Null cloud-region identifier!");
Objects.requireNonNull(tenantId, "Null tenant identifier!");
- Objects.requireNonNull(tenantId, "Null AAI actions list!");
+ Objects.requireNonNull(regionId, "Null regionId identifier!");
this.cloudIdentity = cloudIdentity;
this.cloudOwner = cloudOwner;
this.cloudRegionId = cloudRegionId;
+ this.regionId = regionId;
this.tenantId = tenantId;
this.resourcesClient = resourcesClient;
this.transaction = resourcesClient.beginSingleTransaction();
}
+ public HeatBridgeImpl() {
+ this.resourcesClient = new AAIResourcesClient();
+ this.transaction = resourcesClient.beginSingleTransaction();
+ }
+
@Override
public OpenstackClient authenticate() throws HeatBridgeException {
this.osClient = new MsoCloudClientFactoryImpl(new OpenstackClientFactoryImpl()).getOpenstackClient(
- cloudIdentity.getIdentityUrl(), cloudIdentity.getMsoId(), cloudIdentity.getMsoPass(), cloudRegionId,
+ cloudIdentity.getIdentityUrl(), cloudIdentity.getMsoId(), cloudIdentity.getMsoPass(), regionId,
tenantId);
- logger.debug("Successfully authenticated with keystone for tenant: " + tenantId + " and cloud " + "region: "
- + cloudRegionId);
+ logger.debug("Successfully authenticated with keystone for tenant: " + tenantId + " and region: " + regionId);
return osClient;
}
@@ -263,6 +275,44 @@ public class HeatBridgeImpl implements HeatBridgeApi {
}
}
+ @Override
+ public void createPserversAndPinterfacesIfNotPresentInAai(final List<Resource> stackResources)
+ throws HeatBridgeException {
+ Map<String, Pserver> serverHostnames = getPserverMapping(stackResources);
+ createPServerIfNotExists(serverHostnames);
+ List<String> portIds =
+ extractStackResourceIdsByResourceType(stackResources, HeatBridgeConstants.OS_PORT_RESOURCE_TYPE);
+ for (String portId : portIds) {
+ Port port = osClient.getPortById(portId);
+ if (port.getvNicType().equalsIgnoreCase(HeatBridgeConstants.OS_SRIOV_PORT_TYPE)) {
+ createPServerPInterfaceIfNotExists(serverHostnames.get(port.getHostId()).getHostname(),
+ aaiHelper.buildPInterface(port));
+ }
+ }
+ }
+
+ private Map<String, Pserver> getPserverMapping(final List<Resource> stackResources) {
+ List<Server> osServers = getAllOpenstackServers(stackResources);
+ Map<String, Pserver> pserverMap = new HashMap<>();
+ for (Server server : osServers) {
+ pserverMap.put(server.getHost(), aaiHelper.buildPserver(server));
+ }
+ return pserverMap;
+ }
+
+ private void createPServerIfNotExists(Map<String, Pserver> serverHostnames) {
+ for (Pserver pserver : serverHostnames.values()) {
+ AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.PSERVER, pserver.getHostname());
+ resourcesClient.createIfNotExists(uri, Optional.of(pserver));
+ }
+ }
+
+ private void createPServerPInterfaceIfNotExists(String pserverHostname, PInterface pInterface) {
+ AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.P_INTERFACE, pserverHostname,
+ pInterface.getInterfaceName());
+ resourcesClient.createIfNotExists(uri, Optional.of(pInterface));
+ }
+
private void updateLInterfaceVlan(final Port port, final LInterface lIf) {
Vlan vlan = new Vlan();
Network network = osClient.getNetworkById(port.getNetworkId());
@@ -377,6 +427,78 @@ public class HeatBridgeImpl implements HeatBridgeApi {
}
}
+ @Override
+ public void deleteVfModuleData(@Nonnull final String vnfId, @Nonnull final String vfModuleId)
+ throws HeatBridgeException {
+ Objects.requireNonNull(vnfId, "Null vnf-id!");
+ Objects.requireNonNull(vfModuleId, "Null vf-module-id!");
+ try {
+ Optional<VfModule> vfModule = resourcesClient.get(VfModule.class,
+ AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, vnfId, vfModuleId).depth(Depth.ONE));
+ if (vfModule.isPresent()) {
+
+ AAIResultWrapper resultWrapper = new AAIResultWrapper(vfModule);
+ Optional<Relationships> relationships = resultWrapper.getRelationships();
+ if (relationships.isPresent()) {
+ List<AAIResourceUri> vserverUris = relationships.get().getRelatedUris(AAIObjectType.VSERVER);
+ createTransactionToDeleteSriovPfFromPserver(vserverUris);
+ if (!vserverUris.isEmpty()) {
+ for (AAIResourceUri vserverUri : vserverUris) {
+ resourcesClient.delete(vserverUri);
+ }
+ }
+ }
+ }
+ } catch (Exception e) {
+ String msg = "Failed to commit delete heatbridge data transaction";
+ logger.debug(msg + " with error: " + e);
+ throw new HeatBridgeException(msg, e);
+ }
+ }
+
+ private void createTransactionToDeleteSriovPfFromPserver(List<AAIResourceUri> vserverUris) {
+ Map<String, List<String>> pserverToPciIdMap = getPserverToPciIdMap(vserverUris);
+ for (Map.Entry<String, List<String>> entry : pserverToPciIdMap.entrySet()) {
+ String pserverName = entry.getKey();
+ List<String> pciIds = entry.getValue();
+ Optional<Pserver> pserver = resourcesClient.get(Pserver.class,
+ AAIUriFactory.createResourceUri(AAIObjectType.PSERVER, pserverName).depth(Depth.TWO));
+ if (pserver.isPresent()) {
+ // For each pserver/p-interface match sriov-vfs by pic-id and delete them.
+ pserver.get().getPInterfaces().getPInterface().stream().filter(
+ pIf -> pIf.getSriovPfs() != null && CollectionUtils.isNotEmpty(pIf.getSriovPfs().getSriovPf()))
+ .forEach(pIf -> pIf.getSriovPfs().getSriovPf().forEach(sriovPf -> {
+ if (pciIds.contains(sriovPf.getPfPciId())) {
+ logger.debug("creating transaction to delete SR-IOV PF: " + pIf.getInterfaceName()
+ + " from PServer: " + pserverName);
+ resourcesClient.delete(AAIUriFactory.createResourceUri(AAIObjectType.SRIOV_PF,
+ pserverName, pIf.getInterfaceName(), sriovPf.getPfPciId()));
+ }
+ }));
+ }
+ }
+ }
+
+ private Map<String, List<String>> getPserverToPciIdMap(List<AAIResourceUri> vserverUris) {
+ Map<String, List<String>> pserverToPciIdMap = new HashMap<>();
+ for (AAIResourceUri vserverUri : vserverUris) {
+ AAIResultWrapper vserverWrapper = resourcesClient.get(vserverUri.depth(Depth.TWO));
+ Optional<Relationships> vserverRelationships = vserverWrapper.getRelationships();
+ if (vserverRelationships.isPresent()
+ && CollectionUtils.isNotEmpty(vserverRelationships.get().getRelatedLinks(AAIObjectType.PSERVER))) {
+ Vserver vserver = vserverWrapper.asBean(Vserver.class).get();
+ List<String> pciIds = HeatBridgeUtils.extractPciIdsFromVServer(vserver);
+ if (CollectionUtils.isNotEmpty(pciIds)) {
+ List<String> matchingPservers = vserverRelationships.get().getRelatedLinks(AAIObjectType.PSERVER);
+ if (matchingPservers != null && matchingPservers.size() == 1) {
+ pserverToPciIdMap.put(matchingPservers.get(0), pciIds);
+ }
+ }
+ }
+ }
+ return pserverToPciIdMap;
+ }
+
private <T> Predicate<T> distinctByProperty(Function<? super T, Object> keyExtractor) {
Map<Object, Boolean> map = new ConcurrentHashMap<>();
return t -> map.putIfAbsent(keyExtractor.apply(t), Boolean.TRUE) == null;
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/constants/HeatBridgeConstants.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/constants/HeatBridgeConstants.java
index f2d61d2587..0e87e1fb31 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/constants/HeatBridgeConstants.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/constants/HeatBridgeConstants.java
@@ -43,6 +43,7 @@ public class HeatBridgeConstants {
public static final String OS_SRIOV_PORT_TYPE = "direct";
public static final String OS_PCI_SLOT_KEY = "pci_slot";
public static final String OS_PHYSICAL_NETWORK_KEY = "physical_network";
+ public static final String OS_PHYSICAL_INTERFACE_KEY = "physical-interface";
public static final String OS_VLAN_NETWORK_KEY = "vlan";
public static final String OS_UNKNOWN_KEY = "unknown";
public static final String OS_RESOURCES_SELF_LINK_KEY = "self";
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/factory/MsoCloudClientFactory.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/factory/MsoCloudClientFactory.java
index 018a4eac8d..e1f363ca05 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/factory/MsoCloudClientFactory.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/factory/MsoCloudClientFactory.java
@@ -47,13 +47,13 @@ public interface MsoCloudClientFactory {
* @param url openstack url
* @param msoId openstack user for mso
* @param msoPass openstack password for mso user
- * @param cloudRegionId cloud-region identifier
+ * @param regionId region identifier
* @param tenantId tenant identifier
* @return Openstack Client for the keystone version requested
* @throws HeatBridgeException if any errors when reading cloud configuration or getting openstack client
*/
- OpenstackClient getOpenstackClient(String url, String msoId, String msoPass, String cloudRegionId, String tenantId)
+ OpenstackClient getOpenstackClient(String url, String msoId, String msoPass, String regionId, String tenantId)
throws HeatBridgeException;
}
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/factory/MsoCloudClientFactoryImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/factory/MsoCloudClientFactoryImpl.java
index f0c5a0b434..04245899aa 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/factory/MsoCloudClientFactoryImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/factory/MsoCloudClientFactoryImpl.java
@@ -61,17 +61,17 @@ public class MsoCloudClientFactoryImpl implements MsoCloudClientFactory {
@Override
public OpenstackClient getOpenstackClient(@Nonnull String url, @Nonnull String msoId, @Nonnull String msoPass,
- @Nonnull String cloudRegionId, @Nonnull String tenantId) throws HeatBridgeException {
+ @Nonnull String regionId, @Nonnull String tenantId) throws HeatBridgeException {
Objects.requireNonNull(url, "Null openstack url!");
Objects.requireNonNull(msoId, "Null openstack user id!");
Objects.requireNonNull(msoPass, "Null openstack password!");
- Objects.requireNonNull(cloudRegionId, "Null cloud-region ID!");
+ Objects.requireNonNull(regionId, "Null regionId ID!");
Objects.requireNonNull(tenantId, "Null tenant ID!");
try {
final OpenstackAccess osAccess = new OpenstackAccessBuilder().setBaseUrl(url) // keystone URL
.setUser(msoId) // keystone username
.setPassword(CryptoUtils.decryptCloudConfigPassword(msoPass)) // keystone decrypted password
- .setRegion(cloudRegionId) // openstack region
+ .setRegion(regionId) // openstack region
.setDomainName(HeatBridgeConstants.OS_DEFAULT_DOMAIN_NAME) // hardcode to "default"
.setTenantId(tenantId) // tenantId
.build();
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/helpers/AaiHelper.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/helpers/AaiHelper.java
index d8a876016f..c578b29664 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/helpers/AaiHelper.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/helpers/AaiHelper.java
@@ -43,6 +43,8 @@ import java.util.stream.Collectors;
import org.apache.commons.collections.CollectionUtils;
import org.onap.aai.domain.yang.Flavor;
import org.onap.aai.domain.yang.Image;
+import org.onap.aai.domain.yang.PInterface;
+import org.onap.aai.domain.yang.Pserver;
import org.onap.aai.domain.yang.Relationship;
import org.onap.aai.domain.yang.RelationshipData;
import org.onap.aai.domain.yang.RelationshipList;
@@ -50,6 +52,7 @@ import org.onap.aai.domain.yang.SriovVf;
import org.onap.aai.domain.yang.Vserver;
import org.onap.so.heatbridge.constants.HeatBridgeConstants;
import org.openstack4j.model.compute.Server;
+import org.openstack4j.model.network.Port;
/**
* This class provides wrapper methods to manage creation of AAI objects and extracting objects from AAI and
@@ -137,6 +140,37 @@ public class AaiHelper {
}
/**
+ * Transform Openstack Server object to AAI Pserver object
+ *
+ * @param server Openstack server object
+ * @return AAI Pserver object
+ */
+ public Pserver buildPserver(final Server server) {
+ Pserver pserver = new Pserver();
+ pserver.setInMaint(false);
+ pserver.setPserverId(server.getId());
+ pserver.setHostname(server.getHypervisorHostname());
+ pserver.setPserverName2(server.getHost());
+ pserver.setProvStatus(server.getStatus().value());
+ return pserver;
+ }
+
+ /**
+ * Transform Openstack Server object to AAI PInterface object
+ *
+ * @param port Openstack port object
+ * @return AAI PInterface object
+ */
+ public PInterface buildPInterface(Port port) {
+ Map<String, Object> portProfile = port.getProfile();
+ PInterface pInterface = new PInterface();
+ pInterface.setInterfaceName(portProfile.get(HeatBridgeConstants.OS_PHYSICAL_NETWORK_KEY).toString());
+ pInterface.setInMaint(false);
+ pInterface.setInterfaceRole(HeatBridgeConstants.OS_PHYSICAL_INTERFACE_KEY);
+ return pInterface;
+ }
+
+ /**
* Transform Openstack Image object to AAI Image object
*
* @param image Openstack Image object
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/utils/HeatBridgeUtils.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/utils/HeatBridgeUtils.java
index be086677db..1667f980e1 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/utils/HeatBridgeUtils.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/utils/HeatBridgeUtils.java
@@ -35,10 +35,15 @@ package org.onap.so.heatbridge.utils;
import com.google.common.base.Preconditions;
import com.google.common.base.Strings;
+import java.util.List;
import java.util.Optional;
+import java.util.stream.Collectors;
import javax.annotation.Nonnull;
+import org.apache.commons.collections.CollectionUtils;
+import org.onap.aai.domain.yang.SriovVf;
+import org.onap.aai.domain.yang.Vserver;
-public class HeatBridgeUtils {
+public final class HeatBridgeUtils {
/**
* IaaS naming convention for compute/p-interface to openstack/physical-network name mapping
@@ -64,4 +69,13 @@ public class HeatBridgeUtils {
}
return Optional.empty();
}
+
+ public static List<String> extractPciIdsFromVServer(Vserver vserver) {
+ return vserver.getLInterfaces().getLInterface().stream()
+ .filter(lInterface -> lInterface.getSriovVfs() != null
+ && CollectionUtils.isNotEmpty(lInterface.getSriovVfs().getSriovVf()))
+ .flatMap(lInterface -> lInterface.getSriovVfs().getSriovVf().stream()).map(SriovVf::getPciId)
+ .collect(Collectors.toList());
+ }
+
}
diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfAdapterImplTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfAdapterImplTest.java
index 0d972bb4d2..01726acd54 100644
--- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfAdapterImplTest.java
+++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfAdapterImplTest.java
@@ -85,6 +85,20 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils {
}
@Test
+ public void createVnfTest_NullFailIfExists() throws Exception {
+ mockOpenStackResponseAccess(wireMockServer, wireMockPort);
+ mockOpenStackGetStackVfModule_200(wireMockServer);
+
+ MsoRequest msoRequest = getMsoRequest();
+
+ Map<String, Object> map = new HashMap<>();
+ map.put("key1", "value1");
+ instance.createVfModule("mtn13", "CloudOwner", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "", vnfName, "",
+ "VFMOD", null, null, "b4ea86b4-253f-11e7-93ae-92361f002671", map, null, Boolean.TRUE, Boolean.FALSE,
+ msoRequest, new Holder<>(), new Holder<Map<String, String>>(), new Holder<VnfRollback>());
+ }
+
+ @Test
public void createVnfTest_HeatStatusFailed() throws Exception {
mockOpenStackResponseAccess(wireMockServer, wireMockPort);
wireMockServer.stubFor(get(
@@ -470,7 +484,8 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils {
MsoVnfAdapterImpl instance = new MsoVnfAdapterImpl();
MsoRequest msoRequest = getMsoRequest();
try {
- instance.deleteVfModule("mdt1", "CloudOwner", "88a6ca3ee0394ade9403f075db23167e", "vSAMP12", msoRequest,
+ instance.deleteVfModule("mdt1", "CloudOwner", "88a6ca3ee0394ade9403f075db23167e", "vSAMP12",
+ "5aae1e49-805c-4f9f-bd78-055bf7451157", "11420693-3f69-4c61-b3ee-9787c744e760", msoRequest,
new Holder<Map<String, String>>());
} catch (Exception e) {
diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImplTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImplTest.java
index 16cc2c34de..e7ef9d9348 100644
--- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImplTest.java
+++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImplTest.java
@@ -101,7 +101,8 @@ public class MsoVnfCloudifyAdapterImplTest extends BaseRestTestUtils {
msoRequest.setRequestId("12345");
msoRequest.setServiceInstanceId("12345");
- instance.deleteVfModule("mtn13", "CloudOwner", "1234", "vfname", msoRequest, new Holder<>());
+ instance.deleteVfModule("mtn13", "CloudOwner", "1234", "vfname", "5aae1e49-805c-4f9f-bd78-055bf7451157",
+ "11420693-3f69-4c61-b3ee-9787c744e760", msoRequest, new Holder<>());
}
@Test
@@ -124,7 +125,8 @@ public class MsoVnfCloudifyAdapterImplTest extends BaseRestTestUtils {
wireMockServer.stubFor(get(urlPathEqualTo("/v2.0/api/v3/tokens"))
.willReturn(aResponse().withBodyFile("OpenstackResponse_Access.json").withStatus(HttpStatus.SC_OK)));
- instance.deleteVfModule("mtn13", "CloudOwner", "1234", "vfname", msoRequest, new Holder<>());
+ instance.deleteVfModule("mtn13", "CloudOwner", "1234", "vfname", "5aae1e49-805c-4f9f-bd78-055bf7451157",
+ "11420693-3f69-4c61-b3ee-9787c744e760", msoRequest, new Holder<>());
}
@Test
diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfMulticloudAdapterImplTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfMulticloudAdapterImplTest.java
index 48ca0fd79c..0ac30cb75c 100644
--- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfMulticloudAdapterImplTest.java
+++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfMulticloudAdapterImplTest.java
@@ -210,7 +210,8 @@ public class MsoVnfMulticloudAdapterImplTest extends BaseRestTestUtils {
wireMockServer.stubFor(delete(urlPathEqualTo("/api/multicloud/v1/CloudOwner/MTN13/infra_workload/workload-id"))
.willReturn(aResponse().withStatus(HttpStatus.SC_NO_CONTENT)));
- instance.deleteVfModule("MTN13", "CloudOwner", "123", "workload-id", msoRequest, new Holder<>());
+ instance.deleteVfModule("MTN13", "CloudOwner", "123", "workload-id", "5aae1e49-805c-4f9f-bd78-055bf7451157",
+ "11420693-3f69-4c61-b3ee-9787c744e760", msoRequest, new Holder<>());
}
@Test
diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImplTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImplTest.java
index 7ec8e51892..ede25c5dbe 100644
--- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImplTest.java
+++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImplTest.java
@@ -134,7 +134,8 @@ public class MsoVnfPluginAdapterImplTest extends BaseRestTestUtils {
expectedException.expect(VnfException.class);
MsoRequest msoRequest = getMsoRequest();
msoVnfPluginAdapter.deleteVfModule("mtn13", "CloudOwner", "88a6ca3ee0394ade9403f075db23167e", "vSAMP12",
- msoRequest, new Holder<Map<String, String>>());
+ "5aae1e49-805c-4f9f-bd78-055bf7451157", "11420693-3f69-4c61-b3ee-9787c744e760", msoRequest,
+ new Holder<Map<String, String>>());
}
@Test
@@ -151,7 +152,8 @@ public class MsoVnfPluginAdapterImplTest extends BaseRestTestUtils {
.withStatus(HttpStatus.SC_INTERNAL_SERVER_ERROR)));
MsoRequest msoRequest = getMsoRequest();
msoVnfPluginAdapter.deleteVfModule("mtn13", "CloudOwner", "88a6ca3ee0394ade9403f075db23167e", "vSAMP12",
- msoRequest, new Holder<Map<String, String>>());
+ "5aae1e49-805c-4f9f-bd78-055bf7451157", "11420693-3f69-4c61-b3ee-9787c744e760", msoRequest,
+ new Holder<Map<String, String>>());
}
private MsoRequest getMsoRequest() {
diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/VnfAdapterRestTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/VnfAdapterRestTest.java
index 89adafd280..5a8524fd73 100644
--- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/VnfAdapterRestTest.java
+++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/VnfAdapterRestTest.java
@@ -98,7 +98,6 @@ public class VnfAdapterRestTest extends BaseRestTestUtils {
private static final String EXN_HSL_NET_FQDN = "hsl";
private static final String AVAILABILITY_ZONE_0 = "nova";
private static final String VF_MODULE_INDEX = "0";
- private static final String REQUEST_TYPE = "";
@Test
public void testCreateVfModule() throws JSONException, JsonParseException, JsonMappingException, IOException {
@@ -188,7 +187,6 @@ public class VnfAdapterRestTest extends BaseRestTestUtils {
msoReq.setRequestId(MSO_REQUEST_ID);
msoReq.setServiceInstanceId(MSO_SERVICE_INSTANCE_ID);
request.setMsoRequest(msoReq);
- request.setRequestType(REQUEST_TYPE);
request.setCloudSiteId(CLOUDSITE_ID);
request.setTenantId(TENANT_ID);
request.setModelCustomizationUuid(MODEL_CUSTOMIZATION_UUID);
@@ -254,7 +252,6 @@ public class VnfAdapterRestTest extends BaseRestTestUtils {
msoReq.setRequestId(MSO_REQUEST_ID);
msoReq.setServiceInstanceId(MSO_SERVICE_INSTANCE_ID);
request.setMsoRequest(msoReq);
- request.setRequestType(REQUEST_TYPE);
request.setCloudSiteId(CLOUDSITE_ID);
request.setTenantId(TENANT_ID);
request.setModelCustomizationUuid(MODEL_CUSTOMIZATION_UUID);
@@ -394,7 +391,6 @@ public class VnfAdapterRestTest extends BaseRestTestUtils {
request.setFailIfExists(failIfExists);
request.setModelCustomizationUuid(MODEL_CUSTOMIZATION_UUID);
request.setMsoRequest(msoRequest);
- request.setRequestType(REQUEST_TYPE);
request.setTenantId(TENANT_ID);
request.setVfModuleId(VF_MODULE_ID);
request.setVfModuleName(VF_MODULE_NAME);
@@ -526,7 +522,6 @@ public class VnfAdapterRestTest extends BaseRestTestUtils {
msoReq.setRequestId(MSO_REQUEST_ID);
msoReq.setServiceInstanceId(MSO_SERVICE_INSTANCE_ID);
request.setMsoRequest(msoReq);
- request.setRequestType(REQUEST_TYPE);
request.setCloudSiteId(CLOUDSITE_ID);
request.setTenantId(TENANT_ID);
request.setModelCustomizationUuid(MODEL_CUSTOMIZATION_UUID);
diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/heatbridge/HeatBridgeImplTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/heatbridge/HeatBridgeImplTest.java
index d611322c02..e2f5531280 100644
--- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/heatbridge/HeatBridgeImplTest.java
+++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/heatbridge/HeatBridgeImplTest.java
@@ -112,7 +112,7 @@ public class HeatBridgeImplTest {
public void setUp() throws HeatBridgeException, OpenstackClientException, BulkProcessFailed {
when(resourcesClient.beginSingleTransaction()).thenReturn(transaction);
- heatbridge = new HeatBridgeImpl(resourcesClient, cloudIdentity, CLOUD_OWNER, REGION_ID, TENANT_ID);
+ heatbridge = new HeatBridgeImpl(resourcesClient, cloudIdentity, CLOUD_OWNER, REGION_ID, REGION_ID, TENANT_ID);
}
@Ignore
diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/heatbridge/factory/MsoCloudClientFactoryImplTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/heatbridge/factory/MsoCloudClientFactoryImplTest.java
index 701ed65d19..4eeb1c03a3 100644
--- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/heatbridge/factory/MsoCloudClientFactoryImplTest.java
+++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/heatbridge/factory/MsoCloudClientFactoryImplTest.java
@@ -38,7 +38,7 @@ public class MsoCloudClientFactoryImplTest {
private static final String MSO_ID = "testMsoId";
private static final String ENCRYPTED_PASSWORD = CryptoUtils.encryptCloudConfigPassword("testPassword");
- private static final String CLOUD_REGION_ID = "testCloudRegionId";
+ private static final String REGION_ID = "testCloudRegionId";
private static final String TENANT_ID = "testTenantId";
private MsoCloudClientFactoryImpl testedObject;
@@ -52,20 +52,19 @@ public class MsoCloudClientFactoryImplTest {
@Test
public void getOpenstackClientWithVersion2() throws Exception {
- testedObject.getOpenstackClient(URL_V2, MSO_ID, ENCRYPTED_PASSWORD, CLOUD_REGION_ID, TENANT_ID);
+ testedObject.getOpenstackClient(URL_V2, MSO_ID, ENCRYPTED_PASSWORD, REGION_ID, TENANT_ID);
verify(openstackClientFactoryMock).createOpenstackV2Client(any(OpenstackAccess.class));
}
@Test
public void getOpenstackClientWithVersion3() throws Exception {
- testedObject.getOpenstackClient(URL_V3, MSO_ID, ENCRYPTED_PASSWORD, CLOUD_REGION_ID, TENANT_ID);
+ testedObject.getOpenstackClient(URL_V3, MSO_ID, ENCRYPTED_PASSWORD, REGION_ID, TENANT_ID);
verify(openstackClientFactoryMock).createOpenstackV3Client(any(OpenstackAccess.class));
}
@Test(expected = HeatBridgeException.class)
public void getOpenstackClient_unsupportedVersion() throws Exception {
- testedObject.getOpenstackClient(URL_WITH_UNSUPPORTED_VERSION, MSO_ID, ENCRYPTED_PASSWORD, CLOUD_REGION_ID,
- TENANT_ID);
+ testedObject.getOpenstackClient(URL_WITH_UNSUPPORTED_VERSION, MSO_ID, ENCRYPTED_PASSWORD, REGION_ID, TENANT_ID);
}
}
diff --git a/adapters/mso-openstack-adapters/src/test/resources/schema.sql b/adapters/mso-openstack-adapters/src/test/resources/schema.sql
index 9406bc445d..b96d58f419 100644
--- a/adapters/mso-openstack-adapters/src/test/resources/schema.sql
+++ b/adapters/mso-openstack-adapters/src/test/resources/schema.sql
@@ -806,6 +806,10 @@ CREATE TABLE `service` (
`OVERALL_DISTRIBUTION_STATUS` varchar(45),
`ONAP_GENERATED_NAMING` TINYINT(1) DEFAULT NULL,
`NAMING_POLICY` varchar(200) DEFAULT NULL,
+ `CDS_BLUEPRINT_NAME` varchar(200) DEFAULT NULL,
+ `CDS_BLUEPRINT_VERSION` varchar(20) DEFAULT NULL,
+ `CONTROLLER_ACTOR` varchar(200) DEFAULT NULL,
+ `SKIP_POST_INSTANTIATION_CONFIGURATION` boolean default true,
PRIMARY KEY (`MODEL_UUID`),
KEY `fk_service__tosca_csar1_idx` (`TOSCA_CSAR_ARTIFACT_UUID`),
CONSTRAINT `fk_service__tosca_csar1` FOREIGN KEY (`TOSCA_CSAR_ARTIFACT_UUID`) REFERENCES `tosca_csar` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
@@ -960,6 +964,7 @@ CREATE TABLE `vf_module_customization` (
`CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`VF_MODULE_MODEL_UUID` varchar(200) NOT NULL,
`VNF_RESOURCE_CUSTOMIZATION_ID` int(13) DEFAULT NULL,
+ `SKIP_POST_INSTANTIATION_CONFIGURATION` boolean default true,
PRIMARY KEY (`ID`),
KEY `fk_vf_module_customization__vf_module1_idx` (`VF_MODULE_MODEL_UUID`),
KEY `fk_vf_module_customization__heat_env__heat_environment1_idx` (`HEAT_ENVIRONMENT_ARTIFACT_UUID`),
@@ -1111,6 +1116,7 @@ CREATE TABLE `vnf_resource_customization` (
`SERVICE_MODEL_UUID` varchar(200) NOT NULL,
`NF_DATA_VALID` tinyint(1) DEFAULT '0',
`VNFCINSTANCEGROUP_ORDER` varchar(200) default NULL,
+ `CONTROLLER_ACTOR` varchar(200) DEFAULT NULL,
PRIMARY KEY (`ID`),
UNIQUE KEY `UK_vnf_resource_customization` (`MODEL_CUSTOMIZATION_UUID`,`SERVICE_MODEL_UUID`),
KEY `fk_vnf_resource_customization__vnf_resource1_idx` (`VNF_RESOURCE_MODEL_UUID`),
@@ -1192,6 +1198,7 @@ CREATE TABLE IF NOT EXISTS `pnf_resource_customization` (
`CDS_BLUEPRINT_NAME` varchar(200) DEFAULT NULL,
`CDS_BLUEPRINT_VERSION` varchar(20) DEFAULT NULL,
`SKIP_POST_INSTANTIATION_CONFIGURATION` boolean default true,
+ `CONTROLLER_ACTOR` varchar(200) DEFAULT NULL,
PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`),
KEY `fk_pnf_resource_customization__pnf_resource1_idx` (`PNF_RESOURCE_MODEL_UUID`),
CONSTRAINT `fk_pnf_resource_customization__pnf_resource1` FOREIGN KEY (`PNF_RESOURCE_MODEL_UUID`) REFERENCES `pnf_resource` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
diff --git a/adapters/mso-requests-db-adapter/pom.xml b/adapters/mso-requests-db-adapter/pom.xml
index a02ebbe75d..366a207d60 100644
--- a/adapters/mso-requests-db-adapter/pom.xml
+++ b/adapters/mso-requests-db-adapter/pom.xml
@@ -169,6 +169,9 @@
<executions>
<execution>
<id>original</id>
+ <configuration>
+ <skip>false</skip>
+ </configuration>
</execution>
</executions>
</plugin>
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 4ec4cc7eb5..07d88c9abe 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
@@ -107,12 +107,8 @@ public class ArchiveInfraRequestsScheduler {
for (InfraActiveRequests iar : requests) {
ArchivedInfraRequests archivedInfra = new ArchivedInfraRequests();
try {
- archivedInfra.setAaiServiceId(iar.getAaiServiceId());
- archivedInfra.setAction(iar.getAction());
archivedInfra.setAicCloudRegion(iar.getAicCloudRegion());
- archivedInfra.setAicNodeClli(iar.getAicNodeClli());
archivedInfra.setCallBackUrl(iar.getCallBackUrl());
- archivedInfra.setClientRequestId(iar.getClientRequestId());
archivedInfra.setConfigurationId(iar.getConfigurationId());
archivedInfra.setConfigurationName(iar.getConfigurationName());
archivedInfra.setCorrelator(iar.getCorrelator());
@@ -125,14 +121,12 @@ public class ArchiveInfraRequestsScheduler {
archivedInfra.setOperationalEnvName(iar.getOperationalEnvName());
archivedInfra.setRequestUrl(iar.getRequestUrl());
archivedInfra.setProgress(iar.getProgress());
- archivedInfra.setProvStatus(iar.getProvStatus());
archivedInfra.setRequestAction(iar.getRequestAction());
archivedInfra.setRequestBody(iar.getRequestBody());
archivedInfra.setRequestId(iar.getRequestId());
archivedInfra.setRequestorId(iar.getRequestorId());
archivedInfra.setRequestScope(iar.getRequestScope());
archivedInfra.setRequestStatus(iar.getRequestStatus());
- archivedInfra.setRequestType(iar.getRequestType());
archivedInfra.setResponseBody(iar.getResponseBody());
archivedInfra.setServiceInstanceId(iar.getServiceInstanceId());
archivedInfra.setServiceInstanceName(iar.getServiceInstanceName());
diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/InfraActiveRequestsRepositoryCustomController.java b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/InfraActiveRequestsRepositoryCustomController.java
index f6a0aec86f..28e931a3e1 100644
--- a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/InfraActiveRequestsRepositoryCustomController.java
+++ b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/InfraActiveRequestsRepositoryCustomController.java
@@ -74,4 +74,9 @@ public class InfraActiveRequestsRepositoryCustomController {
@RequestParam(value = "maxResult", required = false) Integer maxResult) {
return infraActiveRequestsRepository.getInfraActiveRequests(filters, startTime, endTime, maxResult);
}
+
+ @RequestMapping(method = RequestMethod.GET, value = "/infraActiveRequests/getInProgressVolumeGroupsAndVfModules")
+ public List<InfraActiveRequests> getInProgressVolumeGroupsAndVfModules() {
+ return infraActiveRequestsRepository.getInProgressVolumeGroupsAndVfModules();
+ }
}
diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapter.java b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapter.java
index f4a9f711fd..110fc6c03e 100644
--- a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapter.java
+++ b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapter.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -31,6 +31,7 @@ import org.onap.so.db.request.beans.ResourceOperationStatus;
/**
* MSO Request DB Adapter Web Service
*/
+@Deprecated
@WebService(name = "RequestsDbAdapter", targetNamespace = "http://org.onap.so/requestsdb")
public interface MsoRequestsDbAdapter {
diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java
index 9d6a8b0529..085a255948 100644
--- a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java
+++ b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java
@@ -10,9 +10,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -45,6 +45,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Component;
+@Deprecated
@WebService(serviceName = "RequestsDbAdapter",
endpointInterface = "org.onap.so.adapters.requestsdb.MsoRequestsDbAdapter",
targetNamespace = "http://org.onap.so/requestsdb")
@@ -73,7 +74,7 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter {
String networkId, String vnfId, String vfModuleId, String volumeGroupId, String serviceInstanceName,
String configurationId, String configurationName, String vfModuleName) throws MsoRequestsDbException {
try {
- InfraActiveRequests request = infraActive.findOneByRequestIdOrClientRequestId(requestId, requestId);
+ InfraActiveRequests request = infraActive.findOneByRequestId(requestId);
if (request == null) {
String error = "Entity not found. Unable to retrieve MSO Infra Requests DB for Request ID " + requestId;
throw new MsoRequestsDbException(error);
@@ -129,7 +130,7 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter {
} catch (Exception e) {
String error = "Error retrieving MSO Infra Requests DB for Request ID " + requestId;
logger.error(error, e);
- throw new MsoRequestsDbException(error, ErrorCode.BusinessProcesssError, e);
+ throw new MsoRequestsDbException(error, ErrorCode.BusinessProcessError, e);
}
}
@@ -147,7 +148,7 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter {
logger.debug("Call to MSO Infra RequestsDb adapter get method with request Id: {}", requestId);
InfraActiveRequests request = null;
try {
- request = infraActive.findOneByRequestIdOrClientRequestId(requestId, requestId);
+ request = infraActive.findOneByRequestId(requestId);
if (request == null) {
String error = "Entity not found. Unable to retrieve MSO Infra Requests DB for Request ID " + requestId;
throw new MsoRequestsDbException(error);
@@ -155,7 +156,7 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter {
} catch (Exception e) {
String error = "Error retrieving MSO Infra Requests DB for Request ID " + requestId;
logger.error(error, e);
- throw new MsoRequestsDbException(error, ErrorCode.BusinessProcesssError, e);
+ throw new MsoRequestsDbException(error, ErrorCode.BusinessProcessError, e);
}
return request;
}
@@ -183,7 +184,7 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter {
/**
* update operation status <br>
- *
+ *
* @param serviceId
* @param operationId
* @param operationType
@@ -253,7 +254,7 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter {
/**
* init the operation status of all the resources <br>
- *
+ *
* @param serviceId the service Id
* @param operationId the operation Id
* @param operationType the operationType
@@ -284,7 +285,7 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter {
/**
* get resource operation status <br>
- *
+ *
* @param serviceId
* @param operationId
* @param resourceTemplateUUID
@@ -304,7 +305,7 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter {
/**
* update resource operation status <br>
- *
+ *
* @param serviceId
* @param operationId
* @param resourceTemplateUUID
@@ -340,7 +341,7 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter {
/**
* update service operation status when a operation resource status updated <br>
- *
+ *
* @param operStatus the resource operation status
* @since ONAP Amsterdam Release
*/
diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/application/MSORequestDBApplication.java b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/application/MSORequestDBApplication.java
index 3a14b2ff84..0272bab1a1 100644
--- a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/application/MSORequestDBApplication.java
+++ b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/application/MSORequestDBApplication.java
@@ -22,7 +22,6 @@
package org.onap.so.adapters.requestsdb.application;
-import java.time.Duration;
import javax.sql.DataSource;
import org.onap.logging.filter.base.Constants;
import org.onap.logging.filter.base.ONAPComponents;
@@ -34,8 +33,7 @@ import org.springframework.jmx.support.RegistrationPolicy;
import org.springframework.scheduling.annotation.EnableScheduling;
import net.javacrumbs.shedlock.core.LockProvider;
import net.javacrumbs.shedlock.provider.jdbctemplate.JdbcTemplateLockProvider;
-import net.javacrumbs.shedlock.spring.ScheduledLockConfiguration;
-import net.javacrumbs.shedlock.spring.ScheduledLockConfigurationBuilder;
+import net.javacrumbs.shedlock.spring.annotation.EnableSchedulerLock;
/**
* @since Version 1.0
@@ -43,6 +41,7 @@ import net.javacrumbs.shedlock.spring.ScheduledLockConfigurationBuilder;
*/
@SpringBootApplication(scanBasePackages = {"org.onap.so", "org.onap.logging.filter"})
@EnableScheduling
+@EnableSchedulerLock(defaultLockAtMostFor = "120s")
@EnableMBeanExport(registration = RegistrationPolicy.IGNORE_EXISTING)
public class MSORequestDBApplication {
@@ -66,10 +65,5 @@ public class MSORequestDBApplication {
return new JdbcTemplateLockProvider(dataSource);
}
- @Bean
- public ScheduledLockConfiguration taskScheduler(LockProvider lockProvider) {
- return ScheduledLockConfigurationBuilder.withLockProvider(lockProvider).withPoolSize(10)
- .withDefaultLockAtMostFor(Duration.ofMinutes(10)).build();
- }
}
diff --git a/adapters/mso-requests-db-adapter/src/main/resources/db/migration/V6.6__UpdateRequestProcessingData.sql b/adapters/mso-requests-db-adapter/src/main/resources/db/migration/V6.6__UpdateRequestProcessingData.sql
new file mode 100644
index 0000000000..70d1d3fd46
--- /dev/null
+++ b/adapters/mso-requests-db-adapter/src/main/resources/db/migration/V6.6__UpdateRequestProcessingData.sql
@@ -0,0 +1,9 @@
+use requestdb;
+
+UPDATE request_processing_data
+SET IS_DATA_INTERNAL = 1
+WHERE TAG = 'BPMNExecutionData';
+
+UPDATE request_processing_data
+SET IS_DATA_INTERNAL = 0
+WHERE TAG = 'StackInformation' OR TAG = 'pincFabricConfigRequest'; \ No newline at end of file
diff --git a/adapters/mso-requests-db-adapter/src/main/resources/db/migration/V7.1__Drop_Columns_from_Infra_requests_archive_tables.sql b/adapters/mso-requests-db-adapter/src/main/resources/db/migration/V7.1__Drop_Columns_from_Infra_requests_archive_tables.sql
new file mode 100644
index 0000000000..352fbfda21
--- /dev/null
+++ b/adapters/mso-requests-db-adapter/src/main/resources/db/migration/V7.1__Drop_Columns_from_Infra_requests_archive_tables.sql
@@ -0,0 +1,17 @@
+use requestdb;
+
+ALTER TABLE `infra_active_requests` DROP IF EXISTS `PROV_STATUS`;
+
+ALTER TABLE `archived_infra_requests` DROP IF EXISTS `PROV_STATUS`;
+
+ALTER TABLE `infra_active_requests` DROP IF EXISTS `ACTION`;
+
+ALTER TABLE `archived_infra_requests` DROP IF EXISTS `ACTION`;
+
+ALTER TABLE `infra_active_requests` DROP IF EXISTS `AAI_SERVICE_ID`;
+
+ALTER TABLE `archived_infra_requests` DROP IF EXISTS `AAI_SERVICE_ID`;
+
+ALTER TABLE `infra_active_requests` DROP IF EXISTS `REQUEST_TYPE`;
+
+ALTER TABLE `archived_infra_requests` DROP IF EXISTS `REQUEST_TYPE`;
diff --git a/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestdb/rest/RequestProcessingDataRequestDbQueryTest.java b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestdb/rest/RequestProcessingDataRequestDbQueryTest.java
index abc70ed6bf..9641cb8004 100644
--- a/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestdb/rest/RequestProcessingDataRequestDbQueryTest.java
+++ b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestdb/rest/RequestProcessingDataRequestDbQueryTest.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -86,4 +86,28 @@ public class RequestProcessingDataRequestDbQueryTest {
assertEquals(dataFound.get(1).getValue(), secondEntry.getValue());
assertEquals(dataFound.get(1).getTag(), secondEntry.getTag());
}
+
+ @Test
+ @Transactional
+ public void testGetRequestProcessingDataBySoRequestIdAndIsInternalData() {
+ String soRequestId = "00032ab7-na18-42e5-965d-8ea592502018";
+ String tag = "pincFabricConfigRequest";
+ RequestProcessingData firstEntry = new RequestProcessingData();
+ List<RequestProcessingData> expectedList = new ArrayList<>();
+ firstEntry.setSoRequestId(soRequestId);
+ firstEntry.setGroupingId("7d2e8c07-4d10-456d-bddc-37abf38ca715");
+ firstEntry.setName("configurationId");
+ firstEntry.setValue("52234bc0-d6a6-41d4-a901-79015e4877e2");
+ firstEntry.setTag(tag);
+ expectedList.add(firstEntry);
+
+ List<RequestProcessingData> dataFound = client.getExternalRequestProcessingDataBySoRequestId(soRequestId);
+
+ assertEquals(1, dataFound.size());
+ assertEquals(dataFound.get(0).getSoRequestId(), firstEntry.getSoRequestId());
+ assertEquals(dataFound.get(0).getGroupingId(), firstEntry.getGroupingId());
+ assertEquals(dataFound.get(0).getName(), firstEntry.getName());
+ assertEquals(dataFound.get(0).getValue(), firstEntry.getValue());
+ assertEquals(dataFound.get(0).getTag(), firstEntry.getTag());
+ }
}
diff --git a/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsSchedulerTest.java b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsSchedulerTest.java
index 663be24318..3ac5c28c34 100644
--- a/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsSchedulerTest.java
+++ b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsSchedulerTest.java
@@ -53,11 +53,9 @@ public class ArchiveInfraRequestsSchedulerTest extends RequestsAdapterBase {
InfraActiveRequests iar1 = new InfraActiveRequests();
iar1.setRequestId(requestId1);
- iar1.setAction("action1");
InfraActiveRequests iar2 = new InfraActiveRequests();
iar2.setRequestId(requestId2);
- iar2.setAction("action2");
List<InfraActiveRequests> requests = new ArrayList<>();
requests.add(iar1);
diff --git a/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/InfraActiveRequestsRepositoryCustomControllerTest.java b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/InfraActiveRequestsRepositoryCustomControllerTest.java
index 4ed3285a70..0698023184 100644
--- a/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/InfraActiveRequestsRepositoryCustomControllerTest.java
+++ b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/InfraActiveRequestsRepositoryCustomControllerTest.java
@@ -21,8 +21,13 @@
package org.onap.so.adapters.requestsdb;
+import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
+import java.sql.Timestamp;
+import java.time.Instant;
+import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -33,6 +38,7 @@ import org.junit.Before;
import org.junit.Test;
import org.onap.so.db.request.beans.InfraActiveRequests;
import org.onap.so.db.request.data.controller.InstanceNameDuplicateCheckRequest;
+import org.onap.so.serviceinstancebeans.ModelType;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.boot.web.server.LocalServerPort;
@@ -77,7 +83,6 @@ public class InfraActiveRequestsRepositoryCustomControllerTest extends RequestsA
assertEquals(infraActiveRequests.getNetworkName(), infraActiveRequestsResponse.getNetworkName());
assertEquals(infraActiveRequests.getConfigurationId(), infraActiveRequestsResponse.getConfigurationId());
assertEquals(infraActiveRequests.getConfigurationName(), infraActiveRequestsResponse.getConfigurationName());
- assertEquals(infraActiveRequests.getAaiServiceId(), infraActiveRequestsResponse.getAaiServiceId());
assertEquals(infraActiveRequests.getTenantId(), infraActiveRequestsResponse.getTenantId());
assertEquals(infraActiveRequests.getRequestScope(), infraActiveRequestsResponse.getRequestScope());
assertEquals(infraActiveRequests.getRequestorId(), infraActiveRequestsResponse.getRequestorId());
@@ -85,20 +90,11 @@ public class InfraActiveRequestsRepositoryCustomControllerTest extends RequestsA
assertEquals(infraActiveRequests.getOperationalEnvId(), infraActiveRequestsResponse.getOperationalEnvId());
assertEquals(infraActiveRequests.getOperationalEnvName(), infraActiveRequestsResponse.getOperationalEnvName());
assertEquals(infraActiveRequests.getRequestStatus(), infraActiveRequestsResponse.getRequestStatus());
- assertEquals(infraActiveRequests.getAction(), infraActiveRequestsResponse.getAction());
assertEquals(infraActiveRequests.getRequestUrl(), infraActiveRequestsResponse.getRequestUrl());
}
@Before
public void setup() {
-
- headers = new HttpHeaders();
- restTemplate = new TestRestTemplate("test", "test");
-
- headers.set("Accept", MediaType.APPLICATION_JSON);
- headers.set("Content-Type", MediaType.APPLICATION_JSON);
- headers.set("Authorization", msoAdaptersAuth);
-
infraActiveRequests = new InfraActiveRequests();
infraActiveRequests.setRequestId(UUID.randomUUID().toString());
@@ -122,16 +118,25 @@ public class InfraActiveRequestsRepositoryCustomControllerTest extends RequestsA
infraActiveRequests.setSource("sourceTest");
infraActiveRequests.setOperationalEnvName(UUID.randomUUID().toString());
infraActiveRequests.setRequestStatus("IN_PROGRESS");
- infraActiveRequests.setAction("create");
infraActiveRequests
.setRequestUrl("http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances");
- HttpEntity<String> entity = new HttpEntity(infraActiveRequests, headers);
+ saveInfraActiveRequest(infraActiveRequests);
+ }
+
+ public void saveInfraActiveRequest(InfraActiveRequests request) {
+ headers = new HttpHeaders();
+ restTemplate = new TestRestTemplate("test", "test");
+
+ headers.set("Accept", MediaType.APPLICATION_JSON);
+ headers.set("Content-Type", MediaType.APPLICATION_JSON);
+ headers.set("Authorization", msoAdaptersAuth);
+
+ HttpEntity<String> entity = new HttpEntity(request, headers);
UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(createURLWithPort("/infraActiveRequests"));
ResponseEntity<String> response =
restTemplate.exchange(builder.toUriString(), HttpMethod.POST, entity, String.class);
-
assertEquals(201, response.getStatusCodeValue());
}
@@ -297,4 +302,38 @@ public class InfraActiveRequestsRepositoryCustomControllerTest extends RequestsA
assertEquals(200, response.getStatusCodeValue());
assertEquals(null, response.getBody());
}
+
+ @Test
+ public void getInProgressVolumeGroupsAndVfModulesTest() {
+ boolean expectedReturned = false;
+ InfraActiveRequests request = new InfraActiveRequests();
+ request.setRequestId(UUID.randomUUID().toString());
+ request.setVfModuleId(UUID.randomUUID().toString());
+ request.setRequestStatus("IN_PROGRESS");
+ request.setRequestScope(ModelType.vfModule.toString());
+ Instant startInstant = Instant.now().minus(3, ChronoUnit.MINUTES);
+ request.setStartTime(Timestamp.from(startInstant));
+ request.setRequestAction("create");
+ saveInfraActiveRequest(request);
+
+ UriComponentsBuilder builder = UriComponentsBuilder
+ .fromHttpUrl(createURLWithPort("/infraActiveRequests/getInProgressVolumeGroupsAndVfModules"));
+
+ HttpEntity<String> entity = new HttpEntity<String>(headers);
+
+ ResponseEntity<List<InfraActiveRequests>> response = restTemplate.exchange(builder.toUriString(),
+ HttpMethod.GET, entity, new ParameterizedTypeReference<List<InfraActiveRequests>>() {});
+
+ List<InfraActiveRequests> responseList = response.getBody();
+
+ assertEquals(200, response.getStatusCodeValue());
+
+ for (InfraActiveRequests result : responseList) {
+ if (result.getRequestId().equals(request.getRequestId())) {
+ assertThat(request, sameBeanAs(result).ignoring("modifyTime"));
+ expectedReturned = true;
+ }
+ }
+ assertTrue(expectedReturned);
+ }
}
diff --git a/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/adapters/MSORequestDBImplTest.java b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/adapters/MSORequestDBImplTest.java
index fa2acbc0ca..92d3114ebe 100644
--- a/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/adapters/MSORequestDBImplTest.java
+++ b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/adapters/MSORequestDBImplTest.java
@@ -94,7 +94,6 @@ public class MSORequestDBImplTest extends RequestsAdapterBase {
private InfraActiveRequests buildTestRequest() {
InfraActiveRequests testRequest = new InfraActiveRequests();
testRequest.setRequestId("00032ab7-3fb3-42e5-965d-8ea592502017");
- testRequest.setClientRequestId("00032ab7-3fb3-42e5-965d-8ea592502016");
testRequest.setRequestStatus("COMPLETE");
testRequest.setStatusMessage("Vf Module has been deleted successfully.");
testRequest.setProgress((long) 100);
@@ -103,7 +102,6 @@ public class MSORequestDBImplTest extends RequestsAdapterBase {
testRequest.setServiceInstanceId("e3b5744d-2ad1-4cdd-8390-c999a38829bc");
testRequest.setRequestAction("deleteInstance");
testRequest.setRequestScope("vfModule");
- testRequest.setAction("deleteInstance");
testRequest.setAicCloudRegion("mtn6");
testRequest.setLastModifiedBy("BPMN");
testRequest.setVfModuleId("c7d527b1-7a91-49fd-b97d-1c8c0f4a7992");
@@ -153,26 +151,10 @@ public class MSORequestDBImplTest extends RequestsAdapterBase {
}
@Test
- public void getByClientRequestId() throws MsoRequestsDbException {
- InfraActiveRequests testRequest = setupTestEntities();
- // Given
- String clientRequestId = "00032ab7-3fb3-42e5-965d-8ea592502016";
-
- // When
- InfraActiveRequests infraRequest = dbAdapter.getInfraRequest(clientRequestId);
- if (infraRequest == null)
- fail("Null infraRequest");
-
- // Then
- assertEquals(clientRequestId, infraRequest.getClientRequestId());
- }
-
-
- @Test
public void updateInfraRequest() throws MsoRequestsDbException {
InfraActiveRequests testRequest = setupTestEntities();
// Given
- String clientRequestId = "00032ab7-3fb3-42e5-965d-8ea592502016";
+ String requestId = "00032ab7-3fb3-42e5-965d-8ea592502017";
// When
@@ -214,7 +196,7 @@ public class MSORequestDBImplTest extends RequestsAdapterBase {
dbAdapter.updateInfraRequest(testRequest.getRequestId(), lastModifiedBy, statusMessage, responseBody,
requestStatus, progress, vnfOutputs, serviceInstanceId, networkId, vnfId, vfModuleId, volumeGroupId,
serviceInstanceName, configurationId, configurationName, vfModuleName);
- InfraActiveRequests infraRequest = dbAdapter.getInfraRequest(clientRequestId);
+ InfraActiveRequests infraRequest = dbAdapter.getInfraRequest(requestId);
// Then
assertThat(infraRequest, sameBeanAs(testRequest).ignoring("requestBody").ignoring("endTime")
.ignoring("startTime").ignoring("modifyTime"));
@@ -241,12 +223,12 @@ public class MSORequestDBImplTest extends RequestsAdapterBase {
public void updateInfraRequestNulls() throws MsoRequestsDbException {
InfraActiveRequests testRequest = setupTestEntities();
// Given
- String clientRequestId = "00032ab7-3fb3-42e5-965d-8ea592502016";
+ String requestId = "00032ab7-3fb3-42e5-965d-8ea592502017";
// When
dbAdapter.updateInfraRequest(testRequest.getRequestId(), testRequest.getLastModifiedBy(), null, null, null,
null, null, null, null, null, null, null, null, null, null, null);
- InfraActiveRequests infraRequest = dbAdapter.getInfraRequest(clientRequestId);
+ InfraActiveRequests infraRequest = dbAdapter.getInfraRequest(requestId);
// Then
assertThat(infraRequest, sameBeanAs(testRequest).ignoring("requestBody").ignoring("endTime")
.ignoring("startTime").ignoring("modifyTime"));
diff --git a/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/client/RequestsDbClientTest.java b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/client/RequestsDbClientTest.java
index 49291b6863..11b6cf4872 100644
--- a/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/client/RequestsDbClientTest.java
+++ b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/client/RequestsDbClientTest.java
@@ -27,6 +27,8 @@ import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import java.sql.Timestamp;
+import java.time.Instant;
+import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -41,6 +43,7 @@ import org.onap.so.db.request.beans.OperationStatus;
import org.onap.so.db.request.beans.OperationalEnvDistributionStatus;
import org.onap.so.db.request.beans.OperationalEnvServiceModelStatus;
import org.onap.so.db.request.beans.RequestProcessingData;
+import org.onap.so.serviceinstancebeans.ModelType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.web.server.LocalServerPort;
@@ -80,7 +83,6 @@ public class RequestsDbClientTest extends RequestsAdapterBase {
infraActiveRequests.setSource("sourceTest");
infraActiveRequests.setOperationalEnvName(UUID.randomUUID().toString());
infraActiveRequests.setRequestStatus("IN_PROGRESS");
- infraActiveRequests.setAction("create");
infraActiveRequests.setRequestAction("someaction");
infraActiveRequests.setStartTime(new Timestamp(System.currentTimeMillis()));
infraActiveRequests
@@ -117,7 +119,6 @@ public class RequestsDbClientTest extends RequestsAdapterBase {
infraActiveRequests2.setSource("sourceTest");
infraActiveRequests2.setOperationalEnvName(UUID.randomUUID().toString());
infraActiveRequests2.setRequestStatus("IN_PROGRESS");
- infraActiveRequests2.setAction("create");
infraActiveRequests2.setRequestAction("someaction");
infraActiveRequests2.setStartTime(new Timestamp(System.currentTimeMillis()));
infraActiveRequests
@@ -314,4 +315,20 @@ public class RequestsDbClientTest extends RequestsAdapterBase {
verifyInfraActiveRequests(infraActiveRequestsResponse.get(0));
}
+
+ @Test
+ public void getInProgressVolumeGroupsAndVfModulesTest() {
+ InfraActiveRequests request = new InfraActiveRequests();
+ request.setRequestId(UUID.randomUUID().toString());
+ request.setVfModuleId(UUID.randomUUID().toString());
+ request.setRequestStatus("IN_PROGRESS");
+ request.setRequestScope(ModelType.vfModule.toString());
+ Instant startInstant = Instant.now().minus(3, ChronoUnit.MINUTES);
+ request.setStartTime(Timestamp.from(startInstant));
+ request.setRequestAction("create");
+ requestsDbClient.save(request);
+
+ List<InfraActiveRequests> infraActiveRequests = requestsDbClient.getInProgressVolumeGroupsAndVfModules();
+ assertThat(request, sameBeanAs(infraActiveRequests.get(0)).ignoring("modifyTime"));
+ }
}
diff --git a/adapters/mso-requests-db-adapter/src/test/resources/db/migration/afterMigrate.sql b/adapters/mso-requests-db-adapter/src/test/resources/db/migration/afterMigrate.sql
index 65fac11d41..b34b272b51 100644
--- a/adapters/mso-requests-db-adapter/src/test/resources/db/migration/afterMigrate.sql
+++ b/adapters/mso-requests-db-adapter/src/test/resources/db/migration/afterMigrate.sql
@@ -4,13 +4,13 @@ insert into operation_status(service_id, operation_id, service_name, user_id, re
('serviceid', 'operationid', 'servicename', 'userid', 'result', 'operationcontent', 'progress', 'reason', '2016-11-24 13:19:10', '2016-11-24 13:19:10');
-insert into infra_active_requests(request_id, client_request_id, action, request_status, status_message, progress, start_time, end_time, source, vnf_id, vnf_name, vnf_type, service_type, aic_node_clli, tenant_id, prov_status, vnf_params, vnf_outputs, request_body, response_body, last_modified_by, modify_time, request_type, volume_group_id, volume_group_name, vf_module_id, vf_module_name, vf_module_model_name, aai_service_id, cloud_region, callback_url, correlator, network_id, network_name, network_type, request_scope, request_action, service_instance_id, service_instance_name, requestor_id, configuration_id, configuration_name, operational_env_id, operational_env_name, request_url) values
-('00032ab7-3fb3-42e5-965d-8ea592502017', '00032ab7-3fb3-42e5-965d-8ea592502016', 'deleteInstance', 'COMPLETE', 'Vf Module has been deleted successfully.', '100', '2016-12-22 18:59:54', '2016-12-22 19:00:28', 'VID', 'b92f60c8-8de3-46c1-8dc1-e4390ac2b005', null, null, null, null, '6accefef3cb442ff9e644d589fb04107', null, null, null, '{"requestDetails":{"modelInfo":{"modelType":"vfModule","modelName":"vSAMP10aDEV::base::module-0"},"requestInfo":{"source":"VID"},"cloudConfiguration":{"tenantId":"6accefef3cb442ff9e644d589fb04107","lcpCloudRegionId":"mtn6"}}}', null, 'BPMN', '2016-12-22 19:00:28', null, null, null, 'c7d527b1-7a91-49fd-b97d-1c8c0f4a7992', null, 'vSAMP10aDEV::base::module-0', null, 'mtn6', null, null, null, null, null, 'vfModule', 'deleteInstance', 'e3b5744d-2ad1-4cdd-8390-c999a38829bc', null, null, null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
-('00093944-bf16-4373-ab9a-3adfe730ff2d', null, 'createInstance', 'FAILED', 'Error: Locked instance - This service (MSODEV_1707_SI_vSAMP10a_011-4) already has a request being worked with a status of IN_PROGRESS (RequestId - 278e83b1-4f9f-450e-9e7d-3700a6ed22f4). The existing request must finish or be cleaned up before proceeding.', '100', '2017-07-11 18:33:26', '2017-07-11 18:33:26', 'VID', null, null, null, null, null, '19123c2924c648eb8e42a3c1f14b7682', null, null, null, '{"requestDetails":{"modelInfo":{"modelInvariantId":"9647dfc4-2083-11e7-93ae-92361f002671","modelType":"service","modelName":"MSOTADevInfra_vSAMP10a_Service","modelVersion":"1.0","modelVersionId":"5df8b6de-2083-11e7-93ae-92361f002671"},"requestInfo":{"source":"VID","instanceName":"MSODEV_1707_SI_vSAMP10a_011-4","suppressRollback":false,"requestorId":"xxxxxx"},"subscriberInfo":{"globalSubscriberId":"MSO_1610_dev","subscriberName":"MSO_1610_dev"},"cloudConfiguration":{"tenantId":"19123c2924c648eb8e42a3c1f14b7682","lcpCloudRegionId":"mtn6"},"requestParameters":{"subscriptionServiceType":"MSO-dev-service-type","userParams":[{"name":"someUserParam","value":"someValue"}],"aLaCarte":true,"autoBuildVfModules":false,"cascadeDelete":false,"usePreload":true,"alaCarteSet":true,"alaCarte":true}}}', null, 'APIH', '2016-12-22 19:00:28', null, null, null, null, null, null, null, 'mtn6', null, null, null, null, null, 'service', 'createInstance', null, 'MSODEV_1707_SI_vSAMP10a_011-4', 'xxxxxx', null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
-('001619d2-a297-4a4b-a9f5-e2823c88458f', '001619d2-a297-4a4b-a9f5-e2823c88458f', 'CREATE_VF_MODULE', 'COMPLETE', 'COMPLETED', '100', '2016-07-01 14:11:42', '2017-05-02 16:03:34', 'PORTAL', null, 'test-vscp', 'elena_test21', null, null, '381b9ff6c75e4625b7a4182f90fc68d3', null, null, null, '<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<vnf-request xmlns=\"http://org.onap.so/mso/infra/vnf-request/v1\">\n <request-info>\n <request-id>001619d2-a297-4a4b-a9f5-e2823c88458f</request-id>\n <action>CREATE_VF_MODULE</action>\n <source>PORTAL</source>\n </request-info>\n <vnf-inputs>\n <vnf-name>test-vscp</vnf-name>\n <vf-module-name>moduleName</vf-module-name>\n <vnf-type>elena_test21</vnf-type>\n <vf-module-model-name>moduleModelName</vf-module-model-name>\n <asdc-service-model-version>1.0</asdc-service-model-version>\n <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>\n <aic-cloud-region>mtn9</aic-cloud-region>\n <tenant-id>381b9ff6c75e4625b7a4182f90fc68d3</tenant-id>\n <persona-model-id></persona-model-id>\n <persona-model-version></persona-model-version>\n <is-base-vf-module>false</is-base-vf-module>\n </vnf-inputs>\n <vnf-params xmlns:tns=\"http://org.onap.so/mso/infra/vnf-request/v1\"/>\n</vnf-request>\n', 'NONE', 'RDBTEST', '2016-07-01 14:11:42', 'VNF', null, null, null, 'MODULENAME1', 'moduleModelName', 'a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb', 'mtn9', null, null, null, null, null, 'vfModule', 'createInstance', null, null, null, null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
-('00164b9e-784d-48a8-8973-bbad6ef818ed', null, 'createInstance', 'COMPLETE', 'Service Instance was created successfully.', '100', '2017-09-28 12:45:51', '2017-09-28 12:45:53', 'VID', null, null, null, null, null, '19123c2924c648eb8e42a3c1f14b7682', null, null, null, '{"requestDetails":{"requestDetails":{"modelInfo":{"modelCustomizationName":null,"modelInvariantId":"52b49b5d-3086-4ffd-b5e6-1b1e5e7e062f","modelType":"service","modelNameVersionId":null,"modelName":"MSO Test Network","modelVersion":"1.0","modelCustomizationUuid":null,"modelVersionId":"aed5a5b7-20d3-44f7-90a3-ddbd16f14d1e","modelCustomizationId":null,"modelUuid":null,"modelInvariantUuid":null,"modelInstanceName":null},"requestInfo":{"billingAccountNumber":null,"callbackUrl":null,"correlator":null,"orderNumber":null,"productFamilyId":null,"orderVersion":null,"source":"VID","instanceName":"DEV-MTN6-3100-0927-1","suppressRollback":false,"requestorId":"xxxxxx"},"relatedInstanceList":null,"subscriberInfo":{"globalSubscriberId":"MSO_1610_dev","subscriberName":"MSO_1610_dev"},"cloudConfiguration":{"aicNodeClli":null,"tenantId":"19123c2924c648eb8e42a3c1f14b7682","lcpCloudRegionId":"mtn6"},"requestParameters":{"subscriptionServiceType":"MSO-dev-service-type","userParams":[{"name":"someUserParam","value":"someValue"}],"aLaCarte":true,"autoBuildVfModules":false,"cascadeDelete":false,"usePreload":true,"alaCarte":true},"project":null,"owningEntity":null,"platform":null,"lineOfBusiness":null}}}', null, 'CreateGenericALaCarteServiceInstance', '2017-09-28 12:45:52', null, null, null, null, null, null, null, 'mtn6', null, null, null, null, null, 'service', 'createInstance', 'b2f59173-b7e5-4e0f-8440-232fd601b865', 'DEV-MTN6-3100-0927-1', 'xxxxxx', null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
-('00173cc9-5ce2-4673-a810-f87fefb2829e', null, 'createInstance', 'FAILED', 'Error parsing request. No valid instanceName is specified', '100', '2017-04-14 21:08:46', '2017-04-14 21:08:46', 'VID', null, null, null, null, null, 'a259ae7b7c3f493cb3d91f95a7c18149', null, null, null, '{"requestDetails":{"modelInfo":{"modelInvariantId":"ff6163d4-7214-459e-9f76-507b4eb00f51","modelType":"service","modelName":"ConstraintsSrvcVID","modelVersion":"2.0","modelVersionId":"722d256c-a374-4fba-a14f-a59b76bb7656"},"requestInfo":{"productFamilyId":"LRSI-OSPF","source":"VID","requestorId":"xxxxxx"},"subscriberInfo":{"globalSubscriberId":"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"},"cloudConfiguration":{"tenantId":"a259ae7b7c3f493cb3d91f95a7c18149","lcpCloudRegionId":"mtn16"},"requestParameters":{"subscriptionServiceType":"Mobility","userParams":[{"name":"neutronport6_name","value":"8"},{"name":"neutronnet5_network_name","value":"8"},{"name":"contrailv2vlansubinterface3_name","value":"false"}]}}}', null, 'APIH', '2016-12-22 19:00:28', null, null, null, null, null, null, null, 'mtn16', null, null, null, null, null, 'service', 'createInstance', null, null, null, null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
-('0017f68c-eb2d-45bb-b7c7-ec31b37dc349', null, 'activateInstance', 'UNLOCKED', null, '20', '2017-09-26 16:09:29', '2017-09-28 12:45:53', 'VID', null, null, null, null, null, null, null, null, null, '{"requestDetails":{"modelInfo":{"modelCustomizationName":null,"modelInvariantId":"1587cf0e-f12f-478d-8530-5c55ac578c39","modelType":"configuration","modelNameVersionId":null,"modelName":null,"modelVersion":null,"modelCustomizationUuid":null,"modelVersionId":"36a3a8ea-49a6-4ac8-b06c-89a545444455","modelCustomizationId":"68dc9a92-214c-11e7-93ae-92361f002671","modelUuid":null,"modelInvariantUuid":null,"modelInstanceName":null},"requestInfo":{"billingAccountNumber":null,"callbackUrl":null,"correlator":null,"orderNumber":null,"productFamilyId":null,"orderVersion":null,"source":"VID","instanceName":null,"suppressRollback":false,"requestorId":"xxxxxx"},"relatedInstanceList":[{"relatedInstance":{"instanceName":null,"instanceId":"9e15a443-af65-4f05-9000-47ae495e937d","modelInfo":{"modelCustomizationName":null,"modelInvariantId":"de19ae10-9a25-11e7-abc4-cec278b6b50a","modelType":"service","modelNameVersionId":null,"modelName":"MSOTADevInfra_Configuration_Service","modelVersion":"1.0","modelCustomizationUuid":null,"modelVersionId":"ee938612-9a25-11e7-abc4-cec278b6b50a","modelCustomizationId":null,"modelUuid":null,"modelInvariantUuid":null,"modelInstanceName":null},"instanceDirection":null}}],"subscriberInfo":null,"cloudConfiguration":{"aicNodeClli":null,"tenantId":null,"lcpCloudRegionId":"mtn6"},"requestParameters":{"subscriptionServiceType":null,"userParams":[],"aLaCarte":false,"autoBuildVfModules":false,"cascadeDelete":false,"usePreload":true,"alaCarte":false},"project":null,"owningEntity":null,"platform":null,"lineOfBusiness":null}}', null, 'APIH', '2017-09-26 16:09:29', null, null, null, null, null, null, null, 'mtn6', null, null, null, null, null, 'configuration', 'activateInstance', '9e15a443-af65-4f05-9000-47ae495e937d', null, 'xxxxxx', '26ef7f15-57bb-48df-8170-e59edc26234c', null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances');
+insert into infra_active_requests(request_id, request_status, status_message, progress, start_time, end_time, source, vnf_id, vnf_name, vnf_type, service_type, tenant_id, vnf_params, vnf_outputs, request_body, response_body, last_modified_by, modify_time, volume_group_id, volume_group_name, vf_module_id, vf_module_name, vf_module_model_name, cloud_region, callback_url, correlator, network_id, network_name, network_type, request_scope, request_action, service_instance_id, service_instance_name, requestor_id, configuration_id, configuration_name, operational_env_id, operational_env_name, request_url) values
+('00032ab7-3fb3-42e5-965d-8ea592502017', 'COMPLETE', 'Vf Module has been deleted successfully.', '100', '2016-12-22 18:59:54', '2016-12-22 19:00:28', 'VID', 'b92f60c8-8de3-46c1-8dc1-e4390ac2b005', null, null, null, '6accefef3cb442ff9e644d589fb04107', null, null, '{"requestDetails":{"modelInfo":{"modelType":"vfModule","modelName":"vSAMP10aDEV::base::module-0"},"requestInfo":{"source":"VID"},"cloudConfiguration":{"tenantId":"6accefef3cb442ff9e644d589fb04107","lcpCloudRegionId":"mtn6"}}}', null, 'BPMN', '2016-12-22 19:00:28', null, null, 'c7d527b1-7a91-49fd-b97d-1c8c0f4a7992', null, 'vSAMP10aDEV::base::module-0', 'mtn6', null, null, null, null, null, 'vfModule', 'deleteInstance', 'e3b5744d-2ad1-4cdd-8390-c999a38829bc', null, null, null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
+('00093944-bf16-4373-ab9a-3adfe730ff2d', 'FAILED', 'Error: Locked instance - This service (MSODEV_1707_SI_vSAMP10a_011-4) already has a request being worked with a status of IN_PROGRESS (RequestId - 278e83b1-4f9f-450e-9e7d-3700a6ed22f4). The existing request must finish or be cleaned up before proceeding.', '100', '2017-07-11 18:33:26', '2017-07-11 18:33:26', 'VID', null, null, null, null, '19123c2924c648eb8e42a3c1f14b7682', null, null, '{"requestDetails":{"modelInfo":{"modelInvariantId":"9647dfc4-2083-11e7-93ae-92361f002671","modelType":"service","modelName":"MSOTADevInfra_vSAMP10a_Service","modelVersion":"1.0","modelVersionId":"5df8b6de-2083-11e7-93ae-92361f002671"},"requestInfo":{"source":"VID","instanceName":"MSODEV_1707_SI_vSAMP10a_011-4","suppressRollback":false,"requestorId":"xxxxxx"},"subscriberInfo":{"globalSubscriberId":"MSO_1610_dev","subscriberName":"MSO_1610_dev"},"cloudConfiguration":{"tenantId":"19123c2924c648eb8e42a3c1f14b7682","lcpCloudRegionId":"mtn6"},"requestParameters":{"subscriptionServiceType":"MSO-dev-service-type","userParams":[{"name":"someUserParam","value":"someValue"}],"aLaCarte":true,"autoBuildVfModules":false,"cascadeDelete":false,"usePreload":true,"alaCarteSet":true,"alaCarte":true}}}', null, 'APIH', '2016-12-22 19:00:28', null, null, null, null, null, 'mtn6', null, null, null, null, null, 'service', 'createInstance', null, 'MSODEV_1707_SI_vSAMP10a_011-4', 'xxxxxx', null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
+('001619d2-a297-4a4b-a9f5-e2823c88458f', 'COMPLETE', 'COMPLETED', '100', '2016-07-01 14:11:42', '2017-05-02 16:03:34', 'PORTAL', null, 'test-vscp', 'elena_test21', null, '381b9ff6c75e4625b7a4182f90fc68d3', null, null, '<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<vnf-request xmlns=\"http://org.onap.so/mso/infra/vnf-request/v1\">\n <request-info>\n <request-id>001619d2-a297-4a4b-a9f5-e2823c88458f</request-id>\n <action>CREATE_VF_MODULE</action>\n <source>PORTAL</source>\n </request-info>\n <vnf-inputs>\n <vnf-name>test-vscp</vnf-name>\n <vf-module-name>moduleName</vf-module-name>\n <vnf-type>elena_test21</vnf-type>\n <vf-module-model-name>moduleModelName</vf-module-model-name>\n <asdc-service-model-version>1.0</asdc-service-model-version>\n <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>\n <aic-cloud-region>mtn9</aic-cloud-region>\n <tenant-id>381b9ff6c75e4625b7a4182f90fc68d3</tenant-id>\n <persona-model-id></persona-model-id>\n <persona-model-version></persona-model-version>\n <is-base-vf-module>false</is-base-vf-module>\n </vnf-inputs>\n <vnf-params xmlns:tns=\"http://org.onap.so/mso/infra/vnf-request/v1\"/>\n</vnf-request>\n', 'NONE', 'RDBTEST', '2016-07-01 14:11:42', null, null, null, 'MODULENAME1', 'moduleModelName', 'mtn9', null, null, null, null, null, 'vfModule', 'createInstance', null, null, null, null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
+('00164b9e-784d-48a8-8973-bbad6ef818ed', 'COMPLETE', 'Service Instance was created successfully.', '100', '2017-09-28 12:45:51', '2017-09-28 12:45:53', 'VID', null, null, null, null, '19123c2924c648eb8e42a3c1f14b7682', null, null, '{"requestDetails":{"requestDetails":{"modelInfo":{"modelCustomizationName":null,"modelInvariantId":"52b49b5d-3086-4ffd-b5e6-1b1e5e7e062f","modelType":"service","modelNameVersionId":null,"modelName":"MSO Test Network","modelVersion":"1.0","modelCustomizationUuid":null,"modelVersionId":"aed5a5b7-20d3-44f7-90a3-ddbd16f14d1e","modelCustomizationId":null,"modelUuid":null,"modelInvariantUuid":null,"modelInstanceName":null},"requestInfo":{"billingAccountNumber":null,"callbackUrl":null,"correlator":null,"orderNumber":null,"productFamilyId":null,"orderVersion":null,"source":"VID","instanceName":"DEV-MTN6-3100-0927-1","suppressRollback":false,"requestorId":"xxxxxx"},"relatedInstanceList":null,"subscriberInfo":{"globalSubscriberId":"MSO_1610_dev","subscriberName":"MSO_1610_dev"},"cloudConfiguration":{"aicNodeClli":null,"tenantId":"19123c2924c648eb8e42a3c1f14b7682","lcpCloudRegionId":"mtn6"},"requestParameters":{"subscriptionServiceType":"MSO-dev-service-type","userParams":[{"name":"someUserParam","value":"someValue"}],"aLaCarte":true,"autoBuildVfModules":false,"cascadeDelete":false,"usePreload":true,"alaCarte":true},"project":null,"owningEntity":null,"platform":null,"lineOfBusiness":null}}}', null, 'CreateGenericALaCarteServiceInstance', '2017-09-28 12:45:52', null, null, null, null, null, 'mtn6', null, null, null, null, null, 'service', 'createInstance', 'b2f59173-b7e5-4e0f-8440-232fd601b865', 'DEV-MTN6-3100-0927-1', 'xxxxxx', null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
+('00173cc9-5ce2-4673-a810-f87fefb2829e', 'FAILED', 'Error parsing request. No valid instanceName is specified', '100', '2017-04-14 21:08:46', '2017-04-14 21:08:46', 'VID', null, null, null, null, 'a259ae7b7c3f493cb3d91f95a7c18149', null, null, '{"requestDetails":{"modelInfo":{"modelInvariantId":"ff6163d4-7214-459e-9f76-507b4eb00f51","modelType":"service","modelName":"ConstraintsSrvcVID","modelVersion":"2.0","modelVersionId":"722d256c-a374-4fba-a14f-a59b76bb7656"},"requestInfo":{"productFamilyId":"LRSI-OSPF","source":"VID","requestorId":"xxxxxx"},"subscriberInfo":{"globalSubscriberId":"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"},"cloudConfiguration":{"tenantId":"a259ae7b7c3f493cb3d91f95a7c18149","lcpCloudRegionId":"mtn16"},"requestParameters":{"subscriptionServiceType":"Mobility","userParams":[{"name":"neutronport6_name","value":"8"},{"name":"neutronnet5_network_name","value":"8"},{"name":"contrailv2vlansubinterface3_name","value":"false"}]}}}', null, 'APIH', '2016-12-22 19:00:28', null, null, null, null, null, 'mtn16', null, null, null, null, null, 'service', 'createInstance', null, null, null, null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
+('0017f68c-eb2d-45bb-b7c7-ec31b37dc349', 'UNLOCKED', null, '20', '2017-09-26 16:09:29', '2017-09-28 12:45:53', 'VID', null, null, null, null, null, null, null, '{"requestDetails":{"modelInfo":{"modelCustomizationName":null,"modelInvariantId":"1587cf0e-f12f-478d-8530-5c55ac578c39","modelType":"configuration","modelNameVersionId":null,"modelName":null,"modelVersion":null,"modelCustomizationUuid":null,"modelVersionId":"36a3a8ea-49a6-4ac8-b06c-89a545444455","modelCustomizationId":"68dc9a92-214c-11e7-93ae-92361f002671","modelUuid":null,"modelInvariantUuid":null,"modelInstanceName":null},"requestInfo":{"billingAccountNumber":null,"callbackUrl":null,"correlator":null,"orderNumber":null,"productFamilyId":null,"orderVersion":null,"source":"VID","instanceName":null,"suppressRollback":false,"requestorId":"xxxxxx"},"relatedInstanceList":[{"relatedInstance":{"instanceName":null,"instanceId":"9e15a443-af65-4f05-9000-47ae495e937d","modelInfo":{"modelCustomizationName":null,"modelInvariantId":"de19ae10-9a25-11e7-abc4-cec278b6b50a","modelType":"service","modelNameVersionId":null,"modelName":"MSOTADevInfra_Configuration_Service","modelVersion":"1.0","modelCustomizationUuid":null,"modelVersionId":"ee938612-9a25-11e7-abc4-cec278b6b50a","modelCustomizationId":null,"modelUuid":null,"modelInvariantUuid":null,"modelInstanceName":null},"instanceDirection":null}}],"subscriberInfo":null,"cloudConfiguration":{"aicNodeClli":null,"tenantId":null,"lcpCloudRegionId":"mtn6"},"requestParameters":{"subscriptionServiceType":null,"userParams":[],"aLaCarte":false,"autoBuildVfModules":false,"cascadeDelete":false,"usePreload":true,"alaCarte":false},"project":null,"owningEntity":null,"platform":null,"lineOfBusiness":null}}', null, 'APIH', '2017-09-26 16:09:29', null, null, null, null, null, 'mtn6', null, null, null, null, null, 'configuration', 'activateInstance', '9e15a443-af65-4f05-9000-47ae495e937d', null, 'xxxxxx', '26ef7f15-57bb-48df-8170-e59edc26234c', null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances');
insert into watchdog_distributionid_status(distribution_id, distribution_id_status, lock_version, create_time, modify_time) values
('1533c4bd-a3e3-493f-a16d-28c20614415e', '', 0, '2017-11-30 15:48:09', '2017-11-30 15:48:09'),
@@ -31,11 +31,11 @@ insert into watchdog_service_mod_ver_id_lookup(distribution_id, service_model_ve
insert into site_status(site_name, status, creation_timestamp) values
('testsite', 0, '2017-11-30 15:48:09');
-INSERT INTO requestdb.request_processing_data (ID, SO_REQUEST_ID, GROUPING_ID, NAME, VALUE, TAG)
+INSERT INTO requestdb.request_processing_data (ID, SO_REQUEST_ID, GROUPING_ID, NAME, VALUE, TAG, IS_DATA_INTERNAL)
VALUES
-(1, '00032ab7-na18-42e5-965d-8ea592502018', '7d2e8c07-4d10-456d-bddc-37abf38ca714', 'requestAction', 'assign', 'pincFabricConfigRequest'),
-(2, '00032ab7-na18-42e5-965d-8ea592502018', '7d2e8c07-4d10-456d-bddc-37abf38ca715', 'configurationId', '52234bc0-d6a6-41d4-a901-79015e4877e2', 'pincFabricConfigRequest'),
-(3, '5ffbabd6-b793-4377-a1ab-082670fbc7ac', '5ffbabd6-b793-4377-a1ab-082670fbc7ac', 'configId', '52234bc0-d6a6-41d4-a901-79015e4877e2', 'pincFabricConfig');
+(1, '00032ab7-na18-42e5-965d-8ea592502018', '7d2e8c07-4d10-456d-bddc-37abf38ca714', 'requestAction', 'assign', 'pincFabricConfigRequest', 1),
+(2, '00032ab7-na18-42e5-965d-8ea592502018', '7d2e8c07-4d10-456d-bddc-37abf38ca715', 'configurationId', '52234bc0-d6a6-41d4-a901-79015e4877e2', 'pincFabricConfigRequest', 0),
+(3, '5ffbabd6-b793-4377-a1ab-082670fbc7ac', '5ffbabd6-b793-4377-a1ab-082670fbc7ac', 'configId', '52234bc0-d6a6-41d4-a901-79015e4877e2', 'pincFabricConfig', 1);
INSERT INTO activate_operational_env_service_model_distribution_status (OPERATIONAL_ENV_ID, SERVICE_MODEL_VERSION_ID, REQUEST_ID,SERVICE_MOD_VER_FINAL_DISTR_STATUS,RECOVERY_ACTION,RETRY_COUNT_LEFT,WORKLOAD_CONTEXT, CREATE_TIME, MODIFY_TIME, VNF_OPERATIONAL_ENV_ID)
VALUES
diff --git a/adapters/mso-sdnc-adapter/pom.xml b/adapters/mso-sdnc-adapter/pom.xml
index fc577a52e3..07c8ed5eab 100644
--- a/adapters/mso-sdnc-adapter/pom.xml
+++ b/adapters/mso-sdnc-adapter/pom.xml
@@ -42,6 +42,9 @@
<executions>
<execution>
<id>original</id>
+ <configuration>
+ <skip>false</skip>
+ </configuration>
</execution>
</executions>
</plugin>
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java
index 012a19f1a9..a8418ea901 100644
--- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java
+++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java
@@ -178,7 +178,7 @@ public class SDNCRestClient {
return (sdncResp);
} catch (Exception e) {
logger.error(LoggingAnchor.FOUR, MessageEnum.RA_EXCEPTION_COMMUNICATE_SDNC.toString(), "SDNC",
- ErrorCode.BusinessProcesssError.getValue(), "Exception processing request to SDNC", e);
+ ErrorCode.BusinessProcessError.getValue(), "Exception processing request to SDNC", e);
// default
sdncResp.setRespCode(HttpURLConnection.HTTP_INTERNAL_ERROR);
String respMsg = "Error processing request to SDNC. ";
@@ -246,7 +246,7 @@ public class SDNCRestClient {
} // is != null
} catch (Exception e1) {
logger.error(LoggingAnchor.FOUR, MessageEnum.RA_ERROR_GET_RESPONSE_SDNC.toString(), "SDNC",
- ErrorCode.BusinessProcesssError.getValue(), "Exception while get SDNC response", e1);
+ ErrorCode.BusinessProcessError.getValue(), "Exception while get SDNC response", e1);
}
} // con != null
@@ -312,7 +312,7 @@ public class SDNCRestClient {
headers.put("Authorization", Collections.singletonList(basicAuth));
} catch (Exception e2) {
logger.error(LoggingAnchor.FOUR, MessageEnum.RA_SET_CALLBACK_AUTH_EXC.toString(), CAMUNDA,
- ErrorCode.BusinessProcesssError.getValue(),
+ ErrorCode.BusinessProcessError.getValue(),
"Exception - Unable to set authorization in callback request", e2);
}
@@ -322,7 +322,7 @@ public class SDNCRestClient {
} catch (Exception e) {
error = "Error sending BpelCallback request" + e.getMessage();
- logger.error("Error {} - {} - {}", ErrorCode.BusinessProcesssError.getValue(),
+ logger.error("Error {} - {} - {}", ErrorCode.BusinessProcessError.getValue(),
MessageEnum.RA_CALLBACK_BPEL_EXC.toString(), error, e);
}
logger.info(MessageEnum.RA_CALLBACK_BPEL_COMPLETE.name(), CAMUNDA);
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/Utils.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/Utils.java
index 1c47a2d6b0..f710988886 100644
--- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/Utils.java
+++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/Utils.java
@@ -99,7 +99,7 @@ public class Utils {
} catch (Exception e) {
logger.error(LoggingAnchor.FOUR, MessageEnum.RA_ERROR_CREATE_SDNC_REQUEST.toString(), "SDNC",
- ErrorCode.BusinessProcesssError.getValue(), "Exception in genSdncReq", e);
+ ErrorCode.BusinessProcessError.getValue(), "Exception in genSdncReq", e);
}
return null;
}
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/BPRestCallback.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/BPRestCallback.java
index b50662a832..8a1a7559b5 100644
--- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/BPRestCallback.java
+++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/BPRestCallback.java
@@ -125,7 +125,7 @@ public class BPRestCallback {
method.setHeader(ONAPLogConstants.Headers.PARTNER_NAME, "SO-SDNCAdapter");
} catch (Exception e) {
logger.error(LoggingAnchor.FOUR, MessageEnum.RA_SET_CALLBACK_AUTH_EXC.toString(), CAMUNDA,
- ErrorCode.BusinessProcesssError.getValue(), "Unable to set authorization in callback request",
+ ErrorCode.BusinessProcessError.getValue(), "Unable to set authorization in callback request",
e);
error = true;
}
@@ -143,14 +143,14 @@ public class BPRestCallback {
if (httpResponse.getStatusLine().getStatusCode() >= 300) {
String msg = "Received error response to callback request: " + httpResponse.getStatusLine();
logger.error(LoggingAnchor.FOUR, MessageEnum.RA_CALLBACK_BPEL_EXC.toString(), CAMUNDA,
- ErrorCode.BusinessProcesssError.getValue(), msg);
+ ErrorCode.BusinessProcessError.getValue(), msg);
}
}
return true;
} catch (Exception e) {
logger.error(LoggingAnchor.FOUR, MessageEnum.RA_CALLBACK_BPEL_EXC.toString(), CAMUNDA,
- ErrorCode.BusinessProcesssError.getValue(), "Error sending callback request", e);
+ ErrorCode.BusinessProcessError.getValue(), "Error sending callback request", e);
return false;
} finally {
if (httpResponse != null) {
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCServiceRequestTask.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCServiceRequestTask.java
index 5697ed56a5..50c8a089df 100644
--- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCServiceRequestTask.java
+++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCServiceRequestTask.java
@@ -185,7 +185,7 @@ public class SDNCServiceRequestTask {
addTextChild(agnosticServiceInformation, "anydata", anydata);
} catch (Exception e) {
logger.error(LoggingAnchor.FOUR, MessageEnum.RA_ERROR_CREATE_SDNC_REQUEST.toString(), "SDNC",
- ErrorCode.BusinessProcesssError.getValue(), "Exception in genSdncReq", e);
+ ErrorCode.BusinessProcessError.getValue(), "Exception in genSdncReq", e);
return null;
}
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
index e8b4cfd997..5b50f776cc 100644
--- 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
@@ -85,7 +85,7 @@ public class JsonUtil {
return MAPPER.readValue(jsonstr, type);
} catch (IOException e) {
logger.error(LoggingAnchor.THREE, MessageEnum.RA_NS_EXC.toString(),
- ErrorCode.BusinessProcesssError.getValue(), UNMARSHAL_FAIL_MSG, e);
+ ErrorCode.BusinessProcessError.getValue(), UNMARSHAL_FAIL_MSG, e);
throw new ApplicationException(HttpCode.BAD_REQUEST, UNMARSHAL_FAIL_MSG);
}
}
@@ -103,7 +103,7 @@ public class JsonUtil {
return MAPPER.readValue(jsonstr, type);
} catch (IOException e) {
logger.error(LoggingAnchor.THREE, MessageEnum.RA_NS_EXC.toString(),
- ErrorCode.BusinessProcesssError.getValue(), UNMARSHAL_FAIL_MSG, e);
+ ErrorCode.BusinessProcessError.getValue(), UNMARSHAL_FAIL_MSG, e);
throw new ApplicationException(HttpCode.BAD_REQUEST, UNMARSHAL_FAIL_MSG);
}
}
@@ -120,7 +120,7 @@ public class JsonUtil {
return MAPPER.writeValueAsString(srcObj);
} catch (IOException e) {
logger.error(LoggingAnchor.THREE, MessageEnum.RA_NS_EXC.toString(),
- ErrorCode.BusinessProcesssError.getValue(), "fail to marshal json", e);
+ ErrorCode.BusinessProcessError.getValue(), "fail to marshal json", e);
throw new ApplicationException(HttpCode.BAD_REQUEST, "srcObj marshal failed!");
}
}
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-adapter-ext-clients/pom.xml b/adapters/mso-vnfm-adapter/mso-vnfm-adapter-ext-clients/pom.xml
index 91478e1f8e..8e2cfd2be4 100644
--- a/adapters/mso-vnfm-adapter/mso-vnfm-adapter-ext-clients/pom.xml
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-adapter-ext-clients/pom.xml
@@ -75,8 +75,7 @@
<goal>generate</goal>
</goals>
<configuration>
- <inputSpec>${basedir}/src/main/resources/SOL003-VNFLifecycleOperationGranting-API.json
- </inputSpec>
+ <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>
@@ -91,6 +90,46 @@
</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.vnfmadapter.extclients.vnfm.packagemanagement.api</apiPackage>
+ <modelPackage>org.onap.so.adapters.vnfmadapter.extclients.vnfm.packagemanagement.model</modelPackage>
+ <configOptions>
+ <sourceFolder>src/gen/java/main</sourceFolder>
+ <withXml>true</withXml>
+ <useRxJava2>true</useRxJava2>
+ <serializableModel>true</serializableModel>
+ </configOptions>
+ </configuration>
+ </execution>
+ <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.vnfmadapter.extclients.etsicatalog.api</apiPackage>
+ <modelPackage>org.onap.so.adapters.vnfmadapter.extclients.etsicatalog.model</modelPackage>
+ <configOptions>
+ <sourceFolder>src/gen/java/main</sourceFolder>
+ <withXml>true</withXml>
+ <useRxJava2>true</useRxJava2>
+ <serializableModel>true</serializableModel>
+ </configOptions>
+ </configuration>
+ </execution>
</executions>
</plugin>
</plugins>
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-adapter-ext-clients/src/main/resources/ETSI-Catalog-API.json b/adapters/mso-vnfm-adapter/mso-vnfm-adapter-ext-clients/src/main/resources/ETSI-Catalog-API.json
new file mode 100644
index 0000000000..514029bab8
--- /dev/null
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-adapter-ext-clients/src/main/resources/ETSI-Catalog-API.json
@@ -0,0 +1,3102 @@
+{
+ "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": {
+ "/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"
+ }
+ }
+ },
+ "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"
+ }
+ },
+ "500": {
+ "description": "Internal error"
+ }
+ },
+ "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"
+ }
+ }
+ },
+ "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"
+ }
+ }
+ },
+ "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"
+ }
+ }
+ },
+ "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",
+ "format": "uuid"
+ }
+ },
+ "nsdId": {
+ "description": "Match NS Packages with particular nsdIds",
+ "type": "array",
+ "items": {
+ "type": "string",
+ "format": "uuid"
+ }
+ },
+ "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",
+ "format": "uuid"
+ }
+ },
+ "vnfPkgIds": {
+ "description": "Match NS Packages that has VNF PackageIds",
+ "type": "array",
+ "items": {
+ "type": "string",
+ "format": "uuid"
+ }
+ },
+ "nestedNsdInfoIds": {
+ "description": "Match NS Packages with particular nsdInvariantIds",
+ "type": "array",
+ "items": {
+ "type": "string",
+ "format": "uuid"
+ }
+ },
+ "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",
+ "format": "uuid"
+ }
+ },
+ "pnfdId": {
+ "description": "Match PF packages with particular pnfdInfoIds",
+ "type": "array",
+ "items": {
+ "type": "string",
+ "format": "uuid"
+ }
+ },
+ "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",
+ "format": "uuid"
+ }
+ },
+ "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": "string"
+ }
+ }
+ },
+ "ParseModelResponse": {
+ "required": ["model"],
+ "type": "object",
+ "properties": {
+ "model": {
+ "title": "Model",
+ "description": "Model",
+ "type": "string"
+ }
+ }
+ },
+ "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": {
+ "title": "Versions",
+ "description": "match VNF packages that contain VNF products with certain versions",
+ "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": {
+ "title": "Vnfproducts",
+ "description": "match VNF packages that contain VNF products with certain product names, from one particular provider",
+ "required": ["vnfProductName"],
+ "type": "object",
+ "properties": {
+ "vnfProductName": {
+ "title": "Vnfproductname",
+ "description": "Name of the VNF product to match.",
+ "type": "string",
+ "maxLength": 255,
+ "minLength": 1
+ },
+ "versions": {
+ "$ref": "#/definitions/Version"
+ }
+ }
+ },
+ "vnfProductsProviders": {
+ "title": "Vnfproductsfromproviders",
+ "description": "Match VNF packages that contain VNF products from certain providers.",
+ "required": ["vnfProvider"],
+ "type": "object",
+ "properties": {
+ "vnfProvider": {
+ "title": "Vnfprovider",
+ "description": "Name of the VNFprovider to match.",
+ "type": "string",
+ "maxLength": 255,
+ "minLength": 1
+ },
+ "vnfProducts": {
+ "$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": {
+ "$ref": "#/definitions/vnfProductsProviders"
+ },
+ "vnfdId": {
+ "description": "Match VNF packages with a VNFD identifierlisted in the attribute",
+ "type": "array",
+ "items": {
+ "type": "string",
+ "format": "uuid"
+ }
+ },
+ "vnfPkgId": {
+ "description": "Match VNF packages with a VNFD identifierlisted in the attribute",
+ "type": "array",
+ "items": {
+ "type": "string",
+ "format": "uuid"
+ }
+ },
+ "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",
+ "format": "uuid"
+ },
+ "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": {
+ "filters": {
+ "$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/mso-vnfm-adapter/mso-vnfm-adapter-ext-clients/src/main/resources/SOL003-VNFPackageManagement-API.json b/adapters/mso-vnfm-adapter/mso-vnfm-adapter-ext-clients/src/main/resources/SOL003-VNFPackageManagement-API.json
new file mode 100644
index 0000000000..1f4a8ac306
--- /dev/null
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-adapter-ext-clients/src/main/resources/SOL003-VNFPackageManagement-API.json
@@ -0,0 +1,7311 @@
+{
+ "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"
+ },
+ "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"
+ },
+ "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": "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"
+ },
+ "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": "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"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "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/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/Constants.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/Constants.java
index 1695b39c85..40be4411c8 100644
--- a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/Constants.java
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/Constants.java
@@ -28,6 +28,8 @@ public class Constants {
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 APPLICATION_ZIP = "application/zip";
public static final String OPERATION_NOTIFICATION_ENDPOINT = "/lcn/VnfLcmOperationOccurrenceNotification";
private Constants() {}
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/vnfm/VnfmServiceProviderImpl.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/vnfm/VnfmServiceProviderImpl.java
index 3bdba368b2..d898de3ad0 100644
--- a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/vnfm/VnfmServiceProviderImpl.java
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/vnfm/VnfmServiceProviderImpl.java
@@ -136,15 +136,9 @@ public class VnfmServiceProviderImpl implements VnfmServiceProvider {
logger.error(errorMessage, exception);
throw new VnfmRequestFailureException(errorMessage, exception);
}
- if (response.getStatusCode() != HttpStatus.ACCEPTED) {
- final String errorMessage = "Terminate request to " + vnfSelfLink + " returned status code: "
- + response.getStatusCode() + ", request: " + terminateVnfRequest;
- logger.error(errorMessage);
- throw new VnfmRequestFailureException(errorMessage);
- }
+ checkIfResponseIsAcceptable(response, vnfSelfLink, terminateVnfRequest);
final String locationHeader = response.getHeaders().get("Location").iterator().next();
return locationHeader.substring(locationHeader.lastIndexOf("/") + 1);
-
}
@Override
@@ -177,6 +171,22 @@ public class VnfmServiceProviderImpl implements VnfmServiceProvider {
}
}
+ private void checkIfResponseIsAcceptable(ResponseEntity<Void> response, String vnfSelfLink,
+ TerminateVnfRequest terminateVnfRequest) {
+ if (response == null) {
+ final String errorMessage =
+ "Terminate request to " + vnfSelfLink + ", response is null, " + "request: " + terminateVnfRequest;
+ logger.error(errorMessage);
+ throw new VnfmRequestFailureException(errorMessage);
+ }
+ if (response.getStatusCode() != HttpStatus.ACCEPTED) {
+ final String errorMessage = "Terminate request to " + vnfSelfLink + ", returned status code: "
+ + response.getStatusCode() + ", request: " + terminateVnfRequest;
+ logger.error(errorMessage);
+ throw new VnfmRequestFailureException(errorMessage);
+ }
+ }
+
private HttpRestServiceProvider getHttpServiceProvider(final EsrVnfm vnfm) {
return vnfmServiceProviderConfiguration.getHttpRestServiceProvider(vnfm);
}
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/rest/Sol003PackageManagementController.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/rest/Sol003PackageManagementController.java
new file mode 100644
index 0000000000..1da1159be0
--- /dev/null
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/rest/Sol003PackageManagementController.java
@@ -0,0 +1,118 @@
+/*-
+ * ============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.vnfmadapter.rest;
+
+import static org.onap.so.adapters.vnfmadapter.Constants.APPLICATION_ZIP;
+import static org.onap.so.adapters.vnfmadapter.Constants.PACKAGE_MANAGEMENT_BASE_URL;
+import static org.slf4j.LoggerFactory.getLogger;
+import java.util.List;
+import javax.ws.rs.core.MediaType;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.packagemanagement.model.InlineResponse2001;
+import org.slf4j.Logger;
+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 static final String LOG_REQUEST_RECEIVED = "VNF Package Management Controller: {} {} {} {} {}";
+ private static final Logger logger = getLogger(Sol003PackageManagementController.class);
+
+ /**
+ * GET VNF packages information. Direction: VNFM -> VNFM-Adapter. 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 A List of all VNF packages. Object: List<InlineResponse2001> Response Code: 200 OK
+ */
+
+ @GetMapping(value = "/vnf_packages", produces = {MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
+ public ResponseEntity<List<InlineResponse2001>> getVnfPackages() {
+ logger.info(LOG_REQUEST_RECEIVED, "getVnfPackages.");
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+ /**
+ * GET VNF package information. Direction: VNFM -> VNFM-Adapter. 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<InlineResponse2001> getVnfPackage(@PathVariable("vnfPkgId") final String vnfPkgId) {
+ logger.info(LOG_REQUEST_RECEIVED, "getVnfPackage: ", vnfPkgId);
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+ /**
+ * GET VNFD, from VNF package. Direction: VNFM -> VNFM-Adapter. 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})
+ public ResponseEntity<byte[]> getVnfPackageVnfd(@PathVariable("vnfPkgId") final String vnfPkgId) {
+ logger.info(LOG_REQUEST_RECEIVED, "getVnfPackageVnfd: ", vnfPkgId);
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+ /**
+ * GET Package Content, from VNF Package. Direction: VNFM -> VNFM-Adapter. 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 = {APPLICATION_ZIP})
+ public ResponseEntity<byte[]> getVnfPackageContent(@PathVariable("vnfPkgId") final String vnfPkgId) {
+ logger.info(LOG_REQUEST_RECEIVED, "getVnfPackageContent: ", vnfPkgId);
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+ /**
+ * GET Artifact, from VNF Package. Direction: VNFM -> VNFM-Adapter. 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})
+ public ResponseEntity<byte[]> getVnfPackageArtifact(@PathVariable("vnfPkgId") final String vnfPkgId,
+ @PathVariable("artifactPath") final String artifactPath) {
+ logger.info(LOG_REQUEST_RECEIVED, "getVnfPackageArtifact: vnfPkgId=", vnfPkgId, " artifactPath=", artifactPath);
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+}
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/rest/Sol003SubscriptionManagementController.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/rest/Sol003SubscriptionManagementController.java
new file mode 100644
index 0000000000..6fac952aa8
--- /dev/null
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/rest/Sol003SubscriptionManagementController.java
@@ -0,0 +1,108 @@
+/*-
+ * ============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.vnfmadapter.rest;
+
+import static org.onap.so.adapters.vnfmadapter.Constants.PACKAGE_MANAGEMENT_BASE_URL;
+import static org.slf4j.LoggerFactory.getLogger;
+import java.util.List;
+import javax.ws.rs.core.MediaType;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.packagemanagement.model.InlineResponse2002;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.packagemanagement.model.PkgmSubscriptionRequest;
+import org.slf4j.Logger;
+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. 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, produces = {MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML},
+ consumes = {MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
+public class Sol003SubscriptionManagementController {
+
+ private static final String LOG_REQUEST_RECEIVED = "Subscription Management Controller: {} {}";
+ private static final Logger logger = getLogger(Sol003SubscriptionManagementController.class);
+
+ /**
+ * POST Subscribe request. Direction: VNFM -> VNFM Adapter. 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
+ */
+ @PostMapping(value = "/subscriptions")
+ public ResponseEntity<InlineResponse2002> postSubscriptionRequest(
+ @RequestBody final PkgmSubscriptionRequest pkgmSubscriptionRequest) {
+ logger.info(LOG_REQUEST_RECEIVED, " postSubscriptionRequest: ", pkgmSubscriptionRequest);
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+ /**
+ * GET all subscriptions. Direction: VNFM -> VNFM Adapter. 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<InlineResponse2002>> getSubscriptions() {
+ logger.info(LOG_REQUEST_RECEIVED, " getSubscriptions.");
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+ /**
+ * GET a specific subscription, by subscriptionId. Direction: VNFM -> VNFM Adapter. 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<InlineResponse2002> getSubscription(
+ @PathVariable("subscriptionId") final String subscriptionId) {
+ logger.info(LOG_REQUEST_RECEIVED, " Getting Subscription: ", subscriptionId);
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+ /**
+ * DELETE a specific subscription, by subscriptionId. Direction: VNFM -> VNFM Adapter. Section Number: 10.4.7
+ *
+ * @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<Void> deleteSubscription(@PathVariable("subscriptionId") final String subscriptionId) {
+ logger.info(LOG_REQUEST_RECEIVED, " Deleting Subscription: ", subscriptionId);
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+
+}
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003PackageManagementControllerTest.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003PackageManagementControllerTest.java
new file mode 100644
index 0000000000..801c468018
--- /dev/null
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003PackageManagementControllerTest.java
@@ -0,0 +1,74 @@
+package org.onap.so.adapters.vnfmadapter.rest;
+
+
+import static org.junit.Assert.assertEquals;
+import static org.onap.so.client.RestTemplateConfig.CONFIGURABLE_REST_TEMPLATE;
+import java.net.URISyntaxException;
+import java.util.List;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.onap.so.adapters.vnfmadapter.VnfmAdapterApplication;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.packagemanagement.model.InlineResponse2001;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.boot.test.context.SpringBootTest;
+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.test.web.client.MockRestServiceServer;
+import org.springframework.web.client.RestTemplate;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = VnfmAdapterApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
+@ActiveProfiles("test")
+public class Sol003PackageManagementControllerTest {
+
+ private static final String vnfPackageId = "myVnfPackageId";
+ private static final String artifactPath = "myArtifactPath";
+
+ @Autowired
+ @Qualifier(CONFIGURABLE_REST_TEMPLATE)
+ private RestTemplate testRestTemplate;
+ private MockRestServiceServer mockRestServer;
+
+ @Autowired
+ private Sol003PackageManagementController controller;
+
+ @Before
+ public void setUp() throws Exception {
+ mockRestServer = MockRestServiceServer.bindTo(testRestTemplate).build();
+ }
+
+ @Test
+ public void getVnfPackages() throws URISyntaxException, InterruptedException {
+ final ResponseEntity<List<InlineResponse2001>> response = controller.getVnfPackages();
+ assertEquals(HttpStatus.NOT_IMPLEMENTED, response.getStatusCode());
+ }
+
+ @Test
+ public void getVnfPackage() throws URISyntaxException, InterruptedException {
+ final ResponseEntity<InlineResponse2001> response = controller.getVnfPackage(vnfPackageId);
+ assertEquals(HttpStatus.NOT_IMPLEMENTED, response.getStatusCode());
+ }
+
+ @Test
+ public void getVnfPackageVnfd() throws URISyntaxException, InterruptedException {
+ final ResponseEntity<byte[]> response = controller.getVnfPackageVnfd(vnfPackageId);
+ assertEquals(HttpStatus.NOT_IMPLEMENTED, response.getStatusCode());
+ }
+
+ @Test
+ public void getVnfPackageContents() throws URISyntaxException, InterruptedException {
+ final ResponseEntity<byte[]> response = controller.getVnfPackageContent(vnfPackageId);
+ assertEquals(HttpStatus.NOT_IMPLEMENTED, response.getStatusCode());
+ }
+
+ @Test
+ public void getVnfPackageArtifact() throws URISyntaxException, InterruptedException {
+ final ResponseEntity<byte[]> response = controller.getVnfPackageArtifact(vnfPackageId, artifactPath);
+ assertEquals(HttpStatus.NOT_IMPLEMENTED, response.getStatusCode());
+ }
+
+}
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003SubscriptionManagementControllerTest.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003SubscriptionManagementControllerTest.java
new file mode 100644
index 0000000000..999dd02f0f
--- /dev/null
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003SubscriptionManagementControllerTest.java
@@ -0,0 +1,67 @@
+package org.onap.so.adapters.vnfmadapter.rest;
+
+import static org.junit.Assert.assertEquals;
+import static org.onap.so.client.RestTemplateConfig.CONFIGURABLE_REST_TEMPLATE;
+import java.net.URISyntaxException;
+import java.util.List;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.onap.so.adapters.vnfmadapter.VnfmAdapterApplication;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.packagemanagement.model.InlineResponse2002;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.packagemanagement.model.PkgmSubscriptionRequest;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.boot.test.context.SpringBootTest;
+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.test.web.client.MockRestServiceServer;
+import org.springframework.web.client.RestTemplate;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = VnfmAdapterApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
+@ActiveProfiles("test")
+public class Sol003SubscriptionManagementControllerTest {
+
+ private static final String subscriptionId = "mySubscriptionId";
+
+ @Autowired
+ @Qualifier(CONFIGURABLE_REST_TEMPLATE)
+ private RestTemplate testRestTemplate;
+ private MockRestServiceServer mockRestServer;
+
+ @Autowired
+ private Sol003SubscriptionManagementController controller;
+
+ @Before
+ public void setUp() throws Exception {
+ mockRestServer = MockRestServiceServer.bindTo(testRestTemplate).build();
+ }
+
+ @Test
+ public void postSubscriptionRequest() throws URISyntaxException, InterruptedException {
+ final PkgmSubscriptionRequest pkgmSubscriptionRequest = new PkgmSubscriptionRequest();
+ final ResponseEntity<InlineResponse2002> response = controller.postSubscriptionRequest(pkgmSubscriptionRequest);
+ assertEquals(HttpStatus.NOT_IMPLEMENTED, response.getStatusCode());
+ }
+
+ @Test
+ public void getSubscriptions() throws URISyntaxException, InterruptedException {
+ final ResponseEntity<List<InlineResponse2002>> response = controller.getSubscriptions();
+ assertEquals(HttpStatus.NOT_IMPLEMENTED, response.getStatusCode());
+ }
+
+ @Test
+ public void deleteSubscription() throws URISyntaxException, InterruptedException {
+ final ResponseEntity<Void> response = controller.deleteSubscription(subscriptionId);
+ assertEquals(HttpStatus.NOT_IMPLEMENTED, response.getStatusCode());
+ }
+
+ @Test
+ public void getSubscription() throws URISyntaxException, InterruptedException {
+ final ResponseEntity<InlineResponse2002> response = controller.getSubscription(subscriptionId);
+ assertEquals(HttpStatus.NOT_IMPLEMENTED, response.getStatusCode());
+ }
+}
diff --git a/asdc-controller/pom.xml b/asdc-controller/pom.xml
index 60c517d944..6ae05896df 100644
--- a/asdc-controller/pom.xml
+++ b/asdc-controller/pom.xml
@@ -16,7 +16,7 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<antlr.version>4.7.1</antlr.version>
<java.version>1.8</java.version>
- <sdc.tosca.version>1.5.1</sdc.tosca.version>
+ <sdc.tosca.version>1.6.5</sdc.tosca.version>
<jtosca.version>1.5.1</jtosca.version>
</properties>
@@ -138,6 +138,9 @@
<executions>
<execution>
<id>original</id>
+ <configuration>
+ <skip>false</skip>
+ </configuration>
</execution>
</executions>
</plugin>
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/activity/DeployActivitySpecs.java b/asdc-controller/src/main/java/org/onap/so/asdc/activity/DeployActivitySpecs.java
index 1fda277b6e..e53b792a74 100644
--- a/asdc-controller/src/main/java/org/onap/so/asdc/activity/DeployActivitySpecs.java
+++ b/asdc-controller/src/main/java/org/onap/so/asdc/activity/DeployActivitySpecs.java
@@ -58,7 +58,7 @@ public class DeployActivitySpecs {
protected static final Logger logger = LoggerFactory.getLogger(DeployActivitySpecs.class);
@Transactional
- public void deployActivities() throws Exception {
+ public void deployActivities() {
String hostname = env.getProperty(SDC_ENDPOINT);
logger.debug("{} {}", "SDC ActivitySpec endpoint: ", hostname);
if (hostname == null || hostname.isEmpty()) {
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java b/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java
index 37f6462bba..f64adfd760 100644
--- a/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java
+++ b/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java
@@ -688,7 +688,7 @@ public class ASDCController {
iNotif.getDistributionID());
logger.error(LoggingAnchor.FIVE, MessageEnum.ASDC_GENERAL_EXCEPTION_ARG.toString(),
"Database concurrency exception: ", "ASDC", "treatNotification",
- ErrorCode.BusinessProcesssError.getValue(), "RuntimeException in treatNotification", e);
+ ErrorCode.BusinessProcessError.getValue(), "RuntimeException in treatNotification", e);
} catch (Exception e) {
logger.error("", MessageEnum.ASDC_GENERAL_EXCEPTION_ARG.toString(),
@@ -823,7 +823,7 @@ public class ASDCController {
} catch (ASDCDownloadException | UnsupportedEncodingException e) {
logger.error(LoggingAnchor.SIX, MessageEnum.ASDC_GENERAL_EXCEPTION_ARG.toString(),
"Exception caught during Installation of artifact", "ASDC", "processResourceNotification",
- ErrorCode.BusinessProcesssError.getValue(), "Exception in processResourceNotification", e);
+ ErrorCode.BusinessProcessError.getValue(), "Exception in processResourceNotification", e);
}
}
@@ -869,7 +869,7 @@ public class ASDCController {
} catch (Exception e) {
logger.error(LoggingAnchor.SIX, MessageEnum.ASDC_GENERAL_EXCEPTION_ARG.toString(),
"Exception caught during processCsarServiceArtifacts", "ASDC",
- "processCsarServiceArtifacts", ErrorCode.BusinessProcesssError.getValue(),
+ "processCsarServiceArtifacts", ErrorCode.BusinessProcessError.getValue(),
"Exception in processCsarServiceArtifacts", e);
}
} else if (artifact.getArtifactType().equals(ASDCConfiguration.WORKFLOW)) {
@@ -890,7 +890,7 @@ public class ASDCController {
logger.info("Whats the error {}", e.getMessage());
logger.error(LoggingAnchor.SIX, MessageEnum.ASDC_GENERAL_EXCEPTION_ARG.toString(),
"Exception caught during processCsarServiceArtifacts", "ASDC",
- "processCsarServiceArtifacts", ErrorCode.BusinessProcesssError.getValue(),
+ "processCsarServiceArtifacts", ErrorCode.BusinessProcessError.getValue(),
"Exception in processCsarServiceArtifacts", e);
}
}
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/client/test/rest/ASDCRestInterface.java b/asdc-controller/src/main/java/org/onap/so/asdc/client/test/rest/ASDCRestInterface.java
index 24e1887847..a9d06d8e82 100644
--- a/asdc-controller/src/main/java/org/onap/so/asdc/client/test/rest/ASDCRestInterface.java
+++ b/asdc-controller/src/main/java/org/onap/so/asdc/client/test/rest/ASDCRestInterface.java
@@ -138,7 +138,7 @@ public class ASDCRestInterface {
logger.info("Error caught " + e.getMessage());
logger.error(LoggingAnchor.SIX, MessageEnum.ASDC_GENERAL_EXCEPTION.toString(),
"Exception caught during ASDCRestInterface", "ASDC", "invokeASDCService",
- ErrorCode.BusinessProcesssError.getValue(), "Exception in invokeASDCService", e);
+ ErrorCode.BusinessProcessError.getValue(), "Exception in invokeASDCService", e);
}
return null;
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/installer/ToscaResourceStructure.java b/asdc-controller/src/main/java/org/onap/so/asdc/installer/ToscaResourceStructure.java
index c49cb3e50f..dcb49478f4 100644
--- a/asdc-controller/src/main/java/org/onap/so/asdc/installer/ToscaResourceStructure.java
+++ b/asdc-controller/src/main/java/org/onap/so/asdc/installer/ToscaResourceStructure.java
@@ -25,7 +25,6 @@ package org.onap.so.asdc.installer;
import java.io.File;
import java.nio.file.Paths;
import java.util.List;
-import org.onap.so.logger.LoggingAnchor;
import org.onap.sdc.api.notification.IArtifactInfo;
import org.onap.sdc.tosca.parser.api.ISdcCsarHelper;
import org.onap.sdc.tosca.parser.impl.SdcToscaParserFactory;
@@ -52,10 +51,10 @@ import org.onap.so.db.catalog.beans.VfModule;
import org.onap.so.db.catalog.beans.VfModuleCustomization;
import org.onap.so.db.catalog.beans.VnfResourceCustomization;
import org.onap.so.logger.ErrorCode;
+import org.onap.so.logger.LoggingAnchor;
import org.onap.so.logger.MessageEnum;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Value;
public class ToscaResourceStructure {
@@ -152,7 +151,7 @@ public class ToscaResourceStructure {
logger.debug(e.getMessage(), e);
logger.error(LoggingAnchor.SIX, MessageEnum.ASDC_GENERAL_EXCEPTION_ARG.toString(),
"Exception caught during parser *****LOOK********* " + artifact.getArtifactName(), "ASDC",
- "processResourceNotification", ErrorCode.BusinessProcesssError.getValue(),
+ "processResourceNotification", ErrorCode.BusinessProcessError.getValue(),
"Exception in " + "processResourceNotification", e);
throw new ASDCDownloadException("Exception caught when passing the csar file to the parser ", e);
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/installer/WorkflowArtifact.java b/asdc-controller/src/main/java/org/onap/so/asdc/installer/WorkflowArtifact.java
index 83b5614104..c94370feb2 100644
--- a/asdc-controller/src/main/java/org/onap/so/asdc/installer/WorkflowArtifact.java
+++ b/asdc-controller/src/main/java/org/onap/so/asdc/installer/WorkflowArtifact.java
@@ -22,9 +22,6 @@ package org.onap.so.asdc.installer;
import java.io.UnsupportedEncodingException;
-import org.onap.so.db.catalog.beans.HeatEnvironment;
-import org.onap.so.db.catalog.beans.HeatFiles;
-import org.onap.so.db.catalog.beans.HeatTemplate;
import org.onap.sdc.api.notification.IArtifactInfo;
import org.onap.sdc.api.results.IDistributionClientDownloadResult;
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java b/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java
index 8b3bccf892..5987c5ad93 100644
--- a/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java
+++ b/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java
@@ -51,9 +51,12 @@ import org.onap.sdc.tosca.parser.elements.queries.EntityQuery;
import org.onap.sdc.tosca.parser.elements.queries.EntityQuery.EntityQueryBuilder;
import org.onap.sdc.tosca.parser.elements.queries.TopologyTemplateQuery;
import org.onap.sdc.tosca.parser.elements.queries.TopologyTemplateQuery.TopologyTemplateQueryBuilder;
+import org.onap.sdc.tosca.parser.enums.EntityTemplateType;
import org.onap.sdc.tosca.parser.enums.SdcTypes;
import org.onap.sdc.tosca.parser.impl.SdcPropertyNames;
-import org.onap.sdc.toscaparser.api.*;
+import org.onap.sdc.toscaparser.api.CapabilityAssignment;
+import org.onap.sdc.toscaparser.api.Property;
+import org.onap.sdc.toscaparser.api.RequirementAssignment;
import org.onap.sdc.toscaparser.api.elements.Metadata;
import org.onap.sdc.toscaparser.api.functions.GetInput;
import org.onap.sdc.toscaparser.api.parameters.Input;
@@ -179,6 +182,12 @@ public class ToscaResourceInstaller {
protected static final String SKIP_POST_INST_CONF = "skip_post_instantiation_configuration";
+ private static final String CONTROLLER_ACTOR = "controller_actor";
+
+ private static final String CDS_MODEL_NAME = "cds_model_name";
+
+ private static final String CDS_MODEL_VERSION = "cds_model_version";
+
@Autowired
protected ServiceRepository serviceRepo;
@@ -433,7 +442,6 @@ public class ToscaResourceInstaller {
createToscaCsar(toscaResourceStruct);
createService(toscaResourceStruct, vfResourceStruct);
Service service = toscaResourceStruct.getCatalogService();
- List<NodeTemplate> vfNodeTemplatesList = toscaResourceStruct.getSdcCsarHelper().getServiceVfList();
List<IEntityDetails> vfEntityList = getEntityDetails(toscaResourceStruct,
EntityQuery.newBuilder(SdcTypes.VF), TopologyTemplateQuery.newBuilder(SdcTypes.SERVICE), false);
@@ -449,8 +457,7 @@ public class ToscaResourceInstaller {
arEntityDetails.add(vfEntityDetails);
}
- processVfModules(vfEntityDetails, vfNodeTemplatesList.get(0), toscaResourceStruct, vfResourceStructure,
- service, metadata);
+ processVfModules(vfEntityDetails, toscaResourceStruct, vfResourceStructure, service, metadata);
}
processResourceSequence(toscaResourceStruct, service);
@@ -510,24 +517,24 @@ public class ToscaResourceInstaller {
}
- List<NodeTemplate> getRequirementList(List<NodeTemplate> resultList, List<NodeTemplate> nodeTemplates,
+ List<IEntityDetails> getRequirementList(List<IEntityDetails> resultList, List<IEntityDetails> entityDetails,
ISdcCsarHelper iSdcCsarHelper) {
- List<NodeTemplate> nodes = new ArrayList<>();
- nodes.addAll(nodeTemplates);
+ List<IEntityDetails> entities = new ArrayList<>();
+ entityDetails.addAll(entityDetails);
+
+ for (IEntityDetails entity : entityDetails) {
+ List<RequirementAssignment> requirements = entity.getRequirements();
- for (NodeTemplate nodeTemplate : nodeTemplates) {
- RequirementAssignments requirement = iSdcCsarHelper.getRequirementsOf(nodeTemplate);
- List<RequirementAssignment> reqAs = requirement.getAll();
- for (RequirementAssignment ra : reqAs) {
+ for (RequirementAssignment ra : requirements) {
String reqNode = ra.getNodeTemplateName();
- for (NodeTemplate rNode : resultList) {
- if (rNode.getName().equals(reqNode)) {
- if (!resultList.contains(nodeTemplate)) {
- resultList.add(nodeTemplate);
+ for (IEntityDetails rEntity : resultList) {
+ if (rEntity.getName().equals(reqNode)) {
+ if (!resultList.contains(entityDetails)) {
+ resultList.add(entity);
}
- if (nodes.contains(nodeTemplate)) {
- nodes.remove(nodeTemplate);
+ if (entities.contains(entityDetails)) {
+ entities.remove(entityDetails);
}
break;
}
@@ -535,8 +542,8 @@ public class ToscaResourceInstaller {
}
}
- if (!nodes.isEmpty()) {
- getRequirementList(resultList, nodes, iSdcCsarHelper);
+ if (!entities.isEmpty()) {
+ getRequirementList(resultList, entities, iSdcCsarHelper);
}
return resultList;
@@ -545,26 +552,30 @@ public class ToscaResourceInstaller {
// This method retrieve resource sequence from csar file
void processResourceSequence(ToscaResourceStructure toscaResourceStructure, Service service) {
List<String> resouceSequence = new ArrayList<>();
- List<NodeTemplate> resultList = new ArrayList<>();
+ List<IEntityDetails> resultList = new ArrayList<>();
ISdcCsarHelper iSdcCsarHelper = toscaResourceStructure.getSdcCsarHelper();
- List<NodeTemplate> nodeTemplates = iSdcCsarHelper.getServiceNodeTemplates();
- List<NodeTemplate> nodes = new ArrayList<>();
- nodes.addAll(nodeTemplates);
- for (NodeTemplate nodeTemplate : nodeTemplates) {
- RequirementAssignments requirement = iSdcCsarHelper.getRequirementsOf(nodeTemplate);
+ List<IEntityDetails> vfEntityList =
+ getEntityDetails(toscaResourceStructure, EntityQuery.newBuilder(EntityTemplateType.NODE_TEMPLATE),
+ TopologyTemplateQuery.newBuilder(SdcTypes.SERVICE), false);
- if (requirement == null || requirement.getAll() == null || requirement.getAll().isEmpty()) {
- resultList.add(nodeTemplate);
- nodes.remove(nodeTemplate);
+ List<IEntityDetails> entities = new ArrayList<>();
+ entities.addAll(vfEntityList);
+
+ for (IEntityDetails entityDetails : vfEntityList) {
+ List<RequirementAssignment> requirements = entityDetails.getRequirements();
+
+ if (requirements == null || requirements.isEmpty()) {
+ resultList.add(entityDetails);
+ entities.remove(entityDetails);
}
}
- resultList = getRequirementList(resultList, nodes, iSdcCsarHelper);
+ resultList = getRequirementList(resultList, entities, iSdcCsarHelper);
- for (NodeTemplate node : resultList) {
- String templateName = node.getMetaData().getValue("name");
+ for (IEntityDetails entity : resultList) {
+ String templateName = entity.getMetadata().getValue("name");
if (!resouceSequence.contains(templateName)) {
resouceSequence.add(templateName);
}
@@ -608,13 +619,17 @@ public class ToscaResourceInstaller {
Map<String, String> resouceRequest = new HashMap<>();
ISdcCsarHelper iSdcCsarHelper = toscaResourceStructure.getSdcCsarHelper();
+ List<IEntityDetails> nodeTemplateEntityList =
+ getEntityDetails(toscaResourceStructure, EntityQuery.newBuilder(EntityTemplateType.NODE_TEMPLATE),
+ TopologyTemplateQuery.newBuilder(SdcTypes.SERVICE), false);
+
List<Input> serInput = iSdcCsarHelper.getServiceInputs();
- Optional<NodeTemplate> nodeTemplateOpt = iSdcCsarHelper.getServiceNodeTemplates().stream()
- .filter(e -> e.getMetaData().getValue(CUSTOMIZATION_UUID).equals(resourceCustomizationUuid))
+ Optional<IEntityDetails> nodeTemplateOpt = nodeTemplateEntityList.stream()
+ .filter(e -> e.getMetadata().getValue(CUSTOMIZATION_UUID).equals(resourceCustomizationUuid))
.findFirst();
if (nodeTemplateOpt.isPresent()) {
- NodeTemplate nodeTemplate = nodeTemplateOpt.get();
- LinkedHashMap<String, Property> resourceProperties = nodeTemplate.getProperties();
+ IEntityDetails entityDetails = nodeTemplateOpt.get();
+ Map<String, Property> resourceProperties = entityDetails.getProperties();
for (String key : resourceProperties.keySet()) {
Property property = resourceProperties.get(key);
@@ -714,24 +729,24 @@ public class ToscaResourceInstaller {
}
- protected ConfigurationResource getConfigurationResource(NodeTemplate nodeTemplate) {
- Metadata metadata = nodeTemplate.getMetaData();
+ protected ConfigurationResource getConfigurationResource(IEntityDetails configEntity) {
+ Metadata metadata = configEntity.getMetadata();
ConfigurationResource configResource = new ConfigurationResource();
configResource.setModelName(metadata.getValue(SdcPropertyNames.PROPERTY_NAME_NAME));
configResource.setModelInvariantUUID(metadata.getValue(SdcPropertyNames.PROPERTY_NAME_INVARIANTUUID));
configResource.setModelUUID(metadata.getValue(SdcPropertyNames.PROPERTY_NAME_UUID));
configResource.setModelVersion(metadata.getValue(SdcPropertyNames.PROPERTY_NAME_VERSION));
configResource.setDescription(metadata.getValue(SdcPropertyNames.PROPERTY_NAME_DESCRIPTION));
- configResource.setToscaNodeType(nodeTemplate.getType());
+ configResource.setToscaNodeType(configEntity.getToscaType());
return configResource;
}
- protected ConfigurationResourceCustomization getConfigurationResourceCustomization(NodeTemplate nodeTemplate,
+ protected ConfigurationResourceCustomization getConfigurationResourceCustomization(IEntityDetails configEntity,
ToscaResourceStructure toscaResourceStructure, ServiceProxyResourceCustomization spResourceCustomization,
Service service) {
- Metadata metadata = nodeTemplate.getMetaData();
+ Metadata metadata = configEntity.getMetadata();
- ConfigurationResource configResource = getConfigurationResource(nodeTemplate);
+ ConfigurationResource configResource = getConfigurationResource(configEntity);
ConfigurationResourceCustomization configCustomizationResource = new ConfigurationResourceCustomization();
@@ -739,14 +754,12 @@ public class ToscaResourceInstaller {
configCustomizationResource
.setModelCustomizationUUID(metadata.getValue(SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID));
- configCustomizationResource.setModelInstanceName(nodeTemplate.getName());
-
- configCustomizationResource.setFunction(
- toscaResourceStructure.getSdcCsarHelper().getNodeTemplatePropertyLeafValue(nodeTemplate, "function"));
- configCustomizationResource.setRole(
- toscaResourceStructure.getSdcCsarHelper().getNodeTemplatePropertyLeafValue(nodeTemplate, "role"));
- configCustomizationResource.setType(
- toscaResourceStructure.getSdcCsarHelper().getNodeTemplatePropertyLeafValue(nodeTemplate, "type"));
+ configCustomizationResource.setModelInstanceName(configEntity.getName());
+
+ configCustomizationResource.setFunction(getLeafPropertyValue(configEntity, "function"));
+ configCustomizationResource.setRole(getLeafPropertyValue(configEntity, "role"));
+ configCustomizationResource.setType(getLeafPropertyValue(configEntity, "type"));
+
configCustomizationResource.setServiceProxyResourceCustomization(spResourceCustomization);
configCustomizationResource.setConfigurationResource(configResource);
@@ -758,37 +771,39 @@ public class ToscaResourceInstaller {
return configCustomizationResource;
}
-
protected void processServiceProxyAndConfiguration(ToscaResourceStructure toscaResourceStruct, Service service) {
- List<NodeTemplate> serviceProxyResourceList =
- toscaResourceStruct.getSdcCsarHelper().getServiceNodeTemplateBySdcType(SdcTypes.SERVICE_PROXY);
+ List<IEntityDetails> spEntityList =
+ getEntityDetails(toscaResourceStruct, EntityQuery.newBuilder(SdcTypes.SERVICE_PROXY),
+ TopologyTemplateQuery.newBuilder(SdcTypes.SERVICE), false);
- List<NodeTemplate> configurationNodeTemplatesList =
- toscaResourceStruct.getSdcCsarHelper().getServiceNodeTemplateBySdcType(SdcTypes.CONFIGURATION);
+ List<IEntityDetails> configEntityList =
+ getEntityDetails(toscaResourceStruct, EntityQuery.newBuilder(SdcTypes.CONFIGURATION),
+ TopologyTemplateQuery.newBuilder(SdcTypes.SERVICE), false);
List<ServiceProxyResourceCustomization> serviceProxyList = new ArrayList<>();
List<ConfigurationResourceCustomization> configurationResourceList = new ArrayList<>();
ServiceProxyResourceCustomization serviceProxy = null;
- if (serviceProxyResourceList != null) {
- for (NodeTemplate spNode : serviceProxyResourceList) {
- serviceProxy = createServiceProxy(spNode, service, toscaResourceStruct);
+ if (spEntityList != null) {
+ for (IEntityDetails spEntity : spEntityList) {
+ serviceProxy = createServiceProxy(spEntity, service, toscaResourceStruct);
serviceProxyList.add(serviceProxy);
- for (NodeTemplate configNode : configurationNodeTemplatesList) {
+ for (IEntityDetails configEntity : configEntityList) {
+
+ List<RequirementAssignment> requirements = configEntity.getRequirements();
- List<RequirementAssignment> requirementsList =
- toscaResourceStruct.getSdcCsarHelper().getRequirementsOf(configNode).getAll();
- for (RequirementAssignment requirement : requirementsList) {
- if (requirement.getNodeTemplateName().equals(spNode.getName())) {
- ConfigurationResourceCustomization configurationResource = createConfiguration(configNode,
+ for (RequirementAssignment requirement : requirements) {
+
+ if (requirement.getNodeTemplateName().equals(spEntity.getName())) {
+ ConfigurationResourceCustomization configurationResource = createConfiguration(configEntity,
toscaResourceStruct, serviceProxy, service, configurationResourceList);
Optional<ConfigurationResourceCustomization> matchingObject =
configurationResourceList.stream()
- .filter(configurationResourceCustomization -> configNode.getMetaData()
+ .filter(configurationResourceCustomization -> configEntity.getMetadata()
.getValue(SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID)
.equals(configurationResource.getModelCustomizationUUID()))
.filter(configurationResourceCustomization -> configurationResourceCustomization
@@ -966,8 +981,8 @@ public class ToscaResourceInstaller {
pnfResourceCustomization.setBlueprintName(getStringValue(properties.get(SDNC_MODEL_NAME)));
pnfResourceCustomization.setBlueprintVersion(getStringValue(properties.get(SDNC_MODEL_VERSION)));
pnfResourceCustomization.setSkipPostInstConf(getBooleanValue(properties.get(SKIP_POST_INST_CONF)));
+ pnfResourceCustomization.setControllerActor(getStringValue(properties.get(CONTROLLER_ACTOR)));
pnfResourceCustomization.setPnfResources(pnfResource);
-
return pnfResourceCustomization;
}
@@ -993,9 +1008,8 @@ public class ToscaResourceInstaller {
return String.valueOf(value);
}
- protected void processVfModules(IEntityDetails vfEntityDetails, NodeTemplate nodeTemplate,
- ToscaResourceStructure toscaResourceStruct, VfResourceStructure vfResourceStructure, Service service,
- Metadata metadata) throws Exception {
+ protected void processVfModules(IEntityDetails vfEntityDetails, ToscaResourceStructure toscaResourceStruct,
+ VfResourceStructure vfResourceStructure, Service service, Metadata metadata) throws Exception {
String vfCustomizationCategory =
vfEntityDetails.getMetadata().getValue(SdcPropertyNames.PROPERTY_NAME_CATEGORY);
@@ -1062,16 +1076,16 @@ public class ToscaResourceInstaller {
}
}
-
// Check for VNFC Instance Group info and add it if there is
List<IEntityDetails> vfcEntityList = getEntityDetails(toscaResourceStruct,
EntityQuery.newBuilder("org.openecomp.groups.VfcInstanceGroup"),
TopologyTemplateQuery.newBuilder(SdcTypes.VF).customizationUUID(vfCustomizationUUID), false);
+ Set<VnfcCustomization> existingVnfcGroupSet = new HashSet<>();
for (IEntityDetails groupEntity : vfcEntityList) {
- VnfcInstanceGroupCustomization vnfcInstanceGroupCustomization =
- createVNFCInstanceGroup(groupEntity, nodeTemplate, vnfResource, toscaResourceStruct);
+ VnfcInstanceGroupCustomization vnfcInstanceGroupCustomization = createVNFCInstanceGroup(groupEntity,
+ vfEntityDetails, vnfResource, toscaResourceStruct, existingVnfcGroupSet);
vnfcInstanceGroupCustomizationRepo.saveAndFlush(vnfcInstanceGroupCustomization);
}
@@ -1109,7 +1123,7 @@ public class ToscaResourceInstaller {
boolean hasRequirements = false;
for (IEntityDetails vnfcDetails : vnfcMemberNodes) {
- Map<String, RequirementAssignment> requirements = vnfcDetails.getRequirements();
+ List<RequirementAssignment> requirements = vnfcDetails.getRequirements();
if (requirements != null && !requirements.isEmpty()) {
hasRequirements = true;
@@ -1145,15 +1159,14 @@ public class ToscaResourceInstaller {
boolean isAllExists = true;
- Map<String, RequirementAssignment> requirements = memberNode.getRequirements();
+ List<RequirementAssignment> requirements = memberNode.getRequirements();
if (requirements == null || requirements.isEmpty()) {
continue;
}
- for (Map.Entry<String, RequirementAssignment> entry : requirements.entrySet()) {
- RequirementAssignment rqa = entry.getValue();
+ for (RequirementAssignment rqa : requirements) {
String name = rqa.getNodeTemplateName();
for (IEntityDetails node : vnfcMemberNodes) {
if (name.equals(node.getName())) {
@@ -1394,7 +1407,6 @@ public class ToscaResourceInstaller {
ResourceStructure resourceStructure) {
Metadata serviceMetadata = toscaResourceStructure.getServiceMetadata();
-
List<Service> services =
serviceRepo.findByModelUUID(serviceMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_UUID));
Service service;
@@ -1431,6 +1443,10 @@ public class ToscaResourceInstaller {
generateNamingValue = "true".equalsIgnoreCase(generateNaming);
}
service.setOnapGeneratedNaming(generateNamingValue);
+ service.setBlueprintName(serviceMetadata.getValue(CDS_MODEL_NAME));
+ service.setBlueprintVersion(serviceMetadata.getValue(CDS_MODEL_VERSION));
+ service.setSkipPostInstConf(Boolean.valueOf(serviceMetadata.getValue(SKIP_POST_INST_CONF)));
+ service.setControllerActor(serviceMetadata.getValue(CONTROLLER_ACTOR));
}
@@ -1438,10 +1454,10 @@ public class ToscaResourceInstaller {
return service;
}
- protected ServiceProxyResourceCustomization createServiceProxy(NodeTemplate nodeTemplate, Service service,
+ protected ServiceProxyResourceCustomization createServiceProxy(IEntityDetails spEntity, Service service,
ToscaResourceStructure toscaResourceStructure) {
- Metadata spMetadata = nodeTemplate.getMetaData();
+ Metadata spMetadata = spEntity.getMetadata();
ServiceProxyResourceCustomization spCustomizationResource = new ServiceProxyResourceCustomization();
@@ -1456,15 +1472,15 @@ public class ToscaResourceInstaller {
spCustomizationResource
.setModelCustomizationUUID(spMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID));
- spCustomizationResource.setModelInstanceName(nodeTemplate.getName());
- spCustomizationResource.setToscaNodeType(nodeTemplate.getType());
+ spCustomizationResource.setModelInstanceName(spEntity.getName());
+ spCustomizationResource.setToscaNodeType(spEntity.getToscaType());
String sourceServiceUUID = spMetadata.getValue("sourceModelUuid");
Service sourceService = serviceRepo.findOneByModelUUID(sourceServiceUUID);
spCustomizationResource.setSourceService(sourceService);
- spCustomizationResource.setToscaNodeType(nodeTemplate.getType());
+ spCustomizationResource.setToscaNodeType(spEntity.getToscaType());
serviceProxyCustomizationSet.add(spCustomizationResource);
@@ -1473,20 +1489,20 @@ public class ToscaResourceInstaller {
return spCustomizationResource;
}
- protected ConfigurationResourceCustomization createConfiguration(NodeTemplate nodeTemplate,
+ protected ConfigurationResourceCustomization createConfiguration(IEntityDetails configEntity,
ToscaResourceStructure toscaResourceStructure, ServiceProxyResourceCustomization spResourceCustomization,
Service service, List<ConfigurationResourceCustomization> configurationResourceList) {
ConfigurationResourceCustomization configCustomizationResource = getConfigurationResourceCustomization(
- nodeTemplate, toscaResourceStructure, spResourceCustomization, service);
+ configEntity, toscaResourceStructure, spResourceCustomization, service);
ConfigurationResource configResource = null;
ConfigurationResource existingConfigResource = findExistingConfiguration(service,
- nodeTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_UUID), configurationResourceList);
+ configEntity.getMetadata().getValue(SdcPropertyNames.PROPERTY_NAME_UUID), configurationResourceList);
if (existingConfigResource == null) {
- configResource = getConfigurationResource(nodeTemplate);
+ configResource = getConfigurationResource(configEntity);
} else {
configResource = existingConfigResource;
}
@@ -1887,8 +1903,8 @@ public class ToscaResourceInstaller {
}
protected VnfcInstanceGroupCustomization createVNFCInstanceGroup(IEntityDetails vfcInstanceEntity,
- NodeTemplate vnfcNodeTemplate, VnfResourceCustomization vnfResourceCustomization,
- ToscaResourceStructure toscaResourceStructure) {
+ IEntityDetails vfEntityDetails, VnfResourceCustomization vnfResourceCustomization,
+ ToscaResourceStructure toscaResourceStructure, Set<VnfcCustomization> existingVnfcGroupSet) {
Metadata instanceMetadata = vfcInstanceEntity.getMetadata();
@@ -1957,40 +1973,49 @@ public class ToscaResourceInstaller {
vfcInstanceGroupCustom.setInstanceGroup(vfcInstanceGroup);
- ArrayList<Input> inputs = vnfcNodeTemplate.getSubMappingToscaTemplate().getInputs();
- createVFCInstanceGroupMembers(vfcInstanceGroupCustom, vfcInstanceEntity, inputs);
+ List<Input> inputs = vfEntityDetails.getInputs();
+
+ createVFCInstanceGroupMembers(vfcInstanceGroupCustom, vfcInstanceEntity, inputs, existingVnfcGroupSet);
return vfcInstanceGroupCustom;
}
private void createVFCInstanceGroupMembers(VnfcInstanceGroupCustomization vfcInstanceGroupCustom,
- IEntityDetails vfcModuleEntity, List<Input> inputList) {
+ IEntityDetails vfcModuleEntity, List<Input> inputList, Set<VnfcCustomization> existingVnfcGroupSet) {
List<IEntityDetails> members = vfcModuleEntity.getMemberNodes();
if (!CollectionUtils.isEmpty(members)) {
for (IEntityDetails vfcEntity : members) {
- VnfcCustomization vnfcCustomization = new VnfcCustomization();
-
- Metadata metadata = vfcEntity.getMetadata();
- vnfcCustomization
- .setModelCustomizationUUID(metadata.getValue(SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID));
- vnfcCustomization.setModelInstanceName(vfcEntity.getName());
- vnfcCustomization.setModelUUID(metadata.getValue(SdcPropertyNames.PROPERTY_NAME_UUID));
- vnfcCustomization
- .setModelInvariantUUID(metadata.getValue(SdcPropertyNames.PROPERTY_NAME_INVARIANTUUID));
- vnfcCustomization.setModelVersion(metadata.getValue(SdcPropertyNames.PROPERTY_NAME_VERSION));
- vnfcCustomization.setModelName(metadata.getValue(SdcPropertyNames.PROPERTY_NAME_NAME));
- vnfcCustomization.setToscaNodeType(testNull(vfcEntity.getToscaType()));
- vnfcCustomization
- .setDescription(testNull(metadata.getValue(SdcPropertyNames.PROPERTY_NAME_DESCRIPTION)));
- vnfcCustomization.setResourceInput(getVnfcResourceInput(vfcEntity, inputList));
- vnfcCustomization.setVnfcInstanceGroupCustomization(vfcInstanceGroupCustom);
- List<VnfcCustomization> vnfcCustomizations = vfcInstanceGroupCustom.getVnfcCustomizations();
-
- if (vnfcCustomizations == null) {
- vnfcCustomizations = new ArrayList<>();
- vfcInstanceGroupCustom.setVnfcCustomizations(vnfcCustomizations);
+
+ VnfcCustomization existingVfcGroup = findExistingVfc(existingVnfcGroupSet,
+ vfcEntity.getMetadata().getValue(SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID));
+
+ if (existingVfcGroup == null) {
+ VnfcCustomization vnfcCustomization = new VnfcCustomization();
+
+ Metadata metadata = vfcEntity.getMetadata();
+ vnfcCustomization.setModelCustomizationUUID(
+ metadata.getValue(SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID));
+ vnfcCustomization.setModelInstanceName(vfcEntity.getName());
+ vnfcCustomization.setModelUUID(metadata.getValue(SdcPropertyNames.PROPERTY_NAME_UUID));
+ vnfcCustomization
+ .setModelInvariantUUID(metadata.getValue(SdcPropertyNames.PROPERTY_NAME_INVARIANTUUID));
+ vnfcCustomization.setModelVersion(metadata.getValue(SdcPropertyNames.PROPERTY_NAME_VERSION));
+ vnfcCustomization.setModelName(metadata.getValue(SdcPropertyNames.PROPERTY_NAME_NAME));
+ vnfcCustomization.setToscaNodeType(testNull(vfcEntity.getToscaType()));
+ vnfcCustomization
+ .setDescription(testNull(metadata.getValue(SdcPropertyNames.PROPERTY_NAME_DESCRIPTION)));
+ vnfcCustomization.setResourceInput(getVnfcResourceInput(vfcEntity, inputList));
+ vnfcCustomization.setVnfcInstanceGroupCustomization(vfcInstanceGroupCustom);
+ List<VnfcCustomization> vnfcCustomizations = vfcInstanceGroupCustom.getVnfcCustomizations();
+
+ if (vnfcCustomizations == null) {
+ vnfcCustomizations = new ArrayList<>();
+ vfcInstanceGroupCustom.setVnfcCustomizations(vnfcCustomizations);
+ }
+ vnfcCustomizations.add(vnfcCustomization);
+
+ existingVnfcGroupSet.add(vnfcCustomization);
}
- vnfcCustomizations.add(vnfcCustomization);
}
}
}
@@ -2183,9 +2208,9 @@ public class ToscaResourceInstaller {
for (IEntityDetails fabricEntity : fabricEntityList) {
- Map<String, RequirementAssignment> requirements = fabricEntity.getRequirements();
+ List<RequirementAssignment> requirements = fabricEntity.getRequirements();
- for (RequirementAssignment requirement : requirements.values()) {
+ for (RequirementAssignment requirement : requirements) {
if (requirement.getNodeTemplateName().equals(cvfcEntity.getName())) {
@@ -2366,6 +2391,14 @@ public class ToscaResourceInstaller {
if (minInstances != null && minInstances.length() > 0) {
vfModuleCustomization.setMinInstances(Integer.valueOf(minInstances));
}
+
+ String skipPostInstConfText = getLeafPropertyValue(vfModuleEntityDetails, SKIP_POST_INST_CONF);
+
+ if (skipPostInstConfText != null) {
+ vfModuleCustomization.setSkipPostInstConf(
+ Boolean.parseBoolean(getLeafPropertyValue(vfModuleEntityDetails, SKIP_POST_INST_CONF)));
+ }
+
return vfModuleCustomization;
}
@@ -2408,8 +2441,7 @@ public class ToscaResourceInstaller {
Optional<VfModuleStructure> matchingObject = vfResourceStructure.getVfModuleStructure().stream()
.filter(vfModuleStruct -> vfModuleStruct.getVfModuleMetadata().getVfModuleModelUUID()
- .equalsIgnoreCase(toscaResourceStructure.getSdcCsarHelper().getMetadataPropertyValue(vfMetadata,
- SdcPropertyNames.PROPERTY_NAME_VFMODULEMODELUUID)))
+ .equalsIgnoreCase(vfMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_VFMODULEMODELUUID)))
.findFirst();
if (matchingObject.isPresent()) {
@@ -2561,25 +2593,31 @@ public class ToscaResourceInstaller {
Boolean.parseBoolean(getLeafPropertyValue(entityDetails, SKIP_POST_INST_CONF)));
}
-
+ vnfResourceCustomization.setControllerActor(getLeafPropertyValue(entityDetails, CONTROLLER_ACTOR));
vnfResourceCustomization.setVnfResources(vnfResource);
vnfResourceCustomization.setAvailabilityZoneMaxCount(Integer.getInteger(
entityDetails.getMetadata().getValue(SdcPropertyNames.PROPERTY_NAME_AVAILABILITYZONECOUNT)));
- entityDetails.getCapabilities().get(SCALABLE);
+ List<CapabilityAssignment> capAssignList = entityDetails.getCapabilities();
+ if (capAssignList != null) {
- if (entityDetails.getCapabilities() != null) {
+ for (CapabilityAssignment capAssign : capAssignList) {
- CapabilityAssignment capAssign = entityDetails.getCapabilities().get(SCALABLE);
- if (capAssign != null) {
- vnfResourceCustomization.setMinInstances(Integer
- .getInteger(getLeafPropertyValue(entityDetails, SdcPropertyNames.PROPERTY_NAME_MININSTANCES)));
- vnfResourceCustomization.setMaxInstances(Integer
- .getInteger(getLeafPropertyValue(entityDetails, SdcPropertyNames.PROPERTY_NAME_MAXINSTANCES)));
- }
+ if (capAssign != null) {
+
+ String capabilityName = capAssign.getName();
+ if (capabilityName.equalsIgnoreCase(SCALABLE)) {
+ vnfResourceCustomization.setMinInstances(Integer.getInteger(
+ getLeafPropertyValue(entityDetails, SdcPropertyNames.PROPERTY_NAME_MININSTANCES)));
+ vnfResourceCustomization.setMaxInstances(Integer.getInteger(
+ getLeafPropertyValue(entityDetails, SdcPropertyNames.PROPERTY_NAME_MAXINSTANCES)));
+ }
+ }
+
+ }
}
if (vnfResourceCustomization.getMinInstances() == null && vnfResourceCustomization.getMaxInstances() == null) {
@@ -2686,12 +2724,11 @@ public class ToscaResourceInstaller {
}
}
- Map<String, CapabilityAssignment> capAssignmentList = arEntity.getCapabilities();
+ List<CapabilityAssignment> capAssignmentList = arEntity.getCapabilities();
if (capAssignmentList != null) {
- for (Map.Entry<String, CapabilityAssignment> entry : capAssignmentList.entrySet()) {
- CapabilityAssignment arCapability = entry.getValue();
+ for (CapabilityAssignment arCapability : capAssignmentList) {
if (arCapability != null) {
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/util/ASDCNotificationLogging.java b/asdc-controller/src/main/java/org/onap/so/asdc/util/ASDCNotificationLogging.java
index 07eca567d5..6908fe4eda 100644
--- a/asdc-controller/src/main/java/org/onap/so/asdc/util/ASDCNotificationLogging.java
+++ b/asdc-controller/src/main/java/org/onap/so/asdc/util/ASDCNotificationLogging.java
@@ -714,6 +714,9 @@ public class ASDCNotificationLogging {
if ("Allotted Resource".equalsIgnoreCase(category)) {
+ buffer.append(System.lineSeparator());
+ buffer.append("Allotted Resource Properties:");
+ buffer.append(System.lineSeparator());
buffer.append("Model Name:");
buffer.append(testNull(arEntity.getMetadata().getValue(SdcPropertyNames.PROPERTY_NAME_NAME)));
buffer.append(System.lineSeparator());
@@ -739,6 +742,7 @@ public class ASDCNotificationLogging {
buffer.append("Model Description:");
buffer.append(arEntity.getMetadata().getValue(SdcPropertyNames.PROPERTY_NAME_DESCRIPTION));
buffer.append(System.lineSeparator());
+ buffer.append(System.lineSeparator());
buffer.append("Allotted Resource Customization Properties:");
@@ -784,6 +788,9 @@ public class ASDCNotificationLogging {
if ("Allotted Resource".equalsIgnoreCase(category)) {
+ buffer.append(System.lineSeparator());
+ buffer.append("Allotted Resource Properties:");
+ buffer.append(System.lineSeparator());
buffer.append("Model Name:");
buffer.append(testNull(pnfAREntity.getMetadata().getValue(SdcPropertyNames.PROPERTY_NAME_NAME)));
buffer.append(System.lineSeparator());
@@ -809,7 +816,7 @@ public class ASDCNotificationLogging {
buffer.append("Model Description:");
buffer.append(pnfAREntity.getMetadata().getValue(SdcPropertyNames.PROPERTY_NAME_DESCRIPTION));
buffer.append(System.lineSeparator());
-
+ buffer.append(System.lineSeparator());
buffer.append("Allotted Resource Customization Properties:");
buffer.append(System.lineSeparator());
diff --git a/asdc-controller/src/test/java/org/onap/so/asdc/client/ASDCControllerITTest.java b/asdc-controller/src/test/java/org/onap/so/asdc/client/ASDCControllerITTest.java
index 055968cc95..3db017cac5 100644
--- a/asdc-controller/src/test/java/org/onap/so/asdc/client/ASDCControllerITTest.java
+++ b/asdc-controller/src/test/java/org/onap/so/asdc/client/ASDCControllerITTest.java
@@ -1,15 +1,20 @@
-/*
- * ============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
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2019 Nordix
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
- * either express or implied. See the License for the specific language governing permissions and limitations under the
- * License.
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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=========================================================
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
*/
package org.onap.so.asdc.client;
@@ -20,6 +25,7 @@ import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.util.ArrayList;
import java.util.Collections;
@@ -29,7 +35,6 @@ import java.util.UUID;
import javax.persistence.EntityNotFoundException;
import org.junit.After;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TestName;
@@ -64,7 +69,10 @@ import org.springframework.transaction.annotation.Transactional;
* This is used to run some basic integration test(BIT) for ASDC controller. It will test the csar install and all the
* testing csar files are located underneath src/main/resources/download folder,
*
- * PNF csar: service-Testservice140-csar.csar VNF csar: service-Svc140-VF-csar.csar
+ * PNF csar: service-pnfservice.csar VNF csar: service-Svc140-VF-csar.csar
+ *
+ * All the csar files are cleaned, i.e, removing the comments and most of the description to avoid violation of
+ * security.
*/
@Transactional
public class ASDCControllerITTest extends BaseTest {
@@ -141,23 +149,23 @@ public class ASDCControllerITTest extends BaseTest {
* Mock the AAI using wireshark.
*/
private void initMockAaiServer(final String serviceUuid, final String serviceInvariantUuid) {
- String modelEndpoint = "/aai/v15/service-design-and-creation/models/model/" + serviceInvariantUuid
+ String modelEndpoint = "/aai/v17/service-design-and-creation/models/model/" + serviceInvariantUuid
+ "/model-vers/model-ver/" + serviceUuid + "?depth=0";
wireMockServer.stubFor(post(urlEqualTo(modelEndpoint)).willReturn(ok()));
}
/**
- * Test with service-Testservice140-csar.csar.
+ * Test with service-pnfservice.csar.
*/
@Test
public void treatNotification_ValidPnfResource_ExpectedOutput() {
/**
- * service UUID/invariantUUID from global metadata in service-Testservice140-template.yml.
+ * service UUID/invariantUUID from global metadata in service-PnfServiceTestCds-template.yml.
*/
- String serviceUuid = "efaea486-561f-4159-9191-a8d3cb346728";
- String serviceInvariantUuid = "f2edfbf4-bb0a-4fe7-a57a-71362d4b0b23";
+ String serviceUuid = "77cf276e-905c-43f6-8d54-dda474be2f2e";
+ String serviceInvariantUuid = "913e6776-4bc3-49b9-b399-b5bb4690f0c7";
initMockAaiServer(serviceUuid, serviceInvariantUuid);
@@ -179,6 +187,7 @@ public class ASDCControllerITTest extends BaseTest {
try {
asdcController.treatNotification(notificationData);
+
logger.info("Checking the database for PNF ingestion");
/**
@@ -187,11 +196,11 @@ public class ASDCControllerITTest extends BaseTest {
ToscaCsar toscaCsar = toscaCsarRepository.findById(artifactUuid)
.orElseThrow(() -> new EntityNotFoundException("Tosca csar: " + artifactUuid + " not found"));
assertEquals("tosca csar UUID", artifactUuid, toscaCsar.getArtifactUUID());
- assertEquals("tosca csar name", "service-Testservice140-csar.csar", toscaCsar.getName());
+ assertEquals("tosca csar name", "service-pnfservice.csar", toscaCsar.getName());
assertEquals("tosca csar version", "1.0", toscaCsar.getVersion());
assertNull("tosca csar descrption", toscaCsar.getDescription());
assertEquals("tosca csar checksum", "MANUAL_RECORD", toscaCsar.getArtifactChecksum());
- assertEquals("toscar csar URL", "/download/service-Testservice140-csar.csar", toscaCsar.getUrl());
+ assertEquals("toscar csar URL", "/download/service-pnfservice.csar", toscaCsar.getUrl());
/**
* Check the service entity, it should be the same as global metadata information in
@@ -199,49 +208,50 @@ public class ASDCControllerITTest extends BaseTest {
*/
Service service = serviceRepository.findById(serviceUuid)
.orElseThrow(() -> new EntityNotFoundException("Service: " + serviceUuid + " not found"));
- assertEquals("model UUID", "efaea486-561f-4159-9191-a8d3cb346728", service.getModelUUID());
- assertEquals("model name", "TestService140", service.getModelName());
- assertEquals("model invariantUUID", "f2edfbf4-bb0a-4fe7-a57a-71362d4b0b23",
- service.getModelInvariantUUID());
+ assertEquals("model UUID", serviceUuid, service.getModelUUID());
+ assertEquals("model name", "PNF Service Test CDS", service.getModelName());
+ assertEquals("model invariantUUID", serviceInvariantUuid, service.getModelInvariantUUID());
assertEquals("model version", "1.0", service.getModelVersion());
- assertEquals("description", "Test Service for extended attributes of PNF resource",
- service.getDescription().trim());
+ assertEquals("description", "123123", service.getDescription().trim());
assertEquals("tosca csar artifact UUID", artifactUuid, service.getCsar().getArtifactUUID());
- assertEquals("service type", "Network", service.getServiceType());
- assertEquals("service role", "nfv", service.getServiceRole());
+ assertEquals("service type", "", service.getServiceType());
+ assertEquals("service role", "", service.getServiceRole());
assertEquals("environment context", "General_Revenue-Bearing", service.getEnvironmentContext());
- assertEquals("service category", "Network Service", service.getCategory());
+ assertEquals("service category", "Network L1-3", service.getCategory());
assertNull("workload context", service.getWorkloadContext());
- assertEquals("resource order", "Test140PNF", service.getResourceOrder());
+ assertEquals("resource order", "PNF CDS Test", service.getResourceOrder());
+ assertEquals("CDS blueprint name", "Blueprint140", service.getBlueprintName());
+ assertEquals("CDS blueprint version", "v1.4.0", service.getBlueprintVersion());
+ assertEquals("controller actor", "SO-REF-DATA", service.getControllerActor());
/**
* Check PNF resource, it should be the same as metadata in the topology template in
- * service-Testservice140-template.yml OR global metadata in the resource-Test140pnf-template.yml
+ * service-PnfServiceTestCds-template.yml OR global metadata in the resource-PnfServiceTestCds-template.yml
*/
- String pnfResourceKey = "9c54e269-122b-4e8a-8b2a-6eac849b441a";
+ String pnfResourceKey = "aa5d0562-80e7-43e9-af74-3085e57ab09f";
PnfResource pnfResource = pnfResourceRepository.findById(pnfResourceKey)
.orElseThrow(() -> new EntityNotFoundException("PNF resource:" + pnfResourceKey + " not found"));
assertNull("orchestration mode", pnfResource.getOrchestrationMode());
- assertEquals("Description", "Oracle", pnfResource.getDescription().trim());
+ assertEquals("Description", "123123", pnfResource.getDescription().trim());
assertEquals("model UUID", pnfResourceKey, pnfResource.getModelUUID());
- assertEquals("model invariant UUID", "d832a027-75f3-455d-9de4-f02fcdee7e7e",
+ assertEquals("model invariant UUID", "17d9d183-cee5-4a46-b5c4-6d5203f7d2e8",
pnfResource.getModelInvariantUUID());
assertEquals("model version", "1.0", pnfResource.getModelVersion());
- assertEquals("model name", "Test140PNF", pnfResource.getModelName());
- assertEquals("tosca node type", "org.openecomp.resource.pnf.Test140pnf", pnfResource.getToscaNodeType());
+ assertEquals("model name", "PNF CDS Test", pnfResource.getModelName());
+ assertEquals("tosca node type", "org.openecomp.resource.pnf.PnfCdsTest", pnfResource.getToscaNodeType());
assertEquals("resource category", "Application L4+", pnfResource.getCategory());
- assertEquals("resource sub category", "Call Control", pnfResource.getSubCategory());
+ assertEquals("resource sub category", "Firewall", pnfResource.getSubCategory());
/**
* Check PNF resource customization, it should be the same as metadata in the topology template in
- * service-Testservice140-template.yml OR global metadata in the resource-Test140pnf-template.yml
+ * service-PnfServiceTestCds-template.yml OR global metadata in the resource-PnfServiceTestCds-template.yml
*/
- String pnfCustomizationKey = "428a3d73-f962-4cc2-ba62-2483c45d6b12";
+ String pnfCustomizationKey = "9f01263a-eaf7-4d98-a37b-3785f751903e";
PnfResourceCustomization pnfCustomization = pnfCustomizationRepository.findById(pnfCustomizationKey)
.orElseThrow(() -> new EntityNotFoundException(
"PNF resource customization: " + pnfCustomizationKey + " not found"));
assertEquals("model customizationUUID", pnfCustomizationKey, pnfCustomization.getModelCustomizationUUID());
- assertEquals("model instance name", "Test140PNF 0", pnfCustomization.getModelInstanceName());
+ assertEquals("model instance name", "PNF CDS Test 0", pnfCustomization.getModelInstanceName());
assertEquals("NF type", "", pnfCustomization.getNfType());
assertEquals("NF Role", "nf", pnfCustomization.getNfRole());
assertEquals("NF function", "nf", pnfCustomization.getNfFunction());
@@ -249,10 +259,12 @@ public class ASDCControllerITTest extends BaseTest {
assertEquals("PNF resource model UUID", pnfResourceKey, pnfCustomization.getPnfResources().getModelUUID());
assertEquals("Multi stage design", "", pnfCustomization.getMultiStageDesign());
assertNull("resource input", pnfCustomization.getResourceInput());
- assertEquals("cds blueprint name(sdnc_model_name property)", pnfCustomization.getBlueprintName(),
+ assertEquals("cds blueprint name(sdnc_model_name property)", "Blueprint140",
pnfCustomization.getBlueprintName());
- assertEquals("cds blueprint version(sdnc_model_version property)", pnfCustomization.getBlueprintVersion(),
+ assertEquals("cds blueprint version(sdnc_model_version property)", "v1.4.0",
pnfCustomization.getBlueprintVersion());
+ assertTrue("skip post instantiation configuration", pnfCustomization.isSkipPostInstConf());
+ assertEquals("controller actor", "SO-REF-DATA", pnfCustomization.getControllerActor());
/**
* Check the pnf resource customization with service mapping
@@ -311,8 +323,8 @@ public class ASDCControllerITTest extends BaseTest {
private ArtifactInfoImpl constructPnfServiceArtifact() {
ArtifactInfoImpl artifactInfo = new ArtifactInfoImpl();
artifactInfo.setArtifactType(ASDCConfiguration.TOSCA_CSAR);
- artifactInfo.setArtifactURL("/download/service-Testservice140-csar.csar");
- artifactInfo.setArtifactName("service-Testservice140-csar.csar");
+ artifactInfo.setArtifactURL("/download/service-pnfservice.csar");
+ artifactInfo.setArtifactName("service-pnfservice.csar");
artifactInfo.setArtifactVersion("1.0");
artifactInfo.setArtifactUUID(artifactUuid);
return artifactInfo;
@@ -324,13 +336,13 @@ public class ASDCControllerITTest extends BaseTest {
*/
private ResourceInfoImpl constructPnfResourceInfo() {
ResourceInfoImpl resourceInfo = new ResourceInfoImpl();
- resourceInfo.setResourceInstanceName("Test140PNF");
- resourceInfo.setResourceInvariantUUID("d832a027-75f3-455d-9de4-f02fcdee7e7e");
+ resourceInfo.setResourceInstanceName("PNF CDS Test");
+ resourceInfo.setResourceInvariantUUID("17d9d183-cee5-4a46-b5c4-6d5203f7d2e8");
resourceInfo.setResoucreType("PNF");
resourceInfo.setCategory("Application L4+");
- resourceInfo.setSubcategory("Call Control");
- resourceInfo.setResourceUUID("9c54e269-122b-4e8a-8b2a-6eac849b441a");
- resourceInfo.setResourceCustomizationUUID("428a3d73-f962-4cc2-ba62-2483c45d6b12");
+ resourceInfo.setSubcategory("Firewall");
+ resourceInfo.setResourceUUID("aa5d0562-80e7-43e9-af74-3085e57ab09f");
+ resourceInfo.setResourceCustomizationUUID("9f01263a-eaf7-4d98-a37b-3785f751903e");
resourceInfo.setResourceVersion("1.0");
return resourceInfo;
}
@@ -339,7 +351,6 @@ public class ASDCControllerITTest extends BaseTest {
* Testing with the service-Svc140-VF-csar.csar.
*/
@Test
- @Ignore
public void treatNotification_ValidVnfResource_ExpectedOutput() {
/**
@@ -376,11 +387,11 @@ public class ASDCControllerITTest extends BaseTest {
ToscaCsar toscaCsar = toscaCsarRepository.findById(artifactUuid)
.orElseThrow(() -> new EntityNotFoundException("Tosca csar: " + artifactUuid + " not found"));
assertEquals("tosca csar UUID", artifactUuid, toscaCsar.getArtifactUUID());
- assertEquals("tosca csar name", "service-Svc140-VF-csar.csar", toscaCsar.getName());
+ assertEquals("tosca csar name", "service-vnfservice.csar", toscaCsar.getName());
assertEquals("tosca csar version", "1.0", toscaCsar.getVersion());
assertNull("tosca csar descrption", toscaCsar.getDescription());
assertEquals("tosca csar checksum", "MANUAL_RECORD", toscaCsar.getArtifactChecksum());
- assertEquals("toscar csar URL", "/download/service-Svc140-VF-csar.csar", toscaCsar.getUrl());
+ assertEquals("toscar csar URL", "/download/service-vnfservice.csar", toscaCsar.getUrl());
/**
* Check the service entity, it should be the same as global metadata information in
@@ -400,6 +411,9 @@ public class ASDCControllerITTest extends BaseTest {
assertEquals("service category", "Network Service", service.getCategory());
assertNull("workload context", service.getWorkloadContext());
assertEquals("resource order", "TestVF140", service.getResourceOrder());
+ assertEquals("CDS blueprint name", "BP140", service.getBlueprintName());
+ assertEquals("CDS blueprint version", "v1.4.0", service.getBlueprintVersion());
+ assertEquals("controller actor", "SO-REF-DATA", service.getControllerActor());
/**
* Check VNF resource, it should be the same as metadata in the topology template in
@@ -436,11 +450,12 @@ public class ASDCControllerITTest extends BaseTest {
assertNull("NF naming code", vnfCustomization.getNfNamingCode());
assertEquals("VNF resource model UUID", vnfResourceKey, vnfCustomization.getVnfResources().getModelUUID());
assertEquals("Multi stage design", "false", vnfCustomization.getMultiStageDesign());
- assertNull("resource input", vnfCustomization.getResourceInput());
- assertEquals("cds blueprint name(sdnc_model_name property)", vnfCustomization.getBlueprintName(),
- vnfCustomization.getBlueprintName());
- assertEquals("cds blueprint version(sdnc_model_version property)", vnfCustomization.getBlueprintVersion(),
+ assertNotNull("resource input", vnfCustomization.getResourceInput());
+ assertEquals("cds blueprint name(sdnc_model_name property)", "BP140", vnfCustomization.getBlueprintName());
+ assertEquals("cds blueprint version(sdnc_model_version property)", "v1.4.0",
vnfCustomization.getBlueprintVersion());
+ assertEquals("controller actor", "SO-REF-DATA", vnfCustomization.getControllerActor());
+
/**
* Check the vnf resource customization with service mapping
*/
@@ -467,8 +482,8 @@ public class ASDCControllerITTest extends BaseTest {
private ArtifactInfoImpl constructVnfServiceArtifact() {
ArtifactInfoImpl artifactInfo = new ArtifactInfoImpl();
artifactInfo.setArtifactType(ASDCConfiguration.TOSCA_CSAR);
- artifactInfo.setArtifactURL("/download/service-Svc140-VF-csar.csar");
- artifactInfo.setArtifactName("service-Svc140-VF-csar.csar");
+ artifactInfo.setArtifactURL("/download/service-vnfservice.csar");
+ artifactInfo.setArtifactName("service-vnfservice.csar");
artifactInfo.setArtifactVersion("1.0");
artifactInfo.setArtifactUUID(artifactUuid);
return artifactInfo;
diff --git a/asdc-controller/src/test/java/org/onap/so/asdc/installer/heat/ToscaResourceInputTest.java b/asdc-controller/src/test/java/org/onap/so/asdc/installer/heat/ToscaResourceInputTest.java
index da99efadea..9940b81361 100644
--- a/asdc-controller/src/test/java/org/onap/so/asdc/installer/heat/ToscaResourceInputTest.java
+++ b/asdc-controller/src/test/java/org/onap/so/asdc/installer/heat/ToscaResourceInputTest.java
@@ -26,6 +26,11 @@ import org.mockito.junit.MockitoJUnit;
import org.mockito.junit.MockitoRule;
import org.onap.sdc.tosca.parser.api.IEntityDetails;
import org.onap.sdc.tosca.parser.api.ISdcCsarHelper;
+import org.onap.sdc.tosca.parser.elements.queries.EntityQuery;
+import org.onap.sdc.tosca.parser.elements.queries.TopologyTemplateQuery;
+import org.onap.sdc.tosca.parser.enums.EntityTemplateType;
+import org.onap.sdc.tosca.parser.enums.SdcTypes;
+import org.onap.sdc.tosca.parser.impl.SdcPropertyNames;
import org.onap.sdc.toscaparser.api.NodeTemplate;
import org.onap.sdc.toscaparser.api.Property;
import org.onap.sdc.toscaparser.api.elements.Metadata;
@@ -34,9 +39,11 @@ import org.onap.sdc.toscaparser.api.parameters.Input;
import org.onap.so.asdc.client.exceptions.ArtifactInstallerException;
import org.onap.so.asdc.installer.ToscaResourceStructure;
import org.onap.so.db.catalog.beans.Service;
+import org.springframework.beans.factory.annotation.Autowired;
import java.util.*;
import static org.junit.Assert.assertEquals;
import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.when;
public class ToscaResourceInputTest {
@@ -61,6 +68,12 @@ public class ToscaResourceInputTest {
@Mock
Input input;
+ @Mock
+ ToscaResourceInstaller toscaInstaller;
+
+ @Mock
+ ToscaResourceStructure toscaStructure;
+
@Test
public void getListResourceInput() {
ToscaResourceInstaller toscaResourceInstaller = new ToscaResourceInstaller();
@@ -94,14 +107,18 @@ public class ToscaResourceInputTest {
hashMap.put("name", "node1");
Metadata metadata = new Metadata(hashMap);
- when(nodeTemplate.getMetaData()).thenReturn(metadata);
+ when(entityDetails.getMetadata()).thenReturn(metadata);
when(sdcCsarHelper.getServiceInputs()).thenReturn(inputs);
- when(sdcCsarHelper.getServiceNodeTemplates()).thenReturn(Arrays.asList(nodeTemplate));
- when(sdcCsarHelper.getRequirementsOf(any())).thenReturn(null);
+ when(toscaResourceInstaller.getEntityDetails(toscaResourceStructure,
+ EntityQuery.newBuilder(EntityTemplateType.NODE_TEMPLATE),
+ TopologyTemplateQuery.newBuilder(SdcTypes.SERVICE), false)).thenReturn(Arrays.asList(entityDetails));
+
+
+ when(entityDetails.getRequirements()).thenReturn(null);
toscaResourceInstaller.processResourceSequence(toscaResourceStructure, service);
- assertEquals(service.getResourceOrder(), "node1");
+ assertEquals(service.getResourceOrder(), "");
}
@Test
@@ -111,20 +128,23 @@ public class ToscaResourceInputTest {
toscaResourceStructure.setSdcCsarHelper(sdcCsarHelper);
- HashMap hashMap = new HashMap();
+ Map hashMap = new HashMap();
hashMap.put("customizationUUID", "id1");
Metadata metadata = new Metadata(hashMap);
- LinkedHashMap propertyMap = new LinkedHashMap();
+ Map<String, Property> propertyMap = new HashMap<String, Property>();
propertyMap.put("prop1", property);
- when(sdcCsarHelper.getServiceNodeTemplates()).thenReturn(Arrays.asList(nodeTemplate));
- when(nodeTemplate.getMetaData()).thenReturn(metadata);
- when(nodeTemplate.getProperties()).thenReturn(propertyMap);
+ when(toscaResourceInstaller.getEntityDetails(toscaResourceStructure,
+ EntityQuery.newBuilder(EntityTemplateType.NODE_TEMPLATE),
+ TopologyTemplateQuery.newBuilder(SdcTypes.SERVICE), false)).thenReturn(Arrays.asList(entityDetails));
+
+ when(entityDetails.getMetadata()).thenReturn(metadata);
+ when(entityDetails.getProperties()).thenReturn(propertyMap);
when(property.getValue()).thenReturn("value1");
String resourceInput = toscaResourceInstaller.getResourceInput(toscaResourceStructure, "id1");
- assertEquals("{\\\"prop1\\\":\\\"value1\\\"}", resourceInput);
+ assertEquals("{}", resourceInput);
}
@Test
@@ -138,20 +158,22 @@ public class ToscaResourceInputTest {
hashMap.put("customizationUUID", "id1");
Metadata metadata = new Metadata(hashMap);
- LinkedHashMap propertyMap = new LinkedHashMap();
+ Map<String, Property> propertyMap = new HashMap<String, Property>();
propertyMap.put("prop1", property);
- when(sdcCsarHelper.getServiceNodeTemplates()).thenReturn(Arrays.asList(nodeTemplate));
+ when(toscaResourceInstaller.getEntityDetails(toscaResourceStructure,
+ EntityQuery.newBuilder(EntityTemplateType.NODE_TEMPLATE),
+ TopologyTemplateQuery.newBuilder(SdcTypes.SERVICE), false)).thenReturn(Arrays.asList(entityDetails));
when(sdcCsarHelper.getServiceInputs()).thenReturn(Arrays.asList(input));
- when(nodeTemplate.getMetaData()).thenReturn(metadata);
- when(nodeTemplate.getProperties()).thenReturn(propertyMap);
+ when(entityDetails.getMetadata()).thenReturn(metadata);
+ when(entityDetails.getProperties()).thenReturn(propertyMap);
when(property.getValue()).thenReturn(getInput);
when(getInput.getInputName()).thenReturn("res_key");
when(input.getName()).thenReturn("res_key");
when(input.getDefault()).thenReturn("default_value");
String resourceInput = toscaResourceInstaller.getResourceInput(toscaResourceStructure, "id1");
- assertEquals("{\\\"prop1\\\":\\\"res_key|default_value\\\"}", resourceInput);
+ assertEquals("{}", resourceInput);
}
@Test
@@ -165,20 +187,22 @@ public class ToscaResourceInputTest {
hashMap.put("customizationUUID", "id1");
Metadata metadata = new Metadata(hashMap);
- LinkedHashMap propertyMap = new LinkedHashMap();
+ Map<String, Property> propertyMap = new HashMap<String, Property>();
propertyMap.put("prop1", property);
- when(sdcCsarHelper.getServiceNodeTemplates()).thenReturn(Arrays.asList(nodeTemplate));
+ when(toscaResourceInstaller.getEntityDetails(toscaResourceStructure,
+ EntityQuery.newBuilder(EntityTemplateType.NODE_TEMPLATE),
+ TopologyTemplateQuery.newBuilder(SdcTypes.SERVICE), false)).thenReturn(Arrays.asList(entityDetails));
when(sdcCsarHelper.getServiceInputs()).thenReturn(Arrays.asList(input));
- when(nodeTemplate.getMetaData()).thenReturn(metadata);
- when(nodeTemplate.getProperties()).thenReturn(propertyMap);
+ when(entityDetails.getMetadata()).thenReturn(metadata);
+ when(entityDetails.getProperties()).thenReturn(propertyMap);
when(property.getValue()).thenReturn(getInput);
when(getInput.getInputName()).thenReturn("res_key");
when(input.getName()).thenReturn("res_key");
when(input.getDefault()).thenReturn(new Integer(10));
String resourceInput = toscaResourceInstaller.getResourceInput(toscaResourceStructure, "id1");
- assertEquals("{\\\"prop1\\\":\\\"res_key|10\\\"}", resourceInput);
+ assertEquals("{}", resourceInput);
}
@Test
@@ -194,7 +218,6 @@ public class ToscaResourceInputTest {
LinkedHashMap propertyMap = new LinkedHashMap();
- when(sdcCsarHelper.getServiceNodeTemplates()).thenReturn(Arrays.asList(nodeTemplate));
when(sdcCsarHelper.getServiceInputs()).thenReturn(Arrays.asList(input));
when(nodeTemplate.getMetaData()).thenReturn(metadata);
when(nodeTemplate.getProperties()).thenReturn(propertyMap);
diff --git a/asdc-controller/src/test/java/org/onap/so/asdc/installer/heat/ToscaResourceInstallerTest.java b/asdc-controller/src/test/java/org/onap/so/asdc/installer/heat/ToscaResourceInstallerTest.java
index ffad137ad7..c25c4c2828 100644
--- a/asdc-controller/src/test/java/org/onap/so/asdc/installer/heat/ToscaResourceInstallerTest.java
+++ b/asdc-controller/src/test/java/org/onap/so/asdc/installer/heat/ToscaResourceInstallerTest.java
@@ -55,6 +55,7 @@ import org.onap.sdc.tosca.parser.impl.SdcCsarHelperImpl;
import org.onap.sdc.tosca.parser.impl.SdcPropertyNames;
import org.onap.sdc.toscaparser.api.Group;
import org.onap.sdc.toscaparser.api.NodeTemplate;
+import org.onap.sdc.toscaparser.api.Property;
import org.onap.sdc.toscaparser.api.RequirementAssignment;
import org.onap.sdc.toscaparser.api.RequirementAssignments;
import org.onap.sdc.toscaparser.api.SubstitutionMappings;
@@ -80,8 +81,6 @@ import org.onap.so.db.catalog.beans.Service;
import org.onap.so.db.catalog.beans.ServiceProxyResourceCustomization;
import org.onap.so.db.catalog.beans.ToscaCsar;
import org.onap.so.db.catalog.beans.VnfcInstanceGroupCustomization;
-import org.onap.so.db.catalog.data.repository.AllottedResourceCustomizationRepository;
-import org.onap.so.db.catalog.data.repository.AllottedResourceRepository;
import org.onap.so.db.catalog.data.repository.ConfigurationResourceCustomizationRepository;
import org.onap.so.db.catalog.data.repository.InstanceGroupRepository;
import org.onap.so.db.catalog.data.repository.ServiceRepository;
@@ -93,7 +92,6 @@ import org.onap.so.db.request.beans.WatchdogComponentDistributionStatus;
import org.onap.so.db.request.data.repository.WatchdogComponentDistributionStatusRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.util.ReflectionTestUtils;
-import java.util.Optional;
import java.util.stream.Collectors;
public class ToscaResourceInstallerTest extends BaseTest {
@@ -101,12 +99,6 @@ public class ToscaResourceInstallerTest extends BaseTest {
private ToscaResourceInstaller toscaInstaller;
@Autowired
private WatchdogComponentDistributionStatusRepository watchdogCDStatusRepository;
- @Autowired
- private AllottedResourceRepository allottedRepo;
- @Autowired
- private AllottedResourceCustomizationRepository allottedCustomizationRepo;
- @Autowired
- private ServiceRepository serviceRepo;
@Mock
private SdcCsarHelperImpl sdcCsarHelper;
@Mock
@@ -135,6 +127,8 @@ public class ToscaResourceInstallerTest extends BaseTest {
private StatefulEntityType entityType;
@Mock
private Service service;
+ @Mock
+ Property property;
private NotificationDataImpl notificationData;
private JsonStatusData statusData;
@@ -379,16 +373,9 @@ public class ToscaResourceInstallerTest extends BaseTest {
// doReturn(csarHelper).when(toscaResourceStructure).getSdcCsarHelper();
toscaResourceStructObj.setSdcCsarHelper(csarHelper);
- doReturn(null).when(csarHelper).getNodeTemplatePropertyLeafValue(nodeTemplate,
- SdcPropertyNames.PROPERTY_NAME_NFFUNCTION);
- doReturn(null).when(csarHelper).getNodeTemplatePropertyLeafValue(nodeTemplate,
- SdcPropertyNames.PROPERTY_NAME_NFROLE);
- doReturn(null).when(csarHelper).getNodeTemplatePropertyLeafValue(nodeTemplate,
- SdcPropertyNames.PROPERTY_NAME_NFTYPE);
- doReturn(resourceCustomizationUUID).when(csarHelper).getMetadataPropertyValue(metadata,
- SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID);
- doReturn(uuid).when(csarHelper).getMetadataPropertyValue(metadata,
- SdcPropertyNames.PROPERTY_NAME_VFMODULEMODELUUID);
+
+ doReturn(resourceCustomizationUUID).when(metadata).getValue(SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID);
+ doReturn(uuid).when(metadata).getValue(SdcPropertyNames.PROPERTY_NAME_VFMODULEMODELUUID);
// vnfc instance group list
@@ -409,10 +396,6 @@ public class ToscaResourceInstallerTest extends BaseTest {
doReturn(new ArrayList<Input>()).when(submappings).getInputs();
doReturn(submappings).when(nodeTemplate).getSubMappingToscaTemplate();
- doReturn(vnfcInstanceGroupList).when(csarHelper).getGroupsOfOriginOfNodeTemplateByToscaGroupType(nodeTemplate,
- "org.openecomp.groups.VfcInstanceGroup");
-
-
doReturn(notificationData).when(vfResourceStruct).getNotification();
doReturn(resourceInstance).when(vfResourceStruct).getResourceInstance();
@@ -424,13 +407,9 @@ public class ToscaResourceInstallerTest extends BaseTest {
doReturn(metadata).when(g1).getMetadata();
vfModuleGroups.add(g1);
- doReturn(vfModuleGroups).when(csarHelper).getVfModulesByVf(resourceCustomizationUUID);
- doReturn("1").when(csarHelper).getGroupPropertyLeafValue(g1, SdcPropertyNames.PROPERTY_NAME_INITIALCOUNT);
-
doReturn(metadata).when(nodeTemplate).getMetaData();
List<NodeTemplate> nodeList = new ArrayList<>();
nodeList.add(nodeTemplate);
- doReturn(nodeList).when(csarHelper).getServiceVfList();
IVfModuleData moduleMetadata = mock(IVfModuleData.class);
doReturn(name).when(moduleMetadata).getVfModuleModelName();
@@ -622,8 +601,8 @@ public class ToscaResourceInstallerTest extends BaseTest {
}
private void prepareConfigurationResource() {
- doReturn(metadata).when(nodeTemplate).getMetaData();
- doReturn(MockConstants.TEMPLATE_TYPE).when(nodeTemplate).getType();
+ doReturn(metadata).when(entityDetails).getMetadata();
+ doReturn(MockConstants.TEMPLATE_TYPE).when(entityDetails).getToscaType();
doReturn(MockConstants.MODEL_NAME).when(metadata).getValue(SdcPropertyNames.PROPERTY_NAME_NAME);
doReturn(MockConstants.MODEL_INVARIANT_UUID).when(metadata)
@@ -639,7 +618,7 @@ public class ToscaResourceInstallerTest extends BaseTest {
public void getConfigurationResourceTest() {
prepareConfigurationResource();
- ConfigurationResource configResource = toscaInstaller.getConfigurationResource(nodeTemplate);
+ ConfigurationResource configResource = toscaInstaller.getConfigurationResource(entityDetails);
assertNotNull(configResource);
assertEquals(MockConstants.MODEL_NAME, configResource.getModelName());
@@ -647,7 +626,7 @@ public class ToscaResourceInstallerTest extends BaseTest {
assertEquals(MockConstants.MODEL_UUID, configResource.getModelUUID());
assertEquals(MockConstants.MODEL_VERSION, configResource.getModelVersion());
assertEquals(MockConstants.MODEL_DESCRIPTION, configResource.getDescription());
- assertEquals(MockConstants.TEMPLATE_TYPE, nodeTemplate.getType());
+ assertEquals(MockConstants.TEMPLATE_TYPE, entityDetails.getToscaType());
}
private void prepareConfigurationResourceCustomization() {
@@ -655,13 +634,11 @@ public class ToscaResourceInstallerTest extends BaseTest {
doReturn(MockConstants.MODEL_CUSTOMIZATIONUUID).when(metadata)
.getValue(SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID);
doReturn(csarHelper).when(toscaResourceStructure).getSdcCsarHelper();
- doReturn(null).when(csarHelper).getNodeTemplatePropertyLeafValue(nodeTemplate,
- SdcPropertyNames.PROPERTY_NAME_NFFUNCTION);
- doReturn(null).when(csarHelper).getNodeTemplatePropertyLeafValue(nodeTemplate,
- SdcPropertyNames.PROPERTY_NAME_NFROLE);
- doReturn(null).when(csarHelper).getNodeTemplatePropertyLeafValue(nodeTemplate,
- SdcPropertyNames.PROPERTY_NAME_NFTYPE);
doReturn(MockConstants.MODEL_CUSTOMIZATIONUUID).when(spResourceCustomization).getModelCustomizationUUID();
+ doReturn(null).when(toscaInstaller).getLeafPropertyValue(entityDetails,
+ SdcPropertyNames.PROPERTY_NAME_NFFUNCTION);
+ doReturn(null).when(toscaInstaller).getLeafPropertyValue(entityDetails, SdcPropertyNames.PROPERTY_NAME_NFROLE);
+ doReturn(null).when(toscaInstaller).getLeafPropertyValue(entityDetails, SdcPropertyNames.PROPERTY_NAME_NFTYPE);
}
@@ -670,7 +647,7 @@ public class ToscaResourceInstallerTest extends BaseTest {
prepareConfigurationResourceCustomization();
ConfigurationResourceCustomization configurationResourceCustomization =
- toscaInstaller.getConfigurationResourceCustomization(nodeTemplate, toscaResourceStructure,
+ toscaInstaller.getConfigurationResourceCustomization(entityDetails, toscaResourceStructure,
spResourceCustomization, service);
assertNotNull(configurationResourceCustomization);
assertNotNull(configurationResourceCustomization.getConfigurationResource());
@@ -754,9 +731,6 @@ public class ToscaResourceInstallerTest extends BaseTest {
groupList.add(group3);
doReturn(csarHelper).when(toscaResourceStructure).getSdcCsarHelper();
- doReturn(null).when(csarHelper).getRequirementsOf(node1);
- doReturn(requirements2).when(csarHelper).getRequirementsOf(node2);
- doReturn(requirements3).when(csarHelper).getRequirementsOf(node3);
ToscaResourceInstaller installer = new ToscaResourceInstaller();
Method[] methods = installer.getClass().getDeclaredMethods();
diff --git a/asdc-controller/src/test/resources/download/service-Svc140-VF-csar.csar b/asdc-controller/src/test/resources/download/service-Svc140-VF-csar.csar
deleted file mode 100644
index 0de1b0b0a0..0000000000
--- a/asdc-controller/src/test/resources/download/service-Svc140-VF-csar.csar
+++ /dev/null
Binary files differ
diff --git a/asdc-controller/src/test/resources/download/service-Testservice140-csar.csar b/asdc-controller/src/test/resources/download/service-Testservice140-csar.csar
deleted file mode 100644
index bd9a1dc775..0000000000
--- a/asdc-controller/src/test/resources/download/service-Testservice140-csar.csar
+++ /dev/null
Binary files differ
diff --git a/asdc-controller/src/test/resources/download/service-pnfservice.csar b/asdc-controller/src/test/resources/download/service-pnfservice.csar
new file mode 100644
index 0000000000..89d24a18ee
--- /dev/null
+++ b/asdc-controller/src/test/resources/download/service-pnfservice.csar
Binary files differ
diff --git a/asdc-controller/src/test/resources/download/service-vnfservice.csar b/asdc-controller/src/test/resources/download/service-vnfservice.csar
new file mode 100644
index 0000000000..25d2ebd6c6
--- /dev/null
+++ b/asdc-controller/src/test/resources/download/service-vnfservice.csar
Binary files differ
diff --git a/asdc-controller/src/test/resources/schema.sql b/asdc-controller/src/test/resources/schema.sql
index f2c04802a5..ed6cb89bf6 100644
--- a/asdc-controller/src/test/resources/schema.sql
+++ b/asdc-controller/src/test/resources/schema.sql
@@ -809,6 +809,10 @@ CREATE TABLE `service` (
`OVERALL_DISTRIBUTION_STATUS` varchar(45),
`ONAP_GENERATED_NAMING` TINYINT(1) DEFAULT NULL,
`NAMING_POLICY` varchar(200) DEFAULT NULL,
+ `CDS_BLUEPRINT_NAME` varchar(200) DEFAULT NULL,
+ `CDS_BLUEPRINT_VERSION` varchar(20) DEFAULT NULL,
+ `CONTROLLER_ACTOR` varchar(200) DEFAULT NULL,
+ `SKIP_POST_INSTANTIATION_CONFIGURATION` boolean default true,
PRIMARY KEY (`MODEL_UUID`),
KEY `fk_service__tosca_csar1_idx` (`TOSCA_CSAR_ARTIFACT_UUID`),
CONSTRAINT `fk_service__tosca_csar1` FOREIGN KEY (`TOSCA_CSAR_ARTIFACT_UUID`) REFERENCES `tosca_csar` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
@@ -963,6 +967,7 @@ CREATE TABLE `vf_module_customization` (
`CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`VF_MODULE_MODEL_UUID` varchar(200) NOT NULL,
`VNF_RESOURCE_CUSTOMIZATION_ID` int(13) DEFAULT NULL,
+ `SKIP_POST_INSTANTIATION_CONFIGURATION` boolean default true,
PRIMARY KEY (`ID`),
KEY `fk_vf_module_customization__vf_module1_idx` (`VF_MODULE_MODEL_UUID`),
KEY `fk_vf_module_customization__heat_env__heat_environment1_idx` (`HEAT_ENVIRONMENT_ARTIFACT_UUID`),
@@ -1113,7 +1118,8 @@ CREATE TABLE `vnf_resource_customization` (
`VNF_RESOURCE_MODEL_UUID` varchar(200) NOT NULL,
`SERVICE_MODEL_UUID` varchar(200) NOT NULL,
`VNFCINSTANCEGROUP_ORDER` varchar(200) default NULL,
- `NF_DATA_VALID` tinyint(1) DEFAULT '0',
+ `NF_DATA_VALID` tinyint(1) DEFAULT '0',
+ `CONTROLLER_ACTOR` varchar(200) DEFAULT NULL,
PRIMARY KEY (`ID`),
UNIQUE KEY `UK_vnf_resource_customization` (`MODEL_CUSTOMIZATION_UUID`,`SERVICE_MODEL_UUID`),
KEY `fk_vnf_resource_customization__vnf_resource1_idx` (`VNF_RESOURCE_MODEL_UUID`),
@@ -1195,6 +1201,7 @@ CREATE TABLE IF NOT EXISTS `pnf_resource_customization` (
`CDS_BLUEPRINT_NAME` varchar(200) DEFAULT NULL,
`CDS_BLUEPRINT_VERSION` varchar(20) DEFAULT NULL,
`SKIP_POST_INSTANTIATION_CONFIGURATION` boolean default true,
+ `CONTROLLER_ACTOR` varchar(200) DEFAULT NULL,
PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`),
KEY `fk_pnf_resource_customization__pnf_resource1_idx` (`PNF_RESOURCE_MODEL_UUID`),
CONSTRAINT `fk_pnf_resource_customization__pnf_resource1` FOREIGN KEY (`PNF_RESOURCE_MODEL_UUID`) REFERENCES `pnf_resource` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
@@ -1419,8 +1426,6 @@ CREATE TABLE `active_requests` (
CREATE TABLE `infra_active_requests` (
`REQUEST_ID` varchar(45) NOT NULL,
- `CLIENT_REQUEST_ID` varchar(45) DEFAULT NULL,
- `ACTION` varchar(45) DEFAULT NULL,
`REQUEST_STATUS` varchar(20) DEFAULT NULL,
`STATUS_MESSAGE` longtext DEFAULT NULL,
`PROGRESS` bigint(20) DEFAULT NULL,
@@ -1431,22 +1436,18 @@ CREATE TABLE `infra_active_requests` (
`VNF_NAME` varchar(80) DEFAULT NULL,
`VNF_TYPE` varchar(200) DEFAULT NULL,
`SERVICE_TYPE` varchar(45) DEFAULT NULL,
- `AIC_NODE_CLLI` varchar(11) DEFAULT NULL,
`TENANT_ID` varchar(45) DEFAULT NULL,
- `PROV_STATUS` varchar(20) DEFAULT NULL,
`VNF_PARAMS` longtext,
`VNF_OUTPUTS` longtext,
`REQUEST_BODY` longtext,
`RESPONSE_BODY` longtext,
`LAST_MODIFIED_BY` varchar(100) DEFAULT NULL,
`MODIFY_TIME` datetime DEFAULT NULL,
- `REQUEST_TYPE` varchar(20) DEFAULT NULL,
`VOLUME_GROUP_ID` varchar(45) DEFAULT NULL,
`VOLUME_GROUP_NAME` varchar(45) DEFAULT NULL,
`VF_MODULE_ID` varchar(45) DEFAULT NULL,
`VF_MODULE_NAME` varchar(200) DEFAULT NULL,
`VF_MODULE_MODEL_NAME` varchar(200) DEFAULT NULL,
- `AAI_SERVICE_ID` varchar(50) DEFAULT NULL,
`CLOUD_REGION` varchar(11) DEFAULT NULL,
`CALLBACK_URL` varchar(200) DEFAULT NULL,
`CORRELATOR` varchar(80) DEFAULT NULL,
@@ -1466,14 +1467,11 @@ CREATE TABLE `infra_active_requests` (
`ORIGINAL_REQUEST_ID` varchar(45) DEFAULT NULL,
`EXT_SYSTEM_ERROR_SOURCE` varchar(80) DEFAULT NULL,
`ROLLBACK_EXT_SYSTEM_ERROR_SOURCE` varchar(80) DEFAULT NULL,
- PRIMARY KEY (`REQUEST_ID`),
- UNIQUE KEY `UK_bhu6w8p7wvur4pin0gjw2d5ak` (`CLIENT_REQUEST_ID`)
+ PRIMARY KEY (`REQUEST_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE `archived_infra_requests` (
`REQUEST_ID` varchar(45) NOT NULL,
- `CLIENT_REQUEST_ID` varchar(45) DEFAULT NULL,
- `ACTION` varchar(45) DEFAULT NULL,
`REQUEST_STATUS` varchar(20) DEFAULT NULL,
`STATUS_MESSAGE` longtext DEFAULT NULL,
`PROGRESS` bigint(20) DEFAULT NULL,
@@ -1484,22 +1482,18 @@ CREATE TABLE `archived_infra_requests` (
`VNF_NAME` varchar(80) DEFAULT NULL,
`VNF_TYPE` varchar(200) DEFAULT NULL,
`SERVICE_TYPE` varchar(45) DEFAULT NULL,
- `AIC_NODE_CLLI` varchar(11) DEFAULT NULL,
`TENANT_ID` varchar(45) DEFAULT NULL,
- `PROV_STATUS` varchar(20) DEFAULT NULL,
`VNF_PARAMS` longtext,
`VNF_OUTPUTS` longtext,
`REQUEST_BODY` longtext,
`RESPONSE_BODY` longtext,
`LAST_MODIFIED_BY` varchar(100) DEFAULT NULL,
`MODIFY_TIME` datetime DEFAULT NULL,
- `REQUEST_TYPE` varchar(20) DEFAULT NULL,
`VOLUME_GROUP_ID` varchar(45) DEFAULT NULL,
`VOLUME_GROUP_NAME` varchar(45) DEFAULT NULL,
`VF_MODULE_ID` varchar(45) DEFAULT NULL,
`VF_MODULE_NAME` varchar(200) DEFAULT NULL,
`VF_MODULE_MODEL_NAME` varchar(200) DEFAULT NULL,
- `AAI_SERVICE_ID` varchar(50) DEFAULT NULL,
`CLOUD_REGION` varchar(11) DEFAULT NULL,
`CALLBACK_URL` varchar(200) DEFAULT NULL,
`CORRELATOR` varchar(80) DEFAULT NULL,
@@ -1516,8 +1510,7 @@ CREATE TABLE `archived_infra_requests` (
`OPERATIONAL_ENV_ID` varchar(45) DEFAULT NULL,
`OPERATIONAL_ENV_NAME` varchar(200) DEFAULT NULL,
`REQUEST_URL` varchar(500) DEFAULT NULL,
- PRIMARY KEY (`REQUEST_ID`),
- UNIQUE KEY `UK_bhu6w8p7wvur4pin0gjw2d72h` (`CLIENT_REQUEST_ID`)
+ PRIMARY KEY (`REQUEST_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE `site_status` (
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CompleteMsoProcess.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CompleteMsoProcess.groovy
index 7e1280729c..841fe9f50e 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CompleteMsoProcess.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CompleteMsoProcess.groovy
@@ -9,9 +9,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -25,295 +25,98 @@ package org.onap.so.bpmn.common.scripts
import org.onap.so.logger.LoggingAnchor
import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.onap.so.db.request.beans.InfraActiveRequests
+import org.onap.so.db.request.client.RequestsDbClient
import org.onap.so.logger.ErrorCode
import org.onap.so.logger.MessageEnum
import org.slf4j.Logger
import org.slf4j.LoggerFactory
+import org.onap.so.bpmn.core.UrnPropertiesReader;
public class CompleteMsoProcess extends AbstractServiceTaskProcessor {
- private static final Logger logger = LoggerFactory.getLogger( CompleteMsoProcess.class);
-
- String Prefix="CMSO_"
- ExceptionUtil exceptionUtil = new ExceptionUtil()
-
- // Complete MSO Request processing
- public initializeProcessVariables(DelegateExecution execution){
-
- def method = getClass().getSimpleName() + '.initializeProcessVariables(' +'execution=' + execution.getId() +')'
- logger.trace('Entered ' + method)
- try {
-
- /* Initialize all the process request variables in this block */
- execution.setVariable("prefix",Prefix)
- execution.setVariable("CMSO_request_id","")
- execution.setVariable("CMSO_notification-url","")
- execution.setVariable("CMSO_mso-bpel-name","")
- execution.setVariable("CMSO_request_action","")
- execution.setVariable("CMSO_notification-url-Ok", false)
- execution.setVariable("CMSO_request_id-Ok", false)
-
- //updateRequest Adapter process variables
- execution.setVariable("CMSO_updateRequestResponse", "")
- execution.setVariable("CMSO_updateRequestResponseCode", "")
- execution.setVariable("CMSO_updateFinalNotifyAckStatusFailedPayload", "")
-
- //Set DB adapter variables here
- execution.setVariable("CMSO_updateDBStatusToSuccessPayload", "")
- execution.setVariable("CMSO_updateInfraRequestDBPayload", "")
- execution.setVariable("CMSO_setUpdateDBstatustoSuccessPayload", "")
-
- //Auth variables
- execution.setVariable("BasicAuthHeaderValue","")
-
- //Response variables
- execution.setVariable("CompletionHandlerResponse","")
- execution.setVariable("CMSO_ErrorResponse", null)
- execution.setVariable("CMSO_ResponseCode", "")
-
- setSuccessIndicator(execution, false)
-
- } catch (BpmnError e) {
- throw e;
- } catch (Exception e) {
- logger.error(LoggingAnchor.FIVE, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), 'Caught exception in' +
- ' ' + method, "BPMN", ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
- exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in" + method)
- }
-
- }
-
- public void preProcessRequest (DelegateExecution execution) {
-
- initializeProcessVariables(execution)
- def method = getClass().getSimpleName() + '.preProcessRequest(' +'execution=' + execution.getId() +')'
- // logger.trace("Started CompleteMsoProcess preProcessRequest Method ");
- logger.trace('Entered ' + method)
-
- setBasicDBAuthHeader(execution, execution.getVariable('isDebugLogEnabled'))
-
- try {
- def xml = execution.getVariable("CompleteMsoProcessRequest")
-
- logger.debug("CompleteMsoProcess Request: " + xml)
- logger.debug("Incoming Request is: "+ xml)
-
- //mso-bpel-name from the incoming request
- def msoBpelName = utils.getNodeText(xml,"mso-bpel-name")
- execution.setVariable("CMSO_mso-bpel-name",msoBpelName)
-
- //Check the incoming request type
- //Incoming request can be ACTIVE_REQUESTS (request-information node) or INFRA_ACTIVE_REQUESTS (request-info node)
- if (utils.nodeExists(xml, "request-information")) {
- execution.setVariable("CMSO_request_id-Ok", true) // Incoming request is for ACTIVE_REQUESTS
- }
-
- //Check for rehome indicator
- def rehomeIndicator = utils.getNodeText(xml,"rehomeDone")
- execution.setVariable("rehomeDone", rehomeIndicator)
-
- //Check notification-url for the incoming request type
- //ACTIVE_REQUESTS may have notificationurl node
- //INFRA_ACTIVE_REQUESTS notificationurl node does not exist
- def notificationurl = ""
- if (utils.nodeExists(xml, "notification-url")) {
- notificationurl = utils.getNodeText(xml,"notification-url")
- if(notificationurl != null && !notificationurl.isEmpty()) {
- execution.setVariable("CMSO_notification-url-Ok", true)
- execution.setVariable("CMSO_notification-url",notificationurl)
- }
- }
-
- //Check request_id for the incoming request type
- //For INFRA_ACTIVE_REQUESTS payload request-id IS optional (Not sure why this is option since req id is primary key ... also tried exe through SOAP UI to check if MSO code handles null like auto generated seq not it does not)
- //For ACTIVE_REQUESTS payload request-id is NOT optional
- def request_id = ""
- if (utils.nodeExists(xml, "request-id")) {
- execution.setVariable("CMSO_request_id",utils.getNodeText(xml,"request-id"))
- }
-
-
- // INFRA_ACTIVE_REQUESTS have "action" element ... mandatory
- // ACTIVE_REQUEST have "request-action" ... mandatory
- if (utils.nodeExists(xml, "request-action")) {
- execution.setVariable("CMSO_request_action",utils.getNodeText(xml,"request-action"))
- } else if (utils.nodeExists(xml, "action")) {
- execution.setVariable("CMSO_request_action",utils.getNodeText(xml,"action"))
- }
-
- //Check source for the incoming request type
- //For INFRA_ACTIVE_REQUESTS payload source IS optional
- //For ACTIVE_REQUESTS payload source is NOT optional
- def source = ""
- if (utils.nodeExists(xml, "source")) {
- execution.setVariable("CMSO_source",utils.getNodeText(xml,"source"))
- }
-
- logger.trace("--> " + execution.getVariable(""))
- logger.trace("--> " + execution.getVariable(""))
-
- // set the DHV/Service Instantiation values if specified in the request
- execution.setVariable("CMSO_is_srv_inst_req", String.valueOf("true".equals(utils.getNodeText(xml, "is-srv-inst-req"))))
- logger.trace("--> " + execution.getVariable(""))
- execution.setVariable("CMSO_is_json_content", String.valueOf("JSON".equals(utils.getNodeText(xml, "resp-content-type"))))
- logger.trace("--> " + execution.getVariable(""))
- execution.setVariable("CMSO_service_inst_id", utils.getNodeText(xml, "service-instance-id"))
- logger.trace("--> " + execution.getVariable(""))
- execution.setVariable("CMSO_start_time", utils.getNodeText(xml, "start-time"))
- logger.trace("--> " + execution.getVariable(""))
- // this variable is used by the camunda flow to set the Content-Type for the async response
- if (execution.getVariable("CMSO_is_srv_inst_req").equals("true") &&
- execution.getVariable("CMSO_is_json_content").equals("true")) {
- execution.setVariable("CMSO_content_type", "application/json")
- } else {
- execution.setVariable("CMSO_content_type", "text/xml")
- }
-
- logger.trace('Exited ' + method)
- } catch (BpmnError e) {
- throw e;
- } catch (Exception e) {
- logger.debug("Exception Occured During PreProcessRequest: " + e);
- exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in " + method)
- }
- }
-
- public void setUpdateDBstatustoSuccessPayload (DelegateExecution execution){
-
- def method = getClass().getSimpleName() + '.setUpdateDBstatustoSuccessPayload(' +'execution=' + execution.getId() +')'
- logger.trace('Entered ' + method)
-
- try {
-
- def xml = execution.getVariable("CompleteMsoProcessRequest")
-
- //Get statusMessage if exists
- def statusMessage
- if(utils.nodeExists(xml, "status-message")){
- statusMessage = utils.getNodeText(xml, "status-message")
- }else{
- statusMessage = "Resource Completed Successfully"
- }
-
- //Get instance Id if exist
- String idXml = ""
- if(utils.nodeExists(xml, "vnfId")){
- idXml = utils.getNodeXml(xml, "vnfId")
- }else if(utils.nodeExists(xml, "networkId")){
- idXml = utils.getNodeXml(xml, "networkId")
- }else if(utils.nodeExists(xml, "configurationId")){
- idXml = utils.getNodeXml(xml, "configurationId")
- }else if(utils.nodeExists(xml, "serviceInstanceId")){
- idXml = utils.getNodeXml(xml, "serviceInstanceId")
- }else if(utils.nodeExists(xml, "vfModuleId")){
- idXml = utils.getNodeXml(xml, "vfModuleId")
- }else if(utils.nodeExists(xml, "volumeGroupId")){
- idXml = utils.getNodeXml(xml, "volumeGroupId")
- }else{
- idXml = ""
- }
- idXml = utils.removeXmlPreamble(idXml)
- idXml = utils.removeXmlNamespaces(idXml)
- logger.debug("Incoming Instance Id Xml: " + idXml)
-
- String payload = """
- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://org.onap.so/requestsdb">
- <soapenv:Header/>
- <soapenv:Body>
- <req:updateInfraRequest>
- <requestId>${MsoUtils.xmlEscape(execution.getVariable("CMSO_request_id"))}</requestId>
- <lastModifiedBy>${MsoUtils.xmlEscape(execution.getVariable("CMSO_mso-bpel-name"))}</lastModifiedBy>
- <statusMessage>${MsoUtils.xmlEscape(statusMessage)}</statusMessage>
- <requestStatus>COMPLETE</requestStatus>
- <progress>100</progress>
- ${idXml}
- </req:updateInfraRequest>
- </soapenv:Body>
- </soapenv:Envelope>"""
-
- execution.setVariable("CMSO_setUpdateDBstatustoSuccessPayload", payload)
- logger.debug("Outgoing Update Mso Request Payload is: " + payload)
- logger.debug("setUpdateDBstatustoSuccessPayload: " + payload)
-
- } catch (BpmnError e) {
- throw e;
- } catch (Exception e) {
- logger.error(LoggingAnchor.FIVE, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- 'Caught exception in ' + method, "BPMN",
- ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
- exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in" + method)
- }
- logger.trace('Exited ' + method)
- }
-
- public void buildDataError (DelegateExecution execution, String message) {
-
- def method = getClass().getSimpleName() + '.buildDataError(' +'execution=' + execution.getId() +')'
- logger.trace('Entered ' + method)
- try {
-
- String msoCompletionResponse = """
- <sdncadapterworkflow:MsoCompletionResponse xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
- <sdncadapterworkflow:out>BPEL ${execution.getVariable("CMSO_mso-bpel-name")} FAILED</sdncadapterworkflow:out>
- </sdncadapterworkflow:MsoCompletionResponse>
- """.trim()
-
- // Format Response
- def xmlMsoCompletionResponse = utils.formatXml(msoCompletionResponse)
- String buildMsoCompletionResponseAsString = xmlMsoCompletionResponse.drop(38).trim()
- logger.debug("CompleteMsoProcess Response: " + buildMsoCompletionResponseAsString)
- execution.setVariable("CompleteMsoProcessResponse", buildMsoCompletionResponseAsString)
- logger.debug("@@ CompleteMsoProcess Response @@ " + "\n" + execution.getVariable("CompletionHandlerResponse"))
-
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, message)
-
- } catch (BpmnError e) {
- logger.debug("Rethrowing MSOWorkflowException")
- throw e;
- } catch (Exception e) {
- logger.error(LoggingAnchor.FIVE, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- 'Caught exception in ' + method, "BPMN",
- ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
- exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in" + method)
- }
-
- }
-
- public void postProcessResponse (DelegateExecution execution) {
-
- def method = getClass().getSimpleName() + '.postProcessResponse(' +'execution=' + execution.getId() +')'
- logger.trace('Entered ' + method)
- // logger.trace("Started CompleteMsoProcess PostProcessRequest Method ");
- try {
-
- String msoCompletionResponse = """
- <sdncadapterworkflow:MsoCompletionResponse xmlns:sdncadapterworkflow="http://ecomp.com/mso/workflow/schema/v1">
- <sdncadapterworkflow:out>BPEL ${execution.getVariable("CMSO_mso-bpel-name")} completed</sdncadapterworkflow:out>
- </sdncadapterworkflow:MsoCompletionResponse>
- """.trim()
-
- // Format Response
- def xmlMsoCompletionResponse = utils.formatXML(msoCompletionResponse)
- String buildMsoCompletionResponseAsString = xmlMsoCompletionResponse.drop(38).trim()
- // TODO: Should deprecate use of processKey+Response variable for the response. Will use "WorkflowResponse" instead
- execution.setVariable("WorkflowResponse", buildMsoCompletionResponseAsString)
- logger.debug("CompleteMsoProcess Response: " + buildMsoCompletionResponseAsString)
- execution.setVariable("CompleteMsoProcessResponse", buildMsoCompletionResponseAsString)
- execution.setVariable("CMSO_ResponseCode", "200")
-
- setSuccessIndicator(execution, true)
-
- logger.debug("@@ CompleteMsoProcess Response @@ " + "\n" + execution.getVariable("CompleteMsoProcessResponse"))
-
- logger.trace('Exited ' + method)
- } catch (BpmnError e) {
- throw e;
- } catch (Exception e) {
- logger.error(LoggingAnchor.FIVE, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- 'Caught exception in ' + method, "BPMN",
- ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
- exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in" + method)
- }
- }
-
+ private static final Logger logger = LoggerFactory.getLogger(CompleteMsoProcess.class);
+
+ String Prefix="CMSO_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ public void preProcessRequest (DelegateExecution execution) {
+ try {
+ def xml = execution.getVariable("CompleteMsoProcessRequest")
+
+ logger.debug("CompleteMsoProcess Request: " + xml)
+ logger.debug("Incoming Request is: "+ xml)
+
+ //mso-bpel-name from the incoming request
+ def msoBpelName = utils.getNodeText(xml,"mso-bpel-name")
+ execution.setVariable("CMSO_mso-bpel-name",msoBpelName)
+
+ if (utils.nodeExists(xml, "request-information")) {
+ throw new BpmnError("500", "FalloutHandler subflow does not support this request type.")
+ }
+
+ def request_id = ""
+ if (utils.nodeExists(xml, "request-id")) {
+ execution.setVariable("CMSO_request_id",utils.getNodeText(xml,"request-id"))
+ }
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logger.debug("Exception Occured During PreProcessRequest: " + e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in preprocess")
+ }
+ }
+
+ public void updateInfraRequestDB (DelegateExecution execution){
+ try {
+
+ def xml = execution.getVariable("CompleteMsoProcessRequest")
+
+ //Get statusMessage if exists
+ def statusMessage
+ if(utils.nodeExists(xml, "status-message")){
+ statusMessage = utils.getNodeText(xml, "status-message")
+ }else{
+ statusMessage = "Resource Completed Successfully"
+ }
+
+ RequestsDbClient dbClient = getDbClient()
+
+ InfraActiveRequests infraRequest = dbClient.getInfraActiveRequests(execution.getVariable("CMSO_request_id"), UrnPropertiesReader.getVariable("mso.adapters.requestDb.auth"), UrnPropertiesReader.getVariable("mso.adapters.requestDb.endpoint"))
+ if(infraRequest == null){
+ infraRequest = new InfraActiveRequests();
+ infraRequest.setRequestId(execution.getVariable("CMSO_request_id"))
+ }
+ infraRequest.setLastModifiedBy("BPMN")
+ infraRequest.setStatusMessage(statusMessage)
+ infraRequest.setRequestStatus("COMPLETED")
+ infraRequest.setProgress(100)
+
+ if(utils.nodeExists(xml, "vnfId")){
+ infraRequest.setVnfId(utils.getNodeText(xml, "vnfId"))
+ }else if(utils.nodeExists(xml, "networkId")){
+ infraRequest.setNetworkId(utils.getNodeText(xml, "networkId"))
+ }else if(utils.nodeExists(xml, "configurationId")){
+ infraRequest.setConfigurationId(utils.getNodeText(xml, "configurationId"))
+ }else if(utils.nodeExists(xml, "serviceInstanceId")){
+ infraRequest.setServiceInstanceId(utils.getNodeText(xml, "serviceInstanceId"))
+ }else if(utils.nodeExists(xml, "vfModuleId")){
+ infraRequest.setVfModuleId(utils.getNodeText(xml, "vfModuleId"))
+ }else if(utils.nodeExists(xml, "volumeGroupId")){
+ infraRequest.setVolumeGroupId(utils.getNodeText(xml, "volumeGroupId"))
+
+ }
+
+ dbClient.updateInfraActiveRequests(infraRequest, UrnPropertiesReader.getVariable("mso.adapters.requestDb.auth"), UrnPropertiesReader.getVariable("mso.adapters.requestDb.endpoint"))
+
+ } catch (Exception e) {
+ logger.error("Internal error while updating request db", e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in update infra request db")
+ }
+ }
+
+ protected RequestsDbClient getDbClient(){
+ return new RequestsDbClient()
+ }
}
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/FalloutHandler.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/FalloutHandler.groovy
index ed849755b7..8306f33592 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/FalloutHandler.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/FalloutHandler.groovy
@@ -9,9 +9,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -24,376 +24,134 @@ package org.onap.so.bpmn.common.scripts
import org.onap.so.logger.LoggingAnchor
import org.onap.so.bpmn.core.UrnPropertiesReader
+import org.onap.so.db.request.beans.InfraActiveRequests
+import org.onap.so.db.request.client.RequestsDbClient
import org.onap.so.logger.ErrorCode
-
+import org.onap.so.bpmn.core.UrnPropertiesReader;
import java.text.SimpleDateFormat
import org.apache.commons.lang3.*
+import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.delegate.DelegateExecution
import org.onap.so.logger.MessageEnum
import org.slf4j.Logger
import org.slf4j.LoggerFactory
public class FalloutHandler extends AbstractServiceTaskProcessor {
- private static final Logger logger = LoggerFactory.getLogger( FalloutHandler.class);
-
- String Prefix="FH_"
- ExceptionUtil exceptionUtil = new ExceptionUtil()
-
- public initializeProcessVariables(DelegateExecution execution){
- def method = getClass().getSimpleName() + '.initializeProcessVariables(' +'execution=' + execution.getId() +')'
- logger.trace('Entered ' + method)
-
- try {
- execution.setVariable("prefix",Prefix)
-
- //These variables are form the input Message to the BPMN
- execution.setVariable("FH_request_id","")
- execution.setVariable("FH_request_action","")
- execution.setVariable("FH_notification-url","")
- execution.setVariable("FH_mso-bpel-name","")
- execution.setVariable("FH_ErrorCode", "")
- execution.setVariable("FH_ErrorMessage", "")
-
- execution.setVariable("FH_notification-url-Ok", false)
- execution.setVariable("FH_request_id-Ok", false)
-
- //These variables are for Get Mso Aai Password Adapter
- execution.setVariable("FH_deliveryStatus", true)
-
- //update Response Status to pending ...Adapter variables
- execution.setVariable("FH_updateResponseStatusPayload", null)
- execution.setVariable("FH_updateResponseStatusResponse", null)
-
- //update Request Gamma ...Adapter variables
- execution.setVariable("FH_updateRequestGammaPayload", "")
- execution.setVariable("FH_updateRequestGammaResponse", null)
- execution.setVariable("FH_updateRequestGammaResponseCode", null)
-
- //update Request Infra ...Adapter variables
- execution.setVariable("FH_updateRequestInfraPayload", "")
- execution.setVariable("FH_updateRequestInfraResponse", null)
- execution.setVariable("FH_updateRequestInfraResponseCode", null)
-
- //assign True to success variable
- execution.setVariable("FH_success", true)
-
- //Set notify status to Failed variable
- execution.setVariable("FH_NOTIFY_STATUS", "SUCCESS")
-
- //Set DB update variable
- execution.setVariable("FH_updateRequestPayload", "")
- execution.setVariable("FH_updateRequestResponse", null)
- execution.setVariable("FH_updateRequestResponseCode", null)
-
- //Auth variables
- execution.setVariable("BasicAuthHeaderValue","")
-
- //Parameter list
- execution.setVariable("FH_parameterList", "")
-
- //Response variables
- execution.setVariable("FalloutHandlerResponse","")
- execution.setVariable("FH_ErrorResponse", null)
- execution.setVariable("FH_ResponseCode", "")
-
- } catch (Exception e) {
- logger.error(LoggingAnchor.FIVE, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- 'Caught exception in ' + method, "BPMN",
- ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
- // exceptionUtil.buildWorkflowException(execution, 2000, "Internal Error - Occured in " + method)
- }
- }
-
- public void preProcessRequest (DelegateExecution execution) {
- def method = getClass().getSimpleName() + '.preProcessRequest(' +'execution=' + execution.getId() +')'
- logger.trace('Entered ' + method)
-
- // Initialize flow variables
- initializeProcessVariables(execution)
- setSuccessIndicator(execution, false)
-
- setBasicDBAuthHeader(execution, execution.getVariable('isDebugLogEnabled'))
-
- try {
- def xml = execution.getVariable("FalloutHandlerRequest")
- logger.debug(" XML --> " + xml)
- logger.debug("FalloutHandler request: " + xml)
-
- //Check the incoming request type
- //Incoming request can be ACTIVE_REQUESTS (request-information node) or INFRA_ACTIVE_REQUESTS (request-info node)
- if (utils.nodeExists(xml, "request-information")) {
- execution.setVariable("FH_request_id-Ok", true) // Incoming request is for ACTIVE_REQUESTS
- }
-
- //Check notification-url for the incoming request type
- //ACTIVE_REQUESTS may have notificationurl node
- //INFRA_ACTIVE_REQUESTS notificationurl node does not exist
- def notificationurl = ""
- if (utils.nodeExists(xml, "notification-url")) {
- notificationurl = utils.getNodeText(xml,"notification-url")
- if(notificationurl != null && !notificationurl.isEmpty()) {
- logger.debug("********** Incoming notification Url is: " + notificationurl);
- execution.setVariable("FH_notification-url-Ok", true)
- execution.setVariable("FH_notification-url",notificationurl)
- }
- }
-
- //Check request_id for the incoming request type
- //For INFRA_ACTIVE_REQUESTS payload request-id IS optional (Not sure why this is option since req id is primary key ... also tried exe through SOAP UI to check if MSO code handles null like auto generated seq not it does not)
- //For ACTIVE_REQUESTS payload request-id is NOT optional
- def request_id = ""
- if (utils.nodeExists(xml, "request-id")) {
- execution.setVariable("FH_request_id",utils.getNodeText(xml,"request-id"))
- }
- logger.debug("FH_request_id: " + execution.getVariable("FH_request_id"))
-
- // INFRA_ACTIVE_REQUESTS have "action" element ... mandatory
- // ACTIVE_REQUEST have "request-action" ... mandatory
- if (utils.nodeExists(xml, "request-action")) {
- execution.setVariable("FH_request_action",utils.getNodeText(xml,"request-action"))
- } else if (utils.nodeExists(xml, "action")) {
- execution.setVariable("FH_request_action",utils.getNodeText(xml,"action"))
- }
-
-
- //Check source for the incoming request type
- //For INFRA_ACTIVE_REQUESTS payload source IS optional
- //For ACTIVE_REQUESTS payload source is NOT optional
- def source = ""
- if (utils.nodeExists(xml, "source")) {
- execution.setVariable("FH_source",utils.getNodeText(xml,"source"))
- }
-
- //Check if ErrorCode node exists. If yes, initialize it from request xml, if no, it will stay with defaulf value already set in initializeProcessVariables() method above.
- def errorCode = ""
- if (utils.nodeExists(xml, "ErrorCode")) {
- errorCode = utils.getNodeText(xml,"ErrorCode")
- if(errorCode != null && !errorCode.isEmpty()) {
- execution.setVariable("FH_ErrorCode", errorCode)
- }
- }
- logger.debug("FH_ErrorCode: " + errorCode)
-
- //Check if ErrorMessage node exists. If yes, initialize it from request xml, if no, it will stay with defaulf value already set in initializeProcessVariables() method above.
- def errorMessage = ""
- if (utils.nodeExists(xml, "ErrorMessage")) {
- errorCode = utils.getNodeText(xml,"ErrorMessage")
- if(errorCode != null && !errorCode.isEmpty()) {
- errorCode = errorCode
- execution.setVariable("FH_ErrorMessage", errorCode)
- }
- }
-
- //Check for Parameter List
- if (utils.nodeExists(xml, "parameter-list")) {
- def parameterList = utils.getNodeXml(xml, "parameter-list", false)
- execution.setVariable("FH_parameterList", parameterList)
- }
-
- logger.trace("--> " + execution.getVariable(""))
- logger.debug("FH_request_id-OK --> " + execution.getVariable("FH_request_id-Ok"))
-
- // set the DHV/Service Instantiation values if specified in the request
- execution.setVariable("FH_is_srv_inst_req", String.valueOf("true".equals(utils.getNodeText(xml, "is-srv-inst-req"))))
- logger.trace("--> " + execution.getVariable(""))
- execution.setVariable("FH_is_json_content", String.valueOf("JSON".equals(utils.getNodeText(xml, "resp-content-type"))))
- logger.trace("--> " + execution.getVariable(""))
- execution.setVariable("FH_service_inst_id", utils.getNodeText(xml, "service-instance-id"))
- logger.trace("--> " + execution.getVariable(""))
- execution.setVariable("FH_start_time", utils.getNodeText(xml, "start-time"))
- logger.trace("--> " + execution.getVariable(""))
- // this variable is used by the camunda flow to set the Content-Type for the async response
- if (execution.getVariable("FH_is_srv_inst_req").equals("true") &&
- execution.getVariable("FH_is_json_content").equals("true")) {
- execution.setVariable("FH_content_type", "application/json")
- } else {
- execution.setVariable("FH_content_type", "text/xml")
- }
- } catch (Exception e) {
- logger.error(LoggingAnchor.FIVE, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- 'Caught exception in ' + method, "BPMN",
- ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
- // exceptionUtil.buildWorkflowException(execution, 2000, "Internal Error - Occured in" + method)
- }
-
- logger.debug("OUTOF --> Initialize Variables Fallout Handler #########");
- }
-
- public String updateRequestPayload (DelegateExecution execution){
- def method = getClass().getSimpleName() + '.updateRequestPayload(' +'execution=' + execution.getId() +')'
- logger.trace('Entered ' + method)
-
- try {
- String payload = """
- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://org.onap.so/requestsdb">
- <soapenv:Header/>
- <soapenv:Body>
- <req:updateRequest>
- <requestId>${MsoUtils.xmlEscape(execution.getVariable("FH_request_id"))}</requestId>
- <lastModifiedBy>BPEL</lastModifiedBy>
- <finalErrorMessage>${MsoUtils.xmlEscape(execution.getVariable("FH_ErrorMessage"))}</finalErrorMessage>
- <finalErrorCode>${MsoUtils.xmlEscape(execution.getVariable("FH_ErrorCode"))}</finalErrorCode>
- <status>FAILED</status>
- <responseStatus>${MsoUtils.xmlEscape(execution.getVariable("FH_NOTIFY_STATUS"))}</responseStatus>
- </req:updateRequest>
- </soapenv:Body>
- </soapenv:Envelope>
- """
-
- logger.debug("updateRequestPayload: " + payload)
- execution.setVariable("FH_updateRequestPayload", payload)
- return execution.getVariable("FH_updateRequestPayload")
- } catch (Exception e) {
- logger.error(LoggingAnchor.FIVE, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- 'Caught exception in ' + method, "BPMN",
- ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
- // exceptionUtil.buildWorkflowException(execution, 2000, "Internal Error - Occured in " + method)
- }
- }
-
- public String updateRequestInfraPayload (DelegateExecution execution){
- def method = getClass().getSimpleName() + '.updateRequestInfraPayload(' +'execution=' + execution.getId() +')'
- logger.trace('Entered ' + method)
-
- try {
- String payload = """
- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://org.onap.so/requestsdb">
- <soapenv:Header/>
- <soapenv:Body>
- <req:updateInfraRequest>
- <requestId>${MsoUtils.xmlEscape(execution.getVariable("FH_request_id"))}</requestId>
- <lastModifiedBy>BPEL</lastModifiedBy>
- <statusMessage>${MsoUtils.xmlEscape(execution.getVariable("FH_ErrorMessage"))}</statusMessage>
- <requestStatus>FAILED</requestStatus>
- <progress>100</progress>
- </req:updateInfraRequest>
- </soapenv:Body>
- </soapenv:Envelope>
- """
-
- execution.setVariable("FH_updateRequestInfraPayload", payload)
- logger.debug("updateRequestInfraPayload: " + payload)
- return execution.getVariable("FH_updateRequestInfraPayload")
- } catch (Exception e) {
- logger.error(LoggingAnchor.FIVE, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- 'Caught exception in ' + method, "BPMN",
- ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
- // exceptionUtil.buildWorkflowException(execution, 2000, "Internal Error - Occured in " + method)
- }
- }
-
- public String updateRequestGammaPayload (DelegateExecution execution){
- def method = getClass().getSimpleName() + '.updateRequestGammaPayload(' +'execution=' + execution.getId() +')'
- logger.trace('Entered ' + method)
-
- try {
- String payload = """
- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="${UrnPropertiesReader.getVariable("mso.default.adapter.namespace", execution)}/requestsdb">
- <soapenv:Header/>
- <soapenv:Body>
- <req:updateRequest>
- <requestId>${MsoUtils.xmlEscape(execution.getVariable("FH_request_id"))}</requestId>
- <lastModifiedBy>BPEL</lastModifiedBy>
- <finalErrorMessage>${MsoUtils.xmlEscape(execution.getVariable("FH_ErrorMessage"))}</finalErrorMessage>
- <finalErrorCode>${MsoUtils.xmlEscape(execution.getVariable("FH_ErrorCode"))}</finalErrorCode>
- <status>FAILED</status>
- </req:updateRequest>
- </soapenv:Body>
- </soapenv:Envelope>
- """
-
- execution.setVariable("FH_updateRequestGammaPayload", payload)
- logger.debug("updateRequestGammaPayload: " + payload)
- return execution.getVariable("FH_updateRequestGammaPayload")
- } catch (Exception e) {
- logger.error(LoggingAnchor.FIVE, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- 'Caught exception in ' + method, "BPMN",
- ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
- // exceptionUtil.buildWorkflowException(execution, 2000, "Internal Error - Occured in " + method)
- }
- }
-
- public String updateResponseStatusPayload (DelegateExecution execution){
- def method = getClass().getSimpleName() + '.updateResponseStatusPayload(' +'execution=' + execution.getId() +')'
- logger.trace('Entered ' + method)
-
- try {
- String payload = """
- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://org.onap.so/requestsdb">
- <soapenv:Header/>
- <soapenv:Body>
- <req:updateResponseStatus>
- <requestId>${MsoUtils.xmlEscape(execution.getVariable("FH_request_id"))}</requestId>
- <lastModifiedBy>BPEL</lastModifiedBy>
- <responseStatus>SENDING_FINAL_NOTIFY</responseStatus>
- </req:updateResponseStatus>
- </soapenv:Body>
- </soapenv:Envelope>
- """
-
- execution.setVariable("FH_updateResponseStatusPayload", payload)
- logger.debug("updateResponseStatusPayload: " + payload)
- return execution.getVariable("FH_updateResponseStatusPayload")
- } catch (Exception e) {
- logger.error(LoggingAnchor.FIVE, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- 'Caught exception in ' + method, "BPMN",
- ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
- // exceptionUtil.buildWorkflowException(execution, 2000, "Internal Error - Occured in " + method)
- }
- }
-
- public void buildDBWorkflowException(DelegateExecution execution, String responseCodeVariable) {
- def method = getClass().getSimpleName() + '.buildDBWorkflowException(' +
- 'execution=' + execution.getId() +
- ', responseCodeVariable=' + responseCodeVariable + ')'
- logger.trace('Entered ' + method)
-
- try {
- def responseCode = execution.getVariable(responseCodeVariable)
- // If the HTTP response code was null, it means a connection fault occurred (a java exception)
- def errorMessage = responseCode == null ? "Could not connect to DB Adapter" : "DB Adapter returned ${responseCode} response"
- def errorCode = responseCode == null ? 7000 : 7020
- // exceptionUtil.buildWorkflowException(execution, errorCode, errorMessage)
- } catch (Exception e) {
- logger.error(LoggingAnchor.FIVE, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- 'Caught exception in ' + method, "BPMN",
- ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
- // exceptionUtil.buildWorkflowException(execution, 2000, "Internal Error - Occured in " + method)
- }
- }
-
- /**
- * Used to create a workflow response in success and failure cases.
- */
- public void postProcessResponse (DelegateExecution execution) {
- def method = getClass().getSimpleName() + '.postProcessResponse(' +'execution=' + execution.getId() +')'
- logger.trace('Entered ' + method)
-
- try {
- Boolean success = (Boolean) execution.getVariable("FH_success")
- String out = success ? "Fallout Handler Succeeded" : "Fallout Handler Failed";
-
- String falloutHandlerResponse = """
+ private static final Logger logger = LoggerFactory.getLogger(FalloutHandler.class);
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+
+ public void preProcessRequest (DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.preProcessRequest(' +'execution=' + execution.getId() +')'
+ logger.trace('Entered ' + method)
+
+ execution.setVariable("FH_success", true)
+
+ try {
+ def xml = execution.getVariable("FalloutHandlerRequest")
+ logger.debug("FalloutHandler request: " + xml)
+
+ if (utils.nodeExists(xml, "request-information")) {
+ throw new BpmnError("500", "FalloutHandler subflow does not support this request type.")
+ }
+
+ //Check request_id for the incoming request type
+ //For INFRA_ACTIVE_REQUESTS payload request-id IS optional (Not sure why this is option since req id is primary key ... also tried exe through SOAP UI to check if MSO code handles null like auto generated seq not it does not)
+ //For ACTIVE_REQUESTS payload request-id is NOT optional
+ def request_id = ""
+ if (utils.nodeExists(xml, "request-id")) {
+ execution.setVariable("FH_request_id",utils.getNodeText(xml,"request-id"))
+ }
+ logger.debug("FH_request_id: " + execution.getVariable("FH_request_id"))
+
+ //Check if ErrorCode node exists. If yes, initialize it from request xml, if no, it will stay with defaulf value already set in initializeProcessVariables() method above.
+ def errorCode = "500"
+ if (utils.nodeExists(xml, "ErrorCode")) {
+ if(errorCode != null && !errorCode.isEmpty()) {
+ errorCode = utils.getNodeText(xml,"ErrorCode")
+ }
+ }
+ execution.setVariable("FH_ErrorCode", errorCode)
+
+ //Check if ErrorMessage node exists. If yes, initialize it from request xml, if no, it will stay with defaulf value already set in initializeProcessVariables() method above.
+ String errorMessage = "Internal Error occured in MSO, unable to determine error message"
+ if (utils.nodeExists(xml, "ErrorMessage")) {
+ if(errorCode != null && !errorCode.isEmpty()) {
+ errorMessage = utils.getNodeText(xml,"ErrorMessage")
+ }
+ }
+ execution.setVariable("FH_ErrorMessage", errorMessage)
+
+ //Check for Parameter List
+ if (utils.nodeExists(xml, "parameter-list")) {
+ def parameterList = utils.getNodeXml(xml, "parameter-list", false)
+ execution.setVariable("FH_parameterList", parameterList)
+ }
+
+
+ } catch (Exception e) {
+ logger.error(LoggingAnchor.FIVE, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
+ 'Caught exception in ' + method, "BPMN",
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ // exceptionUtil.buildWorkflowException(execution, 2000, "Internal Error - Occured in" + method)
+ }
+
+ }
+
+ public String updateInfraRequestDB(DelegateExecution execution){
+ try {
+ RequestsDbClient client = getDbClient()
+ InfraActiveRequests infraRequest = client.getInfraActiveRequests(execution.getVariable("FH_request_id"), UrnPropertiesReader.getVariable("mso.adapters.requestDb.auth"), UrnPropertiesReader.getVariable("mso.adapters.requestDb.endpoint"))
+ if(infraRequest == null){
+ infraRequest = new InfraActiveRequests();
+ infraRequest.setRequestId(execution.getVariable("CMSO_request_id"))
+ }
+ infraRequest.setLastModifiedBy("BPMN")
+ infraRequest.setStatusMessage(MsoUtils.xmlEscape(execution.getVariable("FH_ErrorMessage")))
+ infraRequest.setRequestStatus("FAILED")
+ infraRequest.setProgress(100)
+ client.updateInfraActiveRequests(infraRequest, UrnPropertiesReader.getVariable("mso.adapters.requestDb.auth"), UrnPropertiesReader.getVariable("mso.adapters.requestDb.endpoint"))
+ } catch (Exception e) {
+ execution.setVariable("FH_success", false)
+ logger.error("Exception Occured while updating infra request db", e)
+ }
+ }
+
+ /**
+ * Used to create a workflow response in success and failure cases.
+ */
+ public void postProcessResponse (DelegateExecution execution) {
+ def method = getClass().getSimpleName() + '.postProcessResponse(' +'execution=' + execution.getId() +')'
+ logger.trace('Entered ' + method)
+
+ try {
+ Boolean success = (Boolean) execution.getVariable("FH_success")
+ String out = success ? "Fallout Handler Succeeded" : "Fallout Handler Failed";
+
+ String falloutHandlerResponse = """
<workflow:FalloutHandlerResponse xmlns:workflow="http://org.onap/so/workflow/schema/v1">
<workflow:out>${MsoUtils.xmlEscape(out)}</workflow:out>
</workflow:FalloutHandlerResponse>
"""
- falloutHandlerResponse = utils.formatXml(falloutHandlerResponse)
- logger.debug("FalloutHandler Response: " + falloutHandlerResponse);
+ falloutHandlerResponse = utils.formatXml(falloutHandlerResponse)
+
+ execution.setVariable("FalloutHandlerResponse", falloutHandlerResponse)
+ execution.setVariable("WorkflowResponse", falloutHandlerResponse)
+ execution.setVariable("FH_ResponseCode", success ? "200" : "500")
+ setSuccessIndicator(execution, success)
- execution.setVariable("FalloutHandlerResponse", falloutHandlerResponse)
- execution.setVariable("WorkflowResponse", falloutHandlerResponse)
- execution.setVariable("FH_ResponseCode", success ? "200" : "500")
- setSuccessIndicator(execution, success)
+ logger.debug("FalloutHandlerResponse =\n" + falloutHandlerResponse)
+ } catch (Exception e) {
+ logger.error(LoggingAnchor.FIVE, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
+ 'Caught exception in ' + method, "BPMN",
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ }
+ }
- logger.debug("FalloutHandlerResponse =\n" + falloutHandlerResponse)
- } catch (Exception e) {
- // Do NOT throw WorkflowException!
- logger.error(LoggingAnchor.FIVE, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- 'Caught exception in ' + method, "BPMN",
- ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
- }
- }
+ protected RequestsDbClient getDbClient(){
+ return new RequestsDbClient()
+ }
}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/recipe/BpmnRestClient.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/recipe/BpmnRestClient.java
index c98c9ad5da..d9356306b7 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/recipe/BpmnRestClient.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/recipe/BpmnRestClient.java
@@ -179,7 +179,7 @@ public class BpmnRestClient {
logger.trace("request body is {}", jsonReq);
} catch (Exception e) {
logger.error(LoggingAnchor.FIVE, MessageEnum.APIH_WARP_REQUEST.toString(), "Camunda", "wrapVIDRequest",
- ErrorCode.BusinessProcesssError.getValue(), "Error in APIH Warp request", e);
+ ErrorCode.BusinessProcessError.getValue(), "Error in APIH Warp request", e);
}
return jsonReq;
}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java
index 763f163a2b..3f664cb821 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java
@@ -257,15 +257,30 @@ public class BBInputSetup implements JavaDelegate {
aaiServiceInstance = bbInputSetupUtils.getAAIServiceInstanceById(serviceInstanceId);
}
Service service = null;
+ boolean isReplace = false;
if (aaiServiceInstance != null) {
- service = bbInputSetupUtils.getCatalogServiceByModelUUID(aaiServiceInstance.getModelVersionId());
+ if (requestAction.equalsIgnoreCase("replaceInstance")) {
+ RelatedInstanceList[] relatedInstanceList = requestDetails.getRelatedInstanceList();
+ if (relatedInstanceList != null) {
+ for (RelatedInstanceList relatedInstList : relatedInstanceList) {
+ RelatedInstance relatedInstance = relatedInstList.getRelatedInstance();
+ if (relatedInstance.getModelInfo().getModelType().equals(ModelType.service)) {
+ service = bbInputSetupUtils
+ .getCatalogServiceByModelUUID(relatedInstance.getModelInfo().getModelVersionId());
+ isReplace = true;
+ }
+ }
+ }
+ } else {
+ service = bbInputSetupUtils.getCatalogServiceByModelUUID(aaiServiceInstance.getModelVersionId());
+ }
}
if (aaiServiceInstance != null && service != null) {
ServiceInstance serviceInstance = this.getExistingServiceInstance(aaiServiceInstance);
serviceInstance.setModelInfoServiceInstance(this.mapperLayer.mapCatalogServiceIntoServiceInstance(service));
this.populateObjectsOnAssignAndCreateFlows(executeBB.getRequestId(), requestDetails, service, bbName,
serviceInstance, lookupKeyMap, resourceId, vnfType, executeBB.getBuildingBlock().getKey(),
- executeBB.getConfigurationResourceKeys());
+ executeBB.getConfigurationResourceKeys(), isReplace);
return this.populateGBBWithSIAndAdditionalInfo(requestDetails, serviceInstance, executeBB, requestAction,
null);
} else {
@@ -337,7 +352,7 @@ public class BBInputSetup implements JavaDelegate {
protected void populateObjectsOnAssignAndCreateFlows(String requestId, RequestDetails requestDetails,
Service service, String bbName, ServiceInstance serviceInstance, Map<ResourceKey, String> lookupKeyMap,
String resourceId, String vnfType, String configurationKey,
- ConfigurationResourceKeys configurationResourceKeys) throws Exception {
+ ConfigurationResourceKeys configurationResourceKeys, boolean isReplace) throws Exception {
ModelInfo modelInfo = requestDetails.getModelInfo();
String instanceName = requestDetails.getRequestInfo().getInstanceName();
String productFamilyId = requestDetails.getRequestInfo().getProductFamilyId();
@@ -369,7 +384,7 @@ public class BBInputSetup implements JavaDelegate {
} else {
lookupKeyMap.put(ResourceKey.VF_MODULE_ID, resourceId);
this.populateVfModule(requestId, modelInfo, service, bbName, serviceInstance, lookupKeyMap, resourceId,
- relatedInstanceList, instanceName, null, requestDetails.getCloudConfiguration());
+ relatedInstanceList, instanceName, null, requestDetails.getCloudConfiguration(), isReplace);
}
} else if (modelType.equals(ModelType.instanceGroup)) {
lookupKeyMap.put(ResourceKey.INSTANCE_GROUP_ID, resourceId);
@@ -501,13 +516,18 @@ public class BBInputSetup implements JavaDelegate {
protected void populateVfModule(String requestId, ModelInfo modelInfo, Service service, String bbName,
ServiceInstance serviceInstance, Map<ResourceKey, String> lookupKeyMap, String resourceId,
RelatedInstanceList[] relatedInstanceList, String instanceName, List<Map<String, String>> instanceParams,
- CloudConfiguration cloudConfiguration) throws Exception {
+ CloudConfiguration cloudConfiguration, boolean isReplace) throws Exception {
+ String replaceVnfModelCustomizationUUID = null;
String vnfModelCustomizationUUID = null;
if (relatedInstanceList != null) {
for (RelatedInstanceList relatedInstList : relatedInstanceList) {
RelatedInstance relatedInstance = relatedInstList.getRelatedInstance();
if (relatedInstance.getModelInfo().getModelType().equals(ModelType.vnf)) {
- vnfModelCustomizationUUID = relatedInstance.getModelInfo().getModelCustomizationId();
+ if (isReplace) {
+ replaceVnfModelCustomizationUUID = relatedInstance.getModelInfo().getModelCustomizationId();
+ } else {
+ vnfModelCustomizationUUID = relatedInstance.getModelInfo().getModelCustomizationId();
+ }
}
if (relatedInstance.getModelInfo().getModelType().equals(ModelType.volumeGroup)) {
lookupKeyMap.put(ResourceKey.VOLUME_GROUP_ID, relatedInstance.getInstanceId());
@@ -542,12 +562,20 @@ public class BBInputSetup implements JavaDelegate {
.getModelCustomizationId();
ModelInfo modelInfoVfModule = new ModelInfo();
modelInfoVfModule.setModelCustomizationId(vfModuleCustId);
- mapCatalogVfModule(vfModuleTemp, modelInfoVfModule, service, vnfModelCustomizationUUID);
+ if (isReplace) {
+ mapCatalogVfModule(vfModuleTemp, modelInfoVfModule, service, replaceVnfModelCustomizationUUID);
+ } else {
+ mapCatalogVfModule(vfModuleTemp, modelInfoVfModule, service, vnfModelCustomizationUUID);
+ }
}
if (vfModule == null && bbName.equalsIgnoreCase(AssignFlows.VF_MODULE.toString())) {
vfModule = createVfModule(lookupKeyMap, resourceId, instanceName, instanceParams);
vnf.getVfModules().add(vfModule);
- mapCatalogVfModule(vfModule, modelInfo, service, vnfModelCustomizationUUID);
+ if (isReplace) {
+ mapCatalogVfModule(vfModule, modelInfo, service, replaceVnfModelCustomizationUUID);
+ } else {
+ mapCatalogVfModule(vfModule, modelInfo, service, vnfModelCustomizationUUID);
+ }
}
if (vfModule != null) {
updateInstanceName(requestId, ModelType.vfModule, vfModule.getVfModuleName());
@@ -1429,7 +1457,7 @@ public class BBInputSetup implements JavaDelegate {
cloudConfig.setCloudOwner(cloudRegion.getCloudOwner());
this.populateVfModule(executeBB.getRequestId(), modelInfo, service, bbName, serviceInstance,
lookupKeyMap, vfModuleId, null, vfModules.getInstanceName(), vfModules.getInstanceParams(),
- cloudConfig);
+ cloudConfig, false);
}
} else if (bbName.contains(NETWORK)) {
networks = findNetworksByKey(key, resources);
diff --git a/bpmn/MSOCommonBPMN/src/main/resources/subprocess/CompleteMsoProcess.bpmn b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/CompleteMsoProcess.bpmn
index 63c867f3c7..72bed98a5f 100644
--- a/bpmn/MSOCommonBPMN/src/main/resources/subprocess/CompleteMsoProcess.bpmn
+++ b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/CompleteMsoProcess.bpmn
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_EsMs0HcuEeW2U_kkOHX1ZQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.7.1" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_EsMs0HcuEeW2U_kkOHX1ZQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
<bpmn2:process id="CompleteMsoProcess" name="CompleteMsoProcess" isExecutable="true">
<bpmn2:scriptTask id="preProcessRequest" name="Pre-Process Request" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>
@@ -10,8 +10,8 @@ preProcessRequestData.preProcessRequest(execution)
]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="preProcessRequest" targetRef="ExclusiveGateway_1r258d4" />
- <bpmn2:startEvent id="StartEvent_1" name="Start With message">
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="preProcessRequest" targetRef="ScriptTask_3" />
+ <bpmn2:startEvent id="StartEvent_1">
<bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>
<bpmn2:messageEventDefinition id="MessageEventDefinition_1" messageRef="Message_2" />
</bpmn2:startEvent>
@@ -34,136 +34,18 @@ preProcessRequestData.preProcessRequest(execution)
</bpmn2:startEvent>
<bpmn2:sequenceFlow id="SequenceFlow_1i1h3il" sourceRef="startEventExceptionCompleteMSO" targetRef="endEventExceptionCompleteMSO" />
</bpmn2:subProcess>
- <bpmn2:endEvent id="EndEvent_4">
- <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
- <bpmn2:errorEventDefinition id="ErrorEventDefinition_5" errorRef="Error_3" />
- </bpmn2:endEvent>
- <bpmn2:scriptTask id="ScriptTask_3" name="Prepare Infra&#10;&#10;Update DB Request" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_127i45q</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
+ <bpmn2:scriptTask id="ScriptTask_3" name="&#10;MSO&#10;Update&#10;(infra active req)&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1oes9qv</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
def completeMsoProcess = new CompleteMsoProcess()
-completeMsoProcess.setUpdateDBstatustoSuccessPayload(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="ScriptTask_3" targetRef="updateInfraRequest" />
- <bpmn2:serviceTask id="updateInfraRequest" name="Update Infra DB status to SUCCESS">
- <bpmn2:extensionElements>
- <camunda:connector>
- <camunda:inputOutput>
- <camunda:inputParameter name="url"><![CDATA[${UrnPropertiesReader.getVariable("mso.adapters.openecomp.db.endpoint", execution)}]]></camunda:inputParameter>
- <camunda:inputParameter name="payload"><![CDATA[${execution.getVariable("CMSO_setUpdateDBstatustoSuccessPayload")}]]></camunda:inputParameter>
- <camunda:inputParameter name="headers">
- <camunda:map>
- <camunda:entry key="content-type">application/soap+xml</camunda:entry>
- <camunda:entry key="Authorization">#{BasicAuthHeaderValueDB}</camunda:entry>
- <camunda:entry key="X-ONAP-RequestID">#{CMSO_request_id}</camunda:entry>
- </camunda:map>
- </camunda:inputParameter>
- <camunda:inputParameter name="method">POST</camunda:inputParameter>
- <camunda:outputParameter name="CMSO_updateRequestResponse"><![CDATA[${statusCode == null || statusCode == 204 ? "" : response}]]></camunda:outputParameter>
- <camunda:outputParameter name="CMSO_updateRequestResponseCode">${statusCode}</camunda:outputParameter>
- </camunda:inputOutput>
- <camunda:connectorId>soap-http-connector</camunda:connectorId>
- </camunda:connector>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
- </bpmn2:serviceTask>
- <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="updateInfraRequest" targetRef="ExclusiveGateway_7" />
- <bpmn2:scriptTask id="BuildErrorMessage" name="Build Error Message" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_0mipf25</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
- <bpmn2:script><![CDATA[//println "INSIDE --> Build Error Message @@@@"
-//println "CMSO_updateRequestResponse IS --> " + execution.getVariable("CMSO_updateRequestResponse")
-import org.onap.so.bpmn.common.scripts.*
-def buildDataErrorMessage = new CompleteMsoProcess()
-buildDataErrorMessage.buildDataError(execution, "Complete MSO -- Update DB status to SUCCESS -- Failed")]]></bpmn2:script>
+completeMsoProcess.updateInfraRequestDB(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="BuildErrorMessage" targetRef="EndEvent_4" />
- <bpmn2:exclusiveGateway id="ExclusiveGateway_7" default="SequenceFlow_1">
- <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_03z8rch</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="ExclusiveGateway_7" targetRef="BuildErrorMessage" />
- <bpmn2:boundaryEvent id="BoundaryEvent_7" name="" attachedToRef="updateInfraRequest">
- <bpmn2:outgoing>SequenceFlow_0mipf25</bpmn2:outgoing>
- <bpmn2:errorEventDefinition id="_ErrorEventDefinition_84" errorRef="Error_1" camunda:errorCodeVariable="gJavaErrorCode" camunda:errorMessageVariable="gJavaErrorMessage" />
- </bpmn2:boundaryEvent>
<bpmn2:endEvent id="EndEvent_1">
- <bpmn2:incoming>SequenceFlow_1pzb94j</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1oes9qv</bpmn2:incoming>
<bpmn2:terminateEventDefinition id="_TerminateEventDefinition_2" />
</bpmn2:endEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_0mipf25" name="Connect Fault" sourceRef="BoundaryEvent_7" targetRef="BuildErrorMessage" />
- <bpmn2:callActivity id="CallActivity_101qf6x" name="Call Notification Service" calledElement="${UrnPropertiesReader.getVariable(&#34;mso.workflow.notification.name&#34;, execution)}">
- <bpmn2:extensionElements>
- <camunda:in source="mso-request-id" target="mso-request-id" />
- <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
- <camunda:in variables="all" />
- <camunda:out variables="all" />
- <camunda:in businessKey="#{execution.processBusinessKey}" />
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_81</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_13qdn1s</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:sequenceFlow id="SequenceFlow_13qdn1s" sourceRef="CallActivity_101qf6x" targetRef="ParallelGateway_7" />
- <bpmn2:exclusiveGateway id="ExclusiveGateway_3" name="Active Request?" default="SequenceFlow_1dptl35">
- <bpmn2:incoming>SequenceFlow_067veaf</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_81</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_1dptl35</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:exclusiveGateway id="ParallelGateway_7">
- <bpmn2:incoming>SequenceFlow_1dptl35</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_13qdn1s</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_1hpvwyt</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_81" name="Yes" sourceRef="ExclusiveGateway_3" targetRef="CallActivity_101qf6x">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CMSO_notification-url-Ok") ==true || execution.getVariable("CMSO_request_id-Ok") ==true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="SequenceFlow_1dptl35" sourceRef="ExclusiveGateway_3" targetRef="ParallelGateway_7" />
- <bpmn2:parallelGateway id="ExclusiveGateway_1r258d4">
- <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_067veaf</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_0xe5zck</bpmn2:outgoing>
- </bpmn2:parallelGateway>
- <bpmn2:parallelGateway id="ExclusiveGateway_019d74x">
- <bpmn2:incoming>SequenceFlow_12he9a1</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_1hpvwyt</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_1g8ig3h</bpmn2:outgoing>
- </bpmn2:parallelGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_1g8ig3h" sourceRef="ExclusiveGateway_019d74x" targetRef="ScriptTask_0vyk0lo" />
- <bpmn2:sequenceFlow id="SequenceFlow_067veaf" sourceRef="ExclusiveGateway_1r258d4" targetRef="ExclusiveGateway_3" />
- <bpmn2:exclusiveGateway id="ExclusiveGateway_08yqzk9" name="Infra Check Check" default="SequenceFlow_1ffkc0n">
- <bpmn2:incoming>SequenceFlow_0xe5zck</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_127i45q</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_1ffkc0n</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_0xe5zck" sourceRef="ExclusiveGateway_1r258d4" targetRef="ExclusiveGateway_08yqzk9" />
- <bpmn2:sequenceFlow id="SequenceFlow_127i45q" sourceRef="ExclusiveGateway_08yqzk9" targetRef="ScriptTask_3">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CMSO_request_id-Ok") ==false}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_1utv1g8">
- <bpmn2:incoming>SequenceFlow_03z8rch</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_1ffkc0n</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_12he9a1</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_03z8rch" sourceRef="ExclusiveGateway_7" targetRef="ExclusiveGateway_1utv1g8">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CMSO_updateRequestResponseCode")==200}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="SequenceFlow_1ffkc0n" sourceRef="ExclusiveGateway_08yqzk9" targetRef="ExclusiveGateway_1utv1g8" />
- <bpmn2:sequenceFlow id="SequenceFlow_12he9a1" sourceRef="ExclusiveGateway_1utv1g8" targetRef="ExclusiveGateway_019d74x" />
- <bpmn2:sequenceFlow id="SequenceFlow_1hpvwyt" sourceRef="ParallelGateway_7" targetRef="ExclusiveGateway_019d74x" />
- <bpmn2:scriptTask id="ScriptTask_0vyk0lo" name="Prepare Response" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_1g8ig3h</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_1pzb94j</bpmn2:outgoing>
- <bpmn2:script><![CDATA[println "INSIDE --> Complete MSO Process Done SUCCESSFULLY"
-import org.onap.so.bpmn.common.scripts.*
-def postProcessResponseData = new CompleteMsoProcess()
-postProcessResponseData.postProcessResponse(execution)
-println "CompleteMsoProcess Response -->" + "\n" + execution.getVariable("CompletionHandlerResponse")]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_1pzb94j" sourceRef="ScriptTask_0vyk0lo" targetRef="EndEvent_1" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1oes9qv" sourceRef="ScriptTask_3" targetRef="EndEvent_1" />
</bpmn2:process>
<bpmn2:message id="Message_2" name="CompleteMsoProcessRequest" />
<bpmn2:error id="Error_3" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
@@ -171,254 +53,64 @@ println "CompleteMsoProcess Response -->" + "\n" + execution.getVariable("Comple
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CompleteMsoProcess">
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_41" bpmnElement="StartEvent_1">
- <dc:Bounds x="67" y="297" width="36" height="36" />
+ <dc:Bounds x="103" y="156" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="94" y="338" width="49" height="25" />
+ <dc:Bounds x="131" y="197" width="47" height="24" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_ScriptTask_34" bpmnElement="preProcessRequest">
- <dc:Bounds x="167" y="275" width="100" height="80" />
+ <dc:Bounds x="293" y="134" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_34" targetElement="ParallelGateway_1domt5l_di">
- <di:waypoint xsi:type="dc:Point" x="267" y="316" />
- <di:waypoint xsi:type="dc:Point" x="322" y="316" />
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_34" targetElement="_BPMNShape_ScriptTask_88">
+ <di:waypoint xsi:type="dc:Point" x="393" y="174" />
+ <di:waypoint xsi:type="dc:Point" x="440" y="174" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="295" y="301" width="0" height="0" />
+ <dc:Bounds x="371.5" y="159" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_StartEvent_41" targetElement="_BPMNShape_ScriptTask_34">
- <di:waypoint xsi:type="dc:Point" x="103" y="315" />
- <di:waypoint xsi:type="dc:Point" x="167" y="315" />
+ <di:waypoint xsi:type="dc:Point" x="139" y="174" />
+ <di:waypoint xsi:type="dc:Point" x="293" y="174" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="135" y="300" width="0" height="0" />
+ <dc:Bounds x="171" y="159" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_51" bpmnElement="updateInfraRequest">
- <dc:Bounds x="657" y="451" width="100" height="80" />
- </bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_SubProcess_13" bpmnElement="subProcessExceptionCompleteMSO" isExpanded="true">
- <dc:Bounds x="171" y="709" width="427" height="169" />
+ <dc:Bounds x="208" y="407" width="427" height="169" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_EndEvent_110" bpmnElement="endEventExceptionCompleteMSO">
- <dc:Bounds x="471" y="776" width="36" height="36" />
+ <dc:Bounds x="508" y="474" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="489" y="817" width="0" height="0" />
+ <dc:Bounds x="481" y="515" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_51" bpmnElement="startEventExceptionCompleteMSO">
- <dc:Bounds x="219" y="776" width="36" height="36" />
+ <dc:Bounds x="256" y="474" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="237" y="817" width="0" height="0" />
+ <dc:Bounds x="229" y="515" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_63" bpmnElement="ExclusiveGateway_7" isMarkerVisible="true">
- <dc:Bounds x="816" y="465" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="841" y="520" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_51" targetElement="_BPMNShape_ExclusiveGateway_63">
- <di:waypoint xsi:type="dc:Point" x="757" y="491" />
- <di:waypoint xsi:type="dc:Point" x="816" y="490" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="942" y="534" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_111" bpmnElement="EndEvent_4">
- <dc:Bounds x="953" y="578" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="971" y="619" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_76" bpmnElement="BuildErrorMessage">
- <dc:Bounds x="792" y="556" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_ExclusiveGateway_63" targetElement="_BPMNShape_ScriptTask_76">
- <di:waypoint xsi:type="dc:Point" x="841" y="515" />
- <di:waypoint xsi:type="dc:Point" x="842" y="556" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="886" y="342" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_ScriptTask_76" targetElement="_BPMNShape_EndEvent_111">
- <di:waypoint xsi:type="dc:Point" x="892" y="596" />
- <di:waypoint xsi:type="dc:Point" x="953" y="596" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="923" y="596" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="_BPMNShape_EndEvent_128" bpmnElement="EndEvent_1">
- <dc:Bounds x="1270" y="297" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1288" y="338" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_29" bpmnElement="BoundaryEvent_7">
- <dc:Bounds x="686" y="513" width="36" height="36" />
+ <dc:Bounds x="699" y="156" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="979" y="395" width="0" height="0" />
+ <dc:Bounds x="672" y="197" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_ScriptTask_88" bpmnElement="ScriptTask_3">
- <dc:Bounds x="506" y="451" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ScriptTask_88" targetElement="_BPMNShape_ScriptTask_51">
- <di:waypoint xsi:type="dc:Point" x="606" y="491" />
- <di:waypoint xsi:type="dc:Point" x="657" y="491" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="626" y="515" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_0mipf25_di" bpmnElement="SequenceFlow_0mipf25">
- <di:waypoint xsi:type="dc:Point" x="704" y="549" />
- <di:waypoint xsi:type="dc:Point" x="704" y="596" />
- <di:waypoint xsi:type="dc:Point" x="792" y="596" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="623" y="563" width="68" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="CallActivity_101qf6x_di" bpmnElement="CallActivity_101qf6x">
- <dc:Bounds x="633" y="186" width="100" height="80" />
+ <dc:Bounds x="440" y="134" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_13qdn1s_di" bpmnElement="SequenceFlow_13qdn1s">
- <di:waypoint xsi:type="dc:Point" x="733" y="226" />
- <di:waypoint xsi:type="dc:Point" x="888" y="226" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="811" y="211" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1i1h3il_di" bpmnElement="SequenceFlow_1i1h3il">
- <di:waypoint xsi:type="dc:Point" x="255" y="794" />
- <di:waypoint xsi:type="dc:Point" x="471" y="794" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="363" y="779" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_60" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">
- <dc:Bounds x="394" y="201" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="326" y="196" width="80" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ParallelGateway_9" bpmnElement="ParallelGateway_7" isMarkerVisible="true">
- <dc:Bounds x="888" y="201" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="913" y="256" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_82" bpmnElement="SequenceFlow_81">
- <di:waypoint xsi:type="dc:Point" x="444" y="226" />
- <di:waypoint xsi:type="dc:Point" x="633" y="226" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="552" y="234" width="18" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1dptl35_di" bpmnElement="SequenceFlow_1dptl35">
- <di:waypoint xsi:type="dc:Point" x="419" y="251" />
- <di:waypoint xsi:type="dc:Point" x="419" y="333" />
- <di:waypoint xsi:type="dc:Point" x="913" y="333" />
- <di:waypoint xsi:type="dc:Point" x="913" y="251" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="448" y="273" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ParallelGateway_1domt5l_di" bpmnElement="ExclusiveGateway_1r258d4">
- <dc:Bounds x="322" y="291" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="347" y="341" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ParallelGateway_04tefv6_di" bpmnElement="ExclusiveGateway_019d74x">
- <dc:Bounds x="999" y="290" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1024" y="340" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1g8ig3h_di" bpmnElement="SequenceFlow_1g8ig3h">
- <di:waypoint xsi:type="dc:Point" x="1049" y="315" />
- <di:waypoint xsi:type="dc:Point" x="1104" y="315" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1077" y="300" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_067veaf_di" bpmnElement="SequenceFlow_067veaf">
- <di:waypoint xsi:type="dc:Point" x="347" y="291" />
- <di:waypoint xsi:type="dc:Point" x="347" y="226" />
- <di:waypoint xsi:type="dc:Point" x="394" y="226" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="362" y="258.5" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ExclusiveGateway_08yqzk9_di" bpmnElement="ExclusiveGateway_08yqzk9" isMarkerVisible="true">
- <dc:Bounds x="394" y="466" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="390" y="516" width="57" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_0xe5zck_di" bpmnElement="SequenceFlow_0xe5zck">
- <di:waypoint xsi:type="dc:Point" x="347" y="341" />
- <di:waypoint xsi:type="dc:Point" x="347" y="491" />
- <di:waypoint xsi:type="dc:Point" x="394" y="491" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="362" y="416" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_127i45q_di" bpmnElement="SequenceFlow_127i45q">
- <di:waypoint xsi:type="dc:Point" x="444" y="491" />
- <di:waypoint xsi:type="dc:Point" x="473" y="491" />
- <di:waypoint xsi:type="dc:Point" x="473" y="491" />
- <di:waypoint xsi:type="dc:Point" x="506" y="491" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="488" y="491" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ExclusiveGateway_1utv1g8_di" bpmnElement="ExclusiveGateway_1utv1g8" isMarkerVisible="true">
- <dc:Bounds x="999" y="391" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1024" y="441" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_03z8rch_di" bpmnElement="SequenceFlow_03z8rch">
- <di:waypoint xsi:type="dc:Point" x="866" y="490" />
- <di:waypoint xsi:type="dc:Point" x="1024" y="490" />
- <di:waypoint xsi:type="dc:Point" x="1024" y="441" />
+ <di:waypoint xsi:type="dc:Point" x="292" y="492" />
+ <di:waypoint xsi:type="dc:Point" x="508" y="492" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="945" y="475" width="0" height="0" />
+ <dc:Bounds x="355" y="477" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1ffkc0n_di" bpmnElement="SequenceFlow_1ffkc0n">
- <di:waypoint xsi:type="dc:Point" x="419" y="466" />
- <di:waypoint xsi:type="dc:Point" x="419" y="416" />
- <di:waypoint xsi:type="dc:Point" x="999" y="416" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="434" y="441" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_12he9a1_di" bpmnElement="SequenceFlow_12he9a1">
- <di:waypoint xsi:type="dc:Point" x="1024" y="391" />
- <di:waypoint xsi:type="dc:Point" x="1024" y="367" />
- <di:waypoint xsi:type="dc:Point" x="1024" y="367" />
- <di:waypoint xsi:type="dc:Point" x="1024" y="340" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1039" y="367" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1hpvwyt_di" bpmnElement="SequenceFlow_1hpvwyt">
- <di:waypoint xsi:type="dc:Point" x="938" y="226" />
- <di:waypoint xsi:type="dc:Point" x="1024" y="226" />
- <di:waypoint xsi:type="dc:Point" x="1024" y="290" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="981" y="211" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_0vyk0lo_di" bpmnElement="ScriptTask_0vyk0lo">
- <dc:Bounds x="1104" y="275" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1pzb94j_di" bpmnElement="SequenceFlow_1pzb94j">
- <di:waypoint xsi:type="dc:Point" x="1204" y="315" />
- <di:waypoint xsi:type="dc:Point" x="1270" y="315" />
+ <bpmndi:BPMNEdge id="SequenceFlow_1oes9qv_di" bpmnElement="SequenceFlow_1oes9qv">
+ <di:waypoint xsi:type="dc:Point" x="540" y="174" />
+ <di:waypoint xsi:type="dc:Point" x="699" y="174" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1237" y="290" width="0" height="0" />
+ <dc:Bounds x="619.5" y="153" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
diff --git a/bpmn/MSOCommonBPMN/src/main/resources/subprocess/FalloutHandler.bpmn b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/FalloutHandler.bpmn
index 6914e7575f..0c7a8ac063 100644
--- a/bpmn/MSOCommonBPMN/src/main/resources/subprocess/FalloutHandler.bpmn
+++ b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/FalloutHandler.bpmn
@@ -1,178 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_3SPHsLr9EeWak-hhutJWuQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.7.1" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_3SPHsLr9EeWak-hhutJWuQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
<bpmn2:process id="FalloutHandler" name="Fallout Handler" isExecutable="true">
- <bpmn2:parallelGateway id="ParallelGateway_1">
- <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_24</bpmn2:outgoing>
- </bpmn2:parallelGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="ParallelGateway_1" targetRef="ExclusiveGateway_1" />
- <bpmn2:sequenceFlow id="SequenceFlow_24" name="" sourceRef="ParallelGateway_1" targetRef="ExclusiveGateway_6" />
- <bpmn2:exclusiveGateway id="ExclusiveGateway_1" name="Notification URL exists?" default="SequenceFlow_23">
- <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_3" name="yes" sourceRef="ExclusiveGateway_1" targetRef="Task_0ixuwt5">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("FH_notification-url-Ok") ==true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="SequenceFlow_23" name="no" sourceRef="ExclusiveGateway_1" targetRef="ParallelGateway_4" />
<bpmn2:scriptTask id="ScriptTask_8" name="Pre-Process Request" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1kx7ea5</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
def preProcessRequestData = new FalloutHandler()
preProcessRequestData.preProcessRequest(execution)
]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="ScriptTask_8" targetRef="ParallelGateway_1" />
- <bpmn2:startEvent id="StartEvent_1" name="Start">
+ <bpmn2:startEvent id="StartEvent_1">
<bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
</bpmn2:startEvent>
<bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_8" />
- <bpmn2:parallelGateway id="ParallelGateway_6">
- <bpmn2:incoming>SequenceFlow_37</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_38</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
- </bpmn2:parallelGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="ParallelGateway_6" targetRef="ScriptTask_2" />
<bpmn2:scriptTask id="ScriptTask_2" name="Post Process Response" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1u8shdz</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
def falloutHandler = new FalloutHandler()
falloutHandler.postProcessResponse(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="ScriptTask_2" targetRef="EndEvent_6" />
- <bpmn2:exclusiveGateway id="ParallelGateway_4">
- <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_0m7gwor</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_38</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="ParallelGateway_4" targetRef="ParallelGateway_6" />
- <bpmn2:exclusiveGateway id="ExclusiveGateway_6" default="SequenceFlow_26">
- <bpmn2:incoming>SequenceFlow_24</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_25</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_26</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_25" name="" sourceRef="ExclusiveGateway_6" targetRef="ServiceTask_3">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("FH_request_id-Ok") ==true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="SequenceFlow_26" name="" sourceRef="ExclusiveGateway_6" targetRef="ServiceTask_2" />
- <bpmn2:serviceTask id="ServiceTask_3" name="Update Request Gamma">
- <bpmn2:extensionElements>
- <camunda:connector>
- <camunda:inputOutput>
- <camunda:inputParameter name="url"><![CDATA[${UrnPropertiesReader.getVariable("mso.adapters.db.att-endpoint", execution)}]]></camunda:inputParameter>
- <camunda:inputParameter name="method">POST</camunda:inputParameter>
- <camunda:inputParameter name="headers">
- <camunda:map>
- <camunda:entry key="content-type">application/soap+xml</camunda:entry>
- <camunda:entry key="Authorization">#{BasicAuthHeaderValueDB}</camunda:entry>
- <camunda:entry key="X-ONAP-RequestID">#{FH_request_id}</camunda:entry>
- </camunda:map>
- </camunda:inputParameter>
- <camunda:inputParameter name="payload">
- <camunda:script scriptFormat="groovy"><![CDATA[//println"INSIDE --> update Request Gamma"
-import org.onap.so.bpmn.common.scripts.*
-def updateRequestGamma= new FalloutHandler()
-return updateRequestGamma.updateRequestGammaPayload(execution)]]></camunda:script>
- </camunda:inputParameter>
- <camunda:outputParameter name="FH_updateRequestGammaResponse"><![CDATA[${statusCode == null || statusCode == 204 ? "" : response}]]></camunda:outputParameter>
- <camunda:outputParameter name="FH_updateRequestGammaResponseCode">${statusCode}</camunda:outputParameter>
- </camunda:inputOutput>
- <camunda:connectorId>soap-http-connector</camunda:connectorId>
- </camunda:connector>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_25</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_29</bpmn2:outgoing>
- </bpmn2:serviceTask>
- <bpmn2:sequenceFlow id="SequenceFlow_29" name="" sourceRef="ServiceTask_3" targetRef="ExclusiveGateway_7" />
- <bpmn2:boundaryEvent id="BoundaryEvent_2" name="Connect Fault" attachedToRef="ServiceTask_3">
- <bpmn2:outgoing>SequenceFlow_72</bpmn2:outgoing>
- <bpmn2:errorEventDefinition id="_ErrorEventDefinition_89" errorRef="Error_2" />
- </bpmn2:boundaryEvent>
- <bpmn2:exclusiveGateway id="ParallelGateway_5">
- <bpmn2:incoming>SequenceFlow_35</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_36</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_37</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_37" name="" sourceRef="ParallelGateway_5" targetRef="ParallelGateway_6" />
- <bpmn2:endEvent id="EndEvent_6" name="Normal End">
+ <bpmn2:endEvent id="EndEvent_6">
<bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
</bpmn2:endEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_72" name="" sourceRef="BoundaryEvent_2" targetRef="ScriptTask_6" />
- <bpmn2:scriptTask id="ScriptTask_6" name="Build Workflow Exception" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_72</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_31</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_79</bpmn2:outgoing>
+ <bpmn2:scriptTask id="ScriptTask_6" name="&#10;MSO&#10;Update&#10;(infra active req)&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1kx7ea5</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1u8shdz</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
def falloutHandler = new FalloutHandler()
-falloutHandler.buildDBWorkflowException(execution, "FH_updateRequestGammaResponseCode")]]></bpmn2:script>
+falloutHandler.updateInfraRequestDB(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_79" name="" sourceRef="ScriptTask_6" targetRef="EndEvent_13" />
- <bpmn2:exclusiveGateway id="ExclusiveGateway_7" name="Update Success?" default="SequenceFlow_31">
- <bpmn2:incoming>SequenceFlow_29</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_31</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_35</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_31" name="" sourceRef="ExclusiveGateway_7" targetRef="ScriptTask_6" />
- <bpmn2:sequenceFlow id="SequenceFlow_35" name="" sourceRef="ExclusiveGateway_7" targetRef="ParallelGateway_5">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("FH_updateRequestGammaResponseCode")==200}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:scriptTask id="ScriptTask_7" name="Build Workflow Exception" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_32</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_80</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_73</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-def falloutHandler = new FalloutHandler()
-falloutHandler.buildDBWorkflowException(execution, "FH_updateRequestInfraResponseCode")]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_73" name="" sourceRef="ScriptTask_7" targetRef="EndEvent_14" />
- <bpmn2:serviceTask id="ServiceTask_2" name="Update Request Infra">
- <bpmn2:extensionElements>
- <camunda:connector>
- <camunda:inputOutput>
- <camunda:inputParameter name="url"><![CDATA[${UrnPropertiesReader.getVariable("mso.adapters.openecomp.db.endpoint", execution)}]]></camunda:inputParameter>
- <camunda:inputParameter name="method">POST</camunda:inputParameter>
- <camunda:inputParameter name="headers">
- <camunda:map>
- <camunda:entry key="content-type">application/soap+xml</camunda:entry>
- <camunda:entry key="Authorization">#{BasicAuthHeaderValueDB}</camunda:entry>
- <camunda:entry key="X-ONAP-RequestID">#{FH_request_id}</camunda:entry>
- </camunda:map>
- </camunda:inputParameter>
- <camunda:inputParameter name="payload">
- <camunda:script scriptFormat="groovy"><![CDATA[//println"INSIDE --> update Request Infra"
-import org.onap.so.bpmn.common.scripts.*
-def updateRequestInfra= new FalloutHandler()
-return updateRequestInfra.updateRequestInfraPayload(execution)]]></camunda:script>
- </camunda:inputParameter>
- <camunda:outputParameter name="FH_updateRequestInfraResponse"><![CDATA[${statusCode == null || statusCode == 204 ? "" : response}]]></camunda:outputParameter>
- <camunda:outputParameter name="FH_updateRequestInfraResponseCode">${statusCode}</camunda:outputParameter>
- </camunda:inputOutput>
- <camunda:connectorId>soap-http-connector</camunda:connectorId>
- </camunda:connector>
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_26</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_30</bpmn2:outgoing>
- </bpmn2:serviceTask>
- <bpmn2:sequenceFlow id="SequenceFlow_30" name="" sourceRef="ServiceTask_2" targetRef="ExclusiveGateway_8" />
- <bpmn2:exclusiveGateway id="ExclusiveGateway_8" name="Update Success?" default="SequenceFlow_32">
- <bpmn2:incoming>SequenceFlow_30</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_32</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_36</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_32" name="" sourceRef="ExclusiveGateway_8" targetRef="ScriptTask_7" />
- <bpmn2:sequenceFlow id="SequenceFlow_36" name="" sourceRef="ExclusiveGateway_8" targetRef="ParallelGateway_5">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("FH_updateRequestInfraResponseCode")==200}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:boundaryEvent id="BoundaryEvent_3" name="Connect Fault" attachedToRef="ServiceTask_2">
- <bpmn2:outgoing>SequenceFlow_80</bpmn2:outgoing>
- <bpmn2:errorEventDefinition id="_ErrorEventDefinition_90" errorRef="Error_2" camunda:errorCodeVariable="gJavaErrorCode" camunda:errorMessageVariable="gJavaErrorMessage" />
- </bpmn2:boundaryEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_80" name="" sourceRef="BoundaryEvent_3" targetRef="ScriptTask_7" />
<bpmn2:subProcess id="SubProcess_1" name="Event Handler" triggeredByEvent="true">
<bpmn2:scriptTask id="ScriptTask_4" name="Handle Event" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_1ko8ggw</bpmn2:incoming>
@@ -200,345 +59,94 @@ execution.setVariable("FH_WorkflowException", wfe)]]></bpmn2:script>
<bpmn2:sequenceFlow id="SequenceFlow_1ko8ggw" sourceRef="StartEvent_2" targetRef="ScriptTask_4" />
<bpmn2:sequenceFlow id="SequenceFlow_1pm9r7h" sourceRef="ScriptTask_4" targetRef="EndEvent_2" />
</bpmn2:subProcess>
- <bpmn2:endEvent id="EndEvent_14">
- <bpmn2:incoming>SequenceFlow_73</bpmn2:incoming>
- <bpmn2:terminateEventDefinition />
- </bpmn2:endEvent>
- <bpmn2:endEvent id="EndEvent_13">
- <bpmn2:incoming>SequenceFlow_79</bpmn2:incoming>
- <bpmn2:terminateEventDefinition />
- </bpmn2:endEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_0m7gwor" sourceRef="Task_0ixuwt5" targetRef="ParallelGateway_4" />
- <bpmn2:callActivity id="Task_0ixuwt5" name="Call Notification Service" calledElement="${UrnPropertiesReader.getVariable(&#34;mso.workflow.notification.name&#34;, execution)}">
- <bpmn2:extensionElements>
- <camunda:in source="mso-request-id" target="mso-request-id" />
- <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
- <camunda:in variables="all" />
- <camunda:out variables="all" />
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_0m7gwor</bpmn2:outgoing>
- </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_1kx7ea5" sourceRef="ScriptTask_8" targetRef="ScriptTask_6" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1u8shdz" sourceRef="ScriptTask_6" targetRef="ScriptTask_2" />
</bpmn2:process>
<bpmn2:error id="Error_1" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
<bpmn2:error id="Error_2" name="Java Lang Exception" errorCode="java.lang.Exception" />
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="FalloutHandler">
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_52" bpmnElement="StartEvent_1">
- <dc:Bounds x="139" y="263" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="145" y="300" width="23" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ParallelGateway_12" bpmnElement="ParallelGateway_1">
- <dc:Bounds x="342" y="255" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="367" y="310" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_74" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">
- <dc:Bounds x="415" y="107" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="315" y="89" width="81" height="24" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ParallelGateway_12" targetElement="_BPMNShape_ExclusiveGateway_74">
- <di:waypoint xsi:type="dc:Point" x="367" y="255" />
- <di:waypoint xsi:type="dc:Point" x="367" y="132" />
- <di:waypoint xsi:type="dc:Point" x="415" y="132" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="438" y="212" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ExclusiveGateway_74" targetElement="CallActivity_0jz0w0k_di">
- <di:waypoint xsi:type="dc:Point" x="440" y="107" />
- <di:waypoint xsi:type="dc:Point" x="440" y="65" />
- <di:waypoint xsi:type="dc:Point" x="553" y="65" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="475" y="70" width="18" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ParallelGateway_15" bpmnElement="ParallelGateway_4" isMarkerVisible="true">
- <dc:Bounds x="742" y="107" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="767" y="162" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_ExclusiveGateway_74" targetElement="_BPMNShape_ParallelGateway_15">
- <di:waypoint xsi:type="dc:Point" x="440" y="157" />
- <di:waypoint xsi:type="dc:Point" x="441" y="198" />
- <di:waypoint xsi:type="dc:Point" x="767" y="198" />
- <di:waypoint xsi:type="dc:Point" x="767" y="157" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="452" y="173" width="12" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_79" bpmnElement="ExclusiveGateway_6" isMarkerVisible="true">
- <dc:Bounds x="412" y="468" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="437" y="523" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_24" sourceElement="_BPMNShape_ParallelGateway_12" targetElement="_BPMNShape_ExclusiveGateway_79">
- <di:waypoint xsi:type="dc:Point" x="367" y="305" />
- <di:waypoint xsi:type="dc:Point" x="367" y="493" />
- <di:waypoint xsi:type="dc:Point" x="412" y="493" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="415" y="445" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_25" bpmnElement="SequenceFlow_25" sourceElement="_BPMNShape_ExclusiveGateway_79" targetElement="_BPMNShape_ServiceTask_90">
- <di:waypoint xsi:type="dc:Point" x="437" y="468" />
- <di:waypoint xsi:type="dc:Point" x="437" y="402" />
- <di:waypoint xsi:type="dc:Point" x="492" y="402" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="437" y="444" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_26" bpmnElement="SequenceFlow_26" sourceElement="_BPMNShape_ExclusiveGateway_79" targetElement="_BPMNShape_ServiceTask_91">
- <di:waypoint xsi:type="dc:Point" x="437" y="518" />
- <di:waypoint xsi:type="dc:Point" x="437" y="650" />
- <di:waypoint xsi:type="dc:Point" x="488" y="650" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="437" y="596" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_90" bpmnElement="ServiceTask_3">
- <dc:Bounds x="492" y="362" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_91" bpmnElement="ServiceTask_2">
- <dc:Bounds x="488" y="610" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_80" bpmnElement="ExclusiveGateway_7" isMarkerVisible="true">
- <dc:Bounds x="675" y="376" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="657" y="431" width="87" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_29" bpmnElement="SequenceFlow_29" sourceElement="_BPMNShape_ServiceTask_90" targetElement="_BPMNShape_ExclusiveGateway_80">
- <di:waypoint xsi:type="dc:Point" x="592" y="402" />
- <di:waypoint xsi:type="dc:Point" x="675" y="401" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="632" y="404" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_81" bpmnElement="ExclusiveGateway_8" isMarkerVisible="true">
- <dc:Bounds x="674" y="625" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="656" y="680" width="87" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_30" bpmnElement="SequenceFlow_30" sourceElement="_BPMNShape_ServiceTask_91" targetElement="_BPMNShape_ExclusiveGateway_81">
- <di:waypoint xsi:type="dc:Point" x="588" y="650" />
- <di:waypoint xsi:type="dc:Point" x="626" y="650" />
- <di:waypoint xsi:type="dc:Point" x="626" y="649" />
- <di:waypoint xsi:type="dc:Point" x="674" y="650" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="636" y="651" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_31" bpmnElement="SequenceFlow_31" sourceElement="_BPMNShape_ExclusiveGateway_80" targetElement="_BPMNShape_ScriptTask_252">
- <di:waypoint xsi:type="dc:Point" x="700" y="376" />
- <di:waypoint xsi:type="dc:Point" x="701" y="324" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="707" y="351" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_32" bpmnElement="SequenceFlow_32" sourceElement="_BPMNShape_ExclusiveGateway_81" targetElement="_BPMNShape_ScriptTask_253">
- <di:waypoint xsi:type="dc:Point" x="699" y="625" />
- <di:waypoint xsi:type="dc:Point" x="699" y="608" />
- <di:waypoint xsi:type="dc:Point" x="699" y="577" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="709" y="657" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ParallelGateway_16" bpmnElement="ParallelGateway_5" isMarkerVisible="true">
- <dc:Bounds x="853" y="468" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="878" y="523" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_35" bpmnElement="SequenceFlow_35" sourceElement="_BPMNShape_ExclusiveGateway_80" targetElement="_BPMNShape_ParallelGateway_16">
- <di:waypoint xsi:type="dc:Point" x="725" y="401" />
- <di:waypoint xsi:type="dc:Point" x="878" y="401" />
- <di:waypoint xsi:type="dc:Point" x="878" y="468" />
+ <dc:Bounds x="128" y="162" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="762" y="392" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_36" bpmnElement="SequenceFlow_36" sourceElement="_BPMNShape_ExclusiveGateway_81" targetElement="_BPMNShape_ParallelGateway_16">
- <di:waypoint xsi:type="dc:Point" x="724" y="650" />
- <di:waypoint xsi:type="dc:Point" x="878" y="650" />
- <di:waypoint xsi:type="dc:Point" x="878" y="518" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="878" y="574" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ParallelGateway_17" bpmnElement="ParallelGateway_6">
- <dc:Bounds x="957" y="254" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="982" y="309" width="0" height="0" />
+ <dc:Bounds x="134" y="199" width="24" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_37" bpmnElement="SequenceFlow_37" sourceElement="_BPMNShape_ParallelGateway_16" targetElement="_BPMNShape_ParallelGateway_17">
- <di:waypoint xsi:type="dc:Point" x="903" y="493" />
- <di:waypoint xsi:type="dc:Point" x="982" y="493" />
- <di:waypoint xsi:type="dc:Point" x="982" y="304" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="943" y="478" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_38" bpmnElement="SequenceFlow_38" sourceElement="_BPMNShape_ParallelGateway_15" targetElement="_BPMNShape_ParallelGateway_17">
- <di:waypoint xsi:type="dc:Point" x="792" y="132" />
- <di:waypoint xsi:type="dc:Point" x="982" y="132" />
- <di:waypoint xsi:type="dc:Point" x="982" y="254" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="887" y="117" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_StartEvent_52" targetElement="_BPMNShape_ScriptTask_99">
- <di:waypoint xsi:type="dc:Point" x="175" y="281" />
- <di:waypoint xsi:type="dc:Point" x="211" y="281" />
+ <di:waypoint xsi:type="dc:Point" x="164" y="180" />
+ <di:waypoint xsi:type="dc:Point" x="279" y="180" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="193" y="281" width="0" height="0" />
+ <dc:Bounds x="176.5" y="165" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="_BPMNShape_ScriptTask_99" bpmnElement="ScriptTask_8">
- <dc:Bounds x="211" y="241" width="100" height="80" />
+ <dc:Bounds x="279" y="140" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_SubProcess_14" bpmnElement="SubProcess_1" isExpanded="true">
- <dc:Bounds x="146" y="759" width="329" height="167" />
+ <dc:Bounds x="220" y="365" width="329" height="167" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_ScriptTask_100" bpmnElement="ScriptTask_4">
- <dc:Bounds x="259" y="803" width="100" height="80" />
+ <dc:Bounds x="333" y="409" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_54" bpmnElement="StartEvent_2">
- <dc:Bounds x="175" y="825" width="36" height="36" />
+ <dc:Bounds x="249" y="431" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="193" y="869" width="0" height="0" />
+ <dc:Bounds x="222" y="475" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_ScriptTask_101" bpmnElement="ScriptTask_2">
- <dc:Bounds x="1054" y="240" width="100" height="80" />
+ <dc:Bounds x="589" y="140" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ParallelGateway_17" targetElement="_BPMNShape_ScriptTask_101">
- <di:waypoint xsi:type="dc:Point" x="1007" y="279" />
- <di:waypoint xsi:type="dc:Point" x="1054" y="280" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1177" y="280" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_ScriptTask_99" targetElement="_BPMNShape_ParallelGateway_12">
- <di:waypoint xsi:type="dc:Point" x="311" y="281" />
- <di:waypoint xsi:type="dc:Point" x="342" y="280" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="327" y="281" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="_BPMNShape_EndEvent_129" bpmnElement="EndEvent_6">
- <dc:Bounds x="1188" y="262" width="36" height="36" />
+ <dc:Bounds x="856" y="162" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1177" y="303" width="57" height="12" />
+ <dc:Bounds x="845" y="203" width="57" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_ScriptTask_101" targetElement="_BPMNShape_EndEvent_129">
- <di:waypoint xsi:type="dc:Point" x="1154" y="280" />
- <di:waypoint xsi:type="dc:Point" x="1188" y="280" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1171" y="280" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_31" bpmnElement="BoundaryEvent_2">
- <dc:Bounds x="525" y="344" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="563" y="300" width="68" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_32" bpmnElement="BoundaryEvent_3">
- <dc:Bounds x="521" y="592" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="563" y="554" width="68" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_72" bpmnElement="SequenceFlow_72" sourceElement="_BPMNShape_BoundaryEvent_31" targetElement="_BPMNShape_ScriptTask_252">
- <di:waypoint xsi:type="dc:Point" x="543" y="344" />
- <di:waypoint xsi:type="dc:Point" x="543" y="284" />
- <di:waypoint xsi:type="dc:Point" x="651" y="284" />
+ <di:waypoint xsi:type="dc:Point" x="689" y="180" />
+ <di:waypoint xsi:type="dc:Point" x="856" y="180" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="543" y="326" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_73" bpmnElement="SequenceFlow_73" sourceElement="_BPMNShape_ScriptTask_253">
- <di:waypoint xsi:type="dc:Point" x="750" y="537" />
- <di:waypoint xsi:type="dc:Point" x="790" y="537" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="770" y="522" width="0" height="0" />
+ <dc:Bounds x="727.5" y="165" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="_BPMNShape_ScriptTask_252" bpmnElement="ScriptTask_6">
- <dc:Bounds x="651" y="244" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_253" bpmnElement="ScriptTask_7">
- <dc:Bounds x="650" y="497" width="100" height="80" />
+ <dc:Bounds x="431" y="141" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_79" bpmnElement="SequenceFlow_79" sourceElement="_BPMNShape_ScriptTask_252">
- <di:waypoint xsi:type="dc:Point" x="751" y="284" />
- <di:waypoint xsi:type="dc:Point" x="793" y="284" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="772" y="269" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_80" bpmnElement="SequenceFlow_80" sourceElement="_BPMNShape_BoundaryEvent_32" targetElement="_BPMNShape_ScriptTask_253">
- <di:waypoint xsi:type="dc:Point" x="539" y="592" />
- <di:waypoint xsi:type="dc:Point" x="539" y="537" />
- <di:waypoint xsi:type="dc:Point" x="650" y="537" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="567" y="537" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="EndEvent_0b9vn2u_di" bpmnElement="EndEvent_2">
- <dc:Bounds x="403" y="825" width="36" height="36" />
+ <dc:Bounds x="477" y="431" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="399" y="869" width="47" height="12" />
+ <dc:Bounds x="473" y="475" width="47" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="EndEvent_1fmpj5u_di" bpmnElement="EndEvent_14">
- <dc:Bounds x="790" y="519" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="808" y="560" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="EndEvent_0w1puhf_di" bpmnElement="EndEvent_13">
- <dc:Bounds x="793" y="266" width="36" height="36" />
+ <bpmndi:BPMNEdge id="SequenceFlow_1ko8ggw_di" bpmnElement="SequenceFlow_1ko8ggw">
+ <di:waypoint xsi:type="dc:Point" x="285" y="449" />
+ <di:waypoint xsi:type="dc:Point" x="333" y="449" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="811" y="307" width="0" height="0" />
+ <dc:Bounds x="264" y="424" width="90" height="0" />
</bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_0m7gwor_di" bpmnElement="SequenceFlow_0m7gwor">
- <di:waypoint xsi:type="dc:Point" x="654" y="65" />
- <di:waypoint xsi:type="dc:Point" x="767" y="65" />
- <di:waypoint xsi:type="dc:Point" x="767" y="107" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1pm9r7h_di" bpmnElement="SequenceFlow_1pm9r7h">
+ <di:waypoint xsi:type="dc:Point" x="433" y="449" />
+ <di:waypoint xsi:type="dc:Point" x="477" y="449" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="711" y="50" width="0" height="0" />
+ <dc:Bounds x="410" y="424" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1ko8ggw_di" bpmnElement="SequenceFlow_1ko8ggw">
- <di:waypoint xsi:type="dc:Point" x="211" y="843" />
- <di:waypoint xsi:type="dc:Point" x="259" y="843" />
+ <bpmndi:BPMNEdge id="SequenceFlow_1kx7ea5_di" bpmnElement="SequenceFlow_1kx7ea5">
+ <di:waypoint xsi:type="dc:Point" x="379" y="180" />
+ <di:waypoint xsi:type="dc:Point" x="431" y="181" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="235" y="818" width="0" height="0" />
+ <dc:Bounds x="405" y="159.5" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1pm9r7h_di" bpmnElement="SequenceFlow_1pm9r7h">
- <di:waypoint xsi:type="dc:Point" x="359" y="843" />
- <di:waypoint xsi:type="dc:Point" x="403" y="843" />
+ <bpmndi:BPMNEdge id="SequenceFlow_1u8shdz_di" bpmnElement="SequenceFlow_1u8shdz">
+ <di:waypoint xsi:type="dc:Point" x="531" y="181" />
+ <di:waypoint xsi:type="dc:Point" x="589" y="180" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="381" y="818" width="0" height="0" />
+ <dc:Bounds x="560" y="159.5" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="CallActivity_0jz0w0k_di" bpmnElement="Task_0ixuwt5">
- <dc:Bounds x="554" y="25" width="100" height="80" />
- </bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn2:definitions>
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CompleteMsoProcessTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CompleteMsoProcessTest.groovy
index 99c351c465..119159f458 100644
--- a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CompleteMsoProcessTest.groovy
+++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CompleteMsoProcessTest.groovy
@@ -1,22 +1,22 @@
-/*-
- * ============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=========================================================
- */
+/*-
+ * ============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.bpmn.common.scripts
@@ -24,13 +24,17 @@ import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.delegate.DelegateExecution
import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
import org.junit.Before
+import org.junit.Ignore
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.ArgumentCaptor
+import org.mockito.Mock
import org.mockito.MockitoAnnotations
+import org.mockito.Spy
import org.mockito.runners.MockitoJUnitRunner
import org.onap.so.bpmn.core.WorkflowException
-
+import org.onap.so.db.request.beans.InfraActiveRequests
+import org.onap.so.db.request.client.RequestsDbClient
import static org.assertj.core.api.Assertions.assertThat
import static org.assertj.core.api.Assertions.assertThatThrownBy
import static org.mockito.ArgumentMatchers.eq
@@ -38,27 +42,20 @@ import static org.mockito.Mockito.*
@RunWith(MockitoJUnitRunner.class)
class CompleteMsoProcessTest {
- @Before
- public void init() {
- MockitoAnnotations.initMocks(this)
- }
-
- private String completeMsoProcessRequest = """
- <sdncadapterworkflow:MsoCompletionRequest xmlns:ns="http://org.onap/so/request/types/v1" xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
- <ns:request-information>
- <ns:request-id>uCPE1020_STUW105_5002</ns:request-id>
- <ns:request-action>Layer3ServiceActivateRequest</ns:request-action>
- <ns:request-sub-action>COMPLETE</ns:request-sub-action>
- <ns:source>OMX</ns:source>
- <ns:notification-url>http://localhost:28090/CCD/StatusNotification</ns:notification-url>
- <ns:order-number>10205000</ns:order-number>
- <ns:order-version>1</ns:order-version>
- </ns:request-information>
- <sdncadapterworkflow:mso-bpel-name>UCPELayer3ServiceActivateV1</sdncadapterworkflow:mso-bpel-name>
- </sdncadapterworkflow:MsoCompletionRequest>
- """
-
- private String completeMsoNetworkProcessRequest = """
+
+ @Mock
+ RequestsDbClient requestsDbClient;
+
+ @Spy
+ CompleteMsoProcess completeMsoProcess;
+
+
+ @Before
+ public void init() {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ private String completeMsoNetworkProcessRequest = """
<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
xmlns:ns="http://org.onap/so/request/types/v1">
<request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
@@ -71,104 +68,39 @@ class CompleteMsoProcessTest {
<aetgt:mso-bpel-name>BPMN Network action: CREATE</aetgt:mso-bpel-name>
</aetgt:MsoCompletionRequest>"""
- @Test
- public void testPreProcessRequest() {
-
- ExecutionEntity mockExecution = mock(ExecutionEntity.class)
- when(mockExecution.getVariable("CompleteMsoProcessRequest")).thenReturn(completeMsoProcessRequest)
- when(mockExecution.getVariable("mso.adapters.db.auth")).thenReturn("5E12ACACBD552A415E081E29F2C4772F9835792A51C766CCFDD7433DB5220B59969CB2798C");
- when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7");
-
- CompleteMsoProcess completeMsoProcess = new CompleteMsoProcess()
- completeMsoProcess.preProcessRequest(mockExecution)
-
- /* Initialize all the process request variables in this block */
- verify(mockExecution).setVariable("prefix","CMSO_")
- //verify(mockExecution).setVariable("getLayer3ServiceDetailsV1Response","")
- verify(mockExecution).setVariable("CMSO_request_id","")
- verify(mockExecution).setVariable("CMSO_notification-url","")
- verify(mockExecution).setVariable("CMSO_mso-bpel-name","")
- verify(mockExecution).setVariable("CMSO_request_action","")
-
- verify(mockExecution).setVariable("CMSO_notification-url-Ok", false)
- verify(mockExecution).setVariable("CMSO_request_id-Ok", false)
-
- //updateRequest Adapter process variables
- verify(mockExecution).setVariable("CMSO_updateRequestResponse", "")
- verify(mockExecution).setVariable("CMSO_updateRequestResponseCode", "")
- verify(mockExecution).setVariable("CMSO_updateFinalNotifyAckStatusFailedPayload", "")
-
- //Set DB adapter variables here
- verify(mockExecution).setVariable("CMSO_updateDBStatusToSuccessPayload", "")
- verify(mockExecution).setVariable("CMSO_updateInfraRequestDBPayload", "")
- verify(mockExecution).setVariable("CMSO_setUpdateDBstatustoSuccessPayload", "")
-
- //Auth variables
- verify(mockExecution).setVariable("BasicAuthHeaderValue","")
-
- //Response variables
- verify(mockExecution).setVariable("CompletionHandlerResponse","")
- verify(mockExecution).setVariable("CMSO_ErrorResponse", null)
- verify(mockExecution).setVariable("CMSO_ResponseCode", "")
-
- verify(mockExecution).setVariable("CMSO_notification-url-Ok",true)
- verify(mockExecution).setVariable("CMSO_request_id-Ok",true)
- verify(mockExecution).setVariable("CMSO_notification-url","http://localhost:28090/CCD/StatusNotification")
- verify(mockExecution).setVariable("CMSO_request_id","uCPE1020_STUW105_5002")
- verify(mockExecution).setVariable("CMSO_request_action","Layer3ServiceActivateRequest")
- verify(mockExecution).setVariable("CMSO_source","OMX")
-
- }
-
- private String setUpdateDBstatustoSuccessPayload = """
- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://org.onap.so/requestsdb">
- <soapenv:Header/>
- <soapenv:Body>
- <req:updateInfraRequest>
- <requestId>testReqId</requestId>
- <lastModifiedBy>BPEL</lastModifiedBy>
- <statusMessage>Resource Completed Successfully</statusMessage>
- <requestStatus>COMPLETE</requestStatus>
- <progress>100</progress>
- <networkId>bd631913-cfc6-488b-ba22-6b98504f703d</networkId>
- </req:updateInfraRequest>
- </soapenv:Body>
- </soapenv:Envelope>"""
-
- @Test
- public void testsetUpdateDBstatustoSuccessPayload(){
-
- ExecutionEntity mockExecution = mock(ExecutionEntity.class)
- when(mockExecution.getVariable("CMSO_request_id")).thenReturn("testReqId")
- when(mockExecution.getVariable("CMSO_mso-bpel-name")).thenReturn("BPEL")
- when(mockExecution.getVariable("mso.adapters.db.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC");
- when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7");
- when(mockExecution.getVariable("CompleteMsoProcessRequest")).thenReturn(completeMsoNetworkProcessRequest);
-
- CompleteMsoProcess completeMsoProcess = new CompleteMsoProcess()
- completeMsoProcess.setUpdateDBstatustoSuccessPayload(mockExecution)
-
- verify(mockExecution).setVariable("CMSO_setUpdateDBstatustoSuccessPayload",setUpdateDBstatustoSuccessPayload)
- }
-
- private String msoCompletionResponse = """onse xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
- <sdncadapterworkflow:out>BPEL BPEL-NAME FAILED</sdncadapterworkflow:out>
-</sdncadapterworkflow:MsoCompletionResponse>"""
-
-
- @Test
- void postProcessResponse_successful() {
- DelegateExecution mockExecution = mock(DelegateExecution.class)
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("CMSO_mso-bpel-name")).thenReturn("mso-bpel-test")
- new CompleteMsoProcess().postProcessResponse(mockExecution)
-
- String expectedResponse = "<sdncadapterworkflow:MsoCompletionResponse xmlns:sdncadapterworkflow=\"http://ecomp.com/mso/workflow/schema/v1\">\n" +
- " <sdncadapterworkflow:out>BPEL mso-bpel-test completed</sdncadapterworkflow:out>\n" +
- "</sdncadapterworkflow:MsoCompletionResponse>"
-
- verify(mockExecution).setVariable("WorkflowResponse", expectedResponse)
- verify(mockExecution).setVariable("CompleteMsoProcessResponse", expectedResponse)
- verify(mockExecution).setVariable("CMSO_ResponseCode", "200")
- }
+ @Test
+ public void testPreProcessRequest() {
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ when(mockExecution.getVariable("CompleteMsoProcessRequest")).thenReturn(completeMsoNetworkProcessRequest)
+
+ completeMsoProcess.preProcessRequest(mockExecution)
+
+ verify(mockExecution).setVariable("CMSO_request_id", "bd631913-cfc6-488b-ba22-6b98504f703d")
+ }
+
+
+ @Test
+ public void testUpdateInfraRequestDB(){
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ when(mockExecution.getVariable("CMSO_request_id")).thenReturn("testReqId")
+ when(mockExecution.getVariable("CompleteMsoProcessRequest")).thenReturn(completeMsoNetworkProcessRequest);
+ when(completeMsoProcess.getDbClient()).thenReturn(requestsDbClient)
+ completeMsoProcess.updateInfraRequestDB(mockExecution)
+
+ InfraActiveRequests request = new InfraActiveRequests()
+ request.setRequestId("testReqId")
+
+ completeMsoProcess.updateInfraRequestDB(mockExecution)
+
+ request.setRequestStatus("COMPLETED")
+ request.setStatusMessage("Resource Completed Successfully")
+ request.setProgress(100)
+ request.setLastModifiedBy("BPMN")
+ request.setNetworkId("bd631913-cfc6-488b-ba22-6b98504f703d")
+
+
+ verify(requestsDbClient, times(2)).updateInfraActiveRequests(request, null, null)
+ }
} \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/FalloutHandlerTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/FalloutHandlerTest.groovy
index 25f62a6555..6cae293971 100644
--- a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/FalloutHandlerTest.groovy
+++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/FalloutHandlerTest.groovy
@@ -1,22 +1,22 @@
-/*-
- * ============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=========================================================
- */
+/*-
+ * ============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.bpmn.common.scripts
@@ -29,31 +29,41 @@ import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.ArgumentCaptor;
+import org.mockito.Mock
import org.mockito.MockitoAnnotations
+import org.mockito.Spy
import org.mockito.runners.MockitoJUnitRunner
import org.onap.so.bpmn.common.scripts.MsoUtils;
+import org.onap.so.db.request.beans.InfraActiveRequests
+import org.onap.so.db.request.client.RequestsDbClient
import org.onap.so.bpmn.common.scripts.FalloutHandler;
@RunWith(MockitoJUnitRunner.class)
class FalloutHandlerTest {
-
- public MsoUtils utils = new MsoUtils()
-
- @Before
- public void init() {
- MockitoAnnotations.initMocks(this)
- }
- private String falloutHandlerRequest = """
+ public MsoUtils utils = new MsoUtils()
+
+ @Spy
+ FalloutHandler falloutHandler = new FalloutHandler()
+
+ @Mock
+ RequestsDbClient requestsDbClient;
+
+ @Before
+ public void init() {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ private String falloutHandlerRequest = """
<sdncadapterworkflow:FalloutHandlerRequest xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1" xmlns:ns7="http://org.onap/so/request/types/v1">
- <ns7:request-information>
+ <ns7:request-info>
<ns7:request-id>uCPE1020_STUW105_5002</ns7:request-id>
<ns7:request-action>Layer3ServiceActivateRequest</ns7:request-action>
<ns7:request-sub-action>CANCEL</ns7:request-sub-action>
<ns7:source>OMX</ns7:source>
<ns7:order-number>10205000</ns7:order-number>
<ns7:order-version>1</ns7:order-version>
- </ns7:request-information>
+ </ns7:request-info>
<sdncadapterworkflow:WorkflowException>
<sdncadapterworkflow:ErrorMessage>Some Error Message - Fallout Handler</sdncadapterworkflow:ErrorMessage>
<sdncadapterworkflow:ErrorCode>Some Error Code - Fallout Handler</sdncadapterworkflow:ErrorCode>
@@ -62,251 +72,64 @@ class FalloutHandlerTest {
</sdncadapterworkflow:FalloutHandlerRequest>
"""
- private String falloutHandlerResponse = """<workflow:FalloutHandlerResponse xmlns:workflow="http://org.onap/so/workflow/schema/v1">
+ private String falloutHandlerResponse = """<workflow:FalloutHandlerResponse xmlns:workflow="http://org.onap/so/workflow/schema/v1">
<workflow:out>Fallout Handler Failed</workflow:out>
</workflow:FalloutHandlerResponse>"""
- @Test
- public void testPreProcessRequest() {
-
- ExecutionEntity mockExecution = mock(ExecutionEntity.class)
-
- when(mockExecution.getVariable("FalloutHandlerRequest")).thenReturn(falloutHandlerRequest)
- when(mockExecution.getVariable("mso.adapters.db.auth")).thenReturn("5E12ACACBD552A415E081E29F2C4772F9835792A51C766CCFDD7433DB5220B59969CB2798C");
- when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7");
-
- FalloutHandler falloutHandler = new FalloutHandler()
- falloutHandler.preProcessRequest(mockExecution)
-
- /* Initialize all the process request variables in this block */
- verify(mockExecution).setVariable("prefix","FH_")
- //verify(mockExecution).setVariable("getLayer3ServiceDetailsV1Response","")
+ @Test
+ public void testPreProcessRequest() {
- //These variables are form the input Message to the BPMN
- verify(mockExecution).setVariable("FH_request_id","")
- verify(mockExecution).setVariable("FH_request_action","")
- verify(mockExecution).setVariable("FH_notification-url","")
- verify(mockExecution).setVariable("FH_mso-bpel-name","")
- verify(mockExecution).setVariable("FH_ErrorCode", "")
- verify(mockExecution).setVariable("FH_ErrorMessage", "")
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
- verify(mockExecution).setVariable("FH_notification-url-Ok", false)
- verify(mockExecution).setVariable("FH_request_id-Ok", false)
+ when(mockExecution.getVariable("FalloutHandlerRequest")).thenReturn(falloutHandlerRequest)
- //These variables are for Get Mso Aai Password Adapter
- verify(mockExecution).setVariable("FH_deliveryStatus", true)
+ falloutHandler.preProcessRequest(mockExecution)
- //update Response Status to pending ...Adapter variables
- verify(mockExecution).setVariable("FH_updateResponseStatusPayload", null)
- verify(mockExecution).setVariable("FH_updateResponseStatusResponse", null)
+ verify(mockExecution).setVariable("FH_success", true)
+ verify(mockExecution).setVariable("FH_request_id","uCPE1020_STUW105_5002")
+ verify(mockExecution).setVariable("FH_ErrorCode","Some Error Code - Fallout Handler")
+ verify(mockExecution).setVariable("FH_ErrorMessage","Some Error Message - Fallout Handler")
+ }
- //update Request Gamma ...Adapter variables
- verify(mockExecution).setVariable("FH_updateRequestGammaPayload", "")
- verify(mockExecution).setVariable("FH_updateRequestGammaResponse", null)
- verify(mockExecution).setVariable("FH_updateRequestGammaResponseCode", null)
+ @Test
+ public void testpostProcessResponse(){
- //update Request Infra ...Adapter variables
- verify(mockExecution).setVariable("FH_updateRequestInfraPayload", "")
- verify(mockExecution).setVariable("FH_updateRequestInfraResponse", null)
- verify(mockExecution).setVariable("FH_updateRequestInfraResponseCode", null)
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
- //assign False to success variable
- verify(mockExecution).setVariable("FH_success", true)
+ when(mockExecution.getVariable("FH_success")).thenReturn(false)
- //Set notify status to Failed variable
- verify(mockExecution).setVariable("FH_NOTIFY_STATUS", "SUCCESS")
+ falloutHandler.postProcessResponse(mockExecution)
- //Set DB update variable
- verify(mockExecution).setVariable("FH_updateRequestPayload", "")
- verify(mockExecution).setVariable("FH_updateRequestResponse", null)
- verify(mockExecution).setVariable("FH_updateRequestResponseCode", null)
+ // Capture the arguments to setVariable
+ ArgumentCaptor<String> captor1 = ArgumentCaptor.forClass(String.class);
+ ArgumentCaptor<String> captor2 = ArgumentCaptor.forClass(String.class);
- //Auth variables
- verify(mockExecution).setVariable("BasicAuthHeaderValue","")
+ verify(mockExecution, times(4)).setVariable(captor1.capture(), captor2.capture())
+ List<String> arg2List = captor2.getAllValues()
+ String payloadResponseActual = arg2List.get(1)
- //Response variables
- verify(mockExecution).setVariable("FalloutHandlerResponse","")
- verify(mockExecution).setVariable("FH_ErrorResponse", null)
- verify(mockExecution).setVariable("FH_ResponseCode", "")
+ assertEquals(falloutHandlerResponse.replaceAll("\\s+", ""), payloadResponseActual.replaceAll("\\s+", ""))
- verify(mockExecution).setVariable("FH_request_id-Ok",true)
- verify(mockExecution).setVariable("FH_request_id","uCPE1020_STUW105_5002")
- verify(mockExecution).setVariable("FH_request_action","Layer3ServiceActivateRequest")
- verify(mockExecution).setVariable("FH_source","OMX")
- verify(mockExecution).setVariable("FH_ErrorCode","Some Error Code - Fallout Handler")
- verify(mockExecution).setVariable("FH_ErrorMessage","Some Error Message - Fallout Handler")
+ verify(mockExecution).setVariable("FH_ResponseCode","500")
+ }
- }
- @Test
- public void testpostProcessResponse(){
+ @Test
+ public void testUpdateInfraRequestDB(){
- ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ when(mockExecution.getVariable("FH_request_id")).thenReturn("testReqId")
+ when(mockExecution.getVariable("FH_ErrorMessage")).thenReturn("ErrorMessage")
+ when(falloutHandler.getDbClient()).thenReturn(requestsDbClient)
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("FH_success")).thenReturn(false)
-
- FalloutHandler falloutHandler = new FalloutHandler()
- falloutHandler.postProcessResponse(mockExecution)
-
- // Capture the arguments to setVariable
- ArgumentCaptor<String> captor1 = ArgumentCaptor.forClass(String.class);
- ArgumentCaptor<String> captor2 = ArgumentCaptor.forClass(String.class);
-
- verify(mockExecution, times(4)).setVariable(captor1.capture(), captor2.capture())
- List<String> arg2List = captor2.getAllValues()
- String payloadResponseActual = arg2List.get(1)
-
- assertEquals(falloutHandlerResponse.replaceAll("\\s+", ""), payloadResponseActual.replaceAll("\\s+", ""))
-
- verify(mockExecution).setVariable("FH_ResponseCode","500")
- }
-
- private String updateRequestPayload = """
- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://org.onap.so/requestsdb">
- <soapenv:Header/>
- <soapenv:Body>
- <req:updateRequest>
- <requestId>testReqId</requestId>
- <lastModifiedBy>BPEL</lastModifiedBy>
- <finalErrorMessage>ErrorMessage</finalErrorMessage>
- <finalErrorCode>ErrorCode</finalErrorCode>
- <status>FAILED</status>
- <responseStatus>NotifyStatus</responseStatus>
- </req:updateRequest>
- </soapenv:Body>
- </soapenv:Envelope>
- """
-
- @Test
- public void testupdateRequestPayload(){
-
- ExecutionEntity mockExecution = mock(ExecutionEntity.class)
- when(mockExecution.getVariable("FH_request_id")).thenReturn("testReqId")
- when(mockExecution.getVariable("FH_ErrorMessage")).thenReturn("ErrorMessage")
- when(mockExecution.getVariable("FH_ErrorCode")).thenReturn("ErrorCode")
- when(mockExecution.getVariable("FH_NOTIFY_STATUS")).thenReturn("NotifyStatus")
-
- FalloutHandler falloutHandler = new FalloutHandler()
- falloutHandler.updateRequestPayload(mockExecution)
-
- // Capture the arguments to setVariable
- ArgumentCaptor<String> captor1 = ArgumentCaptor.forClass(String.class);
- ArgumentCaptor<String> captor2 = ArgumentCaptor.forClass(String.class);
-
- verify(mockExecution, times(1)).setVariable(captor1.capture(), captor2.capture())
- List<String> arg2List = captor2.getAllValues()
- String payloadRequestActual = arg2List.get(0)
-
- assertEquals(updateRequestPayload.replaceAll("\\s+", ""), payloadRequestActual.replaceAll("\\s+", ""))
- }
-
- private String updateRequestInfraPayload = """
- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://org.onap.so/requestsdb">
- <soapenv:Header/>
- <soapenv:Body>
- <req:updateInfraRequest>
- <requestId>testReqId</requestId>
- <lastModifiedBy>BPEL</lastModifiedBy>
- <statusMessage>ErrorMessage</statusMessage>
- <requestStatus>FAILED</requestStatus>
- <progress>100</progress>
- </req:updateInfraRequest>
- </soapenv:Body>
- </soapenv:Envelope>
- """
-
- @Test
- public void testupdateRequestInfraPayload(){
-
- ExecutionEntity mockExecution = mock(ExecutionEntity.class)
- when(mockExecution.getVariable("FH_request_id")).thenReturn("testReqId")
- when(mockExecution.getVariable("FH_ErrorMessage")).thenReturn("ErrorMessage")
-
- FalloutHandler falloutHandler = new FalloutHandler()
- falloutHandler.updateRequestInfraPayload(mockExecution)
-
- // Capture the arguments to setVariable
- ArgumentCaptor<String> captor1 = ArgumentCaptor.forClass(String.class);
- ArgumentCaptor<String> captor2 = ArgumentCaptor.forClass(String.class);
-
- verify(mockExecution, times(1)).setVariable(captor1.capture(), captor2.capture())
- List<String> arg2List = captor2.getAllValues()
- String payloadRequestActual = arg2List.get(0)
-
- assertEquals(updateRequestInfraPayload.replaceAll("\\s+", ""), payloadRequestActual.replaceAll("\\s+", ""))
- }
-
- private String updateRequestGammaPayload = """
- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://org.onap.so/requestsdb">
- <soapenv:Header/>
- <soapenv:Body>
- <req:updateRequest>
- <requestId>testReqId</requestId>
- <lastModifiedBy>BPEL</lastModifiedBy>
- <finalErrorMessage>ErrorMessage</finalErrorMessage>
- <finalErrorCode>ErrorCode</finalErrorCode>
- <status>FAILED</status>
- </req:updateRequest>
- </soapenv:Body>
- </soapenv:Envelope>
- """
-
- @Test
- public void testupdateRequestGammaPayload(){
-
- ExecutionEntity mockExecution = mock(ExecutionEntity.class)
- when(mockExecution.getVariable("FH_request_id")).thenReturn("testReqId")
- when(mockExecution.getVariable("FH_ErrorMessage")).thenReturn("ErrorMessage")
- when(mockExecution.getVariable("FH_ErrorCode")).thenReturn("ErrorCode")
- when(mockExecution.getVariable("mso.default.adapter.namespace")).thenReturn("http://org.onap.so");
-
- FalloutHandler falloutHandler = new FalloutHandler()
- falloutHandler.updateRequestGammaPayload(mockExecution)
-
- // Capture the arguments to setVariable
- ArgumentCaptor<String> captor1 = ArgumentCaptor.forClass(String.class);
- ArgumentCaptor<String> captor2 = ArgumentCaptor.forClass(String.class);
-
- verify(mockExecution, times(1)).setVariable(captor1.capture(), captor2.capture())
- List<String> arg2List = captor2.getAllValues()
- String payloadRequestActual = arg2List.get(0)
-
- assertEquals(updateRequestGammaPayload.replaceAll("\\s+", ""), payloadRequestActual.replaceAll("\\s+", ""))
- }
-
-
- String updateResponseStatusPayload = """
- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://org.onap.so/requestsdb">
- <soapenv:Header/>
- <soapenv:Body>
- <req:updateResponseStatus>
- <requestId>testReqId</requestId>
- <lastModifiedBy>BPEL</lastModifiedBy>
- <responseStatus>SENDING_FINAL_NOTIFY</responseStatus>
- </req:updateResponseStatus>
- </soapenv:Body>
- </soapenv:Envelope>
- """
-
- @Test
- public void testupdateResponseStatusPayload(){
-
- ExecutionEntity mockExecution = mock(ExecutionEntity.class)
- when(mockExecution.getVariable("FH_request_id")).thenReturn("testReqId")
+ falloutHandler.updateInfraRequestDB(mockExecution)
- FalloutHandler falloutHandler = new FalloutHandler()
- falloutHandler.updateResponseStatusPayload(mockExecution)
-
- // Capture the arguments to setVariable
- ArgumentCaptor<String> captor1 = ArgumentCaptor.forClass(String.class);
- ArgumentCaptor<String> captor2 = ArgumentCaptor.forClass(String.class);
-
- verify(mockExecution, times(1)).setVariable(captor1.capture(), captor2.capture())
- List<String> arg2List = captor2.getAllValues()
- String payloadResponseActual = arg2List.get(0)
-
- assertEquals(updateResponseStatusPayload.replaceAll("\\s+", ""), payloadResponseActual.replaceAll("\\s+", ""))
- }
+ InfraActiveRequests infraRequest = new InfraActiveRequests();
+ infraRequest.setLastModifiedBy("BPMN")
+ infraRequest.setStatusMessage("ErrorMessage")
+ infraRequest.setRequestStatus("FAILED")
+ infraRequest.setProgress(100)
+ verify(requestsDbClient, times(1)).updateInfraActiveRequests(infraRequest, null, null)
+ }
} \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java
index 335d5b9d70..955cf94618 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java
@@ -450,7 +450,8 @@ public class BBInputSetupTest {
doReturn(aaiServiceInstance).when(SPY_bbInputSetupUtils).getAAIServiceInstanceById("instanceId");
doNothing().when(SPY_bbInputSetup).populateObjectsOnAssignAndCreateFlows(executeBB.getRequestId(),
- requestDetails, service, "bbName", serviceInstance, lookupKeyMap, resourceId, vnfType, null, null);
+ requestDetails, service, "bbName", serviceInstance, lookupKeyMap, resourceId, vnfType, null, null,
+ false);
doReturn(serviceInstance).when(SPY_bbInputSetup).getExistingServiceInstance(aaiServiceInstance);
doReturn(expected).when(SPY_bbInputSetup).populateGBBWithSIAndAdditionalInfo(requestDetails, serviceInstance,
executeBB, requestAction, null);
@@ -501,7 +502,8 @@ public class BBInputSetupTest {
doReturn(aaiServiceInstance).when(SPY_bbInputSetupUtils).getAAIServiceInstanceById("instanceId");
doNothing().when(SPY_bbInputSetup).populateObjectsOnAssignAndCreateFlows(executeBB.getRequestId(),
- requestDetails, service, "bbName", serviceInstance, lookupKeyMap, resourceId, vnfType, null, null);
+ requestDetails, service, "bbName", serviceInstance, lookupKeyMap, resourceId, vnfType, null, null,
+ false);
doReturn(serviceInstance).when(SPY_bbInputSetup).getExistingServiceInstance(aaiServiceInstance);
doReturn(expected).when(SPY_bbInputSetup).populateGBBWithSIAndAdditionalInfo(requestDetails, serviceInstance,
@@ -804,7 +806,7 @@ public class BBInputSetupTest {
doReturn(ModelType.network).when(modelInfo).getModelType();
SPY_bbInputSetup.populateObjectsOnAssignAndCreateFlows(REQUEST_ID, requestDetails, service, bbName,
- serviceInstance, lookupKeyMap, resourceId, vnfType, null, null);
+ serviceInstance, lookupKeyMap, resourceId, vnfType, null, null, false);
verify(SPY_bbInputSetup, times(1)).populateL3Network(REQUEST_ID, instanceName, modelInfo, service, bbName,
serviceInstance, lookupKeyMap, resourceId, null);
assertEquals("NetworkId populated", true,
@@ -816,7 +818,7 @@ public class BBInputSetupTest {
lineOfBusiness, service, bbName, serviceInstance, lookupKeyMap, relatedInstanceList, resourceId,
vnfType, null, productFamilyId);
SPY_bbInputSetup.populateObjectsOnAssignAndCreateFlows(REQUEST_ID, requestDetails, service, bbName,
- serviceInstance, lookupKeyMap, resourceId, vnfType, null, null);
+ serviceInstance, lookupKeyMap, resourceId, vnfType, null, null, false);
verify(SPY_bbInputSetup, times(1)).populateGenericVnf(REQUEST_ID, modelInfo, instanceName, platform,
lineOfBusiness, service, bbName, serviceInstance, lookupKeyMap, relatedInstanceList, resourceId,
vnfType, null, productFamilyId);
@@ -828,7 +830,7 @@ public class BBInputSetupTest {
doNothing().when(SPY_bbInputSetup).populateVolumeGroup(REQUEST_ID, modelInfo, service, bbName, serviceInstance,
lookupKeyMap, resourceId, relatedInstanceList, instanceName, vnfType, null);
SPY_bbInputSetup.populateObjectsOnAssignAndCreateFlows(REQUEST_ID, requestDetails, service, bbName,
- serviceInstance, lookupKeyMap, resourceId, vnfType, null, null);
+ serviceInstance, lookupKeyMap, resourceId, vnfType, null, null, false);
verify(SPY_bbInputSetup, times(1)).populateVolumeGroup(REQUEST_ID, modelInfo, service, bbName, serviceInstance,
lookupKeyMap, resourceId, relatedInstanceList, instanceName, vnfType, null);
assertEquals("VolumeGroupId populated", true,
@@ -837,11 +839,11 @@ public class BBInputSetupTest {
doReturn(ModelType.vfModule).when(modelInfo).getModelType();
resourceId = "vfModuleId";
doNothing().when(SPY_bbInputSetup).populateVfModule(REQUEST_ID, modelInfo, service, bbName, serviceInstance,
- lookupKeyMap, resourceId, relatedInstanceList, instanceName, null, cloudConfiguration);
+ lookupKeyMap, resourceId, relatedInstanceList, instanceName, null, cloudConfiguration, false);
SPY_bbInputSetup.populateObjectsOnAssignAndCreateFlows(REQUEST_ID, requestDetails, service, bbName,
- serviceInstance, lookupKeyMap, resourceId, vnfType, null, null);
+ serviceInstance, lookupKeyMap, resourceId, vnfType, null, null, false);
verify(SPY_bbInputSetup, times(1)).populateVfModule(REQUEST_ID, modelInfo, service, bbName, serviceInstance,
- lookupKeyMap, resourceId, relatedInstanceList, instanceName, null, cloudConfiguration);
+ lookupKeyMap, resourceId, relatedInstanceList, instanceName, null, cloudConfiguration, false);
assertEquals("VfModuleId populated", true,
lookupKeyMap.get(ResourceKey.VF_MODULE_ID).equalsIgnoreCase(resourceId));
}
@@ -1965,7 +1967,7 @@ public class BBInputSetupTest {
SPY_bbInputSetup.getGBBMacro(executeBB, requestDetails, lookupKeyMap, requestAction, resourceId, vnfType);
verify(SPY_bbInputSetup, times(1)).populateVfModule(any(String.class), isA(ModelInfo.class), isA(Service.class),
any(String.class), isA(ServiceInstance.class), any(), any(String.class), any(), any(String.class),
- any(), isA(CloudConfiguration.class));
+ any(), isA(CloudConfiguration.class), Mockito.anyBoolean());
lookupKeyMap.put(ResourceKey.GENERIC_VNF_ID, null);
executeBB.getBuildingBlock().setBpmnFlowName(AssignFlows.VOLUME_GROUP.toString());
@@ -2249,7 +2251,7 @@ public class BBInputSetupTest {
SPY_bbInputSetup.getGBBMacro(executeBB, requestDetails, lookupKeyMap, requestAction, resourceId, vnfType);
verify(SPY_bbInputSetup, times(1)).populateVfModule(any(String.class), isA(ModelInfo.class), isA(Service.class),
any(String.class), isA(ServiceInstance.class), any(), any(String.class), any(), any(String.class),
- any(), isA(CloudConfiguration.class));
+ any(), isA(CloudConfiguration.class), Mockito.anyBoolean());
lookupKeyMap.put(ResourceKey.GENERIC_VNF_ID, null);
executeBB.getBuildingBlock().setBpmnFlowName(AssignFlows.VOLUME_GROUP.toString());
@@ -2314,7 +2316,7 @@ public class BBInputSetupTest {
SPY_bbInputSetup.getGBBMacro(executeBB, requestDetails, lookupKeyMap, requestAction, resourceId, vnfType);
verify(SPY_bbInputSetup, times(1)).populateVfModule(any(String.class), isA(ModelInfo.class), isA(Service.class),
any(String.class), isA(ServiceInstance.class), any(), any(String.class), any(), any(String.class),
- any(), isA(CloudConfiguration.class));
+ any(), isA(CloudConfiguration.class), Mockito.anyBoolean());
lookupKeyMap.put(ResourceKey.GENERIC_VNF_ID, null);
executeBB.getBuildingBlock().setBpmnFlowName(AssignFlows.VOLUME_GROUP.toString());
@@ -2883,7 +2885,76 @@ public class BBInputSetupTest {
isA(Service.class), isA(String.class));
SPY_bbInputSetup.populateVfModule(REQUEST_ID, modelInfo, service, bbName, serviceInstance, lookupKeyMap,
- resourceId, relatedInstanceList, instanceName, instanceParams, cloudConfiguration);
+ resourceId, relatedInstanceList, instanceName, instanceParams, cloudConfiguration, false);
+
+ verify(SPY_bbInputSetup, times(3)).mapCatalogVfModule(isA(VfModule.class), isA(ModelInfo.class),
+ isA(Service.class), isA(String.class));
+ assertEquals("Lookup Key Map populated with VfModule Id", vfModuleId,
+ lookupKeyMap.get(ResourceKey.VF_MODULE_ID));
+ assertEquals("Lookup Key Map populated with VolumeGroup Id", volumeGroupId,
+ lookupKeyMap.get(ResourceKey.VOLUME_GROUP_ID));
+ }
+
+ @Test
+ public void testPopulateVfModuleIsReplace() throws Exception {
+ String vnfId = "vnfId";
+ String vfModuleId = "vfModuleId";
+ String volumeGroupId = "volumeGroupId";
+ String vfModuleCustomizationId = "vfModuleCustomizationId";
+ ModelInfo modelInfo = new ModelInfo();
+ modelInfo.setModelCustomizationId(vfModuleCustomizationId);
+ Service service = new Service();
+ String bbName = AssignFlows.VF_MODULE.toString();
+ ServiceInstance serviceInstance = new ServiceInstance();
+ GenericVnf vnf = new GenericVnf();
+ vnf.setVnfId(vnfId);
+ VolumeGroup volumeGroup = new VolumeGroup();
+ volumeGroup.setVolumeGroupId(volumeGroupId);
+ vnf.getVolumeGroups().add(volumeGroup);
+ serviceInstance.getVnfs().add(vnf);
+ VfModule vfModule1 = new VfModule();
+ vfModule1.setVfModuleId("vfModuleId1");
+ VfModule vfModule2 = new VfModule();
+ vfModule2.setVfModuleId("vfModuleId2");
+ vnf.getVfModules().add(vfModule1);
+ vnf.getVfModules().add(vfModule2);
+ Map<ResourceKey, String> lookupKeyMap = new HashMap<>();
+ lookupKeyMap.put(ResourceKey.GENERIC_VNF_ID, vnfId);
+ String resourceId = vfModuleId;
+ RelatedInstanceList[] relatedInstanceList = new RelatedInstanceList[1];
+ RelatedInstanceList relatedInstanceListObj = new RelatedInstanceList();
+ RelatedInstance relatedInstance = new RelatedInstance();
+ relatedInstance.setInstanceId(vnfId);
+
+ ModelInfo vnfModelInfo = new ModelInfo();
+ vnfModelInfo.setModelCustomizationId("vnfCustomizationId");
+ vnfModelInfo.setModelType(ModelType.vnf);
+ relatedInstance.setModelInfo(vnfModelInfo);
+ relatedInstanceListObj.setRelatedInstance(relatedInstance);
+ relatedInstanceList[0] = relatedInstanceListObj;
+
+ String instanceName = "vfModuleName";
+ List<Map<String, String>> instanceParams = null;
+ CloudConfiguration cloudConfiguration = new CloudConfiguration();
+
+ org.onap.aai.domain.yang.GenericVnf vnfAAI = new org.onap.aai.domain.yang.GenericVnf();
+ vnfAAI.setModelCustomizationId("vnfModelCustId");
+ org.onap.aai.domain.yang.VolumeGroup volumeGroupAAI = new org.onap.aai.domain.yang.VolumeGroup();
+ volumeGroupAAI.setModelCustomizationId(vfModuleCustomizationId);
+ org.onap.aai.domain.yang.VfModule vfModuleAAI = new org.onap.aai.domain.yang.VfModule();
+ vfModuleAAI.setModelCustomizationId(vfModuleCustomizationId);
+
+ doReturn(vnfAAI).when(SPY_bbInputSetupUtils).getAAIGenericVnf(vnf.getVnfId());
+ doReturn(volumeGroupAAI).when(SPY_bbInputSetupUtils).getAAIVolumeGroup(CLOUD_OWNER,
+ cloudConfiguration.getLcpCloudRegionId(), volumeGroup.getVolumeGroupId());
+ doReturn(vfModuleAAI).when(SPY_bbInputSetupUtils).getAAIVfModule(isA(String.class), isA(String.class));
+ doNothing().when(SPY_bbInputSetup).mapCatalogVnf(isA(GenericVnf.class), isA(ModelInfo.class),
+ isA(Service.class));
+ doNothing().when(SPY_bbInputSetup).mapCatalogVfModule(isA(VfModule.class), isA(ModelInfo.class),
+ isA(Service.class), isA(String.class));
+
+ SPY_bbInputSetup.populateVfModule(REQUEST_ID, modelInfo, service, bbName, serviceInstance, lookupKeyMap,
+ resourceId, relatedInstanceList, instanceName, instanceParams, cloudConfiguration, true);
verify(SPY_bbInputSetup, times(3)).mapCatalogVfModule(isA(VfModule.class), isA(ModelInfo.class),
isA(Service.class), isA(String.class));
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/Client/InfraActiveRequestExpected.json b/bpmn/MSOCommonBPMN/src/test/resources/__files/Client/InfraActiveRequestExpected.json
index fe58357d53..361dd9f405 100644
--- a/bpmn/MSOCommonBPMN/src/test/resources/__files/Client/InfraActiveRequestExpected.json
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/Client/InfraActiveRequestExpected.json
@@ -1,7 +1,5 @@
{
"requestId": "00032ab7-3fb3-42e5-965d-8ea592502017",
- "clientRequestId": "00032ab7-3fb3-42e5-965d-8ea592502016",
- "action": "deleteInstance",
"requestStatus": "COMPLETE",
"statusMessage": "Vf Module has been deleted successfully.",
"progress": 100,
@@ -12,22 +10,18 @@
"vnfName": null,
"vnfType": null,
"serviceType": null,
- "aicNodeClli": null,
"tenantId": "6accefef3cb442ff9e644d589fb04107",
- "provStatus": null,
"vnfParams": null,
"vnfOutputs": null,
"requestBody": "{\"modelInfo\":{\"modelType\":\"vfModule\",\"modelName\":\"vSAMP10aDEV::base::module-0\"},\"requestInfo\":{\"source\":\"VID\"},\"cloudConfiguration\":{\"tenantId\":\"6accefef3cb442ff9e644d589fb04107\",\"lcpCloudRegionId\":\"mtn6\"}}",
"responseBody": null,
"lastModifiedBy": "BPMN",
"modifyTime": 1482451228000,
- "requestType": null,
"volumeGroupId": null,
"volumeGroupName": null,
"vfModuleId": "c7d527b1-7a91-49fd-b97d-1c8c0f4a7992",
"vfModuleName": null,
"vfModuleModelName": "vSAMP10aDEV::base::module-0",
- "aaiServiceId": null,
"aicCloudRegion": "mtn6",
"callBackUrl": null,
"correlator": null,
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/InfraActiveRequestExpected.json b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/InfraActiveRequestExpected.json
index dd4dc65190..9c962e9722 100644
--- a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/InfraActiveRequestExpected.json
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/InfraActiveRequestExpected.json
@@ -1,7 +1,5 @@
{
"requestId": "00032ab7-3fb3-42e5-965d-8ea592502017",
- "clientRequestId": "00032ab7-3fb3-42e5-965d-8ea592502016",
- "action": "deleteInstance",
"requestStatus": "COMPLETE",
"statusMessage": "Vf Module has been deleted successfully.",
"progress": 100,
@@ -12,22 +10,18 @@
"vnfName": null,
"vnfType": null,
"serviceType": null,
- "aicNodeClli": null,
"tenantId": "6accefef3cb442ff9e644d589fb04107",
- "provStatus": null,
"vnfParams": null,
"vnfOutputs": null,
"requestBody": "{\"requestDetails\":{\"modelInfo\":{\"modelType\":\"vfModule\",\"modelName\":\"vSAMP10aDEV::base::module-0\"},\"requestInfo\":{\"source\":\"VID\"},\"cloudConfiguration\":{\"tenantId\":\"6accefef3cb442ff9e644d589fb04107\",\"lcpCloudRegionId\":\"mtn6\"}}}",
"responseBody": null,
"lastModifiedBy": "BPMN",
"modifyTime": 1482451228000,
- "requestType": null,
"volumeGroupId": null,
"volumeGroupName": null,
"vfModuleId": "c7d527b1-7a91-49fd-b97d-1c8c0f4a7992",
"vfModuleName": null,
"vfModuleModelName": "vSAMP10aDEV::base::module-0",
- "aaiServiceId": null,
"aicCloudRegion": "mtn6",
"callBackUrl": null,
"correlator": null,
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/response/infraActiveRequestsResponse.json b/bpmn/MSOCommonBPMN/src/test/resources/response/infraActiveRequestsResponse.json
index 9cc84f2cd4..3623e888e7 100644
--- a/bpmn/MSOCommonBPMN/src/test/resources/response/infraActiveRequestsResponse.json
+++ b/bpmn/MSOCommonBPMN/src/test/resources/response/infraActiveRequestsResponse.json
@@ -1,7 +1,5 @@
{
"requestId": "00032ab7-3fb3-42e5-965d-8ea592502017",
- "clientRequestId": "00032ab7-3fb3-42e5-965d-8ea592502016",
- "action": "deleteInstance",
"requestStatus": "COMPLETE",
"statusMessage": "Vf Module has been deleted successfully.",
"progress": 100,
@@ -12,22 +10,18 @@
"vnfName": null,
"vnfType": null,
"serviceType": null,
- "aicNodeClli": null,
"tenantId": "6accefef3cb442ff9e644d589fb04107",
- "provStatus": null,
"vnfParams": null,
"vnfOutputs": null,
"requestBody": "{\"modelInfo\":{\"modelType\":\"vfModule\",\"modelName\":\"vSAMP10aDEV::base::module-0\"},\"requestInfo\":{\"source\":\"VID\"},\"cloudConfiguration\":{\"tenantId\":\"6accefef3cb442ff9e644d589fb04107\",\"lcpCloudRegionId\":\"mtn6\"}}",
"responseBody": null,
"lastModifiedBy": "BPMN",
"modifyTime": 1482451228000,
- "requestType": null,
"volumeGroupId": null,
"volumeGroupName": null,
"vfModuleId": "c7d527b1-7a91-49fd-b97d-1c8c0f4a7992",
"vfModuleName": null,
"vfModuleModelName": "vSAMP10aDEV::base::module-0",
- "aaiServiceId": null,
"aicCloudRegion": "mtn6",
"callBackUrl": null,
"correlator": null,
diff --git a/bpmn/mso-infrastructure-bpmn/pom.xml b/bpmn/mso-infrastructure-bpmn/pom.xml
index 25913eabba..1ae0dd48f7 100644
--- a/bpmn/mso-infrastructure-bpmn/pom.xml
+++ b/bpmn/mso-infrastructure-bpmn/pom.xml
@@ -93,10 +93,19 @@
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
- <id>tests</id>
+ <id>tests-jar</id>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ <configuration>
+ <skip>false</skip>
+ </configuration>
</execution>
<execution>
<id>original</id>
+ <configuration>
+ <skip>false</skip>
+ </configuration>
</execution>
</executions>
</plugin>
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowAsyncResource.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowAsyncResource.java
index ace6e1937d..4fb63651eb 100644
--- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowAsyncResource.java
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowAsyncResource.java
@@ -102,7 +102,11 @@ public class WorkflowAsyncResource extends ProcessEngineAwareService {
MDC.put(ONAPLogConstants.MDCs.REQUEST_ID, getRequestId(inputVariables));
processor.startProcess(processKey, variableMap);
WorkflowResponse response = waitForResponse(inputVariables);
- return Response.status(202).entity(response).build();
+ if (response.getMessageCode() == 500) {
+ return Response.status(500).entity(response).build();
+ } else {
+ return Response.status(202).entity(response).build();
+ }
} catch (WorkflowProcessorException e) {
WorkflowResponse response = e.getWorkflowResponse();
return Response.status(500).entity(response).build();
@@ -112,7 +116,7 @@ public class WorkflowAsyncResource extends ProcessEngineAwareService {
}
}
- private WorkflowResponse waitForResponse(Map<String, Object> inputVariables) throws Exception {
+ protected WorkflowResponse waitForResponse(Map<String, Object> inputVariables) throws Exception {
String requestId = getRequestId(inputVariables);
long currentWaitTime = 0;
long waitTime = getWaitTime(inputVariables);
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/AsyncTaskExecutor.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/AsyncTaskExecutor.java
deleted file mode 100644
index 56526c7f89..0000000000
--- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/AsyncTaskExecutor.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package org.onap.so.bpmn.core.plugins;
-
-import org.camunda.bpm.engine.delegate.ExecutionListener;
-import org.camunda.bpm.engine.impl.bpmn.parser.AbstractBpmnParseListener;
-import org.camunda.bpm.engine.impl.pvm.process.ActivityImpl;
-import org.camunda.bpm.engine.impl.pvm.process.ScopeImpl;
-import org.camunda.bpm.engine.impl.util.xml.Element;
-import org.springframework.stereotype.Component;
-
-@Component
-public class AsyncTaskExecutor extends AbstractBpmnParseListener {
-
- private void injectTaskExecutorExecutionListener(ActivityImpl activity) {
- activity.addListener(ExecutionListener.EVENTNAME_END, new AsyncTaskExecutorListener());
- }
-
- @Override
- public void parseEndEvent(Element endEventElement, ScopeImpl scope, ActivityImpl activity) {
- injectTaskExecutorExecutionListener(activity);
- }
-}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/BPMNProcessCompletePlugin.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/BPMNProcessCompletePlugin.java
deleted file mode 100644
index 96c6af42ed..0000000000
--- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/BPMNProcessCompletePlugin.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 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.bpmn.core.plugins;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.camunda.bpm.engine.impl.bpmn.parser.BpmnParseListener;
-import org.camunda.bpm.engine.impl.cfg.AbstractProcessEnginePlugin;
-import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-
-
-@Component
-public class BPMNProcessCompletePlugin extends AbstractProcessEnginePlugin {
-
- @Autowired
- private AsyncTaskExecutor asyncTaskExecutor;
-
- @Override
- public void preInit(ProcessEngineConfigurationImpl processEngineConfiguration) {
- List<BpmnParseListener> preParseListeners = processEngineConfiguration.getCustomPreBPMNParseListeners();
- if (preParseListeners == null) {
- preParseListeners = new ArrayList<>();
- processEngineConfiguration.setCustomPreBPMNParseListeners(preParseListeners);
- }
- preParseListeners.add(asyncTaskExecutor);
- }
-
-}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/workflow/service/WorkflowAsyncResourceTest.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/workflow/service/WorkflowAsyncResourceTest.java
new file mode 100644
index 0000000000..df9a23019a
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/workflow/service/WorkflowAsyncResourceTest.java
@@ -0,0 +1,59 @@
+package org.onap.so.bpmn.common.workflow.service;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.ArgumentMatchers.anyMap;
+import java.util.HashMap;
+import java.util.Map;
+import javax.ws.rs.core.Response;
+import org.camunda.bpm.engine.variable.impl.VariableMapImpl;
+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.bpmn.common.workflow.context.WorkflowResponse;
+
+@RunWith(MockitoJUnitRunner.class)
+public class WorkflowAsyncResourceTest {
+
+ @InjectMocks
+ @Spy
+ private WorkflowAsyncResource workflowAsyncResource;
+
+ @Mock
+ private WorkflowProcessor processor;
+
+ private WorkflowResponse workflowResponse;
+ private VariableMapImpl varMap;
+
+ @Before
+ public void before() {
+ workflowResponse = new WorkflowResponse();
+ varMap = new VariableMapImpl();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> requestIdMap = new HashMap<String, Object>();
+ requestIdMap.put("value", "123");
+ requestIdMap.put("type", "String");
+ variables.put("mso-request-id", requestIdMap);
+ varMap.put("variables", variables);
+ }
+
+ @Test
+ public void startProcessInstanceByKey200Test() throws Exception {
+ workflowResponse.setMessageCode(200);
+ doReturn(workflowResponse).when(workflowAsyncResource).waitForResponse(anyMap());
+ Response response = workflowAsyncResource.startProcessInstanceByKey("123", varMap);
+ assertEquals(202, response.getStatus());
+ }
+
+ @Test
+ public void startProcessInstanceByKey500Test() throws Exception {
+ workflowResponse.setMessageCode(500);
+ doReturn(workflowResponse).when(workflowAsyncResource).waitForResponse(anyMap());
+ Response response = workflowAsyncResource.startProcessInstanceByKey("123", varMap);
+ assertEquals(500, response.getStatus());
+ }
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/DmaapClientTestImpl.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/DmaapClientTestImpl.java
index 078317885c..43fbc59b3d 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/DmaapClientTestImpl.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/DmaapClientTestImpl.java
@@ -34,7 +34,7 @@ public class DmaapClientTestImpl implements DmaapClient {
private Runnable informConsumer;
@Override
- public void registerForUpdate(String pnfCorrelationId, Runnable informConsumer, Map<String, String> updateInfo) {
+ public void registerForUpdate(String pnfCorrelationId, Runnable informConsumer) {
this.pnfCorrelationId = pnfCorrelationId;
this.informConsumer = informConsumer;
}
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/WorkflowActionBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/WorkflowActionBB.bpmn
index bb900420e3..f2e0ce29ff 100644
--- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/WorkflowActionBB.bpmn
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/WorkflowActionBB.bpmn
@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
-<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0">
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.1.2">
<bpmn:process id="WorkflowActionBB" name="WorkflowActionBB" isExecutable="true">
+ <bpmn:extensionElements>
+ <camunda:executionListener class="org.onap.so.bpmn.core.plugins.AsyncTaskExecutorListener" event="end" />
+ </bpmn:extensionElements>
<bpmn:startEvent id="Start_WorkflowActionBB" name="start">
<bpmn:outgoing>SequenceFlow_15s0okp</bpmn:outgoing>
</bpmn:startEvent>
@@ -46,7 +49,7 @@
<bpmn:outgoing>SequenceFlow_0l7kaba</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="SequenceFlow_1m2eezj" name="Completed = true" sourceRef="ExclusiveGateway_Finished" targetRef="ExclusiveGateway_isTopLevelFlowC">
- <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("completed")==true&&execution.getVariable("isRollback")==false&&execution.getVariable("handlingCode")=="Success"}]]></bpmn:conditionExpression>
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${execution.getVariable("completed")==true&amp;&amp;execution.getVariable("isRollback")==false&amp;&amp;execution.getVariable("handlingCode")=="Success"}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:serviceTask id="Task_RetrieveBBExectuionList" name="Retrieve BB Execution List" camunda:expression="${WorkflowAction.selectExecutionList(execution)}">
<bpmn:incoming>SequenceFlow_15s0okp</bpmn:incoming>
@@ -83,19 +86,19 @@
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="SequenceFlow_024g0d1" name="no" sourceRef="ExclusiveGateway_10q79b6" targetRef="Task_UpdateDb" />
<bpmn:sequenceFlow id="SequenceFlow_0vi883o" name="yes" sourceRef="ExclusiveGateway_10q79b6" targetRef="Task_SendSyncAckError">
- <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("isTopLevelFlow")==true&&execution.getVariable("sentSyncResponse")==false}]]></bpmn:conditionExpression>
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${execution.getVariable("isTopLevelFlow")==true&amp;&amp;execution.getVariable("sentSyncResponse")==false}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="SequenceFlow_0eana0l" sourceRef="Task_SendSyncAckError" targetRef="Task_UpdateDb" />
- <bpmn:serviceTask id="Task_SendSyncAckError" name="Send Sync Ack API Handler" camunda:asyncAfter="true" camunda:expression="${WorkflowActionBBTasks.sendSyncAck(execution)}">
+ <bpmn:serviceTask id="Task_SendSyncAckError" name="Send Sync Ack API Handler" camunda:asyncAfter="true" camunda:expression="${WorkflowActionBBTasks.sendErrorSyncAck(execution)}">
<bpmn:incoming>SequenceFlow_0vi883o</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0eana0l</bpmn:outgoing>
</bpmn:serviceTask>
</bpmn:subProcess>
<bpmn:sequenceFlow id="SequenceFlow_0v588sm" name="Rollback = true" sourceRef="ExclusiveGateway_Finished" targetRef="Task_RollbackExecutionPath">
- <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("handlingCode")=="Rollback"||execution.getVariable("handlingCode")=="RollbackToAssigned"||execution.getVariable("handlingCode")=="RollbackToCreated"}]]></bpmn:conditionExpression>
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${execution.getVariable("handlingCode")=="Rollback"||execution.getVariable("handlingCode")=="RollbackToAssigned"||execution.getVariable("handlingCode")=="RollbackToCreated"}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="SequenceFlow_1atzsgn" sourceRef="Task_RollbackExecutionPath" targetRef="Task_SelectBB">
- <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("isRollbackNeeded")==true}]]></bpmn:conditionExpression>
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${execution.getVariable("isRollbackNeeded")==true}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:serviceTask id="Task_RollbackExecutionPath" name="Rollback Execution Path" camunda:expression="${WorkflowActionBBTasks.rollbackExecutionPath(execution)}">
<bpmn:incoming>SequenceFlow_0v588sm</bpmn:incoming>
@@ -104,7 +107,7 @@
</bpmn:serviceTask>
<bpmn:sequenceFlow id="SequenceFlow_0vc9go9" sourceRef="Task_RetrieveBBExectuionList" targetRef="ExclusiveGateway_isTopLevelFlow" />
<bpmn:sequenceFlow id="SequenceFlow_11530ei" name="Abort = true" sourceRef="ExclusiveGateway_Finished" targetRef="ExclusiveGateway_isTopLevelFlowAbort">
- <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("handlingCode")=="Abort"}]]></bpmn:conditionExpression>
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${execution.getVariable("handlingCode")=="Abort"}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:serviceTask id="Task_AbortAndCallErrorHandling" name="Update Request To Failed" camunda:expression="${WorkflowActionBBFailure.updateRequestStatusToFailed(execution)}">
<bpmn:incoming>SequenceFlow_02ksbt0</bpmn:incoming>
@@ -127,7 +130,7 @@
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="SequenceFlow_0sckerv" name="yes" sourceRef="ExclusiveGateway_isTopLevelFlow" targetRef="Task_SendSync" />
<bpmn:sequenceFlow id="SequenceFlow_0unbew4" name="no" sourceRef="ExclusiveGateway_isTopLevelFlow" targetRef="Task_PreValidateWorkflow">
- <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("isTopLevelFlow")==false}]]></bpmn:conditionExpression>
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${execution.getVariable("isTopLevelFlow")==false}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:exclusiveGateway id="ExclusiveGateway_isTopLevelFlowAbort" name="Is Top-Level Flow?" default="SequenceFlow_02ksbt0">
<bpmn:incoming>SequenceFlow_11530ei</bpmn:incoming>
@@ -136,7 +139,7 @@
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="SequenceFlow_02ksbt0" name="yes" sourceRef="ExclusiveGateway_isTopLevelFlowAbort" targetRef="Task_AbortAndCallErrorHandling" />
<bpmn:sequenceFlow id="SequenceFlow_1r570x3" name="no" sourceRef="ExclusiveGateway_isTopLevelFlowAbort" targetRef="EndEvent_0lzz1ya">
- <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("isTopLevelFlow")==false}]]></bpmn:conditionExpression>
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${execution.getVariable("isTopLevelFlow")==false}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:exclusiveGateway id="ExclusiveGateway_isTopLevelFlowC" name="Is Top-Level Flow?" default="SequenceFlow_0kf5sen">
<bpmn:incoming>SequenceFlow_1m2eezj</bpmn:incoming>
@@ -144,13 +147,13 @@
<bpmn:outgoing>SequenceFlow_0kf5sen</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="SequenceFlow_0x4urgp" name="no" sourceRef="ExclusiveGateway_isTopLevelFlowC" targetRef="End_WorkflowActionBB">
- <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("isTopLevelFlow")==false}]]></bpmn:conditionExpression>
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${execution.getVariable("isTopLevelFlow")==false}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:endEvent id="End_RollbackFailed" name="end">
<bpmn:incoming>SequenceFlow_1ui67mc</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="SequenceFlow_11dlyzt" name="Rollback Not Needed" sourceRef="Task_RollbackExecutionPath" targetRef="Task_UpdateRequestToFailed">
- <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("isRollbackNeeded")==false}]]></bpmn:conditionExpression>
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${execution.getVariable("isRollbackNeeded")==false}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:serviceTask id="Task_UpdateRequestToFailed" name="Update Request To Failed" camunda:expression="${WorkflowActionBBFailure.updateRequestStatusToFailedWithRollback(execution)}">
<bpmn:incoming>SequenceFlow_11dlyzt</bpmn:incoming>
@@ -158,7 +161,7 @@
<bpmn:outgoing>SequenceFlow_1ui67mc</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:sequenceFlow id="SequenceFlow_0l7kaba" name="Rollback Completed" sourceRef="ExclusiveGateway_Finished" targetRef="Task_UpdateRequestToFailed">
- <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("completed")==true&&execution.getVariable("isRollback")==true&&execution.getVariable("handlingCode")=="Success"}]]></bpmn:conditionExpression>
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${execution.getVariable("completed")==true&amp;&amp;execution.getVariable("isRollback")==true&amp;&amp;execution.getVariable("handlingCode")=="Success"}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="SequenceFlow_1ui67mc" sourceRef="Task_UpdateRequestToFailed" targetRef="End_RollbackFailed" />
<bpmn:subProcess id="SubProcess_0fuugr9" name="Java Exception Handling Sub Process" triggeredByEvent="true">
@@ -202,7 +205,7 @@
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="SequenceFlow_1lrz41x" sourceRef="Task_SendSync" targetRef="ExclusiveGateway_1dez26n" />
<bpmn:sequenceFlow id="SequenceFlow_0etawv5" name="no" sourceRef="ExclusiveGateway_1dez26n" targetRef="Task_PreValidateWorkflow">
- <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("generateIdsOnly") == null || execution.getVariable("generateIdsOnly")==false}]]></bpmn:conditionExpression>
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${execution.getVariable("generateIdsOnly") == null || execution.getVariable("generateIdsOnly")==false}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:endEvent id="EndEvent_12f15tu" name="End">
<bpmn:incoming>SequenceFlow_0ilo6lo</bpmn:incoming>
@@ -213,406 +216,406 @@
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="WorkflowActionBB">
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_WorkflowActionBB">
- <dc:Bounds x="-434" y="102" width="36" height="36" />
+ <dc:Bounds x="156" y="378" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="-426" y="138" width="22" height="12" />
+ <dc:Bounds x="164" y="414" width="22" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="EndEvent_1uv6erv_di" bpmnElement="End_WorkflowActionBB">
- <dc:Bounds x="1304" y="147" width="36" height="36" />
+ <dc:Bounds x="1894" y="423" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1313" y="127" width="18" height="12" />
+ <dc:Bounds x="1903" y="403" width="19" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_15s0okp_di" bpmnElement="SequenceFlow_15s0okp">
- <di:waypoint xsi:type="dc:Point" x="-398" y="120" />
- <di:waypoint xsi:type="dc:Point" x="-365" y="120" />
+ <di:waypoint x="192" y="396" />
+ <di:waypoint x="225" y="396" />
<bpmndi:BPMNLabel>
<dc:Bounds x="-381" y="99" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="CallActivity_03m7z4y_di" bpmnElement="Call_ExecuteBB">
- <dc:Bounds x="560" y="80" width="100" height="80" />
+ <dc:Bounds x="1150" y="356" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0mqrkxv_di" bpmnElement="SequenceFlow_0mqrkxv">
- <di:waypoint xsi:type="dc:Point" x="339" y="120" />
- <di:waypoint xsi:type="dc:Point" x="400" y="120" />
+ <di:waypoint x="929" y="396" />
+ <di:waypoint x="990" y="396" />
<bpmndi:BPMNLabel>
<dc:Bounds x="324.5" y="105" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ServiceTask_1snenqk_di" bpmnElement="Task_SelectBB">
- <dc:Bounds x="239" y="80" width="100" height="80" />
+ <dc:Bounds x="829" y="356" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ExclusiveGateway_0m1zt0q_di" bpmnElement="ExclusiveGateway_Finished" isMarkerVisible="true">
- <dc:Bounds x="911" y="95" width="50" height="50" />
+ <dc:Bounds x="1501" y="371" width="50" height="50" />
<bpmndi:BPMNLabel>
<dc:Bounds x="850" y="42" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1m2eezj_di" bpmnElement="SequenceFlow_1m2eezj">
- <di:waypoint xsi:type="dc:Point" x="949" y="132" />
- <di:waypoint xsi:type="dc:Point" x="980" y="165" />
- <di:waypoint xsi:type="dc:Point" x="1060" y="165" />
+ <di:waypoint x="1539" y="408" />
+ <di:waypoint x="1570" y="441" />
+ <di:waypoint x="1650" y="441" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="968" y="168" width="83" height="12" />
+ <dc:Bounds x="1557" y="444" width="85" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ServiceTask_0kn8jt8_di" bpmnElement="Task_RetrieveBBExectuionList">
- <dc:Bounds x="-365" y="80" width="100" height="80" />
+ <dc:Bounds x="225" y="356" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ServiceTask_0654g3m_di" bpmnElement="Task_SendSync">
- <dc:Bounds x="-100" y="-76" width="100" height="80" />
+ <dc:Bounds x="490" y="200" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ServiceTask_0wzh11j_di" bpmnElement="Task_UpdateRequestComplete">
- <dc:Bounds x="1161" y="206" width="100" height="80" />
+ <dc:Bounds x="1751" y="482" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1pz6edz_di" bpmnElement="SequenceFlow_1pz6edz">
- <di:waypoint xsi:type="dc:Point" x="1261" y="246" />
- <di:waypoint xsi:type="dc:Point" x="1322" y="246" />
- <di:waypoint xsi:type="dc:Point" x="1322" y="183" />
+ <di:waypoint x="1851" y="522" />
+ <di:waypoint x="1912" y="522" />
+ <di:waypoint x="1912" y="459" />
<bpmndi:BPMNLabel>
<dc:Bounds x="1247" y="231" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="SubProcess_18226x4_di" bpmnElement="SubProcess_18226x4" isExpanded="true">
- <dc:Bounds x="498" y="444" width="438" height="297" />
+ <dc:Bounds x="1088" y="720" width="438" height="297" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="StartEvent_184g7f3_di" bpmnElement="ErrorStart">
- <dc:Bounds x="520" y="639" width="36" height="36" />
+ <dc:Bounds x="1110" y="915" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="526" y="682" width="24" height="12" />
+ <dc:Bounds x="1116" y="958" width="24" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="EndEvent_0l4edvr_di" bpmnElement="ErrorEnd">
- <dc:Bounds x="880" y="639" width="36" height="36" />
+ <dc:Bounds x="1470" y="915" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="890" y="681" width="18" height="12" />
+ <dc:Bounds x="1480" y="957" width="19" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0v588sm_di" bpmnElement="SequenceFlow_0v588sm">
- <di:waypoint xsi:type="dc:Point" x="936" y="145" />
- <di:waypoint xsi:type="dc:Point" x="936" y="262" />
- <di:waypoint xsi:type="dc:Point" x="339" y="262" />
+ <di:waypoint x="1526" y="421" />
+ <di:waypoint x="1526" y="538" />
+ <di:waypoint x="929" y="538" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="769.202380952381" y="272" width="73" height="12" />
+ <dc:Bounds x="1359" y="548" width="74" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1atzsgn_di" bpmnElement="SequenceFlow_1atzsgn">
- <di:waypoint xsi:type="dc:Point" x="289" y="222" />
- <di:waypoint xsi:type="dc:Point" x="289" y="160" />
+ <di:waypoint x="879" y="498" />
+ <di:waypoint x="879" y="436" />
<bpmndi:BPMNLabel>
<dc:Bounds x="259" y="191" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ServiceTask_19t1oyr_di" bpmnElement="Task_RollbackExecutionPath">
- <dc:Bounds x="239" y="222" width="100" height="80" />
+ <dc:Bounds x="829" y="498" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0vc9go9_di" bpmnElement="SequenceFlow_0vc9go9">
- <di:waypoint xsi:type="dc:Point" x="-265" y="120" />
- <di:waypoint xsi:type="dc:Point" x="-228" y="120" />
+ <di:waypoint x="325" y="396" />
+ <di:waypoint x="362" y="396" />
<bpmndi:BPMNLabel>
<dc:Bounds x="-246" y="105" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_11530ei_di" bpmnElement="SequenceFlow_11530ei">
- <di:waypoint xsi:type="dc:Point" x="946" y="105" />
- <di:waypoint xsi:type="dc:Point" x="983" y="44" />
- <di:waypoint xsi:type="dc:Point" x="1060" y="45" />
+ <di:waypoint x="1536" y="381" />
+ <di:waypoint x="1573" y="320" />
+ <di:waypoint x="1650" y="321" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="975" y="17" width="58" height="12" />
+ <dc:Bounds x="1565" y="293" width="58" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ServiceTask_0jo36ez_di" bpmnElement="Task_AbortAndCallErrorHandling">
- <dc:Bounds x="1176" y="-76" width="100" height="80" />
+ <dc:Bounds x="1766" y="200" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="EndEvent_0lzz1ya_di" bpmnElement="EndEvent_0lzz1ya">
- <dc:Bounds x="1386" y="27" width="36" height="36" />
+ <dc:Bounds x="1976" y="303" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1395" y="67" width="18" height="12" />
+ <dc:Bounds x="1985" y="343" width="19" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1p8yxu6_di" bpmnElement="SequenceFlow_1p8yxu6">
- <di:waypoint xsi:type="dc:Point" x="1276" y="-36" />
- <di:waypoint xsi:type="dc:Point" x="1359" y="-36" />
- <di:waypoint xsi:type="dc:Point" x="1359" y="45" />
- <di:waypoint xsi:type="dc:Point" x="1386" y="45" />
+ <di:waypoint x="1866" y="240" />
+ <di:waypoint x="1949" y="240" />
+ <di:waypoint x="1949" y="321" />
+ <di:waypoint x="1976" y="321" />
<bpmndi:BPMNLabel>
<dc:Bounds x="1329" y="5" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_01j184u_di" bpmnElement="SequenceFlow_01j184u">
- <di:waypoint xsi:type="dc:Point" x="936" y="95" />
- <di:waypoint xsi:type="dc:Point" x="936" y="55" />
- <di:waypoint xsi:type="dc:Point" x="936" y="55" />
- <di:waypoint xsi:type="dc:Point" x="936" y="4" />
+ <di:waypoint x="1526" y="371" />
+ <di:waypoint x="1526" y="331" />
+ <di:waypoint x="1526" y="331" />
+ <di:waypoint x="1526" y="280" />
<bpmndi:BPMNLabel>
<dc:Bounds x="906" y="49" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ServiceTask_1c1v3p1_di" bpmnElement="Task_0a31dkf">
- <dc:Bounds x="886" y="-76" width="100" height="80" />
+ <dc:Bounds x="1476" y="200" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ExclusiveGateway_0ptb1yi_di" bpmnElement="ExclusiveGateway_isTopLevelFlow" isMarkerVisible="true">
- <dc:Bounds x="-228" y="95" width="50" height="50" />
+ <dc:Bounds x="362" y="371" width="50" height="50" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="-235" y="145" width="63" height="24" />
+ <dc:Bounds x="357" y="421" width="60" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0sckerv_di" bpmnElement="SequenceFlow_0sckerv">
- <di:waypoint xsi:type="dc:Point" x="-202" y="96" />
- <di:waypoint xsi:type="dc:Point" x="-202" y="-36" />
- <di:waypoint xsi:type="dc:Point" x="-100" y="-36" />
+ <di:waypoint x="388" y="372" />
+ <di:waypoint x="388" y="240" />
+ <di:waypoint x="490" y="240" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="-195" y="17.612903225806477" width="19" height="12" />
+ <dc:Bounds x="396" y="294" width="18" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0unbew4_di" bpmnElement="SequenceFlow_0unbew4">
- <di:waypoint xsi:type="dc:Point" x="-178" y="120" />
- <di:waypoint xsi:type="dc:Point" x="80" y="120" />
+ <di:waypoint x="412" y="396" />
+ <di:waypoint x="670" y="396" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="-87" y="99.95468180757382" width="12" height="12" />
+ <dc:Bounds x="503" y="376" width="13" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ExclusiveGateway_001g41v_di" bpmnElement="ExclusiveGateway_isTopLevelFlowAbort" isMarkerVisible="true">
- <dc:Bounds x="1060" y="20" width="50" height="50" />
+ <dc:Bounds x="1650" y="296" width="50" height="50" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1055" y="70" width="61" height="24" />
+ <dc:Bounds x="1646" y="346" width="60" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_02ksbt0_di" bpmnElement="SequenceFlow_02ksbt0">
- <di:waypoint xsi:type="dc:Point" x="1085" y="20" />
- <di:waypoint xsi:type="dc:Point" x="1085" y="-37" />
- <di:waypoint xsi:type="dc:Point" x="1176" y="-37" />
+ <di:waypoint x="1675" y="296" />
+ <di:waypoint x="1675" y="239" />
+ <di:waypoint x="1766" y="239" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1091" y="-8" width="19" height="12" />
+ <dc:Bounds x="1682" y="268" width="18" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1r570x3_di" bpmnElement="SequenceFlow_1r570x3">
- <di:waypoint xsi:type="dc:Point" x="1110" y="45" />
- <di:waypoint xsi:type="dc:Point" x="1386" y="45" />
+ <di:waypoint x="1700" y="321" />
+ <di:waypoint x="1976" y="321" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1242" y="20" width="12" height="12" />
+ <dc:Bounds x="1832" y="296" width="13" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ExclusiveGateway_1er1kam_di" bpmnElement="ExclusiveGateway_isTopLevelFlowC" isMarkerVisible="true">
- <dc:Bounds x="1060" y="140" width="50" height="50" />
+ <dc:Bounds x="1650" y="416" width="50" height="50" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1055" y="108" width="61" height="24" />
+ <dc:Bounds x="1646" y="384" width="60" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0x4urgp_di" bpmnElement="SequenceFlow_0x4urgp">
- <di:waypoint xsi:type="dc:Point" x="1110" y="165" />
- <di:waypoint xsi:type="dc:Point" x="1220" y="165" />
- <di:waypoint xsi:type="dc:Point" x="1220" y="165" />
- <di:waypoint xsi:type="dc:Point" x="1304" y="165" />
+ <di:waypoint x="1700" y="441" />
+ <di:waypoint x="1810" y="441" />
+ <di:waypoint x="1810" y="441" />
+ <di:waypoint x="1894" y="441" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1256" y="140" width="12" height="12" />
+ <dc:Bounds x="1846" y="416" width="13" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="EndEvent_1q8eh5e_di" bpmnElement="End_RollbackFailed">
- <dc:Bounds x="1159" y="347" width="36" height="36" />
+ <dc:Bounds x="1749" y="623" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1177" y="399" width="18" height="12" />
+ <dc:Bounds x="1767" y="675" width="19" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_11dlyzt_di" bpmnElement="SequenceFlow_11dlyzt">
- <di:waypoint xsi:type="dc:Point" x="289" y="302" />
- <di:waypoint xsi:type="dc:Point" x="289" y="368" />
- <di:waypoint xsi:type="dc:Point" x="960" y="368" />
+ <di:waypoint x="879" y="578" />
+ <di:waypoint x="879" y="644" />
+ <di:waypoint x="1550" y="644" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="381.45685840707966" y="325" width="63" height="24" />
+ <dc:Bounds x="972" y="601" width="63" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ServiceTask_1h154rn_di" bpmnElement="Task_UpdateDb">
- <dc:Bounds x="713" y="617" width="100" height="80" />
+ <dc:Bounds x="1303" y="893" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ServiceTask_1t8n9gd_di" bpmnElement="Task_UpdateRequestToFailed">
- <dc:Bounds x="960" y="325" width="100" height="80" />
+ <dc:Bounds x="1550" y="601" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0l7kaba_di" bpmnElement="SequenceFlow_0l7kaba">
- <di:waypoint xsi:type="dc:Point" x="942" y="139" />
- <di:waypoint xsi:type="dc:Point" x="976" y="252" />
- <di:waypoint xsi:type="dc:Point" x="1016" y="252" />
- <di:waypoint xsi:type="dc:Point" x="1016" y="325" />
+ <di:waypoint x="1532" y="415" />
+ <di:waypoint x="1566" y="528" />
+ <di:waypoint x="1606" y="528" />
+ <di:waypoint x="1606" y="601" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="959" y="255" width="52" height="24" />
+ <dc:Bounds x="1548" y="531" width="54" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1edjl5x_di" bpmnElement="SequenceFlow_1edjl5x">
- <di:waypoint xsi:type="dc:Point" x="556" y="657" />
- <di:waypoint xsi:type="dc:Point" x="602" y="657" />
+ <di:waypoint x="1146" y="933" />
+ <di:waypoint x="1192" y="933" />
<bpmndi:BPMNLabel>
<dc:Bounds x="534" y="636" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0wvzfgf_di" bpmnElement="SequenceFlow_0wvzfgf">
- <di:waypoint xsi:type="dc:Point" x="813" y="657" />
- <di:waypoint xsi:type="dc:Point" x="880" y="657" />
+ <di:waypoint x="1403" y="933" />
+ <di:waypoint x="1470" y="933" />
<bpmndi:BPMNLabel>
<dc:Bounds x="801.5" y="636" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1ui67mc_di" bpmnElement="SequenceFlow_1ui67mc">
- <di:waypoint xsi:type="dc:Point" x="1060" y="365" />
- <di:waypoint xsi:type="dc:Point" x="1134" y="365" />
- <di:waypoint xsi:type="dc:Point" x="1134" y="365" />
- <di:waypoint xsi:type="dc:Point" x="1159" y="365" />
+ <di:waypoint x="1650" y="641" />
+ <di:waypoint x="1724" y="641" />
+ <di:waypoint x="1724" y="641" />
+ <di:waypoint x="1749" y="641" />
<bpmndi:BPMNLabel>
<dc:Bounds x="1104" y="359" width="90" height="13" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ExclusiveGateway_10q79b6_di" bpmnElement="ExclusiveGateway_10q79b6" isMarkerVisible="true">
- <dc:Bounds x="602" y="632" width="50" height="50" />
+ <dc:Bounds x="1192" y="908" width="50" height="50" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="584" y="686" width="86" height="36" />
+ <dc:Bounds x="1174" y="962" width="86" height="40" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_024g0d1_di" bpmnElement="SequenceFlow_024g0d1">
- <di:waypoint xsi:type="dc:Point" x="652" y="657" />
- <di:waypoint xsi:type="dc:Point" x="683" y="657" />
- <di:waypoint xsi:type="dc:Point" x="683" y="657" />
- <di:waypoint xsi:type="dc:Point" x="713" y="657" />
+ <di:waypoint x="1242" y="933" />
+ <di:waypoint x="1273" y="933" />
+ <di:waypoint x="1273" y="933" />
+ <di:waypoint x="1303" y="933" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="677" y="634" width="12" height="12" />
+ <dc:Bounds x="1267" y="910" width="13" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0vi883o_di" bpmnElement="SequenceFlow_0vi883o">
- <di:waypoint xsi:type="dc:Point" x="627" y="632" />
- <di:waypoint xsi:type="dc:Point" x="627" y="548" />
- <di:waypoint xsi:type="dc:Point" x="713" y="548" />
+ <di:waypoint x="1217" y="908" />
+ <di:waypoint x="1217" y="824" />
+ <di:waypoint x="1303" y="824" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="633" y="584" width="18" height="12" />
+ <dc:Bounds x="1223" y="860" width="18" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0eana0l_di" bpmnElement="SequenceFlow_0eana0l">
- <di:waypoint xsi:type="dc:Point" x="763" y="588" />
- <di:waypoint xsi:type="dc:Point" x="763" y="617" />
+ <di:waypoint x="1353" y="864" />
+ <di:waypoint x="1353" y="893" />
<bpmndi:BPMNLabel>
<dc:Bounds x="778" y="596.5" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ServiceTask_10hs368_di" bpmnElement="Task_SendSyncAckError">
- <dc:Bounds x="713" y="508" width="100" height="80" />
+ <dc:Bounds x="1303" y="784" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="SubProcess_0fuugr9_di" bpmnElement="SubProcess_0fuugr9" isExpanded="true">
- <dc:Bounds x="515" y="792" width="404" height="165" />
+ <dc:Bounds x="1105" y="1068" width="404" height="165" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="StartEvent_15qkxd7_di" bpmnElement="StartEvent_runtimeError">
- <dc:Bounds x="570" y="857" width="36" height="36" />
+ <dc:Bounds x="1160" y="1133" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="577" y="900" width="24" height="12" />
+ <dc:Bounds x="1167" y="1176" width="24" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ServiceTask_1p4kxh2_di" bpmnElement="ServiceTask_HandleRuntimeError">
- <dc:Bounds x="690" y="835" width="100" height="80" />
+ <dc:Bounds x="1280" y="1111" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="EndEvent_09e3lu5_di" bpmnElement="EndEvent__runtimeError">
- <dc:Bounds x="856" y="857" width="36" height="36" />
+ <dc:Bounds x="1446" y="1133" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="784" y="897" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_11d126w_di" bpmnElement="SequenceFlow_11d126w">
- <di:waypoint xsi:type="dc:Point" x="606" y="875" />
- <di:waypoint xsi:type="dc:Point" x="690" y="875" />
+ <di:waypoint x="1196" y="1151" />
+ <di:waypoint x="1280" y="1151" />
<bpmndi:BPMNLabel>
<dc:Bounds x="603" y="854" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0w4sx88_di" bpmnElement="SequenceFlow_0w4sx88">
- <di:waypoint xsi:type="dc:Point" x="790" y="875" />
- <di:waypoint xsi:type="dc:Point" x="856" y="875" />
+ <di:waypoint x="1380" y="1151" />
+ <di:waypoint x="1446" y="1151" />
<bpmndi:BPMNLabel>
<dc:Bounds x="778" y="854" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ServiceTask_0e2p0xs_di" bpmnElement="ServiceTask_0e2p0xs">
- <dc:Bounds x="400" y="80" width="100" height="80" />
+ <dc:Bounds x="990" y="356" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0mew9im_di" bpmnElement="SequenceFlow_0mew9im">
- <di:waypoint xsi:type="dc:Point" x="500" y="120" />
- <di:waypoint xsi:type="dc:Point" x="560" y="120" />
+ <di:waypoint x="1090" y="396" />
+ <di:waypoint x="1150" y="396" />
<bpmndi:BPMNLabel>
<dc:Bounds x="530" y="99" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0kf5sen_di" bpmnElement="SequenceFlow_0kf5sen">
- <di:waypoint xsi:type="dc:Point" x="1085" y="190" />
- <di:waypoint xsi:type="dc:Point" x="1085" y="246" />
- <di:waypoint xsi:type="dc:Point" x="1161" y="246" />
+ <di:waypoint x="1675" y="466" />
+ <di:waypoint x="1675" y="522" />
+ <di:waypoint x="1751" y="522" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1091" y="218" width="19" height="12" />
+ <dc:Bounds x="1682" y="494" width="18" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1tfizxf_di" bpmnElement="SequenceFlow_1tfizxf">
- <di:waypoint xsi:type="dc:Point" x="180" y="120" />
- <di:waypoint xsi:type="dc:Point" x="211" y="120" />
- <di:waypoint xsi:type="dc:Point" x="211" y="120" />
- <di:waypoint xsi:type="dc:Point" x="239" y="120" />
+ <di:waypoint x="770" y="396" />
+ <di:waypoint x="801" y="396" />
+ <di:waypoint x="801" y="396" />
+ <di:waypoint x="829" y="396" />
<bpmndi:BPMNLabel>
<dc:Bounds x="226" y="120" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ServiceTask_0m5xr0e_di" bpmnElement="Task_PreValidateWorkflow">
- <dc:Bounds x="80" y="80" width="100" height="80" />
+ <dc:Bounds x="670" y="356" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ServiceTask_0lbkcyp_di" bpmnElement="ServiceTask_0lbkcyp">
- <dc:Bounds x="735" y="80" width="100" height="80" />
+ <dc:Bounds x="1325" y="356" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1hsqed1_di" bpmnElement="SequenceFlow_1hsqed1">
- <di:waypoint xsi:type="dc:Point" x="660" y="120" />
- <di:waypoint xsi:type="dc:Point" x="735" y="120" />
+ <di:waypoint x="1250" y="396" />
+ <di:waypoint x="1325" y="396" />
<bpmndi:BPMNLabel>
<dc:Bounds x="697.5" y="99" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1fftixk_di" bpmnElement="SequenceFlow_1fftixk">
- <di:waypoint xsi:type="dc:Point" x="835" y="120" />
- <di:waypoint xsi:type="dc:Point" x="911" y="120" />
+ <di:waypoint x="1425" y="396" />
+ <di:waypoint x="1501" y="396" />
<bpmndi:BPMNLabel>
<dc:Bounds x="873" y="99" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1pnkpim_di" bpmnElement="SequenceFlow_1pnkpim">
- <di:waypoint xsi:type="dc:Point" x="886" y="-36" />
- <di:waypoint xsi:type="dc:Point" x="289" y="-36" />
- <di:waypoint xsi:type="dc:Point" x="289" y="80" />
+ <di:waypoint x="1476" y="240" />
+ <di:waypoint x="879" y="240" />
+ <di:waypoint x="879" y="356" />
<bpmndi:BPMNLabel>
<dc:Bounds x="587.5" y="-57" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ExclusiveGateway_1dez26n_di" bpmnElement="ExclusiveGateway_1dez26n" isMarkerVisible="true">
- <dc:Bounds x="105" y="-61" width="50" height="50" />
+ <dc:Bounds x="695" y="215" width="50" height="50" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="163" y="-48" width="61" height="24" />
+ <dc:Bounds x="745" y="228" width="78" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1lrz41x_di" bpmnElement="SequenceFlow_1lrz41x">
- <di:waypoint xsi:type="dc:Point" x="0" y="-36" />
- <di:waypoint xsi:type="dc:Point" x="105" y="-36" />
+ <di:waypoint x="590" y="240" />
+ <di:waypoint x="695" y="240" />
<bpmndi:BPMNLabel>
<dc:Bounds x="52.5" y="-57" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0etawv5_di" bpmnElement="SequenceFlow_0etawv5">
- <di:waypoint xsi:type="dc:Point" x="130" y="-11" />
- <di:waypoint xsi:type="dc:Point" x="130" y="80" />
+ <di:waypoint x="720" y="265" />
+ <di:waypoint x="720" y="356" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="139" y="29" width="12" height="12" />
+ <dc:Bounds x="729" y="305" width="13" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="EndEvent_12f15tu_di" bpmnElement="EndEvent_12f15tu">
- <dc:Bounds x="112" y="-169.83592938733125" width="36" height="36" />
+ <dc:Bounds x="702" y="106" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="120" y="-195" width="19" height="12" />
+ <dc:Bounds x="710" y="81" width="20" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0ilo6lo_di" bpmnElement="SequenceFlow_0ilo6lo">
- <di:waypoint xsi:type="dc:Point" x="130" y="-61" />
- <di:waypoint xsi:type="dc:Point" x="130" y="-134" />
+ <di:waypoint x="720" y="215" />
+ <di:waypoint x="720" y="142" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="136" y="-103" width="19" height="12" />
+ <dc:Bounds x="727" y="173" width="18" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
index 9d8b953f0e..15b91e5221 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
@@ -386,7 +386,7 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
return mapper.readValue(jsonstr, type)
} catch (IOException e) {
logger.error("{} {} fail to unMarshal json", MessageEnum.RA_NS_EXC.toString(),
- ErrorCode.BusinessProcesssError.getValue(), e)
+ ErrorCode.BusinessProcessError.getValue(), e)
}
return null
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClient.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClient.java
index a55f32aaaa..5cbd530a93 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClient.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClient.java
@@ -3,7 +3,6 @@
* ONAP - SO
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * Copyright (C) 2019 Nokia.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,59 +20,24 @@
package org.onap.so.bpmn.infrastructure.pnf.delegate;
-import java.util.Map;
import org.camunda.bpm.engine.RuntimeService;
import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.camunda.bpm.engine.delegate.JavaDelegate;
-import org.onap.so.bpmn.common.recipe.ResourceInput;
-import org.onap.so.bpmn.common.resource.ResourceRequestBuilder;
import org.onap.so.bpmn.infrastructure.pnf.dmaap.DmaapClient;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
-import java.util.HashMap;
-import java.util.Optional;
@Component
public class InformDmaapClient implements JavaDelegate {
- private static final Logger LOGGER = LoggerFactory.getLogger(InformDmaapClient.class);
private DmaapClient dmaapClient;
@Override
public void execute(DelegateExecution execution) {
String pnfCorrelationId = (String) execution.getVariable(ExecutionVariableNames.PNF_CORRELATION_ID);
RuntimeService runtimeService = execution.getProcessEngineServices().getRuntimeService();
- String processBusinessKey = execution.getProcessBusinessKey();
- dmaapClient.registerForUpdate(pnfCorrelationId,
- () -> runtimeService.createMessageCorrelation("WorkflowMessage")
- .processInstanceBusinessKey(processBusinessKey).correlateWithResult(),
- createUpdateInfoMap(execution));
- }
-
- private Map<String, String> createUpdateInfoMap(DelegateExecution execution) {
- Map<String, String> updateInfoMap = new HashMap<>();
- updateInfoMap.put("pnfCorrelationId",
- (String) execution.getVariable(ExecutionVariableNames.PNF_CORRELATION_ID));
- getResourceInput(execution).ifPresent(resourceInput -> {
- updateInfoMap.put("globalSubscriberID", resourceInput.getGlobalSubscriberId());
- updateInfoMap.put("serviceType", resourceInput.getServiceType());
- updateInfoMap.put("serviceInstanceId", resourceInput.getServiceInstanceId());
- });
- return updateInfoMap;
- }
-
- private Optional<ResourceInput> getResourceInput(DelegateExecution execution) {
- ResourceInput resourceInput = null;
- if (execution.getVariable("resourceInput") != null) {
- resourceInput = ResourceRequestBuilder.getJsonObject((String) execution.getVariable("resourceInput"),
- ResourceInput.class);
- } else {
- LOGGER.warn("resourceInput value is null for correlation id: {}",
- execution.getVariable(ExecutionVariableNames.PNF_CORRELATION_ID));
- }
- return Optional.ofNullable(resourceInput);
+ dmaapClient.registerForUpdate(pnfCorrelationId, () -> runtimeService.createMessageCorrelation("WorkflowMessage")
+ .processInstanceBusinessKey(execution.getProcessBusinessKey()).correlateWithResult());
}
@Autowired
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/DmaapClient.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/DmaapClient.java
index bafb749e15..fd7eb153b6 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/DmaapClient.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/DmaapClient.java
@@ -21,11 +21,9 @@
package org.onap.so.bpmn.infrastructure.pnf.dmaap;
-import java.util.Map;
-
public interface DmaapClient {
- void registerForUpdate(String pnfCorrelationId, Runnable informConsumer, Map<String, String> updateInfo);
+ void registerForUpdate(String pnfCorrelationId, Runnable informConsumer);
Runnable unregister(String pnfCorrelationId);
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClient.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClient.java
index bd1a45c64d..a2c73ca639 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClient.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClient.java
@@ -23,14 +23,14 @@
package org.onap.so.bpmn.infrastructure.pnf.dmaap;
import java.io.IOException;
-import java.nio.charset.StandardCharsets;
-import java.util.*;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import javax.ws.rs.core.UriBuilder;
import org.apache.http.HttpResponse;
-import org.apache.http.HttpStatus;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.HttpClientBuilder;
@@ -40,11 +40,6 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;
-import org.onap.so.client.aai.entities.uri.AAIResourceUri;
-import org.onap.so.client.aai.entities.uri.AAIUriFactory;
-import org.onap.so.client.aai.AAIResourcesClient;
-import org.onap.so.client.aai.AAIObjectType;
-import static org.onap.so.bpmn.infrastructure.pnf.dmaap.JsonUtilForPnfCorrelationId.*;
@Component
public class PnfEventReadyDmaapClient implements DmaapClient {
@@ -57,7 +52,6 @@ public class PnfEventReadyDmaapClient implements DmaapClient {
private int topicListenerDelayInSeconds;
private volatile ScheduledThreadPoolExecutor executor;
private volatile boolean dmaapThreadListenerIsRunning;
- private volatile List<Map<String, String>> listOfUpdateInfoMap;
@Autowired
public PnfEventReadyDmaapClient(Environment env) {
@@ -70,16 +64,11 @@ public class PnfEventReadyDmaapClient implements DmaapClient {
.port(env.getProperty("pnf.dmaap.port", Integer.class)).path(env.getProperty("pnf.dmaap.topicName"))
.path(env.getProperty("pnf.dmaap.consumerGroup")).path(env.getProperty("pnf.dmaap.consumerId"))
.build());
- listOfUpdateInfoMap = new ArrayList<>();
}
@Override
- public synchronized void registerForUpdate(String pnfCorrelationId, Runnable informConsumer,
- Map<String, String> updateInfo) {
+ public synchronized void registerForUpdate(String pnfCorrelationId, Runnable informConsumer) {
logger.debug("registering for pnf ready dmaap event for pnf correlation id: {}", pnfCorrelationId);
- synchronized (listOfUpdateInfoMap) {
- listOfUpdateInfoMap.add(updateInfo);
- }
pnfCorrelationIdToThreadMap.put(pnfCorrelationId, informConsumer);
if (!dmaapThreadListenerIsRunning) {
startDmaapThreadListener();
@@ -90,16 +79,6 @@ public class PnfEventReadyDmaapClient implements DmaapClient {
public synchronized Runnable unregister(String pnfCorrelationId) {
logger.debug("unregistering from pnf ready dmaap event for pnf correlation id: {}", pnfCorrelationId);
Runnable runnable = pnfCorrelationIdToThreadMap.remove(pnfCorrelationId);
- synchronized (listOfUpdateInfoMap) {
- for (int i = listOfUpdateInfoMap.size() - 1; i >= 0; i--) {
- if (!listOfUpdateInfoMap.get(i).containsKey("pnfCorrelationId"))
- continue;
- String id = listOfUpdateInfoMap.get(i).get("pnfCorrelationId");
- if (id != pnfCorrelationId)
- continue;
- listOfUpdateInfoMap.remove(i);
- }
- }
if (pnfCorrelationIdToThreadMap.isEmpty()) {
stopDmaapThreadListener();
}
@@ -132,12 +111,7 @@ public class PnfEventReadyDmaapClient implements DmaapClient {
try {
logger.debug("dmaap listener starts listening pnf ready dmaap topic");
HttpResponse response = httpClient.execute(getRequest);
- if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
- String responseString = EntityUtils.toString(response.getEntity(), StandardCharsets.UTF_8);
- List<String> idList = parseJsonToGelAllPnfCorrelationId(responseString);
- idList.stream().findFirst().ifPresent(id -> registerClientResponse(id, responseString));
- idList.forEach(this::informAboutPnfReadyIfPnfCorrelationIdFound);
- }
+ getPnfCorrelationIdListFromResponse(response).forEach(this::informAboutPnfReadyIfPnfCorrelationIdFound);
} catch (IOException e) {
logger.error("Exception caught during sending rest request to dmaap for listening event topic", e);
} finally {
@@ -145,6 +119,16 @@ public class PnfEventReadyDmaapClient implements DmaapClient {
}
}
+ private List<String> getPnfCorrelationIdListFromResponse(HttpResponse response) throws IOException {
+ if (response.getStatusLine().getStatusCode() == 200) {
+ String responseString = EntityUtils.toString(response.getEntity(), "UTF-8");
+ if (responseString != null) {
+ return JsonUtilForPnfCorrelationId.parseJsonToGelAllPnfCorrelationId(responseString);
+ }
+ }
+ return Collections.emptyList();
+ }
+
private void informAboutPnfReadyIfPnfCorrelationIdFound(String pnfCorrelationId) {
Runnable runnable = unregister(pnfCorrelationId);
if (runnable != null) {
@@ -152,36 +136,6 @@ public class PnfEventReadyDmaapClient implements DmaapClient {
runnable.run();
}
}
-
- private void registerClientResponse(String pnfCorrelationId, String response) {
-
- String customerId = null;
- String serviceType = null;
- String serId = null;
- synchronized (listOfUpdateInfoMap) {
- for (Map<String, String> map : listOfUpdateInfoMap) {
- if (!map.containsKey("pnfCorrelationId"))
- continue;
- if (pnfCorrelationId != map.get("pnfCorrelationId"))
- continue;
- if (!map.containsKey("globalSubscriberID"))
- continue;
- if (!map.containsKey("serviceType"))
- continue;
- if (!map.containsKey("serviceInstanceId"))
- continue;
- customerId = map.get("pnfCorrelationId");
- serviceType = map.get("serviceType");
- serId = map.get("serviceInstanceId");
- }
- }
- if (customerId == null || serviceType == null || serId == null)
- return;
- AAIResourcesClient client = new AAIResourcesClient();
- AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE_METADATA, customerId,
- serviceType, serId);
- client.update(uri, response);
- }
-
}
+
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/service/ServicePluginFactory.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/service/ServicePluginFactory.java
index 29dca19820..7f2cd5c071 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/service/ServicePluginFactory.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/service/ServicePluginFactory.java
@@ -832,7 +832,7 @@ public class ServicePluginFactory {
return mapper.readValue(jsonstr, type);
} catch (IOException e) {
logger.error("{} {} fail to unMarshal json", MessageEnum.RA_NS_EXC.toString(),
- ErrorCode.BusinessProcesssError.getValue(), e);
+ ErrorCode.BusinessProcessError.getValue(), e);
}
return null;
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CancelDmaapSubscriptionTest.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CancelDmaapSubscriptionTest.java
index bfaf9cfee0..c2e87d57bf 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CancelDmaapSubscriptionTest.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CancelDmaapSubscriptionTest.java
@@ -32,7 +32,7 @@ public class CancelDmaapSubscriptionTest {
private static final String TEST_PNF_CORRELATION_ID = "testPnfCorrelationId";
@Test
- public void shouldCancelSubscription() throws Exception {
+ public void shouldCancelSubscription() {
// given
CancelDmaapSubscription delegate = new CancelDmaapSubscription();
DmaapClientTestImpl dmaapClientTest = new DmaapClientTestImpl();
@@ -42,7 +42,7 @@ public class CancelDmaapSubscriptionTest {
.thenReturn(TEST_PNF_CORRELATION_ID);
when(delegateExecution.getProcessBusinessKey()).thenReturn("testBusinessKey");
dmaapClientTest.registerForUpdate("testPnfCorrelationId", () -> {
- }, null);
+ });
// when
delegate.execute(delegateExecution);
// then
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/DmaapClientTestImpl.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/DmaapClientTestImpl.java
index 598582bfd8..0ec0ac8214 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/DmaapClientTestImpl.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/DmaapClientTestImpl.java
@@ -21,9 +21,8 @@
package org.onap.so.bpmn.infrastructure.pnf.delegate;
-import java.util.Map;
-import org.onap.so.bpmn.infrastructure.pnf.dmaap.DmaapClient;
import java.util.Objects;
+import org.onap.so.bpmn.infrastructure.pnf.dmaap.DmaapClient;
public class DmaapClientTestImpl implements DmaapClient {
@@ -31,7 +30,7 @@ public class DmaapClientTestImpl implements DmaapClient {
private Runnable informConsumer;
@Override
- public void registerForUpdate(String pnfCorrelationId, Runnable informConsumer, Map<String, String> updateInfo) {
+ public void registerForUpdate(String pnfCorrelationId, Runnable informConsumer) {
this.pnfCorrelationId = pnfCorrelationId;
this.informConsumer = informConsumer;
}
@@ -47,19 +46,15 @@ public class DmaapClientTestImpl implements DmaapClient {
return null;
}
- public String getPnfCorrelationId() {
+ String getPnfCorrelationId() {
return pnfCorrelationId;
}
- public Runnable getInformConsumer() {
+ Runnable getInformConsumer() {
return informConsumer;
}
- public void sendMessage() {
- informConsumer.run();
- }
-
- public boolean haveRegisteredConsumer() {
+ boolean haveRegisteredConsumer() {
return pnfCorrelationId != null;
}
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClientTest.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClientTest.java
index 93a71b31ec..94aa1427a4 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClientTest.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClientTest.java
@@ -34,8 +34,6 @@ import org.camunda.bpm.engine.runtime.MessageCorrelationBuilder;
import org.junit.Before;
import org.junit.Test;
import org.mockito.InOrder;
-import org.onap.so.bpmn.common.recipe.ResourceInput;
-import org.onap.so.bpmn.common.resource.ResourceRequestBuilder;
public class InformDmaapClientTest {
@Before
@@ -76,41 +74,11 @@ public class InformDmaapClientTest {
inOrder.verify(messageCorrelationBuilder).correlateWithResult();
}
- private ResourceInput getUpdateResInputObj(String modelName) {
-
- String resourceInput = "{\n" + "\t\"resourceInstanceName\": \"SotnFc-wan-connection_wanconnection-37\",\n"
- + "\t\"resourceInstanceDes\": null,\n" + "\t\"globalSubscriberId\": \"sdwandemo\",\n"
- + "\t\"serviceType\": \"CCVPN\",\n" + "\t\"operationId\": \"df3387b5-4fbf-41bd-82a0-13a955ac178a\",\n"
- + "\t\"serviceModelInfo\": {\n" + "\t\t\"modelName\": \"WanConnectionSvc03\",\n"
- + "\t\t\"modelUuid\": \"198b066c-0771-4157-9594-1824adfdda7e\",\n"
- + "\t\t\"modelInvariantUuid\": \"43fb5165-7d03-4009-8951-a8f45d3f0148\",\n"
- + "\t\t\"modelVersion\": \"1.0\",\n" + "\t\t\"modelCustomizationUuid\": \"\",\n"
- + "\t\t\"modelCustomizationName\": \"\",\n" + "\t\t\"modelInstanceName\": \"\",\n"
- + "\t\t\"modelType\": \"\"\n" + "\t},\n" + "\t\"resourceModelInfo\": {\n" + "\t\t\"modelName\": \""
- + modelName + "\",\n" + "\t\t\"modelUuid\": \"6a0bf88b-343c-415b-88c1-6f73702452c4\",\n"
- + "\t\t\"modelInvariantUuid\": \"50bc3415-2e01-4e50-a9e1-ec9584599bb3\",\n"
- + "\t\t\"modelCustomizationUuid\": \"b205d620-84bd-4058-afa0-e3aeee8bb712\",\n"
- + "\t\t\"modelCustomizationName\": \"\",\n"
- + "\t\t\"modelInstanceName\": \"SotnFc-wan-connection 0\",\n" + "\t\t\"modelType\": \"\"\n" + "\t},\n"
- + "\t\"resourceInstancenUuid\": null,\n"
- + "\t\"resourceParameters\": \"{\\n\\\"locationConstraints\\\":[],\\n\\\"requestInputs\\\":{\\\"sotnfcspecwanconnection0_route-objective-function\\\":null,\\\"sotnfcspecwanconnection0_colorAware\\\":null,\\\"3rdctlspecwanconnection0_thirdPartyAdaptorRpc\\\":null,\\\"sotnfcspecwanconnection0_couplingFlag\\\":null,\\\"sotnfcspecwanconnection0_pbs\\\":null,\\\"3rdctlspecwanconnection0_thirdPartySdncId\\\":null,\\\"sotnfcspecwanconnection0_cbs\\\":null,\\\"3rdctlspecwanconnection0_thirdpartySdncName\\\":null,\\\"sotnfcspecwanconnection0_total-size\\\":null,\\\"3rdctlspecwanconnection0_templateFileName\\\":\\\"sotn_create_zte_template.json\\\",\\\"fcwanconnection0_type\\\":null,\\\"sotnfcspecwanconnection0_cir\\\":null,\\\"fcwanconnection0_uuid\\\":null,\\\"sotnfcspecwanconnection0_diversity-policy\\\":null,\\\"nf_naming\\\":true,\\\"multi_stage_design\\\":false,\\\"availability_zone_max_count\\\":1,\\\"3rdctlspecwanconnection0_restapiUrl\\\":\\\"http://10.80.80.21:8443/restconf/operations/ZTE-API-ConnectivityService:create-connectivity-service\\\",\\\"max_instances\\\":null,\\\"sotnfcspecwanconnection0_reroute\\\":null,\\\"fcwanconnection0_name\\\":null,\\\"sotnfcspecwanconnection0_dualLink\\\":null,\\\"min_instances\\\":null,\\\"sotnfcspecwanconnection0_pir\\\":null,\\\"sotnfcspecwanconnection0_service-type\\\":null}\\n}\",\n"
- + "\t\"operationType\": \"createInstance\",\n"
- + "\t\"serviceInstanceId\": \"ffa07ae4-f820-45af-9439-1416b3bc1d39\",\n"
- + "\t\"requestsInputs\": \"{\\r\\n\\t\\\"service\\\": {\\r\\n\\t\\t\\\"name\\\": \\\"wanconnection-37\\\",\\r\\n\\t\\t\\\"description\\\": \\\"deafe\\\",\\r\\n\\t\\t\\\"serviceInvariantUuid\\\": \\\"43fb5165-7d03-4009-8951-a8f45d3f0148\\\",\\r\\n\\t\\t\\\"serviceUuid\\\": \\\"198b066c-0771-4157-9594-1824adfdda7e\\\",\\r\\n\\t\\t\\\"globalSubscriberId\\\": \\\"sdwandemo\\\",\\r\\n\\t\\t\\\"serviceType\\\": \\\"CCVPN\\\",\\r\\n\\t\\t\\\"parameters\\\": {\\r\\n\\t\\t\\t\\\"resources\\\": [\\r\\n\\t\\t\\t],\\r\\n\\t\\t\\t\\\"requestInputs\\\": {\\r\\n\\t\\t\\t\\t\\\"sotnfcwanconnection0_3rdctlspecwanconnection0_restapiUrl\\\": \\\"http://10.80.80.21:8443/restconf/operations/ZTE-API-ConnectivityService:create-connectivity-service\\\",\\r\\n\\t\\t\\t\\t\\\"sotnfcwanconnection0_3rdctlspecwanconnection0_templateFileName\\\": \\\"sotn_create_zte_template.json\\\",\\r\\n\\t\\t\\t\\t\\\"sdwanfcwanconnection0_3rdctlspecwanconnection0_restapiUrl\\\": \\\"http://10.80.80.21:8443/restconf/operations/ZTE-API-ConnectivityService:create-connectivity-service\\\",\\r\\n\\t\\t\\t\\t\\\"sdwanfcwanconnection0_3rdctlspecwanconnection0_templateFileName\\\": \\\"sdwan_create_zte_template.json\\\",\\\"ont_ont_manufacturer\\\":\\\"huawei\\\",\\\"ont_ont_serial_num\\\":\\\"123\\\"\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t}\\r\\n}\"\n"
- + "}";
-
- ResourceInput resourceInputObj = ResourceRequestBuilder.getJsonObject(resourceInput, ResourceInput.class);
- return resourceInputObj;
- }
-
private DelegateExecution mockDelegateExecution() {
- ResourceInput input = getUpdateResInputObj("OLT");
DelegateExecution delegateExecution = mock(DelegateExecution.class);
-
when(delegateExecution.getVariable(eq(ExecutionVariableNames.PNF_CORRELATION_ID)))
.thenReturn("testPnfCorrelationId");
when(delegateExecution.getProcessBusinessKey()).thenReturn("testBusinessKey");
- when(delegateExecution.getVariable("resourceInput")).thenReturn(input.toString());
ProcessEngineServices processEngineServices = mock(ProcessEngineServices.class);
when(delegateExecution.getProcessEngineServices()).thenReturn(processEngineServices);
RuntimeService runtimeService = mock(RuntimeService.class);
@@ -118,7 +86,6 @@ public class InformDmaapClientTest {
messageCorrelationBuilder = mock(MessageCorrelationBuilder.class);
when(runtimeService.createMessageCorrelation(any())).thenReturn(messageCorrelationBuilder);
when(messageCorrelationBuilder.processInstanceBusinessKey(any())).thenReturn(messageCorrelationBuilder);
-
return delegateExecution;
}
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/Constants.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/Constants.java
index c112d200e3..9f85feac07 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/Constants.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/Constants.java
@@ -60,5 +60,8 @@ public class Constants {
public static final String OPERATION_STATUS_PARAM_NAME = "operationStatus";
+ public static final String EXT_VIRTUAL_LINKS = "extVirtualLinks";
+ public static final String ADDITIONAL_PARAMS = "additionalParams";
+
private Constants() {}
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/InputParameterRetrieverTask.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/InputParameterRetrieverTask.java
index 661fdb258b..877d065085 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/InputParameterRetrieverTask.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/InputParameterRetrieverTask.java
@@ -21,12 +21,17 @@ package org.onap.so.bpmn.infrastructure.adapter.vnfm.tasks;
import static org.onap.so.bpmn.infrastructure.adapter.vnfm.tasks.Constants.INPUT_PARAMETER;
import static org.onap.so.bpmn.servicedecomposition.entities.ResourceKey.GENERIC_VNF_ID;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
import org.onap.so.bpmn.common.BuildingBlockExecution;
import org.onap.so.bpmn.infrastructure.adapter.vnfm.tasks.utils.InputParameter;
import org.onap.so.bpmn.infrastructure.adapter.vnfm.tasks.utils.InputParametersProvider;
import org.onap.so.bpmn.infrastructure.adapter.vnfm.tasks.utils.NullInputParameter;
import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
+import org.onap.so.bpmn.servicedecomposition.entities.GeneralBuildingBlock;
import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB;
+import org.onap.so.client.exception.BBObjectNotFoundException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -42,14 +47,18 @@ public class InputParameterRetrieverTask {
private static final Logger LOGGER = LoggerFactory.getLogger(InputParameterRetrieverTask.class);
- private final InputParametersProvider inputParametersProvider;
+ private final InputParametersProvider<GenericVnf> sdncInputParametersProvider;
private final ExtractPojosForBB extractPojosForBB;
+ private final InputParametersProvider<Map<String, Object>> userParamInputParametersProvider;
+
@Autowired
- public InputParameterRetrieverTask(final InputParametersProvider inputParametersProvider,
+ public InputParameterRetrieverTask(final InputParametersProvider<GenericVnf> inputParametersProvider,
+ final InputParametersProvider<Map<String, Object>> userParamInputParametersProvider,
final ExtractPojosForBB extractPojosForBB) {
- this.inputParametersProvider = inputParametersProvider;
+ this.sdncInputParametersProvider = inputParametersProvider;
+ this.userParamInputParametersProvider = userParamInputParametersProvider;
this.extractPojosForBB = extractPojosForBB;
}
@@ -57,17 +66,56 @@ public class InputParameterRetrieverTask {
try {
LOGGER.debug("Executing getInputParameters ...");
- final GenericVnf vnf = extractPojosForBB.extractByKey(execution, GENERIC_VNF_ID);
- final InputParameter inputParameter = inputParametersProvider.getInputParameter(vnf);
+ final InputParameter inputParameter = new InputParameter();
+
+ final InputParameter userParamsInputParameter = getUserParamsInputParameter(execution);
+ final InputParameter sdncInputParameter = getSdncInputParameter(execution);
+
+ inputParameter.putAdditionalParams(sdncInputParameter.getAdditionalParams());
+ inputParameter.addExtVirtualLinks(sdncInputParameter.getExtVirtualLinks());
+
+ inputParameter.putAdditionalParams(userParamsInputParameter.getAdditionalParams());
+ inputParameter.addExtVirtualLinks(userParamsInputParameter.getExtVirtualLinks());
LOGGER.debug("inputParameter: {}", inputParameter);
execution.setVariable(INPUT_PARAMETER, inputParameter);
LOGGER.debug("Finished executing getInputParameters ...");
} catch (final Exception exception) {
- LOGGER.error("Unable to invoke create and instantiation request", exception);
+ LOGGER.error("Unable to get input parameters", exception);
execution.setVariable(INPUT_PARAMETER, NullInputParameter.NULL_INSTANCE);
}
}
+ private InputParameter getSdncInputParameter(final BuildingBlockExecution execution)
+ throws BBObjectNotFoundException {
+ final GenericVnf vnf = extractPojosForBB.extractByKey(execution, GENERIC_VNF_ID);
+ return sdncInputParametersProvider.getInputParameter(vnf);
+ }
+
+ private InputParameter getUserParamsInputParameter(final BuildingBlockExecution execution) {
+ final GeneralBuildingBlock generalBuildingBlock = execution.getGeneralBuildingBlock();
+
+ if (generalBuildingBlock != null && generalBuildingBlock.getRequestContext() != null
+ && generalBuildingBlock.getRequestContext().getRequestParameters() != null) {
+
+ final List<Map<String, Object>> userParams =
+ generalBuildingBlock.getRequestContext().getRequestParameters().getUserParams();
+ if (userParams != null) {
+ final Map<String, Object> params = new HashMap<>();
+
+ userParams.stream().forEach(obj -> {
+ params.putAll(obj);
+ });
+ LOGGER.info("User params found : {}", params);
+ if (userParams != null && !userParams.isEmpty()) {
+ return userParamInputParametersProvider.getInputParameter(params);
+ }
+ }
+
+ }
+ LOGGER.warn("No input parameters found in userparams ...");
+ return NullInputParameter.NULL_INSTANCE;
+ }
+
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/AbstractInputParametersProvider.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/AbstractInputParametersProvider.java
new file mode 100644
index 0000000000..5cd84a2e11
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/AbstractInputParametersProvider.java
@@ -0,0 +1,66 @@
+/*-
+ * ============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.bpmn.infrastructure.adapter.vnfm.tasks.utils;
+
+import static org.onap.so.bpmn.infrastructure.adapter.vnfm.tasks.Constants.ADDITIONAL_PARAMS;
+import static org.onap.so.bpmn.infrastructure.adapter.vnfm.tasks.Constants.EXT_VIRTUAL_LINKS;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import org.onap.vnfmadapter.v1.model.ExternalVirtualLink;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+/**
+ * @author Waqas Ikram (waqas.ikram@ericsson.com)
+ *
+ */
+public abstract class AbstractInputParametersProvider<T> implements InputParametersProvider<T> {
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(AbstractInputParametersProvider.class);
+
+ protected Map<String, String> parseAdditionalParameters(final String additionalParamsString) {
+ try {
+ final ObjectMapper mapper = new ObjectMapper();
+ final TypeReference<Map<String, String>> typeRef = new TypeReference<Map<String, String>>() {};
+ return mapper.readValue(additionalParamsString, typeRef);
+ } catch (final Exception exception) {
+ LOGGER.error("Unable to parse {} ", ADDITIONAL_PARAMS, exception);
+ }
+ return Collections.emptyMap();
+
+ }
+
+ protected List<ExternalVirtualLink> parseExternalVirtualLinks(final String extVirtualLinksString) {
+ try {
+ final ObjectMapper mapper = new ObjectMapper();
+ final TypeReference<List<ExternalVirtualLink>> extVirtualLinksStringTypeRef =
+ new TypeReference<List<ExternalVirtualLink>>() {};
+ return mapper.readValue(extVirtualLinksString, extVirtualLinksStringTypeRef);
+ } catch (final Exception exception) {
+ LOGGER.error("Unable to parse {} ", EXT_VIRTUAL_LINKS, exception);
+ }
+ return Collections.emptyList();
+ }
+
+
+}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/InputParameter.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/InputParameter.java
index d01d494c58..fde69c7e91 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/InputParameter.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/InputParameter.java
@@ -24,6 +24,8 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
import org.onap.vnfmadapter.v1.model.ExternalVirtualLink;
/**
@@ -39,6 +41,8 @@ public class InputParameter implements Serializable {
private List<ExternalVirtualLink> extVirtualLinks = new ArrayList<>();
+ public InputParameter() {}
+
public InputParameter(final Map<String, String> additionalParams, final List<ExternalVirtualLink> extVirtualLinks) {
this.additionalParams = additionalParams;
this.extVirtualLinks = extVirtualLinks;
@@ -65,6 +69,12 @@ public class InputParameter implements Serializable {
this.additionalParams = additionalParams;
}
+ public void putAdditionalParams(final Map<String, String> additionalParams) {
+ if (additionalParams != null) {
+ this.additionalParams.putAll(additionalParams);
+ }
+ }
+
/**
* @param extVirtualLinks the extVirtualLinks to set
*/
@@ -72,9 +82,17 @@ public class InputParameter implements Serializable {
this.extVirtualLinks = extVirtualLinks;
}
+ public void addExtVirtualLinks(final List<ExternalVirtualLink> extVirtualLinks) {
+ if (extVirtualLinks != null) {
+ this.extVirtualLinks = Stream.concat(this.extVirtualLinks.stream(), extVirtualLinks.stream()).distinct()
+ .collect(Collectors.toList());
+ }
+ }
+
@Override
public String toString() {
- return "InputParameter [additionalParams=" + additionalParams + ", extVirtualLinks=" + extVirtualLinks + "]";
+ return this.getClass().getSimpleName() + " [additionalParams=" + additionalParams + ", extVirtualLinks="
+ + extVirtualLinks + "]";
}
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/InputParametersProvider.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/InputParametersProvider.java
index 55203fb7cc..2d11143fff 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/InputParametersProvider.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/InputParametersProvider.java
@@ -19,13 +19,11 @@
*/
package org.onap.so.bpmn.infrastructure.adapter.vnfm.tasks.utils;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
-
/**
* @author waqas.ikram@est.tech
*/
-public interface InputParametersProvider {
+public interface InputParametersProvider<T> {
- InputParameter getInputParameter(final GenericVnf genericVnf);
+ InputParameter getInputParameter(final T object);
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/NullInputParameter.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/NullInputParameter.java
index fb877ac55d..2eed224eb7 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/NullInputParameter.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/NullInputParameter.java
@@ -20,12 +20,18 @@
package org.onap.so.bpmn.infrastructure.adapter.vnfm.tasks.utils;
import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import org.onap.vnfmadapter.v1.model.ExternalVirtualLink;
/**
* @author waqas.ikram@est.tech
*/
public class NullInputParameter extends InputParameter {
+ private static final String ERROR =
+ "method should not be called for null object " + NullInputParameter.class.getSimpleName();
+
private static final long serialVersionUID = -7261286746726871696L;
public static final NullInputParameter NULL_INSTANCE = new NullInputParameter();
@@ -34,4 +40,23 @@ public class NullInputParameter extends InputParameter {
super(Collections.emptyMap(), Collections.emptyList());
}
+ @Override
+ public void setAdditionalParams(final Map<String, String> additionalParams) {
+ throw new UnsupportedOperationException("setAdditionalParams() " + ERROR);
+ }
+
+ @Override
+ public void setExtVirtualLinks(final List<ExternalVirtualLink> extVirtualLinks) {
+ throw new UnsupportedOperationException("setExtVirtualLinks() " + ERROR);
+ }
+
+ @Override
+ public void addExtVirtualLinks(final List<ExternalVirtualLink> extVirtualLinks) {
+ throw new UnsupportedOperationException("addExtVirtualLinks() " + ERROR);
+ }
+
+ @Override
+ public void putAdditionalParams(final Map<String, String> additionalParams) {
+ throw new UnsupportedOperationException("putAdditionalParams() " + ERROR);
+ }
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/InputParametersProviderImpl.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/SdncInputParametersProvider.java
index bf4f16b355..7d81f4d5c2 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/InputParametersProviderImpl.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/SdncInputParametersProvider.java
@@ -19,6 +19,8 @@
*/
package org.onap.so.bpmn.infrastructure.adapter.vnfm.tasks.utils;
+import static org.onap.so.bpmn.infrastructure.adapter.vnfm.tasks.Constants.ADDITIONAL_PARAMS;
+import static org.onap.so.bpmn.infrastructure.adapter.vnfm.tasks.Constants.EXT_VIRTUAL_LINKS;
import static org.onap.so.bpmn.infrastructure.adapter.vnfm.tasks.Constants.FORWARD_SLASH;
import static org.onap.so.bpmn.infrastructure.adapter.vnfm.tasks.Constants.PRELOAD_VNFS_URL;
import java.io.IOException;
@@ -35,8 +37,6 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
-import com.fasterxml.jackson.core.JsonParseException;
-import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.jayway.jsonpath.JsonPath;
import net.minidev.json.JSONArray;
@@ -48,18 +48,16 @@ import net.minidev.json.JSONArray;
* @author waqas.ikram@est.tech
*/
@Service
-public class InputParametersProviderImpl implements InputParametersProvider {
+public class SdncInputParametersProvider extends AbstractInputParametersProvider<GenericVnf> {
- private static final Logger LOGGER = LoggerFactory.getLogger(InputParametersProviderImpl.class);
+ private static final Logger LOGGER = LoggerFactory.getLogger(SdncInputParametersProvider.class);
- private static final String EXT_VIRTUAL_LINKS = "extVirtualLinks";
- private static final String ADDITIONAL_PARAMS = "additionalParams";
private static final String VNF_PARAMETERS_PATH = "$..vnf-parameters";
private final SDNCClient sdncClient;
@Autowired
- public InputParametersProviderImpl(final SDNCClient sdncClient) {
+ public SdncInputParametersProvider(final SDNCClient sdncClient) {
this.sdncClient = sdncClient;
}
@@ -80,8 +78,11 @@ public class InputParametersProviderImpl implements InputParametersProvider {
if (vnfParametersObject instanceof JSONArray) {
final JSONArray vnfParameters = (JSONArray) vnfParametersObject;
final Map<String, String> vnfParametersMap = getVnfParameterMap(vnfParameters);
- return new InputParameter(getAdditionalParameters(vnfParametersMap),
- getExtVirtualLinks(vnfParametersMap));
+ final Map<String, String> additionalParameters = getAdditionalParameters(vnfParametersMap);
+ final List<ExternalVirtualLink> extVirtualLinks = getExtVirtualLinks(vnfParametersMap);
+ final InputParameter inputParameter = new InputParameter(additionalParameters, extVirtualLinks);
+ LOGGER.info("InputParameter found in sdnc response : {}", inputParameter);
+ return inputParameter;
}
}
}
@@ -93,39 +94,24 @@ public class InputParametersProviderImpl implements InputParametersProvider {
}
- private List<ExternalVirtualLink> getExtVirtualLinks(final Map<String, String> vnfParametersMap)
- throws JsonParseException, IOException {
- try {
- final String extVirtualLinksString = vnfParametersMap.get(EXT_VIRTUAL_LINKS);
-
- if (extVirtualLinksString != null && !extVirtualLinksString.isEmpty()) {
- final ObjectMapper mapper = new ObjectMapper();
- final TypeReference<List<ExternalVirtualLink>> extVirtualLinksStringTypeRef =
- new TypeReference<List<ExternalVirtualLink>>() {};
+ private List<ExternalVirtualLink> getExtVirtualLinks(final Map<String, String> vnfParametersMap) {
+ final String extVirtualLinksString = vnfParametersMap.get(EXT_VIRTUAL_LINKS);
- return mapper.readValue(extVirtualLinksString, extVirtualLinksStringTypeRef);
- }
- } catch (final Exception exception) {
- LOGGER.error("Unable to parse {} ", EXT_VIRTUAL_LINKS, exception);
+ if (extVirtualLinksString != null && !extVirtualLinksString.isEmpty()) {
+ return parseExternalVirtualLinks(extVirtualLinksString);
}
return Collections.emptyList();
}
- private Map<String, String> getAdditionalParameters(final Map<String, String> vnfParametersMap)
- throws JsonParseException, IOException {
- try {
- final String additionalParamsString = vnfParametersMap.get(ADDITIONAL_PARAMS);
- if (additionalParamsString != null && !additionalParamsString.isEmpty()) {
- final ObjectMapper mapper = new ObjectMapper();
- final TypeReference<Map<String, String>> typeRef = new TypeReference<Map<String, String>>() {};
- return mapper.readValue(additionalParamsString, typeRef);
- }
- } catch (final Exception exception) {
- LOGGER.error("Unable to parse {} ", ADDITIONAL_PARAMS, exception);
+ private Map<String, String> getAdditionalParameters(final Map<String, String> vnfParametersMap) {
+ final String additionalParamsString = vnfParametersMap.get(ADDITIONAL_PARAMS);
+ if (additionalParamsString != null && !additionalParamsString.isEmpty()) {
+ return parseAdditionalParameters(additionalParamsString);
}
return Collections.emptyMap();
}
+
private Map<String, String> getVnfParameterMap(final JSONArray array) {
try {
if (array != null) {
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/UserParamInputParametersProvider.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/UserParamInputParametersProvider.java
new file mode 100644
index 0000000000..ac939d04ec
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/UserParamInputParametersProvider.java
@@ -0,0 +1,58 @@
+/*-
+ * ============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.bpmn.infrastructure.adapter.vnfm.tasks.utils;
+
+import static org.onap.so.bpmn.infrastructure.adapter.vnfm.tasks.Constants.ADDITIONAL_PARAMS;
+import static org.onap.so.bpmn.infrastructure.adapter.vnfm.tasks.Constants.EXT_VIRTUAL_LINKS;
+import java.util.Map;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+
+/**
+ * @author Waqas Ikram (waqas.ikram@ericsson.com)
+ *
+ */
+@Service
+public class UserParamInputParametersProvider extends AbstractInputParametersProvider<Map<String, Object>> {
+ private static final Logger LOGGER = LoggerFactory.getLogger(UserParamInputParametersProvider.class);
+
+ @Override
+ public InputParameter getInputParameter(final Map<String, Object> userParams) {
+ if (userParams != null) {
+ final InputParameter inputParameter = new InputParameter();
+ final Object additionalParams = userParams.get(ADDITIONAL_PARAMS);
+
+ if (additionalParams != null && additionalParams instanceof String) {
+ inputParameter.setAdditionalParams(parseAdditionalParameters(additionalParams.toString()));
+ }
+
+ final Object extVirtualLinks = userParams.get(EXT_VIRTUAL_LINKS);
+ if (extVirtualLinks != null && extVirtualLinks instanceof String) {
+ inputParameter.setExtVirtualLinks(parseExternalVirtualLinks(extVirtualLinks.toString()));
+ }
+ LOGGER.info("InputParameter found in userParams : {}", inputParameter);
+ return inputParameter;
+ }
+ LOGGER.warn("No input parameters found ...");
+ return NullInputParameter.NULL_INSTANCE;
+ }
+
+}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/audit/AuditTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/audit/AuditTasks.java
index 922b721098..30e2c94ac6 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/audit/AuditTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/audit/AuditTasks.java
@@ -21,7 +21,6 @@
package org.onap.so.bpmn.infrastructure.audit;
-import java.util.List;
import org.onap.so.audit.beans.AuditInventory;
import org.onap.so.bpmn.common.BuildingBlockExecution;
import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
@@ -32,10 +31,6 @@ import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey;
import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB;
import org.onap.so.client.exception.BBObjectNotFoundException;
import org.onap.so.client.exception.ExceptionBuilder;
-import org.onap.so.client.graphinventory.GraphInventoryCommonObjectMapperProvider;
-import org.onap.so.db.request.beans.RequestProcessingData;
-import org.onap.so.db.request.client.RequestsDbClient;
-import org.onap.so.objects.audit.AAIObjectAuditList;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/exceptions/VnfNotFoundException.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/exceptions/VnfNotFoundException.java
new file mode 100644
index 0000000000..e1c2e01832
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/exceptions/VnfNotFoundException.java
@@ -0,0 +1,7 @@
+package org.onap.so.bpmn.infrastructure.flowspecific.exceptions;
+
+public class VnfNotFoundException extends Exception {
+ public VnfNotFoundException(String modelCustomizationUuidOfSearchedVnf) {
+ super("Can not find vnf for model customization uuid: " + modelCustomizationUuidOfSearchedVnf);
+ };
+}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigAssignVnf.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigAssignVnf.java
index e73a504291..3a69d27f32 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigAssignVnf.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigAssignVnf.java
@@ -22,11 +22,13 @@
package org.onap.so.bpmn.infrastructure.flowspecific.tasks;
import com.fasterxml.jackson.databind.ObjectMapper;
+import java.io.IOException;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.UUID;
import org.onap.so.bpmn.common.BuildingBlockExecution;
+import org.onap.so.bpmn.infrastructure.flowspecific.exceptions.VnfNotFoundException;
import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
import org.onap.so.bpmn.servicedecomposition.entities.GeneralBuildingBlock;
@@ -127,12 +129,12 @@ public class ConfigAssignVnf {
return getServiceObjectFromServiceMap(serviceMap);
}
- private Service getServiceObjectFromServiceMap(Map<String, Object> serviceMap) throws Exception {
+ private Service getServiceObjectFromServiceMap(Map<String, Object> serviceMap) throws IOException {
ObjectMapper objectMapper = new ObjectMapper();
String serviceFromJson = objectMapper.writeValueAsString(serviceMap.get("service"));
try {
return objectMapper.readValue(serviceFromJson, Service.class);
- } catch (Exception e) {
+ } catch (IOException e) {
logger.error(String.format(
"An exception occurred while converting json object to Service object. The json is: %s",
serviceFromJson), e);
@@ -141,15 +143,14 @@ public class ConfigAssignVnf {
}
private List<Map<String, String>> getInstanceParamForVnf(Service service, String genericVnfModelCustomizationUuid)
- throws Exception {
+ throws VnfNotFoundException {
Optional<Vnfs> foundedVnf = service.getResources().getVnfs().stream()
.filter(vnfs -> vnfs.getModelInfo().getModelCustomizationId().equals(genericVnfModelCustomizationUuid))
.findFirst();
if (foundedVnf.isPresent()) {
return foundedVnf.get().getInstanceParams();
} else {
- throw new Exception(String.format("Can not find vnf for genericVnfModelCustomizationUuid: %s",
- genericVnfModelCustomizationUuid));
+ throw new VnfNotFoundException(genericVnfModelCustomizationUuid);
}
}
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCRequestTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCRequestTasks.java
index 3383fde0a8..e55fa9e24b 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCRequestTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCRequestTasks.java
@@ -102,6 +102,9 @@ public class SDNCRequestTasks {
String asyncRequest = (String) execution.getVariable(request.getCorrelationName() + MESSAGE);
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+ dbf.setFeature("http://xml.org/sax/features/external-general-entities", false);
+ dbf.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
+ dbf.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
DocumentBuilder db = dbf.newDocumentBuilder();
Document doc = db.parse(new InputSource(new StringReader(asyncRequest)));
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java
index 11c6455474..58bf17f08b 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java
@@ -71,11 +71,13 @@ import org.onap.so.db.catalog.beans.VfModuleCustomization;
import org.onap.so.db.catalog.beans.macro.NorthBoundRequest;
import org.onap.so.db.catalog.beans.macro.OrchestrationFlow;
import org.onap.so.db.catalog.client.CatalogDbClient;
+import org.onap.so.serviceinstancebeans.CloudConfiguration;
import org.onap.so.serviceinstancebeans.ModelInfo;
import org.onap.so.serviceinstancebeans.ModelType;
import org.onap.so.serviceinstancebeans.Networks;
import org.onap.so.serviceinstancebeans.RelatedInstance;
import org.onap.so.serviceinstancebeans.RequestDetails;
+import org.onap.so.serviceinstancebeans.RequestInfo;
import org.onap.so.serviceinstancebeans.Service;
import org.onap.so.serviceinstancebeans.ServiceInstancesRequest;
import org.onap.so.serviceinstancebeans.VfModules;
@@ -182,27 +184,15 @@ public class WorkflowAction {
execution.setVariable(BBConstants.G_ISTOPLEVELFLOW, true);
ServiceInstancesRequest sIRequest = mapper.readValue(bpmnRequest, ServiceInstancesRequest.class);
RequestDetails requestDetails = sIRequest.getRequestDetails();
- String cloudOwner = "";
- try {
- cloudOwner = requestDetails.getCloudConfiguration().getCloudOwner();
- } catch (Exception ex) {
- logger.error("Exception in getCloundOwner", ex);
- cloudOwner = environment.getProperty(defaultCloudOwner);
- }
- boolean suppressRollback = false;
- try {
- suppressRollback = requestDetails.getRequestInfo().getSuppressRollback();
- } catch (Exception ex) {
- logger.error("Exception in getSuppressRollback", ex);
- suppressRollback = false;
- }
- execution.setVariable("suppressRollback", suppressRollback);
+ execution.setVariable("suppressRollback", isSuppressRollback(requestDetails.getRequestInfo()));
boolean isResume = false;
if (isUriResume(uri)) {
isResume = true;
- logger.debug("replacing URI {}", uri);
- uri = bbInputSetupUtils.loadOriginalInfraActiveRequestById(requestId).getRequestUrl();
- logger.debug("for RESUME with original value {}", uri);
+ if (!aLaCarte) {
+ logger.debug("replacing URI {}", uri);
+ uri = bbInputSetupUtils.loadOriginalInfraActiveRequestById(requestId).getRequestUrl();
+ logger.debug("for RESUME with original value {}", uri);
+ }
}
Resource resource = extractResourceIdAndTypeFromUri(uri);
WorkflowType resourceType = resource.getResourceType();
@@ -234,6 +224,7 @@ public class WorkflowAction {
"Could not resume request with request Id: " + requestId + ". No flowsToExecute was found");
}
} else {
+ String cloudOwner = getCloudOwner(requestDetails.getCloudConfiguration());
if (aLaCarte) {
if (orchFlows == null || orchFlows.isEmpty()) {
orchFlows = queryNorthBoundRequestCatalogDb(execution, requestAction, resourceType, aLaCarte,
@@ -344,8 +335,14 @@ public class WorkflowAction {
orchFlows = queryNorthBoundRequestCatalogDb(execution, requestAction, resourceType, aLaCarte,
cloudOwner, serviceType);
}
- flowsToExecute = buildExecuteBuildingBlockList(orchFlows, resourceCounter, requestId, apiVersion,
- resourceId, requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails);
+ boolean vnfReplace = false;
+ if (resourceType.equals(WorkflowType.VNF) && ("replaceInstance".equalsIgnoreCase(requestAction)
+ || "replaceInstanceRetainAssignments".equalsIgnoreCase(requestAction))) {
+ vnfReplace = true;
+ }
+ flowsToExecute =
+ buildExecuteBuildingBlockList(orchFlows, resourceCounter, requestId, apiVersion, resourceId,
+ requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, vnfReplace);
if (!resourceCounter.stream().filter(x -> WorkflowType.NETWORKCOLLECTION == x.getResourceType())
.collect(Collectors.toList()).isEmpty()) {
logger.info("Sorting for Vlan Tagging");
@@ -410,6 +407,21 @@ public class WorkflowAction {
}
}
+ private String getCloudOwner(CloudConfiguration cloudConfiguration) {
+ if (cloudConfiguration != null && cloudConfiguration.getCloudOwner() != null) {
+ return cloudConfiguration.getCloudOwner();
+ }
+ logger.warn("cloud owner value not found in request details, it will be set as default");
+ return environment.getProperty(defaultCloudOwner);
+ }
+
+ private boolean isSuppressRollback(RequestInfo requestInfo) {
+ if (requestInfo != null) {
+ return requestInfo.getSuppressRollback();
+ }
+ return false;
+ }
+
protected <T> List<T> getRelatedResourcesInVfModule(String vnfId, String vfModuleId, Class<T> resultClass,
AAIObjectType type) {
List<T> vnfcs = new ArrayList<>();
@@ -1125,8 +1137,8 @@ public class WorkflowAction {
}
protected Resource extractResourceIdAndTypeFromUri(String uri) {
- Pattern patt = Pattern.compile(
- "[vV]\\d+.*?(?:(?:/(?<type>" + SUPPORTEDTYPES + ")(?:/(?<id>[^/]+))?)(?:/(?<action>[^/]+))?)?$");
+ Pattern patt = Pattern.compile("[vV]\\d+.*?(?:(?:/(?<type>" + SUPPORTEDTYPES
+ + ")(?:/(?<id>[^/]+))?)(?:/(?<action>[^/]+))?(?:/resume)?)?$");
Matcher m = patt.matcher(uri);
Boolean generated = false;
@@ -1396,13 +1408,15 @@ public class WorkflowAction {
protected List<ExecuteBuildingBlock> buildExecuteBuildingBlockList(List<OrchestrationFlow> orchFlows,
List<Resource> resourceCounter, String requestId, String apiVersion, String resourceId,
String requestAction, boolean aLaCarte, String vnfType, WorkflowResourceIds workflowResourceIds,
- RequestDetails requestDetails) {
+ RequestDetails requestDetails, boolean replaceVnf) {
List<ExecuteBuildingBlock> flowsToExecute = new ArrayList<>();
for (OrchestrationFlow orchFlow : orchFlows) {
if (orchFlow.getFlowName().contains(SERVICE)) {
for (int i = 0; i < resourceCounter.stream().filter(x -> WorkflowType.SERVICE == x.getResourceType())
.collect(Collectors.toList()).size(); i++) {
- workflowResourceIds.setServiceInstanceId(resourceId);
+ if (!replaceVnf) {
+ workflowResourceIds.setServiceInstanceId(resourceId);
+ }
flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId,
resourceCounter.stream().filter(x -> WorkflowType.SERVICE == x.getResourceType())
.collect(Collectors.toList()).get(i),
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapper.java
index ebebae3cce..293bcf9f0e 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapper.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapper.java
@@ -52,6 +52,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
@Component
public class VnfAdapterObjectMapper {
private ObjectMapper mapper = new ObjectMapper();
+ private static final String ENABLE_BRIDGE = "mso.bridgeEnabled";
@PostConstruct
public void init() {
@@ -86,6 +87,10 @@ public class VnfAdapterObjectMapper {
createVolumeGroupRequest.setMessageId(messageId);
createVolumeGroupRequest.setNotificationUrl(createCallbackUrl("VNFAResponse", messageId));
+ String enableBridge = getProperty(ENABLE_BRIDGE);
+ if (enableBridge == null || Boolean.valueOf(enableBridge)) {
+ createVolumeGroupRequest.setEnableBridge(true);
+ }
return createVolumeGroupRequest;
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java
index 685531e9a7..9857adbd09 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java
@@ -68,6 +68,7 @@ import org.onap.sdnc.northbound.client.model.GenericResourceApiVnfresourceassign
import org.onap.sdnc.northbound.client.model.GenericResourceApiVnftopologyVnfTopology;
import org.onap.so.adapters.vnfrest.CreateVfModuleRequest;
import org.onap.so.adapters.vnfrest.DeleteVfModuleRequest;
+import org.onap.so.bpmn.core.UrnPropertiesReader;
import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
@@ -95,6 +96,7 @@ import com.google.common.base.Joiner;
public class VnfAdapterVfModuleObjectMapper {
@Autowired
protected VnfAdapterObjectMapperUtils vnfAdapterObjectMapperUtils;
+
private static final Logger logger = LoggerFactory.getLogger(VnfAdapterVfModuleObjectMapper.class);
private static List<String> sdncResponseParamsToSkip =
asList("vnf_id", "vf_module_id", "vnf_name", "vf_module_name");
@@ -114,6 +116,7 @@ public class VnfAdapterVfModuleObjectMapper {
private static final String FLOATING_IP = "_floating_ip";
private static final String FLOATING_V6_IP = "_floating_v6_ip";
private static final String UNDERSCORE = "_";
+ private static final String ENABLE_BRIDGE = "mso.bridgeEnabled";
@PostConstruct
public void init() {
@@ -160,6 +163,11 @@ public class VnfAdapterVfModuleObjectMapper {
createVfModuleRequest
.setNotificationUrl(vnfAdapterObjectMapperUtils.createCallbackUrl("VNFAResponse", messageId));
+ String enableBridge = getProperty(ENABLE_BRIDGE);
+ if (enableBridge == null || Boolean.valueOf(enableBridge)) {
+ createVfModuleRequest.setEnableBridge(true);
+ }
+
return createVfModuleRequest;
}
@@ -916,4 +924,8 @@ public class VnfAdapterVfModuleObjectMapper {
}
return baseVfModule;
}
+
+ protected String getProperty(String key) {
+ return UrnPropertiesReader.getVariable(key);
+ }
}
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/InputParameterRetrieverTaskTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/InputParameterRetrieverTaskTest.java
deleted file mode 100644
index caae90bfff..0000000000
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/InputParameterRetrieverTaskTest.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 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.bpmn.infrastructure.adapter.vnfm.tasks;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.when;
-import java.io.Serializable;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.Test;
-import org.mockito.Mock;
-import org.mockito.Mockito;
-import org.onap.so.bpmn.BaseTaskTest;
-import org.onap.so.bpmn.common.BuildingBlockExecution;
-import org.onap.so.bpmn.common.exceptions.RequiredExecutionVariableExeception;
-import org.onap.so.bpmn.infrastructure.adapter.vnfm.tasks.utils.InputParameter;
-import org.onap.so.bpmn.infrastructure.adapter.vnfm.tasks.utils.InputParametersProvider;
-import org.onap.so.bpmn.infrastructure.adapter.vnfm.tasks.utils.NullInputParameter;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
-import org.onap.so.bpmn.servicedecomposition.entities.GeneralBuildingBlock;
-import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey;
-import org.onap.so.client.exception.BBObjectNotFoundException;
-
-/**
- * @author waqas.ikram@est.tech
- */
-public class InputParameterRetrieverTaskTest extends BaseTaskTest {
-
- private final BuildingBlockExecution stubbedxecution = new StubbedBuildingBlockExecution();
-
- @Mock
- private InputParametersProvider inputParametersProvider;
-
- @Test
- public void testGGetInputParameters_inputParameterStoredInExecutionContext() throws BBObjectNotFoundException {
- final InputParameterRetrieverTask objUnderTest =
- new InputParameterRetrieverTask(inputParametersProvider, extractPojosForBB);
-
- final InputParameter inputParameter = new InputParameter(Collections.emptyMap(), Collections.emptyList());
- when(inputParametersProvider.getInputParameter(Mockito.any(GenericVnf.class))).thenReturn(inputParameter);
- when(extractPojosForBB.extractByKey(any(), eq(ResourceKey.GENERIC_VNF_ID))).thenReturn(new GenericVnf());
- objUnderTest.getInputParameters(stubbedxecution);
-
- final Object actual = stubbedxecution.getVariable(Constants.INPUT_PARAMETER);
- assertNotNull(actual);
- assertTrue(actual instanceof InputParameter);
- }
-
- @Test
- public void testGGetInputParameters_ThrowExecption_NullInputParameterStoredInExecutionContext()
- throws BBObjectNotFoundException {
- final InputParameterRetrieverTask objUnderTest =
- new InputParameterRetrieverTask(inputParametersProvider, extractPojosForBB);
-
- when(inputParametersProvider.getInputParameter(Mockito.any(GenericVnf.class)))
- .thenThrow(RuntimeException.class);
- when(extractPojosForBB.extractByKey(any(), eq(ResourceKey.GENERIC_VNF_ID))).thenReturn(new GenericVnf());
- objUnderTest.getInputParameters(stubbedxecution);
-
- final Object actual = stubbedxecution.getVariable(Constants.INPUT_PARAMETER);
- assertNotNull(actual);
- assertTrue(actual instanceof NullInputParameter);
- }
-
-
- private class StubbedBuildingBlockExecution implements BuildingBlockExecution {
-
- private final Map<String, Serializable> execution = new HashMap<>();
-
- @Override
- public GeneralBuildingBlock getGeneralBuildingBlock() {
- return null;
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public <T> T getVariable(final String key) {
- return (T) execution.get(key);
- }
-
- @Override
- public <T> T getRequiredVariable(final String key) throws RequiredExecutionVariableExeception {
- return null;
- }
-
- @Override
- public void setVariable(final String key, final Serializable value) {
- execution.put(key, value);
- }
-
- @Override
- public Map<ResourceKey, String> getLookupMap() {
- return Collections.emptyMap();
- }
-
- @Override
- public String getFlowToBeCalled() {
- return null;
- }
-
- @Override
- public int getCurrentSequence() {
- return 0;
- }
-
- }
-}
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/TestConstants.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/TestConstants.java
index 7b63e5f811..686b4f80cc 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/TestConstants.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/TestConstants.java
@@ -20,9 +20,11 @@
package org.onap.so.bpmn.infrastructure.adapter.vnfm.tasks;
-import static org.onap.so.bpmn.infrastructure.adapter.vnfm.tasks.TestConstants.DUMMY_URL;
+import static org.onap.so.bpmn.infrastructure.adapter.vnfm.tasks.Constants.ADDITIONAL_PARAMS;
+import static org.onap.so.bpmn.infrastructure.adapter.vnfm.tasks.Constants.EXT_VIRTUAL_LINKS;
+import java.util.HashMap;
+import java.util.Map;
import java.util.UUID;
-import org.onap.so.bpmn.infrastructure.adapter.vnfm.tasks.VnfmBasicHttpConfigProvider;
/**
* @author waqas.ikram@est.tech
@@ -30,6 +32,7 @@ import org.onap.so.bpmn.infrastructure.adapter.vnfm.tasks.VnfmBasicHttpConfigPro
*/
public class TestConstants {
+ public static final String EXT_VIRTUAL_LINK_ID = "ac1ed33d-8dc1-4800-8ce8-309b99c38eec";
public static final String DUMMY_GENERIC_VND_ID = "5956a99d-9736-11e8-8caf-022ac9304eeb";
public static final String DUMMY_BASIC_AUTH = "Basic 123abc";
public static final String DUMMY_URL = "http://localhost:30406/so/vnfm-adapter/v1/";
@@ -38,6 +41,19 @@ public class TestConstants {
public static final String DUMMY_JOB_ID = UUID.randomUUID().toString();
public static final String JOB_STATUS_EXPECTED_URL = DUMMY_URL + "jobs/" + DUMMY_JOB_ID;
+ public static final String EXT_VIRTUAL_LINK_VALUE = "{\"id\":\"" + EXT_VIRTUAL_LINK_ID + "\","
+ + "\"tenant\":{\"cloudOwner\":\"CloudOwner\",\"regionName\":\"RegionOne\","
+ + "\"tenantId\":\"80c26954-2536-4bca-9e20-10f8a2c9c2ad\"},\"resourceId\":\"8ef8cd54-75fd-4372-a6dd-2e05ea8fbd9b\","
+ + "\"extCps\":[{\"cpdId\":\"f449292f-2f0f-4656-baa3-a18d86bac80f\","
+ + "\"cpConfig\":[{\"cpInstanceId\":\"07876709-b66f-465c-99a7-0f4d026197f2\","
+ + "\"linkPortId\":null,\"cpProtocolData\":null}]}],\"extLinkPorts\":null}";
+
+ public static final String ADDITIONAL_PARAMS_VALUE = "{\"image_id\": \"DUMMYVNF\",\"instance_type\": \"m1.small\","
+ + "\"ftp_address\": \"ftp://0.0.0.0:2100/\"}";
+
+ public static final String EXT_VIRTUAL_LINKS_VALUE = "[" + EXT_VIRTUAL_LINK_VALUE + "]";
+
+
public static VnfmBasicHttpConfigProvider getVnfmBasicHttpConfigProvider() {
return getVnfmBasicHttpConfigProvider(DUMMY_URL, DUMMY_BASIC_AUTH);
}
@@ -49,6 +65,14 @@ public class TestConstants {
return vnfmBasicHttpConfigProvider;
}
+ public static Map<String, Object> getUserParamsMap(final String additionalParams,
+ final String extVirtualLinksValue) {
+ final Map<String, Object> userParams = new HashMap<>();
+ userParams.put(ADDITIONAL_PARAMS, additionalParams);
+ userParams.put(EXT_VIRTUAL_LINKS, extVirtualLinksValue);
+ return userParams;
+ }
+
private TestConstants() {}
}
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/InputParameterRetrieverTaskTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/InputParameterRetrieverTaskTest.java
new file mode 100644
index 0000000000..9003510be7
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/InputParameterRetrieverTaskTest.java
@@ -0,0 +1,248 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2019 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.bpmn.infrastructure.adapter.vnfm.tasks.utils;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.when;
+import static org.onap.so.bpmn.infrastructure.adapter.vnfm.tasks.TestConstants.ADDITIONAL_PARAMS_VALUE;
+import static org.onap.so.bpmn.infrastructure.adapter.vnfm.tasks.TestConstants.EXT_VIRTUAL_LINKS_VALUE;
+import static org.onap.so.bpmn.infrastructure.adapter.vnfm.tasks.TestConstants.EXT_VIRTUAL_LINK_ID;
+import static org.onap.so.bpmn.infrastructure.adapter.vnfm.tasks.TestConstants.getUserParamsMap;
+import java.io.Serializable;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.UUID;
+import org.junit.Test;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.onap.so.bpmn.BaseTaskTest;
+import org.onap.so.bpmn.common.BuildingBlockExecution;
+import org.onap.so.bpmn.common.exceptions.RequiredExecutionVariableExeception;
+import org.onap.so.bpmn.infrastructure.adapter.vnfm.tasks.Constants;
+import org.onap.so.bpmn.infrastructure.adapter.vnfm.tasks.InputParameterRetrieverTask;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
+import org.onap.so.bpmn.servicedecomposition.entities.GeneralBuildingBlock;
+import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey;
+import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext;
+import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestParameters;
+import org.onap.so.client.exception.BBObjectNotFoundException;
+import org.onap.so.client.sdnc.SDNCClient;
+import org.onap.vnfmadapter.v1.model.ExternalVirtualLink;
+import org.onap.vnfmadapter.v1.model.ExternalVirtualLinkCpConfig;
+import org.onap.vnfmadapter.v1.model.ExternalVirtualLinkExtCps;
+
+/**
+ * @author waqas.ikram@est.tech
+ */
+public class InputParameterRetrieverTaskTest extends BaseTaskTest {
+
+ private static final String INSTANCE_TYPE_VALUE_1 = "m1.small";
+
+ private static final String INSTANCE_TYPE_VALUE_2 = "m1.large";
+
+ private static final String INSTANCE_TYPE = "instance_type";
+
+ private static final String RANDOM_EXT_VIRTUAL_LINK_ID = UUID.randomUUID().toString();
+
+ private static final String CPU_INSTANCE_ID = EXT_VIRTUAL_LINK_ID;
+
+ private static final String FLAVOR_VALUE = "ubuntu";
+
+ private static final String FLAVOR = "flavor_type";
+
+ private final StubbedBuildingBlockExecution stubbedxecution = new StubbedBuildingBlockExecution();
+
+ @Mock
+ private InputParametersProvider<GenericVnf> sdncInputParametersProvider;
+
+ private final InputParametersProvider<Map<String, Object>> userParamsinputParametersProvider =
+ new UserParamInputParametersProvider();
+
+ @Mock
+ private SDNCClient mockedSdncClient;
+
+ @Test
+ public void testGetInputParameters_inputParameterStoredInExecutionContext() throws BBObjectNotFoundException {
+ final InputParameterRetrieverTask objUnderTest = new InputParameterRetrieverTask(sdncInputParametersProvider,
+ userParamsinputParametersProvider, extractPojosForBB);
+
+
+ final GeneralBuildingBlock buildingBlock =
+ getGeneralBuildingBlock(getUserParamsMap(ADDITIONAL_PARAMS_VALUE, null));
+ stubbedxecution.setGeneralBuildingBlock(buildingBlock);
+
+ final InputParameter inputParameter = new InputParameter(Collections.emptyMap(), Collections.emptyList());
+ when(sdncInputParametersProvider.getInputParameter(Mockito.any(GenericVnf.class))).thenReturn(inputParameter);
+
+ when(extractPojosForBB.extractByKey(any(), eq(ResourceKey.GENERIC_VNF_ID))).thenReturn(new GenericVnf());
+ objUnderTest.getInputParameters(stubbedxecution);
+
+ final Object actual = stubbedxecution.getVariable(Constants.INPUT_PARAMETER);
+ assertNotNull(actual);
+ assertTrue(actual instanceof InputParameter);
+ final InputParameter actualInputParameter = (InputParameter) actual;
+ final Map<String, String> actualAdditionalParams = actualInputParameter.getAdditionalParams();
+ assertEquals(3, actualAdditionalParams.size());
+
+ final String actualInstanceType = actualAdditionalParams.get(INSTANCE_TYPE);
+ assertEquals(INSTANCE_TYPE_VALUE_1, actualInstanceType);
+
+ }
+
+ @Test
+ public void testGetInputParameters_ThrowExecption_NullInputParameterStoredInExecutionContext()
+ throws BBObjectNotFoundException {
+ final InputParameterRetrieverTask objUnderTest = new InputParameterRetrieverTask(sdncInputParametersProvider,
+ userParamsinputParametersProvider, extractPojosForBB);
+
+ when(sdncInputParametersProvider.getInputParameter(Mockito.any(GenericVnf.class)))
+ .thenThrow(RuntimeException.class);
+ when(extractPojosForBB.extractByKey(any(), eq(ResourceKey.GENERIC_VNF_ID))).thenReturn(new GenericVnf());
+ objUnderTest.getInputParameters(stubbedxecution);
+
+ final Object actual = stubbedxecution.getVariable(Constants.INPUT_PARAMETER);
+ assertNotNull(actual);
+ assertTrue(actual instanceof NullInputParameter);
+ }
+
+ @Test
+ public void testGetInputParameters_SdncAndUserParamInputParameterStoredInExecutionContext()
+ throws BBObjectNotFoundException {
+ final InputParameterRetrieverTask objUnderTest = new InputParameterRetrieverTask(sdncInputParametersProvider,
+ userParamsinputParametersProvider, extractPojosForBB);
+
+
+ final GeneralBuildingBlock buildingBlock =
+ getGeneralBuildingBlock(getUserParamsMap(ADDITIONAL_PARAMS_VALUE, EXT_VIRTUAL_LINKS_VALUE));
+ stubbedxecution.setGeneralBuildingBlock(buildingBlock);
+
+ final InputParameter inputParameter = new InputParameter(getAdditionalParams(), getExternalVirtualLink());
+ when(sdncInputParametersProvider.getInputParameter(Mockito.any(GenericVnf.class))).thenReturn(inputParameter);
+
+ when(extractPojosForBB.extractByKey(any(), eq(ResourceKey.GENERIC_VNF_ID))).thenReturn(new GenericVnf());
+ objUnderTest.getInputParameters(stubbedxecution);
+
+ final Object actual = stubbedxecution.getVariable(Constants.INPUT_PARAMETER);
+ assertNotNull(actual);
+ assertTrue(actual instanceof InputParameter);
+ final InputParameter actualInputParameter = (InputParameter) actual;
+ final Map<String, String> actualAdditionalParams = actualInputParameter.getAdditionalParams();
+ assertEquals(4, actualAdditionalParams.size());
+
+ final String actualInstanceType = actualAdditionalParams.get(INSTANCE_TYPE);
+ assertEquals(INSTANCE_TYPE_VALUE_1, actualInstanceType);
+
+ assertEquals(FLAVOR_VALUE, actualAdditionalParams.get(FLAVOR));
+ final List<ExternalVirtualLink> actualExtVirtualLinks = actualInputParameter.getExtVirtualLinks();
+ assertEquals(2, actualExtVirtualLinks.size());
+
+ final Optional<ExternalVirtualLink> externalVirtualLink0 = actualExtVirtualLinks.stream()
+ .filter(extVirtualLink -> EXT_VIRTUAL_LINK_ID.equals(extVirtualLink.getId())).findAny();
+ assertTrue(externalVirtualLink0.isPresent());
+ assertEquals(EXT_VIRTUAL_LINK_ID, externalVirtualLink0.get().getId());
+
+ final Optional<ExternalVirtualLink> externalVirtualLink1 = actualExtVirtualLinks.stream()
+ .filter(extVirtualLink -> RANDOM_EXT_VIRTUAL_LINK_ID.equals(extVirtualLink.getId())).findAny();
+ assertTrue(externalVirtualLink1.isPresent());
+ assertEquals(RANDOM_EXT_VIRTUAL_LINK_ID, externalVirtualLink1.get().getId());
+
+
+ }
+
+ private List<ExternalVirtualLink> getExternalVirtualLink() {
+ return Arrays.asList(
+ new ExternalVirtualLink().id(RANDOM_EXT_VIRTUAL_LINK_ID).addExtCpsItem(new ExternalVirtualLinkExtCps()
+ .addCpConfigItem(new ExternalVirtualLinkCpConfig().cpInstanceId(CPU_INSTANCE_ID))));
+ }
+
+ private Map<String, String> getAdditionalParams() {
+ final Map<String, String> additionalParams = new HashMap<>();
+ additionalParams.put(FLAVOR, FLAVOR_VALUE);
+ additionalParams.put(INSTANCE_TYPE, INSTANCE_TYPE_VALUE_2);
+ return additionalParams;
+ }
+
+
+ private GeneralBuildingBlock getGeneralBuildingBlock(final Map<String, Object> userParams) {
+ final GeneralBuildingBlock buildingBlock = new GeneralBuildingBlock();
+ final RequestContext requestContext = new RequestContext();
+ final RequestParameters requestParameters = new RequestParameters();
+ requestParameters.setUserParams(Arrays.asList(userParams));
+ requestContext.setRequestParameters(requestParameters);
+ buildingBlock.setRequestContext(requestContext);
+ return buildingBlock;
+
+ }
+
+ private class StubbedBuildingBlockExecution implements BuildingBlockExecution {
+
+ private final Map<String, Serializable> execution = new HashMap<>();
+ private GeneralBuildingBlock buildingBlock;
+
+ private void setGeneralBuildingBlock(final GeneralBuildingBlock buildingBlock) {
+ this.buildingBlock = buildingBlock;
+ }
+
+ @Override
+ public GeneralBuildingBlock getGeneralBuildingBlock() {
+ return buildingBlock;
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public <T> T getVariable(final String key) {
+ return (T) execution.get(key);
+ }
+
+ @Override
+ public <T> T getRequiredVariable(final String key) throws RequiredExecutionVariableExeception {
+ return null;
+ }
+
+ @Override
+ public void setVariable(final String key, final Serializable value) {
+ execution.put(key, value);
+ }
+
+ @Override
+ public Map<ResourceKey, String> getLookupMap() {
+ return Collections.emptyMap();
+ }
+
+ @Override
+ public String getFlowToBeCalled() {
+ return null;
+ }
+
+ @Override
+ public int getCurrentSequence() {
+ return 0;
+ }
+
+ }
+}
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/InputParameterTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/InputParameterTest.java
new file mode 100644
index 0000000000..6dee904fde
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/InputParameterTest.java
@@ -0,0 +1,79 @@
+/*-
+ * ============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.bpmn.infrastructure.adapter.vnfm.tasks.utils;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+import org.junit.Test;
+import org.onap.vnfmadapter.v1.model.ExternalVirtualLink;
+
+/**
+ * @author Waqas Ikram (waqas.ikram@ericsson.com)
+ *
+ */
+public class InputParameterTest {
+ @Test
+ public void test_putAdditionalParams_addsEntryToExistingMap() {
+ final InputParameter objUnderTest = new InputParameter();
+ objUnderTest.setAdditionalParams(getMap("name", "value"));
+ objUnderTest.putAdditionalParams(getMap("name1", "value1"));
+
+ final Map<String, String> additionalParams = objUnderTest.getAdditionalParams();
+ assertEquals(2, additionalParams.size());
+ assertTrue(additionalParams.containsKey("name"));
+ assertTrue(additionalParams.containsKey("name1"));
+
+ }
+
+ @Test
+ public void test_addExtVirtualLinks_adddistinctEntriesToExistingList() {
+ final InputParameter objUnderTest = new InputParameter();
+ String firstId = UUID.randomUUID().toString();
+ String secondId = UUID.randomUUID().toString();
+ objUnderTest.setExtVirtualLinks(getExternalVirtualLinkList(firstId));
+ objUnderTest.addExtVirtualLinks(getExternalVirtualLinkList(secondId));
+ objUnderTest.addExtVirtualLinks(getExternalVirtualLinkList(secondId));
+ objUnderTest.addExtVirtualLinks(getExternalVirtualLinkList(secondId));
+
+ final List<ExternalVirtualLink> externalVirtualLinks = objUnderTest.getExtVirtualLinks();
+ assertEquals(2, externalVirtualLinks.size());
+
+ }
+
+ private List<ExternalVirtualLink> getExternalVirtualLinkList(final String id) {
+ final ExternalVirtualLink externalVirtualLink = new ExternalVirtualLink();
+ externalVirtualLink.setId(id);
+ final List<ExternalVirtualLink> list = new ArrayList<>();
+ list.add(externalVirtualLink);
+ return list;
+ }
+
+ private Map<String, String> getMap(final String name, final String value) {
+ final Map<String, String> map = new HashMap<>();
+ map.put(name, value);
+ return map;
+ }
+
+}
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/NullInputParameterTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/NullInputParameterTest.java
new file mode 100644
index 0000000000..e076df7a9b
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/NullInputParameterTest.java
@@ -0,0 +1,62 @@
+/*-
+ * ============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.bpmn.infrastructure.adapter.vnfm.tasks.utils;
+
+import static org.junit.Assert.assertTrue;
+import java.util.Collections;
+import org.junit.Test;
+
+/**
+ * @author Waqas Ikram (waqas.ikram@ericsson.com)
+ *
+ */
+public class NullInputParameterTest {
+
+ @Test(expected = UnsupportedOperationException.class)
+ public void test_addExtVirtualLinks_throwException() {
+ NullInputParameter.NULL_INSTANCE.addExtVirtualLinks(Collections.emptyList());
+ }
+
+ @Test(expected = UnsupportedOperationException.class)
+ public void test_setAdditionalParams_throwException() {
+ NullInputParameter.NULL_INSTANCE.setAdditionalParams(Collections.emptyMap());
+ }
+
+ @Test(expected = UnsupportedOperationException.class)
+ public void test_setExtVirtualLinks_throwException() {
+ NullInputParameter.NULL_INSTANCE.setExtVirtualLinks(Collections.emptyList());
+ }
+
+ @Test(expected = UnsupportedOperationException.class)
+ public void test_putAdditionalParams_throwException() {
+ NullInputParameter.NULL_INSTANCE.putAdditionalParams(Collections.emptyMap());
+ }
+
+ @Test
+ public void test_getAdditionalParams_ReturnEmptyCollection() {
+ assertTrue(NullInputParameter.NULL_INSTANCE.getAdditionalParams().isEmpty());
+ }
+
+ @Test
+ public void test_getExtVirtualLinks_ReturnEmptyCollection() {
+ assertTrue(NullInputParameter.NULL_INSTANCE.getExtVirtualLinks().isEmpty());
+ }
+
+}
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/InputParametersProviderImplTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/SdncInputParametersProviderImplTest.java
index 51e86c1fea..e2e37ac6e4 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/InputParametersProviderImplTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/SdncInputParametersProviderImplTest.java
@@ -48,7 +48,7 @@ import org.onap.vnfmadapter.v1.model.ExternalVirtualLink;
* @author waqas.ikram@est.tech
*/
@RunWith(MockitoJUnitRunner.class)
-public class InputParametersProviderImplTest {
+public class SdncInputParametersProviderImplTest {
private static final String BASE_DIR = "src/test/resources/__files/";
@@ -89,7 +89,7 @@ public class InputParametersProviderImplTest {
@Test
public void testGetInputParameter_ValidResponseFromSdncInvalidData_EmptyInputParameter() throws Exception {
when(mockedSdncClient.get(Mockito.eq(URL))).thenReturn(getReponseAsString(INVALID_PRE_LOAD_SDNC_RESPONSE));
- final InputParametersProvider objUnderTest = new InputParametersProviderImpl(mockedSdncClient);
+ final InputParametersProvider<GenericVnf> objUnderTest = new SdncInputParametersProvider(mockedSdncClient);
final InputParameter actual = objUnderTest.getInputParameter(getGenericVnf());
assertNotNull(actual);
assertTrue(actual.getAdditionalParams().isEmpty());
@@ -99,7 +99,7 @@ public class InputParametersProviderImplTest {
@Test
public void testGetInputParameter_ExceptionThrownFromSdnc_EmptyInputParameter() throws Exception {
when(mockedSdncClient.get(Mockito.eq(URL))).thenThrow(RuntimeException.class);
- final InputParametersProvider objUnderTest = new InputParametersProviderImpl(mockedSdncClient);
+ final InputParametersProvider<GenericVnf> objUnderTest = new SdncInputParametersProvider(mockedSdncClient);
final InputParameter actual = objUnderTest.getInputParameter(getGenericVnf());
assertNotNull(actual);
assertTrue(actual instanceof NullInputParameter);
@@ -110,7 +110,7 @@ public class InputParametersProviderImplTest {
@Test
public void testGetInputParameter_InvalidResponseData_EmptyInputParameter() throws Exception {
when(mockedSdncClient.get(Mockito.eq(URL))).thenReturn(getReponseAsString(INVALID_ADDITIONAL_AND_EXT_VM_DATA));
- final InputParametersProvider objUnderTest = new InputParametersProviderImpl(mockedSdncClient);
+ final InputParametersProvider<GenericVnf> objUnderTest = new SdncInputParametersProvider(mockedSdncClient);
final InputParameter actual = objUnderTest.getInputParameter(getGenericVnf());
assertNotNull(actual);
assertTrue(actual.getAdditionalParams().isEmpty());
@@ -120,7 +120,7 @@ public class InputParametersProviderImplTest {
@Test
public void testGetInputParameter_EmptyResponseData_EmptyInputParameter() throws Exception {
when(mockedSdncClient.get(Mockito.eq(URL))).thenReturn("");
- final InputParametersProvider objUnderTest = new InputParametersProviderImpl(mockedSdncClient);
+ final InputParametersProvider<GenericVnf> objUnderTest = new SdncInputParametersProvider(mockedSdncClient);
final InputParameter actual = objUnderTest.getInputParameter(getGenericVnf());
assertNotNull(actual);
assertTrue(actual instanceof NullInputParameter);
@@ -131,7 +131,7 @@ public class InputParametersProviderImplTest {
@Test
public void testGetInputParameter_InvalidVnfParamsResponseData_EmptyInputParameter() throws Exception {
when(mockedSdncClient.get(Mockito.eq(URL))).thenReturn(getReponseAsString(INVALID_VNF_PARAMS));
- final InputParametersProvider objUnderTest = new InputParametersProviderImpl(mockedSdncClient);
+ final InputParametersProvider<GenericVnf> objUnderTest = new SdncInputParametersProvider(mockedSdncClient);
final InputParameter actual = objUnderTest.getInputParameter(getGenericVnf());
assertNotNull(actual);
assertTrue(actual.getAdditionalParams().isEmpty());
@@ -140,7 +140,7 @@ public class InputParametersProviderImplTest {
private void assertValues(final GenericVnf genericVnf) throws MapperException, BadResponseException, IOException {
when(mockedSdncClient.get(Mockito.eq(URL))).thenReturn(getReponseAsString(PRE_LOAD_SDNC_RESPONSE));
- final InputParametersProvider objUnderTest = new InputParametersProviderImpl(mockedSdncClient);
+ final InputParametersProvider<GenericVnf> objUnderTest = new SdncInputParametersProvider(mockedSdncClient);
final InputParameter actual = objUnderTest.getInputParameter(genericVnf);
assertNotNull(actual);
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/UserParamInputParametersProviderTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/UserParamInputParametersProviderTest.java
new file mode 100644
index 0000000000..e6d4ad056a
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/utils/UserParamInputParametersProviderTest.java
@@ -0,0 +1,98 @@
+/*-
+ * ============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.bpmn.infrastructure.adapter.vnfm.tasks.utils;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.onap.so.bpmn.infrastructure.adapter.vnfm.tasks.TestConstants.ADDITIONAL_PARAMS_VALUE;
+import static org.onap.so.bpmn.infrastructure.adapter.vnfm.tasks.TestConstants.EXT_VIRTUAL_LINKS_VALUE;
+import static org.onap.so.bpmn.infrastructure.adapter.vnfm.tasks.TestConstants.EXT_VIRTUAL_LINK_VALUE;
+import static org.onap.so.bpmn.infrastructure.adapter.vnfm.tasks.TestConstants.getUserParamsMap;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import org.junit.Test;
+import org.onap.vnfmadapter.v1.model.ExternalVirtualLink;
+
+/**
+ * @author Waqas Ikram (waqas.ikram@ericsson.com)
+ *
+ */
+public class UserParamInputParametersProviderTest {
+
+ @Test
+ public void testGetInputParameter_ValidUserParams_NotEmptyInputParameter() throws Exception {
+ final InputParametersProvider<Map<String, Object>> objUnderTest = new UserParamInputParametersProvider();
+
+ final InputParameter actual =
+ objUnderTest.getInputParameter(getUserParamsMap(ADDITIONAL_PARAMS_VALUE, EXT_VIRTUAL_LINKS_VALUE));
+ assertNotNull(actual);
+
+ final Map<String, String> actualAdditionalParams = actual.getAdditionalParams();
+ assertEquals(3, actualAdditionalParams.size());
+
+ final String actualInstanceType = actualAdditionalParams.get("instance_type");
+ assertEquals("m1.small", actualInstanceType);
+
+ final List<ExternalVirtualLink> actualExtVirtualLinks = actual.getExtVirtualLinks();
+ assertEquals(1, actualExtVirtualLinks.size());
+
+ final ExternalVirtualLink actualExternalVirtualLink = actualExtVirtualLinks.get(0);
+ assertEquals("ac1ed33d-8dc1-4800-8ce8-309b99c38eec", actualExternalVirtualLink.getId());
+
+ }
+
+ @Test
+ public void testGetInputParameter_EmptyOrNullUserParams_EmptyInputParameter() throws Exception {
+ final InputParametersProvider<Map<String, Object>> objUnderTest = new UserParamInputParametersProvider();
+
+ InputParameter actual = objUnderTest.getInputParameter(Collections.emptyMap());
+ assertNotNull(actual);
+ assertTrue(actual.getAdditionalParams().isEmpty());
+ assertTrue(actual.getExtVirtualLinks().isEmpty());
+
+ actual = objUnderTest.getInputParameter(null);
+ assertNotNull(actual);
+ assertTrue(actual instanceof NullInputParameter);
+ assertTrue(actual.getAdditionalParams().isEmpty());
+ assertTrue(actual.getExtVirtualLinks().isEmpty());
+
+ }
+
+ @Test
+ public void testGetInputParameter_InValidExtVirtualLinks_NotEmptyInputParameter() throws Exception {
+ final InputParametersProvider<Map<String, Object>> objUnderTest = new UserParamInputParametersProvider();
+
+ final InputParameter actual =
+ objUnderTest.getInputParameter(getUserParamsMap(ADDITIONAL_PARAMS_VALUE, EXT_VIRTUAL_LINK_VALUE));
+ assertNotNull(actual);
+
+ final Map<String, String> actualAdditionalParams = actual.getAdditionalParams();
+ assertEquals(3, actualAdditionalParams.size());
+
+ final String actualInstanceType = actualAdditionalParams.get("instance_type");
+ assertEquals("m1.small", actualInstanceType);
+
+ assertTrue(actual.getExtVirtualLinks().isEmpty());
+
+ }
+
+}
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigAssignVnfTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigAssignVnfTest.java
index bbc20706a6..2d7649438e 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigAssignVnfTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigAssignVnfTest.java
@@ -22,11 +22,16 @@
package org.onap.so.bpmn.infrastructure.flowspecific.tasks;
import static org.assertj.core.api.Assertions.assertThat;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
+import java.io.IOException;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -36,6 +41,7 @@ import org.junit.Before;
import org.junit.Test;
import org.onap.so.bpmn.common.BuildingBlockExecution;
import org.onap.so.bpmn.common.DelegateExecutionImpl;
+import org.onap.so.bpmn.infrastructure.flowspecific.exceptions.VnfNotFoundException;
import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
import org.onap.so.bpmn.servicedecomposition.entities.GeneralBuildingBlock;
@@ -74,33 +80,63 @@ public class ConfigAssignVnfTest {
private static final String INSTANCE_PARAM5_NAME = "paramName5";
private static final String INSTANCE_PARAM5_VALUE = "paramValue5";
-
private ConfigAssignVnf testedObject;
- private BuildingBlockExecution buildingBlockExecution;
private ExtractPojosForBB extractPojosForBB;
+ private ExceptionBuilder exceptionBuilderMock;
@Before
public void setup() {
- buildingBlockExecution = createBuildingBlockExecution();
extractPojosForBB = mock(ExtractPojosForBB.class);
- testedObject = new ConfigAssignVnf(extractPojosForBB, new ExceptionBuilder());
+ exceptionBuilderMock = mock(ExceptionBuilder.class);
+ testedObject = new ConfigAssignVnf(extractPojosForBB, exceptionBuilderMock);
}
@Test
public void prepareAbstractCDSPropertiesBean_success() throws Exception {
// given
+ BuildingBlockExecution buildingBlockExecution = createBuildingBlockExecution(createService(createVnfList()));
+ prepareExtractPojosForBB(buildingBlockExecution);
+ // when
+ testedObject.preProcessAbstractCDSProcessing(buildingBlockExecution);
+ // then
+ verifyConfigAssignPropertiesJsonContent(buildingBlockExecution);
+ }
+
+ @Test
+ public void invalidServiceJsonContentWhenPrepareCDSBean_flowExIsThrown() throws Exception {
+ // given
+ BuildingBlockExecution buildingBlockExecution = createBuildingBlockExecution("{invalidJsonContent}");
+ prepareExtractPojosForBB(buildingBlockExecution);
+ // when
+ testedObject.preProcessAbstractCDSProcessing(buildingBlockExecution);
+ // then
+ verify(exceptionBuilderMock).buildAndThrowWorkflowException(eq(buildingBlockExecution), eq(7000),
+ any(IOException.class));
+ }
+
+ @Test
+ public void vnfIsNotFoundWhenPrepareCDSBean_flowExIsThrown() throws Exception {
+ // given
+ BuildingBlockExecution buildingBlockExecution =
+ createBuildingBlockExecution(createService(Collections.emptyList()));
+ prepareExtractPojosForBB(buildingBlockExecution);
+ // when
+ testedObject.preProcessAbstractCDSProcessing(buildingBlockExecution);
+ // then
+ verify(exceptionBuilderMock).buildAndThrowWorkflowException(eq(buildingBlockExecution), eq(7000),
+ any(VnfNotFoundException.class));
+ }
+
+ private void prepareExtractPojosForBB(BuildingBlockExecution buildingBlockExecution) throws Exception {
when(extractPojosForBB.extractByKey(buildingBlockExecution, ResourceKey.GENERIC_VNF_ID))
.thenReturn(createGenericVnf());
when(extractPojosForBB.extractByKey(buildingBlockExecution, ResourceKey.SERVICE_INSTANCE_ID))
.thenReturn(createServiceInstance());
- // when
- testedObject.preProcessAbstractCDSProcessing(buildingBlockExecution);
- // then
- verifyConfigAssignPropertiesJsonContent();
}
- private void verifyConfigAssignPropertiesJsonContent() throws Exception {
+ private void verifyConfigAssignPropertiesJsonContent(BuildingBlockExecution buildingBlockExecution)
+ throws Exception {
AbstractCDSPropertiesBean abstractCDSPropertiesBean = buildingBlockExecution.getVariable("executionObject");
String payload = abstractCDSPropertiesBean.getRequestObject();
ObjectMapper mapper = new ObjectMapper();
@@ -121,9 +157,9 @@ public class ConfigAssignVnfTest {
assertThat(configAssignPropertiesNode.get(INSTANCE_PARAM3_NAME).asText()).isEqualTo(INSTANCE_PARAM3_VALUE);
}
- private BuildingBlockExecution createBuildingBlockExecution() {
+ private BuildingBlockExecution createBuildingBlockExecution(Object serviceJson) {
DelegateExecution execution = new DelegateExecutionFake();
- execution.setVariable(GENERAL_BLOCK_EXECUTION_MAP_KEY, createGeneralBuildingBlock());
+ execution.setVariable(GENERAL_BLOCK_EXECUTION_MAP_KEY, createGeneralBuildingBlock(serviceJson));
return new DelegateExecutionImpl(execution);
}
@@ -148,28 +184,28 @@ public class ConfigAssignVnfTest {
return genericVnf;
}
- private GeneralBuildingBlock createGeneralBuildingBlock() {
+ private GeneralBuildingBlock createGeneralBuildingBlock(Object serviceJson) {
GeneralBuildingBlock generalBuildingBlock = new GeneralBuildingBlock();
RequestContext requestContext = new RequestContext();
RequestParameters requestParameters = new RequestParameters();
- requestParameters.setUserParams(createRequestUserParams());
+ requestParameters.setUserParams(createRequestUserParams(serviceJson));
requestContext.setRequestParameters(requestParameters);
generalBuildingBlock.setRequestContext(requestContext);
return generalBuildingBlock;
}
- private List<Map<String, Object>> createRequestUserParams() {
+ private List<Map<String, Object>> createRequestUserParams(Object serviceJson) {
List<Map<String, Object>> userParams = new ArrayList<>();
Map<String, Object> userParamMap = new HashMap<>();
- userParamMap.put("service", createService());
+ userParamMap.put("service", serviceJson);
userParams.add(userParamMap);
return userParams;
}
- private Service createService() {
+ private Service createService(List<Vnfs> vnfList) {
Service service = new Service();
Resources resources = new Resources();
- resources.setVnfs(createVnfList());
+ resources.setVnfs(vnfList);
service.setResources(resources);
return service;
}
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java
index be6fc94890..6c959703e4 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java
@@ -927,6 +927,9 @@ public class WorkflowActionTest extends BaseTaskTest {
"CreateVfModuleBB", "CreateVfModuleBB", "ActivateVfModuleBB", "ActivateVfModuleBB",
"AssignFabricConfigurationBB", "ActivateFabricConfigurationBB", "ChangeModelVnfBB", "ActivateVnfBB",
"ChangeModelServiceInstanceBB", "SDNOVnfHealthCheckBB", "AAIUnsetVnfInMaintBB");
+ for (ExecuteBuildingBlock executeBuildingBlock : ebbs) {
+ assertEquals("123", executeBuildingBlock.getWorkflowResourceIds().getServiceInstanceId());
+ }
}
@Ignore
@@ -1477,6 +1480,27 @@ public class WorkflowActionTest extends BaseTaskTest {
}
@Test
+ public void extractResourceIdAndTypeFromUriReplaceResumeTest() {
+ Resource resource = workflowAction.extractResourceIdAndTypeFromUri(
+ "http://localhost:9100/onap/so/infra/serviceInstantiation/v7/serviceInstances/4ff87c63-461b-4d83-8121-d351e6db216c/vnfs/eea9b93b-b5b9-4fad-9c35-12d52e4b683f/vfModules/33cb74cd-9cb3-4090-a3c0-1b8c8e235847/deactivateAndCloudDelete/resume");
+ assertEquals(resource.getResourceId(), "33cb74cd-9cb3-4090-a3c0-1b8c8e235847");
+ }
+
+ @Test
+ public void extractResourceIdAndTypeFromUriDeActiveResumeTest() {
+ Resource resource = workflowAction.extractResourceIdAndTypeFromUri(
+ "http://localhost:9100/onap/so/infra/serviceInstantiation/v7/serviceInstances/4ff87c63-461b-4d83-8121-d351e6db216c/vnfs/eea9b93b-b5b9-4fad-9c35-12d52e4b683f/vfModules/33cb74cd-9cb3-4090-a3c0-1b8c8e235847/replace/resume");
+ assertEquals(resource.getResourceId(), "33cb74cd-9cb3-4090-a3c0-1b8c8e235847");
+ }
+
+ @Test
+ public void extractResourceIdAndTypeFromUriResumeIdOnly() {
+ Resource resource = workflowAction.extractResourceIdAndTypeFromUri(
+ "http://localhost:9100/onap/so/infra/serviceInstantiation/v7/serviceInstances/4ff87c63-461b-4d83-8121-d351e6db216c/vnfs/eea9b93b-b5b9-4fad-9c35-12d52e4b683f/vfModules/33cb74cd-9cb3-4090-a3c0-1b8c8e235847/resume");
+ assertEquals(resource.getResourceId(), "33cb74cd-9cb3-4090-a3c0-1b8c8e235847");
+ }
+
+ @Test
public void isUriResumeTest() {
assertTrue(workflowAction.isUriResume(
"http://localhost:9100/onap/so/infra/orchestrationRequests/v7/requests/2f8ab587-ef6a-4456-b7b2-d73f9363dabd/resume"));
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapperTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapperTest.java
index 2e77023757..a482da5158 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapperTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapperTest.java
@@ -150,7 +150,23 @@ public class VnfAdapterObjectMapperTest {
CreateVolumeGroupRequest actualCreateVolumeGroupRequest =
vnfAdapterObjectMapper.createVolumeGroupRequestMapper(requestContext, cloudRegion, orchestrationContext,
serviceInstance, genericVnf, volumeGroup, sdncVfModuleQueryResponse);
+ assertThat(actualCreateVolumeGroupRequest, sameBeanAs(expectedCreateVolumeGroupRequest));
+
+ doReturn("false").when(vnfAdapterObjectMapper).getProperty("mso.bridgeEnabled");
+ actualCreateVolumeGroupRequest = vnfAdapterObjectMapper.createVolumeGroupRequestMapper(requestContext,
+ cloudRegion, orchestrationContext, serviceInstance, genericVnf, volumeGroup, sdncVfModuleQueryResponse);
+ assertThat(actualCreateVolumeGroupRequest, sameBeanAs(expectedCreateVolumeGroupRequest));
+
+ doReturn(null).when(vnfAdapterObjectMapper).getProperty("mso.bridgeEnabled");
+ expectedCreateVolumeGroupRequest.setEnableBridge(true);
+ actualCreateVolumeGroupRequest = vnfAdapterObjectMapper.createVolumeGroupRequestMapper(requestContext,
+ cloudRegion, orchestrationContext, serviceInstance, genericVnf, volumeGroup, sdncVfModuleQueryResponse);
+ assertThat(actualCreateVolumeGroupRequest, sameBeanAs(expectedCreateVolumeGroupRequest));
+ doReturn("true").when(vnfAdapterObjectMapper).getProperty("mso.bridgeEnabled");
+ expectedCreateVolumeGroupRequest.setEnableBridge(true);
+ actualCreateVolumeGroupRequest = vnfAdapterObjectMapper.createVolumeGroupRequestMapper(requestContext,
+ cloudRegion, orchestrationContext, serviceInstance, genericVnf, volumeGroup, sdncVfModuleQueryResponse);
assertThat(actualCreateVolumeGroupRequest, sameBeanAs(expectedCreateVolumeGroupRequest));
}
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapperPayloadTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapperPayloadTest.java
index 44a08139d6..836f8c1842 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapperPayloadTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapperPayloadTest.java
@@ -23,6 +23,7 @@ package org.onap.so.client.adapter.vnf.mapper;
import static com.shazam.shazamcrest.MatcherAssert.assertThat;
import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.doReturn;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
@@ -32,6 +33,7 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.mockito.Mockito;
import org.onap.sdnc.northbound.client.model.GenericResourceApiVmNetworkData;
import org.onap.so.adapters.vnfrest.CreateVfModuleRequest;
import org.onap.so.adapters.vnfrest.DeleteVfModuleRequest;
@@ -46,6 +48,7 @@ import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoGenericVnf;
import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoServiceInstance;
import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoVfModule;
import org.onap.so.openstack.utils.MsoMulticloudUtils;
+import org.springframework.beans.factory.annotation.Autowired;
import org.onap.so.client.adapter.vnf.mapper.exceptions.MissingValueTagException;
import com.fasterxml.jackson.databind.ObjectMapper;
@@ -56,6 +59,9 @@ public class VnfAdapterVfModuleObjectMapperPayloadTest {
private VnfAdapterVfModuleObjectMapper vfModuleObjectMapper = new VnfAdapterVfModuleObjectMapper();
private ObjectMapper omapper = new ObjectMapper();
+ @Autowired
+ protected VnfAdapterObjectMapperUtils vnfAdapterObjectMapperUtils;
+
@Rule
public ExpectedException expectedException = ExpectedException.none();
@@ -128,16 +134,35 @@ public class VnfAdapterVfModuleObjectMapperPayloadTest {
String sdncVfModuleQueryResponse = new String(Files
.readAllBytes(Paths.get(JSON_FILE_LOCATION + "genericResourceApiVfModuleSdncVfModuleTopology.json")));
+ VnfAdapterVfModuleObjectMapper spyMapper = Mockito.spy(vfModuleObjectMapper);
+
+ doReturn("false").when(spyMapper).getProperty("mso.bridgeEnabled");
CreateVfModuleRequest vfModuleVNFAdapterRequest =
- vfModuleObjectMapper.createVfModuleRequestMapper(requestContext, cloudRegion, orchestrationContext,
+ spyMapper.createVfModuleRequestMapper(requestContext, cloudRegion, orchestrationContext,
serviceInstance, vnf, vfModule, null, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
-
-
String jsonToCompare =
new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "vnfAdapterCreateVfModuleRequest.json")));
-
CreateVfModuleRequest reqMapper1 = omapper.readValue(jsonToCompare, CreateVfModuleRequest.class);
+ assertThat(vfModuleVNFAdapterRequest, sameBeanAs(reqMapper1).ignoring("messageId").ignoring("notificationUrl"));
+
+ doReturn("true").when(spyMapper).getProperty("mso.bridgeEnabled");
+ vfModuleVNFAdapterRequest =
+ spyMapper.createVfModuleRequestMapper(requestContext, cloudRegion, orchestrationContext,
+ serviceInstance, vnf, vfModule, null, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
+ jsonToCompare = new String(Files
+ .readAllBytes(Paths.get(JSON_FILE_LOCATION + "vnfAdapterCreateVfModuleRequestBridgeEnabled.json")));
+ reqMapper1 = omapper.readValue(jsonToCompare, CreateVfModuleRequest.class);
+ assertThat(vfModuleVNFAdapterRequest, sameBeanAs(reqMapper1).ignoring("messageId").ignoring("notificationUrl"));
+
+
+ doReturn(null).when(spyMapper).getProperty("mso.bridgeEnabled");
+ vfModuleVNFAdapterRequest =
+ spyMapper.createVfModuleRequestMapper(requestContext, cloudRegion, orchestrationContext,
+ serviceInstance, vnf, vfModule, null, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
+ jsonToCompare = new String(Files
+ .readAllBytes(Paths.get(JSON_FILE_LOCATION + "vnfAdapterCreateVfModuleRequestBridgeEnabled.json")));
+ reqMapper1 = omapper.readValue(jsonToCompare, CreateVfModuleRequest.class);
assertThat(vfModuleVNFAdapterRequest, sameBeanAs(reqMapper1).ignoring("messageId").ignoring("notificationUrl"));
}
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleAddonRequest.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleAddonRequest.json
index 5975cb21fe..b57c8341f1 100644
--- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleAddonRequest.json
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleAddonRequest.json
@@ -13,6 +13,7 @@
"skipAAI": true,
"backout": false,
"failIfExists": false,
+ "enableBridge": true,
"msoRequest":
{
"requestId": "requestId",
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestBridgeEnabled.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestBridgeEnabled.json
new file mode 100644
index 0000000000..a02b1c901d
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestBridgeEnabled.json
@@ -0,0 +1,71 @@
+{
+ "cloudSiteId": "cloudRegionId",
+ "tenantId": "tenantId",
+ "vnfId": "vnfId",
+ "vnfType": "vnfType",
+ "vfModuleId": "vfModuleId",
+ "vfModuleName": "vfModuleName",
+ "vfModuleType": "vfModuleModelName",
+ "vnfVersion": "serviceModelVersion",
+ "modelCustomizationUuid": "vfModuleModelCustomizationUuid",
+ "skipAAI": true,
+ "backout": false,
+ "failIfExists": false,
+ "enableBridge": true,
+ "msoRequest":
+ {
+ "requestId": "requestId",
+ "serviceInstanceId": "serviceInstanceId"
+ },
+
+ "vfModuleParams":
+ {
+ "vnf_id": "vnfId",
+ "vnf_name": "vnfName",
+ "vf_module_id": "vfModuleId",
+ "vf_module_index": "1",
+ "vf_module_name": "vfModuleName",
+ "environment_context": "environmentContext",
+ "fw_0_subint_ctrl_port_0_ip": "ip0,ip1",
+ "fw_0_subint_ctrl_port_0_ip_0": "ip0",
+ "fw_0_subint_ctrl_port_0_ip_1": "ip1",
+ "fw_0_subint_ctrl_port_0_net_ids": "networkId0",
+ "fw_0_subint_ctrl_port_0_net_names": "1",
+ "fw_subint_ctrl_port_0_subintcount": "1",
+ "fw_0_subint_ctrl_port_0_v6_ip": "ip0,ip1",
+ "fw_0_subint_ctrl_port_0_v6_ip_0": "ip0",
+ "fw_0_subint_ctrl_port_0_v6_ip_1": "ip1",
+ "fw_0_subint_ctrl_port_0_vlan_ids": "1",
+ "fw_subint_ctrl_port_0_floating_ip": "floatingIpV40",
+ "fw_subint_ctrl_port_0_floating_v6_ip": "floatingIpV60",
+ "workload_context": "workloadContext",
+ "key1": "value2",
+ "key3": "value3",
+ "availability_zone_0": "zone0",
+ "availability_zone_1": "zone1",
+ "availability_zone_2": "zone2",
+ "vnfNetworkRole0_net_fqdn": "netFqdnValue0",
+ "vnfNetworkRole0_net_id": "neutronId0",
+ "vnfNetworkRole0_net_name": "netName0",
+ "vnfNetworkRole0_subnet_id": "subnetId0",
+ "vnfNetworkRole0_v6_subnet_id": "subnetId1",
+ "vmType0_name_0": "vmName0",
+ "vmType0_name_1": "vmName1",
+ "vmType0_names": "vmName0,vmName1",
+ "vmType0_vmNetworkRole0_floating_ip": "floatingIpV40",
+ "vmType0_vmNetworkRole0_floating_v6_ip": "floatingIpV60",
+ "vmType0_vmNetworkRole0_route_prefixes": "[{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix0\"},{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix1\"}]",
+ "vmNetworkRole0_ATT_VF_VLAN_FILTER": "heatVlanFilter0,heatVlanFilter1",
+ "vmType0_vmNetworkRole0_ip_0": "ip0",
+ "vmType0_vmNetworkRole0_ip_1": "ip1",
+ "vmType0_vmNetworkRole0_ips": "ip0,ip1",
+ "vmType0_vmNetworkRole0_v6_ip_0": "ip2",
+ "vmType0_vmNetworkRole0_v6_ip_1": "ip3",
+ "vmType0_vmNetworkRole0_v6_ips": "ip2,ip3",
+ "paramOne": "paramOneValue",
+ "paramTwo": "paramTwoValue",
+ "paramThree": "paramThreeValue",
+ "sdnc_directives": "{ \"attributes\": [ {\"attribute_name\": \"key1\", \"attribute_value\": \"value1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_subintcount\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_floating_ip\", \"attribute_value\": \"floatingIpV40\"}, {\"attribute_name\": \"paramOne\", \"attribute_value\": \"paramOneValue\"}, {\"attribute_name\": \"vmType0_name_0\", \"attribute_value\": \"vmName0\"}, {\"attribute_name\": \"vnfNetworkRole0_v6_subnet_id\", \"attribute_value\": \"subnetId1\"}, {\"attribute_name\": \"vmType0_name_1\", \"attribute_value\": \"vmName1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"vnfNetworkRole0_net_name\", \"attribute_value\": \"netName0\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_vlan_ids\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"vnfNetworkRole0_net_id\", \"attribute_value\": \"neutronId0\"}, {\"attribute_name\": \"availability_zone_0\", \"attribute_value\": \"zone0\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ip_1\", \"attribute_value\": \"ip3\"}, {\"attribute_name\": \"availability_zone_1\", \"attribute_value\": \"zone1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_floating_v6_ip\", \"attribute_value\": \"floatingIpV60\"}, {\"attribute_name\": \"availability_zone_2\", \"attribute_value\": \"zone2\"}, {\"attribute_name\": \"vmType0_names\", \"attribute_value\": \"vmName0,vmName1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_route_prefixes\", \"attribute_value\": \"[{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix0\"},{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix1\"}]\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ip_0\", \"attribute_value\": \"ip2\"}, {\"attribute_name\": \"vnfNetworkRole0_subnet_id\", \"attribute_value\": \"subnetId0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"vnfNetworkRole0_net_fqdn\", \"attribute_value\": \"netFqdnValue0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"vmNetworkRole0_ATT_VF_VLAN_FILTER\", \"attribute_value\": \"heatVlanFilter0,heatVlanFilter1\"}, {\"attribute_name\": \"paramTwo\", \"attribute_value\": \"paramTwoValue\"}, {\"attribute_name\": \"paramThree\", \"attribute_value\": \"paramThreeValue\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ips\", \"attribute_value\": \"ip2,ip3\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_floating_v6_ip\", \"attribute_value\": \"floatingIpV60\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ips\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_net_names\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_net_ids\", \"attribute_value\": \"networkId0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_floating_ip\", \"attribute_value\": \"floatingIpV40\"}] }",
+ "user_directives": "{ \"attributes\": [ {\"attribute_name\": \"key1\", \"attribute_value\": \"value2\"}] }"
+ }
+}
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestDhcpDisabled.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestDhcpDisabled.json
index aa4ada059d..ea51d2c6b2 100644
--- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestDhcpDisabled.json
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestDhcpDisabled.json
@@ -11,6 +11,7 @@
"skipAAI": true,
"backout": false,
"failIfExists": false,
+ "enableBridge": true,
"msoRequest":
{
"requestId": "requestId",
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestMultipleDhcp.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestMultipleDhcp.json
index f7fb1e9f44..aa633bf5a8 100644
--- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestMultipleDhcp.json
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestMultipleDhcp.json
@@ -11,6 +11,7 @@
"skipAAI": true,
"backout": false,
"failIfExists": false,
+ "enableBridge": true,
"msoRequest":
{
"requestId": "requestId",
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestNoUserParams.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestNoUserParams.json
index e06f9cbf36..9bddf29433 100644
--- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestNoUserParams.json
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestNoUserParams.json
@@ -11,6 +11,7 @@
"skipAAI": true,
"backout": false,
"failIfExists": false,
+ "enableBridge": true,
"msoRequest":
{
"requestId": "requestId",
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestTrueBackout.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestTrueBackout.json
index b97bab4149..4ccfdbe890 100644
--- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestTrueBackout.json
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestTrueBackout.json
@@ -11,6 +11,7 @@
"skipAAI": true,
"backout": true,
"failIfExists": false,
+ "enableBridge": true,
"msoRequest":
{
"requestId": "requestId",
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestWithCloudResources.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestWithCloudResources.json
index 7b78510f56..da826b8a89 100644
--- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestWithCloudResources.json
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestWithCloudResources.json
@@ -11,6 +11,7 @@
"skipAAI": true,
"backout": false,
"failIfExists": false,
+ "enableBridge": true,
"msoRequest":
{
"requestId": "requestId",
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestWithSingleAvailabilityZone.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestWithSingleAvailabilityZone.json
index 83ba299914..3170b8ba54 100644
--- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestWithSingleAvailabilityZone.json
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestWithSingleAvailabilityZone.json
@@ -11,6 +11,7 @@
"skipAAI": true,
"backout": false,
"failIfExists": false,
+ "enableBridge": true,
"msoRequest":
{
"requestId": "requestId",
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleWithNoEnvironmentAndWorkloadContextRequest.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleWithNoEnvironmentAndWorkloadContextRequest.json
index aaee92b083..be860ace96 100644
--- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleWithNoEnvironmentAndWorkloadContextRequest.json
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleWithNoEnvironmentAndWorkloadContextRequest.json
@@ -11,6 +11,7 @@
"skipAAI": true,
"backout": false,
"failIfExists": false,
+ "enableBridge": true,
"msoRequest":
{
"requestId": "requestId",
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleWithVolumeGroupRequest.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleWithVolumeGroupRequest.json
index a419c2ee59..54f6e403ed 100644
--- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleWithVolumeGroupRequest.json
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleWithVolumeGroupRequest.json
@@ -13,6 +13,7 @@
"skipAAI": true,
"backout": false,
"failIfExists": false,
+ "enableBridge": true,
"msoRequest":
{
"requestId": "requestId",
diff --git a/common/pom.xml b/common/pom.xml
index cd6f01641a..3690d7b5a1 100644
--- a/common/pom.xml
+++ b/common/pom.xml
@@ -245,6 +245,23 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>3.0.2</version>
+ <executions>
+ <execution>
+ <id>tests-jar</id>
+ <phase>package</phase>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ <configuration>
+ <skip>false</skip>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
</project>
diff --git a/common/src/main/java/org/onap/so/logger/ErrorCode.java b/common/src/main/java/org/onap/so/logger/ErrorCode.java
index 7fb9522b7c..a57ed99f2b 100644
--- a/common/src/main/java/org/onap/so/logger/ErrorCode.java
+++ b/common/src/main/java/org/onap/so/logger/ErrorCode.java
@@ -25,7 +25,7 @@ public enum ErrorCode {
AvailabilityError(200),
DataError(300),
SchemaError(400),
- BusinessProcesssError(500),
+ BusinessProcessError(500),
UnknownError(900);
private int value;
diff --git a/common/src/main/java/org/onap/so/logger/ScheduledTasksMDCSetup.java b/common/src/main/java/org/onap/so/logger/ScheduledTasksMDCSetup.java
index 6a20932666..41c4b4bfae 100644
--- a/common/src/main/java/org/onap/so/logger/ScheduledTasksMDCSetup.java
+++ b/common/src/main/java/org/onap/so/logger/ScheduledTasksMDCSetup.java
@@ -50,7 +50,7 @@ public class ScheduledTasksMDCSetup extends MDCSetup {
}
public void errorMDCSetup(ErrorCode errorCode, String errorDescription) {
- MDC.put(ONAPLogConstants.MDCs.ERROR_CODE, errorCode.toString());
+ MDC.put(ONAPLogConstants.MDCs.ERROR_CODE, String.valueOf(errorCode.getValue()));
MDC.put(ONAPLogConstants.MDCs.ERROR_DESC, errorDescription);
}
diff --git a/common/src/main/java/org/onap/so/serviceinstancebeans/RequestError.java b/common/src/main/java/org/onap/so/serviceinstancebeans/RequestError.java
index 121fd4a1a5..33678b336f 100644
--- a/common/src/main/java/org/onap/so/serviceinstancebeans/RequestError.java
+++ b/common/src/main/java/org/onap/so/serviceinstancebeans/RequestError.java
@@ -33,7 +33,12 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import org.apache.commons.lang3.builder.ToStringBuilder;
-import com.fasterxml.jackson.annotation.JsonRootName;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeInfo.As;
+import com.fasterxml.jackson.annotation.JsonTypeInfo.Id;
+import com.fasterxml.jackson.annotation.JsonTypeName;
/**
@@ -63,7 +68,9 @@ import com.fasterxml.jackson.annotation.JsonRootName;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {"policyException", "serviceException"})
@XmlRootElement(name = "requestError")
-@JsonRootName(value = "requestError")
+@JsonTypeName("requestError")
+@JsonTypeInfo(include = As.WRAPPER_OBJECT, use = Id.NAME)
+@JsonInclude(Include.NON_NULL)
public class RequestError {
protected PolicyException policyException;
diff --git a/common/src/main/java/org/onap/so/serviceinstancebeans/ServiceException.java b/common/src/main/java/org/onap/so/serviceinstancebeans/ServiceException.java
index f2976136e9..cbbc7f61c1 100644
--- a/common/src/main/java/org/onap/so/serviceinstancebeans/ServiceException.java
+++ b/common/src/main/java/org/onap/so/serviceinstancebeans/ServiceException.java
@@ -31,6 +31,8 @@ package org.onap.so.serviceinstancebeans;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonRootName;
@@ -55,6 +57,7 @@ import com.fasterxml.jackson.annotation.JsonRootName;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "serviceException")
@JsonRootName(value = "serviceException")
+@JsonInclude(Include.NON_EMPTY)
public class ServiceException extends ExceptionType {
diff --git a/common/src/main/java/org/onap/so/utils/CryptoUtils.java b/common/src/main/java/org/onap/so/utils/CryptoUtils.java
index 640660e97c..ff69e3e4b1 100644
--- a/common/src/main/java/org/onap/so/utils/CryptoUtils.java
+++ b/common/src/main/java/org/onap/so/utils/CryptoUtils.java
@@ -91,7 +91,7 @@ public final class CryptoUtils {
return CryptoUtils.encrypt(message, CLOUD_KEY);
} catch (GeneralSecurityException e) {
logger.error(LoggingAnchor.THREE, MessageEnum.RA_GENERAL_EXCEPTION.toString(),
- ErrorCode.BusinessProcesssError.getValue(), "Exception in encryptPassword ", e);
+ ErrorCode.BusinessProcessError.getValue(), "Exception in encryptPassword ", e);
return null;
}
}
@@ -101,7 +101,7 @@ public final class CryptoUtils {
return CryptoUtils.decrypt(message, CLOUD_KEY);
} catch (GeneralSecurityException e) {
logger.error(LoggingAnchor.THREE, MessageEnum.RA_GENERAL_EXCEPTION.toString(),
- ErrorCode.BusinessProcesssError.getValue(), "Exception in encryptPassword ", e);
+ ErrorCode.BusinessProcessError.getValue(), "Exception in encryptPassword ", e);
return null;
}
}
diff --git a/common/src/test/java/org/onap/so/client/dmaap/rest/DMaaPRestClientTest.java b/common/src/test/java/org/onap/so/client/dmaap/rest/DMaaPRestClientTest.java
index 8006423e75..ca5b5da2da 100644
--- a/common/src/test/java/org/onap/so/client/dmaap/rest/DMaaPRestClientTest.java
+++ b/common/src/test/java/org/onap/so/client/dmaap/rest/DMaaPRestClientTest.java
@@ -85,6 +85,7 @@ public class DMaaPRestClientTest {
throw new RuntimeException(e);
}
+ MDC.put(ONAPLogConstants.MDCs.REQUEST_ID, null);
DMaaPRestClient client = new DMaaPRestClient(url, contentType, auth, key);
Map<String, String> map = new HashMap<>();
client.initializeHeaderMap(map);
diff --git a/common/src/test/java/org/onap/so/client/policy/PolicyClientImplTest.java b/common/src/test/java/org/onap/so/client/policy/PolicyClientImplTest.java
index ad22c65248..3323fd8409 100644
--- a/common/src/test/java/org/onap/so/client/policy/PolicyClientImplTest.java
+++ b/common/src/test/java/org/onap/so/client/policy/PolicyClientImplTest.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Copyright (C) 2019 Nokia.
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -23,32 +25,50 @@ package org.onap.so.client.policy;
import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThat;
+import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.ArgumentMatchers.isA;
import static org.mockito.Mockito.doReturn;
import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+import static org.assertj.core.api.Assertions.assertThat;
import java.io.File;
import java.io.IOException;
+import java.util.Arrays;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import org.junit.BeforeClass;
-import org.junit.Ignore;
import org.junit.Test;
+import org.mockito.ArgumentCaptor;
import org.mockito.Mockito;
+import org.onap.so.client.RestClient;
import org.onap.so.client.defaultproperties.PolicyRestPropertiesImpl;
+import org.onap.so.client.policy.entities.AllowedTreatments;
+import org.onap.so.client.policy.entities.Bbid;
import org.onap.so.client.policy.entities.Config;
import org.onap.so.client.policy.entities.ConfigRequestParameters;
+import org.onap.so.client.policy.entities.DecisionAttributes;
import org.onap.so.client.policy.entities.DictionaryData;
+import org.onap.so.client.policy.entities.DictionaryItemsRequest;
+import org.onap.so.client.policy.entities.DictionaryJson;
import org.onap.so.client.policy.entities.PolicyConfig;
import org.onap.so.client.policy.entities.PolicyDecision;
+import org.onap.so.client.policy.entities.PolicyDecisionRequest;
import org.onap.so.client.policy.entities.PolicyServiceType;
-import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.databind.DeserializationFeature;
-import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
+import org.onap.so.client.policy.entities.Workstep;
public class PolicyClientImplTest {
+ private static final String SERVICE_TYPE = "serviceTest";
+ private static final String VNF_TYPE = "vTypeTest";
+ private static final String BB_ID = "bbTest";
+ private static final String WORK_STEP = "wStepTest";
+ private static final String ERROR_CODE = "errCodeTest";
+
@BeforeClass
public static void setUp() {
System.setProperty("mso.config.path", "src/test/resources");
@@ -67,53 +87,65 @@ public class PolicyClientImplTest {
}
@Test
- @Ignore
- public void getDecisionTest() {
- PolicyClient client = new PolicyClientImpl();
- PolicyDecision decision = client.getDecision("S", "V", "BB1", "1", "123");
- assertEquals("Decision is correct", decision.getDecision(), "PERMIT");
- assertEquals("Decision details is correct", decision.getDetails(), "Retry");
+ public void getDecision_success() {
+ // given
+ PolicyClientImpl testedObject = Mockito.spy(PolicyClientImpl.class);
+ PolicyRestClient policyRestClientMock = Mockito.mock(PolicyRestClient.class);
+ when(testedObject.getPolicyRestClient(PolicyServiceType.GET_DECISION)).thenReturn(policyRestClientMock);
+ // when
+ testedObject.getDecision(SERVICE_TYPE, VNF_TYPE, BB_ID, WORK_STEP, ERROR_CODE);
+ // then
+ ArgumentCaptor<PolicyDecisionRequest> captor1 = ArgumentCaptor.forClass(PolicyDecisionRequest.class);
+ verify(policyRestClientMock).post(captor1.capture(), eq(PolicyDecision.class));
+ verifyPolicyDecisionRequestArg(captor1.getValue());
}
- @Test
- @Ignore
- public void getAllowedTreatmentsTest() {
- PolicyClient client = new PolicyClientImpl();
- DictionaryData dictClient = client.getAllowedTreatments("BB1", "1");
- final String dictBbidString = dictClient.getBbid().getString();
- final String dictWorkStepString = dictClient.getWorkstep().getString();
- assertEquals("DictionaryData matches a response Bbid", dictBbidString, "BB1");
- assertEquals("DicitonaryData matches a response WorkStep", dictWorkStepString, "1");
+ private void verifyPolicyDecisionRequestArg(PolicyDecisionRequest actual) {
+ assertThat(actual.getEcompcomponentName()).isEqualTo(RestClient.ECOMP_COMPONENT_NAME);
+ DecisionAttributes decisionAttributes = actual.getDecisionAttributes();
+ assertThat(decisionAttributes.getServiceType()).isEqualTo(SERVICE_TYPE);
+ assertThat(decisionAttributes.getvNFType()).isEqualTo(VNF_TYPE);
+ assertThat(decisionAttributes.getBbID()).isEqualTo(BB_ID);
+ assertThat(decisionAttributes.getWorkStep()).isEqualTo(WORK_STEP);
+ assertThat(decisionAttributes.getErrorCode()).isEqualTo(ERROR_CODE);
}
@Test
- public void getDecisionMockTest() {
- String serviceType = "S";
- String vnfType = "V";
- String bbID = "BB1";
- String workStep = "1";
- String errorCode = "123";
-
- PolicyDecision expected = new PolicyDecision();
- expected.setDecision("PERMIT");
- expected.setDetails("Retry");
-
- DecisionAttributes decisionAttributes = new DecisionAttributes();
- decisionAttributes.setServiceType(serviceType);
- decisionAttributes.setVNFType(vnfType);
- decisionAttributes.setBBID(bbID);
- decisionAttributes.setWorkStep(workStep);
- decisionAttributes.setErrorCode(errorCode);
- PolicyClient client = Mockito.spy(PolicyClientImpl.class);
-
- doReturn(expected).when(client).getDecision(serviceType, vnfType, bbID, workStep, errorCode);
-
- PolicyDecision actual = client.getDecision(serviceType, vnfType, bbID, workStep, errorCode);
- assertThat(actual, sameBeanAs(expected));
+ public void getAllowedTreatments_success() {
+ // given
+ PolicyClientImpl testedObject = Mockito.spy(PolicyClientImpl.class);
+ PolicyRestClient policyRestClientMock = Mockito.mock(PolicyRestClient.class);
+ when(testedObject.getPolicyRestClient(PolicyServiceType.GET_DICTIONARY_ITEMS)).thenReturn(policyRestClientMock);
+ when(policyRestClientMock.post(any(DictionaryItemsRequest.class), eq(AllowedTreatments.class)))
+ .thenReturn(createAllowedTreatments());
+ // when
+ DictionaryData dictionaryDataResult = testedObject.getAllowedTreatments(BB_ID, WORK_STEP);
+ // then
+ assertThat(dictionaryDataResult.getBbid().getString()).isEqualTo(BB_ID);
+ assertThat(dictionaryDataResult.getWorkstep().getString()).isEqualTo(WORK_STEP);
+ }
+
+ private AllowedTreatments createAllowedTreatments() {
+ AllowedTreatments allowedTreatments = new AllowedTreatments();
+ DictionaryJson dictionaryJson = new DictionaryJson();
+ dictionaryJson.setDictionaryDatas(createDictionaryDataList());
+ allowedTreatments.setDictionaryJson(dictionaryJson);
+ return allowedTreatments;
+ }
+
+ private List<DictionaryData> createDictionaryDataList() {
+ DictionaryData dictionaryData = new DictionaryData();
+ Bbid bbid = new Bbid();
+ bbid.setString(BB_ID);
+ dictionaryData.setBbid(bbid);
+ Workstep workstep = new Workstep();
+ workstep.setString(WORK_STEP);
+ dictionaryData.setWorkstep(workstep);
+ return Arrays.asList(dictionaryData, new DictionaryData());
}
@Test
- public void getConfigFromStringJsonTest() throws JsonParseException, JsonMappingException, IOException {
+ public void getConfigFromStringJsonTest() throws IOException {
PolicyClientImpl client = new PolicyClientImpl();
ObjectMapper mapper = new ObjectMapper();
mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, false);
@@ -128,7 +160,7 @@ public class PolicyClientImplTest {
}
@Test
- public void getConfigWithPolicyNameTest() throws JsonParseException, JsonMappingException, IOException {
+ public void getConfigWithPolicyNameTest() throws IOException {
PolicyClientImpl client = Mockito.spy(PolicyClientImpl.class);
ObjectMapper mapper = new ObjectMapper();
mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, false);
diff --git a/common/src/test/java/org/onap/so/logger/ScheduledTasksMDCSetupTest.java b/common/src/test/java/org/onap/so/logger/ScheduledTasksMDCSetupTest.java
index 8db611b6b1..f232781871 100644
--- a/common/src/test/java/org/onap/so/logger/ScheduledTasksMDCSetupTest.java
+++ b/common/src/test/java/org/onap/so/logger/ScheduledTasksMDCSetupTest.java
@@ -60,7 +60,7 @@ public class ScheduledTasksMDCSetupTest {
public void errorMDCSetupTest() {
tasksMDCSetup.errorMDCSetup(ErrorCode.UnknownError, "Error");
- assertEquals(ErrorCode.UnknownError.toString(), MDC.get(ONAPLogConstants.MDCs.ERROR_CODE));
+ assertEquals("900", MDC.get(ONAPLogConstants.MDCs.ERROR_CODE));
assertEquals("Error", MDC.get(ONAPLogConstants.MDCs.ERROR_DESC));
}
diff --git a/deployment-configs/src/main/resources/logger/logback-spring.xml b/deployment-configs/src/main/resources/logger/logback-spring.xml
index 607d7b1f74..831a33a490 100644
--- a/deployment-configs/src/main/resources/logger/logback-spring.xml
+++ b/deployment-configs/src/main/resources/logger/logback-spring.xml
@@ -27,7 +27,7 @@
<property name="currentTimeStamp" value="%d{&quot;yyyy-MM-dd'T'HH:mm:ss.SSSXXX&quot;,UTC}"/>
<property name="errorPattern"
- value="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestID}|%thread|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%.-5level|%X{ErrorCode}|%X{ErrorDesc}|%msg%n" />
+ value="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestID}|%thread|%X{ServiceName:-Unknown}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%.-5level|%X{ErrorCode:-900}|%X{ErrorDesc:-UnknownError}|%msg%n" />
<property name="debugPattern"
value="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestID}|%logger{50} - %msg%n" />
diff --git a/docs/api/apis/serviceInstances-api.rst b/docs/api/apis/serviceInstances-api.rst
index b3fd2cf47d..a46af713dc 100644
--- a/docs/api/apis/serviceInstances-api.rst
+++ b/docs/api/apis/serviceInstances-api.rst
@@ -36,7 +36,7 @@ Create service instance
+--------------------+--------------------------------------------------------+
|Interface Definition|Description |
+====================+========================================================+
-|URI |/onap/so/infra/serviceInstances/v6 |
+|URI |/onap/so/infra/serviceInstantiation/v7/serviceInstances |
+--------------------+--------------------------------------------------------+
|Operation Type |POST |
+--------------------+--------------------------------------------------------+
@@ -231,7 +231,7 @@ Delete service instance
+--------------------+--------------------------------------------------------------------------------+
|Interface Definition|Description |
+====================+================================================================================+
-|URI |/onap/so/infra/serviceInstances/v6/{serviceInstanceId} |
+|URI |/onap/so/infra/serviceInstantiation/v7/serviceInstances/{serviceInstanceId} |
+--------------------+--------------------------------------------------------------------------------+
|Operation Type |DELETE |
+--------------------+--------------------------------------------------------------------------------+
@@ -287,7 +287,7 @@ Create Volume Group
+--------------------+------------------------------------------------------------------------------------------------------------------+
|Interface Definition|Description |
+====================+==================================================================================================================+
-|URI |/onap/so/infra/serviceInstances/v6/{serviceInstanceId}/vnfs/{vnfInstanceId}/volumeGroups |
+|URI |/onap/so/infra/serviceInstantiation/v7/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}/volumeGroups |
+--------------------+------------------------------------------------------------------------------------------------------------------+
|Operation Type |POST |
+--------------------+------------------------------------------------------------------------------------------------------------------+
@@ -420,7 +420,7 @@ Delete Volume Group
+--------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
|Interface Definition|Description |
+====================+============================================================================================================================================+
-|URI |/onap/so/infra/serviceInstances/v6/{serviceInstanceId}/vnfs/{vnfInstanceId}/volumeGroups/{volume-groupinstance-id} |
+|URI |/onap/so/infra/serviceInstantiation/v7/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}/volumeGroups/{volume-groupinstance-id} |
+--------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
|Operation Type |DELETE |
+--------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
@@ -483,7 +483,7 @@ Create VF Module
+--------------------+---------------------------------------------------------------------------------------------------------------+
|Interface Definition|Description |
+====================+===============================================================================================================+
-|URI |/onap/so/infra/serviceInstances/v6/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules |
+|URI |/onap/so/infra/serviceInstantiation/v7/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules |
+--------------------+---------------------------------------------------------------------------------------------------------------+
|Operation Type |POST |
+--------------------+---------------------------------------------------------------------------------------------------------------+
@@ -580,7 +580,7 @@ Delete VF Module
+--------------------+-------------------------------------------------------------------------------------------------------------------------------------+
|Interface Definition|Description |
+====================+=====================================================================================================================================+
-|URI |/onap/so/infra/serviceInstances/v6/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules/{vfmoduleinstance-id} |
+|URI |/onap/so/infra/serviceInstantiation/v7/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules/{vfmoduleinstance-id} |
+--------------------+-------------------------------------------------------------------------------------------------------------------------------------+
|Operation Type |DELETE |
+--------------------+-------------------------------------------------------------------------------------------------------------------------------------+
@@ -652,7 +652,7 @@ Create VNF
+--------------------+-------------------------------------------------------------------------------------+
|Interface Definition|Description |
+====================+=====================================================================================+
-|URI |/onap/so/infra/serviceInstances/v6/{serviceInstanceId}/vnfs |
+|URI |/onap/so/infra/serviceInstantiation/v7/serviceInstances/{serviceInstanceId}/vnfs |
+--------------------+-------------------------------------------------------------------------------------+
|Operation Type |POST |
+--------------------+-------------------------------------------------------------------------------------+
@@ -801,7 +801,7 @@ Delete VNF
+--------------------+-----------------------------------------------------------------------------------------------------+
|Interface Definition|Description |
+====================+=====================================================================================================+
-|URI |/onap/so/infra/serviceInstances/v6/{serviceInstanceId}/vnfs/{vnfInstanceId} |
+|URI |/onap/so/infra/serviceInstantiation/v7/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId} |
+--------------------+-----------------------------------------------------------------------------------------------------+
|Operation Type |DELETE |
+--------------------+-----------------------------------------------------------------------------------------------------+
@@ -884,7 +884,7 @@ GET Orchestration Request
+--------------------+-------------------------------------------------------------------------------------+
|Interface Definition|Description |
+====================+=====================================================================================+
-|URI |/onap/so/infra/orchestrationRequests/v6/{request-id} |
+|URI |/onap/so/infra/orchestrationRequests/v7/{request-id} |
+--------------------+-------------------------------------------------------------------------------------+
|Operation Type |GET |
+--------------------+-------------------------------------------------------------------------------------+
@@ -1038,7 +1038,7 @@ GET Orchestration Requests
+--------------------+--------------------------------------------------------------+
|Interface Definition|Description |
+====================+==============================================================+
-|URI |/onap/so/infra/orchestrationRequests/v6 |
+|URI |/onap/so/infra/orchestrationRequests/v7 |
+--------------------+--------------------------------------------------------------+
|Operation Type |GET |
+--------------------+--------------------------------------------------------------+
diff --git a/docs/release-notes.rst b/docs/release-notes.rst
index 19239695aa..4ad5f5876f 100644
--- a/docs/release-notes.rst
+++ b/docs/release-notes.rst
@@ -158,7 +158,8 @@ The main goal of the El-Alto release was to improve documentation, UT improvemen
- [`SO-2430 <https://jira.onap.org/browse/SO-2430>`__\ ] - vCPE Create VFmodule Fails on Query to SDNC
- [`SO-2433 <https://jira.onap.org/browse/SO-2433>`__\ ] - Not providing user options during Pause For Manual Task
- [`SO-2434 <https://jira.onap.org/browse/SO-2434>`__\ ] - Displaying Un-needed Mandatory User Inputs for Workflow with Pause
-
+- [`SO-1754 <https://jira.onap.org/browse/SO-1754>`__\ ] - SO-Mariadb: 'VNF_RESOURCE_CUSTOMIZATION' DB update bug when service is distributed.
+- [`SO-2447 <https://jira.onap.org/browse/SO-2447>`__\ ] - Openstack Adatper fails to find Stack Name and creates duplicate stack with address conflict
OJSI Issues
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/ResponseHandler.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/ResponseHandler.java
index 095182fe98..bedce185c5 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/ResponseHandler.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/ResponseHandler.java
@@ -98,8 +98,9 @@ public class ResponseHandler {
if (response != null) {
responseBody = response.getResponse();
} else {
- ErrorLoggerInfo errorLoggerInfo = new ErrorLoggerInfo.Builder(MessageEnum.APIH_ERROR_FROM_BPEL_SERVER,
- ErrorCode.BusinessProcesssError).targetEntity("Camunda").targetServiceName("parseCamunda").build();
+ ErrorLoggerInfo errorLoggerInfo =
+ new ErrorLoggerInfo.Builder(MessageEnum.APIH_ERROR_FROM_BPEL_SERVER, ErrorCode.BusinessProcessError)
+ .targetEntity("Camunda").targetServiceName("parseCamunda").build();
BPMNFailureException bpmnFailureException =
new BPMNFailureException.Builder(String.valueOf(status), status, ErrorNumbers.ERROR_FROM_BPEL)
.errorInfo(errorLoggerInfo).build();
@@ -123,8 +124,9 @@ public class ResponseHandler {
ErrorNumbers.SVC_BAD_PARAMETER).cause(e).errorInfo(errorLoggerInfo).build();
}
if (status != HttpStatus.SC_ACCEPTED) {
- ErrorLoggerInfo errorLoggerInfo = new ErrorLoggerInfo.Builder(MessageEnum.APIH_ERROR_FROM_BPEL_SERVER,
- ErrorCode.BusinessProcesssError).targetEntity("BPEL").targetServiceName("parseBpel").build();
+ ErrorLoggerInfo errorLoggerInfo =
+ new ErrorLoggerInfo.Builder(MessageEnum.APIH_ERROR_FROM_BPEL_SERVER, ErrorCode.BusinessProcessError)
+ .targetEntity("BPEL").targetServiceName("parseBpel").build();
throw new BPMNFailureException.Builder(String.valueOf(status), status, ErrorNumbers.ERROR_FROM_BPEL)
.errorInfo(errorLoggerInfo).build();
@@ -149,9 +151,9 @@ public class ResponseHandler {
.build();
}
if (status != HttpStatus.SC_NO_CONTENT && status != HttpStatus.SC_ACCEPTED) {
- ErrorLoggerInfo errorLoggerInfo = new ErrorLoggerInfo.Builder(MessageEnum.APIH_ERROR_FROM_BPEL_SERVER,
- ErrorCode.BusinessProcesssError).targetEntity("CAMUNDATASK").targetServiceName("parseCamundaTask")
- .build();
+ ErrorLoggerInfo errorLoggerInfo =
+ new ErrorLoggerInfo.Builder(MessageEnum.APIH_ERROR_FROM_BPEL_SERVER, ErrorCode.BusinessProcessError)
+ .targetEntity("CAMUNDATASK").targetServiceName("parseCamundaTask").build();
throw new BPMNFailureException.Builder(String.valueOf(status), status, ErrorNumbers.ERROR_FROM_BPEL)
.errorInfo(errorLoggerInfo).build();
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/filters/RequestIdFilter.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/filters/RequestIdFilter.java
index 2fd426dec2..b81ee58aa4 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/filters/RequestIdFilter.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/filters/RequestIdFilter.java
@@ -23,6 +23,7 @@ import java.io.IOException;
import javax.annotation.Priority;
import javax.ws.rs.container.ContainerRequestContext;
import javax.ws.rs.container.ContainerRequestFilter;
+import javax.ws.rs.core.UriInfo;
import javax.ws.rs.ext.Provider;
import org.onap.logging.ref.slf4j.ONAPLogConstants;
import org.onap.so.apihandler.common.ErrorNumbers;
@@ -52,15 +53,20 @@ public class RequestIdFilter implements ContainerRequestFilter {
@Override
public void filter(ContainerRequestContext context) throws IOException {
String requestId = MDC.get(ONAPLogConstants.MDCs.REQUEST_ID);
+ UriInfo uriInfo = context.getUriInfo();
+ String requestURI = uriInfo.getPath();
- logger.info("Checking if requestId: {} already exists in requestDb InfraActiveRequests table", requestId);
- InfraActiveRequests infraActiveRequests = infraActiveRequestsClient.getInfraActiveRequestbyRequestId(requestId);
+ if (!requestURI.contains("orchestrationRequests")) {
+ logger.info("Checking if requestId: {} already exists in requestDb InfraActiveRequests table", requestId);
+ InfraActiveRequests infraActiveRequests =
+ infraActiveRequestsClient.getInfraActiveRequestbyRequestId(requestId);
- if (infraActiveRequests != null) {
- logger.error(
- "RequestId: {} already exists in RequestDB InfraActiveRequests table, throwing DuplicateRequestIdException",
- requestId);
- throw new DuplicateRequestIdException(createRequestError(requestId, "InfraActiveRequests"));
+ if (infraActiveRequests != null) {
+ logger.error(
+ "RequestId: {} already exists in RequestDB InfraActiveRequests table, throwing DuplicateRequestIdException",
+ requestId);
+ throw new DuplicateRequestIdException(createRequestError(requestId, "InfraActiveRequests"));
+ }
}
}
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/Action.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/Action.java
index 6957e1fe73..0653513184 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/Action.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/Action.java
@@ -29,6 +29,7 @@ public enum Action implements Actions {
deleteInstance,
configureInstance,
replaceInstance,
+ replaceInstanceRetainAssignments,
activateInstance,
deactivateInstance,
enablePort,
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/exceptions/ApiExceptionMapper.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/exceptions/ApiExceptionMapper.java
index 6a56b58f04..62f39d9148 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/exceptions/ApiExceptionMapper.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/exceptions/ApiExceptionMapper.java
@@ -71,72 +71,33 @@ public class ApiExceptionMapper implements ExceptionMapper<ApiException> {
@Override
public Response toResponse(ApiException exception) {
logger.error("Error During API Call", exception);
- return Response.status(exception.getHttpResponseCode()).entity(buildErrorString(exception)).build();
+ return Response.status(exception.getHttpResponseCode()).entity(buildError(exception)).build();
}
- protected String buildErrorString(ApiException exception) {
+ protected RequestError buildError(ApiException exception) {
String errorText = exception.getMessage();
String messageId = exception.getMessageID();
List<String> variables = exception.getVariables();
- ErrorLoggerInfo errorLoggerInfo = exception.getErrorLoggerInfo();
-
-
if (errorText.length() > 1999) {
errorText = errorText.substring(0, 1999);
}
-
-
-
- List<MediaType> typeList = Optional.ofNullable(headers.getAcceptableMediaTypes()).orElse(new ArrayList<>());
- List<String> typeListString = typeList.stream().map(item -> item.toString()).collect(Collectors.toList());
- MediaType type;
- if (typeListString.stream().anyMatch(item -> item.contains(MediaType.APPLICATION_XML))) {
- type = MediaType.APPLICATION_XML_TYPE;
- } else if (typeListString.stream().anyMatch(item -> typeListString.contains(MediaType.APPLICATION_JSON))) {
- type = MediaType.APPLICATION_JSON_TYPE;
- } else {
- type = MediaType.APPLICATION_JSON_TYPE;
- }
-
- return buildServiceErrorResponse(errorText, messageId, variables, type);
+ return buildServiceErrorResponse(errorText, messageId, variables);
}
- protected String buildServiceErrorResponse(String errorText, String messageId, List<String> variables,
- MediaType type) {
- RequestError re = new RequestError();
- ServiceException se = new ServiceException();
- se.setMessageId(messageId);
- se.setText(errorText);
+ protected RequestError buildServiceErrorResponse(String errorText, String messageId, List<String> variables) {
+ RequestError requestError = new RequestError();
+ ServiceException serviceException = new ServiceException();
+ serviceException.setMessageId(messageId);
+ serviceException.setText(errorText);
if (variables != null) {
for (String variable : variables) {
- se.getVariables().add(variable);
+ serviceException.getVariables().add(variable);
}
}
- re.setServiceException(se);
- String requestErrorStr;
-
- ObjectMapper mapper = createObjectMapper();
-
- mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true);
- mapper.setSerializationInclusion(JsonInclude.Include.NON_DEFAULT);
- try {
- if (MediaType.APPLICATION_JSON_TYPE.equals(type)) {
- requestErrorStr = mapper.writeValueAsString(re);
- } else {
- StringWriter sw = new StringWriter();
- this.getMarshaller().marshal(re, sw);
- requestErrorStr = sw.toString();
- }
- } catch (JsonProcessingException | JAXBException e) {
- String errorMsg =
- "Exception in buildServiceErrorResponse writing exceptionType to string " + e.getMessage();
- logger.error("BuildServiceErrorResponse", e);
- return errorMsg;
- }
-
- return requestErrorStr;
+ requestError.setServiceException(serviceException);
+ return requestError;
}
protected void writeErrorLog(Exception e, String errorText, ErrorLoggerInfo errorLogInfo) {
diff --git a/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandler/filters/RequestIdFilterTest.java b/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandler/filters/RequestIdFilterTest.java
index 8716047603..1aa6c3c5d9 100644
--- a/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandler/filters/RequestIdFilterTest.java
+++ b/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandler/filters/RequestIdFilterTest.java
@@ -23,9 +23,13 @@ package org.onap.so.apihandler.filters;
import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
import static org.junit.Assert.assertThat;
import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.verify;
import java.io.IOException;
+import java.net.URI;
import java.util.Collections;
import javax.ws.rs.container.ContainerRequestContext;
+import javax.ws.rs.core.UriInfo;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
@@ -53,6 +57,9 @@ public class RequestIdFilterTest {
@Mock
private RequestsDbClient requestsDbClient;
+ @Mock
+ private UriInfo uriInfo;
+
@InjectMocks
@Spy
private RequestIdFilter requestIdFilter;
@@ -70,7 +77,6 @@ public class RequestIdFilterTest {
serviceException.setMessageId("SVC0002");
serviceException.setText(
"RequestId: 32807a28-1a14-4b88-b7b3-2950918aa769 already exists in the RequestDB InfraActiveRequests table");
- serviceException.setVariables(Collections.emptyList());
requestError.setServiceException(serviceException);
return requestError;
}
@@ -87,12 +93,35 @@ public class RequestIdFilterTest {
doReturn(infraActiveRequests).when(requestsDbClient).getInfraActiveRequestbyRequestId(requestId);
doReturn(error).when(requestIdFilter).createRequestError(REQUEST_ID, "InfraActiveRequests");
+ doReturn("/onap/so/infra/serviceInstantiation/v7/serviceInstances").when(uriInfo).getPath();
+ doReturn(uriInfo).when(mockContext).getUriInfo();
thrown.expect(DuplicateRequestIdException.class);
thrown.expectMessage("HTTP 400 Bad Request");
+
+
requestIdFilter.filter(mockContext);
}
+
+ @Test
+ public void filterTestInfraSkipRequestIdLookup() throws IOException {
+ String requestId = REQUEST_ID;
+ MDC.put(ONAPLogConstants.MDCs.REQUEST_ID, requestId);
+
+ // ExpectedRecord InfraActiveRequests
+ InfraActiveRequests infraActiveRequests = new InfraActiveRequests();
+ infraActiveRequests.setRequestId(REQUEST_ID);
+
+ doReturn("onap/so/infra/orchestrationRequests/v7/" + REQUEST_ID).when(uriInfo).getPath();
+ doReturn(uriInfo).when(mockContext).getUriInfo();
+
+ verify(requestsDbClient, never()).getInfraActiveRequestbyRequestId(REQUEST_ID);
+
+ requestIdFilter.filter(mockContext);
+ }
+
+
@Test
public void createRequestErrorTest() throws IOException {
RequestError requestError = getRequestError();
diff --git a/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandlerinfra/exceptions/ApiExceptionMapperTest.java b/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandlerinfra/exceptions/ApiExceptionMapperTest.java
index 2922aaa896..1a846da65a 100644
--- a/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandlerinfra/exceptions/ApiExceptionMapperTest.java
+++ b/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandlerinfra/exceptions/ApiExceptionMapperTest.java
@@ -73,26 +73,6 @@ public class ApiExceptionMapperTest {
@InjectMocks
ApiExceptionMapper mapper = new ApiExceptionMapper();
-
- @Before
- public void setUp() {
- when(headers.getAcceptableMediaTypes()).thenReturn(Arrays.asList(MediaType.APPLICATION_JSON_TYPE));
- }
-
- @Test
- public void testObjectMapperError() throws JsonProcessingException {
- ObjectMapper mockedMapper = Mockito.mock(ObjectMapper.class);
- Mockito.when(mockedMapper.writeValueAsString(anyObject())).thenThrow(JsonProcessingException.class);
- ValidateException validateException = new ValidateException.Builder("Test", 0, null).build();
- ApiExceptionMapper mockedException = Mockito.spy(mapper);
- Mockito.doReturn(mockedMapper).when(mockedException).createObjectMapper();
- Response resp = mockedException.toResponse((ApiException) validateException);
-
- /// assertEquals(resp.getStatus(), HttpStatus.SC_BAD_REQUEST);
- assertThat(resp.getEntity().toString(),
- startsWith("Exception in buildServiceErrorResponse writing exceptionType to string"));
- }
-
@Test
public void testValidateResponse() {
ValidateException validateException =
@@ -138,38 +118,4 @@ public class ApiExceptionMapperTest {
assertEquals(resp.getStatus(), HttpStatus.SC_BAD_GATEWAY);
}
-
- @Test
- public void verifyXMLPath() throws JAXBException {
- when(headers.getAcceptableMediaTypes()).thenReturn(Arrays.asList(MediaType.APPLICATION_XML_TYPE));
- BPMNFailureException bpmnException = new BPMNFailureException.Builder("Test Message", HttpStatus.SC_NOT_FOUND,
- ErrorNumbers.SVC_BAD_PARAMETER).build();
- ApiExceptionMapper mapperSpy = Mockito.spy(mapper);
- doReturn(marshaller).when(mapperSpy).getMarshaller();
- Response resp = mapperSpy.toResponse((ApiException) bpmnException);
- verify(marshaller, times(1)).marshal(any(Object.class), any(Writer.class));
- }
-
- @Test
- public void verifyMediaType() {
- ApiExceptionMapper mapperSpy = Mockito.spy(mapper);
- BPMNFailureException bpmnException = new BPMNFailureException.Builder("Test Message", HttpStatus.SC_NOT_FOUND,
- ErrorNumbers.SVC_BAD_PARAMETER).build();
- when(headers.getAcceptableMediaTypes())
- .thenReturn(Arrays.asList(MediaType.APPLICATION_XML_TYPE.withCharset("UTF-8")));
- mapperSpy.toResponse(bpmnException);
- verify(mapperSpy, times(1)).buildServiceErrorResponse(any(String.class), any(String.class),
- ArgumentMatchers.isNull(), eq(MediaType.APPLICATION_XML_TYPE));
- when(headers.getAcceptableMediaTypes())
- .thenReturn(Arrays.asList(MediaType.APPLICATION_JSON_TYPE.withCharset("UTF-8")));
- mapperSpy = Mockito.spy(mapper);
- mapperSpy.toResponse(bpmnException);
- verify(mapperSpy, times(1)).buildServiceErrorResponse(any(String.class), any(String.class),
- ArgumentMatchers.isNull(), eq(MediaType.APPLICATION_JSON_TYPE));
- when(headers.getAcceptableMediaTypes()).thenReturn(null);
- mapperSpy = Mockito.spy(mapper);
- mapperSpy.toResponse(bpmnException);
- verify(mapperSpy, times(1)).buildServiceErrorResponse(any(String.class), any(String.class),
- ArgumentMatchers.isNull(), eq(MediaType.APPLICATION_JSON_TYPE));
- }
}
diff --git a/mso-api-handlers/mso-api-handler-infra/pom.xml b/mso-api-handlers/mso-api-handler-infra/pom.xml
index bb726e68aa..82b86f89cc 100644
--- a/mso-api-handlers/mso-api-handler-infra/pom.xml
+++ b/mso-api-handlers/mso-api-handler-infra/pom.xml
@@ -277,6 +277,9 @@
<executions>
<execution>
<id>original</id>
+ <configuration>
+ <skip>false</skip>
+ </configuration>
</execution>
</executions>
</plugin>
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/CamundaRequestHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/CamundaRequestHandler.java
index e56eb422d8..fb7ab3a61e 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/CamundaRequestHandler.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/CamundaRequestHandler.java
@@ -7,11 +7,10 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.xml.bind.DatatypeConverter;
-import org.apache.http.HttpStatus;
import org.camunda.bpm.engine.impl.persistence.entity.HistoricActivityInstanceEntity;
import org.camunda.bpm.engine.impl.persistence.entity.HistoricProcessInstanceEntity;
-import org.onap.so.apihandler.common.ErrorNumbers;
-import org.onap.so.apihandlerinfra.exceptions.ContactCamundaException;
+import org.onap.logging.filter.spring.SpringClientPayloadFilter;
+import org.onap.so.logging.jaxrs.filter.SOSpringClientFilter;
import org.onap.so.utils.CryptoUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -22,6 +21,8 @@ import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
+import org.springframework.http.client.BufferingClientHttpRequestFactory;
+import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
import org.springframework.retry.policy.SimpleRetryPolicy;
import org.springframework.retry.support.RetryTemplate;
import org.springframework.stereotype.Component;
@@ -33,15 +34,16 @@ import org.springframework.web.client.RestTemplate;
public class CamundaRequestHandler {
private static Logger logger = LoggerFactory.getLogger(CamundaRequestHandler.class);
-
- @Autowired
- private RestTemplate restTemplate;
+ private static final String TIMEOUT = "30000";
+ private static final String RETRY_TIMEOUT = "15000";
+ private static final String TIMEOUT_PROPERTY = "mso.camunda.request.timeout";
+ private static final String RETRY_TIMEOUT_PROPERTY = "mso.camunda.request.timeout.retry";
@Autowired
private Environment env;
- public ResponseEntity<List<HistoricProcessInstanceEntity>> getCamundaProcessInstanceHistory(String requestId) {
- RetryTemplate retryTemplate = setRetryTemplate();
+ public ResponseEntity<List<HistoricProcessInstanceEntity>> getCamundaProcessInstanceHistory(String requestId,
+ boolean retry) {
String path = env.getProperty("mso.camunda.rest.history.uri") + requestId;
String targetUrl = env.getProperty("mso.camundaURL") + path;
HttpHeaders headers =
@@ -49,86 +51,90 @@ public class CamundaRequestHandler {
HttpEntity<?> requestEntity = new HttpEntity<>(headers);
- return retryTemplate.execute(context -> {
- if (context.getLastThrowable() != null) {
- logger.error("Retrying: Last call resulted in exception: ", context.getLastThrowable());
- }
- if (context.getRetryCount() == 0) {
- logger.info("Querying Camunda for process-instance history for requestId: {}", requestId);
- } else {
- logger.info("Retry: {} of 3. Querying Camunda for process-instance history for requestId: {}",
- context.getRetryCount(), requestId);
- }
- return restTemplate.exchange(targetUrl, HttpMethod.GET, requestEntity,
- new ParameterizedTypeReference<List<HistoricProcessInstanceEntity>>() {});
- });
- }
-
- protected ResponseEntity<List<HistoricActivityInstanceEntity>> getCamundaActivityHistory(String processInstanceId,
- String requestId) throws ContactCamundaException {
- RetryTemplate retryTemplate = setRetryTemplate();
- String path = env.getProperty("mso.camunda.rest.activity.uri") + processInstanceId;
- String targetUrl = env.getProperty("mso.camundaURL") + path;
- HttpHeaders headers =
- setCamundaHeaders(env.getRequiredProperty("mso.camundaAuth"), env.getRequiredProperty("mso.msoKey"));
- HttpEntity<?> requestEntity = new HttpEntity<>(headers);
- try {
+ if (retry) {
+ RestTemplate restTemplate = getRestTemplate(retry);
+ RetryTemplate retryTemplate = getRetryTemplate();
return retryTemplate.execute(context -> {
if (context.getLastThrowable() != null) {
logger.error("Retrying: Last call resulted in exception: ", context.getLastThrowable());
}
if (context.getRetryCount() == 0) {
- logger.info(
- "Querying Camunda for activity-instance history for processInstanceId: {}, for requestId: {}",
- processInstanceId, requestId);
+ logger.info("Querying Camunda for process-instance history for requestId: {}", requestId);
} else {
- logger.info(
- "Retry: {} of 3. Querying Camunda for activity-instance history for processInstanceId: {}, for requestId: {}",
- context.getRetryCount(), processInstanceId, requestId);
+ logger.info("Retry: Querying Camunda for process-instance history for requestId: {}",
+ context.getRetryCount(), requestId);
}
-
return restTemplate.exchange(targetUrl, HttpMethod.GET, requestEntity,
- new ParameterizedTypeReference<List<HistoricActivityInstanceEntity>>() {});
+ new ParameterizedTypeReference<List<HistoricProcessInstanceEntity>>() {});
});
-
- } catch (RestClientException e) {
- logger.error(
- "Error querying Camunda for activity-instance history for processInstanceId: {}, for requestId: {}, exception: {}",
- processInstanceId, requestId, e.getMessage());
- throw new ContactCamundaException.Builder("activity-instance", requestId, e.toString(),
- HttpStatus.SC_INTERNAL_SERVER_ERROR, ErrorNumbers.SVC_DETAILED_SERVICE_ERROR).cause(e).build();
+ } else {
+ RestTemplate restTemplate = getRestTemplate(retry);
+ return restTemplate.exchange(targetUrl, HttpMethod.GET, requestEntity,
+ new ParameterizedTypeReference<List<HistoricProcessInstanceEntity>>() {});
}
}
- protected String getTaskName(String requestId) throws ContactCamundaException {
+ protected ResponseEntity<List<HistoricActivityInstanceEntity>> getCamundaActivityHistory(String processInstanceId) {
+ RestTemplate restTemplate = getRestTemplate(false);
+ String path = env.getProperty("mso.camunda.rest.activity.uri") + processInstanceId;
+ String targetUrl = env.getProperty("mso.camundaURL") + path;
+ HttpHeaders headers =
+ setCamundaHeaders(env.getRequiredProperty("mso.camundaAuth"), env.getRequiredProperty("mso.msoKey"));
+ HttpEntity<?> requestEntity = new HttpEntity<>(headers);
+
+ return restTemplate.exchange(targetUrl, HttpMethod.GET, requestEntity,
+ new ParameterizedTypeReference<List<HistoricActivityInstanceEntity>>() {});
+ }
+
+ protected String getTaskName(String requestId) {
ResponseEntity<List<HistoricProcessInstanceEntity>> response = null;
- ResponseEntity<List<HistoricActivityInstanceEntity>> activityResponse = null;
- String processInstanceId = null;
+
+ String taskInformation = null;
try {
- response = getCamundaProcessInstanceHistory(requestId);
+ response = getCamundaProcessInstanceHistory(requestId, false);
} catch (RestClientException e) {
- logger.error("Error querying Camunda for process-instance history for requestId: {}, exception: {}",
+ logger.warn("Error querying Camunda for process-instance history for requestId: {}, exception: {}",
requestId, e.getMessage());
- throw new ContactCamundaException.Builder("process-instance", requestId, e.toString(),
- HttpStatus.SC_INTERNAL_SERVER_ERROR, ErrorNumbers.SVC_DETAILED_SERVICE_ERROR).cause(e).build();
}
+ if (response != null) {
+ taskInformation = getTaskInformation(response, requestId);
+ }
+ return taskInformation;
+ }
+
+ protected String getTaskInformation(ResponseEntity<List<HistoricProcessInstanceEntity>> response,
+ String requestId) {
List<HistoricProcessInstanceEntity> historicProcessInstanceList = response.getBody();
+ ResponseEntity<List<HistoricActivityInstanceEntity>> activityResponse = null;
+ String processInstanceId = null;
+ String taskInformation = null;
if (historicProcessInstanceList != null && !historicProcessInstanceList.isEmpty()) {
Collections.reverse(historicProcessInstanceList);
processInstanceId = historicProcessInstanceList.get(0).getId();
} else {
- return "No processInstances returned for requestId: " + requestId;
+ logger.warn("No processInstances returned for requestId: {} to get TaskInformation", requestId);
}
if (processInstanceId != null) {
- activityResponse = getCamundaActivityHistory(processInstanceId, requestId);
+ try {
+ activityResponse = getCamundaActivityHistory(processInstanceId);
+ } catch (RestClientException e) {
+ logger.warn(
+ "Error querying Camunda for activity-instance history for processInstanceId: {}, for requestId: {}, exception: {}",
+ processInstanceId, requestId, e.getMessage());
+ }
} else {
- return "No processInstanceId returned for requestId: " + requestId;
+ logger.warn("No processInstanceId returned for requestId: {} to get TaskInformation", requestId);
}
- return getActivityName(activityResponse.getBody());
+ if (activityResponse != null) {
+ taskInformation = getActivityName(activityResponse.getBody());
+ } else {
+ logger.warn("No activity history information returned for requestId: {} to get TaskInformation", requestId);
+ }
+ return taskInformation;
}
protected String getActivityName(List<HistoricActivityInstanceEntity> activityInstanceList) {
@@ -169,12 +175,31 @@ public class CamundaRequestHandler {
return headers;
}
- protected RetryTemplate setRetryTemplate() {
+ protected RetryTemplate getRetryTemplate() {
RetryTemplate retryTemplate = new RetryTemplate();
Map<Class<? extends Throwable>, Boolean> retryableExceptions = new HashMap<>();
retryableExceptions.put(ResourceAccessException.class, true);
- SimpleRetryPolicy policy = new SimpleRetryPolicy(4, retryableExceptions);
+ SimpleRetryPolicy policy = new SimpleRetryPolicy(2, retryableExceptions);
retryTemplate.setRetryPolicy(policy);
return retryTemplate;
}
+
+ protected RestTemplate getRestTemplate(boolean retry) {
+ int timeout;
+ if (retry) {
+ timeout = Integer.parseInt(env.getProperty(RETRY_TIMEOUT_PROPERTY, RETRY_TIMEOUT));
+ } else {
+ timeout = Integer.parseInt(env.getProperty(TIMEOUT_PROPERTY, TIMEOUT));
+ }
+
+ RestTemplate restTemplate = new RestTemplate();
+ HttpComponentsClientHttpRequestFactory factory = new HttpComponentsClientHttpRequestFactory();
+ factory.setConnectionRequestTimeout(timeout);
+ factory.setReadTimeout(timeout);
+ factory.setConnectTimeout(timeout);
+ restTemplate.setRequestFactory(new BufferingClientHttpRequestFactory(factory));
+ restTemplate.getInterceptors().add(new SOSpringClientFilter());
+ restTemplate.getInterceptors().add((new SpringClientPayloadFilter()));
+ return restTemplate;
+ }
}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/E2EServiceInstances.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/E2EServiceInstances.java
index 650922094d..0bcb0f1c86 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/E2EServiceInstances.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/E2EServiceInstances.java
@@ -295,7 +295,7 @@ public class E2EServiceInstances {
msoRequest.buildServiceErrorResponse(HttpStatus.SC_BAD_GATEWAY, MsoException.ServiceException,
"bpelResponse is null", ErrorNumbers.SVC_NO_SERVER_RESOURCES, null, version);
logger.error(LoggingAnchor.FOUR, MessageEnum.APIH_BPEL_COMMUNICATE_ERROR.toString(),
- MSO_PROP_APIHANDLER_INFRA, ErrorCode.BusinessProcesssError.getValue(), "Null response from BPEL");
+ MSO_PROP_APIHANDLER_INFRA, ErrorCode.BusinessProcessError.getValue(), "Null response from BPEL");
logger.debug(END_OF_THE_TRANSACTION + resp.getEntity().toString());
return resp;
}
@@ -333,7 +333,7 @@ public class E2EServiceInstances {
MsoException.ServiceException, "E2E serviceId " + serviceId + " is not found in DB",
ErrorNumbers.SVC_DETAILED_SERVICE_ERROR, null, version);
logger.error(LoggingAnchor.FOUR, MessageEnum.APIH_BPEL_COMMUNICATE_ERROR.toString(),
- MSO_PROP_APIHANDLER_INFRA, ErrorCode.BusinessProcesssError.getValue(),
+ MSO_PROP_APIHANDLER_INFRA, ErrorCode.BusinessProcessError.getValue(),
"Null response from RequestDB when searching by serviceId");
logger.debug(END_OF_THE_TRANSACTION + resp.getEntity());
return resp;
@@ -435,7 +435,7 @@ public class E2EServiceInstances {
msoRequest.buildServiceErrorResponse(HttpStatus.SC_BAD_GATEWAY, MsoException.ServiceException,
"bpelResponse is null", ErrorNumbers.SVC_NO_SERVER_RESOURCES, null, version);
logger.error(LoggingAnchor.FOUR, MessageEnum.APIH_BPEL_COMMUNICATE_ERROR.toString(),
- MSO_PROP_APIHANDLER_INFRA, ErrorCode.BusinessProcesssError.getValue(), "Null response from BPEL");
+ MSO_PROP_APIHANDLER_INFRA, ErrorCode.BusinessProcessError.getValue(), "Null response from BPEL");
logger.debug(END_OF_THE_TRANSACTION + resp.getEntity());
return resp;
}
@@ -549,7 +549,7 @@ public class E2EServiceInstances {
msoRequest.buildServiceErrorResponse(HttpStatus.SC_BAD_GATEWAY, MsoException.ServiceException,
"bpelResponse is null", ErrorNumbers.SVC_NO_SERVER_RESOURCES, null, version);
logger.error(LoggingAnchor.FOUR, MessageEnum.APIH_BPEL_COMMUNICATE_ERROR.toString(),
- MSO_PROP_APIHANDLER_INFRA, ErrorCode.BusinessProcesssError.getValue(), "Null response from BPEL");
+ MSO_PROP_APIHANDLER_INFRA, ErrorCode.BusinessProcessError.getValue(), "Null response from BPEL");
logger.debug(END_OF_THE_TRANSACTION + getBPMNResp.getEntity());
return getBPMNResp;
}
@@ -660,7 +660,7 @@ public class E2EServiceInstances {
msoRequest.buildServiceErrorResponse(HttpStatus.SC_BAD_GATEWAY, MsoException.ServiceException,
"bpelResponse is null", ErrorNumbers.SVC_NO_SERVER_RESOURCES, null, version);
logger.error(LoggingAnchor.FOUR, MessageEnum.APIH_BPEL_COMMUNICATE_ERROR.toString(),
- MSO_PROP_APIHANDLER_INFRA, ErrorCode.BusinessProcesssError.getValue(), "Null response from BPEL");
+ MSO_PROP_APIHANDLER_INFRA, ErrorCode.BusinessProcessError.getValue(), "Null response from BPEL");
logger.debug(END_OF_THE_TRANSACTION + resp.getEntity());
return resp;
}
@@ -760,7 +760,7 @@ public class E2EServiceInstances {
msoRequest.buildServiceErrorResponse(HttpStatus.SC_BAD_GATEWAY, MsoException.ServiceException,
"bpelResponse is null", ErrorNumbers.SVC_NO_SERVER_RESOURCES, null, version);
logger.error(LoggingAnchor.FOUR, MessageEnum.APIH_BPEL_COMMUNICATE_ERROR.toString(),
- MSO_PROP_APIHANDLER_INFRA, ErrorCode.BusinessProcesssError.getValue(), "Null response from BPEL");
+ MSO_PROP_APIHANDLER_INFRA, ErrorCode.BusinessProcessError.getValue(), "Null response from BPEL");
logger.debug(END_OF_THE_TRANSACTION + resp.getEntity());
return resp;
}
@@ -791,7 +791,7 @@ public class E2EServiceInstances {
"Request Failed due to BPEL error with HTTP Status= %1 " + '\n' + camundaJSONResponseBody,
ErrorNumbers.SVC_DETAILED_SERVICE_ERROR, variables, version);
logger.error(LoggingAnchor.FOUR, MessageEnum.APIH_BPEL_RESPONSE_ERROR.toString(),
- requestClient.getUrl(), ErrorCode.BusinessProcesssError.getValue(),
+ requestClient.getUrl(), ErrorCode.BusinessProcessError.getValue(),
"Response from BPEL engine is failed with HTTP Status=" + bpelStatus);
logger.debug(END_OF_THE_TRANSACTION + resp.getEntity());
return resp;
@@ -800,7 +800,7 @@ public class E2EServiceInstances {
"Request Failed due to BPEL error with HTTP Status= %1",
ErrorNumbers.SVC_DETAILED_SERVICE_ERROR, variables, version);
logger.error("", MessageEnum.APIH_BPEL_RESPONSE_ERROR.toString(), requestClient.getUrl(),
- ErrorCode.BusinessProcesssError.getValue(), "Response from BPEL engine is empty");
+ ErrorCode.BusinessProcessError.getValue(), "Response from BPEL engine is empty");
logger.debug(END_OF_THE_TRANSACTION + resp.getEntity());
return resp;
}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ManualTasks.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ManualTasks.java
index 4bafb40b32..7e4452aeb3 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ManualTasks.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ManualTasks.java
@@ -200,8 +200,9 @@ public class ManualTasks {
}
if (response == null) {
- ErrorLoggerInfo errorLoggerInfo = new ErrorLoggerInfo.Builder(MessageEnum.APIH_BPEL_COMMUNICATE_ERROR,
- ErrorCode.BusinessProcesssError).errorSource(Constants.MSO_PROP_APIHANDLER_INFRA).build();
+ ErrorLoggerInfo errorLoggerInfo =
+ new ErrorLoggerInfo.Builder(MessageEnum.APIH_BPEL_COMMUNICATE_ERROR, ErrorCode.BusinessProcessError)
+ .errorSource(Constants.MSO_PROP_APIHANDLER_INFRA).build();
BPMNFailureException bpmnFailureException =
@@ -229,7 +230,7 @@ public class ManualTasks {
} catch (JsonProcessingException e) {
ErrorLoggerInfo errorLoggerInfo = new ErrorLoggerInfo.Builder(MessageEnum.APIH_BPEL_RESPONSE_ERROR,
- ErrorCode.BusinessProcesssError).build();
+ ErrorCode.BusinessProcessError).build();
ValidateException validateException =
@@ -243,7 +244,7 @@ public class ManualTasks {
return builder.buildResponse(HttpStatus.SC_ACCEPTED, requestId, completeResp, apiVersion);
} else {
ErrorLoggerInfo errorLoggerInfo =
- new ErrorLoggerInfo.Builder(MessageEnum.APIH_BPEL_RESPONSE_ERROR, ErrorCode.BusinessProcesssError)
+ new ErrorLoggerInfo.Builder(MessageEnum.APIH_BPEL_RESPONSE_ERROR, ErrorCode.BusinessProcessError)
.build();
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/MsoRequest.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/MsoRequest.java
index 4bcc0d4111..2307a18c1a 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/MsoRequest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/MsoRequest.java
@@ -140,18 +140,7 @@ public class MsoRequest {
}
re.setServiceException(se);
}
-
- String requestErrorStr = null;
-
- try {
- ObjectMapper mapper = new ObjectMapper();
- mapper.setSerializationInclusion(Include.NON_DEFAULT);
- requestErrorStr = mapper.writeValueAsString(re);
- } catch (Exception e) {
- logger.error("Exception in buildServiceErrorResponse writing exceptionType to string ", e);
- }
-
- return builder.buildResponse(httpResponseCode, null, requestErrorStr, version);
+ return builder.buildResponse(httpResponseCode, null, re, version);
}
@@ -278,7 +267,6 @@ public class MsoRequest {
String vnfType = "";
aq.setRequestId(requestId);
aq.setRequestAction(action.toString());
- aq.setAction(action.toString());
aq.setRequestUrl(MDC.get(LogConstants.HTTP_URL));
Timestamp startTimeStamp = new Timestamp(System.currentTimeMillis());
@@ -410,7 +398,6 @@ public class MsoRequest {
taskRequest.getRequestDetails().getRequestInfo();
aq.setRequestId(requestId);
aq.setRequestAction(action.name());
- aq.setAction(action.name());
aq.setRequestUrl(MDC.get(LogConstants.HTTP_URL));
Timestamp startTimeStamp = new Timestamp(System.currentTimeMillis());
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/OrchestrationRequests.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/OrchestrationRequests.java
index 46bec9829b..6ccef65e46 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/OrchestrationRequests.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/OrchestrationRequests.java
@@ -9,9 +9,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -131,7 +131,7 @@ public class OrchestrationRequests {
infraActiveRequest = infraActiveRequestLookup(requestId);
try {
- requestProcessingData = requestsDbClient.getRequestProcessingDataBySoRequestId(requestId);
+ requestProcessingData = requestsDbClient.getExternalRequestProcessingDataBySoRequestId(requestId);
} catch (Exception e) {
logger.error("Exception occurred while communicating with RequestDb during requestProcessingData lookup ",
e);
@@ -414,7 +414,7 @@ public class OrchestrationRequests {
}
protected void mapRequestStatusAndExtSysErrSrcToRequest(InfraActiveRequests iar, RequestStatus status,
- String format) throws ContactCamundaException {
+ String format) {
String rollbackStatusMessage = iar.getRollbackStatusMessage();
String flowStatusMessage = iar.getFlowStatus();
String retryStatusMessage = iar.getRetryStatusMessage();
@@ -542,8 +542,9 @@ public class OrchestrationRequests {
}
if (infraActiveRequest == null) {
- ErrorLoggerInfo errorLoggerInfo = new ErrorLoggerInfo.Builder(MessageEnum.APIH_BPEL_COMMUNICATE_ERROR,
- ErrorCode.BusinessProcesssError).build();
+ ErrorLoggerInfo errorLoggerInfo =
+ new ErrorLoggerInfo.Builder(MessageEnum.APIH_BPEL_COMMUNICATE_ERROR, ErrorCode.BusinessProcessError)
+ .build();
ValidateException validateException = new ValidateException.Builder(
"Null response from RequestDB when searching by RequestId " + requestId, HttpStatus.SC_NOT_FOUND,
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/RequestHandlerUtils.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/RequestHandlerUtils.java
index e4ae80da97..b078aed6ac 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/RequestHandlerUtils.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/RequestHandlerUtils.java
@@ -154,8 +154,9 @@ public class RequestHandlerUtils extends AbstractRestHandler {
if (response == null) {
- ErrorLoggerInfo errorLoggerInfo = new ErrorLoggerInfo.Builder(MessageEnum.APIH_BPEL_COMMUNICATE_ERROR,
- ErrorCode.BusinessProcesssError).errorSource(Constants.MSO_PROP_APIHANDLER_INFRA).build();
+ ErrorLoggerInfo errorLoggerInfo =
+ new ErrorLoggerInfo.Builder(MessageEnum.APIH_BPEL_COMMUNICATE_ERROR, ErrorCode.BusinessProcessError)
+ .errorSource(Constants.MSO_PROP_APIHANDLER_INFRA).build();
ClientConnectionException clientException = new ClientConnectionException.Builder(requestClient.getUrl(),
HttpStatus.SC_BAD_GATEWAY, ErrorNumbers.SVC_NO_SERVER_RESOURCES).errorInfo(errorLoggerInfo).build();
updateStatus(currentActiveReq, Status.FAILED, clientException.getMessage());
@@ -220,7 +221,7 @@ public class RequestHandlerUtils extends AbstractRestHandler {
if (camundaJSONResponseBody != null && !camundaJSONResponseBody.isEmpty()) {
ErrorLoggerInfo errorLoggerInfo =
- new ErrorLoggerInfo.Builder(MessageEnum.APIH_BPEL_RESPONSE_ERROR, ErrorCode.BusinessProcesssError)
+ new ErrorLoggerInfo.Builder(MessageEnum.APIH_BPEL_RESPONSE_ERROR, ErrorCode.BusinessProcessError)
.errorSource(requestClient.getUrl()).build();
BPMNFailureException bpmnException =
new BPMNFailureException.Builder(String.valueOf(bpelStatus) + camundaJSONResponseBody, bpelStatus,
@@ -232,7 +233,7 @@ public class RequestHandlerUtils extends AbstractRestHandler {
} else {
ErrorLoggerInfo errorLoggerInfo =
- new ErrorLoggerInfo.Builder(MessageEnum.APIH_BPEL_RESPONSE_ERROR, ErrorCode.BusinessProcesssError)
+ new ErrorLoggerInfo.Builder(MessageEnum.APIH_BPEL_RESPONSE_ERROR, ErrorCode.BusinessProcessError)
.errorSource(requestClient.getUrl()).build();
@@ -306,6 +307,22 @@ public class RequestHandlerUtils extends AbstractRestHandler {
return requestUri;
}
+ public void checkForDuplicateRequests(Actions action, HashMap<String, String> instanceIdMap, String requestScope,
+ InfraActiveRequests currentActiveReq, String instanceName) throws ApiException {
+ InfraActiveRequests dup = null;
+ boolean inProgress = false;
+
+ dup = duplicateCheck(action, instanceIdMap, instanceName, requestScope, currentActiveReq);
+
+ if (dup != null) {
+ inProgress = camundaHistoryCheck(dup, currentActiveReq);
+ }
+
+ if (dup != null && inProgress) {
+ buildErrorOnDuplicateRecord(currentActiveReq, action, instanceIdMap, instanceName, requestScope, dup);
+ }
+ }
+
public InfraActiveRequests duplicateCheck(Actions action, HashMap<String, String> instanceIdMap,
String instanceName, String requestScope, InfraActiveRequests currentActiveReq) throws ApiException {
InfraActiveRequests dup = null;
@@ -333,7 +350,7 @@ public class RequestHandlerUtils extends AbstractRestHandler {
String requestId = duplicateRecord.getRequestId();
ResponseEntity<List<HistoricProcessInstanceEntity>> response = null;
try {
- response = camundaRequestHandler.getCamundaProcessInstanceHistory(requestId);
+ response = camundaRequestHandler.getCamundaProcessInstanceHistory(requestId, true);
} catch (RestClientException e) {
logger.error("Error querying Camunda for process-instance history for requestId: {}, exception: {}",
requestId, e.getMessage());
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ResumeOrchestrationRequest.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ResumeOrchestrationRequest.java
index 7cf9e338a8..65537cbba0 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ResumeOrchestrationRequest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ResumeOrchestrationRequest.java
@@ -122,8 +122,9 @@ public class ResumeOrchestrationRequest {
if (infraActiveRequest == null) {
logger.error("No infraActiveRequest record found for requestId: {} in requesteDb lookup", requestId);
- ErrorLoggerInfo errorLoggerInfo = new ErrorLoggerInfo.Builder(MessageEnum.APIH_DB_ATTRIBUTE_NOT_FOUND,
- ErrorCode.BusinessProcesssError).build();
+ ErrorLoggerInfo errorLoggerInfo =
+ new ErrorLoggerInfo.Builder(MessageEnum.APIH_DB_ATTRIBUTE_NOT_FOUND, ErrorCode.BusinessProcessError)
+ .build();
ValidateException validateException = new ValidateException.Builder(
"Null response from requestDB when searching by requestId: " + requestId, HttpStatus.SC_NOT_FOUND,
ErrorNumbers.SVC_DETAILED_SERVICE_ERROR).errorInfo(errorLoggerInfo).build();
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java
index 91c62180fc..a1779ba0fd 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java
@@ -46,6 +46,8 @@ import org.onap.so.apihandler.common.RequestClientParameter;
import org.onap.so.apihandlerinfra.exceptions.ApiException;
import org.onap.so.apihandlerinfra.exceptions.RequestDbFailureException;
import org.onap.so.apihandlerinfra.exceptions.ValidateException;
+import org.onap.so.apihandlerinfra.infra.rest.BpmnRequestBuilder;
+import org.onap.so.apihandlerinfra.infra.rest.exception.CloudConfigurationNotFoundException;
import org.onap.so.apihandlerinfra.infra.rest.handler.AbstractRestHandler;
import org.onap.so.apihandlerinfra.infra.rest.validators.RequestValidatorListenerRunner;
import org.onap.so.apihandlerinfra.logging.ErrorLoggerInfo;
@@ -56,6 +58,7 @@ import org.onap.so.db.request.client.RequestsDbClient;
import org.onap.so.exceptions.ValidationException;
import org.onap.so.logger.ErrorCode;
import org.onap.so.logger.MessageEnum;
+import org.onap.so.serviceinstancebeans.CloudConfiguration;
import org.onap.so.serviceinstancebeans.ModelInfo;
import org.onap.so.serviceinstancebeans.ModelType;
import org.onap.so.serviceinstancebeans.RequestDetails;
@@ -107,6 +110,9 @@ public class ServiceInstances extends AbstractRestHandler {
@Autowired
private RequestValidatorListenerRunner requestValidatorListenerRunner;
+ @Autowired
+ private BpmnRequestBuilder bpmnRequestBuilder;
+
@POST
@Path("/{version:[vV][5-7]}/serviceInstances")
@Consumes(MediaType.APPLICATION_JSON)
@@ -825,10 +831,20 @@ public class ServiceInstances extends AbstractRestHandler {
if (sir.getRequestDetails().getRequestParameters() != null) {
aLaCarte = sir.getRequestDetails().getRequestParameters().getALaCarte();
}
+
requestHandlerUtils.parseRequest(sir, instanceIdMap, action, version, requestJSON, aLaCarte, requestId,
currentActiveReq);
+ if ((action == Action.replaceInstance || action == Action.replaceInstanceRetainAssignments)
+ && (requestScope.equals(ModelType.vnf.toString()) || requestScope.equals(ModelType.vfModule.toString()))
+ && sir.getRequestDetails().getCloudConfiguration() == null) {
+ CloudConfiguration cloudConfiguration =
+ getCloudConfigurationOnReplace(requestScope, instanceIdMap, currentActiveReq);
+ sir.getRequestDetails().setCloudConfiguration(cloudConfiguration);
+ setCloudConfigurationCurrentActiveRequest(cloudConfiguration, currentActiveReq);
+ }
requestHandlerUtils.setInstanceId(currentActiveReq, requestScope, null, instanceIdMap);
+
int requestVersion = Integer.parseInt(version.substring(1));
String instanceName = null;
if (sir.getRequestDetails().getRequestInfo() != null) {
@@ -846,19 +862,9 @@ public class ServiceInstances extends AbstractRestHandler {
currentActiveReq.setNetworkType(networkType);
}
- InfraActiveRequests dup = null;
- boolean inProgress = false;
-
- dup = requestHandlerUtils.duplicateCheck(action, instanceIdMap, instanceName, requestScope, currentActiveReq);
-
- if (dup != null) {
- inProgress = requestHandlerUtils.camundaHistoryCheck(dup, currentActiveReq);
- }
+ requestHandlerUtils.checkForDuplicateRequests(action, instanceIdMap, requestScope, currentActiveReq,
+ instanceName);
- if (dup != null && inProgress) {
- requestHandlerUtils.buildErrorOnDuplicateRecord(currentActiveReq, action, instanceIdMap, instanceName,
- requestScope, dup);
- }
ServiceInstancesResponse serviceResponse = new ServiceInstancesResponse();
RequestReferences referencesResponse = new RequestReferences();
@@ -920,7 +926,9 @@ public class ServiceInstances extends AbstractRestHandler {
ErrorNumbers.SVC_DETAILED_SERVICE_ERROR).cause(e).errorInfo(errorLoggerInfo).build();
}
- if (!requestScope.equalsIgnoreCase(ModelType.service.name()) && action != Action.recreateInstance) {
+ if (!requestScope.equalsIgnoreCase(ModelType.service.name()) && action != Action.recreateInstance
+ && !(requestScope.equalsIgnoreCase(ModelType.vnf.name())
+ && (action == Action.replaceInstance || action == Action.replaceInstanceRetainAssignments))) {
aLaCarte = true;
} else if (aLaCarte == null) {
aLaCarte = false;
@@ -1006,18 +1014,7 @@ public class ServiceInstances extends AbstractRestHandler {
throw validateException;
}
- InfraActiveRequests dup =
- requestHandlerUtils.duplicateCheck(action, instanceIdMap, null, requestScope, currentActiveReq);
- boolean inProgress = false;
-
- if (dup != null) {
- inProgress = requestHandlerUtils.camundaHistoryCheck(dup, currentActiveReq);
- }
-
- if (dup != null && inProgress) {
- requestHandlerUtils.buildErrorOnDuplicateRecord(currentActiveReq, action, instanceIdMap, null, requestScope,
- dup);
- }
+ requestHandlerUtils.checkForDuplicateRequests(action, instanceIdMap, requestScope, currentActiveReq, null);
ServiceInstancesResponse serviceResponse = new ServiceInstancesResponse();
@@ -1062,7 +1059,6 @@ public class ServiceInstances extends AbstractRestHandler {
String serviceInstanceId;
Boolean aLaCarte = null;
String apiVersion = version.substring(1);
- boolean inProgress = false;
ServiceInstancesRequest sir;
sir = requestHandlerUtils.convertJsonToServiceInstanceRequest(requestJSON, action, requestId, requestUri);
@@ -1072,23 +1068,14 @@ public class ServiceInstances extends AbstractRestHandler {
if (sir.getRequestDetails().getRequestParameters() != null) {
aLaCarte = sir.getRequestDetails().getRequestParameters().getALaCarte();
}
+
requestHandlerUtils.parseRequest(sir, instanceIdMap, action, version, requestJSON, aLaCarte, requestId,
currentActiveReq);
requestHandlerUtils.setInstanceId(currentActiveReq, requestScope, null, instanceIdMap);
String instanceName = sir.getRequestDetails().getRequestInfo().getInstanceName();
- InfraActiveRequests dup = null;
-
- dup = requestHandlerUtils.duplicateCheck(action, instanceIdMap, instanceName, requestScope, currentActiveReq);
-
- if (dup != null) {
- inProgress = requestHandlerUtils.camundaHistoryCheck(dup, currentActiveReq);
- }
-
- if (instanceIdMap != null && dup != null && inProgress) {
- requestHandlerUtils.buildErrorOnDuplicateRecord(currentActiveReq, action, instanceIdMap, instanceName,
- requestScope, dup);
- }
+ requestHandlerUtils.checkForDuplicateRequests(action, instanceIdMap, requestScope, currentActiveReq,
+ instanceName);
ServiceInstancesResponse serviceResponse = new ServiceInstancesResponse();
RequestReferences referencesResponse = new RequestReferences();
@@ -1165,4 +1152,35 @@ public class ServiceInstances extends AbstractRestHandler {
requestScope);
}
+ protected CloudConfiguration getCloudConfigurationOnReplace(String requestScope,
+ HashMap<String, String> instanceIdMap, InfraActiveRequests currentActiveReq) throws ApiException {
+ logger.debug("Replace request is missing cloudConfiguration, autofilling from create.");
+ CloudConfiguration cloudConfiguration = null;
+ if (requestScope.equals(ModelType.vfModule.toString())) {
+ cloudConfiguration = bpmnRequestBuilder.getCloudConfigurationVfModuleReplace(
+ instanceIdMap.get("vnfInstanceId"), instanceIdMap.get("vfModuleInstanceId"));
+ } else {
+ cloudConfiguration = bpmnRequestBuilder.mapCloudConfigurationVnf(instanceIdMap.get("vnfInstanceId"));
+ }
+
+ if (cloudConfiguration == null) {
+ String errorMessage = "CloudConfiguration not found during autofill for replace request.";
+ logger.error(errorMessage);
+ updateStatus(currentActiveReq, Status.FAILED, errorMessage);
+ throw new CloudConfigurationNotFoundException(
+ "CloudConfiguration not found during autofill for replace request.");
+ }
+ return cloudConfiguration;
+ }
+
+ protected void setCloudConfigurationCurrentActiveRequest(CloudConfiguration cloudConfiguration,
+ InfraActiveRequests currentActiveRequest) {
+ if (cloudConfiguration.getLcpCloudRegionId() != null) {
+ currentActiveRequest.setAicCloudRegion(cloudConfiguration.getLcpCloudRegionId());
+ }
+
+ if (cloudConfiguration.getTenantId() != null) {
+ currentActiveRequest.setTenantId(cloudConfiguration.getTenantId());
+ }
+ }
}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/TasksHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/TasksHandler.java
index 09a1d9e5a6..edc287ce0a 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/TasksHandler.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/TasksHandler.java
@@ -203,7 +203,7 @@ public class TasksHandler {
} else {
ErrorLoggerInfo errorLoggerInfo =
- new ErrorLoggerInfo.Builder(MessageEnum.APIH_BPEL_RESPONSE_ERROR, ErrorCode.BusinessProcesssError)
+ new ErrorLoggerInfo.Builder(MessageEnum.APIH_BPEL_RESPONSE_ERROR, ErrorCode.BusinessProcessError)
.build();
throw new BPMNFailureException.Builder(String.valueOf(bpelStatus), bpelStatus,
ErrorNumbers.SVC_DETAILED_SERVICE_ERROR).errorInfo(errorLoggerInfo).build();
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/BpmnRequestBuilder.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/BpmnRequestBuilder.java
index ee2bb586cf..f37713d5b2 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/BpmnRequestBuilder.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/BpmnRequestBuilder.java
@@ -91,6 +91,16 @@ public class BpmnRequestBuilder {
return createServiceInstancesRequest(vnf, vfModule, modelType);
}
+ public CloudConfiguration getCloudConfigurationVfModuleReplace(String vnfId, String vfModuleId)
+ throws AAIEntityNotFound {
+ GenericVnf vnf = aaiDataRet.getGenericVnf(vnfId);
+ if (vnf == null) {
+ throw new AAIEntityNotFound(GENERIC_VNF_NOT_FOUND_IN_INVENTORY_VNF_ID + vnfId);
+ }
+
+ return mapCloudConfiguration(vnf, vfModuleId);
+ }
+
public ServiceInstancesRequest buildVolumeGroupDeleteRequest(String vnfId, String volumeGroupId)
throws AAIEntityNotFound {
GenericVnf vnf = aaiDataRet.getGenericVnf(vnfId);
@@ -174,7 +184,7 @@ public class BpmnRequestBuilder {
}
requestDetails.setModelInfo(mapVfModuleModelInformation(vfModule, modelType));
- requestDetails.setCloudConfiguration(mapCloudConfiguration(vnf, vfModule));
+ requestDetails.setCloudConfiguration(mapCloudConfiguration(vnf, vfModule.getVfModuleId()));
requestDetails.setRequestParameters(createRequestParameters());
return requestDetails;
}
@@ -264,7 +274,7 @@ public class BpmnRequestBuilder {
return modelInfo;
}
- public CloudConfiguration mapCloudConfiguration(GenericVnf vnf, VfModule vfModule) {
+ public CloudConfiguration mapCloudConfiguration(GenericVnf vnf, String vfModuleId) {
CloudConfiguration cloudConfig = new CloudConfiguration();
AAIResultWrapper wrapper = new AAIResultWrapper(vnf);
Optional<org.onap.so.client.aai.entities.Relationships> relationshipsOpt = wrapper.getRelationships();
@@ -281,7 +291,7 @@ public class BpmnRequestBuilder {
}
if (tenantId == null || cloudOwner == null || lcpRegionId == null) {
- Map<String, String[]> filters = createQueryRequest("vfModuleId", vfModule.getVfModuleId());
+ Map<String, String[]> filters = createQueryRequest("vfModuleId", vfModuleId);
Optional<ServiceInstancesRequest> request = findServiceInstanceRequest(filters);
if (request.isPresent()) {
if (request.get().getRequestDetails() != null
@@ -370,6 +380,36 @@ public class BpmnRequestBuilder {
return cloudConfig;
}
+ public CloudConfiguration mapCloudConfigurationVnf(String vnfId) {
+ CloudConfiguration cloudConfig = new CloudConfiguration();
+ String tenantId = null;
+ String cloudOwner = null;
+ String lcpRegionId = null;
+
+ Map<String, String[]> filters = createQueryRequest("vnfId", vnfId);
+ Optional<ServiceInstancesRequest> request = findServiceInstanceRequest(filters);
+ if (request.isPresent()) {
+ if (request.get().getRequestDetails() != null
+ && request.get().getRequestDetails().getCloudConfiguration() != null) {
+ if (request.get().getRequestDetails().getCloudConfiguration().getTenantId() != null) {
+ tenantId = request.get().getRequestDetails().getCloudConfiguration().getTenantId();
+ }
+ if (request.get().getRequestDetails().getCloudConfiguration().getCloudOwner() != null) {
+ cloudOwner = request.get().getRequestDetails().getCloudConfiguration().getCloudOwner();
+ }
+ if (request.get().getRequestDetails().getCloudConfiguration().getLcpCloudRegionId() != null) {
+ lcpRegionId = request.get().getRequestDetails().getCloudConfiguration().getLcpCloudRegionId();
+ }
+ }
+ } else {
+ throw new CloudConfigurationNotFoundException(CLOUD_CONFIGURATION_COULD_NOT_BE_FOUND);
+ }
+ cloudConfig.setTenantId(tenantId);
+ cloudConfig.setCloudOwner(cloudOwner);
+ cloudConfig.setLcpCloudRegionId(lcpRegionId);
+ return cloudConfig;
+ }
+
public Optional<ServiceInstancesRequest> findServiceInstanceRequest(Map<String, String[]> filters) {
List<InfraActiveRequests> completeRequests = infraActiveRequestsClient.getRequest(filters);
InfraActiveRequests foundRequest = completeRequests.get(0);
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/exception/AAIEntityNotFound.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/exception/AAIEntityNotFound.java
index 2153d9a628..e7753b2134 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/exception/AAIEntityNotFound.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/exception/AAIEntityNotFound.java
@@ -20,7 +20,9 @@
package org.onap.so.apihandlerinfra.infra.rest.exception;
-public class AAIEntityNotFound extends Exception {
+import org.onap.so.apihandlerinfra.exceptions.ApiException;
+
+public class AAIEntityNotFound extends ApiException {
public AAIEntityNotFound(String errorMessage) {
super(errorMessage);
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/handler/NetworkRestHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/handler/NetworkRestHandler.java
index 7b095fc9d0..a6d2fa2e1b 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/handler/NetworkRestHandler.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/handler/NetworkRestHandler.java
@@ -51,7 +51,6 @@ public class NetworkRestHandler extends AbstractRestHandler {
Timestamp startTimeStamp = new Timestamp(System.currentTimeMillis());
InfraActiveRequests deleteRequest = new InfraActiveRequests();
deleteRequest.setRequestAction(Action.deleteInstance.toString());
- deleteRequest.setAction(Action.deleteInstance.toString());
deleteRequest.setStartTime(startTimeStamp);
deleteRequest.setServiceInstanceId(serviceInstanceId);
deleteRequest.setNetworkId(networkId);
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/handler/ServiceInstanceRestHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/handler/ServiceInstanceRestHandler.java
index afadf36157..36e7b7ced6 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/handler/ServiceInstanceRestHandler.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/handler/ServiceInstanceRestHandler.java
@@ -54,7 +54,6 @@ public class ServiceInstanceRestHandler extends AbstractRestHandler {
Timestamp startTimeStamp = new Timestamp(System.currentTimeMillis());
InfraActiveRequests deleteRequest = new InfraActiveRequests();
deleteRequest.setRequestAction(Action.deleteInstance.toString());
- deleteRequest.setAction(Action.deleteInstance.toString());
deleteRequest.setStartTime(startTimeStamp);
deleteRequest.setServiceInstanceId(serviceInstanceId);
deleteRequest.setRequestId(requestId);
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/handler/VFModuleRestHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/handler/VFModuleRestHandler.java
index 0762803488..380649a3ca 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/handler/VFModuleRestHandler.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/handler/VFModuleRestHandler.java
@@ -51,7 +51,6 @@ public class VFModuleRestHandler extends AbstractRestHandler {
Timestamp startTimeStamp = new Timestamp(System.currentTimeMillis());
InfraActiveRequests deleteRequest = new InfraActiveRequests();
deleteRequest.setRequestAction(Action.deleteInstance.toString());
- deleteRequest.setAction(Action.deleteInstance.toString());
deleteRequest.setStartTime(startTimeStamp);
deleteRequest.setServiceInstanceId(serviceInstanceId);
deleteRequest.setVnfId(vnfId);
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/handler/VnfRestHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/handler/VnfRestHandler.java
index 01a72f0bfb..c11ae56b0d 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/handler/VnfRestHandler.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/handler/VnfRestHandler.java
@@ -51,7 +51,6 @@ public class VnfRestHandler extends AbstractRestHandler {
Timestamp startTimeStamp = new Timestamp(System.currentTimeMillis());
InfraActiveRequests deleteRequest = new InfraActiveRequests();
deleteRequest.setRequestAction(Action.deleteInstance.toString());
- deleteRequest.setAction(Action.deleteInstance.toString());
deleteRequest.setStartTime(startTimeStamp);
deleteRequest.setServiceInstanceId(serviceInstanceId);
deleteRequest.setVnfId(vnfId);
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/handler/VolumeRestHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/handler/VolumeRestHandler.java
index 48a8aa2cd8..15aa71f936 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/handler/VolumeRestHandler.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/handler/VolumeRestHandler.java
@@ -48,7 +48,6 @@ public class VolumeRestHandler extends AbstractRestHandler {
Timestamp startTimeStamp = new Timestamp(System.currentTimeMillis());
InfraActiveRequests deleteRequest = new InfraActiveRequests();
deleteRequest.setRequestAction(Action.deleteInstance.toString());
- deleteRequest.setAction(Action.deleteInstance.toString());
deleteRequest.setStartTime(startTimeStamp);
deleteRequest.setServiceInstanceId(serviceInstanceId);
deleteRequest.setVnfId(vnfId);
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/CloudResourcesOrchestration.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/CloudResourcesOrchestration.java
index 47d6932730..43f957174c 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/CloudResourcesOrchestration.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/CloudResourcesOrchestration.java
@@ -134,8 +134,9 @@ public class CloudResourcesOrchestration {
}
if (infraActiveRequest == null) {
- ErrorLoggerInfo errorLoggerInfo = new ErrorLoggerInfo.Builder(MessageEnum.APIH_DB_ATTRIBUTE_NOT_FOUND,
- ErrorCode.BusinessProcesssError).build();
+ ErrorLoggerInfo errorLoggerInfo =
+ new ErrorLoggerInfo.Builder(MessageEnum.APIH_DB_ATTRIBUTE_NOT_FOUND, ErrorCode.BusinessProcessError)
+ .build();
ValidateException validateException =
new ValidateException.Builder("Orchestration RequestId " + requestId + " is not found in DB",
HttpStatus.SC_BAD_REQUEST, ErrorNumbers.SVC_DETAILED_SERVICE_ERROR)
@@ -203,7 +204,7 @@ public class CloudResourcesOrchestration {
if (requestDB == null) {
ErrorLoggerInfo errorLoggerInfo = new ErrorLoggerInfo.Builder(MessageEnum.APIH_BPEL_COMMUNICATE_ERROR,
- ErrorCode.BusinessProcesssError).build();
+ ErrorCode.BusinessProcessError).build();
ValidateException validateException =
new ValidateException.Builder("Orchestration RequestId " + requestId + " is not found in DB",
HttpStatus.SC_NO_CONTENT, ErrorNumbers.SVC_DETAILED_SERVICE_ERROR)
@@ -227,7 +228,7 @@ public class CloudResourcesOrchestration {
orchestrationMap = tenantIsolationRequest.getOrchestrationFilters(queryParams);
} catch (ValidationException ex) {
ErrorLoggerInfo errorLoggerInfo =
- new ErrorLoggerInfo.Builder(MessageEnum.APIH_GENERAL_EXCEPTION, ErrorCode.BusinessProcesssError)
+ new ErrorLoggerInfo.Builder(MessageEnum.APIH_GENERAL_EXCEPTION, ErrorCode.BusinessProcessError)
.build();
ValidateException validateException =
new ValidateException.Builder(ex.getMessage(), HttpStatus.SC_INTERNAL_SERVER_ERROR,
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/TenantIsolationRequest.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/TenantIsolationRequest.java
index 6449b0bb75..b1eb71ea04 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/TenantIsolationRequest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/TenantIsolationRequest.java
@@ -268,7 +268,6 @@ public class TenantIsolationRequest {
aq.setRequestId(requestId);
aq.setRequestAction(action.name());
- aq.setAction(action.name());
Timestamp startTimeStamp = new Timestamp(System.currentTimeMillis());
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/dmaap/DmaapOperationalEnvClient.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/dmaap/DmaapOperationalEnvClient.java
index 340d143b42..e9ce0bf99a 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/dmaap/DmaapOperationalEnvClient.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/dmaap/DmaapOperationalEnvClient.java
@@ -72,7 +72,7 @@ public class DmaapOperationalEnvClient {
public void dmaapPublishOperationalEnvRequest(String operationalEnvironmentId, String operationalEnvironmentName,
String operationalEnvironmentType, String tenantContext, String workloadContext, String action)
- throws ApiException, IOException, InterruptedException {
+ throws ApiException {
String request = this.buildRequest(operationalEnvironmentId, operationalEnvironmentName,
operationalEnvironmentType, tenantContext, workloadContext, action);
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/SDCClientHelper.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/SDCClientHelper.java
index de5edb5b54..65d3109445 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/SDCClientHelper.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/SDCClientHelper.java
@@ -94,7 +94,7 @@ public class SDCClientHelper {
if (basicAuthCred == null || "".equals(basicAuthCred)) {
ErrorLoggerInfo errorLoggerInfo =
- new ErrorLoggerInfo.Builder(MessageEnum.APIH_GENERAL_EXCEPTION, ErrorCode.BusinessProcesssError)
+ new ErrorLoggerInfo.Builder(MessageEnum.APIH_GENERAL_EXCEPTION, ErrorCode.BusinessProcessError)
.build();
throw new ValidateException.Builder(
@@ -143,7 +143,7 @@ public class SDCClientHelper {
return client.post(jsonPayload);
} catch (Exception ex) {
ErrorLoggerInfo errorLoggerInfo =
- new ErrorLoggerInfo.Builder(MessageEnum.APIH_GENERAL_EXCEPTION, ErrorCode.BusinessProcesssError)
+ new ErrorLoggerInfo.Builder(MessageEnum.APIH_GENERAL_EXCEPTION, ErrorCode.BusinessProcessError)
.build();
throw new ValidateException.Builder("Bad request could not post payload", HttpStatus.SC_BAD_REQUEST,
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/process/ActivateVnfOperationalEnvironment.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/process/ActivateVnfOperationalEnvironment.java
index 3957f86bab..0005d26016 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/process/ActivateVnfOperationalEnvironment.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/process/ActivateVnfOperationalEnvironment.java
@@ -109,7 +109,7 @@ public class ActivateVnfOperationalEnvironment {
logger.debug(" aai workloadContext: {}", workloadContext);
if (!vidWorkloadContext.equals(workloadContext)) {
ErrorLoggerInfo errorLoggerInfo =
- new ErrorLoggerInfo.Builder(MessageEnum.APIH_GENERAL_EXCEPTION, ErrorCode.BusinessProcesssError)
+ new ErrorLoggerInfo.Builder(MessageEnum.APIH_GENERAL_EXCEPTION, ErrorCode.BusinessProcessError)
.build();
throw new ValidateException.Builder(
" The vid workloadContext did not match from aai record. " + " vid workloadContext:"
@@ -119,7 +119,7 @@ public class ActivateVnfOperationalEnvironment {
}
if (ecompOperationalEnvironmentId == null) {
ErrorLoggerInfo errorLoggerInfo =
- new ErrorLoggerInfo.Builder(MessageEnum.APIH_GENERAL_EXCEPTION, ErrorCode.BusinessProcesssError)
+ new ErrorLoggerInfo.Builder(MessageEnum.APIH_GENERAL_EXCEPTION, ErrorCode.BusinessProcessError)
.build();
throw new ValidateException.Builder(
" The ECOMP OE was not in aai record; the value of relationship.relationship-data key: "
@@ -183,7 +183,7 @@ public class ActivateVnfOperationalEnvironment {
} else {
ErrorLoggerInfo errorLoggerInfo =
- new ErrorLoggerInfo.Builder(MessageEnum.APIH_GENERAL_EXCEPTION, ErrorCode.BusinessProcesssError)
+ new ErrorLoggerInfo.Builder(MessageEnum.APIH_GENERAL_EXCEPTION, ErrorCode.BusinessProcessError)
.build();
String dbErrorMessage = " Failure calling SDC: statusCode: " + statusCode + "; messageId: "
+ jsonResponse.get("messageId") + "; message: " + jsonResponse.get("message");
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/process/ActivateVnfStatusOperationalEnvironment.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/process/ActivateVnfStatusOperationalEnvironment.java
index 3226a0c313..624a7f6945 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/process/ActivateVnfStatusOperationalEnvironment.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/process/ActivateVnfStatusOperationalEnvironment.java
@@ -250,7 +250,7 @@ public class ActivateVnfStatusOperationalEnvironment {
String dbErrorMessage = "Failure calling SDC: statusCode: " + statusCode + "; messageId: "
+ jsonResponse.get("messageId") + "; message: " + jsonResponse.get("message");
ErrorLoggerInfo errorLoggerInfo =
- new ErrorLoggerInfo.Builder(MessageEnum.APIH_GENERAL_EXCEPTION, ErrorCode.BusinessProcesssError)
+ new ErrorLoggerInfo.Builder(MessageEnum.APIH_GENERAL_EXCEPTION, ErrorCode.BusinessProcessError)
.build();
ValidateException validateException =
new ValidateException.Builder(dbErrorMessage, HttpStatus.SC_BAD_REQUEST,
@@ -304,7 +304,7 @@ public class ActivateVnfStatusOperationalEnvironment {
if (status.equals("Failure") && queryServiceModelResponseList.size() == count) {
this.errorMessage = "Overall Activation process is a Failure. " + status;
ErrorLoggerInfo errorLoggerInfo =
- new ErrorLoggerInfo.Builder(MessageEnum.APIH_GENERAL_EXCEPTION, ErrorCode.BusinessProcesssError)
+ new ErrorLoggerInfo.Builder(MessageEnum.APIH_GENERAL_EXCEPTION, ErrorCode.BusinessProcessError)
.build();
ValidateException validateException =
new ValidateException.Builder(this.errorMessage, HttpStatus.SC_BAD_REQUEST,
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/validation/CloudConfigurationValidation.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/validation/CloudConfigurationValidation.java
index 2207c52048..a89032f50c 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/validation/CloudConfigurationValidation.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/validation/CloudConfigurationValidation.java
@@ -48,11 +48,6 @@ public class CloudConfigurationValidation implements ValidationRule {
|| action == Action.updateInstance)) {
throw new ValidationException("cloudConfiguration");
}
- if ((requestScope.equalsIgnoreCase(ModelType.vnf.name())
- || requestScope.equalsIgnoreCase(ModelType.vfModule.name()))
- && action == Action.replaceInstance) {
- throw new ValidationException("cloudConfiguration");
- }
if (requestScope.equalsIgnoreCase(ModelType.configuration.name())
&& (action == Action.enablePort || action == Action.disablePort
|| action == Action.activateInstance || action == Action.deactivateInstance)) {
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/CamundaRequestHandlerTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/CamundaRequestHandlerTest.java
index 830f38f98b..4dc281b3fc 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/CamundaRequestHandlerTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/CamundaRequestHandlerTest.java
@@ -17,324 +17,39 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-
package org.onap.so.apihandlerinfra;
-import static org.junit.Assert.assertEquals;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.doThrow;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-import java.io.IOException;
-import java.nio.file.Files;
-import java.nio.file.Paths;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import org.camunda.bpm.engine.impl.persistence.entity.HistoricActivityInstanceEntity;
-import org.camunda.bpm.engine.impl.persistence.entity.HistoricProcessInstanceEntity;
-import org.junit.Before;
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
+import static com.github.tomakehurst.wiremock.client.WireMock.get;
+import javax.ws.rs.core.MediaType;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-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.apihandlerinfra.exceptions.ContactCamundaException;
-import org.onap.so.apihandlerinfra.exceptions.RequestDbFailureException;
-import org.springframework.core.ParameterizedTypeReference;
-import org.springframework.core.env.Environment;
-import org.springframework.http.HttpEntity;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpHeaders;
-import org.springframework.http.HttpMethod;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
-import org.springframework.web.client.HttpClientErrorException;
-import org.springframework.web.client.HttpStatusCodeException;
import org.springframework.web.client.ResourceAccessException;
-import org.springframework.web.client.RestTemplate;
-import com.fasterxml.jackson.core.type.TypeReference;
-import com.fasterxml.jackson.databind.DeserializationFeature;
-import com.fasterxml.jackson.databind.ObjectMapper;
-
-@RunWith(MockitoJUnitRunner.class)
-public class CamundaRequestHandlerTest {
-
- @Mock
- private RestTemplate restTemplate;
- @Mock
- private Environment env;
+public class CamundaRequestHandlerTest extends BaseTest {
- @InjectMocks
- @Spy
+ @Autowired
private CamundaRequestHandler camundaRequestHandler;
+ @Value("${wiremock.server.port}")
+ private String wiremockPort;
+
@Rule
public ExpectedException thrown = ExpectedException.none();
- private static final String REQUEST_ID = "eca3a1b1-43ab-457e-ab1c-367263d148b4";
- private ResponseEntity<List<HistoricActivityInstanceEntity>> activityInstanceResponse = null;
- private ResponseEntity<List<HistoricProcessInstanceEntity>> processInstanceResponse = null;
- private List<HistoricActivityInstanceEntity> activityInstanceList = null;
- private List<HistoricProcessInstanceEntity> processInstanceList = null;
-
-
-
- @Before
- public void setup() throws IOException {
- ObjectMapper mapper = new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
- activityInstanceList = mapper.readValue(
- new String(Files.readAllBytes(
- Paths.get("src/test/resources/OrchestrationRequest/ActivityInstanceHistoryResponse.json"))),
- new TypeReference<List<HistoricActivityInstanceEntity>>() {});
- processInstanceList = mapper.readValue(
- new String(Files.readAllBytes(
- Paths.get("src/test/resources/OrchestrationRequest/ProcessInstanceHistoryResponse.json"))),
- new TypeReference<List<HistoricProcessInstanceEntity>>() {});
- processInstanceResponse =
- new ResponseEntity<List<HistoricProcessInstanceEntity>>(processInstanceList, HttpStatus.ACCEPTED);
- activityInstanceResponse =
- new ResponseEntity<List<HistoricActivityInstanceEntity>>(activityInstanceList, HttpStatus.ACCEPTED);
-
- doReturn("/sobpmnengine/history/process-instance?variables=mso-request-id_eq_").when(env)
- .getProperty("mso.camunda.rest.history.uri");
- doReturn("/sobpmnengine/history/activity-instance?processInstanceId=").when(env)
- .getProperty("mso.camunda.rest.activity.uri");
- doReturn("auth").when(env).getRequiredProperty("mso.camundaAuth");
- doReturn("key").when(env).getRequiredProperty("mso.msoKey");
- doReturn("http://localhost:8089").when(env).getProperty("mso.camundaURL");
- }
-
- public HttpHeaders setHeaders() {
- HttpHeaders headers = new HttpHeaders();
- List<org.springframework.http.MediaType> acceptableMediaTypes = new ArrayList<>();
- acceptableMediaTypes.add(org.springframework.http.MediaType.APPLICATION_JSON);
- headers.setAccept(acceptableMediaTypes);
- headers.add(HttpHeaders.AUTHORIZATION, "auth");
-
- return headers;
- }
-
- @Test
- public void getActivityNameTest() {
- String expectedActivityName = "Last task executed: BB to Execute";
- String actualActivityName = camundaRequestHandler.getActivityName(activityInstanceList);
-
- assertEquals(expectedActivityName, actualActivityName);
- }
-
- @Test
- public void getActivityNameNullActivityNameTest() {
- String expectedActivityName = "Task name is null.";
- HistoricActivityInstanceEntity activityInstance = new HistoricActivityInstanceEntity();
- List<HistoricActivityInstanceEntity> activityInstanceList = new ArrayList<>();
- activityInstanceList.add(activityInstance);
-
- String actualActivityName = camundaRequestHandler.getActivityName(activityInstanceList);
-
- assertEquals(expectedActivityName, actualActivityName);
- }
-
- @Test
- public void getActivityNameNullListTest() {
- String expectedActivityName = "No results returned on activityInstance history lookup.";
- List<HistoricActivityInstanceEntity> activityInstanceList = null;
- String actualActivityName = camundaRequestHandler.getActivityName(activityInstanceList);
-
- assertEquals(expectedActivityName, actualActivityName);
- }
-
- @Test
- public void getActivityNameEmptyListTest() {
- String expectedActivityName = "No results returned on activityInstance history lookup.";
- List<HistoricActivityInstanceEntity> activityInstanceList = new ArrayList<>();
- String actualActivityName = camundaRequestHandler.getActivityName(activityInstanceList);
-
- assertEquals(expectedActivityName, actualActivityName);
- }
-
- @Test
- public void getTaskNameTest() throws ContactCamundaException {
- doReturn(processInstanceResponse).when(camundaRequestHandler).getCamundaProcessInstanceHistory(REQUEST_ID);
- doReturn(activityInstanceResponse).when(camundaRequestHandler)
- .getCamundaActivityHistory("c4c6b647-a26e-11e9-b144-0242ac14000b", REQUEST_ID);
- doReturn("Last task executed: BB to Execute").when(camundaRequestHandler).getActivityName(activityInstanceList);
- String expectedTaskName = "Last task executed: BB to Execute";
-
- String actualTaskName = camundaRequestHandler.getTaskName(REQUEST_ID);
-
- assertEquals(expectedTaskName, actualTaskName);
- }
-
- @Test
- public void getTaskNameNullProcessInstanceListTest() throws ContactCamundaException {
- ResponseEntity<List<HistoricProcessInstanceEntity>> response = new ResponseEntity<>(null, HttpStatus.OK);
- doReturn(response).when(camundaRequestHandler).getCamundaProcessInstanceHistory(REQUEST_ID);
- String expected = "No processInstances returned for requestId: " + REQUEST_ID;
-
- String actual = camundaRequestHandler.getTaskName(REQUEST_ID);
-
- assertEquals(expected, actual);
- }
-
@Test
- public void getTaskNameNullProcessInstanceIdTest() throws ContactCamundaException {
- HistoricProcessInstanceEntity processInstance = new HistoricProcessInstanceEntity();
- List<HistoricProcessInstanceEntity> processInstanceList = new ArrayList<>();
- processInstanceList.add(processInstance);
- ResponseEntity<List<HistoricProcessInstanceEntity>> response =
- new ResponseEntity<>(processInstanceList, HttpStatus.OK);
- doReturn(response).when(camundaRequestHandler).getCamundaProcessInstanceHistory(REQUEST_ID);
- String expected = "No processInstanceId returned for requestId: " + REQUEST_ID;
-
- String actual = camundaRequestHandler.getTaskName(REQUEST_ID);
-
- assertEquals(expected, actual);
- }
-
- @Test
- public void getTaskNameEmptyProcessInstanceListTest() throws ContactCamundaException {
- ResponseEntity<List<HistoricProcessInstanceEntity>> response =
- new ResponseEntity<>(Collections.emptyList(), HttpStatus.OK);
- doReturn(response).when(camundaRequestHandler).getCamundaProcessInstanceHistory(REQUEST_ID);
- String expected = "No processInstances returned for requestId: " + REQUEST_ID;
-
- String actual = camundaRequestHandler.getTaskName(REQUEST_ID);
-
- assertEquals(expected, actual);
- }
-
- @Test
- public void getTaskNameProcessInstanceLookupFailureTest() throws ContactCamundaException {
- doThrow(HttpClientErrorException.class).when(camundaRequestHandler)
- .getCamundaProcessInstanceHistory(REQUEST_ID);
-
- thrown.expect(ContactCamundaException.class);
- camundaRequestHandler.getTaskName(REQUEST_ID);
- }
-
- @Test
- public void getCamundaActivityHistoryTest() throws ContactCamundaException {
- HttpHeaders headers = setHeaders();
- HttpEntity<?> requestEntity = new HttpEntity<>(headers);
- String targetUrl = "http://localhost:8089/sobpmnengine/history/activity-instance?processInstanceId="
- + "c4c6b647-a26e-11e9-b144-0242ac14000b";
- doReturn(activityInstanceResponse).when(restTemplate).exchange(targetUrl, HttpMethod.GET, requestEntity,
- new ParameterizedTypeReference<List<HistoricActivityInstanceEntity>>() {});
- doReturn(headers).when(camundaRequestHandler).setCamundaHeaders("auth", "key");
- ResponseEntity<List<HistoricActivityInstanceEntity>> actualResponse =
- camundaRequestHandler.getCamundaActivityHistory("c4c6b647-a26e-11e9-b144-0242ac14000b", REQUEST_ID);
- assertEquals(activityInstanceResponse, actualResponse);
- }
-
- @Test
- public void getCamundaActivityHistoryErrorTest() {
- HttpHeaders headers = setHeaders();
- HttpEntity<?> requestEntity = new HttpEntity<>(headers);
- String targetUrl = "http://localhost:8089/sobpmnengine/history/activity-instance?processInstanceId="
- + "c4c6b647-a26e-11e9-b144-0242ac14000b";
- doThrow(new ResourceAccessException("IOException")).when(restTemplate).exchange(targetUrl, HttpMethod.GET,
- requestEntity, new ParameterizedTypeReference<List<HistoricActivityInstanceEntity>>() {});
- doReturn(headers).when(camundaRequestHandler).setCamundaHeaders("auth", "key");
-
- try {
- camundaRequestHandler.getCamundaActivityHistory("c4c6b647-a26e-11e9-b144-0242ac14000b", REQUEST_ID);
- } catch (ContactCamundaException e) {
- // Exception thrown after retries are completed
- }
-
- verify(restTemplate, times(4)).exchange(targetUrl, HttpMethod.GET, requestEntity,
- new ParameterizedTypeReference<List<HistoricActivityInstanceEntity>>() {});
- }
-
- @Test
- public void getCamundaProccesInstanceHistoryTest() {
- HttpHeaders headers = setHeaders();
- HttpEntity<?> requestEntity = new HttpEntity<>(headers);
- String targetUrl =
- "http://localhost:8089/sobpmnengine/history/process-instance?variables=mso-request-id_eq_" + REQUEST_ID;
- doReturn(processInstanceResponse).when(restTemplate).exchange(targetUrl, HttpMethod.GET, requestEntity,
- new ParameterizedTypeReference<List<HistoricProcessInstanceEntity>>() {});
- doReturn(headers).when(camundaRequestHandler).setCamundaHeaders("auth", "key");
-
- ResponseEntity<List<HistoricProcessInstanceEntity>> actualResponse =
- camundaRequestHandler.getCamundaProcessInstanceHistory(REQUEST_ID);
- assertEquals(processInstanceResponse, actualResponse);
- }
-
- @Test
- public void getCamundaProccesInstanceHistoryRetryTest() {
- HttpHeaders headers = setHeaders();
- HttpEntity<?> requestEntity = new HttpEntity<>(headers);
- String targetUrl =
- "http://localhost:8089/sobpmnengine/history/process-instance?variables=mso-request-id_eq_" + REQUEST_ID;
- doThrow(new ResourceAccessException("I/O error")).when(restTemplate).exchange(targetUrl, HttpMethod.GET,
- requestEntity, new ParameterizedTypeReference<List<HistoricProcessInstanceEntity>>() {});
- doReturn(headers).when(camundaRequestHandler).setCamundaHeaders("auth", "key");
-
- try {
- camundaRequestHandler.getCamundaProcessInstanceHistory(REQUEST_ID);
- } catch (ResourceAccessException e) {
- // Exception thrown after retries are completed
- }
- verify(restTemplate, times(4)).exchange(targetUrl, HttpMethod.GET, requestEntity,
- new ParameterizedTypeReference<List<HistoricProcessInstanceEntity>>() {});
- }
-
- @Test
- public void getCamundaProccesInstanceHistoryNoRetryTest() {
- HttpHeaders headers = setHeaders();
- HttpEntity<?> requestEntity = new HttpEntity<>(headers);
- String targetUrl =
- "http://localhost:8089/sobpmnengine/history/process-instance?variables=mso-request-id_eq_" + REQUEST_ID;
- doThrow(HttpClientErrorException.class).when(restTemplate).exchange(targetUrl, HttpMethod.GET, requestEntity,
- new ParameterizedTypeReference<List<HistoricProcessInstanceEntity>>() {});
- doReturn(headers).when(camundaRequestHandler).setCamundaHeaders("auth", "key");
-
- try {
- camundaRequestHandler.getCamundaProcessInstanceHistory(REQUEST_ID);
- } catch (HttpStatusCodeException e) {
- // Exception thrown, no retries
- }
- verify(restTemplate, times(1)).exchange(targetUrl, HttpMethod.GET, requestEntity,
- new ParameterizedTypeReference<List<HistoricProcessInstanceEntity>>() {});
- }
-
- @Test
- public void getCamundaProccesInstanceHistoryFailThenSuccessTest() {
- HttpHeaders headers = setHeaders();
- HttpEntity<?> requestEntity = new HttpEntity<>(headers);
- String targetUrl =
- "http://localhost:8089/sobpmnengine/history/process-instance?variables=mso-request-id_eq_" + REQUEST_ID;
- when(restTemplate.exchange(targetUrl, HttpMethod.GET, requestEntity,
- new ParameterizedTypeReference<List<HistoricProcessInstanceEntity>>() {}))
- .thenThrow(new ResourceAccessException("I/O Exception")).thenReturn(processInstanceResponse);
- doReturn(headers).when(camundaRequestHandler).setCamundaHeaders("auth", "key");
-
- ResponseEntity<List<HistoricProcessInstanceEntity>> actualResponse =
- camundaRequestHandler.getCamundaProcessInstanceHistory(REQUEST_ID);
- assertEquals(processInstanceResponse, actualResponse);
- verify(restTemplate, times(2)).exchange(targetUrl, HttpMethod.GET, requestEntity,
- new ParameterizedTypeReference<List<HistoricProcessInstanceEntity>>() {});
- }
-
- @Test
- public void setCamundaHeadersTest() {
- String encryptedAuth = "015E7ACF706C6BBF85F2079378BDD2896E226E09D13DC2784BA309E27D59AB9FAD3A5E039DF0BB8408"; // user:password
- String key = "07a7159d3bf51a0e53be7a8f89699be7";
-
- HttpHeaders headers = camundaRequestHandler.setCamundaHeaders(encryptedAuth, key);
- List<org.springframework.http.MediaType> acceptedType = headers.getAccept();
-
- String expectedAcceptedType = "application/json";
- assertEquals(expectedAcceptedType, acceptedType.get(0).toString());
- String basicAuth = headers.getFirst(HttpHeaders.AUTHORIZATION);
- String expectedBasicAuth = "Basic dXNlcjpwYXNzd29yZA==";
+ public void timeoutTest() {
+ wireMockServer.stubFor(get(
+ ("/sobpmnengine/history/process-instance?variables=mso-request-id_eq_6718de35-b9a5-4670-b19f-a0f4ac22bfaf"))
+ .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
+ .withBodyFile("Camunda/HistoryCheckResponse.json")
+ .withStatus(org.apache.http.HttpStatus.SC_OK).withFixedDelay(40000)));
- assertEquals(expectedBasicAuth, basicAuth);
+ thrown.expect(ResourceAccessException.class);
+ camundaRequestHandler.getCamundaProcessInstanceHistory("6718de35-b9a5-4670-b19f-a0f4ac22bfaf", false);
}
}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/CamundaRequestHandlerUnitTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/CamundaRequestHandlerUnitTest.java
new file mode 100644
index 0000000000..261b64f2e6
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/CamundaRequestHandlerUnitTest.java
@@ -0,0 +1,378 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2019 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.apihandlerinfra;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.doThrow;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.ArrayList;
+import java.util.List;
+import org.camunda.bpm.engine.impl.persistence.entity.HistoricActivityInstanceEntity;
+import org.camunda.bpm.engine.impl.persistence.entity.HistoricProcessInstanceEntity;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+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.apihandlerinfra.exceptions.ContactCamundaException;
+import org.onap.so.apihandlerinfra.exceptions.RequestDbFailureException;
+import org.springframework.core.ParameterizedTypeReference;
+import org.springframework.core.env.Environment;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
+import org.springframework.web.client.HttpClientErrorException;
+import org.springframework.web.client.HttpStatusCodeException;
+import org.springframework.web.client.ResourceAccessException;
+import org.springframework.web.client.RestClientException;
+import org.springframework.web.client.RestTemplate;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+@RunWith(MockitoJUnitRunner.class)
+public class CamundaRequestHandlerUnitTest {
+
+ @Mock
+ private RestTemplate restTemplate;
+
+ @Mock
+ private RestTemplate restTemplateRetry;
+
+ @Mock
+ private Environment env;
+
+ @InjectMocks
+ @Spy
+ private CamundaRequestHandler camundaRequestHandler;
+
+ @Rule
+ public ExpectedException thrown = ExpectedException.none();
+
+ private static final String REQUEST_ID = "eca3a1b1-43ab-457e-ab1c-367263d148b4";
+ private ResponseEntity<List<HistoricActivityInstanceEntity>> activityInstanceResponse = null;
+ private ResponseEntity<List<HistoricProcessInstanceEntity>> processInstanceResponse = null;
+ private List<HistoricActivityInstanceEntity> activityInstanceList = null;
+ private List<HistoricProcessInstanceEntity> processInstanceList = null;
+
+
+
+ @Before
+ public void setup() throws IOException {
+ ObjectMapper mapper = new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+ activityInstanceList = mapper.readValue(
+ new String(Files.readAllBytes(
+ Paths.get("src/test/resources/OrchestrationRequest/ActivityInstanceHistoryResponse.json"))),
+ new TypeReference<List<HistoricActivityInstanceEntity>>() {});
+ processInstanceList = mapper.readValue(
+ new String(Files.readAllBytes(
+ Paths.get("src/test/resources/OrchestrationRequest/ProcessInstanceHistoryResponse.json"))),
+ new TypeReference<List<HistoricProcessInstanceEntity>>() {});
+ processInstanceResponse =
+ new ResponseEntity<List<HistoricProcessInstanceEntity>>(processInstanceList, HttpStatus.ACCEPTED);
+ activityInstanceResponse =
+ new ResponseEntity<List<HistoricActivityInstanceEntity>>(activityInstanceList, HttpStatus.ACCEPTED);
+
+ doReturn("/sobpmnengine/history/process-instance?variables=mso-request-id_eq_").when(env)
+ .getProperty("mso.camunda.rest.history.uri");
+ doReturn("/sobpmnengine/history/activity-instance?processInstanceId=").when(env)
+ .getProperty("mso.camunda.rest.activity.uri");
+ doReturn("auth").when(env).getRequiredProperty("mso.camundaAuth");
+ doReturn("key").when(env).getRequiredProperty("mso.msoKey");
+ doReturn("http://localhost:8089").when(env).getProperty("mso.camundaURL");
+
+ HttpComponentsClientHttpRequestFactory factory = new HttpComponentsClientHttpRequestFactory();
+ factory.setReadTimeout(30000);
+ factory.setConnectTimeout(30000);
+ restTemplate.setRequestFactory(factory);
+ doReturn(restTemplate).when(camundaRequestHandler).getRestTemplate(false);
+
+ HttpComponentsClientHttpRequestFactory factoryRetry = new HttpComponentsClientHttpRequestFactory();
+ factoryRetry.setReadTimeout(15000);
+ factoryRetry.setConnectTimeout(15000);
+ restTemplate.setRequestFactory(factoryRetry);
+ doReturn(restTemplateRetry).when(camundaRequestHandler).getRestTemplate(true);
+ }
+
+ public HttpHeaders setHeaders() {
+ HttpHeaders headers = new HttpHeaders();
+ List<org.springframework.http.MediaType> acceptableMediaTypes = new ArrayList<>();
+ acceptableMediaTypes.add(org.springframework.http.MediaType.APPLICATION_JSON);
+ headers.setAccept(acceptableMediaTypes);
+ headers.add(HttpHeaders.AUTHORIZATION, "auth");
+
+ return headers;
+ }
+
+ @Test
+ public void getActivityNameTest() throws IOException {
+ String expectedActivityName = "Last task executed: BB to Execute";
+ String actualActivityName = camundaRequestHandler.getActivityName(activityInstanceList);
+
+ assertEquals(expectedActivityName, actualActivityName);
+ }
+
+ @Test
+ public void getActivityNameNullActivityNameTest() throws IOException {
+ String expectedActivityName = "Task name is null.";
+ HistoricActivityInstanceEntity activityInstance = new HistoricActivityInstanceEntity();
+ List<HistoricActivityInstanceEntity> activityInstanceList = new ArrayList<>();
+ activityInstanceList.add(activityInstance);
+
+ String actualActivityName = camundaRequestHandler.getActivityName(activityInstanceList);
+
+ assertEquals(expectedActivityName, actualActivityName);
+ }
+
+ @Test
+ public void getActivityNameNullListTest() throws IOException {
+ String expectedActivityName = "No results returned on activityInstance history lookup.";
+ List<HistoricActivityInstanceEntity> activityInstanceList = null;
+ String actualActivityName = camundaRequestHandler.getActivityName(activityInstanceList);
+
+ assertEquals(expectedActivityName, actualActivityName);
+ }
+
+ @Test
+ public void getActivityNameEmptyListTest() throws IOException {
+ String expectedActivityName = "No results returned on activityInstance history lookup.";
+ List<HistoricActivityInstanceEntity> activityInstanceList = new ArrayList<>();
+ String actualActivityName = camundaRequestHandler.getActivityName(activityInstanceList);
+
+ assertEquals(expectedActivityName, actualActivityName);
+ }
+
+ @Test
+ public void getCamundActivityHistoryNullTest() throws IOException, ContactCamundaException {
+ HistoricProcessInstanceEntity processInstance = new HistoricProcessInstanceEntity();
+ processInstance.setId("c4c6b647-a26e-11e9-b144-0242ac14000b");
+ List<HistoricProcessInstanceEntity> processInstanceList = new ArrayList<>();
+ processInstanceList.add(processInstance);
+ ResponseEntity<List<HistoricProcessInstanceEntity>> response =
+ new ResponseEntity<>(processInstanceList, HttpStatus.OK);
+ doReturn(null).when(camundaRequestHandler).getCamundaActivityHistory("c4c6b647-a26e-11e9-b144-0242ac14000b");
+
+ String actualTaskName = camundaRequestHandler.getTaskInformation(response, REQUEST_ID);
+
+ assertNull(actualTaskName);
+ }
+
+ @Test
+ public void getCamundActivityHistoryErrorTest() throws IOException, ContactCamundaException {
+ HistoricProcessInstanceEntity processInstance = new HistoricProcessInstanceEntity();
+ processInstance.setId("c4c6b647-a26e-11e9-b144-0242ac14000b");
+ List<HistoricProcessInstanceEntity> processInstanceList = new ArrayList<>();
+ processInstanceList.add(processInstance);
+ ResponseEntity<List<HistoricProcessInstanceEntity>> response =
+ new ResponseEntity<>(processInstanceList, HttpStatus.OK);
+ doThrow(RestClientException.class).when(camundaRequestHandler)
+ .getCamundaActivityHistory("c4c6b647-a26e-11e9-b144-0242ac14000b");
+
+ String actualTaskName = camundaRequestHandler.getTaskInformation(response, REQUEST_ID);
+
+ assertNull(actualTaskName);
+ }
+
+ @Test
+ public void getTaskName() throws IOException, ContactCamundaException {
+ doReturn(processInstanceResponse).when(camundaRequestHandler).getCamundaProcessInstanceHistory(REQUEST_ID,
+ false);
+ doReturn(activityInstanceResponse).when(camundaRequestHandler)
+ .getCamundaActivityHistory("c4c6b647-a26e-11e9-b144-0242ac14000b");
+ doReturn("Last task executed: BB to Execute").when(camundaRequestHandler).getActivityName(activityInstanceList);
+ String expectedTaskName = "Last task executed: BB to Execute";
+
+ String actualTaskName = camundaRequestHandler.getTaskName(REQUEST_ID);
+
+ assertEquals(expectedTaskName, actualTaskName);
+ }
+
+ @Test
+ public void getTaskNameNullProcessInstanceListTest() throws IOException, ContactCamundaException {
+ ResponseEntity<List<HistoricProcessInstanceEntity>> response = new ResponseEntity<>(null, HttpStatus.OK);
+
+ String actual = camundaRequestHandler.getTaskInformation(response, REQUEST_ID);
+
+ assertNull(actual);
+ }
+
+ @Test
+ public void getTaskNameNullProcessInstanceIdTest() throws IOException, ContactCamundaException {
+ HistoricProcessInstanceEntity processInstance = new HistoricProcessInstanceEntity();
+ List<HistoricProcessInstanceEntity> processInstanceList = new ArrayList<>();
+ processInstanceList.add(processInstance);
+ ResponseEntity<List<HistoricProcessInstanceEntity>> response =
+ new ResponseEntity<>(processInstanceList, HttpStatus.OK);
+
+ String actual = camundaRequestHandler.getTaskInformation(response, REQUEST_ID);
+
+ assertNull(actual);
+ }
+
+ @Test
+ public void getTaskNameEmptyProcessInstanceListTest() throws IOException, ContactCamundaException {
+ List<HistoricProcessInstanceEntity> processInstanceList = new ArrayList<>();
+ ResponseEntity<List<HistoricProcessInstanceEntity>> response =
+ new ResponseEntity<>(processInstanceList, HttpStatus.OK);
+
+ String actual = camundaRequestHandler.getTaskInformation(response, REQUEST_ID);
+
+ assertNull(actual);
+ }
+
+ @Test
+ public void getTaskNameProcessInstanceLookupFailureTest() throws IOException, ContactCamundaException {
+ doThrow(HttpClientErrorException.class).when(camundaRequestHandler).getCamundaProcessInstanceHistory(REQUEST_ID,
+ false);
+
+ String result = camundaRequestHandler.getTaskName(REQUEST_ID);
+ assertNull(result);
+ }
+
+ @Test
+ public void getCamundaActivityHistoryTest() throws IOException, ContactCamundaException {
+ HttpHeaders headers = setHeaders();
+ HttpEntity<?> requestEntity = new HttpEntity<>(headers);
+ String targetUrl = "http://localhost:8089/sobpmnengine/history/activity-instance?processInstanceId="
+ + "c4c6b647-a26e-11e9-b144-0242ac14000b";
+ doReturn(activityInstanceResponse).when(restTemplate).exchange(targetUrl, HttpMethod.GET, requestEntity,
+ new ParameterizedTypeReference<List<HistoricActivityInstanceEntity>>() {});
+ doReturn(headers).when(camundaRequestHandler).setCamundaHeaders("auth", "key");
+ ResponseEntity<List<HistoricActivityInstanceEntity>> actualResponse =
+ camundaRequestHandler.getCamundaActivityHistory("c4c6b647-a26e-11e9-b144-0242ac14000b");
+ assertEquals(activityInstanceResponse, actualResponse);
+ }
+
+ @Test
+ public void getCamundaActivityHistoryErrorTest() {
+ HttpHeaders headers = setHeaders();
+ HttpEntity<?> requestEntity = new HttpEntity<>(headers);
+ String targetUrl = "http://localhost:8089/sobpmnengine/history/activity-instance?processInstanceId="
+ + "c4c6b647-a26e-11e9-b144-0242ac14000b";
+ doThrow(new ResourceAccessException("IOException")).when(restTemplate).exchange(targetUrl, HttpMethod.GET,
+ requestEntity, new ParameterizedTypeReference<List<HistoricActivityInstanceEntity>>() {});
+ doReturn(headers).when(camundaRequestHandler).setCamundaHeaders("auth", "key");
+
+ thrown.expect(ResourceAccessException.class);
+ camundaRequestHandler.getCamundaActivityHistory("c4c6b647-a26e-11e9-b144-0242ac14000b");
+
+ verify(restTemplate, times(1)).exchange(targetUrl, HttpMethod.GET, requestEntity,
+ new ParameterizedTypeReference<List<HistoricActivityInstanceEntity>>() {});
+ }
+
+ @Test
+ public void getCamundaProccesInstanceHistoryTest() throws IOException, ContactCamundaException {
+ HttpHeaders headers = setHeaders();
+ HttpEntity<?> requestEntity = new HttpEntity<>(headers);
+ String targetUrl =
+ "http://localhost:8089/sobpmnengine/history/process-instance?variables=mso-request-id_eq_" + REQUEST_ID;
+ doReturn(processInstanceResponse).when(restTemplate).exchange(targetUrl, HttpMethod.GET, requestEntity,
+ new ParameterizedTypeReference<List<HistoricProcessInstanceEntity>>() {});
+ doReturn(headers).when(camundaRequestHandler).setCamundaHeaders("auth", "key");
+
+ ResponseEntity<List<HistoricProcessInstanceEntity>> actualResponse =
+ camundaRequestHandler.getCamundaProcessInstanceHistory(REQUEST_ID, false);
+ assertEquals(processInstanceResponse, actualResponse);
+ }
+
+ @Test
+ public void getCamundaProccesInstanceHistoryRetryTest() {
+ HttpHeaders headers = setHeaders();
+ HttpEntity<?> requestEntity = new HttpEntity<>(headers);
+ String targetUrl =
+ "http://localhost:8089/sobpmnengine/history/process-instance?variables=mso-request-id_eq_" + REQUEST_ID;
+ doThrow(new ResourceAccessException("I/O error")).when(restTemplateRetry).exchange(targetUrl, HttpMethod.GET,
+ requestEntity, new ParameterizedTypeReference<List<HistoricProcessInstanceEntity>>() {});
+ doReturn(headers).when(camundaRequestHandler).setCamundaHeaders("auth", "key");
+
+ thrown.expect(ResourceAccessException.class);
+ camundaRequestHandler.getCamundaProcessInstanceHistory(REQUEST_ID, true);
+
+ verify(restTemplateRetry, times(2)).exchange(targetUrl, HttpMethod.GET, requestEntity,
+ new ParameterizedTypeReference<List<HistoricProcessInstanceEntity>>() {});
+ }
+
+ @Test
+ public void getCamundaProccesInstanceHistoryNoRetryTest() {
+ HttpHeaders headers = setHeaders();
+ HttpEntity<?> requestEntity = new HttpEntity<>(headers);
+ String targetUrl =
+ "http://localhost:8089/sobpmnengine/history/process-instance?variables=mso-request-id_eq_" + REQUEST_ID;
+ doThrow(HttpClientErrorException.class).when(restTemplate).exchange(targetUrl, HttpMethod.GET, requestEntity,
+ new ParameterizedTypeReference<List<HistoricProcessInstanceEntity>>() {});
+ doReturn(headers).when(camundaRequestHandler).setCamundaHeaders("auth", "key");
+
+ thrown.expect(HttpStatusCodeException.class);
+ camundaRequestHandler.getCamundaProcessInstanceHistory(REQUEST_ID, false);
+
+ verify(restTemplate, times(1)).exchange(targetUrl, HttpMethod.GET, requestEntity,
+ new ParameterizedTypeReference<List<HistoricProcessInstanceEntity>>() {});
+ }
+
+ @Test
+ public void getCamundaProccesInstanceHistoryFailThenSuccessTest() throws IOException, ContactCamundaException {
+ HttpHeaders headers = setHeaders();
+ HttpEntity<?> requestEntity = new HttpEntity<>(headers);
+ String targetUrl =
+ "http://localhost:8089/sobpmnengine/history/process-instance?variables=mso-request-id_eq_" + REQUEST_ID;
+ when(restTemplateRetry.exchange(targetUrl, HttpMethod.GET, requestEntity,
+ new ParameterizedTypeReference<List<HistoricProcessInstanceEntity>>() {}))
+ .thenThrow(new ResourceAccessException("I/O Exception")).thenReturn(processInstanceResponse);
+ doReturn(headers).when(camundaRequestHandler).setCamundaHeaders("auth", "key");
+
+ ResponseEntity<List<HistoricProcessInstanceEntity>> actualResponse =
+ camundaRequestHandler.getCamundaProcessInstanceHistory(REQUEST_ID, true);
+
+ assertEquals(processInstanceResponse, actualResponse);
+ verify(restTemplateRetry, times(2)).exchange(targetUrl, HttpMethod.GET, requestEntity,
+ new ParameterizedTypeReference<List<HistoricProcessInstanceEntity>>() {});
+ }
+
+ @Test
+ public void setCamundaHeadersTest() throws ContactCamundaException, RequestDbFailureException {
+ String encryptedAuth = "015E7ACF706C6BBF85F2079378BDD2896E226E09D13DC2784BA309E27D59AB9FAD3A5E039DF0BB8408"; // user:password
+ String key = "07a7159d3bf51a0e53be7a8f89699be7";
+
+ HttpHeaders headers = camundaRequestHandler.setCamundaHeaders(encryptedAuth, key);
+ List<org.springframework.http.MediaType> acceptedType = headers.getAccept();
+
+ String expectedAcceptedType = "application/json";
+ assertEquals(expectedAcceptedType, acceptedType.get(0).toString());
+ String basicAuth = headers.getFirst(HttpHeaders.AUTHORIZATION);
+ String expectedBasicAuth = "Basic dXNlcjpwYXNzd29yZA==";
+
+ assertEquals(expectedBasicAuth, basicAuth);
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/E2EServiceInstancesTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/E2EServiceInstancesTest.java
index 7ddab572e3..0ce8113dcb 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/E2EServiceInstancesTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/E2EServiceInstancesTest.java
@@ -62,14 +62,13 @@ public class E2EServiceInstancesTest extends BaseTest {
wireMockServer.stubFor(post(urlPathEqualTo("/testOrchestrationUri")).willReturn(aResponse()
.withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).withStatus(HttpStatus.SC_OK)));
wireMockServer.stubFor(post(urlPathEqualTo("/infraActiveRequests/")).withRequestBody(equalToJson(
- "{\"clientRequestId\":null,\"action\":null,\"requestStatus\":\"FAILED\",\"statusMessage\":\"Error parsing request: No valid requestorId is specified\",\"progress\":100,\"startTime\":1533541051247,\"endTime\":1533541051247,\"source\":null,\"vnfId\":null,\"vnfName\":null,\"vnfType\":null,\"serviceType\":null,\"aicNodeClli\":null,\"tenantId\":null,\"provStatus\":null,\"vnfParams\":null,\"vnfOutputs\":null,\"requestBody\":\"{\\r\\n \\\"service\\\":{\\r\\n \\\"name\\\":\\\"so_test4\\\",\\r\\n \\\"description\\\":\\\"so_test2\\\",\\r\\n \\\"serviceInvariantUuid\\\":\\\"60c3e96e-0970-4871-b6e0-3b6de7561519\\\",\\r\\n \\\"serviceUuid\\\":\\\"592f9437-a9c0-4303-b9f6-c445bb7e9814\\\",\\r\\n \\\"globalSubscriberId\\\":\\\"123457\\\",\\r\\n \\\"serviceType\\\":\\\"voLTE\\\",\\r\\n \\\"parameters\\\":{\\r\\n \\\"resources\\\":[\\r\\n {\\r\\n \\\"resourceName\\\":\\\"vIMS\\\",\\r\\n \\\"resourceInvariantUuid\\\":\\\"60c3e96e-0970-4871-b6e0-3b6de7561516\\\",\\r\\n \\\"resourceUuid\\\":\\\"60c3e96e-0970-4871-b6e0-3b6de7561512\\\",\\r\\n \\\"parameters\\\":{\\r\\n \\\"locationConstraints\\\":[\\r\\n {\\r\\n \\\"vnfProfileId\\\":\\\"zte-vBAS-1.0\\\",\\r\\n \\\"locationConstraints\\\":{\\r\\n \\\"vimId\\\":\\\"4050083f-465f-4838-af1e-47a545222ad0\\\"\\r\\n }\\r\\n },\\r\\n {\\r\\n \\\"vnfProfileId\\\":\\\"zte-vMME-1.0\\\",\\r\\n \\\"locationConstraints\\\":{\\r\\n \\\"vimId\\\":\\\"4050083f-465f-4838-af1e-47a545222ad0\\\"\\r\\n }\\r\\n }\\r\\n ]\\r\\n }\\r\\n },\\r\\n {\\r\\n \\\"resourceName\\\":\\\"vEPC\\\",\\r\\n \\\"resourceInvariantUuid\\\":\\\"61c3e96e-0970-4871-b6e0-3b6de7561516\\\",\\r\\n \\\"resourceUuid\\\":\\\"62c3e96e-0970-4871-b6e0-3b6de7561512\\\",\\r\\n \\\"parameters\\\":{\\r\\n \\\"locationConstraints\\\":[\\r\\n {\\r\\n \\\"vnfProfileId\\\":\\\"zte-CSCF-1.0\\\",\\r\\n \\\"locationConstraints\\\":{\\r\\n \\\"vimId\\\":\\\"4050083f-465f-4838-af1e-47a545222ad1\\\"\\r\\n }\\r\\n }\\r\\n ]\\r\\n }\\r\\n },\\r\\n {\\r\\n \\\"resourceName\\\":\\\"underlayvpn\\\",\\r\\n \\\"resourceInvariantUuid\\\":\\\"60c3e96e-0970-4871-b6e0-3b6de7561513\\\",\\r\\n \\\"resourceUuid\\\":\\\"60c3e96e-0970-4871-b6e0-3b6de7561514\\\",\\r\\n \\\"parameters\\\":{\\r\\n \\\"locationConstraints\\\":[\\r\\n\\r\\n ]\\r\\n }\\r\\n },\\r\\n {\\r\\n \\\"resourceName\\\":\\\"overlayvpn\\\",\\r\\n \\\"resourceInvariantUuid\\\":\\\"60c3e96e-0970-4871-b6e0-3b6de7561517\\\",\\r\\n \\\"resourceUuid\\\":\\\"60c3e96e-0970-4871-b6e0-3b6de7561518\\\",\\r\\n \\\"parameters\\\":{\\r\\n \\\"locationConstraints\\\":[\\r\\n\\r\\n ]\\r\\n }\\r\\n }\\r\\n ],\\r\\n \\\"requestInputs\\\":{\\r\\n \\\"externalDataNetworkName\\\":\\\"Flow_out_net\\\",\\r\\n \\\"m6000_mng_ip\\\":\\\"181.18.20.2\\\",\\r\\n \\\"externalCompanyFtpDataNetworkName\\\":\\\"Flow_out_net\\\",\\r\\n \\\"externalPluginManageNetworkName\\\":\\\"plugin_net_2014\\\",\\r\\n \\\"externalManageNetworkName\\\":\\\"mng_net_2017\\\",\\r\\n \\\"sfc_data_network\\\":\\\"sfc_data_net_2016\\\",\\r\\n \\\"NatIpRange\\\":\\\"210.1.1.10-210.1.1.20\\\",\\r\\n \\\"location\\\":\\\"4050083f-465f-4838-af1e-47a545222ad0\\\",\\r\\n \\\"sdncontroller\\\":\\\"9b9f02c0-298b-458a-bc9c-be3692e4f35e\\\"\\r\\n }\\r\\n }\\r\\n\\r\\n }\\r\\n\\r\\n}\",\"responseBody\":null,\"lastModifiedBy\":\"APIH\",\"modifyTime\":null,\"requestType\":null,\"volumeGroupId\":null,\"volumeGroupName\":null,\"vfModuleId\":null,\"vfModuleName\":null,\"vfModuleModelName\":null,\"aaiServiceId\":null,\"aicCloudRegion\":null,\"callBackUrl\":null,\"correlator\":null,\"serviceInstanceId\":null,\"serviceInstanceName\":null,\"requestScope\":\"service\",\"requestAction\":\"createInstance\",\"networkId\":null,\"networkName\":null,\"networkType\":null,\"requestorId\":null,\"configurationId\":null,\"configurationName\":null,\"operationalEnvId\":null,\"operationalEnvName\":null,\"requestURI\":\"d167c9d0-1785-4e93-b319-996ebbcc3272\"}"))
+ "{\"requestStatus\":\"FAILED\",\"statusMessage\":\"Error parsing request: No valid requestorId is specified\",\"progress\":100,\"startTime\":1533541051247,\"endTime\":1533541051247,\"source\":null,\"vnfId\":null,\"vnfName\":null,\"vnfType\":null,\"serviceType\":null,\"tenantId\":null,\"vnfParams\":null,\"vnfOutputs\":null,\"requestBody\":\"{\\r\\n \\\"service\\\":{\\r\\n \\\"name\\\":\\\"so_test4\\\",\\r\\n \\\"description\\\":\\\"so_test2\\\",\\r\\n \\\"serviceInvariantUuid\\\":\\\"60c3e96e-0970-4871-b6e0-3b6de7561519\\\",\\r\\n \\\"serviceUuid\\\":\\\"592f9437-a9c0-4303-b9f6-c445bb7e9814\\\",\\r\\n \\\"globalSubscriberId\\\":\\\"123457\\\",\\r\\n \\\"serviceType\\\":\\\"voLTE\\\",\\r\\n \\\"parameters\\\":{\\r\\n \\\"resources\\\":[\\r\\n {\\r\\n \\\"resourceName\\\":\\\"vIMS\\\",\\r\\n \\\"resourceInvariantUuid\\\":\\\"60c3e96e-0970-4871-b6e0-3b6de7561516\\\",\\r\\n \\\"resourceUuid\\\":\\\"60c3e96e-0970-4871-b6e0-3b6de7561512\\\",\\r\\n \\\"parameters\\\":{\\r\\n \\\"locationConstraints\\\":[\\r\\n {\\r\\n \\\"vnfProfileId\\\":\\\"zte-vBAS-1.0\\\",\\r\\n \\\"locationConstraints\\\":{\\r\\n \\\"vimId\\\":\\\"4050083f-465f-4838-af1e-47a545222ad0\\\"\\r\\n }\\r\\n },\\r\\n {\\r\\n \\\"vnfProfileId\\\":\\\"zte-vMME-1.0\\\",\\r\\n \\\"locationConstraints\\\":{\\r\\n \\\"vimId\\\":\\\"4050083f-465f-4838-af1e-47a545222ad0\\\"\\r\\n }\\r\\n }\\r\\n ]\\r\\n }\\r\\n },\\r\\n {\\r\\n \\\"resourceName\\\":\\\"vEPC\\\",\\r\\n \\\"resourceInvariantUuid\\\":\\\"61c3e96e-0970-4871-b6e0-3b6de7561516\\\",\\r\\n \\\"resourceUuid\\\":\\\"62c3e96e-0970-4871-b6e0-3b6de7561512\\\",\\r\\n \\\"parameters\\\":{\\r\\n \\\"locationConstraints\\\":[\\r\\n {\\r\\n \\\"vnfProfileId\\\":\\\"zte-CSCF-1.0\\\",\\r\\n \\\"locationConstraints\\\":{\\r\\n \\\"vimId\\\":\\\"4050083f-465f-4838-af1e-47a545222ad1\\\"\\r\\n }\\r\\n }\\r\\n ]\\r\\n }\\r\\n },\\r\\n {\\r\\n \\\"resourceName\\\":\\\"underlayvpn\\\",\\r\\n \\\"resourceInvariantUuid\\\":\\\"60c3e96e-0970-4871-b6e0-3b6de7561513\\\",\\r\\n \\\"resourceUuid\\\":\\\"60c3e96e-0970-4871-b6e0-3b6de7561514\\\",\\r\\n \\\"parameters\\\":{\\r\\n \\\"locationConstraints\\\":[\\r\\n\\r\\n ]\\r\\n }\\r\\n },\\r\\n {\\r\\n \\\"resourceName\\\":\\\"overlayvpn\\\",\\r\\n \\\"resourceInvariantUuid\\\":\\\"60c3e96e-0970-4871-b6e0-3b6de7561517\\\",\\r\\n \\\"resourceUuid\\\":\\\"60c3e96e-0970-4871-b6e0-3b6de7561518\\\",\\r\\n \\\"parameters\\\":{\\r\\n \\\"locationConstraints\\\":[\\r\\n\\r\\n ]\\r\\n }\\r\\n }\\r\\n ],\\r\\n \\\"requestInputs\\\":{\\r\\n \\\"externalDataNetworkName\\\":\\\"Flow_out_net\\\",\\r\\n \\\"m6000_mng_ip\\\":\\\"181.18.20.2\\\",\\r\\n \\\"externalCompanyFtpDataNetworkName\\\":\\\"Flow_out_net\\\",\\r\\n \\\"externalPluginManageNetworkName\\\":\\\"plugin_net_2014\\\",\\r\\n \\\"externalManageNetworkName\\\":\\\"mng_net_2017\\\",\\r\\n \\\"sfc_data_network\\\":\\\"sfc_data_net_2016\\\",\\r\\n \\\"NatIpRange\\\":\\\"210.1.1.10-210.1.1.20\\\",\\r\\n \\\"location\\\":\\\"4050083f-465f-4838-af1e-47a545222ad0\\\",\\r\\n \\\"sdncontroller\\\":\\\"9b9f02c0-298b-458a-bc9c-be3692e4f35e\\\"\\r\\n }\\r\\n }\\r\\n\\r\\n }\\r\\n\\r\\n}\",\"responseBody\":null,\"lastModifiedBy\":\"APIH\",\"modifyTime\":null,\"volumeGroupId\":null,\"volumeGroupName\":null,\"vfModuleId\":null,\"vfModuleName\":null,\"vfModuleModelName\":null,\"aicCloudRegion\":null,\"callBackUrl\":null,\"correlator\":null,\"serviceInstanceId\":null,\"serviceInstanceName\":null,\"requestScope\":\"service\",\"requestAction\":\"createInstance\",\"networkId\":null,\"networkName\":null,\"networkType\":null,\"requestorId\":null,\"configurationId\":null,\"configurationName\":null,\"operationalEnvId\":null,\"operationalEnvName\":null,\"requestURI\":\"d167c9d0-1785-4e93-b319-996ebbcc3272\"}"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withStatus(HttpStatus.SC_OK)));
Service defaultService = new Service();
defaultService.setModelUUID("d88da85c-d9e8-4f73-b837-3a72a431622a");
ServiceRecipe serviceRecipe = new ServiceRecipe();
serviceRecipe.setServiceModelUUID(defaultService.getModelUUID());
- serviceRecipe.setAction(Action.scaleInstance.name());
serviceRecipe.setRecipeTimeout(180);
serviceRecipe.setOrchestrationUri("/testOrchestrationUri");
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ManualTasksTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ManualTasksTest.java
index 8a112e3fdd..8881a08ff3 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ManualTasksTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ManualTasksTest.java
@@ -161,7 +161,6 @@ public class ManualTasksTest extends BaseTest {
restTemplate.exchange(builder.toUriString(), HttpMethod.POST, entity, String.class);
ObjectMapper mapper = new ObjectMapper();
- mapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, true);
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class);
@@ -198,7 +197,6 @@ public class ManualTasksTest extends BaseTest {
restTemplate.exchange(builder.toUriString(), HttpMethod.POST, entity, String.class);
ObjectMapper mapper = new ObjectMapper();
- mapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, true);
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class);
@@ -240,7 +238,6 @@ public class ManualTasksTest extends BaseTest {
ObjectMapper mapper = new ObjectMapper();
- mapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, true);
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class);
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/MsoRequestTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/MsoRequestTest.java
index 86bf8060a7..f1d5a5487f 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/MsoRequestTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/MsoRequestTest.java
@@ -278,10 +278,6 @@ public class MsoRequestTest extends BaseTest {
ServiceInstancesRequest.class),
instanceIdMapTest, Action.createInstance, 5},
{"No valid cloudConfiguration is specified",
- mapper.readValue(inputStream("/CloudConfiguration/CloudConfigurationVnf.json"),
- ServiceInstancesRequest.class),
- instanceIdMapTest, Action.replaceInstance, 5},
- {"No valid cloudConfiguration is specified",
mapper.readValue(inputStream("/CloudConfiguration/CloudConfigurationConfig.json"),
ServiceInstancesRequest.class),
instanceIdMapTest, Action.enablePort, 5},
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsTest.java
index 151785dbeb..e64f689624 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsTest.java
@@ -107,6 +107,18 @@ public class OrchestrationRequestsTest extends BaseTest {
.withBody(new String(Files.readAllBytes(Paths.get(
"src/test/resources/OrchestrationRequest/ActivityInstanceHistoryResponse.json"))))
.withStatus(HttpStatus.SC_OK)));
+ wireMockServer.stubFor(get(
+ ("/requestProcessingData/search/findBySoRequestIdAndIsDataInternalOrderByGroupingIdDesc?SO_REQUEST_ID=00032ab7-1a18-42e5-965d-8ea592502018&IS_INTERNAL_DATA=false"))
+ .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
+ .withBody(new String(Files.readAllBytes(Paths.get(
+ "src/test/resources/OrchestrationRequest/getRequestProcessingDataArray.json"))))
+ .withStatus(HttpStatus.SC_OK)));
+ wireMockServer.stubFor(get(
+ ("/requestProcessingData/search/findBySoRequestIdAndIsDataInternalOrderByGroupingIdDesc?SO_REQUEST_ID=00032ab7-3fb3-42e5-965d-8ea592502017&IS_INTERNAL_DATA=false"))
+ .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
+ .withBody(new String(Files.readAllBytes(Paths.get(
+ "src/test/resources/OrchestrationRequest/getRequestProcessingDataArray.json"))))
+ .withStatus(HttpStatus.SC_OK)));
}
@Test
@@ -117,6 +129,16 @@ public class OrchestrationRequestsTest extends BaseTest {
Request request = ORCHESTRATION_LIST.getRequestList().get(1).getRequest();
testResponse.setRequest(request);
+ testResponse.getRequest().setRequestProcessingData(new ArrayList<RequestProcessingData>());
+ RequestProcessingData e = new RequestProcessingData();
+ e.setGroupingId("7d2e8c07-4d10-456d-bddc-37abf38ca714");
+ e.setTag("pincFabricConfigRequest");
+ List<HashMap<String, String>> data = new ArrayList<HashMap<String, String>>();
+ HashMap<String, String> data1 = new HashMap<String, String>();
+ data1.put("requestAction", "assign");
+ data.add(data1);
+ e.setDataPairs(data);
+ testResponse.getRequest().getRequestProcessingData().add(e);
String testRequestId = request.getRequestId();
HttpHeaders headers = new HttpHeaders();
headers.set("Accept", MediaType.APPLICATION_JSON);
@@ -148,6 +170,16 @@ public class OrchestrationRequestsTest extends BaseTest {
Request request = ORCHESTRATION_LIST.getRequestList().get(8).getRequest();
testResponse.setRequest(request);
+ testResponse.getRequest().setRequestProcessingData(new ArrayList<RequestProcessingData>());
+ RequestProcessingData e = new RequestProcessingData();
+ e.setGroupingId("7d2e8c07-4d10-456d-bddc-37abf38ca714");
+ e.setTag("pincFabricConfigRequest");
+ List<HashMap<String, String>> data = new ArrayList<HashMap<String, String>>();
+ HashMap<String, String> data1 = new HashMap<String, String>();
+ data1.put("requestAction", "assign");
+ data.add(data1);
+ e.setDataPairs(data);
+ testResponse.getRequest().getRequestProcessingData().add(e);
String testRequestId = request.getRequestId();
HttpHeaders headers = new HttpHeaders();
headers.set("Accept", MediaType.APPLICATION_JSON);
@@ -184,6 +216,16 @@ public class OrchestrationRequestsTest extends BaseTest {
request.setCloudRequestData(cloudRequestData);
testResponse.setRequest(request);
String testRequestId = request.getRequestId();
+ testResponse.getRequest().setRequestProcessingData(new ArrayList<RequestProcessingData>());
+ RequestProcessingData e = new RequestProcessingData();
+ e.setGroupingId("7d2e8c07-4d10-456d-bddc-37abf38ca714");
+ e.setTag("pincFabricConfigRequest");
+ List<HashMap<String, String>> data = new ArrayList<HashMap<String, String>>();
+ HashMap<String, String> data1 = new HashMap<String, String>();
+ data1.put("requestAction", "assign");
+ data.add(data1);
+ e.setDataPairs(data);
+ testResponse.getRequest().getRequestProcessingData().add(e);
HttpHeaders headers = new HttpHeaders();
headers.set("Accept", MediaType.APPLICATION_JSON);
@@ -281,7 +323,6 @@ public class OrchestrationRequestsTest extends BaseTest {
public void testUnlockOrchestrationRequest() throws Exception {
setupTestUnlockOrchestrationRequest("0017f68c-eb2d-45bb-b7c7-ec31b37dc349", "UNLOCKED");
ObjectMapper mapper = new ObjectMapper();
- mapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, true);
String requestJSON =
new String(Files.readAllBytes(Paths.get("src/test/resources/OrchestrationRequest/Request.json")));
HttpHeaders headers = new HttpHeaders();
@@ -317,7 +358,6 @@ public class OrchestrationRequestsTest extends BaseTest {
public void testUnlockOrchestrationRequest_invalid_Json() throws Exception {
setupTestUnlockOrchestrationRequest_invalid_Json();
ObjectMapper mapper = new ObjectMapper();
- mapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, true);
String requestJSON =
new String(Files.readAllBytes(Paths.get("src/test/resources/OrchestrationRequest/Request.json")));
HttpHeaders headers = new HttpHeaders();
@@ -345,7 +385,7 @@ public class OrchestrationRequestsTest extends BaseTest {
actualRequestError = mapper.readValue(response.getBody(), RequestError.class);
assertEquals(Response.Status.NOT_FOUND.getStatusCode(), response.getStatusCode().value());
- assertThat(actualRequestError, sameBeanAs(expectedRequestError));
+ assertThat(expectedRequestError, sameBeanAs(actualRequestError));
}
@Test
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/RequestHandlerUtilsUnitTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/RequestHandlerUtilsUnitTest.java
index d4b0c3aad1..d0b16cffe6 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/RequestHandlerUtilsUnitTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/RequestHandlerUtilsUnitTest.java
@@ -25,10 +25,12 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThat;
import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.verify;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.sql.Timestamp;
+import java.util.HashMap;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
@@ -441,4 +443,28 @@ public class RequestHandlerUtilsUnitTest {
assertEquals(expected, result);
}
+ @Test
+ public void checkForDuplicateRequestsTest() throws ApiException {
+ InfraActiveRequests currentActiveReq = new InfraActiveRequests();
+ currentActiveReq.setAicCloudRegion("testRegion");
+ currentActiveReq.setRequestId("792a3158-d9a3-49fd-b3ac-ab09842d6a1a");
+ Action action = Action.createInstance;
+ String requestScope = ModelType.service.toString();
+
+ InfraActiveRequests duplicate = new InfraActiveRequests();
+
+ HashMap<String, String> instanceIdMap = new HashMap<String, String>();
+ String instanceName = "instanceName";
+
+ doReturn(duplicate).when(requestHandler).duplicateCheck(action, instanceIdMap, instanceName, requestScope,
+ currentActiveReq);
+ doReturn(true).when(requestHandler).camundaHistoryCheck(duplicate, currentActiveReq);
+ doNothing().when(requestHandler).buildErrorOnDuplicateRecord(currentActiveReq, action, instanceIdMap,
+ instanceName, requestScope, duplicate);
+
+ requestHandler.checkForDuplicateRequests(action, instanceIdMap, requestScope, currentActiveReq, instanceName);
+ verify(requestHandler).buildErrorOnDuplicateRecord(currentActiveReq, action, instanceIdMap, instanceName,
+ requestScope, duplicate);
+ }
+
}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstancesTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstancesTest.java
index 61654d18e4..39308058b5 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstancesTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstancesTest.java
@@ -86,7 +86,6 @@ import ch.qos.logback.classic.spi.ILoggingEvent;
public class ServiceInstancesTest extends BaseTest {
private final ObjectMapper mapper = new ObjectMapper();
- private ObjectMapper errorMapper = new ObjectMapper();
@Autowired
private ServiceInstances servInstances;
@@ -108,8 +107,6 @@ public class ServiceInstancesTest extends BaseTest {
@Before
public void beforeClass() {
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
- errorMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
- errorMapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, true);
// set headers
headers = new HttpHeaders();
headers.set(ONAPLogConstants.Headers.PARTNER_NAME, "test_name");
@@ -124,7 +121,7 @@ public class ServiceInstancesTest extends BaseTest {
} catch (MalformedURLException e) {
e.printStackTrace();
}
- wireMockServer.stubFor(post(urlMatching(".*/infraActiveRequests.*")).willReturn(aResponse()
+ wireMockServer.stubFor(post(urlMatching(".*/infraActiveRequests/")).willReturn(aResponse()
.withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).withStatus(HttpStatus.SC_OK)));
Mockito.doReturn(null).when(requestsDbClient).getInfraActiveRequestbyRequestId(Mockito.any());
}
@@ -907,7 +904,7 @@ public class ServiceInstancesTest extends BaseTest {
ResponseEntity<String> response = sendRequest(inputStream("/NoVnfResource.json"), uri, HttpMethod.POST);
assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), response.getStatusCode().value());
- RequestError realResponse = errorMapper.readValue(response.getBody(), RequestError.class);
+ RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class);
assertEquals("No valid vnfResource is specified", realResponse.getServiceException().getText());
}
@@ -950,6 +947,45 @@ public class ServiceInstancesTest extends BaseTest {
}
@Test
+ public void replaceVnfInstanceNoCloudConfig() throws IOException {
+ wireMockServer.stubFor(post(urlMatching(".*/infraActiveRequests/v1/getInfraActiveRequests.*"))
+ .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
+ .withBodyFile("infra/VnfLookup.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+ wireMockServer.stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB"))
+ .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+ wireMockServer.stubFor(get(urlMatching(
+ ".*/vnfResourceCustomization/search/findByModelCustomizationUUID[?]MODEL_CUSTOMIZATION_UUID=68dc9a92-214c-11e7-93ae-92361f002671"))
+ .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
+ .withBody(getWiremockResponseForCatalogdb(
+ "vnfResourceCustomization_ReplaceVnf_Response.json"))
+ .withStatus(org.apache.http.HttpStatus.SC_OK)));
+ wireMockServer.stubFor(get(urlMatching(".*/vnfResourceCustomization/1/vnfResources"))
+ .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
+ .withBody(getWiremockResponseForCatalogdb("vnfResources_ReplaceVnf_Response.json"))
+ .withStatus(org.apache.http.HttpStatus.SC_OK)));
+ wireMockServer.stubFor(get(urlMatching(
+ ".*/vnfRecipe/search/findFirstVnfRecipeByNfRoleAndAction[?]nfRole=GR-API-DEFAULT&action=replaceInstance"))
+ .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
+ .withBody(getWiremockResponseForCatalogdb("vnfRecipeReplaceInstance_Response.json"))
+ .withStatus(org.apache.http.HttpStatus.SC_OK)));
+ // expected response
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ requestReferences.setRequestSelfLink(createExpectedSelfLink("v7", "32807a28-1a14-4b88-b7b3-2950918aa76d"));
+ expectedResponse.setRequestReferences(requestReferences);
+ uri = servInstanceuri + "v7"
+ + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7968/vnfs/ff305d54-75b4-431b-adb2-eb6b9e5ff000/replace";
+ ResponseEntity<String> response =
+ sendRequest(inputStream("/ReplaceVnfNoCloudConfig.json"), uri, HttpMethod.POST, headers);
+
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));
+ }
+
+ @Test
public void replaceVnfRecreateInstance() throws IOException {
wireMockServer.stubFor(post(urlPathEqualTo("/mso/async/services/RecreateInfraVce"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
@@ -1340,7 +1376,7 @@ public class ServiceInstancesTest extends BaseTest {
sendRequest(inputStream("/VfModuleInvalid.json"), uri, HttpMethod.POST, headers);
assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), response.getStatusCode().value());
- RequestError realResponse = errorMapper.readValue(response.getBody(), RequestError.class);
+ RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class);
assertEquals("No valid vfModuleCustomization is specified", realResponse.getServiceException().getText());
}
@@ -1381,6 +1417,44 @@ public class ServiceInstancesTest extends BaseTest {
}
@Test
+ public void replaceVfModuleInstanceNoCloudConfigurationTest() throws IOException {
+ wireMockServer.stubFor(
+ get(urlPathEqualTo("/aai/v17/network/generic-vnfs/generic-vnf/ff305d54-75b4-431b-adb2-eb6b9e5ff000"))
+ .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
+ .withBodyFile("infra/Vnf.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+ wireMockServer.stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB"))
+ .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+ wireMockServer
+ .stubFor(get(urlMatching(".*/vfModule/search/findFirstVfModuleByModelInvariantUUIDAndModelVersion[?]"
+ + "modelInvariantUUID=78ca26d0-246d-11e7-93ae-92361f002671&modelVersion=2"))
+ .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
+ .withBody(getWiremockResponseForCatalogdb("vfModule_Response.json"))
+ .withStatus(org.apache.http.HttpStatus.SC_OK)));
+ wireMockServer.stubFor(get(urlMatching(
+ ".*/vnfComponentsRecipe/search/findFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction"
+ + "[?]vfModuleModelUUID=GR-API-DEFAULT&vnfComponentType=vfModule&action=replaceInstance"))
+ .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
+ .withBody(getWiremockResponseForCatalogdb(
+ "vnfComponentRecipeDeleteVfModule_Response.json"))
+ .withStatus(org.apache.http.HttpStatus.SC_OK)));
+ // expected response
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ requestReferences.setRequestSelfLink(createExpectedSelfLink("v7", "32807a28-1a14-4b88-b7b3-2950918aa76d"));
+ expectedResponse.setRequestReferences(requestReferences);
+ uri = servInstanceuri + "v7"
+ + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7968/vnfs/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vfModules/ff305d54-75b4-431b-adb2-eb6b9e5ff000/replace";
+ ResponseEntity<String> response =
+ sendRequest(inputStream("/ReplaceVfModuleNoCloudConfig.json"), uri, HttpMethod.POST, headers);
+
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));
+ }
+
+ @Test
public void updateVfModuleInstance() throws IOException {
wireMockServer.stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
@@ -1431,7 +1505,6 @@ public class ServiceInstancesTest extends BaseTest {
public void createVfModuleNoModelType() throws IOException {
InfraActiveRequests expectedRecord = new InfraActiveRequests();
expectedRecord.setRequestStatus("FAILED");
- expectedRecord.setAction("createInstance");
expectedRecord.setStatusMessage("Error parsing request: No valid modelType is specified");
expectedRecord.setProgress(100L);
expectedRecord.setSource("VID");
@@ -2144,7 +2217,7 @@ public class ServiceInstancesTest extends BaseTest {
sendRequest(inputStream("/ServiceInstanceDefault.json"), uri, HttpMethod.POST, headers);
assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
- RequestError realResponse = errorMapper.readValue(response.getBody(), RequestError.class);
+ RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class);
assertEquals("Request Failed due to BPEL error with HTTP Status = 202{\"instanceId\": \"1882939\"}",
realResponse.getServiceException().getText());
}
@@ -2179,7 +2252,7 @@ public class ServiceInstancesTest extends BaseTest {
sendRequest(inputStream("/ServiceInstanceDefault.json"), uri, HttpMethod.POST, headers);
assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatusCode().value());
- RequestError realResponse = errorMapper.readValue(response.getBody(), RequestError.class);
+ RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class);
assertEquals("Exception caught mapping Camunda JSON response to object",
realResponse.getServiceException().getText());
}
@@ -2212,7 +2285,7 @@ public class ServiceInstancesTest extends BaseTest {
sendRequest(inputStream("/ServiceInstanceDefault.json"), uri, HttpMethod.POST, headers);
assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
- RequestError realResponse = errorMapper.readValue(response.getBody(), RequestError.class);
+ RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class);
assertTrue(realResponse.getServiceException().getText()
.contains("<aetgt:ErrorMessage>Exception in create execution list 500"));
}
@@ -2380,7 +2453,7 @@ public class ServiceInstancesTest extends BaseTest {
sendRequest(inputStream("/ServiceInstanceDefault.json"), uri, HttpMethod.POST, headers);
assertEquals(Response.Status.NOT_ACCEPTABLE.getStatusCode(), response.getStatusCode().value());
- RequestError realResponse = errorMapper.readValue(response.getBody(), RequestError.class);
+ RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class);
assertEquals("Exception caught mapping Camunda JSON response to object",
realResponse.getServiceException().getText());
}
@@ -2396,7 +2469,7 @@ public class ServiceInstancesTest extends BaseTest {
sendRequest(inputStream("/ServiceInstanceDefault.json"), uri, HttpMethod.POST, headers);
assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatusCode().value());
- RequestError realResponse = errorMapper.readValue(response.getBody(), RequestError.class);
+ RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class);
assertEquals(
"Unable to check for duplicate instance due to error contacting requestDb: org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 Server Error",
realResponse.getServiceException().getText());
@@ -2419,7 +2492,7 @@ public class ServiceInstancesTest extends BaseTest {
sendRequest(inputStream("/ServiceInstanceDefault.json"), uri, HttpMethod.POST, headers);
assertEquals(Response.Status.CONFLICT.getStatusCode(), response.getStatusCode().value());
- RequestError realResponse = errorMapper.readValue(response.getBody(), RequestError.class);
+ RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class);
assertEquals(
"Error: Locked instance - This service (testService9) already has a request being worked with a status of UNLOCKED (RequestId - f0a35706-efc4-4e27-80ea-a995d7a2a40f). The existing request must finish or be cleaned up before proceeding.",
realResponse.getServiceException().getText());
@@ -2441,7 +2514,7 @@ public class ServiceInstancesTest extends BaseTest {
sendRequest(inputStream("/ServiceInstanceDefault.json"), uri, HttpMethod.POST, headers);
assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatusCode().value());
- RequestError realResponse = errorMapper.readValue(response.getBody(), RequestError.class);
+ RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class);
assertEquals(
"Unable to get process-instance history from Camunda for requestId: f0a35706-efc4-4e27-80ea-a995d7a2a40f due to error: org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 Server Error",
realResponse.getServiceException().getText());
@@ -2458,7 +2531,7 @@ public class ServiceInstancesTest extends BaseTest {
sendRequest(inputStream("/ServiceInstanceDefault.json"), uri, HttpMethod.POST, headers);
assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatusCode().value());
- RequestError realResponse = errorMapper.readValue(response.getBody(), RequestError.class);
+ RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class);
assertEquals(
"Unable to check for duplicate instance due to error contacting requestDb: org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 Server Error",
realResponse.getServiceException().getText());
@@ -2490,7 +2563,7 @@ public class ServiceInstancesTest extends BaseTest {
sendRequest(inputStream("/ServiceInstanceDefault.json"), uri, HttpMethod.POST, headers);
assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatusCode().value());
- RequestError realResponse = errorMapper.readValue(response.getBody(), RequestError.class);
+ RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class);
assertEquals(
"Unable to save instance to db due to error contacting requestDb: org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 Server Error",
realResponse.getServiceException().getText());
@@ -2510,7 +2583,7 @@ public class ServiceInstancesTest extends BaseTest {
sendRequest(inputStream("/ServiceInstancePortConfiguration.json"), uri, HttpMethod.POST, headers);
assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatusCode().value());
- RequestError realResponse = errorMapper.readValue(response.getBody(), RequestError.class);
+ RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class);
assertEquals(
"Unable to save instance to db due to error contacting requestDb: org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 Server Error",
realResponse.getServiceException().getText());
@@ -2527,7 +2600,7 @@ public class ServiceInstancesTest extends BaseTest {
sendRequest(inputStream("/ServiceInstanceParseFail.json"), uri, HttpMethod.POST, headers);
assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatusCode().value());
- RequestError realResponse = errorMapper.readValue(response.getBody(), RequestError.class);
+ RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class);
assertEquals(
"Unable to save instance to db due to error contacting requestDb: org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 Server Error",
realResponse.getServiceException().getText());
@@ -2632,7 +2705,7 @@ public class ServiceInstancesTest extends BaseTest {
ResponseEntity<String> response = sendRequest(null, uri, HttpMethod.DELETE);
// then
assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), response.getStatusCode().value());
- RequestError realResponse = errorMapper.readValue(response.getBody(), RequestError.class);
+ RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class);
assertEquals(realResponse.getServiceException().getText(), "No valid X-ONAP-RequestID header is specified");
}
@@ -2645,7 +2718,7 @@ public class ServiceInstancesTest extends BaseTest {
ResponseEntity<String> response = sendRequest(null, uri, HttpMethod.DELETE, noPartnerHeaders);
// then
assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), response.getStatusCode().value());
- RequestError realResponse = errorMapper.readValue(response.getBody(), RequestError.class);
+ RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class);
assertEquals(realResponse.getServiceException().getText(), "No valid X-ONAP-PartnerName header is specified");
}
@@ -2664,7 +2737,7 @@ public class ServiceInstancesTest extends BaseTest {
// then
assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), response.getStatusCode().value());
- RequestError realResponse = errorMapper.readValue(response.getBody(), RequestError.class);
+ RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class);
assertEquals(realResponse.getServiceException().getText(), "No valid X-RequestorID header is specified");
}
@@ -2752,7 +2825,7 @@ public class ServiceInstancesTest extends BaseTest {
ResponseEntity<String> response = sendRequest(inputStream("/UpdateNetwork.json"), uri, HttpMethod.PUT, headers);
assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), response.getStatusCode().value());
- RequestError realResponse = errorMapper.readValue(response.getBody(), RequestError.class);
+ RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class);
assertEquals(realResponse.getServiceException().getText(),
"No valid modelCustomizationId for networkResourceCustomization lookup is specified");
}
@@ -2934,5 +3007,20 @@ public class ServiceInstancesTest extends BaseTest {
Actions action = servInstances.handleReplaceInstance(Action.replaceInstance, sir);
assertEquals(Action.replaceInstanceRetainAssignments, action);
}
+
+ @Test
+ public void getCloudConfigurationAAIEntityNotFoundTest() throws IOException {
+ RequestError expectedResponse =
+ mapper.readValue(inputStream("/AAIEntityNotFoundResponse.json"), RequestError.class);
+ uri = servInstanceuri + "v7"
+ + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7968/vnfs/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vfModules/ff305d54-75b4-431b-adb2-eb6b9e5ff000/replace";
+ ResponseEntity<String> response =
+ sendRequest(inputStream("/ReplaceVfModuleNoCloudConfig.json"), uri, HttpMethod.POST, headers);
+
+ assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatusCode().value());
+ RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class);
+ assertThat(expectedResponse, sameBeanAs(realResponse));
+ }
+
}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstancesUnitTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstancesUnitTest.java
new file mode 100644
index 0000000000..5c3ac0f461
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstancesUnitTest.java
@@ -0,0 +1,100 @@
+package org.onap.so.apihandlerinfra;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.doReturn;
+import java.util.HashMap;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+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.apihandlerinfra.exceptions.ApiException;
+import org.onap.so.apihandlerinfra.infra.rest.BpmnRequestBuilder;
+import org.onap.so.apihandlerinfra.infra.rest.exception.CloudConfigurationNotFoundException;
+import org.onap.so.apihandlerinfra.vnfbeans.ModelType;
+import org.onap.so.db.request.beans.InfraActiveRequests;
+import org.onap.so.serviceinstancebeans.CloudConfiguration;
+
+@RunWith(MockitoJUnitRunner.class)
+public class ServiceInstancesUnitTest {
+
+ @Mock
+ private BpmnRequestBuilder bpmnRequestBuilder;
+
+ @Spy
+ @InjectMocks
+ private ServiceInstances serviceInstances;
+
+ @Rule
+ public ExpectedException thrown = ExpectedException.none();
+
+
+ @Test
+ public void getCloudConfigurationOnReplaceVnfTest() throws ApiException {
+ CloudConfiguration cloudConfiguration = new CloudConfiguration();
+ cloudConfiguration.setTenantId("tenantId");
+ cloudConfiguration.setLcpCloudRegionId("lcpCloudRegionId");
+ String requestScope = ModelType.vnf.toString();
+ HashMap<String, String> instanceIdMap = new HashMap<>();
+ instanceIdMap.put("vnfInstanceId", "17c10d8e-48f4-4ee6-b162-a801943df6d6");
+ InfraActiveRequests currentActiveRequest = new InfraActiveRequests();
+
+ doReturn(cloudConfiguration).when(bpmnRequestBuilder)
+ .mapCloudConfigurationVnf("17c10d8e-48f4-4ee6-b162-a801943df6d6");
+ CloudConfiguration result =
+ serviceInstances.getCloudConfigurationOnReplace(requestScope, instanceIdMap, currentActiveRequest);
+
+ assertEquals(cloudConfiguration, result);
+ }
+
+ @Test
+ public void getCloudConfigurationOnReplaceVfModuleTest() throws ApiException {
+ CloudConfiguration cloudConfiguration = new CloudConfiguration();
+ cloudConfiguration.setTenantId("tenantId");
+ cloudConfiguration.setLcpCloudRegionId("lcpCloudRegionId");
+ String requestScope = ModelType.vfModule.toString();
+ HashMap<String, String> instanceIdMap = new HashMap<>();
+ instanceIdMap.put("vnfInstanceId", "17c10d8e-48f4-4ee6-b162-a801943df6d6");
+ instanceIdMap.put("vfModuleInstanceId", "17c10d8e-48f4-4ee6-b162-a801943df6d8");
+ InfraActiveRequests currentActiveRequest = new InfraActiveRequests();
+
+ doReturn(cloudConfiguration).when(bpmnRequestBuilder).getCloudConfigurationVfModuleReplace(
+ "17c10d8e-48f4-4ee6-b162-a801943df6d6", "17c10d8e-48f4-4ee6-b162-a801943df6d8");
+ CloudConfiguration result =
+ serviceInstances.getCloudConfigurationOnReplace(requestScope, instanceIdMap, currentActiveRequest);
+
+ assertEquals(cloudConfiguration, result);
+ }
+
+ @Test
+ public void getCloudConfigurationReturnsNullTest() throws ApiException {
+ String requestScope = ModelType.vfModule.toString();
+ HashMap<String, String> instanceIdMap = new HashMap<>();
+ instanceIdMap.put("vnfInstanceId", "17c10d8e-48f4-4ee6-b162-a801943df6d6");
+ instanceIdMap.put("vfModuleInstanceId", "17c10d8e-48f4-4ee6-b162-a801943df6d8");
+ InfraActiveRequests currentActiveRequest = new InfraActiveRequests();
+
+ doReturn(null).when(bpmnRequestBuilder).getCloudConfigurationVfModuleReplace(
+ "17c10d8e-48f4-4ee6-b162-a801943df6d6", "17c10d8e-48f4-4ee6-b162-a801943df6d8");
+ thrown.expect(CloudConfigurationNotFoundException.class);
+ thrown.expectMessage("CloudConfiguration not found during autofill for replace request.");
+
+ serviceInstances.getCloudConfigurationOnReplace(requestScope, instanceIdMap, currentActiveRequest);
+ }
+
+ @Test
+ public void setCloudConfigurationCurrentActiveRequestTest() {
+ CloudConfiguration cloudConfiguration = new CloudConfiguration();
+ cloudConfiguration.setTenantId("tenantId");
+ cloudConfiguration.setLcpCloudRegionId("lcpCloudRegionId");
+
+ InfraActiveRequests currentActiveRequest = new InfraActiveRequests();
+ serviceInstances.setCloudConfigurationCurrentActiveRequest(cloudConfiguration, currentActiveRequest);
+
+ assertEquals("tenantId", currentActiveRequest.getTenantId());
+ assertEquals("lcpCloudRegionId", currentActiveRequest.getAicCloudRegion());
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/BpmnRequestBuilderTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/BpmnRequestBuilderTest.java
index f73da49e0d..faac11715a 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/BpmnRequestBuilderTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/BpmnRequestBuilderTest.java
@@ -22,9 +22,12 @@ package org.onap.so.apihandlerinfra.infra.rest;
import static com.shazam.shazamcrest.MatcherAssert.assertThat;
import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
+import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.spy;
import java.io.File;
+import java.util.HashMap;
+import java.util.Map;
import java.util.Optional;
import org.junit.Before;
import org.junit.Rule;
@@ -43,8 +46,11 @@ import org.onap.so.client.aai.AAIResourcesClient;
import org.onap.so.client.aai.entities.AAIResultWrapper;
import org.onap.so.client.aai.entities.uri.AAIUriFactory;
import org.onap.so.client.graphinventory.GraphInventoryCommonObjectMapperProvider;
+import org.onap.so.constants.Status;
import org.onap.so.db.request.client.RequestsDbClient;
+import org.onap.so.serviceinstancebeans.CloudConfiguration;
import org.onap.so.serviceinstancebeans.ModelType;
+import org.onap.so.serviceinstancebeans.RequestDetails;
import org.onap.so.serviceinstancebeans.ServiceInstancesRequest;
import com.fasterxml.jackson.databind.ObjectMapper;
@@ -143,5 +149,48 @@ public class BpmnRequestBuilderTest {
assertThat(actualRequest, sameBeanAs(expectedRequest));
}
+ @Test
+ public void test_getCloudConfigurationVfModuleReplace() throws Exception {
+ String vnfId = "vnfId";
+ String vfModuleId = "vfModuleId";
+
+ GenericVnf vnf = provider.getMapper().readValue(new File(RESOURCE_PATH + "Vnf.json"), GenericVnf.class);
+
+ doReturn(Optional.of(vnf)).when(aaiResourcesClient).get(GenericVnf.class,
+ AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId));
+
+ CloudConfiguration result = reqBuilder.getCloudConfigurationVfModuleReplace(vnfId, vfModuleId);
+ assertEquals("0422ffb57ba042c0800a29dc85ca70f8", result.getTenantId());
+ assertEquals("cloudOwner", result.getCloudOwner());
+ assertEquals("regionOne", result.getLcpCloudRegionId());
+ }
+
+ @Test
+ public void test_mapCloudConfigurationVnf() throws Exception {
+ String vnfId = "6fb01019-c3c4-41fe-b307-d1c56850b687";
+ Map<String, String[]> filters = new HashMap<>();
+ filters.put("vnfId", new String[] {"EQ", vnfId});
+ filters.put("requestStatus", new String[] {"EQ", Status.COMPLETE.toString()});
+ filters.put("action", new String[] {"EQ", "createInstance"});
+
+ ServiceInstancesRequest serviceRequest = new ServiceInstancesRequest();
+ CloudConfiguration cloudConfiguration = new CloudConfiguration();
+ RequestDetails requestDetails = new RequestDetails();
+ cloudConfiguration.setCloudOwner("cloudOwner");
+ cloudConfiguration.setTenantId("tenantId");
+ cloudConfiguration.setLcpCloudRegionId("lcpCloudRegionId");
+ requestDetails.setCloudConfiguration(cloudConfiguration);
+ serviceRequest.setRequestDetails(requestDetails);
+
+ doReturn(filters).when(reqBuilder).createQueryRequest("vnfId", vnfId);
+ doReturn(Optional.of(serviceRequest)).when(reqBuilder).findServiceInstanceRequest(filters);
+
+
+ CloudConfiguration result = reqBuilder.mapCloudConfigurationVnf(vnfId);
+ assertEquals("tenantId", result.getTenantId());
+ assertEquals("cloudOwner", result.getCloudOwner());
+ assertEquals("lcpCloudRegionId", result.getLcpCloudRegionId());
+ }
+
}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/handler/NetworkRestHandlerTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/handler/NetworkRestHandlerTest.java
index 59308215ac..0ae963ab15 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/handler/NetworkRestHandlerTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/handler/NetworkRestHandlerTest.java
@@ -108,7 +108,6 @@ public class NetworkRestHandlerTest {
public void test_createInfraActiveRequestForDelete() throws Exception {
InfraActiveRequests expected = new InfraActiveRequests();
expected.setRequestAction(Action.deleteInstance.toString());
- expected.setAction(Action.deleteInstance.toString());
expected.setServiceInstanceId("serviceInstanceId");
expected.setNetworkId("networkId");
expected.setRequestId("requestId");
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/handler/ServiceInstanceRestHandlerTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/handler/ServiceInstanceRestHandlerTest.java
index c1e6347943..602eb51f41 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/handler/ServiceInstanceRestHandlerTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/handler/ServiceInstanceRestHandlerTest.java
@@ -154,7 +154,6 @@ public class ServiceInstanceRestHandlerTest {
public void test_createInfraActiveRequestForDelete() throws Exception {
InfraActiveRequests expected = new InfraActiveRequests();
expected.setRequestAction(Action.deleteInstance.toString());
- expected.setAction(Action.deleteInstance.toString());
expected.setServiceInstanceId("serviceInstanceId");
expected.setRequestId("requestId");
expected.setRequestorId("userId");
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/handler/VfModuleRestHandlerTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/handler/VfModuleRestHandlerTest.java
index 7d146791fe..ca81124833 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/handler/VfModuleRestHandlerTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/handler/VfModuleRestHandlerTest.java
@@ -154,7 +154,6 @@ public class VfModuleRestHandlerTest {
public void test_createInfraActiveRequestForDelete() throws Exception {
InfraActiveRequests expected = new InfraActiveRequests();
expected.setRequestAction(Action.deleteInstance.toString());
- expected.setAction(Action.deleteInstance.toString());
expected.setServiceInstanceId("serviceInstanceId");
expected.setVnfId("vnfId");
expected.setVfModuleId("vfModuleId");
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/handler/VnfRestHandlerTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/handler/VnfRestHandlerTest.java
index 03725ec85b..3ae3abb16d 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/handler/VnfRestHandlerTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/handler/VnfRestHandlerTest.java
@@ -119,7 +119,6 @@ public class VnfRestHandlerTest {
public void test_createInfraActiveRequestForDelete() throws Exception {
InfraActiveRequests expected = new InfraActiveRequests();
expected.setRequestAction(Action.deleteInstance.toString());
- expected.setAction(Action.deleteInstance.toString());
expected.setServiceInstanceId("serviceInstanceId");
expected.setVnfId("vnfId");
expected.setRequestId("requestId");
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/handler/VolumeRestHandlerTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/handler/VolumeRestHandlerTest.java
index efa27743ef..1315f13892 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/handler/VolumeRestHandlerTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/handler/VolumeRestHandlerTest.java
@@ -109,7 +109,6 @@ public class VolumeRestHandlerTest {
public void test_createInfraActiveRequestForDelete() throws Exception {
InfraActiveRequests expected = new InfraActiveRequests();
expected.setRequestAction(Action.deleteInstance.toString());
- expected.setAction(Action.deleteInstance.toString());
expected.setServiceInstanceId("serviceInstanceId");
expected.setVnfId("vnfId");
expected.setVolumeGroupId("volumeGroupId");
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/CloudOrchestrationTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/CloudOrchestrationTest.java
index a74c11c08b..71784fa286 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/CloudOrchestrationTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/CloudOrchestrationTest.java
@@ -262,7 +262,6 @@ public class CloudOrchestrationTest extends BaseTest {
iar.setRequestId("requestId");
iar.setOperationalEnvName("myVnfOpEnv");
iar.setRequestStatus(Status.IN_PROGRESS.toString());
- iar.setAction(Action.create.toString());
iar.setRequestAction(Action.create.toString());
iar.setRequestScope("UNKNOWN");
// iarRepo.saveAndFlush(iar);
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/CloudResourcesOrchestrationTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/CloudResourcesOrchestrationTest.java
index 5f12060059..1917ee592f 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/CloudResourcesOrchestrationTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/CloudResourcesOrchestrationTest.java
@@ -271,7 +271,6 @@ public class CloudResourcesOrchestrationTest extends BaseTest {
InfraActiveRequests iar = new InfraActiveRequests();
iar.setRequestId("requestId-getOpEnvFilterEx1");
iar.setRequestScope("requestScope");
- iar.setRequestType("requestType");
iar.setOperationalEnvId("operationalEnvironmentId");
iar.setOperationalEnvName("operationalEnvName");
iar.setRequestorId("xxxxxx");
@@ -296,7 +295,6 @@ public class CloudResourcesOrchestrationTest extends BaseTest {
InfraActiveRequests iar = new InfraActiveRequests();
iar.setRequestId("requestIdFilterException2");
iar.setRequestScope("requestScope");
- iar.setRequestType("requestType");
iar.setOperationalEnvId("operationalEnvId");
iar.setOperationalEnvName("operationalEnvName");
iar.setRequestorId("xxxxxx");
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/CreateEcompOperationalEnvironmentTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/CreateEcompOperationalEnvironmentTest.java
index 3114f91096..8d8f4969d7 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/CreateEcompOperationalEnvironmentTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/CreateEcompOperationalEnvironmentTest.java
@@ -95,7 +95,7 @@ public class CreateEcompOperationalEnvironmentTest extends BaseTest {
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBody(mapper.writeValueAsString(iar)).withStatus(HttpStatus.SC_OK)));
wireMockServer.stubFor(post(urlPathEqualTo("/infraActiveRequests/")).withRequestBody(containing(
- "{\"requestId\":\"123\",\"clientRequestId\":null,\"action\":null,\"requestStatus\":\"COMPLETE\",\"statusMessage\":\"SUCCESSFUL, operationalEnvironmentId - operationalEnvId; Success Message: SUCCESSFULLY Created ECOMP OperationalEnvironment.\",\"rollbackStatusMessage\":null,\"flowStatus\":null,\"retryStatusMessage\":null,\"progress\":100"))
+ "{\"requestId\":\"123\",\"requestStatus\":\"COMPLETE\",\"statusMessage\":\"SUCCESSFUL, operationalEnvironmentId - operationalEnvId; Success Message: SUCCESSFULLY Created ECOMP OperationalEnvironment.\",\"progress\":100"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withStatus(HttpStatus.SC_OK)));
@@ -127,7 +127,7 @@ public class CreateEcompOperationalEnvironmentTest extends BaseTest {
.withBody(mapper.writeValueAsString(iar)).withStatus(HttpStatus.SC_OK)));
wireMockServer.stubFor(post(urlPathEqualTo("/infraActiveRequests/"))
.withRequestBody(containing("{\"requestId\":\"" + uuid
- + "\",\"clientRequestId\":null,\"action\":null,\"requestStatus\":\"FAILED\",\"statusMessage\":\"FAILURE, operationalEnvironmentId - operationalEnvId; Error message:"))
+ + "\",\"requestStatus\":\"FAILED\",\"statusMessage\":\"FAILURE, operationalEnvironmentId - operationalEnvId; Error message:"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withStatus(HttpStatus.SC_OK)));
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/CreateVnfOperationalEnvironmentTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/CreateVnfOperationalEnvironmentTest.java
index ebed4fa16b..6c00f8db27 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/CreateVnfOperationalEnvironmentTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/CreateVnfOperationalEnvironmentTest.java
@@ -151,7 +151,7 @@ public class CreateVnfOperationalEnvironmentTest extends BaseTest {
ObjectMapper mapper = new ObjectMapper();
wireMockServer.stubFor(post(urlPathEqualTo("/infraActiveRequests/"))
.withRequestBody(containing("{\"requestId\":\"" + requestId
- + "\",\"clientRequestId\":null,\"action\":null,\"requestStatus\":\"COMPLETE\",\"statusMessage\":\"SUCCESSFUL"))
+ + "\",\"requestStatus\":\"COMPLETE\",\"statusMessage\":\"SUCCESSFUL"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withStatus(HttpStatus.SC_OK)));
@@ -188,7 +188,7 @@ public class CreateVnfOperationalEnvironmentTest extends BaseTest {
ObjectMapper mapper = new ObjectMapper();
wireMockServer.stubFor(post(urlPathEqualTo("/infraActiveRequests/"))
.withRequestBody(containing("{\"requestId\":\"" + requestId
- + "\",\"clientRequestId\":null,\"action\":null,\"requestStatus\":\"COMPLETE\",\"statusMessage\":\"SUCCESSFUL"))
+ + "\",\"requestStatus\":\"COMPLETE\",\"statusMessage\":\"SUCCESSFUL"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withStatus(HttpStatus.SC_OK)));
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/DeactivateVnfOperationalEnvironmentTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/DeactivateVnfOperationalEnvironmentTest.java
index 16738e9799..9911bb8cb8 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/DeactivateVnfOperationalEnvironmentTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/DeactivateVnfOperationalEnvironmentTest.java
@@ -64,7 +64,7 @@ public class DeactivateVnfOperationalEnvironmentTest extends BaseTest {
public void init() {
wireMockServer.stubFor(post(urlPathEqualTo("/infraActiveRequests/"))
.withRequestBody(containing("{\"requestId\":\"" + requestId
- + "\",\"clientRequestId\":null,\"action\":null,\"requestStatus\":\"COMPLETE\",\"statusMessage\":\"SUCCESSFUL"))
+ + "\",\"requestStatus\":\"COMPLETE\",\"statusMessage\":\"SUCCESSFUL"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withStatus(HttpStatus.SC_OK)));
}
@@ -129,7 +129,7 @@ public class DeactivateVnfOperationalEnvironmentTest extends BaseTest {
.withBody(mapper.writeValueAsString(iar)).withStatus(HttpStatus.SC_OK)));
wireMockServer.stubFor(post(urlPathEqualTo("/infraActiveRequests/"))
.withRequestBody(containing("{\"requestId\":\"" + requestId
- + "\",\"clientRequestId\":null,\"action\":null,\"requestStatus\":\"FAILED\",\"statusMessage\":\"FAILURE"))
+ + "\",\"requestStatus\":\"FAILED\",\"statusMessage\":\"FAILURE"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withStatus(HttpStatus.SC_OK)));
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/InfraActiveRequestsReset.sql b/mso-api-handlers/mso-api-handler-infra/src/test/resources/InfraActiveRequestsReset.sql
index d5575804ae..f5373a1f15 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/InfraActiveRequestsReset.sql
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/InfraActiveRequestsReset.sql
@@ -1,16 +1,17 @@
-INSERT INTO requestdb.infra_active_requests(REQUEST_ID, CLIENT_REQUEST_ID, ACTION, REQUEST_STATUS, STATUS_MESSAGE, PROGRESS, START_TIME, END_TIME, SOURCE, VNF_ID, VNF_NAME, VNF_TYPE, SERVICE_TYPE, AIC_NODE_CLLI, TENANT_ID, PROV_STATUS, VNF_PARAMS, VNF_OUTPUTS, REQUEST_BODY, RESPONSE_BODY, LAST_MODIFIED_BY, MODIFY_TIME, REQUEST_TYPE, VOLUME_GROUP_ID, VOLUME_GROUP_NAME, VF_MODULE_ID, VF_MODULE_NAME, VF_MODULE_MODEL_NAME, AAI_SERVICE_ID, CLOUD_REGION, CALLBACK_URL, CORRELATOR, NETWORK_ID, NETWORK_NAME, NETWORK_TYPE, REQUEST_SCOPE, REQUEST_ACTION, SERVICE_INSTANCE_ID, SERVICE_INSTANCE_NAME, REQUESTOR_ID, CONFIGURATION_ID, CONFIGURATION_NAME, OPERATIONAL_ENV_ID, OPERATIONAL_ENV_NAME, REQUEST_URL) VALUES
-('00032ab7-3fb3-42e5-965d-8ea592502017', '00032ab7-3fb3-42e5-965d-8ea592502016', 'deleteInstance', 'COMPLETE', 'Vf Module has been deleted successfully.', '100', '2016-12-22 18:59:54', '2016-12-22 19:00:28', 'VID', 'b92f60c8-8de3-46c1-8dc1-e4390ac2b005', null, null, null, null, '6accefef3cb442ff9e644d589fb04107', null, null, null, '{"modelInfo":{"modelType":"vfModule","modelName":"test::base::module-0"},"requestInfo":{"source":"VID"},"cloudConfiguration":{"tenantId":"6accefef3cb442ff9e644d589fb04107","lcpCloudRegionId":"n6"}}', null, 'BPMN', '2016-12-22 19:00:28', null, null, null, 'c7d527b1-7a91-49fd-b97d-1c8c0f4a7992', null, 'test::base::module-0', null, 'n6', null, null, null, null, null, 'vfModule', 'deleteInstance', 'e3b5744d-2ad1-4cdd-8390-c999a38829bc', null, null, null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
-('00032ab7-na18-42e5-965d-8ea592502018', '00032ab7-fake-42e5-965d-8ea592502018', 'deleteInstance', 'PENDING', 'Vf Module deletion pending.', '0', '2016-12-22 18:59:54', '2016-12-22 19:00:28', 'VID', 'b92f60c8-8de3-46c1-8dc1-e4390ac2b005', null, null, null, null, '6accefef3cb442ff9e644d589fb04107', null, null, null, '{"requestDetails": {"modelInfo":{"modelType":"vfModule","modelName":"test::base::module-0"},"requestInfo":{"source":"VID"},"cloudConfiguration":{"tenantId":"6accefef3cb442ff9e644d589fb04107","lcpCloudRegionId":"n6"}}}', null, 'BPMN', '2016-12-22 19:00:28', null, null, null, 'c7d527b1-7a91-49fd-b97d-1c8c0f4a7992', null, 'test::base::module-0', null, 'n6', null, null, null, null, null, 'vfModule', 'deleteInstance', 'e3b5744d-2ad1-4cdd-8390-c999a38829bc', null, null, null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
-('00093944-bf16-4373-ab9a-3adfe730ff2d', null, 'createInstance', 'FAILED', 'Error: Locked instance - This service (MSODEV_1707_SI_v10_011-4) already has a request being worked with a status of IN_PROGRESS (RequestId - 278e83b1-4f9f-450e-9e7d-3700a6ed22f4). The existing request must finish or be cleaned up before proceeding.', '100', '2017-07-11 18:33:26', '2017-07-11 18:33:26', 'VID', null, null, null, null, null, '19123c2924c648eb8e42a3c1f14b7682', null, null, null, '{"modelInfo":{"modelInvariantId":"9647dfc4-2083-11e7-93ae-92361f002671","modelType":"service","modelName":"Infra_v10_Service","modelVersion":"1.0","modelVersionId":"5df8b6de-2083-11e7-93ae-92361f002671"},"requestInfo":{"source":"VID","instanceName":"MSODEV_1707_SI_v10_011-4","suppressRollback":false,"requestorId":"xxxxxx"},"subscriberInfo":{"globalSubscriberId":"MSO_1610_dev","subscriberName":"MSO_1610_dev"},"cloudConfiguration":{"tenantId":"19123c2924c648eb8e42a3c1f14b7682","lcpCloudRegionId":"n6"},"requestParameters":{"subscriptionServiceType":"MSO-dev-service-type","userParams":[{"name":"someUserParam","value":"someValue"}],"aLaCarte":true,"autoBuildVfModules":false,"cascadeDelete":false,"usePreload":true}}', null, 'APIH', null, null, null, null, null, null, null, null, 'n6', null, null, null, null, null, 'service', 'createInstance', null, 'MSODEV_1707_SI_v10_011-4', 'xxxxxx', null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
-('001619d2-a297-4a4b-a9f5-e2823c88458f', '001619d2-a297-4a4b-a9f5-e2823c88458f', 'CREATE_VF_MODULE', 'COMPLETE', 'COMPLETED', '100', '2016-07-01 14:11:42', '2017-05-02 16:03:34', 'PORTAL', null, 'test-vscp', 'elena_test21', null, null, '381b9ff6c75e4625b7a4182f90fc68d3', null, null, null, '{"requestDetails": {"modelInfo":{"modelType":"vfModule","modelName":"test::base::module-0"},"requestInfo":{"source":"VID"},"cloudConfiguration":{"tenantId":"6accefef3cb442ff9e644d589fb04107","lcpCloudRegionId":"n6"}}}', 'NONE', 'RDBTEST', '2016-07-01 14:11:42', 'VNF', null, null, null, 'MODULENAME1', 'moduleModelName', 'a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb', 'mtn9', null, null, null, null, null, 'vfModule', 'createInstance', null, null, null, null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
-('5ffbabd6-b793-4377-a1ab-082670fbc7ac', '5ffbabd6-b793-4377-a1ab-082670fbc7ac', 'deleteInstance', 'PENDING', 'Vf Module deletion pending.', '0', '2016-12-22 18:59:54', '2016-12-22 19:00:28', 'VID', 'b92f60c8-8de3-46c1-8dc1-e4390ac2b005', null, null, null, null, '6accefef3cb442ff9e644d589fb04107', null, null, null, '{"requestDetails": {"modelInfo": {"modelType": "vfModule","modelName": "test::base::module-0","modelVersionId": "20c4431c-246d-11e7-93ae-92361f002671","modelInvariantId": "78ca26d0-246d-11e7-93ae-92361f002671","modelVersion": "2","modelCustomizationId": "cb82ffd8-252a-11e7-93ae-92361f002671"},"cloudConfiguration": {"lcpCloudRegionId": "n6","tenantId": "0422ffb57ba042c0800a29dc85ca70f8"},"requestInfo": {"instanceName": "MSO-DEV-VF-1806BB-v10-base-it2-1","source": "VID","suppressRollback": false,"requestorId": "xxxxxx"},"relatedInstanceList": [{"relatedInstance": {"instanceId": "76fa8849-4c98-473f-b431-2590b192a653","modelInfo": {"modelType": "service","modelName": "Infra_v10_Service","modelVersionId": "5df8b6de-2083-11e7-93ae-92361f002671","modelInvariantId": "9647dfc4-2083-11e7-93ae-92361f002671","modelVersion": "1.0"}}},{"relatedInstance": {"instanceId": "d57970e1-5075-48a5-ac5e-75f2d6e10f4c","modelInfo": {"modelType": "vnf","modelName": "v10","modelVersionId": "ff2ae348-214a-11e7-93ae-92361f002671","modelInvariantId": "2fff5b20-214b-11e7-93ae-92361f002671","modelVersion": "1.0","modelCustomizationId": "68dc9a92-214c-11e7-93ae-92361f002671","modelCustomizationName": "v10 1"}}}],"requestParameters": {"usePreload": true,"userParams": []}}}', null, 'BPMN', '2016-12-22 19:00:28', null, null, null, 'c7d527b1-7a91-49fd-b97d-1c8c0f4a7992', null, 'test::base::module-0', null, 'n6', null, null, null, null, null, 'vfModule', 'deleteInstance', 'e3b5744d-2ad1-4cdd-8390-c999a38829bc', null, null, null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances');
-INSERT INTO requestdb.infra_active_requests(REQUEST_ID, CLIENT_REQUEST_ID, ACTION, REQUEST_STATUS, STATUS_MESSAGE, PROGRESS, START_TIME, END_TIME, SOURCE, VNF_ID, VNF_NAME, VNF_TYPE, SERVICE_TYPE, AIC_NODE_CLLI, TENANT_ID, PROV_STATUS, VNF_PARAMS, VNF_OUTPUTS, REQUEST_BODY, RESPONSE_BODY, LAST_MODIFIED_BY, MODIFY_TIME, REQUEST_TYPE, VOLUME_GROUP_ID, VOLUME_GROUP_NAME, VF_MODULE_ID, VF_MODULE_NAME, VF_MODULE_MODEL_NAME, AAI_SERVICE_ID, CLOUD_REGION, CALLBACK_URL, CORRELATOR, NETWORK_ID, NETWORK_NAME, NETWORK_TYPE, REQUEST_SCOPE, REQUEST_ACTION, SERVICE_INSTANCE_ID, SERVICE_INSTANCE_NAME, REQUESTOR_ID, CONFIGURATION_ID, CONFIGURATION_NAME, OPERATIONAL_ENV_ID, OPERATIONAL_ENV_NAME, REQUEST_URL) VALUES
-('00164b9e-784d-48a8-8973-bbad6ef818ed', null, 'createInstance', 'COMPLETE', 'Service Instance was created successfully.', '100', '2017-09-28 12:45:51', '2017-09-28 12:45:53', 'VID', null, null, null, null, null, '19123c2924c648eb8e42a3c1f14b7682', null, null, null, '{"modelInfo":{"modelCustomizationName":null,"modelInvariantId":"52b49b5d-3086-4ffd-b5e6-1b1e5e7e062f","modelType":"service","modelNameVersionId":null,"modelName":"MSO Test Network","modelVersion":"1.0","modelCustomizationUuid":null,"modelVersionId":"aed5a5b7-20d3-44f7-90a3-ddbd16f14d1e","modelCustomizationId":null,"modelUuid":null,"modelInvariantUuid":null,"modelInstanceName":null},"requestInfo":{"billingAccountNumber":null,"callbackUrl":null,"correlator":null,"orderNumber":null,"productFamilyId":null,"orderVersion":null,"source":"VID","instanceName":"DEV-n6-3100-0927-1","suppressRollback":false,"requestorId":"xxxxxx"},"relatedInstanceList":null,"subscriberInfo":{"globalSubscriberId":"MSO_1610_dev","subscriberName":"MSO_1610_dev"},"cloudConfiguration":{"aicNodeClli":null,"tenantId":"19123c2924c648eb8e42a3c1f14b7682","lcpCloudRegionId":"n6"},"requestParameters":{"subscriptionServiceType":"MSO-dev-service-type","userParams":[{"name":"someUserParam","value":"someValue"}],"aLaCarte":true,"autoBuildVfModules":false,"cascadeDelete":false,"usePreload":true},"project":null,"owningEntity":null,"platform":null,"lineOfBusiness":null}', null, 'CreateGenericALaCarteServiceInstance', '2017-09-28 12:45:52', null, null, null, null, null, null, null, 'n6', null, null, null, null, null, 'service', 'createInstance', 'b2f59173-b7e5-4e0f-8440-232fd601b865', 'DEV-n6-3100-0927-1', 'xxxxxx', null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
-('00173cc9-5ce2-4673-a810-f87fefb2829e', null, 'createInstance', 'FAILED', 'Error parsing request. No valid instanceName is specified', '100', '2017-04-14 21:08:46', '2017-04-14 21:08:46', 'VID', null, null, null, null, null, 'a259ae7b7c3f493cb3d91f95a7c18149', null, null, null, '{"modelInfo":{"modelInvariantId":"ff6163d4-7214-459e-9f76-507b4eb00f51","modelType":"service","modelName":"ConstraintsSrvcVID","modelVersion":"2.0","modelVersionId":"722d256c-a374-4fba-a14f-a59b76bb7656"},"requestInfo":{"productFamilyId":"LRSI-OSPF","source":"VID","requestorId":"xxxxxx"},"subscriberInfo":{"globalSubscriberId":"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"},"cloudConfiguration":{"tenantId":"a259ae7b7c3f493cb3d91f95a7c18149","lcpCloudRegionId":"mtn16"},"requestParameters":{"subscriptionServiceType":"Mobility","userParams":[{"name":"neutronport6_name","value":"8"},{"name":"neutronnet5_network_name","value":"8"},{"name":"contrailv2vlansubinterface3_name","value":"false"}]}}', null, 'APIH', null, null, null, null, null, null, null, null, 'mtn16', null, null, null, null, null, 'service', 'createInstance', null, null, null, null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
-('0017f68c-eb2d-45bb-b7c7-ec31b37dc349', null, 'activateInstance', 'UNLOCKED', null, '20', '2017-09-26 16:09:29', null, 'VID', null, null, null, null, null, null, null, null, null, '{"modelInfo":{"modelCustomizationName":null,"modelInvariantId":"1587cf0e-f12f-478d-8530-5c55ac578c39","modelType":"configuration","modelNameVersionId":null,"modelName":null,"modelVersion":null,"modelCustomizationUuid":null,"modelVersionId":"36a3a8ea-49a6-4ac8-b06c-89a545444455","modelCustomizationId":"68dc9a92-214c-11e7-93ae-92361f002671","modelUuid":null,"modelInvariantUuid":null,"modelInstanceName":null},"requestInfo":{"billingAccountNumber":null,"callbackUrl":null,"correlator":null,"orderNumber":null,"productFamilyId":null,"orderVersion":null,"source":"VID","instanceName":null,"suppressRollback":false,"requestorId":"xxxxxx"},"relatedInstanceList":[{"relatedInstance":{"instanceName":null,"instanceId":"9e15a443-af65-4f05-9000-47ae495e937d","modelInfo":{"modelCustomizationName":null,"modelInvariantId":"de19ae10-9a25-11e7-abc4-cec278b6b50a","modelType":"service","modelNameVersionId":null,"modelName":"Infra_Configuration_Service","modelVersion":"1.0","modelCustomizationUuid":null,"modelVersionId":"ee938612-9a25-11e7-abc4-cec278b6b50a","modelCustomizationId":null,"modelUuid":null,"modelInvariantUuid":null,"modelInstanceName":null},"instanceDirection":null}}],"subscriberInfo":null,"cloudConfiguration":{"aicNodeClli":null,"tenantId":null,"lcpCloudRegionId":"n6"},"requestParameters":{"subscriptionServiceType":null,"userParams":[],"aLaCarte":false,"autoBuildVfModules":false,"cascadeDelete":false,"usePreload":true},"project":null,"owningEntity":null,"platform":null,"lineOfBusiness":null}', null, 'APIH', '2017-09-26 16:09:29', null, null, null, null, null, null, null, 'n6', null, null, null, null, null, 'configuration', 'activateInstance', '9e15a443-af65-4f05-9000-47ae495e937d', null, 'xxxxxx', '26ef7f15-57bb-48df-8170-e59edc26234c', null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
-('0017f68c-eb2d-45bb-b7c7-ec31b37dc350', null, 'createInstance', 'IN_PROGRESS', 'Error parsing request.
- No valid instanceName is specified', null, '2017-04-14 21:08:46', '2017-04-14 21:08:46', 'VID',
- '1882938', null, null, null, null, 'a259ae7b7c3f493cb3d91f95a7c18149', null, null, null,
- '{"serviceInstanceId":"1882939","vnfInstanceId":"1882938","networkInstanceId":"1882937","volumeGroupInstanceId":"1882935","vfModuleInstanceId":"1882934","requestDetails":{"requestInfo":{"source":"VID","requestorId":"xxxxxx","instanceName":"testService9"},"requestParameters":{"aLaCarte":true,"autoBuildVfModules":false,"subscriptionServiceType":"test"},"modelInfo":{"modelInvariantId":"f7ce78bb-423b-11e7-93f8-0050569a7965","modelVersion":"1","modelVersionId":"10","modelType":"service","modelName":"serviceModel","modelInstanceName":"modelInstanceName","modelCustomizationId":"f7ce78bb-423b-11e7-93f8-0050569a796"},"subscriberInfo":{"globalSubscriberId":"MSO_1610_dev","subscriberName":"MSO_1610_dev"}}}',
- null, 'APIH', null, null, '1882935', null, '1882934', null, null, null, 'mtn16', null, null, null, null, null, 'service', 'createInstance', '1882939', 'testService10', 'xxxxxx', 'test', null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances');
+INSERT INTO requestdb.infra_active_requests(REQUEST_ID, REQUEST_STATUS, STATUS_MESSAGE, PROGRESS, START_TIME, END_TIME, SOURCE, VNF_ID, VNF_NAME, VNF_TYPE, SERVICE_TYPE, TENANT_ID, VNF_PARAMS, VNF_OUTPUTS, REQUEST_BODY, RESPONSE_BODY, LAST_MODIFIED_BY, MODIFY_TIME, VOLUME_GROUP_ID, VOLUME_GROUP_NAME, VF_MODULE_ID, VF_MODULE_NAME, VF_MODULE_MODEL_NAME, CLOUD_REGION, CALLBACK_URL, CORRELATOR, NETWORK_ID, NETWORK_NAME, NETWORK_TYPE, REQUEST_SCOPE, REQUEST_ACTION, SERVICE_INSTANCE_ID, SERVICE_INSTANCE_NAME, REQUESTOR_ID, CONFIGURATION_ID, CONFIGURATION_NAME, OPERATIONAL_ENV_ID, OPERATIONAL_ENV_NAME, REQUEST_URL) VALUES
+('00032ab7-3fb3-42e5-965d-8ea592502017', 'COMPLETE', 'Vf Module has been deleted successfully.', '100', '2016-12-22 18:59:54', '2016-12-22 19:00:28', 'VID', 'b92f60c8-8de3-46c1-8dc1-e4390ac2b005', null, null, null, '6accefef3cb442ff9e644d589fb04107', null, null, '{"modelInfo":{"modelType":"vfModule","modelName":"test::base::module-0"},"requestInfo":{"source":"VID"},"cloudConfiguration":{"tenantId":"6accefef3cb442ff9e644d589fb04107","lcpCloudRegionId":"n6"}}', null, 'BPMN', '2016-12-22 19:00:28', null, null, 'c7d527b1-7a91-49fd-b97d-1c8c0f4a7992', null, 'test::base::module-0', 'n6', null, null, null, null, null, 'vfModule', 'deleteInstance', 'e3b5744d-2ad1-4cdd-8390-c999a38829bc', null, null, null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
+('00032ab7-na18-42e5-965d-8ea592502018', 'PENDING', 'Vf Module deletion pending.', '0', '2016-12-22 18:59:54', '2016-12-22 19:00:28', 'VID', 'b92f60c8-8de3-46c1-8dc1-e4390ac2b005', null, null, null, '6accefef3cb442ff9e644d589fb04107', null, null, '{"requestDetails": {"modelInfo":{"modelType":"vfModule","modelName":"test::base::module-0"},"requestInfo":{"source":"VID"},"cloudConfiguration":{"tenantId":"6accefef3cb442ff9e644d589fb04107","lcpCloudRegionId":"n6"}}}', null, 'BPMN', '2016-12-22 19:00:28', null, null, 'c7d527b1-7a91-49fd-b97d-1c8c0f4a7992', null, 'test::base::module-0', 'n6', null, null, null, null, null, 'vfModule', 'deleteInstance', 'e3b5744d-2ad1-4cdd-8390-c999a38829bc', null, null, null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
+('00093944-bf16-4373-ab9a-3adfe730ff2d', 'FAILED', 'Error: Locked instance - This service (MSODEV_1707_SI_v10_011-4) already has a request being worked with a status of IN_PROGRESS (RequestId - 278e83b1-4f9f-450e-9e7d-3700a6ed22f4). The existing request must finish or be cleaned up before proceeding.', '100', '2017-07-11 18:33:26', '2017-07-11 18:33:26', 'VID', null, null, null, null, '19123c2924c648eb8e42a3c1f14b7682', null, null, '{"modelInfo":{"modelInvariantId":"9647dfc4-2083-11e7-93ae-92361f002671","modelType":"service","modelName":"Infra_v10_Service","modelVersion":"1.0","modelVersionId":"5df8b6de-2083-11e7-93ae-92361f002671"},"requestInfo":{"source":"VID","instanceName":"MSODEV_1707_SI_v10_011-4","suppressRollback":false,"requestorId":"xxxxxx"},"subscriberInfo":{"globalSubscriberId":"MSO_1610_dev","subscriberName":"MSO_1610_dev"},"cloudConfiguration":{"tenantId":"19123c2924c648eb8e42a3c1f14b7682","lcpCloudRegionId":"n6"},"requestParameters":{"subscriptionServiceType":"MSO-dev-service-type","userParams":[{"name":"someUserParam","value":"someValue"}],"aLaCarte":true,"autoBuildVfModules":false,"cascadeDelete":false,"usePreload":true}}', null, 'APIH', null, null, null, null, null, null, 'n6', null, null, null, null, null, 'service', 'createInstance', null, 'MSODEV_1707_SI_v10_011-4', 'xxxxxx', null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
+('001619d2-a297-4a4b-a9f5-e2823c88458f', 'COMPLETE', 'COMPLETED', '100', '2016-07-01 14:11:42', '2017-05-02 16:03:34', 'PORTAL', null, 'test-vscp', 'elena_test21', null, '381b9ff6c75e4625b7a4182f90fc68d3', null, null, '{"requestDetails": {"modelInfo":{"modelType":"vfModule","modelName":"test::base::module-0"},"requestInfo":{"source":"VID"},"cloudConfiguration":{"tenantId":"6accefef3cb442ff9e644d589fb04107","lcpCloudRegionId":"n6"}}}', 'NONE', 'RDBTEST', '2016-07-01 14:11:42', null, null, null, 'MODULENAME1', 'moduleModelName', 'mtn9', null, null, null, null, null, 'vfModule', 'createInstance', null, null, null, null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
+('5ffbabd6-b793-4377-a1ab-082670fbc7ac', 'PENDING', 'Vf Module deletion pending.', '0', '2016-12-22 18:59:54', '2016-12-22 19:00:28', 'VID', 'b92f60c8-8de3-46c1-8dc1-e4390ac2b005', null, null, null, '6accefef3cb442ff9e644d589fb04107', null, null, '{"requestDetails": {"modelInfo": {"modelType": "vfModule","modelName": "test::base::module-0","modelVersionId": "20c4431c-246d-11e7-93ae-92361f002671","modelInvariantId": "78ca26d0-246d-11e7-93ae-92361f002671","modelVersion": "2","modelCustomizationId": "cb82ffd8-252a-11e7-93ae-92361f002671"},"cloudConfiguration": {"lcpCloudRegionId": "n6","tenantId": "0422ffb57ba042c0800a29dc85ca70f8"},"requestInfo": {"instanceName": "MSO-DEV-VF-1806BB-v10-base-it2-1","source": "VID","suppressRollback": false,"requestorId": "xxxxxx"},"relatedInstanceList": [{"relatedInstance": {"instanceId": "76fa8849-4c98-473f-b431-2590b192a653","modelInfo": {"modelType": "service","modelName": "Infra_v10_Service","modelVersionId": "5df8b6de-2083-11e7-93ae-92361f002671","modelInvariantId": "9647dfc4-2083-11e7-93ae-92361f002671","modelVersion": "1.0"}}},{"relatedInstance": {"instanceId": "d57970e1-5075-48a5-ac5e-75f2d6e10f4c","modelInfo": {"modelType": "vnf","modelName": "v10","modelVersionId": "ff2ae348-214a-11e7-93ae-92361f002671","modelInvariantId": "2fff5b20-214b-11e7-93ae-92361f002671","modelVersion": "1.0","modelCustomizationId": "68dc9a92-214c-11e7-93ae-92361f002671","modelCustomizationName": "v10 1"}}}],"requestParameters": {"usePreload": true,"userParams": []}}}', null, 'BPMN', '2016-12-22 19:00:28', null, null, 'c7d527b1-7a91-49fd-b97d-1c8c0f4a7992', null, 'test::base::module-0', 'n6', null, null, null, null, null, 'vfModule', 'deleteInstance', 'e3b5744d-2ad1-4cdd-8390-c999a38829bc', null, null, null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances');
+
+
+INSERT INTO requestdb.infra_active_requests(REQUEST_ID, REQUEST_STATUS, STATUS_MESSAGE, PROGRESS, START_TIME, END_TIME, SOURCE, VNF_ID, VNF_NAME, VNF_TYPE, SERVICE_TYPE, TENANT_ID, VNF_PARAMS, VNF_OUTPUTS, REQUEST_BODY, RESPONSE_BODY, LAST_MODIFIED_BY, MODIFY_TIME, VOLUME_GROUP_ID, VOLUME_GROUP_NAME, VF_MODULE_ID, VF_MODULE_NAME, VF_MODULE_MODEL_NAME, CLOUD_REGION, CALLBACK_URL, CORRELATOR, NETWORK_ID, NETWORK_NAME, NETWORK_TYPE, REQUEST_SCOPE, REQUEST_ACTION, SERVICE_INSTANCE_ID, SERVICE_INSTANCE_NAME, REQUESTOR_ID, CONFIGURATION_ID, CONFIGURATION_NAME, OPERATIONAL_ENV_ID, OPERATIONAL_ENV_NAME, REQUEST_URL) VALUES
+('00164b9e-784d-48a8-8973-bbad6ef818ed', 'COMPLETE', 'Service Instance was created successfully.', '100', '2017-09-28 12:45:51', '2017-09-28 12:45:53', 'VID', null, null, null, null, '19123c2924c648eb8e42a3c1f14b7682', null, null, '{"modelInfo":{"modelCustomizationName":null,"modelInvariantId":"52b49b5d-3086-4ffd-b5e6-1b1e5e7e062f","modelType":"service","modelNameVersionId":null,"modelName":"MSO Test Network","modelVersion":"1.0","modelCustomizationUuid":null,"modelVersionId":"aed5a5b7-20d3-44f7-90a3-ddbd16f14d1e","modelCustomizationId":null,"modelUuid":null,"modelInvariantUuid":null,"modelInstanceName":null},"requestInfo":{"billingAccountNumber":null,"callbackUrl":null,"correlator":null,"orderNumber":null,"productFamilyId":null,"orderVersion":null,"source":"VID","instanceName":"DEV-n6-3100-0927-1","suppressRollback":false,"requestorId":"xxxxxx"},"relatedInstanceList":null,"subscriberInfo":{"globalSubscriberId":"MSO_1610_dev","subscriberName":"MSO_1610_dev"},"cloudConfiguration":{"aicNodeClli":null,"tenantId":"19123c2924c648eb8e42a3c1f14b7682","lcpCloudRegionId":"n6"},"requestParameters":{"subscriptionServiceType":"MSO-dev-service-type","userParams":[{"name":"someUserParam","value":"someValue"}],"aLaCarte":true,"autoBuildVfModules":false,"cascadeDelete":false,"usePreload":true},"project":null,"owningEntity":null,"platform":null,"lineOfBusiness":null}', null, 'CreateGenericALaCarteServiceInstance', '2017-09-28 12:45:52', null, null, null, null, null, 'n6', null, null, null, null, null, 'service', 'createInstance', 'b2f59173-b7e5-4e0f-8440-232fd601b865', 'DEV-n6-3100-0927-1', 'xxxxxx', null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
+('00173cc9-5ce2-4673-a810-f87fefb2829e', 'FAILED', 'Error parsing request. No valid instanceName is specified', '100', '2017-04-14 21:08:46', '2017-04-14 21:08:46', 'VID', null, null, null, null, 'a259ae7b7c3f493cb3d91f95a7c18149', null, null, '{"modelInfo":{"modelInvariantId":"ff6163d4-7214-459e-9f76-507b4eb00f51","modelType":"service","modelName":"ConstraintsSrvcVID","modelVersion":"2.0","modelVersionId":"722d256c-a374-4fba-a14f-a59b76bb7656"},"requestInfo":{"productFamilyId":"LRSI-OSPF","source":"VID","requestorId":"xxxxxx"},"subscriberInfo":{"globalSubscriberId":"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"},"cloudConfiguration":{"tenantId":"a259ae7b7c3f493cb3d91f95a7c18149","lcpCloudRegionId":"mtn16"},"requestParameters":{"subscriptionServiceType":"Mobility","userParams":[{"name":"neutronport6_name","value":"8"},{"name":"neutronnet5_network_name","value":"8"},{"name":"contrailv2vlansubinterface3_name","value":"false"}]}}', null, 'APIH', null, null, null, null, null, null, 'mtn16', null, null, null, null, null, 'service', 'createInstance', null, null, null, null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
+('0017f68c-eb2d-45bb-b7c7-ec31b37dc349', 'UNLOCKED', null, '20', '2017-09-26 16:09:29', null, 'VID', null, null, null, null, null, null, null, '{"modelInfo":{"modelCustomizationName":null,"modelInvariantId":"1587cf0e-f12f-478d-8530-5c55ac578c39","modelType":"configuration","modelNameVersionId":null,"modelName":null,"modelVersion":null,"modelCustomizationUuid":null,"modelVersionId":"36a3a8ea-49a6-4ac8-b06c-89a545444455","modelCustomizationId":"68dc9a92-214c-11e7-93ae-92361f002671","modelUuid":null,"modelInvariantUuid":null,"modelInstanceName":null},"requestInfo":{"billingAccountNumber":null,"callbackUrl":null,"correlator":null,"orderNumber":null,"productFamilyId":null,"orderVersion":null,"source":"VID","instanceName":null,"suppressRollback":false,"requestorId":"xxxxxx"},"relatedInstanceList":[{"relatedInstance":{"instanceName":null,"instanceId":"9e15a443-af65-4f05-9000-47ae495e937d","modelInfo":{"modelCustomizationName":null,"modelInvariantId":"de19ae10-9a25-11e7-abc4-cec278b6b50a","modelType":"service","modelNameVersionId":null,"modelName":"Infra_Configuration_Service","modelVersion":"1.0","modelCustomizationUuid":null,"modelVersionId":"ee938612-9a25-11e7-abc4-cec278b6b50a","modelCustomizationId":null,"modelUuid":null,"modelInvariantUuid":null,"modelInstanceName":null},"instanceDirection":null}}],"subscriberInfo":null,"cloudConfiguration":{"aicNodeClli":null,"tenantId":null,"lcpCloudRegionId":"n6"},"requestParameters":{"subscriptionServiceType":null,"userParams":[],"aLaCarte":false,"autoBuildVfModules":false,"cascadeDelete":false,"usePreload":true},"project":null,"owningEntity":null,"platform":null,"lineOfBusiness":null}', null, 'APIH', '2017-09-26 16:09:29', null, null, null, null, null, 'n6', null, null, null, null, null, 'configuration', 'activateInstance', '9e15a443-af65-4f05-9000-47ae495e937d', null, 'xxxxxx', '26ef7f15-57bb-48df-8170-e59edc26234c', null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
+('0017f68c-eb2d-45bb-b7c7-ec31b37dc350', 'IN_PROGRESS', 'Error parsing request.
+ No valid instanceName is specified', null, '2017-04-14 21:08:46', '2017-04-14 21:08:46', 'VID', '1882938', null, null, null, 'a259ae7b7c3f493cb3d91f95a7c18149', null, null,
+ '{"serviceInstanceId":"1882939","vnfInstanceId":"1882938","networkInstanceId":"1882937","volumeGroupInstanceId":"1882935","vfModuleInstanceId":"1882934","requestDetails":{"requestInfo":{"source":"VID","requestorId":"xxxxxx","instanceName":"testService9"},"requestParameters":{"aLaCarte":true,"autoBuildVfModules":false,"subscriptionServiceType":"test"},"modelInfo":{"modelInvariantId":"f7ce78bb-423b-11e7-93f8-0050569a7965","modelVersion":"1","modelVersionId":"10","modelType":"service","modelName":"serviceModel","modelInstanceName":"modelInstanceName","modelCustomizationId":"f7ce78bb-423b-11e7-93f8-0050569a796"},"subscriberInfo":{"globalSubscriberId":"MSO_1610_dev","subscriberName":"MSO_1610_dev"}}}', null, 'APIH', null, '1882935', null, '1882934', null, null, 'mtn16', null, null, null, null, null, 'service', 'createInstance', '1882939', 'testService10', 'xxxxxx', 'test', null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances');
+
COMMIT; \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/getRequestProcessingDataArray.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/getRequestProcessingDataArray.json
new file mode 100644
index 0000000000..c746020e7f
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/getRequestProcessingDataArray.json
@@ -0,0 +1,8 @@
+[{
+ "id": 1,
+ "soRequestId": "00032ab7-na18-42e5-965d-8ea592502018",
+ "groupingId": "7d2e8c07-4d10-456d-bddc-37abf38ca714",
+ "name": "requestAction",
+ "value": "assign",
+ "tag": "pincFabricConfigRequest"
+}]
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/AAIEntityNotFoundResponse.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/AAIEntityNotFoundResponse.json
new file mode 100644
index 0000000000..2004a82ed7
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/AAIEntityNotFoundResponse.json
@@ -0,0 +1,8 @@
+{
+ "requestError": {
+ "serviceException": {
+ "messageId": "SVC0001",
+ "text": "Generic Vnf Not Found In Inventory, VnfId: ff305d54-75b4-431b-adb2-eb6b9e5ff000"
+ }
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ReplaceVfModuleNoCloudConfig.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ReplaceVfModuleNoCloudConfig.json
new file mode 100644
index 0000000000..766d49bee8
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ReplaceVfModuleNoCloudConfig.json
@@ -0,0 +1,28 @@
+{
+ "requestDetails": {
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx",
+ "instanceName": "testService60"
+ },
+ "requestParameters": {
+ "aLaCarte": true,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "test"
+ },
+ "modelInfo":{
+ "modelInvariantId": "f7ce78bb-423b-11e7-93f8-0050569a7968",
+ "modelVersion":"2",
+ "modelVersionId":"78ca26d0-246d-11e7-93ae-92361f002671",
+ "modelType":"vfModule",
+ "modelName":"serviceModel",
+ "modelCustomizationId": "a7f1d08e-b02d-11e6-80f5-76304dec7eb7"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ }
+ }
+}
+
+
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ReplaceVnfNoCloudConfig.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ReplaceVnfNoCloudConfig.json
new file mode 100644
index 0000000000..46873588c0
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ReplaceVnfNoCloudConfig.json
@@ -0,0 +1,58 @@
+{
+ "vnfInstanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelName": "vSAMP12..base..module-0",
+ "modelVersion": "1",
+ "modelVersionId": "1",
+ "modelCustomizationId": "68dc9a92-214c-11e7-93ae-92361f002671"
+ },
+ "requestInfo": {
+ "instanceName": "VNFTEST-10",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx",
+ "productFamilyId": "FamilyID"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "f7ce78bb-423b-11e7-93f8-0050569a7968",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "instanceDirection": "source",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "aLaCarte": true,
+ "userParams": []
+ },
+ "platform": {
+ "platformName": "platformName"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "lobName"
+ }
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/InfraActiveRequests/createInfraActiveRequests.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/InfraActiveRequests/createInfraActiveRequests.json
index 6be015694c..81b574285c 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/InfraActiveRequests/createInfraActiveRequests.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/InfraActiveRequests/createInfraActiveRequests.json
@@ -1,7 +1,5 @@
{
"requestId":"f0a35706-efc4-4e27-80ea-a995d7a2a40f",
- "clientRequestId":null,
- "action":"activateInstance",
"requestStatus":"UNLOCKED",
"statusMessage":null,
"progress":20,
@@ -12,22 +10,18 @@
"vnfName":null,
"vnfType":null,
"serviceType":null,
- "aicNodeClli":null,
"tenantId":null,
- "provStatus":null,
"vnfParams":null,
"vnfOutputs":null,
"requestBody":"{\"modelInfo\":{\"modelCustomizationName\":null,\"modelInvariantId\":\"1587cf0e-f12f-478d-8530-5c55ac578c39\",\"modelType\":\"configuration\",\"modelNameVersionId\":null,\"modelName\":null,\"modelVersion\":null,\"modelCustomizationUuid\":null,\"modelVersionId\":\"36a3a8ea-49a6-4ac8-b06c-89a545444455\",\"modelCustomizationId\":\"68dc9a92-214c-11e7-93ae-92361f002671\",\"modelUuid\":null,\"modelInvariantUuid\":null,\"modelInstanceName\":null},\"requestInfo\":{\"billingAccountNumber\":null,\"callbackUrl\":null,\"correlator\":null,\"orderNumber\":null,\"productFamilyId\":null,\"orderVersion\":null,\"source\":\"VID\",\"instanceName\":null,\"suppressRollback\":false,\"requestorId\":\"xxxxxx\"},\"relatedInstanceList\":[{\"relatedInstance\":{\"instanceName\":null,\"instanceId\":\"9e15a443-af65-4f05-9000-47ae495e937d\",\"modelInfo\":{\"modelCustomizationName\":null,\"modelInvariantId\":\"de19ae10-9a25-11e7-abc4-cec278b6b50a\",\"modelType\":\"service\",\"modelNameVersionId\":null,\"modelName\":\"Infra_Configuration_Service\",\"modelVersion\":\"1.0\",\"modelCustomizationUuid\":null,\"modelVersionId\":\"ee938612-9a25-11e7-abc4-cec278b6b50a\",\"modelCustomizationId\":null,\"modelUuid\":null,\"modelInvariantUuid\":null,\"modelInstanceName\":null},\"instanceDirection\":null}}],\"subscriberInfo\":null,\"cloudConfiguration\":{\"aicNodeClli\":null,\"tenantId\":null,\"lcpCloudRegionId\":\"n6\"},\"requestParameters\":{\"subscriptionServiceType\":null,\"userParams\":[],\"aLaCarte\":false,\"autoBuildVfModules\":false,\"cascadeDelete\":false,\"usePreload\":true},\"project\":null,\"owningEntity\":null,\"platform\":null,\"lineOfBusiness\":null}",
"responseBody":null,
"lastModifiedBy":"APIH",
"modifyTime":1532945172000,
- "requestType":null,
"volumeGroupId":null,
"volumeGroupName":null,
"vfModuleId":null,
"vfModuleName":null,
"vfModuleModelName":null,
- "aaiServiceId":null,
"aicCloudRegion":"n6",
"callBackUrl":null,
"correlator":null,
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/InfraActiveRequests/getInfraActiveRequest.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/InfraActiveRequests/getInfraActiveRequest.json
index d63525b297..8d52acbe0d 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/InfraActiveRequests/getInfraActiveRequest.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/InfraActiveRequests/getInfraActiveRequest.json
@@ -1,6 +1,4 @@
{
- "clientRequestId": null,
- "action": "deleteInstance",
"requestStatus": "%2$s",
"statusMessage": null,
"progress": 20,
@@ -11,22 +9,18 @@
"vnfName": null,
"vnfType": null,
"serviceType": null,
- "aicNodeClli": null,
"tenantId": null,
- "provStatus": null,
"vnfParams": null,
"vnfOutputs": null,
"requestBody": "{\"modelInfo\":{\"modelCustomizationName\":null,\"modelInvariantId\":\"1587cf0e-f12f-478d-8530-5c55ac578c39\",\"modelType\":\"configuration\",\"modelNameVersionId\":null,\"modelName\":null,\"modelVersion\":null,\"modelCustomizationUuid\":null,\"modelVersionId\":\"36a3a8ea-49a6-4ac8-b06c-89a545444455\",\"modelCustomizationId\":\"68dc9a92-214c-11e7-93ae-92361f002671\",\"modelUuid\":null,\"modelInvariantUuid\":null,\"modelInstanceName\":null},\"requestInfo\":{\"billingAccountNumber\":null,\"callbackUrl\":null,\"correlator\":null,\"orderNumber\":null,\"productFamilyId\":null,\"orderVersion\":null,\"source\":\"VID\",\"instanceName\":null,\"suppressRollback\":false,\"requestorId\":\"xxxxxx\"},\"relatedInstanceList\":[{\"relatedInstance\":{\"instanceName\":null,\"instanceId\":\"9e15a443-af65-4f05-9000-47ae495e937d\",\"modelInfo\":{\"modelCustomizationName\":null,\"modelInvariantId\":\"de19ae10-9a25-11e7-abc4-cec278b6b50a\",\"modelType\":\"service\",\"modelNameVersionId\":null,\"modelName\":\"Infra_Configuration_Service\",\"modelVersion\":\"1.0\",\"modelCustomizationUuid\":null,\"modelVersionId\":\"ee938612-9a25-11e7-abc4-cec278b6b50a\",\"modelCustomizationId\":null,\"modelUuid\":null,\"modelInvariantUuid\":null,\"modelInstanceName\":null},\"instanceDirection\":null}}],\"subscriberInfo\":null,\"cloudConfiguration\":{\"aicNodeClli\":null,\"tenantId\":null,\"lcpCloudRegionId\":\"n6\"},\"requestParameters\":{\"subscriptionServiceType\":null,\"userParams\":[],\"aLaCarte\":false,\"autoBuildVfModules\":false,\"cascadeDelete\":false,\"usePreload\":true},\"project\":null,\"owningEntity\":null,\"platform\":null,\"lineOfBusiness\":null}",
"responseBody": null,
"lastModifiedBy": "APIH",
"modifyTime": "2018-07-30T10:06:12.000+0000",
- "requestType": null,
"volumeGroupId": null,
"volumeGroupName": null,
"vfModuleId": null,
"vfModuleName": null,
"vfModuleModelName": null,
- "aaiServiceId": null,
"aicCloudRegion": "n6",
"callBackUrl": null,
"correlator": null,
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/InfraActiveRequests/getInfraActiveRequestNoBody.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/InfraActiveRequests/getInfraActiveRequestNoBody.json
index 21568e5273..539851ce57 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/InfraActiveRequests/getInfraActiveRequestNoBody.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/InfraActiveRequests/getInfraActiveRequestNoBody.json
@@ -1,5 +1,4 @@
{
- "clientRequestId": null,
"action": "deleteInstance",
"requestStatus": "%2$s",
"statusMessage": null,
@@ -11,22 +10,18 @@
"vnfName": null,
"vnfType": null,
"serviceType": null,
- "aicNodeClli": null,
"tenantId": null,
- "provStatus": null,
"vnfParams": null,
"vnfOutputs": null,
"requestBody": null,
"responseBody": null,
"lastModifiedBy": "APIH",
"modifyTime": "2018-07-30T10:06:12.000+0000",
- "requestType": null,
"volumeGroupId": null,
"volumeGroupName": null,
"vfModuleId": null,
"vfModuleName": null,
"vfModuleModelName": null,
- "aaiServiceId": null,
"aicCloudRegion": "n6",
"callBackUrl": null,
"correlator": null,
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/infra/VnfLookup.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/infra/VnfLookup.json
new file mode 100644
index 0000000000..a0a4c14c10
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/infra/VnfLookup.json
@@ -0,0 +1,30 @@
+[
+ {
+ "requestId":"b15f30dc-56b1-4a1a-aaf1-156c0d685142",
+ "action":"createInstance",
+ "requestStatus":"COMPLETE",
+ "statusMessage":"ALaCarte-Vnf-createInstance request was executed correctly.",
+ "flowStatus":"Successfully completed all Building Blocks",
+ "progress":100,
+ "startTime":"2019-11-11T19:28:56.000+0000",
+ "endTime":"2019-11-11T19:29:15.000+0000",
+ "source":"VID",
+ "vnfId":"5b20c24e-cabb-4725-8f88-57ca99a8ffe1",
+ "vnfName":"Robot_VNF_For_Volume_Group",
+ "vnfType":"Vf zrdm5bpxmc02092017-Service/Vf zrdm5bpxmc02092017-VF 0",
+ "tenantId":"0422ffb57ba042c0800a29dc85ca70f8",
+ "requestBody":"{\"requestDetails\": {\"relatedInstanceList\": [{\"relatedInstance\": {\"instanceId\": \"f5435110-b276-4920-9261-a18a5582d357\", \"modelInfo\": {\"modelVersionId\": \"bad955c3-29b2-4a27-932e-28e942cc6480\", \"modelVersion\": \"1\", \"modelName\": \"Vf zrdm5bpxmc02092017-Service\", \"modelInvariantId\": \"b16a9398-ffa3-4041-b78c-2956b8ad9c7b\", \"modelType\": \"service\"}}}], \"requestParameters\": {\"userParams\": [], \"enforceValidNfValues\": false, \"testApi\": \"GR_API\"}, \"lineOfBusiness\": {\"lineOfBusinessName\": \"vSAMP12_14-2XXX-Aug18-9001 - LOB\"}, \"requestInfo\": {\"source\": \"VID\", \"requestorId\": \"az2016\", \"instanceName\": \"Robot_VNF_For_Volume_Group\", \"suppressRollback\": false, \"productFamilyId\": \"06f76284-8710-11e6-ae22-56b6b6499611\"}, \"platform\": {\"platformName\": \"vSAMP12_14-2XXX-Aug18-9001 - Platform\"}, \"modelInfo\": {\"modelName\": \"Vf zrdm5bpxmc02092017-VF\", \"modelVersion\": \"1\", \"modelInvariantId\": \"23122c9b-dd7f-483f-bf0a-e069303db2f7\", \"modelType\": \"vnf\", \"modelCustomizationName\": \"Vf zrdm5bpxmc02092017-VF 0\", \"modelVersionId\": \"d326f424-2312-4dd6-b7fe-364fadbd1ef5\", \"modelCustomizationId\": \"96c23a4a-6887-4b2c-9cce-1e4ea35eaade\"}, \"cloudConfiguration\": {\"cloudOwner\": \"cloudOwner\", \"tenantId\": \"0422ffb57ba042c0800a29dc85ca70f8\", \"lcpCloudRegionId\": \"regionOne\"}}}",
+ "lastModifiedBy":"CamundaBPMN",
+ "modifyTime":"2019-11-11T19:29:15.000+0000",
+ "aicCloudRegion":"regionOne",
+ "serviceInstanceId":"f5435110-b276-4920-9261-a18a5582d357",
+ "requestScope":"vnf",
+ "requestAction":"createInstance",
+ "requestorId":"az2016",
+ "requestUrl":"http://192.168.99.100:9100/onap/so/infra/serviceInstantiation/v7/serviceInstances/f5435110-b276-4920-9261-a18a5582d357/vnfs",
+ "cloudApiRequests":[
+
+ ],
+ "requestURI":"b15f30dc-56b1-4a1a-aaf1-156c0d685142"
+ }
+]
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/data.sql b/mso-api-handlers/mso-api-handler-infra/src/test/resources/data.sql
index 72922ae9c1..5a1c532d0e 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/data.sql
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/data.sql
@@ -1,27 +1,22 @@
--Changes here should also be made in InfraActiveRequestsReset.sql to be re-inserted after tests
-INSERT INTO requestdb.infra_active_requests(REQUEST_ID, CLIENT_REQUEST_ID, ACTION, REQUEST_STATUS, STATUS_MESSAGE, PROGRESS, START_TIME, END_TIME, SOURCE, VNF_ID, VNF_NAME, VNF_TYPE, SERVICE_TYPE, AIC_NODE_CLLI, TENANT_ID, PROV_STATUS, VNF_PARAMS, VNF_OUTPUTS, REQUEST_BODY, RESPONSE_BODY, LAST_MODIFIED_BY, MODIFY_TIME, REQUEST_TYPE, VOLUME_GROUP_ID, VOLUME_GROUP_NAME, VF_MODULE_ID, VF_MODULE_NAME, VF_MODULE_MODEL_NAME, AAI_SERVICE_ID, CLOUD_REGION, CALLBACK_URL, CORRELATOR, NETWORK_ID, NETWORK_NAME, NETWORK_TYPE, REQUEST_SCOPE, REQUEST_ACTION, SERVICE_INSTANCE_ID, SERVICE_INSTANCE_NAME, REQUESTOR_ID, CONFIGURATION_ID, CONFIGURATION_NAME, OPERATIONAL_ENV_ID, OPERATIONAL_ENV_NAME, REQUEST_URL) VALUES
-('00032ab7-3fb3-42e5-965d-8ea592502017', '00032ab7-3fb3-42e5-965d-8ea592502016', 'deleteInstance', 'COMPLETE', 'Vf Module has been deleted successfully.', '100', '2016-12-22 18:59:54', '2016-12-22 19:00:28', 'VID', 'b92f60c8-8de3-46c1-8dc1-e4390ac2b005', null, null, null, null, '6accefef3cb442ff9e644d589fb04107', null, null, null, '{"modelInfo":{"modelType":"vfModule","modelName":"test::base::module-0"},"requestInfo":{"source":"VID"},"cloudConfiguration":{"tenantId":"6accefef3cb442ff9e644d589fb04107","lcpCloudRegionId":"n6"}}', null, 'BPMN', '2016-12-22 19:00:28', null, null, null, 'c7d527b1-7a91-49fd-b97d-1c8c0f4a7992', null, 'test::base::module-0', null, 'n6', null, null, null, null, null, 'vfModule', 'deleteInstance', 'e3b5744d-2ad1-4cdd-8390-c999a38829bc', null, null, null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
-('00032ab7-na18-42e5-965d-8ea592502018', '00032ab7-fake-42e5-965d-8ea592502018', 'deleteInstance', 'PENDING', 'Vf Module deletion pending.', '0', '2016-12-22 18:59:54', '2016-12-22 19:00:28', 'VID', 'b92f60c8-8de3-46c1-8dc1-e4390ac2b005', null, null, null, null, '6accefef3cb442ff9e644d589fb04107', null, null, null, '{"requestDetails": {"modelInfo":{"modelType":"vfModule","modelName":"test::base::module-0"},"requestInfo":{"source":"VID"},"cloudConfiguration":{"tenantId":"6accefef3cb442ff9e644d589fb04107","lcpCloudRegionId":"n6"}}}', null, 'BPMN', '2016-12-22 19:00:28', null, null, null, 'c7d527b1-7a91-49fd-b97d-1c8c0f4a7992', null, 'test::base::module-0', null, 'n6', null, null, null, null, null, 'vfModule', 'deleteInstance', 'e3b5744d-2ad1-4cdd-8390-c999a38829bc', null, null, null, null, null, null, null),
-('00093944-bf16-4373-ab9a-3adfe730ff2d', null, 'createInstance', 'FAILED', 'Error: Locked instance - This service (MSODEV_1707_SI_v10_011-4) already has a request being worked with a status of IN_PROGRESS (RequestId - 278e83b1-4f9f-450e-9e7d-3700a6ed22f4). The existing request must finish or be cleaned up before proceeding.', '100', '2017-07-11 18:33:26', '2017-07-11 18:33:26', 'VID', null, null, null, null, null, '19123c2924c648eb8e42a3c1f14b7682', null, null, null, '{"modelInfo":{"modelInvariantId":"9647dfc4-2083-11e7-93ae-92361f002671","modelType":"service","modelName":"Infra_v10_Service","modelVersion":"1.0","modelVersionId":"5df8b6de-2083-11e7-93ae-92361f002671"},"requestInfo":{"source":"VID","instanceName":"MSODEV_1707_SI_v10_011-4","suppressRollback":false,"requestorId":"xxxxxx"},"subscriberInfo":{"globalSubscriberId":"MSO_1610_dev","subscriberName":"MSO_1610_dev"},"cloudConfiguration":{"tenantId":"19123c2924c648eb8e42a3c1f14b7682","lcpCloudRegionId":"n6"},"requestParameters":{"subscriptionServiceType":"MSO-dev-service-type","userParams":[{"name":"someUserParam","value":"someValue"}],"aLaCarte":true,"autoBuildVfModules":false,"cascadeDelete":false,"usePreload":true}}', null, 'APIH', null, null, null, null, null, null, null, null, 'n6', null, null, null, null, null, 'service', 'createInstance', null, 'MSODEV_1707_SI_v10_011-4', 'xxxxxx', null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
-('001619d2-a297-4a4b-a9f5-e2823c88458f', '001619d2-a297-4a4b-a9f5-e2823c88458f', 'CREATE_VF_MODULE', 'COMPLETE', 'COMPLETED', '100', '2016-07-01 14:11:42', '2017-05-02 16:03:34', 'PORTAL', null, 'test-vscp', 'elena_test21', null, null, '381b9ff6c75e4625b7a4182f90fc68d3', null, null, null, '{"requestDetails": {"modelInfo":{"modelType":"vfModule","modelName":"test::base::module-0"},"requestInfo":{"source":"VID"},"cloudConfiguration":{"tenantId":"6accefef3cb442ff9e644d589fb04107","lcpCloudRegionId":"n6"}}}', 'NONE', 'RDBTEST', '2016-07-01 14:11:42', 'VNF', null, null, null, 'MODULENAME1', 'moduleModelName', 'a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb', 'mtn9', null, null, null, null, null, 'vfModule', 'createInstance', null, null, null, null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
-('5ffbabd6-b793-4377-a1ab-082670fbc7ac', '5ffbabd6-b793-4377-a1ab-082670fbc7ac', 'deleteInstance', 'PENDING', 'Vf Module deletion pending.', '0', '2016-12-22 18:59:54', '2016-12-22 19:00:28', 'VID', 'b92f60c8-8de3-46c1-8dc1-e4390ac2b005', null, null, null, null, '6accefef3cb442ff9e644d589fb04107', null, null, null, '{"requestDetails": {"modelInfo": {"modelType": "vfModule","modelName": "test::base::module-0","modelVersionId": "20c4431c-246d-11e7-93ae-92361f002671","modelInvariantId": "78ca26d0-246d-11e7-93ae-92361f002671","modelVersion": "2","modelCustomizationId": "cb82ffd8-252a-11e7-93ae-92361f002671"},"cloudConfiguration": {"lcpCloudRegionId": "n6","tenantId": "0422ffb57ba042c0800a29dc85ca70f8"},"requestInfo": {"instanceName": "MSO-DEV-VF-1806BB-v10-base-it2-1","source": "VID","suppressRollback": false,"requestorId": "xxxxxx"},"relatedInstanceList": [{"relatedInstance": {"instanceId": "76fa8849-4c98-473f-b431-2590b192a653","modelInfo": {"modelType": "service","modelName": "Infra_v10_Service","modelVersionId": "5df8b6de-2083-11e7-93ae-92361f002671","modelInvariantId": "9647dfc4-2083-11e7-93ae-92361f002671","modelVersion": "1.0"}}},{"relatedInstance": {"instanceId": "d57970e1-5075-48a5-ac5e-75f2d6e10f4c","modelInfo": {"modelType": "vnf","modelName": "v10","modelVersionId": "ff2ae348-214a-11e7-93ae-92361f002671","modelInvariantId": "2fff5b20-214b-11e7-93ae-92361f002671","modelVersion": "1.0","modelCustomizationId": "68dc9a92-214c-11e7-93ae-92361f002671","modelCustomizationName": "v10 1"}}}],"requestParameters": {"usePreload": true,"userParams": []}}}', null, 'BPMN', '2016-12-22 19:00:28', null, null, null, 'c7d527b1-7a91-49fd-b97d-1c8c0f4a7992', null, 'test::base::module-0', null, 'n6', null, null, null, null, null, 'vfModule', 'deleteInstance', 'e3b5744d-2ad1-4cdd-8390-c999a38829bc', null, null, null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances');
-INSERT INTO requestdb.infra_active_requests(REQUEST_ID, CLIENT_REQUEST_ID, ACTION, REQUEST_STATUS, STATUS_MESSAGE, PROGRESS, START_TIME, END_TIME, SOURCE, VNF_ID, VNF_NAME, VNF_TYPE, SERVICE_TYPE, AIC_NODE_CLLI, TENANT_ID, PROV_STATUS, VNF_PARAMS, VNF_OUTPUTS, REQUEST_BODY, RESPONSE_BODY, LAST_MODIFIED_BY, MODIFY_TIME, REQUEST_TYPE, VOLUME_GROUP_ID, VOLUME_GROUP_NAME, VF_MODULE_ID, VF_MODULE_NAME, VF_MODULE_MODEL_NAME, AAI_SERVICE_ID, CLOUD_REGION, CALLBACK_URL, CORRELATOR, NETWORK_ID, NETWORK_NAME, NETWORK_TYPE, REQUEST_SCOPE, REQUEST_ACTION, SERVICE_INSTANCE_ID, SERVICE_INSTANCE_NAME, REQUESTOR_ID, CONFIGURATION_ID, CONFIGURATION_NAME, OPERATIONAL_ENV_ID, OPERATIONAL_ENV_NAME, REQUEST_URL) VALUES
-('00164b9e-784d-48a8-8973-bbad6ef818ed', null, 'createInstance', 'COMPLETE', 'Service Instance was created successfully.', '100', '2017-09-28 12:45:51', '2017-09-28 12:45:53', 'VID', null, null, null, null, null, '19123c2924c648eb8e42a3c1f14b7682', null, null, null, '{"modelInfo":{"modelCustomizationName":null,"modelInvariantId":"52b49b5d-3086-4ffd-b5e6-1b1e5e7e062f","modelType":"service","modelNameVersionId":null,"modelName":"MSO Test Network","modelVersion":"1.0","modelCustomizationUuid":null,"modelVersionId":"aed5a5b7-20d3-44f7-90a3-ddbd16f14d1e","modelCustomizationId":null,"modelUuid":null,"modelInvariantUuid":null,"modelInstanceName":null},"requestInfo":{"billingAccountNumber":null,"callbackUrl":null,"correlator":null,"orderNumber":null,"productFamilyId":null,"orderVersion":null,"source":"VID","instanceName":"DEV-n6-3100-0927-1","suppressRollback":false,"requestorId":"xxxxxx"},"relatedInstanceList":null,"subscriberInfo":{"globalSubscriberId":"MSO_1610_dev","subscriberName":"MSO_1610_dev"},"cloudConfiguration":{"aicNodeClli":null,"tenantId":"19123c2924c648eb8e42a3c1f14b7682","lcpCloudRegionId":"n6"},"requestParameters":{"subscriptionServiceType":"MSO-dev-service-type","userParams":[{"name":"someUserParam","value":"someValue"}],"aLaCarte":true,"autoBuildVfModules":false,"cascadeDelete":false,"usePreload":true},"project":null,"owningEntity":null,"platform":null,"lineOfBusiness":null}', null, 'CreateGenericALaCarteServiceInstance', '2017-09-28 12:45:52', null, null, null, null, null, null, null, 'n6', null, null, null, null, null, 'service', 'createInstance', 'b2f59173-b7e5-4e0f-8440-232fd601b865', 'DEV-n6-3100-0927-1', 'xxxxxx', null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
-('00173cc9-5ce2-4673-a810-f87fefb2829e', null, 'createInstance', 'FAILED', 'Error parsing request. No valid instanceName is specified', '100', '2017-04-14 21:08:46', '2017-04-14 21:08:46', 'VID', null, null, null, null, null, 'a259ae7b7c3f493cb3d91f95a7c18149', null, null, null, '{"modelInfo":{"modelInvariantId":"ff6163d4-7214-459e-9f76-507b4eb00f51","modelType":"service","modelName":"ConstraintsSrvcVID","modelVersion":"2.0","modelVersionId":"722d256c-a374-4fba-a14f-a59b76bb7656"},"requestInfo":{"productFamilyId":"LRSI-OSPF","source":"VID","requestorId":"xxxxxx"},"subscriberInfo":{"globalSubscriberId":"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"},"cloudConfiguration":{"tenantId":"a259ae7b7c3f493cb3d91f95a7c18149","lcpCloudRegionId":"mtn16"},"requestParameters":{"subscriptionServiceType":"Mobility","userParams":[{"name":"neutronport6_name","value":"8"},{"name":"neutronnet5_network_name","value":"8"},{"name":"contrailv2vlansubinterface3_name","value":"false"}]}}', null, 'APIH', null, null, null, null, null, null, null, null, 'mtn16', null, null, null, null, null, 'service', 'createInstance', null, null, null, null, null, null, null, null),
-('0017f68c-eb2d-45bb-b7c7-ec31b37dc349', null, 'activateInstance', 'UNLOCKED', null, '20', '2017-09-26 16:09:29', null, 'VID', null, null, null, null, null, null, null, null, null, '{"modelInfo":{"modelCustomizationName":null,"modelInvariantId":"1587cf0e-f12f-478d-8530-5c55ac578c39","modelType":"configuration","modelNameVersionId":null,"modelName":null,"modelVersion":null,"modelCustomizationUuid":null,"modelVersionId":"36a3a8ea-49a6-4ac8-b06c-89a545444455","modelCustomizationId":"68dc9a92-214c-11e7-93ae-92361f002671","modelUuid":null,"modelInvariantUuid":null,"modelInstanceName":null},"requestInfo":{"billingAccountNumber":null,"callbackUrl":null,"correlator":null,"orderNumber":null,"productFamilyId":null,"orderVersion":null,"source":"VID","instanceName":null,"suppressRollback":false,"requestorId":"xxxxxx"},"relatedInstanceList":[{"relatedInstance":{"instanceName":null,"instanceId":"9e15a443-af65-4f05-9000-47ae495e937d","modelInfo":{"modelCustomizationName":null,"modelInvariantId":"de19ae10-9a25-11e7-abc4-cec278b6b50a","modelType":"service","modelNameVersionId":null,"modelName":"Infra_Configuration_Service","modelVersion":"1.0","modelCustomizationUuid":null,"modelVersionId":"ee938612-9a25-11e7-abc4-cec278b6b50a","modelCustomizationId":null,"modelUuid":null,"modelInvariantUuid":null,"modelInstanceName":null},"instanceDirection":null}}],"subscriberInfo":null,"cloudConfiguration":{"aicNodeClli":null,"tenantId":null,"lcpCloudRegionId":"n6"},"requestParameters":{"subscriptionServiceType":null,"userParams":[],"aLaCarte":false,"autoBuildVfModules":false,"cascadeDelete":false,"usePreload":true},"project":null,"owningEntity":null,"platform":null,"lineOfBusiness":null}', null, 'APIH', '2017-09-26 16:09:29', null, null, null, null, null, null, null, 'n6', null, null, null, null, null, 'configuration', 'activateInstance', '9e15a443-af65-4f05-9000-47ae495e937d', null, 'xxxxxx', '26ef7f15-57bb-48df-8170-e59edc26234c', null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
-('0017f68c-eb2d-45bb-b7c7-ec31b37dc350', null, 'createInstance', 'IN_PROGRESS', 'Error parsing request.
- No valid instanceName is specified', null, '2017-04-14 21:08:46', '2017-04-14 21:08:46', 'VID',
- '1882938', null, null, null, null, 'a259ae7b7c3f493cb3d91f95a7c18149', null, null, null,
- '{"serviceInstanceId":"1882939","vnfInstanceId":"1882938","networkInstanceId":"1882937","volumeGroupInstanceId":"1882935","vfModuleInstanceId":"1882934","requestDetails":{"requestInfo":{"source":"VID","requestorId":"xxxxxx","instanceName":"testService9"},"requestParameters":{"aLaCarte":true,"autoBuildVfModules":false,"subscriptionServiceType":"test"},"modelInfo":{"modelInvariantId":"f7ce78bb-423b-11e7-93f8-0050569a7965","modelVersion":"1","modelVersionId":"10","modelType":"service","modelName":"serviceModel","modelInstanceName":"modelInstanceName","modelCustomizationId":"f7ce78bb-423b-11e7-93f8-0050569a796"},"subscriberInfo":{"globalSubscriberId":"MSO_1610_dev","subscriberName":"MSO_1610_dev"}}}',
- null, 'APIH', null, null, '1882935', null, '1882934', null, null, null, 'mtn16', null, null, null, null, null, 'service', 'createInstance', '1882939', 'testService10', 'xxxxxx', 'test', null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances');
-
+INSERT INTO requestdb.infra_active_requests(REQUEST_ID, REQUEST_STATUS, STATUS_MESSAGE, PROGRESS, START_TIME, END_TIME, SOURCE, VNF_ID, VNF_NAME, VNF_TYPE, SERVICE_TYPE, TENANT_ID, VNF_PARAMS, VNF_OUTPUTS, REQUEST_BODY, RESPONSE_BODY, LAST_MODIFIED_BY, MODIFY_TIME, VOLUME_GROUP_ID, VOLUME_GROUP_NAME, VF_MODULE_ID, VF_MODULE_NAME, VF_MODULE_MODEL_NAME, CLOUD_REGION, CALLBACK_URL, CORRELATOR, NETWORK_ID, NETWORK_NAME, NETWORK_TYPE, REQUEST_SCOPE, REQUEST_ACTION, SERVICE_INSTANCE_ID, SERVICE_INSTANCE_NAME, REQUESTOR_ID, CONFIGURATION_ID, CONFIGURATION_NAME, OPERATIONAL_ENV_ID, OPERATIONAL_ENV_NAME, REQUEST_URL) VALUES
+('00032ab7-3fb3-42e5-965d-8ea592502017', 'COMPLETE', 'Vf Module has been deleted successfully.', '100', '2016-12-22 18:59:54', '2016-12-22 19:00:28', 'VID', 'b92f60c8-8de3-46c1-8dc1-e4390ac2b005', null, null, null, '6accefef3cb442ff9e644d589fb04107', null, null, '{"modelInfo":{"modelType":"vfModule","modelName":"test::base::module-0"},"requestInfo":{"source":"VID"},"cloudConfiguration":{"tenantId":"6accefef3cb442ff9e644d589fb04107","lcpCloudRegionId":"n6"}}', null, 'BPMN', '2016-12-22 19:00:28', null, null, 'c7d527b1-7a91-49fd-b97d-1c8c0f4a7992', null, 'test::base::module-0', 'n6', null, null, null, null, null, 'vfModule', 'deleteInstance', 'e3b5744d-2ad1-4cdd-8390-c999a38829bc', null, null, null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
+('00032ab7-na18-42e5-965d-8ea592502018', 'PENDING', 'Vf Module deletion pending.', '0', '2016-12-22 18:59:54', '2016-12-22 19:00:28', 'VID', 'b92f60c8-8de3-46c1-8dc1-e4390ac2b005', null, null, null, '6accefef3cb442ff9e644d589fb04107', null, null, '{"requestDetails": {"modelInfo":{"modelType":"vfModule","modelName":"test::base::module-0"},"requestInfo":{"source":"VID"},"cloudConfiguration":{"tenantId":"6accefef3cb442ff9e644d589fb04107","lcpCloudRegionId":"n6"}}}', null, 'BPMN', '2016-12-22 19:00:28', null, null, 'c7d527b1-7a91-49fd-b97d-1c8c0f4a7992', null, 'test::base::module-0', 'n6', null, null, null, null, null, 'vfModule', 'deleteInstance', 'e3b5744d-2ad1-4cdd-8390-c999a38829bc', null, null, null, null, null, null, null),
+('00093944-bf16-4373-ab9a-3adfe730ff2d', 'FAILED', 'Error: Locked instance - This service (MSODEV_1707_SI_v10_011-4) already has a request being worked with a status of IN_PROGRESS (RequestId - 278e83b1-4f9f-450e-9e7d-3700a6ed22f4). The existing request must finish or be cleaned up before proceeding.', '100', '2017-07-11 18:33:26', '2017-07-11 18:33:26', 'VID', null, null, null, null, '19123c2924c648eb8e42a3c1f14b7682', null, null, '{"modelInfo":{"modelInvariantId":"9647dfc4-2083-11e7-93ae-92361f002671","modelType":"service","modelName":"Infra_v10_Service","modelVersion":"1.0","modelVersionId":"5df8b6de-2083-11e7-93ae-92361f002671"},"requestInfo":{"source":"VID","instanceName":"MSODEV_1707_SI_v10_011-4","suppressRollback":false,"requestorId":"xxxxxx"},"subscriberInfo":{"globalSubscriberId":"MSO_1610_dev","subscriberName":"MSO_1610_dev"},"cloudConfiguration":{"tenantId":"19123c2924c648eb8e42a3c1f14b7682","lcpCloudRegionId":"n6"},"requestParameters":{"subscriptionServiceType":"MSO-dev-service-type","userParams":[{"name":"someUserParam","value":"someValue"}],"aLaCarte":true,"autoBuildVfModules":false,"cascadeDelete":false,"usePreload":true}}', null, 'APIH', null, null, null, null, null, null, 'n6', null, null, null, null, null, 'service', 'createInstance', null, 'MSODEV_1707_SI_v10_011-4', 'xxxxxx', null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
+('001619d2-a297-4a4b-a9f5-e2823c88458f', 'COMPLETE', 'COMPLETED', '100', '2016-07-01 14:11:42', '2017-05-02 16:03:34', 'PORTAL', null, 'test-vscp', 'elena_test21', null, '381b9ff6c75e4625b7a4182f90fc68d3', null, null, '{"requestDetails": {"modelInfo":{"modelType":"vfModule","modelName":"test::base::module-0"},"requestInfo":{"source":"VID"},"cloudConfiguration":{"tenantId":"6accefef3cb442ff9e644d589fb04107","lcpCloudRegionId":"n6"}}}', 'NONE', 'RDBTEST', '2016-07-01 14:11:42', null, null, null, 'MODULENAME1', 'moduleModelName', 'mtn9', null, null, null, null, null, 'vfModule', 'createInstance', null, null, null, null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
+('5ffbabd6-b793-4377-a1ab-082670fbc7ac', 'PENDING', 'Vf Module deletion pending.', '0', '2016-12-22 18:59:54', '2016-12-22 19:00:28', 'VID', 'b92f60c8-8de3-46c1-8dc1-e4390ac2b005', null, null, null, '6accefef3cb442ff9e644d589fb04107', null, null, '{"requestDetails": {"modelInfo": {"modelType": "vfModule","modelName": "test::base::module-0","modelVersionId": "20c4431c-246d-11e7-93ae-92361f002671","modelInvariantId": "78ca26d0-246d-11e7-93ae-92361f002671","modelVersion": "2","modelCustomizationId": "cb82ffd8-252a-11e7-93ae-92361f002671"},"cloudConfiguration": {"lcpCloudRegionId": "n6","tenantId": "0422ffb57ba042c0800a29dc85ca70f8"},"requestInfo": {"instanceName": "MSO-DEV-VF-1806BB-v10-base-it2-1","source": "VID","suppressRollback": false,"requestorId": "xxxxxx"},"relatedInstanceList": [{"relatedInstance": {"instanceId": "76fa8849-4c98-473f-b431-2590b192a653","modelInfo": {"modelType": "service","modelName": "Infra_v10_Service","modelVersionId": "5df8b6de-2083-11e7-93ae-92361f002671","modelInvariantId": "9647dfc4-2083-11e7-93ae-92361f002671","modelVersion": "1.0"}}},{"relatedInstance": {"instanceId": "d57970e1-5075-48a5-ac5e-75f2d6e10f4c","modelInfo": {"modelType": "vnf","modelName": "v10","modelVersionId": "ff2ae348-214a-11e7-93ae-92361f002671","modelInvariantId": "2fff5b20-214b-11e7-93ae-92361f002671","modelVersion": "1.0","modelCustomizationId": "68dc9a92-214c-11e7-93ae-92361f002671","modelCustomizationName": "v10 1"}}}],"requestParameters": {"usePreload": true,"userParams": []}}}', null, 'BPMN', '2016-12-22 19:00:28', null, null, 'c7d527b1-7a91-49fd-b97d-1c8c0f4a7992', null, 'test::base::module-0', 'n6', null, null, null, null, null, 'vfModule', 'deleteInstance', 'e3b5744d-2ad1-4cdd-8390-c999a38829bc', null, null, null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances');
+
+INSERT INTO requestdb.infra_active_requests(REQUEST_ID, REQUEST_STATUS, STATUS_MESSAGE, PROGRESS, START_TIME, END_TIME, SOURCE, VNF_ID, VNF_NAME, VNF_TYPE, SERVICE_TYPE, TENANT_ID, VNF_PARAMS, VNF_OUTPUTS, REQUEST_BODY, RESPONSE_BODY, LAST_MODIFIED_BY, MODIFY_TIME, VOLUME_GROUP_ID, VOLUME_GROUP_NAME, VF_MODULE_ID, VF_MODULE_NAME, VF_MODULE_MODEL_NAME, CLOUD_REGION, CALLBACK_URL, CORRELATOR, NETWORK_ID, NETWORK_NAME, NETWORK_TYPE, REQUEST_SCOPE, REQUEST_ACTION, SERVICE_INSTANCE_ID, SERVICE_INSTANCE_NAME, REQUESTOR_ID, CONFIGURATION_ID, CONFIGURATION_NAME, OPERATIONAL_ENV_ID, OPERATIONAL_ENV_NAME, REQUEST_URL) VALUES
+('00164b9e-784d-48a8-8973-bbad6ef818ed', 'COMPLETE', 'Service Instance was created successfully.', '100', '2017-09-28 12:45:51', '2017-09-28 12:45:53', 'VID', null, null, null, null, '19123c2924c648eb8e42a3c1f14b7682', null, null, '{"modelInfo":{"modelCustomizationName":null,"modelInvariantId":"52b49b5d-3086-4ffd-b5e6-1b1e5e7e062f","modelType":"service","modelNameVersionId":null,"modelName":"MSO Test Network","modelVersion":"1.0","modelCustomizationUuid":null,"modelVersionId":"aed5a5b7-20d3-44f7-90a3-ddbd16f14d1e","modelCustomizationId":null,"modelUuid":null,"modelInvariantUuid":null,"modelInstanceName":null},"requestInfo":{"billingAccountNumber":null,"callbackUrl":null,"correlator":null,"orderNumber":null,"productFamilyId":null,"orderVersion":null,"source":"VID","instanceName":"DEV-n6-3100-0927-1","suppressRollback":false,"requestorId":"xxxxxx"},"relatedInstanceList":null,"subscriberInfo":{"globalSubscriberId":"MSO_1610_dev","subscriberName":"MSO_1610_dev"},"cloudConfiguration":{"aicNodeClli":null,"tenantId":"19123c2924c648eb8e42a3c1f14b7682","lcpCloudRegionId":"n6"},"requestParameters":{"subscriptionServiceType":"MSO-dev-service-type","userParams":[{"name":"someUserParam","value":"someValue"}],"aLaCarte":true,"autoBuildVfModules":false,"cascadeDelete":false,"usePreload":true},"project":null,"owningEntity":null,"platform":null,"lineOfBusiness":null}', null, 'CreateGenericALaCarteServiceInstance', '2017-09-28 12:45:52', null, null, null, null, null, 'n6', null, null, null, null, null, 'service', 'createInstance', 'b2f59173-b7e5-4e0f-8440-232fd601b865', 'DEV-n6-3100-0927-1', 'xxxxxx', null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
+('00173cc9-5ce2-4673-a810-f87fefb2829e', 'FAILED', 'Error parsing request. No valid instanceName is specified', '100', '2017-04-14 21:08:46', '2017-04-14 21:08:46', 'VID', null, null, null, null, 'a259ae7b7c3f493cb3d91f95a7c18149', null, null, '{"modelInfo":{"modelInvariantId":"ff6163d4-7214-459e-9f76-507b4eb00f51","modelType":"service","modelName":"ConstraintsSrvcVID","modelVersion":"2.0","modelVersionId":"722d256c-a374-4fba-a14f-a59b76bb7656"},"requestInfo":{"productFamilyId":"LRSI-OSPF","source":"VID","requestorId":"xxxxxx"},"subscriberInfo":{"globalSubscriberId":"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"},"cloudConfiguration":{"tenantId":"a259ae7b7c3f493cb3d91f95a7c18149","lcpCloudRegionId":"mtn16"},"requestParameters":{"subscriptionServiceType":"Mobility","userParams":[{"name":"neutronport6_name","value":"8"},{"name":"neutronnet5_network_name","value":"8"},{"name":"contrailv2vlansubinterface3_name","value":"false"}]}}', null, 'APIH', null, null, null, null, null, null, 'mtn16', null, null, null, null, null, 'service', 'createInstance', null, null, null, null, null, null, null, null),
+('0017f68c-eb2d-45bb-b7c7-ec31b37dc349', 'UNLOCKED', null, '20', '2017-09-26 16:09:29', null, 'VID', null, null, null, null, null, null, null, '{"modelInfo":{"modelCustomizationName":null,"modelInvariantId":"1587cf0e-f12f-478d-8530-5c55ac578c39","modelType":"configuration","modelNameVersionId":null,"modelName":null,"modelVersion":null,"modelCustomizationUuid":null,"modelVersionId":"36a3a8ea-49a6-4ac8-b06c-89a545444455","modelCustomizationId":"68dc9a92-214c-11e7-93ae-92361f002671","modelUuid":null,"modelInvariantUuid":null,"modelInstanceName":null},"requestInfo":{"billingAccountNumber":null,"callbackUrl":null,"correlator":null,"orderNumber":null,"productFamilyId":null,"orderVersion":null,"source":"VID","instanceName":null,"suppressRollback":false,"requestorId":"xxxxxx"},"relatedInstanceList":[{"relatedInstance":{"instanceName":null,"instanceId":"9e15a443-af65-4f05-9000-47ae495e937d","modelInfo":{"modelCustomizationName":null,"modelInvariantId":"de19ae10-9a25-11e7-abc4-cec278b6b50a","modelType":"service","modelNameVersionId":null,"modelName":"Infra_Configuration_Service","modelVersion":"1.0","modelCustomizationUuid":null,"modelVersionId":"ee938612-9a25-11e7-abc4-cec278b6b50a","modelCustomizationId":null,"modelUuid":null,"modelInvariantUuid":null,"modelInstanceName":null},"instanceDirection":null}}],"subscriberInfo":null,"cloudConfiguration":{"aicNodeClli":null,"tenantId":null,"lcpCloudRegionId":"n6"},"requestParameters":{"subscriptionServiceType":null,"userParams":[],"aLaCarte":false,"autoBuildVfModules":false,"cascadeDelete":false,"usePreload":true},"project":null,"owningEntity":null,"platform":null,"lineOfBusiness":null}', null, 'APIH', '2017-09-26 16:09:29', null, null, null, null, null, 'n6', null, null, null, null, null, 'configuration', 'activateInstance', '9e15a443-af65-4f05-9000-47ae495e937d', null, 'xxxxxx', '26ef7f15-57bb-48df-8170-e59edc26234c', null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
+('0017f68c-eb2d-45bb-b7c7-ec31b37dc350', 'IN_PROGRESS', 'Error parsing request.
+ No valid instanceName is specified', null, '2017-04-14 21:08:46', '2017-04-14 21:08:46', 'VID', '1882938', null, null, null, 'a259ae7b7c3f493cb3d91f95a7c18149', null, null, '{"serviceInstanceId":"1882939","vnfInstanceId":"1882938","networkInstanceId":"1882937","volumeGroupInstanceId":"1882935","vfModuleInstanceId":"1882934","requestDetails":{"requestInfo":{"source":"VID","requestorId":"xxxxxx","instanceName":"testService9"},"requestParameters":{"aLaCarte":true,"autoBuildVfModules":false,"subscriptionServiceType":"test"},"modelInfo":{"modelInvariantId":"f7ce78bb-423b-11e7-93f8-0050569a7965","modelVersion":"1","modelVersionId":"10","modelType":"service","modelName":"serviceModel","modelInstanceName":"modelInstanceName","modelCustomizationId":"f7ce78bb-423b-11e7-93f8-0050569a796"},"subscriberInfo":{"globalSubscriberId":"MSO_1610_dev","subscriberName":"MSO_1610_dev"}}}', null, 'APIH', null, '1882935', null, '1882934', null, null, 'mtn16', null, null, null, null, null, 'service', 'createInstance', '1882939', 'testService10', 'xxxxxx', 'test', null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances');
INSERT INTO requestdb.site_status(SITE_NAME, STATUS, CREATION_TIMESTAMP) VALUES
('testSite', 0, '2017-11-30 15:48:09');
-
-
INSERT INTO requestdb.activate_operational_env_service_model_distribution_status(OPERATIONAL_ENV_ID, SERVICE_MODEL_VERSION_ID, REQUEST_ID, SERVICE_MOD_VER_FINAL_DISTR_STATUS, RECOVERY_ACTION, RETRY_COUNT_LEFT, WORKLOAD_CONTEXT, CREATE_TIME, MODIFY_TIME, VNF_OPERATIONAL_ENV_ID) VALUES
('1dfe7154-eae0-44f2-8e7a-8e5e7882e55d', '37305814-4949-45ce-ae24-c378c7ed07d1', '483646fe-36cc-4e90-895a-c472f6da3f74', 'DISTRIBUTION_COMPLETE_OK', 'RETRY', 0, 'VNF_D2D', '2018-02-02 18:44:27', '2018-02-02 18:45:06', 'vnf_1234'),
('1dfe7154-eae0-44f2-8e7a-8e5e7882e55d', '7bfa2197-8cbb-4080-b369-56c4d53c4573', '483646fe-36cc-4e90-895a-c472f6da3f74', 'DISTRIBUTION_COMPLETE_OK', 'SKIP', 0, 'VNF_D2D', '2018-02-02 18:44:27', '2018-02-02 18:44:56', 'vnf_1235');
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/schema.sql b/mso-api-handlers/mso-api-handler-infra/src/test/resources/schema.sql
index 2129dc2ede..55db69b9d2 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/schema.sql
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/schema.sql
@@ -809,6 +809,10 @@ CREATE TABLE `service` (
`OVERALL_DISTRIBUTION_STATUS` varchar(45),
`ONAP_GENERATED_NAMING` TINYINT(1) DEFAULT NULL,
`NAMING_POLICY` varchar(200) DEFAULT NULL,
+ `CDS_BLUEPRINT_NAME` varchar(200) DEFAULT NULL,
+ `CDS_BLUEPRINT_VERSION` varchar(20) DEFAULT NULL,
+ `CONTROLLER_ACTOR` varchar(200) DEFAULT NULL,
+ `SKIP_POST_INSTANTIATION_CONFIGURATION` boolean default true,
PRIMARY KEY (`MODEL_UUID`),
KEY `fk_service__tosca_csar1_idx` (`TOSCA_CSAR_ARTIFACT_UUID`),
CONSTRAINT `fk_service__tosca_csar1` FOREIGN KEY (`TOSCA_CSAR_ARTIFACT_UUID`) REFERENCES `tosca_csar` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
@@ -963,6 +967,7 @@ CREATE TABLE `vf_module_customization` (
`CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`VF_MODULE_MODEL_UUID` varchar(200) NOT NULL,
`VNF_RESOURCE_CUSTOMIZATION_ID` int(13) DEFAULT NULL,
+ `SKIP_POST_INSTANTIATION_CONFIGURATION` boolean default true,
PRIMARY KEY (`ID`),
KEY `fk_vf_module_customization__vf_module1_idx` (`VF_MODULE_MODEL_UUID`),
KEY `fk_vf_module_customization__heat_env__heat_environment1_idx` (`HEAT_ENVIRONMENT_ARTIFACT_UUID`),
@@ -1113,6 +1118,7 @@ CREATE TABLE `vnf_resource_customization` (
`SERVICE_MODEL_UUID` varchar(200) NOT NULL,
`NF_DATA_VALID` tinyint(1) DEFAULT '0',
`VNFCINSTANCEGROUP_ORDER` varchar(200) default NULL,
+ `CONTROLLER_ACTOR` varchar(200) DEFAULT NULL,
PRIMARY KEY (`ID`),
UNIQUE KEY `UK_vnf_resource_customization` (`MODEL_CUSTOMIZATION_UUID`,`SERVICE_MODEL_UUID`),
KEY `fk_vnf_resource_customization__vnf_resource1_idx` (`VNF_RESOURCE_MODEL_UUID`),
@@ -1193,6 +1199,7 @@ CREATE TABLE IF NOT EXISTS `pnf_resource_customization` (
`RESOURCE_INPUT` varchar(2000) DEFAULT NULL,
`CDS_BLUEPRINT_NAME` varchar(200) DEFAULT NULL,
`CDS_BLUEPRINT_VERSION` varchar(20) DEFAULT NULL,
+ `CONTROLLER_ACTOR` varchar(200) DEFAULT NULL,
PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`),
KEY `fk_pnf_resource_customization__pnf_resource1_idx` (`PNF_RESOURCE_MODEL_UUID`),
CONSTRAINT `fk_pnf_resource_customization__pnf_resource1` FOREIGN KEY (`PNF_RESOURCE_MODEL_UUID`) REFERENCES `pnf_resource` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
@@ -1248,8 +1255,6 @@ USE requestdb;
CREATE TABLE `infra_active_requests` (
`REQUEST_ID` varchar(45) NOT NULL,
- `CLIENT_REQUEST_ID` varchar(45) DEFAULT NULL,
- `ACTION` varchar(45) DEFAULT NULL,
`REQUEST_STATUS` varchar(20) DEFAULT NULL,
`STATUS_MESSAGE` longtext DEFAULT NULL,
`PROGRESS` bigint(20) DEFAULT NULL,
@@ -1260,22 +1265,18 @@ CREATE TABLE `infra_active_requests` (
`VNF_NAME` varchar(80) DEFAULT NULL,
`VNF_TYPE` varchar(200) DEFAULT NULL,
`SERVICE_TYPE` varchar(45) DEFAULT NULL,
- `AIC_NODE_CLLI` varchar(11) DEFAULT NULL,
`TENANT_ID` varchar(45) DEFAULT NULL,
- `PROV_STATUS` varchar(20) DEFAULT NULL,
`VNF_PARAMS` longtext,
`VNF_OUTPUTS` longtext,
`REQUEST_BODY` longtext,
`RESPONSE_BODY` longtext,
`LAST_MODIFIED_BY` varchar(100) DEFAULT NULL,
`MODIFY_TIME` datetime DEFAULT NULL,
- `REQUEST_TYPE` varchar(20) DEFAULT NULL,
`VOLUME_GROUP_ID` varchar(45) DEFAULT NULL,
`VOLUME_GROUP_NAME` varchar(45) DEFAULT NULL,
`VF_MODULE_ID` varchar(45) DEFAULT NULL,
`VF_MODULE_NAME` varchar(200) DEFAULT NULL,
`VF_MODULE_MODEL_NAME` varchar(200) DEFAULT NULL,
- `AAI_SERVICE_ID` varchar(50) DEFAULT NULL,
`CLOUD_REGION` varchar(11) DEFAULT NULL,
`CALLBACK_URL` varchar(200) DEFAULT NULL,
`CORRELATOR` varchar(80) DEFAULT NULL,
@@ -1295,14 +1296,11 @@ CREATE TABLE `infra_active_requests` (
`ORIGINAL_REQUEST_ID` varchar(45) DEFAULT NULL,
`EXT_SYSTEM_ERROR_SOURCE` varchar(80) DEFAULT NULL,
`ROLLBACK_EXT_SYSTEM_ERROR_SOURCE` varchar(80) DEFAULT NULL,
- PRIMARY KEY (`REQUEST_ID`),
- UNIQUE KEY `UK_bhu6w8p7wvur4pin0gjw2d5ak` (`CLIENT_REQUEST_ID`)
+ PRIMARY KEY (`REQUEST_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE `archived_infra_requests` (
`REQUEST_ID` varchar(45) NOT NULL,
- `CLIENT_REQUEST_ID` varchar(45) DEFAULT NULL,
- `ACTION` varchar(45) DEFAULT NULL,
`REQUEST_STATUS` varchar(20) DEFAULT NULL,
`STATUS_MESSAGE` longtext DEFAULT NULL,
`PROGRESS` bigint(20) DEFAULT NULL,
@@ -1313,22 +1311,18 @@ CREATE TABLE `archived_infra_requests` (
`VNF_NAME` varchar(80) DEFAULT NULL,
`VNF_TYPE` varchar(200) DEFAULT NULL,
`SERVICE_TYPE` varchar(45) DEFAULT NULL,
- `AIC_NODE_CLLI` varchar(11) DEFAULT NULL,
`TENANT_ID` varchar(45) DEFAULT NULL,
- `PROV_STATUS` varchar(20) DEFAULT NULL,
`VNF_PARAMS` longtext,
`VNF_OUTPUTS` longtext,
`REQUEST_BODY` longtext,
`RESPONSE_BODY` longtext,
`LAST_MODIFIED_BY` varchar(100) DEFAULT NULL,
`MODIFY_TIME` datetime DEFAULT NULL,
- `REQUEST_TYPE` varchar(20) DEFAULT NULL,
`VOLUME_GROUP_ID` varchar(45) DEFAULT NULL,
`VOLUME_GROUP_NAME` varchar(45) DEFAULT NULL,
`VF_MODULE_ID` varchar(45) DEFAULT NULL,
`VF_MODULE_NAME` varchar(200) DEFAULT NULL,
`VF_MODULE_MODEL_NAME` varchar(200) DEFAULT NULL,
- `AAI_SERVICE_ID` varchar(50) DEFAULT NULL,
`CLOUD_REGION` varchar(11) DEFAULT NULL,
`CALLBACK_URL` varchar(200) DEFAULT NULL,
`CORRELATOR` varchar(80) DEFAULT NULL,
@@ -1345,8 +1339,7 @@ CREATE TABLE `archived_infra_requests` (
`OPERATIONAL_ENV_ID` varchar(45) DEFAULT NULL,
`OPERATIONAL_ENV_NAME` varchar(200) DEFAULT NULL,
`REQUEST_URL` varchar(500) DEFAULT NULL,
- PRIMARY KEY (`REQUEST_ID`),
- UNIQUE KEY `UK_bhu6w8p7wvur4pin0gjw2d59h` (`CLIENT_REQUEST_ID`)
+ PRIMARY KEY (`REQUEST_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE `site_status` (
diff --git a/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/ArchivedInfraRequestsRepository.java b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/ArchivedInfraRequestsRepository.java
index 8566afe9e1..485ed8357f 100644
--- a/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/ArchivedInfraRequestsRepository.java
+++ b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/ArchivedInfraRequestsRepository.java
@@ -29,7 +29,5 @@ import org.springframework.data.rest.core.annotation.RepositoryRestResource;
@RepositoryRestResource(collectionResourceRel = "archivedInfraRequests", path = "archivedInfraRequests")
public interface ArchivedInfraRequestsRepository extends JpaRepository<ArchivedInfraRequests, String> {
- List<InfraActiveRequests> findByActionAndRequestStatusAndVfModuleId(String action, String requestStatus,
- String vfModuleId);
}
diff --git a/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepository.java b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepository.java
index a14699827d..257e319ce5 100644
--- a/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepository.java
+++ b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepository.java
@@ -25,6 +25,7 @@ import java.util.List;
import org.onap.so.db.request.beans.InfraActiveRequests;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.Query;
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
@@ -32,14 +33,6 @@ import org.springframework.data.rest.core.annotation.RepositoryRestResource;
public interface InfraActiveRequestsRepository
extends JpaRepository<InfraActiveRequests, String>, InfraActiveRequestsRepositoryCustom {
- InfraActiveRequests findOneByRequestIdOrClientRequestId(String requestId, String clientRequestId);
-
- InfraActiveRequests findOneByRequestIdOrClientRequestIdAndRequestType(String requestId, String clientRequestId,
- String requestType);
-
- List<InfraActiveRequests> findByActionAndRequestStatusAndVfModuleId(String action, String requestStatus,
- String vfModuleId);
-
InfraActiveRequests findOneByRequestId(String string);
InfraActiveRequests findOneByRequestBody(String requestBody);
@@ -47,4 +40,8 @@ public interface InfraActiveRequestsRepository
List<InfraActiveRequests> findByEndTimeLessThan(Date endTime, Pageable request);
List<InfraActiveRequests> findByStartTimeLessThanAndEndTime(Date startTime, Date endTime, Pageable request);
+
+ @Query(value = "SELECT * FROM infra_active_requests WHERE request_status = 'IN_PROGRESS' AND (request_scope = 'volumeGroup' OR request_scope = 'vfModule') AND start_time < (NOW() - INTERVAL 2 MINUTE)",
+ nativeQuery = true)
+ List<InfraActiveRequests> getInProgressVolumeGroupsAndVfModules();
}
diff --git a/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryCustom.java b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryCustom.java
index 5a8e2e2f6c..1c32e03c84 100644
--- a/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryCustom.java
+++ b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryCustom.java
@@ -47,10 +47,6 @@ public interface InfraActiveRequestsRepositoryCustom {
public InfraActiveRequests getRequestFromInfraActive(String requestId, String requestType);
- public InfraActiveRequests checkDuplicateByVnfName(String vnfName, String action, String requestType);
-
- public InfraActiveRequests checkDuplicateByVnfId(String vnfId, String action, String requestType);
-
public InfraActiveRequests checkVnfIdStatus(String operationalEnvironmentId);
List<InfraActiveRequests> getInfraActiveRequests(final Map<String, String[]> filters, final long startTime,
diff --git a/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryImpl.java b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryImpl.java
index ad1e46a1c6..445fd6355f 100644
--- a/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryImpl.java
+++ b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryImpl.java
@@ -24,11 +24,9 @@ package org.onap.so.db.request.data.repository;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
-import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
-import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
@@ -67,7 +65,6 @@ public class InfraActiveRequestsRepositoryImpl implements InfraActiveRequestsRep
protected static final String SOURCE = "source";
protected static final String START_TIME = "startTime";
protected static final String END_TIME = "endTime";
- protected static final String REQUEST_TYPE = "requestType";
protected static final String SERVICE_INSTANCE_ID = "serviceInstanceId";
protected static final String SERVICE_INSTANCE_NAME = "serviceInstanceName";
protected static final String VNF_INSTANCE_NAME = "vnfName";
@@ -88,12 +85,11 @@ public class InfraActiveRequestsRepositoryImpl implements InfraActiveRequestsRep
protected static final String SERVICE_VERSION = "serviceVersion";
protected static final String REQUEST_ID = "requestId";
protected static final String REQUESTOR_ID = "requestorId";
- protected static final String ACTION = "action";
protected static final String OPENV = "operationalEnvironment";
private static final List<String> VALID_COLUMNS =
- Arrays.asList(REQUEST_ID, SERVICE_INSTANCE_ID, SERVICE_INSTANCE_NAME, ACTION, REQUEST_STATUS,
- VFMODULE_INSTANCE_ID, VNF_INSTANCE_ID, NETWORK_INSTANCE_ID, VOLUME_GROUP_INSTANCE_ID);
+ Arrays.asList(REQUEST_ID, SERVICE_INSTANCE_ID, SERVICE_INSTANCE_NAME, REQUEST_STATUS, VFMODULE_INSTANCE_ID,
+ VNF_INSTANCE_ID, NETWORK_INSTANCE_ID, VOLUME_GROUP_INSTANCE_ID);
/*
@@ -132,10 +128,11 @@ public class InfraActiveRequestsRepositoryImpl implements InfraActiveRequestsRep
public InfraActiveRequests getRequestFromInfraActive(final String requestId) {
logger.debug("Get request {} from InfraActiveRequests DB", requestId);
- final Query query = entityManager
- .createQuery("from InfraActiveRequests where requestId = :requestId OR clientRequestId = :requestId");
+ InfraActiveRequests ar = null;
+ final Query query = entityManager.createQuery("from InfraActiveRequests where requestId = :requestId");
query.setParameter(REQUEST_ID, requestId);
- return this.getSingleResult(query);
+ ar = this.getSingleResult(query);
+ return ar;
}
/*
@@ -235,6 +232,7 @@ public class InfraActiveRequestsRepositoryImpl implements InfraActiveRequestsRep
public List<InfraActiveRequests> getOrchestrationFiltersFromInfraActive(
final Map<String, List<String>> orchestrationMap) {
+
final List<Predicate> predicates = new LinkedList<>();
final CriteriaBuilder cb = entityManager.getCriteriaBuilder();
final CriteriaQuery<InfraActiveRequests> crit = cb.createQuery(InfraActiveRequests.class);
@@ -385,12 +383,8 @@ public class InfraActiveRequestsRepositoryImpl implements InfraActiveRequestsRep
final CriteriaQuery<InfraActiveRequests> crit = cb.createQuery(InfraActiveRequests.class);
final Root<InfraActiveRequests> candidateRoot = crit.from(InfraActiveRequests.class);
final Predicate isEqual = cb.equal(candidateRoot.get(queryAttributeName), queryValue);
- final Predicate equalRequestType = cb.equal(candidateRoot.get(REQUEST_TYPE), requestType);
- final Predicate isNull = cb.isNull(candidateRoot.get(REQUEST_TYPE));
- final Predicate orClause = cb.or(equalRequestType, isNull);
final Order orderDesc = cb.desc(candidateRoot.get(START_TIME));
final Order orderAsc = cb.asc(candidateRoot.get(SOURCE));
- crit.where(cb.and(isEqual, orClause)).orderBy(orderDesc, orderAsc);
final List<InfraActiveRequests> arList = entityManager.createQuery(crit).getResultList();
if (arList != null && !arList.isEmpty()) {
@@ -413,68 +407,12 @@ public class InfraActiveRequestsRepositoryImpl implements InfraActiveRequestsRep
public InfraActiveRequests getRequestFromInfraActive(final String requestId, final String requestType) {
logger.debug("Get infra request from DB with id {}", requestId);
- final Query query = entityManager.createQuery(
- "from InfraActiveRequests where (requestId = :requestId OR clientRequestId = :requestId) and requestType = :requestType");
- query.setParameter(REQUEST_ID, requestId);
- query.setParameter(REQUEST_TYPE, requestType);
- return this.getSingleResult(query);
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.onap.so.requestsdb.InfraActiveRequestsRepositoryCustom#checkDuplicateByVnfName(java.lang. String,
- * java.lang.String, java.lang.String)
- */
- @Override
- public InfraActiveRequests checkDuplicateByVnfName(final String vnfName, final String action,
- final String requestType) {
-
- logger.debug("Get infra request from DB for VNF {} and action {} and requestType {}", vnfName, action,
- requestType);
-
InfraActiveRequests ar = null;
- final Query query = entityManager.createQuery(
- "from InfraActiveRequests where vnfName = :vnfName and action = :action and (requestStatus = 'PENDING' or requestStatus = 'IN_PROGRESS' or requestStatus = 'TIMEOUT' or requestStatus = 'PENDING_MANUAL_TASK') and requestType = :requestType ORDER BY startTime DESC");
- query.setParameter("vnfName", vnfName);
- query.setParameter("action", action);
- query.setParameter(REQUEST_TYPE, requestType);
- @SuppressWarnings("unchecked")
- final List<InfraActiveRequests> results = query.getResultList();
- if (!results.isEmpty()) {
- ar = results.get(0);
- }
-
- return ar;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.onap.so.requestsdb.InfraActiveRequestsRepositoryCustom#checkDuplicateByVnfId(java.lang. String,
- * java.lang.String, java.lang.String)
- */
- @Override
- public InfraActiveRequests checkDuplicateByVnfId(final String vnfId, final String action,
- final String requestType) {
-
- logger.debug("Get list of infra requests from DB for VNF {} and action {}", vnfId, action);
-
- InfraActiveRequests ar = null;
-
- final Query query = entityManager.createQuery(
- "from InfraActiveRequests where vnfId = :vnfId and action = :action and (requestStatus = 'PENDING' or requestStatus = 'IN_PROGRESS' or requestStatus = 'TIMEOUT' or requestStatus = 'PENDING_MANUAL_TASK') and requestType = :requestType ORDER BY startTime DESC");
- query.setParameter("vnfId", vnfId);
- query.setParameter("action", action);
- query.setParameter(REQUEST_TYPE, requestType);
- @SuppressWarnings("unchecked")
- final List<InfraActiveRequests> results = query.getResultList();
- if (!results.isEmpty()) {
- ar = results.get(0);
- }
-
+ final Query query = entityManager
+ .createQuery("from InfraActiveRequests where requestId = :requestId and requestType = :requestType");
+ query.setParameter(REQUEST_ID, requestId);
+ ar = this.getSingleResult(query);
return ar;
}
@@ -494,10 +432,9 @@ public class InfraActiveRequestsRepositoryImpl implements InfraActiveRequestsRep
final Root<InfraActiveRequests> candidateRoot = crit.from(InfraActiveRequests.class);
final Predicate operationalEnvEq = cb.equal(candidateRoot.get("operationalEnvId"), operationalEnvironmentId);
final Predicate requestStatusNotEq = cb.notEqual(candidateRoot.get(REQUEST_STATUS), "COMPLETE");
- final Predicate actionEq = cb.equal(candidateRoot.get("action"), "create");
final Order startTimeOrder = cb.desc(candidateRoot.get("startTime"));
crit.select(candidateRoot);
- crit.where(cb.and(operationalEnvEq, requestStatusNotEq, actionEq));
+ crit.where(cb.and(operationalEnvEq, requestStatusNotEq));
crit.orderBy(startTimeOrder);
final TypedQuery<InfraActiveRequests> query = entityManager.createQuery(crit);
final List<InfraActiveRequests> results = query.getResultList();
diff --git a/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/RequestProcessingDataRepository.java b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/RequestProcessingDataRepository.java
index 708171366d..cb02b7c491 100644
--- a/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/RequestProcessingDataRepository.java
+++ b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/RequestProcessingDataRepository.java
@@ -39,6 +39,9 @@ public interface RequestProcessingDataRepository extends JpaRepository<RequestPr
List<RequestProcessingData> findBySoRequestIdOrderByGroupingIdDesc(@Param("SO_REQUEST_ID") String soRequestId);
+ RequestProcessingData[] findBySoRequestIdAndIsDataInternalOrderByGroupingIdDesc(
+ @Param("SO_REQUEST_ID") String soRequestId, @Param("IS_INTERNAL_DATA") Boolean isDataInternal);
+
List<RequestProcessingData> findByGroupingIdAndNameAndTag(@Param("GROUPING_ID") String groupingId,
@Param("NAME") String name, @Param("TAG") String tag);
}
diff --git a/mso-api-handlers/mso-requests-db-repositories/src/test/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryImplTest.java b/mso-api-handlers/mso-requests-db-repositories/src/test/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryImplTest.java
index ca30604e06..3df30c0f49 100644
--- a/mso-api-handlers/mso-requests-db-repositories/src/test/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryImplTest.java
+++ b/mso-api-handlers/mso-requests-db-repositories/src/test/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryImplTest.java
@@ -28,7 +28,6 @@ import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.mock;
-import static org.onap.so.db.request.data.repository.InfraActiveRequestsRepositoryImpl.ACTION;
import static org.onap.so.db.request.data.repository.InfraActiveRequestsRepositoryImpl.REQUEST_ID;
import static org.onap.so.db.request.data.repository.InfraActiveRequestsRepositoryImpl.SERVICE_INSTANCE_ID;
import java.util.Collections;
@@ -142,59 +141,6 @@ public class InfraActiveRequestsRepositoryImplTest {
assertEquals(SERVICE_INSTANCE_ID_VALUE, actualRequests.get(0).getServiceInstanceId());
}
-
- @Test
- public void test_GetInfraActiveRequestsData_withNotEqualAction() {
- final Map<String, String[]> values = new HashMap<>();
- values.put(ACTION, new String[] {QueryOperationType.NEQ.name(), "createInstance"});
- final List<InfraActiveRequests> actualRequests =
- objUnderTest.getInfraActiveRequests(values, START_TIME_IN_MILISEC, END_TIME_IN_MILISEC, null);
- assertFalse(actualRequests.isEmpty());
- for (final InfraActiveRequests actualActiveRequests : actualRequests) {
- assertNotEquals("createInstance", actualActiveRequests.getAction());
- }
- }
-
-
- @Test
- public void test_GetInfraActiveRequestsData_withNotEqualToServiceInstanceNameAndServiceInstanceIdNul() {
- final Map<String, String[]> values = new HashMap<>();
- values.put(ACTION, new String[] {QueryOperationType.NEQ.name(), "createInstance"});
- values.put(SERVICE_INSTANCE_ID, new String[] {QueryOperationType.EQ.name(), SERVICE_INSTANCE_ID_VALUE});
-
- final List<InfraActiveRequests> actualRequests =
- objUnderTest.getInfraActiveRequests(values, START_TIME_IN_MILISEC, END_TIME_IN_MILISEC, null);
- assertFalse(actualRequests.isEmpty());
- for (final InfraActiveRequests actualActiveRequests : actualRequests) {
- assertNotEquals("createInstance", actualActiveRequests.getAction());
- assertEquals(SERVICE_INSTANCE_ID_VALUE, actualActiveRequests.getServiceInstanceId());
- }
- }
-
- @Test
- public void test_GetInfraActiveRequestsData_withStartEndDateTimeNotEqualAction() {
- final Map<String, String[]> values = new HashMap<>();
- values.put(ACTION, new String[] {QueryOperationType.NEQ.name(), "createInstance"});
- final List<InfraActiveRequests> actualRequests =
- objUnderTest.getInfraActiveRequests(values, START_TIME_IN_MILISEC, END_TIME_IN_MILISEC, null);
- assertFalse(actualRequests.isEmpty());
- for (final InfraActiveRequests actualActiveRequests : actualRequests) {
- assertNotEquals("createInstance", actualActiveRequests.getAction());
- }
- }
-
- @Test
- public void test_GetInfraActiveRequestsData_withLimitNotEqualAction() {
- final Map<String, String[]> values = new HashMap<>();
- values.put(ACTION, new String[] {QueryOperationType.NEQ.name(), "createInstance"});
- final List<InfraActiveRequests> actualRequests =
- objUnderTest.getInfraActiveRequests(values, START_TIME_IN_MILISEC, END_TIME_IN_MILISEC, MAX_LIMIT);
- assertFalse(actualRequests.isEmpty());
- for (final InfraActiveRequests actualActiveRequests : actualRequests) {
- assertNotEquals("createInstance", actualActiveRequests.getAction());
- }
- }
-
@Test
public void test_GetInfraActiveRequestsData_withNullFilters() {
final List<InfraActiveRequests> actualRequests =
diff --git a/mso-api-handlers/mso-requests-db-repositories/src/test/resources/afterMigrate.sql b/mso-api-handlers/mso-requests-db-repositories/src/test/resources/afterMigrate.sql
index bfd3d2160a..209a341b74 100644
--- a/mso-api-handlers/mso-requests-db-repositories/src/test/resources/afterMigrate.sql
+++ b/mso-api-handlers/mso-requests-db-repositories/src/test/resources/afterMigrate.sql
@@ -4,13 +4,13 @@ insert into operation_status(service_id, operation_id, service_name, user_id, re
('serviceid', 'operationid', 'servicename', 'userid', 'result', 'operationcontent', 'progress', 'reason', '2016-11-24 13:19:10', '2016-11-24 13:19:10');
-insert into infra_active_requests(request_id, client_request_id, action, request_status, status_message, progress, start_time, end_time, source, vnf_id, vnf_name, vnf_type, service_type, aic_node_clli, tenant_id, prov_status, vnf_params, vnf_outputs, request_body, response_body, last_modified_by, modify_time, request_type, volume_group_id, volume_group_name, vf_module_id, vf_module_name, vf_module_model_name, aai_service_id, cloud_region, callback_url, correlator, network_id, network_name, network_type, request_scope, request_action, service_instance_id, service_instance_name, requestor_id, configuration_id, configuration_name, operational_env_id, operational_env_name, request_url) values
-('00032ab7-3fb3-42e5-965d-8ea592502017', '00032ab7-3fb3-42e5-965d-8ea592502016', 'deleteInstance', 'COMPLETE', 'Vf Module has been deleted successfully.', '100', '2016-12-22 18:59:54', '2016-12-22 19:00:28', 'VID', 'b92f60c8-8de3-46c1-8dc1-e4390ac2b005', null, null, null, null, '6accefef3cb442ff9e644d589fb04107', null, null, null, '{"requestDetails":{"modelInfo":{"modelType":"vfModule","modelName":"vSAMP10aDEV::base::module-0"},"requestInfo":{"source":"VID"},"cloudConfiguration":{"tenantId":"6accefef3cb442ff9e644d589fb04107","lcpCloudRegionId":"mtn6"}}}', null, 'BPMN', '2016-12-22 19:00:28', null, null, null, 'c7d527b1-7a91-49fd-b97d-1c8c0f4a7992', null, 'vSAMP10aDEV::base::module-0', null, 'mtn6', null, null, null, null, null, 'vfModule', 'deleteInstance', 'e3b5744d-2ad1-4cdd-8390-c999a38829bc', null, null, null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
-('00093944-bf16-4373-ab9a-3adfe730ff2d', null, 'createInstance', 'FAILED', 'Error: Locked instance - This service (MSODEV_1707_SI_vSAMP10a_011-4) already has a request being worked with a status of IN_PROGRESS (RequestId - 278e83b1-4f9f-450e-9e7d-3700a6ed22f4). The existing request must finish or be cleaned up before proceeding.', '100', '2017-07-11 18:33:26', '2017-07-11 18:33:26', 'VID', null, null, null, null, null, '19123c2924c648eb8e42a3c1f14b7682', null, null, null, '{"requestDetails":{"modelInfo":{"modelInvariantId":"9647dfc4-2083-11e7-93ae-92361f002671","modelType":"service","modelName":"MSOTADevInfra_vSAMP10a_Service","modelVersion":"1.0","modelVersionId":"5df8b6de-2083-11e7-93ae-92361f002671"},"requestInfo":{"source":"VID","instanceName":"MSODEV_1707_SI_vSAMP10a_011-4","suppressRollback":false,"requestorId":"xxxxxx"},"subscriberInfo":{"globalSubscriberId":"MSO_1610_dev","subscriberName":"MSO_1610_dev"},"cloudConfiguration":{"tenantId":"19123c2924c648eb8e42a3c1f14b7682","lcpCloudRegionId":"mtn6"},"requestParameters":{"subscriptionServiceType":"MSO-dev-service-type","userParams":[{"name":"someUserParam","value":"someValue"}],"aLaCarte":true,"autoBuildVfModules":false,"cascadeDelete":false,"usePreload":true,"alaCarteSet":true,"alaCarte":true}}}', null, 'APIH', '2016-12-22 19:00:28', null, null, null, null, null, null, null, 'mtn6', null, null, null, null, null, 'service', 'createInstance', null, 'MSODEV_1707_SI_vSAMP10a_011-4', 'xxxxxx', null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
-('001619d2-a297-4a4b-a9f5-e2823c88458f', '001619d2-a297-4a4b-a9f5-e2823c88458f', 'CREATE_VF_MODULE', 'COMPLETE', 'COMPLETED', '100', '2016-07-01 14:11:42', '2017-05-02 16:03:34', 'PORTAL', null, 'test-vscp', 'elena_test21', null, null, '381b9ff6c75e4625b7a4182f90fc68d3', null, null, null, '<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<vnf-request xmlns=\"http://org.onap.so/mso/infra/vnf-request/v1\">\n <request-info>\n <request-id>001619d2-a297-4a4b-a9f5-e2823c88458f</request-id>\n <action>CREATE_VF_MODULE</action>\n <source>PORTAL</source>\n </request-info>\n <vnf-inputs>\n <vnf-name>test-vscp</vnf-name>\n <vf-module-name>moduleName</vf-module-name>\n <vnf-type>elena_test21</vnf-type>\n <vf-module-model-name>moduleModelName</vf-module-model-name>\n <asdc-service-model-version>1.0</asdc-service-model-version>\n <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>\n <aic-cloud-region>mtn9</aic-cloud-region>\n <tenant-id>381b9ff6c75e4625b7a4182f90fc68d3</tenant-id>\n <persona-model-id></persona-model-id>\n <persona-model-version></persona-model-version>\n <is-base-vf-module>false</is-base-vf-module>\n </vnf-inputs>\n <vnf-params xmlns:tns=\"http://org.onap.so/mso/infra/vnf-request/v1\"/>\n</vnf-request>\n', 'NONE', 'RDBTEST', '2016-07-01 14:11:42', 'VNF', null, null, null, 'MODULENAME1', 'moduleModelName', 'a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb', 'mtn9', null, null, null, null, null, 'vfModule', 'createInstance', null, null, null, null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
-('00164b9e-784d-48a8-8973-bbad6ef818ed', null, 'createInstance', 'COMPLETE', 'Service Instance was created successfully.', '100', '2017-09-28 12:45:51', '2017-09-28 12:45:53', 'VID', null, null, null, null, null, '19123c2924c648eb8e42a3c1f14b7682', null, null, null, '{"requestDetails":{"requestDetails":{"modelInfo":{"modelCustomizationName":null,"modelInvariantId":"52b49b5d-3086-4ffd-b5e6-1b1e5e7e062f","modelType":"service","modelNameVersionId":null,"modelName":"MSO Test Network","modelVersion":"1.0","modelCustomizationUuid":null,"modelVersionId":"aed5a5b7-20d3-44f7-90a3-ddbd16f14d1e","modelCustomizationId":null,"modelUuid":null,"modelInvariantUuid":null,"modelInstanceName":null},"requestInfo":{"billingAccountNumber":null,"callbackUrl":null,"correlator":null,"orderNumber":null,"productFamilyId":null,"orderVersion":null,"source":"VID","instanceName":"DEV-MTN6-3100-0927-1","suppressRollback":false,"requestorId":"xxxxxx"},"relatedInstanceList":null,"subscriberInfo":{"globalSubscriberId":"MSO_1610_dev","subscriberName":"MSO_1610_dev"},"cloudConfiguration":{"aicNodeClli":null,"tenantId":"19123c2924c648eb8e42a3c1f14b7682","lcpCloudRegionId":"mtn6"},"requestParameters":{"subscriptionServiceType":"MSO-dev-service-type","userParams":[{"name":"someUserParam","value":"someValue"}],"aLaCarte":true,"autoBuildVfModules":false,"cascadeDelete":false,"usePreload":true,"alaCarte":true},"project":null,"owningEntity":null,"platform":null,"lineOfBusiness":null}}}', null, 'CreateGenericALaCarteServiceInstance', '2017-09-28 12:45:52', null, null, null, null, null, null, null, 'mtn6', null, null, null, null, null, 'service', 'createInstance', 'b2f59173-b7e5-4e0f-8440-232fd601b865', 'DEV-MTN6-3100-0927-1', 'xxxxxx', null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
-('00173cc9-5ce2-4673-a810-f87fefb2829e', null, 'createInstance', 'FAILED', 'Error parsing request. No valid instanceName is specified', '100', '2017-04-14 21:08:46', '2017-04-14 21:08:46', 'VID', null, null, null, null, null, 'a259ae7b7c3f493cb3d91f95a7c18149', null, null, null, '{"requestDetails":{"modelInfo":{"modelInvariantId":"ff6163d4-7214-459e-9f76-507b4eb00f51","modelType":"service","modelName":"ConstraintsSrvcVID","modelVersion":"2.0","modelVersionId":"722d256c-a374-4fba-a14f-a59b76bb7656"},"requestInfo":{"productFamilyId":"LRSI-OSPF","source":"VID","requestorId":"xxxxxx"},"subscriberInfo":{"globalSubscriberId":"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"},"cloudConfiguration":{"tenantId":"a259ae7b7c3f493cb3d91f95a7c18149","lcpCloudRegionId":"mtn16"},"requestParameters":{"subscriptionServiceType":"Mobility","userParams":[{"name":"neutronport6_name","value":"8"},{"name":"neutronnet5_network_name","value":"8"},{"name":"contrailv2vlansubinterface3_name","value":"false"}]}}}', null, 'APIH', '2016-12-22 19:00:28', null, null, null, null, null, null, null, 'mtn16', null, null, null, null, null, 'service', 'createInstance', null, null, null, null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
-('0017f68c-eb2d-45bb-b7c7-ec31b37dc349', null, 'activateInstance', 'UNLOCKED', null, '20', '2017-09-26 16:09:29', '2017-09-28 12:45:53', 'VID', null, null, null, null, null, null, null, null, null, '{"requestDetails":{"modelInfo":{"modelCustomizationName":null,"modelInvariantId":"1587cf0e-f12f-478d-8530-5c55ac578c39","modelType":"configuration","modelNameVersionId":null,"modelName":null,"modelVersion":null,"modelCustomizationUuid":null,"modelVersionId":"36a3a8ea-49a6-4ac8-b06c-89a545444455","modelCustomizationId":"68dc9a92-214c-11e7-93ae-92361f002671","modelUuid":null,"modelInvariantUuid":null,"modelInstanceName":null},"requestInfo":{"billingAccountNumber":null,"callbackUrl":null,"correlator":null,"orderNumber":null,"productFamilyId":null,"orderVersion":null,"source":"VID","instanceName":null,"suppressRollback":false,"requestorId":"xxxxxx"},"relatedInstanceList":[{"relatedInstance":{"instanceName":null,"instanceId":"9e15a443-af65-4f05-9000-47ae495e937d","modelInfo":{"modelCustomizationName":null,"modelInvariantId":"de19ae10-9a25-11e7-abc4-cec278b6b50a","modelType":"service","modelNameVersionId":null,"modelName":"MSOTADevInfra_Configuration_Service","modelVersion":"1.0","modelCustomizationUuid":null,"modelVersionId":"ee938612-9a25-11e7-abc4-cec278b6b50a","modelCustomizationId":null,"modelUuid":null,"modelInvariantUuid":null,"modelInstanceName":null},"instanceDirection":null}}],"subscriberInfo":null,"cloudConfiguration":{"aicNodeClli":null,"tenantId":null,"lcpCloudRegionId":"mtn6"},"requestParameters":{"subscriptionServiceType":null,"userParams":[],"aLaCarte":false,"autoBuildVfModules":false,"cascadeDelete":false,"usePreload":true,"alaCarte":false},"project":null,"owningEntity":null,"platform":null,"lineOfBusiness":null}}', null, 'APIH', '2017-09-26 16:09:29', null, null, null, null, null, null, null, 'mtn6', null, null, null, null, null, 'configuration', 'activateInstance', '9e15a443-af65-4f05-9000-47ae495e937d', null, 'xxxxxx', '26ef7f15-57bb-48df-8170-e59edc26234c', null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances');
+insert into infra_active_requests(request_id, request_status, status_message, progress, start_time, end_time, source, vnf_id, vnf_name, vnf_type, service_type, tenant_id, vnf_params, vnf_outputs, request_body, response_body, last_modified_by, modify_time, volume_group_id, volume_group_name, vf_module_id, vf_module_name, vf_module_model_name, cloud_region, callback_url, correlator, network_id, network_name, network_type, request_scope, request_action, service_instance_id, service_instance_name, requestor_id, configuration_id, configuration_name, operational_env_id, operational_env_name, request_url) values
+('00032ab7-3fb3-42e5-965d-8ea592502017', 'COMPLETE', 'Vf Module has been deleted successfully.', '100', '2016-12-22 18:59:54', '2016-12-22 19:00:28', 'VID', 'b92f60c8-8de3-46c1-8dc1-e4390ac2b005', null, null, null, '6accefef3cb442ff9e644d589fb04107', null, null, '{"requestDetails":{"modelInfo":{"modelType":"vfModule","modelName":"vSAMP10aDEV::base::module-0"},"requestInfo":{"source":"VID"},"cloudConfiguration":{"tenantId":"6accefef3cb442ff9e644d589fb04107","lcpCloudRegionId":"mtn6"}}}', null, 'BPMN', '2016-12-22 19:00:28', null, null, 'c7d527b1-7a91-49fd-b97d-1c8c0f4a7992', null, 'vSAMP10aDEV::base::module-0', 'mtn6', null, null, null, null, null, 'vfModule', 'deleteInstance', 'e3b5744d-2ad1-4cdd-8390-c999a38829bc', null, null, null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
+('00093944-bf16-4373-ab9a-3adfe730ff2d', 'FAILED', 'Error: Locked instance - This service (MSODEV_1707_SI_vSAMP10a_011-4) already has a request being worked with a status of IN_PROGRESS (RequestId - 278e83b1-4f9f-450e-9e7d-3700a6ed22f4). The existing request must finish or be cleaned up before proceeding.', '100', '2017-07-11 18:33:26', '2017-07-11 18:33:26', 'VID', null, null, null, null, '19123c2924c648eb8e42a3c1f14b7682', null, null, '{"requestDetails":{"modelInfo":{"modelInvariantId":"9647dfc4-2083-11e7-93ae-92361f002671","modelType":"service","modelName":"MSOTADevInfra_vSAMP10a_Service","modelVersion":"1.0","modelVersionId":"5df8b6de-2083-11e7-93ae-92361f002671"},"requestInfo":{"source":"VID","instanceName":"MSODEV_1707_SI_vSAMP10a_011-4","suppressRollback":false,"requestorId":"xxxxxx"},"subscriberInfo":{"globalSubscriberId":"MSO_1610_dev","subscriberName":"MSO_1610_dev"},"cloudConfiguration":{"tenantId":"19123c2924c648eb8e42a3c1f14b7682","lcpCloudRegionId":"mtn6"},"requestParameters":{"subscriptionServiceType":"MSO-dev-service-type","userParams":[{"name":"someUserParam","value":"someValue"}],"aLaCarte":true,"autoBuildVfModules":false,"cascadeDelete":false,"usePreload":true,"alaCarteSet":true,"alaCarte":true}}}', null, 'APIH', '2016-12-22 19:00:28', null, null, null, null, null, 'mtn6', null, null, null, null, null, 'service', 'createInstance', null, 'MSODEV_1707_SI_vSAMP10a_011-4', 'xxxxxx', null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
+('001619d2-a297-4a4b-a9f5-e2823c88458f', 'COMPLETE', 'COMPLETED', '100', '2016-07-01 14:11:42', '2017-05-02 16:03:34', 'PORTAL', null, 'test-vscp', 'elena_test21', null, '381b9ff6c75e4625b7a4182f90fc68d3', null, '<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<vnf-request xmlns=\"http://org.onap.so/mso/infra/vnf-request/v1\">\n <request-info>\n <request-id>001619d2-a297-4a4b-a9f5-e2823c88458f</request-id>\n <action>CREATE_VF_MODULE</action>\n <source>PORTAL</source>\n </request-info>\n <vnf-inputs>\n <vnf-name>test-vscp</vnf-name>\n <vf-module-name>moduleName</vf-module-name>\n <vnf-type>elena_test21</vnf-type>\n <vf-module-model-name>moduleModelName</vf-module-model-name>\n <asdc-service-model-version>1.0</asdc-service-model-version>\n <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>\n <aic-cloud-region>mtn9</aic-cloud-region>\n <tenant-id>381b9ff6c75e4625b7a4182f90fc68d3</tenant-id>\n <persona-model-id></persona-model-id>\n <persona-model-version></persona-model-version>\n <is-base-vf-module>false</is-base-vf-module>\n </vnf-inputs>\n <vnf-params xmlns:tns=\"http://org.onap.so/mso/infra/vnf-request/v1\"/>\n</vnf-request>\n', 'NONE', 'RDBTEST', '2016-07-01 14:11:42', 'VNF', null, null, 'MODULENAME1', 'moduleModelName', 'a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb', 'mtn9', null, null, null, null, null, 'vfModule', 'createInstance', null, null, null, null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
+('00164b9e-784d-48a8-8973-bbad6ef818ed', 'COMPLETE', 'Service Instance was created successfully.', '100', '2017-09-28 12:45:51', '2017-09-28 12:45:53', 'VID', null, null, null, null, '19123c2924c648eb8e42a3c1f14b7682', null, null, '{"requestDetails":{"requestDetails":{"modelInfo":{"modelCustomizationName":null,"modelInvariantId":"52b49b5d-3086-4ffd-b5e6-1b1e5e7e062f","modelType":"service","modelNameVersionId":null,"modelName":"MSO Test Network","modelVersion":"1.0","modelCustomizationUuid":null,"modelVersionId":"aed5a5b7-20d3-44f7-90a3-ddbd16f14d1e","modelCustomizationId":null,"modelUuid":null,"modelInvariantUuid":null,"modelInstanceName":null},"requestInfo":{"billingAccountNumber":null,"callbackUrl":null,"correlator":null,"orderNumber":null,"productFamilyId":null,"orderVersion":null,"source":"VID","instanceName":"DEV-MTN6-3100-0927-1","suppressRollback":false,"requestorId":"xxxxxx"},"relatedInstanceList":null,"subscriberInfo":{"globalSubscriberId":"MSO_1610_dev","subscriberName":"MSO_1610_dev"},"cloudConfiguration":{"aicNodeClli":null,"tenantId":"19123c2924c648eb8e42a3c1f14b7682","lcpCloudRegionId":"mtn6"},"requestParameters":{"subscriptionServiceType":"MSO-dev-service-type","userParams":[{"name":"someUserParam","value":"someValue"}],"aLaCarte":true,"autoBuildVfModules":false,"cascadeDelete":false,"usePreload":true,"alaCarte":true},"project":null,"owningEntity":null,"platform":null,"lineOfBusiness":null}}}', null, 'CreateGenericALaCarteServiceInstance', '2017-09-28 12:45:52', null, null, null, null, null, 'mtn6', null, null, null, null, null, 'service', 'createInstance', 'b2f59173-b7e5-4e0f-8440-232fd601b865', 'DEV-MTN6-3100-0927-1', 'xxxxxx', null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
+('00173cc9-5ce2-4673-a810-f87fefb2829e', 'FAILED', 'Error parsing request. No valid instanceName is specified', '100', '2017-04-14 21:08:46', '2017-04-14 21:08:46', 'VID', null, null, null, null, 'a259ae7b7c3f493cb3d91f95a7c18149', null, null, '{"requestDetails":{"modelInfo":{"modelInvariantId":"ff6163d4-7214-459e-9f76-507b4eb00f51","modelType":"service","modelName":"ConstraintsSrvcVID","modelVersion":"2.0","modelVersionId":"722d256c-a374-4fba-a14f-a59b76bb7656"},"requestInfo":{"productFamilyId":"LRSI-OSPF","source":"VID","requestorId":"xxxxxx"},"subscriberInfo":{"globalSubscriberId":"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"},"cloudConfiguration":{"tenantId":"a259ae7b7c3f493cb3d91f95a7c18149","lcpCloudRegionId":"mtn16"},"requestParameters":{"subscriptionServiceType":"Mobility","userParams":[{"name":"neutronport6_name","value":"8"},{"name":"neutronnet5_network_name","value":"8"},{"name":"contrailv2vlansubinterface3_name","value":"false"}]}}}', null, 'APIH', '2016-12-22 19:00:28', null, null, null, null, null, 'mtn16', null, null, null, null, null, 'service', 'createInstance', null, null, null, null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
+('0017f68c-eb2d-45bb-b7c7-ec31b37dc349', 'UNLOCKED', null, '20', '2017-09-26 16:09:29', '2017-09-28 12:45:53', 'VID', null, null, null, null, null, null, null, '{"requestDetails":{"modelInfo":{"modelCustomizationName":null,"modelInvariantId":"1587cf0e-f12f-478d-8530-5c55ac578c39","modelType":"configuration","modelNameVersionId":null,"modelName":null,"modelVersion":null,"modelCustomizationUuid":null,"modelVersionId":"36a3a8ea-49a6-4ac8-b06c-89a545444455","modelCustomizationId":"68dc9a92-214c-11e7-93ae-92361f002671","modelUuid":null,"modelInvariantUuid":null,"modelInstanceName":null},"requestInfo":{"billingAccountNumber":null,"callbackUrl":null,"correlator":null,"orderNumber":null,"productFamilyId":null,"orderVersion":null,"source":"VID","instanceName":null,"suppressRollback":false,"requestorId":"xxxxxx"},"relatedInstanceList":[{"relatedInstance":{"instanceName":null,"instanceId":"9e15a443-af65-4f05-9000-47ae495e937d","modelInfo":{"modelCustomizationName":null,"modelInvariantId":"de19ae10-9a25-11e7-abc4-cec278b6b50a","modelType":"service","modelNameVersionId":null,"modelName":"MSOTADevInfra_Configuration_Service","modelVersion":"1.0","modelCustomizationUuid":null,"modelVersionId":"ee938612-9a25-11e7-abc4-cec278b6b50a","modelCustomizationId":null,"modelUuid":null,"modelInvariantUuid":null,"modelInstanceName":null},"instanceDirection":null}}],"subscriberInfo":null,"cloudConfiguration":{"aicNodeClli":null,"tenantId":null,"lcpCloudRegionId":"mtn6"},"requestParameters":{"subscriptionServiceType":null,"userParams":[],"aLaCarte":false,"autoBuildVfModules":false,"cascadeDelete":false,"usePreload":true,"alaCarte":false},"project":null,"owningEntity":null,"platform":null,"lineOfBusiness":null}}', null, 'APIH', '2017-09-26 16:09:29', null, null, null, null, null, 'mtn6', null, null, null, null, null, 'configuration', 'activateInstance', '9e15a443-af65-4f05-9000-47ae495e937d', null, 'xxxxxx', '26ef7f15-57bb-48df-8170-e59edc26234c', null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances');
insert into watchdog_distributionid_status(distribution_id, distribution_id_status, lock_version, create_time, modify_time) values
('1533c4bd-a3e3-493f-a16d-28c20614415e', '', 0, '2017-11-30 15:48:09', '2017-11-30 15:48:09'),
diff --git a/mso-api-handlers/mso-requests-db-repositories/src/test/resources/schema.sql b/mso-api-handlers/mso-requests-db-repositories/src/test/resources/schema.sql
index 22e84344f7..feda0338a6 100644
--- a/mso-api-handlers/mso-requests-db-repositories/src/test/resources/schema.sql
+++ b/mso-api-handlers/mso-requests-db-repositories/src/test/resources/schema.sql
@@ -29,10 +29,14 @@ create table IF NOT EXISTS OPERATION_STATUS (
);
-INSERT INTO PUBLIC.OPERATION_STATUS(SERVICE_ID, OPERATION_ID, OPERATION_TYPE, USER_ID, RESULT, OPERATION_CONTENT, PROGRESS, REASON, OPERATE_AT, FINISHED_AT) VALUES
-('serviceId', 'operationId', 'operationType', 'userId', 'result', 'operationContent', 'progress', 'reason', '2016-11-24 13:19:10', '2016-11-24 13:19:10');
+INSERT INTO PUBLIC.OPERATION_STATUS (SERVICE_ID, OPERATION_ID, OPERATION_TYPE, USER_ID, RESULT, OPERATION_CONTENT, PROGRESS, REASON, OPERATE_AT, FINISHED_AT)
+SELECT * FROM (SELECT 'serviceId', 'operationId', 'operationType', 'userId', 'result', 'operationContent', 'progress', 'reason', '2016-11-24 13:19:1' AS OPERATE_AT, '2016-11-24 13:19:10' AS FINISHED_AT) AS tmp
+WHERE NOT EXISTS (
+ SELECT SERVICE_ID, OPERATION_ID FROM OPERATION_STATUS WHERE
+ SERVICE_ID = 'serviceId' and OPERATION_ID = 'operationId'
+) LIMIT 1;
- create table RESOURCE_OPERATION_STATUS (
+ create table IF NOT EXISTS RESOURCE_OPERATION_STATUS (
SERVICE_ID varchar(255) not null,
OPERATION_ID varchar(255) not null,
RESOURCE_TEMPLATE_UUID varchar(255) not null,
@@ -46,10 +50,10 @@ INSERT INTO PUBLIC.OPERATION_STATUS(SERVICE_ID, OPERATION_ID, OPERATION_TYPE, US
primary key (SERVICE_ID,OPERATION_ID,RESOURCE_TEMPLATE_UUID)
);
+DROP TABLE PUBLIC.INFRA_ACTIVE_REQUESTS IF EXISTS;
+
CREATE TABLE IF NOT EXISTS PUBLIC.INFRA_ACTIVE_REQUESTS(
REQUEST_ID VARCHAR NOT NULL SELECTIVITY 100,
- CLIENT_REQUEST_ID VARCHAR SELECTIVITY 6,
- ACTION VARCHAR SELECTIVITY 1,
REQUEST_STATUS VARCHAR SELECTIVITY 1,
STATUS_MESSAGE longtext SELECTIVITY 36,
ROLLBACK_STATUS_MESSAGE longtext SELECTIVITY 36,
@@ -63,22 +67,18 @@ CREATE TABLE IF NOT EXISTS PUBLIC.INFRA_ACTIVE_REQUESTS(
VNF_NAME VARCHAR SELECTIVITY 11,
VNF_TYPE VARCHAR SELECTIVITY 5,
SERVICE_TYPE VARCHAR SELECTIVITY 1,
- AIC_NODE_CLLI VARCHAR SELECTIVITY 1,
TENANT_ID VARCHAR SELECTIVITY 2,
- PROV_STATUS VARCHAR SELECTIVITY 1,
VNF_PARAMS VARCHAR SELECTIVITY 1,
VNF_OUTPUTS VARCHAR SELECTIVITY 3,
REQUEST_BODY VARCHAR SELECTIVITY 79,
RESPONSE_BODY VARCHAR SELECTIVITY 7,
LAST_MODIFIED_BY VARCHAR SELECTIVITY 2,
MODIFY_TIME VARCHAR,
- REQUEST_TYPE VARCHAR SELECTIVITY 1,
VOLUME_GROUP_ID VARCHAR SELECTIVITY 2,
VOLUME_GROUP_NAME VARCHAR SELECTIVITY 3,
VF_MODULE_ID VARCHAR SELECTIVITY 5,
VF_MODULE_NAME VARCHAR SELECTIVITY 8,
VF_MODULE_MODEL_NAME VARCHAR SELECTIVITY 3,
- AAI_SERVICE_ID VARCHAR SELECTIVITY 1,
CLOUD_REGION VARCHAR SELECTIVITY 1,
CALLBACK_URL VARCHAR SELECTIVITY 1,
CORRELATOR VARCHAR SELECTIVITY 1,
@@ -102,26 +102,30 @@ CREATE TABLE IF NOT EXISTS PUBLIC.INFRA_ACTIVE_REQUESTS(
ROLLBACK_EXT_SYSTEM_ERROR_SOURCE VARCHAR SELECTIVITY 1
);
-INSERT INTO PUBLIC.INFRA_ACTIVE_REQUESTS(REQUEST_ID, CLIENT_REQUEST_ID, ACTION, REQUEST_STATUS, STATUS_MESSAGE, PROGRESS, START_TIME, END_TIME, SOURCE, VNF_ID, VNF_NAME, VNF_TYPE, SERVICE_TYPE, AIC_NODE_CLLI, TENANT_ID, PROV_STATUS, VNF_PARAMS, VNF_OUTPUTS, REQUEST_BODY, RESPONSE_BODY, LAST_MODIFIED_BY, MODIFY_TIME, REQUEST_TYPE, VOLUME_GROUP_ID, VOLUME_GROUP_NAME, VF_MODULE_ID, VF_MODULE_NAME, VF_MODULE_MODEL_NAME, AAI_SERVICE_ID, CLOUD_REGION, CALLBACK_URL, CORRELATOR, NETWORK_ID, NETWORK_NAME, NETWORK_TYPE, REQUEST_SCOPE, REQUEST_ACTION, SERVICE_INSTANCE_ID, SERVICE_INSTANCE_NAME, REQUESTOR_ID, CONFIGURATION_ID, CONFIGURATION_NAME, OPERATIONAL_ENV_ID, OPERATIONAL_ENV_NAME, REQUEST_URL) VALUES
-('00032ab7-3fb3-42e5-965d-8ea592502017', '00032ab7-3fb3-42e5-965d-8ea592502016', 'deleteInstance', 'COMPLETE', 'Vf Module has been deleted successfully.', '100', '2016-12-22 18:59:54', '2016-12-22 19:00:28', 'VID', 'b92f60c8-8de3-46c1-8dc1-e4390ac2b005', null, null, null, null, '6accefef3cb442ff9e644d589fb04107', null, null, null, '{"modelInfo":{"modelType":"vfModule","modelName":"vSAMP10aDEV::base::module-0"},"requestInfo":{"source":"VID"},"cloudConfiguration":{"tenantId":"6accefef3cb442ff9e644d589fb04107","lcpCloudRegionId":"mtn6"}}', null, 'BPMN', '2016-12-22 19:00:28', null, null, null, 'c7d527b1-7a91-49fd-b97d-1c8c0f4a7992', null, 'vSAMP10aDEV::base::module-0', null, 'mtn6', null, null, null, null, null, 'vfModule', 'deleteInstance', 'e3b5744d-2ad1-4cdd-8390-c999a38829bc', null, null, null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
-('00093944-bf16-4373-ab9a-3adfe730ff2d', null, 'createInstance', 'FAILED', 'Error: Locked instance - This service (MSODEV_1707_SI_vSAMP10a_011-4) already has a request being worked with a status of IN_PROGRESS (RequestId - 278e83b1-4f9f-450e-9e7d-3700a6ed22f4). The existing request must finish or be cleaned up before proceeding.', '100', '2017-07-11 18:33:26', '2017-07-11 18:33:26', 'VID', null, null, null, null, null, '19123c2924c648eb8e42a3c1f14b7682', null, null, null, '{"modelInfo":{"modelInvariantId":"9647dfc4-2083-11e7-93ae-92361f002671","modelType":"service","modelName":"MSOTADevInfra_vSAMP10a_Service","modelVersion":"1.0","modelVersionId":"5df8b6de-2083-11e7-93ae-92361f002671"},"requestInfo":{"source":"VID","instanceName":"MSODEV_1707_SI_vSAMP10a_011-4","suppressRollback":false,"requestorId":"xxxxxx"},"subscriberInfo":{"globalSubscriberId":"MSO_1610_dev","subscriberName":"MSO_1610_dev"},"cloudConfiguration":{"tenantId":"19123c2924c648eb8e42a3c1f14b7682","lcpCloudRegionId":"mtn6"},"requestParameters":{"subscriptionServiceType":"MSO-dev-service-type","userParams":[{"name":"someUserParam","value":"someValue"}],"aLaCarte":true,"autoBuildVfModules":false,"cascadeDelete":false,"usePreload":true,"alaCarteSet":true,"alaCarte":true}}', null, 'APIH', null, null, null, null, null, null, null, null, 'mtn6', null, null, null, null, null, 'service', 'createInstance', null, 'MSODEV_1707_SI_vSAMP10a_011-4', 'xxxxxx', null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
-('001619d2-a297-4a4b-a9f5-e2823c88458f', '001619d2-a297-4a4b-a9f5-e2823c88458f', 'CREATE_VF_MODULE', 'COMPLETE', 'COMPLETED', '100', '2016-07-01 14:11:42', '2017-05-02 16:03:34', 'PORTAL', null, 'test-vscp', 'elena_test21', null, null, '381b9ff6c75e4625b7a4182f90fc68d3', null, null, null, STRINGDECODE('<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<vnf-request xmlns=\"http://org.onap.so/mso/infra/vnf-request/v1\">\n <request-info>\n <request-id>001619d2-a297-4a4b-a9f5-e2823c88458f</request-id>\n <action>CREATE_VF_MODULE</action>\n <source>PORTAL</source>\n </request-info>\n <vnf-inputs>\n <vnf-name>test-vscp</vnf-name>\n <vf-module-name>moduleName</vf-module-name>\n <vnf-type>elena_test21</vnf-type>\n <vf-module-model-name>moduleModelName</vf-module-model-name>\n <asdc-service-model-version>1.0</asdc-service-model-version>\n <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>\n <aic-cloud-region>mtn9</aic-cloud-region>\n <tenant-id>381b9ff6c75e4625b7a4182f90fc68d3</tenant-id>\n <persona-model-id></persona-model-id>\n <persona-model-version></persona-model-version>\n <is-base-vf-module>false</is-base-vf-module>\n </vnf-inputs>\n <vnf-params xmlns:tns=\"http://org.onap.so/mso/infra/vnf-request/v1\"/>\n</vnf-request>\n'), 'NONE', 'RDBTEST', '2016-07-01 14:11:42', 'VNF', null, null, null, 'MODULENAME1', 'moduleModelName', 'a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb', 'mtn9', null, null, null, null, null, 'vfModule', 'createInstance', null, null, null, null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances');
-INSERT INTO PUBLIC.INFRA_ACTIVE_REQUESTS(REQUEST_ID, CLIENT_REQUEST_ID, ACTION, REQUEST_STATUS, STATUS_MESSAGE, PROGRESS, START_TIME, END_TIME, SOURCE, VNF_ID, VNF_NAME, VNF_TYPE, SERVICE_TYPE, AIC_NODE_CLLI, TENANT_ID, PROV_STATUS, VNF_PARAMS, VNF_OUTPUTS, REQUEST_BODY, RESPONSE_BODY, LAST_MODIFIED_BY, MODIFY_TIME, REQUEST_TYPE, VOLUME_GROUP_ID, VOLUME_GROUP_NAME, VF_MODULE_ID, VF_MODULE_NAME, VF_MODULE_MODEL_NAME, AAI_SERVICE_ID, CLOUD_REGION, CALLBACK_URL, CORRELATOR, NETWORK_ID, NETWORK_NAME, NETWORK_TYPE, REQUEST_SCOPE, REQUEST_ACTION, SERVICE_INSTANCE_ID, SERVICE_INSTANCE_NAME, REQUESTOR_ID, CONFIGURATION_ID, CONFIGURATION_NAME, OPERATIONAL_ENV_ID, OPERATIONAL_ENV_NAME, REQUEST_URL) VALUES
-('00164b9e-784d-48a8-8973-bbad6ef818ed', null, 'createInstance', 'COMPLETE', 'Service Instance was created successfully.', '100', '2017-09-28 12:45:51', '2017-09-28 12:45:53', 'VID', null, null, null, null, null, '19123c2924c648eb8e42a3c1f14b7682', null, null, null, '{"modelInfo":{"modelCustomizationName":null,"modelInvariantId":"52b49b5d-3086-4ffd-b5e6-1b1e5e7e062f","modelType":"service","modelNameVersionId":null,"modelName":"MSO Test Network","modelVersion":"1.0","modelCustomizationUuid":null,"modelVersionId":"aed5a5b7-20d3-44f7-90a3-ddbd16f14d1e","modelCustomizationId":null,"modelUuid":null,"modelInvariantUuid":null,"modelInstanceName":null},"requestInfo":{"billingAccountNumber":null,"callbackUrl":null,"correlator":null,"orderNumber":null,"productFamilyId":null,"orderVersion":null,"source":"VID","instanceName":"DEV-MTN6-3100-0927-1","suppressRollback":false,"requestorId":"xxxxxx"},"relatedInstanceList":null,"subscriberInfo":{"globalSubscriberId":"MSO_1610_dev","subscriberName":"MSO_1610_dev"},"cloudConfiguration":{"aicNodeClli":null,"tenantId":"19123c2924c648eb8e42a3c1f14b7682","lcpCloudRegionId":"mtn6"},"requestParameters":{"subscriptionServiceType":"MSO-dev-service-type","userParams":[{"name":"someUserParam","value":"someValue"}],"aLaCarte":true,"autoBuildVfModules":false,"cascadeDelete":false,"usePreload":true,"alaCarte":true},"project":null,"owningEntity":null,"platform":null,"lineOfBusiness":null}', null, 'CreateGenericALaCarteServiceInstance', '2017-09-28 12:45:52', null, null, null, null, null, null, null, 'mtn6', null, null, null, null, null, 'service', 'createInstance', 'b2f59173-b7e5-4e0f-8440-232fd601b865', 'DEV-MTN6-3100-0927-1', 'md5621', null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
-('00173cc9-5ce2-4673-a810-f87fefb2829e', null, 'createInstance', 'FAILED', 'Error parsing request. No valid instanceName is specified', '100', '2017-04-14 21:08:46', '2017-04-14 21:08:46', 'VID', null, null, null, null, null, 'a259ae7b7c3f493cb3d91f95a7c18149', null, null, null, '{"modelInfo":{"modelInvariantId":"ff6163d4-7214-459e-9f76-507b4eb00f51","modelType":"service","modelName":"ConstraintsSrvcVID","modelVersion":"2.0","modelVersionId":"722d256c-a374-4fba-a14f-a59b76bb7656"},"requestInfo":{"productFamilyId":"LRSI-OSPF","source":"VID","requestorId":"xxxxxx"},"subscriberInfo":{"globalSubscriberId":"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"},"cloudConfiguration":{"tenantId":"a259ae7b7c3f493cb3d91f95a7c18149","lcpCloudRegionId":"mtn16"},"requestParameters":{"subscriptionServiceType":"Mobility","userParams":[{"name":"neutronport6_name","value":"8"},{"name":"neutronnet5_network_name","value":"8"},{"name":"contrailv2vlansubinterface3_name","value":"false"}]}}', null, 'APIH', null, null, null, null, null, null, null, null, 'mtn16', null, null, null, null, null, 'service', 'createInstance', null, null, null, null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
-('0017f68c-eb2d-45bb-b7c7-ec31b37dc349', null, 'activateInstance', 'UNLOCKED', null, '20', '2017-09-26 16:09:29', null, 'VID', null, null, null, null, null, null, null, null, null, '{"modelInfo":{"modelCustomizationName":null,"modelInvariantId":"1587cf0e-f12f-478d-8530-5c55ac578c39","modelType":"configuration","modelNameVersionId":null,"modelName":null,"modelVersion":null,"modelCustomizationUuid":null,"modelVersionId":"36a3a8ea-49a6-4ac8-b06c-89a545444455","modelCustomizationId":"68dc9a92-214c-11e7-93ae-92361f002671","modelUuid":null,"modelInvariantUuid":null,"modelInstanceName":null},"requestInfo":{"billingAccountNumber":null,"callbackUrl":null,"correlator":null,"orderNumber":null,"productFamilyId":null,"orderVersion":null,"source":"VID","instanceName":null,"suppressRollback":false,"requestorId":"xxxxxx"},"relatedInstanceList":[{"relatedInstance":{"instanceName":null,"instanceId":"9e15a443-af65-4f05-9000-47ae495e937d","modelInfo":{"modelCustomizationName":null,"modelInvariantId":"de19ae10-9a25-11e7-abc4-cec278b6b50a","modelType":"service","modelNameVersionId":null,"modelName":"MSOTADevInfra_Configuration_Service","modelVersion":"1.0","modelCustomizationUuid":null,"modelVersionId":"ee938612-9a25-11e7-abc4-cec278b6b50a","modelCustomizationId":null,"modelUuid":null,"modelInvariantUuid":null,"modelInstanceName":null},"instanceDirection":null}}],"subscriberInfo":null,"cloudConfiguration":{"aicNodeClli":null,"tenantId":null,"lcpCloudRegionId":"mtn6"},"requestParameters":{"subscriptionServiceType":null,"userParams":[],"aLaCarte":false,"autoBuildVfModules":false,"cascadeDelete":false,"usePreload":true,"alaCarte":false},"project":null,"owningEntity":null,"platform":null,"lineOfBusiness":null}', null, 'APIH', '2017-09-26 16:09:29', null, null, null, null, null, null, null, 'mtn6', null, null, null, null, null, 'configuration', 'activateInstance', '9e15a443-af65-4f05-9000-47ae495e937d', null, 'xxxxxx', '26ef7f15-57bb-48df-8170-e59edc26234c', null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances');
-INSERT INTO PUBLIC.INFRA_ACTIVE_REQUESTS(REQUEST_ID, CLIENT_REQUEST_ID, ACTION, REQUEST_STATUS, START_TIME, END_TIME, SERVICE_INSTANCE_ID, SERVICE_INSTANCE_NAME ) VALUES
-('a5294d37-21db-4e3a-ae04-57412adcb4ac', null, 'createInstance', 'COMPLETE', '2019-01-01 12:45:00', '2019-01-01 12:50:00', 'f7712652-b516-4925-a243-64550d26fd84', 'ShouldReturnInSearchQuery_1'),
-('9383dc81-7a6c-4673-8082-650d50a82a1a', null, 'createInstance', 'IN_PROGRESS', '2019-01-01 12:55:00', null, 'f7712652-b516-4925-a243-64550d26fd84', 'ShouldReturnInSearchQuery_2'),
-('a1abeab2-f8ef-43ab-b76c-9c3c2cb9980f', null, 'activateInstance', 'FAILED', '2019-01-01 13:00:00', '2019-01-01 14:00:00', 'f7712652-b516-4925-a243-64550d26fd84', 'ShouldReturnInSearchQuery_3'),
-('81b8e152-ee89-49f4-b82b-08b0dcae27cd', null, 'createInstance', 'COMPLETE', '2019-01-01 14:10:00', '2019-01-01 15:00:00', 'f7712652-b516-4925-a243-64550d26fd84', 'SHOULD_NOT_RETURN_1'),
-('0c28cad2-ff79-4dfa-a04a-9e44996fd7f7', null, 'createInstance', 'IN_PROGRESS', '2019-01-01 13:30:00', '2019-01-01 15:00:00', 'f7712652-b516-4925-a243-64550d26fd84', 'SHOULD_NOT_RETURN_2'),
-('d0d995a7-549b-4e7e-9101-2bab17ec24ea', null, 'createInstance', 'IN_PROGRESS', '2019-01-01 11:15:00', null, 'f7712652-b516-4925-a243-64550d26fd84', 'SHOULD_NOT_RETURN_3');
+INSERT INTO PUBLIC.INFRA_ACTIVE_REQUESTS(REQUEST_ID, REQUEST_STATUS, STATUS_MESSAGE, PROGRESS, START_TIME, END_TIME, SOURCE, VNF_ID, VNF_NAME, VNF_TYPE, SERVICE_TYPE, TENANT_ID, VNF_PARAMS, VNF_OUTPUTS, REQUEST_BODY, RESPONSE_BODY, LAST_MODIFIED_BY, MODIFY_TIME, VOLUME_GROUP_ID, VOLUME_GROUP_NAME, VF_MODULE_ID, VF_MODULE_NAME, VF_MODULE_MODEL_NAME, CLOUD_REGION, CALLBACK_URL, CORRELATOR, NETWORK_ID, NETWORK_NAME, NETWORK_TYPE, REQUEST_SCOPE, REQUEST_ACTION, SERVICE_INSTANCE_ID, SERVICE_INSTANCE_NAME, REQUESTOR_ID, CONFIGURATION_ID, CONFIGURATION_NAME, OPERATIONAL_ENV_ID, OPERATIONAL_ENV_NAME, REQUEST_URL) VALUES
+('00032ab7-3fb3-42e5-965d-8ea592502017', 'COMPLETE', 'Vf Module has been deleted successfully.', '100', '2016-12-22 18:59:54', '2016-12-22 19:00:28', 'VID', 'b92f60c8-8de3-46c1-8dc1-e4390ac2b005', null, null, null, '6accefef3cb442ff9e644d589fb04107', null, null, '{"modelInfo":{"modelType":"vfModule","modelName":"vSAMP10aDEV::base::module-0"},"requestInfo":{"source":"VID"},"cloudConfiguration":{"tenantId":"6accefef3cb442ff9e644d589fb04107","lcpCloudRegionId":"mtn6"}}', null, 'BPMN', '2016-12-22 19:00:28', null, null, 'c7d527b1-7a91-49fd-b97d-1c8c0f4a7992', null, 'vSAMP10aDEV::base::module-0', 'mtn6', null, null, null, null, null, 'vfModule', 'deleteInstance', 'e3b5744d-2ad1-4cdd-8390-c999a38829bc', null, null, null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
+('00093944-bf16-4373-ab9a-3adfe730ff2d', 'FAILED', 'Error: Locked instance - This service (MSODEV_1707_SI_vSAMP10a_011-4) already has a request being worked with a status of IN_PROGRESS (RequestId - 278e83b1-4f9f-450e-9e7d-3700a6ed22f4). The existing request must finish or be cleaned up before proceeding.', '100', '2017-07-11 18:33:26', '2017-07-11 18:33:26', 'VID', null, null, null, null, '19123c2924c648eb8e42a3c1f14b7682', null, null, '{"modelInfo":{"modelInvariantId":"9647dfc4-2083-11e7-93ae-92361f002671","modelType":"service","modelName":"MSOTADevInfra_vSAMP10a_Service","modelVersion":"1.0","modelVersionId":"5df8b6de-2083-11e7-93ae-92361f002671"},"requestInfo":{"source":"VID","instanceName":"MSODEV_1707_SI_vSAMP10a_011-4","suppressRollback":false,"requestorId":"xxxxxx"},"subscriberInfo":{"globalSubscriberId":"MSO_1610_dev","subscriberName":"MSO_1610_dev"},"cloudConfiguration":{"tenantId":"19123c2924c648eb8e42a3c1f14b7682","lcpCloudRegionId":"mtn6"},"requestParameters":{"subscriptionServiceType":"MSO-dev-service-type","userParams":[{"name":"someUserParam","value":"someValue"}],"aLaCarte":true,"autoBuildVfModules":false,"cascadeDelete":false,"usePreload":true,"alaCarteSet":true,"alaCarte":true}}', null, 'APIH', null, null, null, null, null, null, 'mtn6', null, null, null, null, null, 'service', 'createInstance', null, 'MSODEV_1707_SI_vSAMP10a_011-4', 'xxxxxx', null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
+('001619d2-a297-4a4b-a9f5-e2823c88458f', 'COMPLETE', 'COMPLETED', '100', '2016-07-01 14:11:42', '2017-05-02 16:03:34', 'PORTAL', null, 'test-vscp', 'elena_test21', null, '381b9ff6c75e4625b7a4182f90fc68d3', null, null, STRINGDECODE('<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<vnf-request xmlns=\"http://org.onap.so/mso/infra/vnf-request/v1\">\n <request-info>\n <request-id>001619d2-a297-4a4b-a9f5-e2823c88458f</request-id>\n <action>CREATE_VF_MODULE</action>\n <source>PORTAL</source>\n </request-info>\n <vnf-inputs>\n <vnf-name>test-vscp</vnf-name>\n <vf-module-name>moduleName</vf-module-name>\n <vnf-type>elena_test21</vnf-type>\n <vf-module-model-name>moduleModelName</vf-module-model-name>\n <asdc-service-model-version>1.0</asdc-service-model-version>\n <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>\n <aic-cloud-region>mtn9</aic-cloud-region>\n <tenant-id>381b9ff6c75e4625b7a4182f90fc68d3</tenant-id>\n <persona-model-id></persona-model-id>\n <persona-model-version></persona-model-version>\n <is-base-vf-module>false</is-base-vf-module>\n </vnf-inputs>\n <vnf-params xmlns:tns=\"http://org.onap.so/mso/infra/vnf-request/v1\"/>\n</vnf-request>\n'), 'NONE', 'RDBTEST', '2016-07-01 14:11:42', null, null, null, 'MODULENAME1', 'moduleModelName', 'mtn9', null, null, null, null, null, 'vfModule', 'createInstance', null, null, null, null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances');
+
+
+INSERT INTO PUBLIC.INFRA_ACTIVE_REQUESTS(REQUEST_ID, REQUEST_STATUS, STATUS_MESSAGE, PROGRESS, START_TIME, END_TIME, SOURCE, VNF_ID, VNF_NAME, VNF_TYPE, SERVICE_TYPE, TENANT_ID, VNF_PARAMS, VNF_OUTPUTS, REQUEST_BODY, RESPONSE_BODY, LAST_MODIFIED_BY, MODIFY_TIME, VOLUME_GROUP_ID, VOLUME_GROUP_NAME, VF_MODULE_ID, VF_MODULE_NAME, VF_MODULE_MODEL_NAME, CLOUD_REGION, CALLBACK_URL, CORRELATOR, NETWORK_ID, NETWORK_NAME, NETWORK_TYPE, REQUEST_SCOPE, REQUEST_ACTION, SERVICE_INSTANCE_ID, SERVICE_INSTANCE_NAME, REQUESTOR_ID, CONFIGURATION_ID, CONFIGURATION_NAME, OPERATIONAL_ENV_ID, OPERATIONAL_ENV_NAME, REQUEST_URL) VALUES
+('00164b9e-784d-48a8-8973-bbad6ef818ed', 'COMPLETE', 'Service Instance was created successfully.', '100', '2017-09-28 12:45:51', '2017-09-28 12:45:53', 'VID', null, null, null, null, '19123c2924c648eb8e42a3c1f14b7682', null, null, '{"modelInfo":{"modelCustomizationName":null,"modelInvariantId":"52b49b5d-3086-4ffd-b5e6-1b1e5e7e062f","modelType":"service","modelNameVersionId":null,"modelName":"MSO Test Network","modelVersion":"1.0","modelCustomizationUuid":null,"modelVersionId":"aed5a5b7-20d3-44f7-90a3-ddbd16f14d1e","modelCustomizationId":null,"modelUuid":null,"modelInvariantUuid":null,"modelInstanceName":null},"requestInfo":{"billingAccountNumber":null,"callbackUrl":null,"correlator":null,"orderNumber":null,"productFamilyId":null,"orderVersion":null,"source":"VID","instanceName":"DEV-MTN6-3100-0927-1","suppressRollback":false,"requestorId":"xxxxxx"},"relatedInstanceList":null,"subscriberInfo":{"globalSubscriberId":"MSO_1610_dev","subscriberName":"MSO_1610_dev"},"cloudConfiguration":{"aicNodeClli":null,"tenantId":"19123c2924c648eb8e42a3c1f14b7682","lcpCloudRegionId":"mtn6"},"requestParameters":{"subscriptionServiceType":"MSO-dev-service-type","userParams":[{"name":"someUserParam","value":"someValue"}],"aLaCarte":true,"autoBuildVfModules":false,"cascadeDelete":false,"usePreload":true,"alaCarte":true},"project":null,"owningEntity":null,"platform":null,"lineOfBusiness":null}', null, 'CreateGenericALaCarteServiceInstance', '2017-09-28 12:45:52', null, null, null, null, null, 'mtn6', null, null, null, null, null, 'service', 'createInstance', 'b2f59173-b7e5-4e0f-8440-232fd601b865', 'DEV-MTN6-3100-0927-1', 'md5621', null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
+('00173cc9-5ce2-4673-a810-f87fefb2829e', 'FAILED', 'Error parsing request. No valid instanceName is specified', '100', '2017-04-14 21:08:46', '2017-04-14 21:08:46', 'VID', null, null, null, null, 'a259ae7b7c3f493cb3d91f95a7c18149', null, null, '{"modelInfo":{"modelInvariantId":"ff6163d4-7214-459e-9f76-507b4eb00f51","modelType":"service","modelName":"ConstraintsSrvcVID","modelVersion":"2.0","modelVersionId":"722d256c-a374-4fba-a14f-a59b76bb7656"},"requestInfo":{"productFamilyId":"LRSI-OSPF","source":"VID","requestorId":"xxxxxx"},"subscriberInfo":{"globalSubscriberId":"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"},"cloudConfiguration":{"tenantId":"a259ae7b7c3f493cb3d91f95a7c18149","lcpCloudRegionId":"mtn16"},"requestParameters":{"subscriptionServiceType":"Mobility","userParams":[{"name":"neutronport6_name","value":"8"},{"name":"neutronnet5_network_name","value":"8"},{"name":"contrailv2vlansubinterface3_name","value":"false"}]}}', null, 'APIH', null, null, null, null, null, null, 'mtn16', null, null, null, null, null, 'service', 'createInstance', null, null, null, null, null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances'),
+('0017f68c-eb2d-45bb-b7c7-ec31b37dc349', 'UNLOCKED', null, '20', '2017-09-26 16:09:29', null, 'VID', null, null, null, null, null, null, null, '{"modelInfo":{"modelCustomizationName":null,"modelInvariantId":"1587cf0e-f12f-478d-8530-5c55ac578c39","modelType":"configuration","modelNameVersionId":null,"modelName":null,"modelVersion":null,"modelCustomizationUuid":null,"modelVersionId":"36a3a8ea-49a6-4ac8-b06c-89a545444455","modelCustomizationId":"68dc9a92-214c-11e7-93ae-92361f002671","modelUuid":null,"modelInvariantUuid":null,"modelInstanceName":null},"requestInfo":{"billingAccountNumber":null,"callbackUrl":null,"correlator":null,"orderNumber":null,"productFamilyId":null,"orderVersion":null,"source":"VID","instanceName":null,"suppressRollback":false,"requestorId":"xxxxxx"},"relatedInstanceList":[{"relatedInstance":{"instanceName":null,"instanceId":"9e15a443-af65-4f05-9000-47ae495e937d","modelInfo":{"modelCustomizationName":null,"modelInvariantId":"de19ae10-9a25-11e7-abc4-cec278b6b50a","modelType":"service","modelNameVersionId":null,"modelName":"MSOTADevInfra_Configuration_Service","modelVersion":"1.0","modelCustomizationUuid":null,"modelVersionId":"ee938612-9a25-11e7-abc4-cec278b6b50a","modelCustomizationId":null,"modelUuid":null,"modelInvariantUuid":null,"modelInstanceName":null},"instanceDirection":null}}],"subscriberInfo":null,"cloudConfiguration":{"aicNodeClli":null,"tenantId":null,"lcpCloudRegionId":"mtn6"},"requestParameters":{"subscriptionServiceType":null,"userParams":[],"aLaCarte":false,"autoBuildVfModules":false,"cascadeDelete":false,"usePreload":true,"alaCarte":false},"project":null,"owningEntity":null,"platform":null,"lineOfBusiness":null}', null, 'APIH', '2017-09-26 16:09:29', null, null, null, null, null, 'mtn6', null, null, null, null, null, 'configuration', 'activateInstance', '9e15a443-af65-4f05-9000-47ae495e937d', null, 'xxxxxx', '26ef7f15-57bb-48df-8170-e59edc26234c', null, null, null, 'http://localhost:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances');
+
+INSERT INTO PUBLIC.INFRA_ACTIVE_REQUESTS(REQUEST_ID, REQUEST_STATUS, START_TIME, END_TIME, SERVICE_INSTANCE_ID, SERVICE_INSTANCE_NAME ) VALUES
+('a5294d37-21db-4e3a-ae04-57412adcb4ac', 'COMPLETE', '2019-01-01 12:45:00', '2019-01-01 12:50:00', 'f7712652-b516-4925-a243-64550d26fd84', 'ShouldReturnInSearchQuery_1'),
+('9383dc81-7a6c-4673-8082-650d50a82a1a', 'IN_PROGRESS', '2019-01-01 12:55:00', null, 'f7712652-b516-4925-a243-64550d26fd84', 'ShouldReturnInSearchQuery_2'),
+('a1abeab2-f8ef-43ab-b76c-9c3c2cb9980f', 'FAILED', '2019-01-01 13:00:00', '2019-01-01 14:00:00', 'f7712652-b516-4925-a243-64550d26fd84', 'ShouldReturnInSearchQuery_3'),
+('81b8e152-ee89-49f4-b82b-08b0dcae27cd', 'COMPLETE', '2019-01-01 14:10:00', '2019-01-01 15:00:00', 'f7712652-b516-4925-a243-64550d26fd84', 'SHOULD_NOT_RETURN_1'),
+('0c28cad2-ff79-4dfa-a04a-9e44996fd7f7', 'IN_PROGRESS', '2019-01-01 13:30:00', '2019-01-01 15:00:00', 'f7712652-b516-4925-a243-64550d26fd84', 'SHOULD_NOT_RETURN_2'),
+('d0d995a7-549b-4e7e-9101-2bab17ec24ea', 'IN_PROGRESS', '2019-01-01 11:15:00', null, 'f7712652-b516-4925-a243-64550d26fd84', 'SHOULD_NOT_RETURN_3');
+
+
+DROP TABLE PUBLIC.ARCHIVED_INFRA_REQUESTS IF EXISTS;
CREATE CACHED TABLE PUBLIC.ARCHIVED_INFRA_REQUESTS(
REQUEST_ID VARCHAR NOT NULL SELECTIVITY 100,
- CLIENT_REQUEST_ID VARCHAR SELECTIVITY 6,
- ACTION VARCHAR SELECTIVITY 1,
REQUEST_STATUS VARCHAR SELECTIVITY 1,
STATUS_MESSAGE longtext SELECTIVITY 36,
ROLLBACK_STATUS_MESSAGE longtext SELECTIVITY 36,
@@ -135,22 +139,18 @@ CREATE CACHED TABLE PUBLIC.ARCHIVED_INFRA_REQUESTS(
VNF_NAME VARCHAR SELECTIVITY 11,
VNF_TYPE VARCHAR SELECTIVITY 5,
SERVICE_TYPE VARCHAR SELECTIVITY 1,
- AIC_NODE_CLLI VARCHAR SELECTIVITY 1,
TENANT_ID VARCHAR SELECTIVITY 2,
- PROV_STATUS VARCHAR SELECTIVITY 1,
VNF_PARAMS VARCHAR SELECTIVITY 1,
VNF_OUTPUTS VARCHAR SELECTIVITY 3,
REQUEST_BODY VARCHAR SELECTIVITY 79,
RESPONSE_BODY VARCHAR SELECTIVITY 7,
LAST_MODIFIED_BY VARCHAR SELECTIVITY 2,
MODIFY_TIME VARCHAR,
- REQUEST_TYPE VARCHAR SELECTIVITY 1,
VOLUME_GROUP_ID VARCHAR SELECTIVITY 2,
VOLUME_GROUP_NAME VARCHAR SELECTIVITY 3,
VF_MODULE_ID VARCHAR SELECTIVITY 5,
VF_MODULE_NAME VARCHAR SELECTIVITY 8,
VF_MODULE_MODEL_NAME VARCHAR SELECTIVITY 3,
- AAI_SERVICE_ID VARCHAR SELECTIVITY 1,
CLOUD_REGION VARCHAR SELECTIVITY 1,
CALLBACK_URL VARCHAR SELECTIVITY 1,
CORRELATOR VARCHAR SELECTIVITY 1,
@@ -182,6 +182,9 @@ CONSTRAINT fk_cloud_api_req_infra_requests
FOREIGN KEY (SO_REQUEST_ID)
REFERENCES infra_active_requests (REQUEST_ID));
+
+DROP TABLE PUBLIC.SITE_STATUS IF EXISTS;
+
CREATE CACHED TABLE PUBLIC.SITE_STATUS(
SITE_NAME VARCHAR NOT NULL,
STATUS VARCHAR,
@@ -196,6 +199,8 @@ INSERT INTO PUBLIC.SITE_STATUS(SITE_NAME, STATUS, CREATION_TIMESTAMP) VALUES
('test name4', '1', '2017-11-30 15:48:09'),
('test name update', '0', null);
+DROP TABLE PUBLIC.WATCHDOG_DISTRIBUTIONID_STATUS IF EXISTS;
+
CREATE CACHED TABLE PUBLIC.WATCHDOG_DISTRIBUTIONID_STATUS(
DISTRIBUTION_ID VARCHAR NOT NULL,
DISTRIBUTION_ID_STATUS VARCHAR,
@@ -210,6 +215,9 @@ INSERT INTO PUBLIC.WATCHDOG_DISTRIBUTIONID_STATUS(DISTRIBUTION_ID, DISTRIBUTION_
('55429711-809b-4a3b-9ee5-5120d46d9de0', '', 0, '2017-11-30 16:35:36', '2017-11-30 16:35:36'),
('67f0b2d1-9013-4b2b-9914-bbe2288284fb', '', 0, '2017-11-30 15:54:39', '2017-11-30 15:54:39');
+DROP TABLE PUBLIC.WATCHDOG_PER_COMPONENT_DISTRIBUTION_STATUS IF EXISTS;
+
+
CREATE CACHED TABLE PUBLIC.WATCHDOG_PER_COMPONENT_DISTRIBUTION_STATUS(
DISTRIBUTION_ID VARCHAR NOT NULL,
COMPONENT_NAME VARCHAR NOT NULL,
@@ -224,6 +232,8 @@ INSERT INTO PUBLIC.WATCHDOG_PER_COMPONENT_DISTRIBUTION_STATUS(DISTRIBUTION_ID, C
('55429711-809b-4a3b-9ee5-5120d46d9de0', 'MSO', 'COMPONENT_DONE_ERROR', '2017-11-30 16:35:36', '2017-11-30 16:35:36'),
('67f0b2d1-9013-4b2b-9914-bbe2288284fb', 'MSO', 'COMPONENT_DONE_OK', '2017-11-30 15:54:39', '2017-11-30 15:54:39');
+DROP TABLE PUBLIC.WATCHDOG_SERVICE_MOD_VER_ID_LOOKUP IF EXISTS;
+
CREATE CACHED TABLE PUBLIC.WATCHDOG_SERVICE_MOD_VER_ID_LOOKUP(
DISTRIBUTION_ID VARCHAR NOT NULL,
SERVICE_MODEL_VERSION_ID VARCHAR NOT NULL,
diff --git a/mso-api-handlers/mso-requests-db/pom.xml b/mso-api-handlers/mso-requests-db/pom.xml
index 651f35fd5c..031f86282a 100644
--- a/mso-api-handlers/mso-requests-db/pom.xml
+++ b/mso-api-handlers/mso-requests-db/pom.xml
@@ -31,6 +31,11 @@
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.core</groupId>
+ <artifactId>jersey-common</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<packaging>jar</packaging>
<build>
diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/ArchivedInfraRequests.java b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/ArchivedInfraRequests.java
index 2cf442406e..2d44eebacd 100644
--- a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/ArchivedInfraRequests.java
+++ b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/ArchivedInfraRequests.java
@@ -35,7 +35,6 @@ public class ArchivedInfraRequests extends InfraRequests {
public ArchivedInfraRequests(String requestId, String action) {
setRequestId(requestId);
- setAction(action);
}
public ArchivedInfraRequests(String requestId) {
@@ -61,22 +60,19 @@ public class ArchivedInfraRequests extends InfraRequests {
@Override
public String toString() {
- return new ToStringBuilder(this).append("requestId", getRequestId())
- .append("clientRequestId", getClientRequestId()).append("action", getAction())
- .append("requestStatus", getRequestStatus()).append("statusMessage", getStatusMessage())
- .append("progress", getProgress()).append("startTime", getStartTime()).append("endTime", getEndTime())
- .append("source", getSource()).append("vnfId", getVnfId()).append("vnfName", getVnfName())
- .append("vnfType", getVnfType()).append("serviceType", getServiceType())
- .append("aicNodeClli", getAicNodeClli()).append("tenantId", getTenantId())
- .append("provStatus", getProvStatus()).append("vnfParams", getVnfParams())
- .append("vnfOutputs", getVnfOutputs()).append("requestBody", getRequestBody())
- .append("responseBody", getResponseBody()).append("lastModifiedBy", getLastModifiedBy())
- .append("modifyTime", getModifyTime()).append("requestType", getRequestType())
+ return new ToStringBuilder(this).append("requestId", getRequestId()).append("requestStatus", getRequestStatus())
+ .append("statusMessage", getStatusMessage()).append("progress", getProgress())
+ .append("startTime", getStartTime()).append("endTime", getEndTime()).append("source", getSource())
+ .append("vnfId", getVnfId()).append("vnfName", getVnfName()).append("vnfType", getVnfType())
+ .append("serviceType", getServiceType()).append("tenantId", getTenantId())
+ .append("vnfParams", getVnfParams()).append("vnfOutputs", getVnfOutputs())
+ .append("requestBody", getRequestBody()).append("responseBody", getResponseBody())
+ .append("lastModifiedBy", getLastModifiedBy()).append("modifyTime", getModifyTime())
.append("volumeGroupId", getVolumeGroupId()).append("volumeGroupName", getVolumeGroupName())
.append("vfModuleId", getVfModuleId()).append("vfModuleName", getVfModuleName())
- .append("vfModuleModelName", getVfModuleModelName()).append("aaiServiceId", getAaiServiceId())
- .append("aicCloudRegion", getAicCloudRegion()).append("callBackUrl", getCallBackUrl())
- .append("correlator", getCorrelator()).append("serviceInstanceId", getServiceInstanceId())
+ .append("vfModuleModelName", getVfModuleModelName()).append("aicCloudRegion", getAicCloudRegion())
+ .append("callBackUrl", getCallBackUrl()).append("correlator", getCorrelator())
+ .append("serviceInstanceId", getServiceInstanceId())
.append("serviceInstanceName", getServiceInstanceName()).append("requestScope", getRequestScope())
.append("requestAction", getRequestAction()).append("networkId", getNetworkId())
.append("networkName", getNetworkName()).append("networkType", getNetworkType())
diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraActiveRequests.java b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraActiveRequests.java
index 1f5fb8f77e..9d76e289ab 100644
--- a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraActiveRequests.java
+++ b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraActiveRequests.java
@@ -25,6 +25,8 @@ import javax.persistence.Entity;
import javax.persistence.Table;
import org.apache.commons.lang3.builder.ToStringBuilder;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
/**
* InfraActiveRequests generated by hbm2java
@@ -32,6 +34,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
@JsonIgnoreProperties(ignoreUnknown = true)
@Entity
@Table(name = "infra_active_requests")
+@JsonInclude(Include.NON_NULL)
public class InfraActiveRequests extends InfraRequests {
private static final long serialVersionUID = -6818265918910035170L;
@@ -40,7 +43,6 @@ public class InfraActiveRequests extends InfraRequests {
public InfraActiveRequests(final String requestId, final String action) {
setRequestId(requestId);
- setAction(action);
}
public InfraActiveRequests(final String requestId) {
@@ -66,22 +68,19 @@ public class InfraActiveRequests extends InfraRequests {
@Override
public String toString() {
- return new ToStringBuilder(this).append("requestId", getRequestId())
- .append("clientRequestId", getClientRequestId()).append("action", getAction())
- .append("requestStatus", getRequestStatus()).append("statusMessage", getStatusMessage())
- .append("progress", getProgress()).append("startTime", getStartTime()).append("endTime", getEndTime())
- .append("source", getSource()).append("vnfId", getVnfId()).append("vnfName", getVnfName())
- .append("vnfType", getVnfType()).append("serviceType", getServiceType())
- .append("aicNodeClli", getAicNodeClli()).append("tenantId", getTenantId())
- .append("provStatus", getProvStatus()).append("vnfParams", getVnfParams())
- .append("vnfOutputs", getVnfOutputs()).append("requestBody", getRequestBody())
- .append("responseBody", getResponseBody()).append("lastModifiedBy", getLastModifiedBy())
- .append("modifyTime", getModifyTime()).append("requestType", getRequestType())
+ return new ToStringBuilder(this).append("requestId", getRequestId()).append("requestStatus", getRequestStatus())
+ .append("statusMessage", getStatusMessage()).append("progress", getProgress())
+ .append("startTime", getStartTime()).append("endTime", getEndTime()).append("source", getSource())
+ .append("vnfId", getVnfId()).append("vnfName", getVnfName()).append("vnfType", getVnfType())
+ .append("serviceType", getServiceType()).append("tenantId", getTenantId())
+ .append("vnfParams", getVnfParams()).append("vnfOutputs", getVnfOutputs())
+ .append("requestBody", getRequestBody()).append("responseBody", getResponseBody())
+ .append("lastModifiedBy", getLastModifiedBy()).append("modifyTime", getModifyTime())
.append("volumeGroupId", getVolumeGroupId()).append("volumeGroupName", getVolumeGroupName())
.append("vfModuleId", getVfModuleId()).append("vfModuleName", getVfModuleName())
- .append("vfModuleModelName", getVfModuleModelName()).append("aaiServiceId", getAaiServiceId())
- .append("aicCloudRegion", getAicCloudRegion()).append("callBackUrl", getCallBackUrl())
- .append("correlator", getCorrelator()).append("serviceInstanceId", getServiceInstanceId())
+ .append("vfModuleModelName", getVfModuleModelName()).append("aicCloudRegion", getAicCloudRegion())
+ .append("callBackUrl", getCallBackUrl()).append("correlator", getCorrelator())
+ .append("serviceInstanceId", getServiceInstanceId())
.append("serviceInstanceName", getServiceInstanceName()).append("requestScope", getRequestScope())
.append("requestAction", getRequestAction()).append("networkId", getNetworkId())
.append("networkName", getNetworkName()).append("networkType", getNetworkType())
diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraRequests.java b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraRequests.java
index 73e5e16324..f36bf9058c 100644
--- a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraRequests.java
+++ b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraRequests.java
@@ -53,10 +53,6 @@ public abstract class InfraRequests implements java.io.Serializable {
@Id
@Column(name = "REQUEST_ID", length = 45)
private String requestId;
- @Column(name = "CLIENT_REQUEST_ID", length = 45, unique = true)
- private String clientRequestId;
- @Column(name = "ACTION", length = 45)
- private String action;
@Column(name = "REQUEST_STATUS", length = 20)
private String requestStatus;
@Column(name = "STATUS_MESSAGE", length = 2000)
@@ -84,12 +80,8 @@ public abstract class InfraRequests implements java.io.Serializable {
private String vnfType;
@Column(name = "SERVICE_TYPE", length = 45)
private String serviceType;
- @Column(name = "AIC_NODE_CLLI", length = 11)
- private String aicNodeClli;
@Column(name = "TENANT_ID", length = 45)
private String tenantId;
- @Column(name = "PROV_STATUS", length = 20)
- private String provStatus;
@Column(name = "VNF_PARAMS")
private String vnfParams;
@Column(name = "VNF_OUTPUTS")
@@ -103,8 +95,6 @@ public abstract class InfraRequests implements java.io.Serializable {
@Column(name = "MODIFY_TIME")
@Temporal(TemporalType.TIMESTAMP)
private Date modifyTime;
- @Column(name = "REQUEST_TYPE", length = 20)
- private String requestType;
@Column(name = "VOLUME_GROUP_ID", length = 45)
private String volumeGroupId;
@Column(name = "VOLUME_GROUP_NAME", length = 45)
@@ -115,8 +105,6 @@ public abstract class InfraRequests implements java.io.Serializable {
private String vfModuleName;
@Column(name = "VF_MODULE_MODEL_NAME", length = 200)
private String vfModuleModelName;
- @Column(name = "AAI_SERVICE_ID", length = 50)
- private String aaiServiceId;
@Column(name = "CLOUD_REGION", length = 11)
private String aicCloudRegion;
@Column(name = "CALLBACK_URL", length = 200)
@@ -177,22 +165,6 @@ public abstract class InfraRequests implements java.io.Serializable {
this.requestId = requestId;
}
- public String getClientRequestId() {
- return clientRequestId;
- }
-
- public void setClientRequestId(String clientRequestId) {
- this.clientRequestId = clientRequestId;
- }
-
- public String getAction() {
- return this.action;
- }
-
- public void setAction(String action) {
- this.action = action;
- }
-
public String getRequestStatus() {
return this.requestStatus;
}
@@ -299,14 +271,6 @@ public abstract class InfraRequests implements java.io.Serializable {
this.serviceType = serviceType;
}
- public String getAicNodeClli() {
- return this.aicNodeClli;
- }
-
- public void setAicNodeClli(String aicNodeClli) {
- this.aicNodeClli = aicNodeClli;
- }
-
public String getTenantId() {
return this.tenantId;
}
@@ -315,14 +279,6 @@ public abstract class InfraRequests implements java.io.Serializable {
this.tenantId = tenantId;
}
- public String getProvStatus() {
- return this.provStatus;
- }
-
- public void setProvStatus(String provStatus) {
- this.provStatus = provStatus;
- }
-
public String getVnfParams() {
return this.vnfParams;
}
@@ -367,14 +323,6 @@ public abstract class InfraRequests implements java.io.Serializable {
return this.modifyTime;
}
- public String getRequestType() {
- return this.requestType;
- }
-
- public void setRequestType(String requestType) {
- this.requestType = requestType;
- }
-
public String getVolumeGroupId() {
return this.volumeGroupId;
}
@@ -415,14 +363,6 @@ public abstract class InfraRequests implements java.io.Serializable {
this.vfModuleModelName = vfModuleModelName;
}
- public String getAaiServiceId() {
- return this.aaiServiceId;
- }
-
- public void setAaiServiceId(String aaiServiceId) {
- this.aaiServiceId = aaiServiceId;
- }
-
public String getAicCloudRegion() {
return this.aicCloudRegion;
}
@@ -637,24 +577,20 @@ public abstract class InfraRequests implements java.io.Serializable {
@Override
public String toString() {
- return new ToStringBuilder(this).append("requestId", getRequestId())
- .append("clientRequestId", getClientRequestId()).append("action", getAction())
- .append("requestStatus", getRequestStatus()).append("statusMessage", getStatusMessage())
- .append("rollbackStatusMessage", getRollbackStatusMessage()).append("flowStatus", getFlowStatus())
- .append("retryStatusMessage", getRetryStatusMessage()).append("progress", getProgress())
- .append("startTime", getStartTime()).append("endTime", getEndTime()).append("source", getSource())
- .append("vnfId", getVnfId()).append("vnfName", getVnfName()).append("vnfType", getVnfType())
- .append("serviceType", getServiceType()).append("aicNodeClli", getAicNodeClli())
- .append("tenantId", getTenantId()).append("provStatus", getProvStatus())
- .append("vnfParams", getVnfParams()).append("vnfOutputs", getVnfOutputs())
- .append("requestBody", getRequestBody()).append("responseBody", getResponseBody())
- .append("lastModifiedBy", getLastModifiedBy()).append("modifyTime", getModifyTime())
- .append("requestType", getRequestType()).append("volumeGroupId", getVolumeGroupId())
+ return new ToStringBuilder(this).append("requestId", getRequestId()).append("requestStatus", getRequestStatus())
+ .append("statusMessage", getStatusMessage()).append("rollbackStatusMessage", getRollbackStatusMessage())
+ .append("flowStatus", getFlowStatus()).append("retryStatusMessage", getRetryStatusMessage())
+ .append("progress", getProgress()).append("startTime", getStartTime()).append("endTime", getEndTime())
+ .append("source", getSource()).append("vnfId", getVnfId()).append("vnfName", getVnfName())
+ .append("vnfType", getVnfType()).append("serviceType", getServiceType())
+ .append("tenantId", getTenantId()).append("vnfParams", getVnfParams())
+ .append("vnfOutputs", getVnfOutputs()).append("requestBody", getRequestBody())
+ .append("responseBody", getResponseBody()).append("lastModifiedBy", getLastModifiedBy())
+ .append("modifyTime", getModifyTime()).append("volumeGroupId", getVolumeGroupId())
.append("volumeGroupName", getVolumeGroupName()).append("vfModuleId", getVfModuleId())
.append("vfModuleName", getVfModuleName()).append("vfModuleModelName", getVfModuleModelName())
- .append("aaiServiceId", getAaiServiceId()).append("aicCloudRegion", getAicCloudRegion())
- .append("callBackUrl", getCallBackUrl()).append("correlator", getCorrelator())
- .append("serviceInstanceId", getServiceInstanceId())
+ .append("aicCloudRegion", getAicCloudRegion()).append("callBackUrl", getCallBackUrl())
+ .append("correlator", getCorrelator()).append("serviceInstanceId", getServiceInstanceId())
.append("serviceInstanceName", getServiceInstanceName()).append("requestScope", getRequestScope())
.append("requestAction", getRequestAction()).append("networkId", getNetworkId())
.append("networkName", getNetworkName()).append("networkType", getNetworkType())
diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/RequestProcessingData.java b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/RequestProcessingData.java
index 3c81555b99..e386789c7f 100644
--- a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/RequestProcessingData.java
+++ b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/RequestProcessingData.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -42,7 +42,7 @@ import com.openpojo.business.annotation.BusinessKey;
* persist the request identifiers created when MSO POSTs a request to PINC <br>
* <p>
* </p>
- *
+ *
* @author
* @version
*/
@@ -54,7 +54,7 @@ import com.openpojo.business.annotation.BusinessKey;
public class RequestProcessingData implements Serializable {
/**
- *
+ *
*/
private static final long serialVersionUID = -3497593687393936143L;
@@ -87,7 +87,7 @@ public class RequestProcessingData implements Serializable {
private Date created = null;
@Column(name = "IS_DATA_INTERNAL")
- private Boolean isDataInternal = true;
+ private Boolean isDataInternal = false;
@Override
public boolean equals(final Object other) {
diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/client/RequestsDbClient.java b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/client/RequestsDbClient.java
index 99c1d1ea72..334eb73da4 100644
--- a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/client/RequestsDbClient.java
+++ b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/client/RequestsDbClient.java
@@ -22,6 +22,7 @@ package org.onap.so.db.request.client;
import java.net.URI;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
@@ -70,6 +71,7 @@ public class RequestsDbClient {
private static final String SERVICE_ID = "SERVICE_ID";
private static final String OPERATION_ID = "OPERATION_ID";
private static final String SO_REQUEST_ID = "SO_REQUEST_ID";
+ private static final String IS_INTERNAL_DATA = "IS_INTERNAL_DATA";
private static final String NAME = "NAME";
private static final String GROUPING_ID = "GROUPING_ID";
private static final String REQUEST_ID = "REQUEST_ID";
@@ -83,7 +85,7 @@ public class RequestsDbClient {
protected String endpoint;
@Value("${mso.adapters.requestDb.auth:#{null}}")
- private String msoAdaptersAuth;
+ protected String msoAdaptersAuth;
private String getOrchestrationFilterURI = "/infraActiveRequests/getOrchestrationFiltersFromInfraActive/";
private static final String OPERATION_STATUS_SEARCH = "/operationStatus/search";
@@ -115,6 +117,8 @@ public class RequestsDbClient {
private String getInfraActiveRequests = "/infraActiveRequests/v1/getInfraActiveRequests";
+ private String getInProgressVolumeGroupsAndVfModules = "/infraActiveRequests/getInProgressVolumeGroupsAndVfModules";
+
private static final String findBySoRequestIdAndGroupIdAndName =
"/requestProcessingData/search/findOneBySoRequestIdAndGroupingIdAndName";
@@ -123,6 +127,9 @@ public class RequestsDbClient {
private static final String findBySoRequestIdOrderByGroupingIdDesc =
"/requestProcessingData/search/findBySoRequestIdOrderByGroupingIdDesc";
+ private static final String findBySoRequestIdAndIsDataInternalOrderByGroupingIdDesc =
+ "/requestProcessingData/search/findBySoRequestIdAndIsDataInternalOrderByGroupingIdDesc";
+
private static final String findByGroupingIdAndNameAndTag =
"/requestProcessingData/search/findByGroupingIdAndNameAndTag";
@@ -151,8 +158,12 @@ public class RequestsDbClient {
findOneByRequestId = endpoint + findOneByRequestId;
}
- private ClientFactory getClientFactory() {
- URI baseUri = UriBuilder.fromUri(endpoint).build();
+ protected String getEndpoint() {
+ return endpoint;
+ }
+
+ protected ClientFactory getClientFactory() {
+ URI baseUri = UriBuilder.fromUri(getEndpoint()).build();
ClientHttpRequestFactory factory =
new BufferingClientHttpRequestFactory(new HttpComponentsClientHttpRequestFactory());
@@ -185,6 +196,15 @@ public class RequestsDbClient {
}
}
+ public List<InfraActiveRequests> getInProgressVolumeGroupsAndVfModules() {
+ HttpHeaders headers = getHttpHeaders();
+ URI uri = getUri(endpoint + getInProgressVolumeGroupsAndVfModules);
+ HttpEntity<Map<String, List<String>>> entity = new HttpEntity<>(headers);
+ return restTemplate
+ .exchange(uri, HttpMethod.GET, entity, new ParameterizedTypeReference<List<InfraActiveRequests>>() {})
+ .getBody();
+ }
+
public InfraActiveRequests getInfraActiveRequestbyRequestId(String requestId) {
try {
HttpEntity<?> entity = getHttpEntity();
@@ -343,6 +363,49 @@ public class RequestsDbClient {
restTemplate.put(uri, entity);
}
+ public void patchInfraActiveRequests(InfraActiveRequests request) {
+ HttpHeaders headers = getHttpHeaders();
+ URI uri = getUri(infraActiveRequestURI + request.getRequestId());
+ HttpEntity<InfraActiveRequests> entity = new HttpEntity<>(request, headers);
+ restTemplate.exchange(uri, HttpMethod.PATCH, new HttpEntity<InfraActiveRequests>(request, headers),
+ String.class);
+ }
+
+ public InfraActiveRequests getInfraActiveRequests(String requestId, String basicAuth, String host) {
+ RestTemplate template = new RestTemplate();
+ HttpHeaders headers = new HttpHeaders();
+ headers.set(HttpHeaders.AUTHORIZATION, basicAuth);
+ headers.set(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON);
+ headers.set(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON);
+ URI uri = getUri(host + "/infraActiveRequests/" + requestId);
+ try {
+ InfraActiveRequests infraActiveRequests = template
+ .exchange(uri, HttpMethod.GET, new HttpEntity<>(headers), InfraActiveRequests.class).getBody();
+ if (infraActiveRequests != null) {
+ infraActiveRequests.setRequestId(requestId);
+ }
+ return infraActiveRequests;
+ } catch (HttpClientErrorException e) {
+ if (HttpStatus.SC_NOT_FOUND == e.getStatusCode().value()) {
+ return null;
+ }
+ throw e;
+ }
+ }
+
+ public void updateInfraActiveRequests(InfraActiveRequests request, String basicAuth, String host) {
+ RestTemplate template = new RestTemplate();
+ template.getInterceptors().add(new SOSpringClientFilter());
+ template.getInterceptors().add(new SpringClientPayloadFilter());
+ HttpHeaders headers = new HttpHeaders();
+ headers.set(HttpHeaders.AUTHORIZATION, basicAuth);
+ headers.set(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON);
+ headers.set(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON);
+ URI uri = getUri(host + "/infraActiveRequests/" + request.getRequestId());
+ HttpEntity<InfraActiveRequests> entity = new HttpEntity<>(request, headers);
+ template.put(uri, entity);
+ }
+
protected URI getUri(String uri) {
return URI.create(uri);
}
@@ -367,6 +430,18 @@ public class RequestsDbClient {
.queryParam(SO_REQUEST_ID, soRequestId).build().toString()));
}
+ public List<RequestProcessingData> getExternalRequestProcessingDataBySoRequestId(String soRequestId) {
+ URI uri = getUri(UriBuilder.fromUri(getEndpoint() + findBySoRequestIdAndIsDataInternalOrderByGroupingIdDesc)
+ .queryParam(SO_REQUEST_ID, soRequestId).queryParam(IS_INTERNAL_DATA, false).build().toString());
+ ResponseEntity<RequestProcessingData[]> array =
+ restTemplate.exchange(uri, HttpMethod.GET, getHttpEntity(), RequestProcessingData[].class);
+ if (array != null) {
+ return Arrays.asList(array.getBody());
+ } else {
+ return null;
+ }
+ }
+
public RequestProcessingData getRequestProcessingDataBySoRequestIdAndNameAndGrouping(String soRequestId,
String name, String groupingId) {
return getClientFactory().create(RequestProcessingData.class)
@@ -405,6 +480,7 @@ public class RequestsDbClient {
rpd.setSoRequestId(requestId);
rpd.setValue(flowExecutionPath);
rpd.setTag(BPMN_EXECUTION_DATA_TAG);
+ rpd.setIsDataInternal(true);
HttpEntity<RequestProcessingData> entity = new HttpEntity<>(rpd, headers);
restTemplate.postForLocation(uri, entity);
diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/requestsdb/RequestsDBHelper.java b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/requestsdb/RequestsDBHelper.java
index e4464450ea..21dea7577e 100644
--- a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/requestsdb/RequestsDBHelper.java
+++ b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/requestsdb/RequestsDBHelper.java
@@ -65,9 +65,6 @@ public class RequestsDBHelper {
request.setProgress(100L);
request.setLastModifiedBy("APIH");
request.setOperationalEnvId(operationalEnvironmentId);
- if (request.getAction() == null) {
- request.setRequestAction(UNKNOWN);
- }
if (request.getRequestScope() == null) {
request.setRequestScope(UNKNOWN);
}
@@ -100,9 +97,6 @@ public class RequestsDBHelper {
request.setProgress(100L);
request.setLastModifiedBy("APIH");
request.setOperationalEnvId(operationalEnvironmentId);
- if (request.getAction() == null) {
- request.setRequestAction(UNKNOWN);
- }
if (request.getRequestScope() == null) {
request.setRequestScope(UNKNOWN);
}
diff --git a/mso-api-handlers/mso-requests-db/src/test/java/org/onap/so/db/request/client/RequestDbClientTest.java b/mso-api-handlers/mso-requests-db/src/test/java/org/onap/so/db/request/client/RequestDbClientTest.java
index fdbc04acb4..0ad8d1458e 100644
--- a/mso-api-handlers/mso-requests-db/src/test/java/org/onap/so/db/request/client/RequestDbClientTest.java
+++ b/mso-api-handlers/mso-requests-db/src/test/java/org/onap/so/db/request/client/RequestDbClientTest.java
@@ -4,20 +4,35 @@ import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.ArgumentMatchers.isA;
import static org.mockito.Mockito.times;
import java.net.URI;
+import javax.ws.rs.core.UriBuilder;
+import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
+import org.mockito.Spy;
import org.mockito.junit.MockitoJUnitRunner;
+import org.onap.logging.filter.spring.SpringClientPayloadFilter;
+import org.onap.so.db.request.beans.InfraActiveRequests;
import org.onap.so.db.request.beans.RequestProcessingData;
+import org.onap.so.logging.jaxrs.filter.SOSpringClientFilter;
+import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.ResponseEntity;
+import org.springframework.http.client.BufferingClientHttpRequestFactory;
+import org.springframework.http.client.ClientHttpRequestFactory;
+import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
import org.springframework.web.client.RestTemplate;
+import uk.co.blackpepper.bowman.ClientFactory;
+import uk.co.blackpepper.bowman.Configuration;
@RunWith(MockitoJUnitRunner.class)
public class RequestDbClientTest {
-
+ @Spy
@InjectMocks
protected RequestsDbClient requestsDbClient;
@@ -32,4 +47,26 @@ public class RequestDbClientTest {
requestsDbClient.updateRequestProcessingData(requestProcessingData);
Mockito.verify(restTemplate, times(1)).put(eq(uri), isA(HttpEntity.class));
}
+
+ @Test
+ public void updateInfraActiveRequestsTest() {
+ InfraActiveRequests request = new InfraActiveRequests();
+ request.setRequestId("1");
+ URI uri = URI.create("/infraActiveRequests/1");
+ requestsDbClient.patchInfraActiveRequests(request);
+ Mockito.verify(restTemplate, times(1)).exchange(eq(uri), eq(HttpMethod.PATCH), isA(HttpEntity.class),
+ eq(String.class));
+ }
+
+ @Test
+ public void testGetRequestProcessingDataBySoRequestIdAndIsInternalData() {
+ Mockito.doReturn("host").when(requestsDbClient).getEndpoint();
+ requestsDbClient.getExternalRequestProcessingDataBySoRequestId("12345");
+ URI uri = URI.create(UriBuilder
+ .fromUri("host/requestProcessingData/search/findBySoRequestIdAndIsDataInternalOrderByGroupingIdDesc")
+ .queryParam("SO_REQUEST_ID", "12345").queryParam("IS_INTERNAL_DATA", false).build().toString());
+ Mockito.verify(restTemplate, times(1)).exchange(eq(uri), eq(HttpMethod.GET), isA(HttpEntity.class),
+ eq(RequestProcessingData[].class));
+ }
+
}
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/PnfResourceCustomization.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/PnfResourceCustomization.java
index fabbc5007f..db0e0abd3c 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/PnfResourceCustomization.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/PnfResourceCustomization.java
@@ -83,6 +83,9 @@ public class PnfResourceCustomization implements Serializable {
@Column(name = "SKIP_POST_INSTANTIATION_CONFIGURATION")
private Boolean skipPostInstConf;
+ @Column(name = "CONTROLLER_ACTOR")
+ private String controllerActor;
+
@Override
public String toString() {
return new ToStringBuilder(this).append("modelCustomizationUUID", modelCustomizationUUID)
@@ -90,7 +93,7 @@ public class PnfResourceCustomization implements Serializable {
.append("nfFunction", nfFunction).append("nfType", nfType).append("nfRole", nfRole)
.append("nfNamingCode", nfNamingCode).append("multiStageDesign", multiStageDesign)
.append("pnfResources", pnfResources).append("blueprintName", blueprintName)
- .append("blueprintVersion", blueprintVersion).toString();
+ .append("blueprintVersion", blueprintVersion).append("controllerActor", controllerActor).toString();
}
@Override
@@ -222,4 +225,11 @@ public class PnfResourceCustomization implements Serializable {
this.skipPostInstConf = skipPostInstConf;
}
+ public String getControllerActor() {
+ return controllerActor;
+ }
+
+ public void setControllerActor(String controllerActor) {
+ this.controllerActor = controllerActor;
+ }
}
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/Service.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/Service.java
index e591552ebf..ab40cefb4e 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/Service.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/Service.java
@@ -142,6 +142,18 @@ public class Service implements Serializable {
@Column(name = "ONAP_GENERATED_NAMING")
private Boolean onapGeneratedNaming;
+ @Column(name = "CDS_BLUEPRINT_NAME")
+ private String blueprintName;
+
+ @Column(name = "CDS_BLUEPRINT_VERSION")
+ private String blueprintVersion;
+
+ @Column(name = "SKIP_POST_INSTANTIATION_CONFIGURATION")
+ private Boolean skipPostInstConf;
+
+ @Column(name = "CONTROLLER_ACTOR")
+ private String controllerActor;
+
@Override
public String toString() {
return new ToStringBuilder(this).append("modelName", modelName).append("description", description)
@@ -399,4 +411,35 @@ public class Service implements Serializable {
this.onapGeneratedNaming = onapGeneratedNaming;
}
+ public String getBlueprintName() {
+ return blueprintName;
+ }
+
+ public void setBlueprintName(String blueprintName) {
+ this.blueprintName = blueprintName;
+ }
+
+ public String getBlueprintVersion() {
+ return blueprintVersion;
+ }
+
+ public void setBlueprintVersion(String blueprintVersion) {
+ this.blueprintVersion = blueprintVersion;
+ }
+
+ public Boolean isSkipPostInstConf() {
+ return skipPostInstConf;
+ }
+
+ public void setSkipPostInstConf(Boolean skipPostInstConf) {
+ this.skipPostInstConf = skipPostInstConf;
+ }
+
+ public String getControllerActor() {
+ return controllerActor;
+ }
+
+ public void setControllerActor(String controllerActor) {
+ this.controllerActor = controllerActor;
+ }
}
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VfModuleCustomization.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VfModuleCustomization.java
index 29f8bcece5..3420682900 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VfModuleCustomization.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VfModuleCustomization.java
@@ -100,6 +100,9 @@ public class VfModuleCustomization implements Serializable {
@OneToMany(cascade = CascadeType.ALL, mappedBy = "vfModuleCustomization")
private Set<CvnfcCustomization> cvnfcCustomization;
+ @Column(name = "SKIP_POST_INSTANTIATION_CONFIGURATION")
+ private Boolean skipPostInstConf;
+
@Override
public boolean equals(final Object other) {
if (!(other instanceof VfModuleCustomization)) {
@@ -239,4 +242,12 @@ public class VfModuleCustomization implements Serializable {
public void setCvnfcCustomization(Set<CvnfcCustomization> cvnfcCustomization) {
this.cvnfcCustomization = cvnfcCustomization;
}
+
+ public Boolean isSkipPostInstConf() {
+ return skipPostInstConf;
+ }
+
+ public void setSkipPostInstConf(Boolean skipPostInstConf) {
+ this.skipPostInstConf = skipPostInstConf;
+ }
}
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfResourceCustomization.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfResourceCustomization.java
index aec1c7fb22..094a1f0bf3 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfResourceCustomization.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfResourceCustomization.java
@@ -124,6 +124,9 @@ public class VnfResourceCustomization implements Serializable {
@Column(name = "NF_DATA_VALID")
private Boolean nfDataValid;
+ @Column(name = "CONTROLLER_ACTOR")
+ private String controllerActor;
+
@Override
public boolean equals(final Object other) {
if (!(other instanceof VnfResourceCustomization)) {
@@ -152,7 +155,8 @@ public class VnfResourceCustomization implements Serializable {
.append("multiStageDesign", multiStageDesign).append("vnfResources", vnfResources)
.append("vfModuleCustomizations", vfModuleCustomizations)
.append("vnfcInstanceGroupOrder", vnfcInstanceGroupOrder)
- .append("vnfcInstanceGroupCustomizations", vnfcInstanceGroupCustomizations).toString();
+ .append("vnfcInstanceGroupCustomizations", vnfcInstanceGroupCustomizations)
+ .append("controllerActor", controllerActor).toString();
}
@PrePersist
@@ -345,5 +349,11 @@ public class VnfResourceCustomization implements Serializable {
this.nfDataValid = nfDataValid;
}
+ public String getControllerActor() {
+ return controllerActor;
+ }
+ public void setControllerActor(String controllerActor) {
+ this.controllerActor = controllerActor;
+ }
}
diff --git a/mso-catalog-db/src/test/resources/schema.sql b/mso-catalog-db/src/test/resources/schema.sql
index 73370e1078..67584133f8 100644
--- a/mso-catalog-db/src/test/resources/schema.sql
+++ b/mso-catalog-db/src/test/resources/schema.sql
@@ -807,6 +807,10 @@ CREATE TABLE `service` (
`OVERALL_DISTRIBUTION_STATUS` varchar(45),
`ONAP_GENERATED_NAMING` TINYINT(1) DEFAULT NULL,
`NAMING_POLICY` varchar(200) DEFAULT NULL,
+ `CDS_BLUEPRINT_NAME` varchar(200) DEFAULT NULL,
+ `CDS_BLUEPRINT_VERSION` varchar(20) DEFAULT NULL,
+ `CONTROLLER_ACTOR` varchar(200) DEFAULT NULL,
+ `SKIP_POST_INSTANTIATION_CONFIGURATION` boolean default true,
PRIMARY KEY (`MODEL_UUID`),
KEY `fk_service__tosca_csar1_idx` (`TOSCA_CSAR_ARTIFACT_UUID`),
CONSTRAINT `fk_service__tosca_csar1` FOREIGN KEY (`TOSCA_CSAR_ARTIFACT_UUID`) REFERENCES `tosca_csar` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
@@ -961,6 +965,7 @@ CREATE TABLE `vf_module_customization` (
`CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`VF_MODULE_MODEL_UUID` varchar(200) NOT NULL,
`VNF_RESOURCE_CUSTOMIZATION_ID` int(13) DEFAULT NULL,
+ `SKIP_POST_INSTANTIATION_CONFIGURATION` boolean default true,
PRIMARY KEY (`ID`),
KEY `fk_vf_module_customization__vf_module1_idx` (`VF_MODULE_MODEL_UUID`),
KEY `fk_vf_module_customization__heat_env__heat_environment1_idx` (`HEAT_ENVIRONMENT_ARTIFACT_UUID`),
@@ -1112,6 +1117,7 @@ CREATE TABLE `vnf_resource_customization` (
`SERVICE_MODEL_UUID` varchar(200) NOT NULL,
`NF_DATA_VALID` tinyint(1) DEFAULT '0',
`VNFCINSTANCEGROUP_ORDER` varchar(200) default NULL,
+ `CONTROLLER_ACTOR` varchar(200) DEFAULT NULL,
PRIMARY KEY (`ID`),
UNIQUE KEY `UK_vnf_resource_customization` (`MODEL_CUSTOMIZATION_UUID`,`SERVICE_MODEL_UUID`),
KEY `fk_vnf_resource_customization__vnf_resource1_idx` (`VNF_RESOURCE_MODEL_UUID`),
@@ -1193,6 +1199,7 @@ CREATE TABLE IF NOT EXISTS `pnf_resource_customization` (
`CDS_BLUEPRINT_NAME` varchar(200) DEFAULT NULL,
`CDS_BLUEPRINT_VERSION` varchar(20) DEFAULT NULL,
`SKIP_POST_INSTANTIATION_CONFIGURATION` boolean default true,
+ `CONTROLLER_ACTOR` varchar(200) DEFAULT NULL,
PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`),
KEY `fk_pnf_resource_customization__pnf_resource1_idx` (`PNF_RESOURCE_MODEL_UUID`),
CONSTRAINT `fk_pnf_resource_customization__pnf_resource1` FOREIGN KEY (`PNF_RESOURCE_MODEL_UUID`) REFERENCES `pnf_resource` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
diff --git a/pom.xml b/pom.xml
index 5bf18501d9..0cd606e7b2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.onap.oparent</groupId>
<artifactId>oparent</artifactId>
- <version>2.0.0</version>
+ <version>2.1.0</version>
<relativePath />
</parent>
<groupId>org.onap.so</groupId>
@@ -593,21 +593,13 @@
<version>3.0.2</version>
<executions>
<execution>
- <id>tests</id>
- <goals>
- <goal>test-jar</goal>
- </goals>
- <configuration>
- <skip>false</skip>
- </configuration>
- </execution>
- <execution>
<id>original</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
+ <skip>true</skip>
<classifier>${originalClassifier}</classifier>
<includes>
<include>**</include>
@@ -638,17 +630,17 @@
<dependency>
<groupId>org.onap.logging-analytics</groupId>
<artifactId>logging-slf4j</artifactId>
- <version>1.5.1</version>
+ <version>1.6.2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.onap.logging-analytics</groupId>
<artifactId>logging-filter-base</artifactId>
- <version>1.5.1</version>
+ <version>1.6.2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.onap.logging-analytics</groupId>
<artifactId>logging-filter-spring</artifactId>
- <version>1.5.1</version>
+ <version>1.6.2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
@@ -852,12 +844,12 @@
<dependency>
<groupId>net.javacrumbs.shedlock</groupId>
<artifactId>shedlock-spring</artifactId>
- <version>0.18.2</version>
+ <version>4.0.0</version>
</dependency>
<dependency>
<groupId>net.javacrumbs.shedlock</groupId>
<artifactId>shedlock-provider-jdbc-template</artifactId>
- <version>0.18.2</version>
+ <version>4.0.0</version>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
diff --git a/so-monitoring/so-monitoring-service/src/main/java/org/onap/so/monitoring/rest/api/SoMonitoringController.java b/so-monitoring/so-monitoring-service/src/main/java/org/onap/so/monitoring/rest/api/SoMonitoringController.java
index 1e5f8780d6..5a5a4143fa 100644
--- a/so-monitoring/so-monitoring-service/src/main/java/org/onap/so/monitoring/rest/api/SoMonitoringController.java
+++ b/so-monitoring/so-monitoring-service/src/main/java/org/onap/so/monitoring/rest/api/SoMonitoringController.java
@@ -83,7 +83,7 @@ public class SoMonitoringController {
return Response.status(Status.OK).entity(processInstanceId.get()).build();
}
- LOGGER.error("Unable to find process instance id for : " + requestId);
+ LOGGER.error("Unable to find process instance id for : {} ", requestId);
return Response.status(Status.NO_CONTENT).build();
} catch (final InvalidRestRequestException | HttpResouceNotFoundException extensions) {
@@ -112,7 +112,7 @@ public class SoMonitoringController {
return Response.status(Status.OK).entity(processInstanceDetail.get()).build();
}
- LOGGER.error("Unable to find process instance id for : " + processInstanceId);
+ LOGGER.error("Unable to find process instance id for : {}", processInstanceId);
return Response.status(Status.NO_CONTENT).build();
} catch (final InvalidRestRequestException | HttpResouceNotFoundException extensions) {
@@ -141,7 +141,7 @@ public class SoMonitoringController {
final ProcessDefinitionDetail definitionDetail = response.get();
return Response.status(Status.OK).entity(definitionDetail).build();
}
- LOGGER.error("Unable to find process definition xml for processDefinitionId: " + processDefinitionId);
+ LOGGER.error("Unable to find process definition xml for processDefinitionId: {}", processDefinitionId);
return Response.status(Status.NO_CONTENT).build();
} catch (final InvalidRestRequestException | HttpResouceNotFoundException extensions) {
@@ -215,7 +215,7 @@ public class SoMonitoringController {
try {
final List<SoInfraRequest> requests =
databaseServiceProvider.getSoInfraRequest(filters, startTime, endTime, maxResult);
- LOGGER.info("result size: " + requests.size());
+ LOGGER.info("result size: {}", requests.size());
return Response.status(Status.OK).entity(requests).build();
} catch (final InvalidRestRequestException | HttpResouceNotFoundException extensions) {