summaryrefslogtreecommitdiffstats
path: root/bpmn
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/recipe/BpmnRestClient.java17
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/recipe/ResourceInput.java11
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/recipe/ResourceRecipeRequest.java25
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java17
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/util/CryptoHandler.java13
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/util/OofInfraUtils.java30
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/validation/FlowValidatorRunner.java2
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/validation/Skip.java9
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/workflow/context/WorkflowContextHolder.java28
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/generalobjects/RequestContext.java6
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/generalobjects/RequestParameters.java12
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java32
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java18
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java39
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/CloudInfoFromAAI.java11
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildingBlockRainyDay.java35
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExtractPojosForBB.java10
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/dmaapproperties/DmaapPropertiesClient.java9
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java26
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/MSOCommonApplication.java19
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/validation/MyDisabledValidator.java44
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/FileUtil.java9
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/SDNCAdapterMockTransformer.java17
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/SDNCAdapterNetworkTopologyMockTransformer.java38
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterCreateMockTransformer.java30
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterDeleteMockTransformer.java31
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterQueryMockTransformer.java46
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterRollbackMockTransformer.java33
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterUpdateMockTransformer.java33
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java10
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java2
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/GeneralBuildingBlockExpectedWUserParamsInfo.json132
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/RequestContextExpected.json22
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/RequestDetailsInput_mapReqContext.json30
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/xml/XmlTool.java15
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/utils/CamundaDBSetup.java16
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/CallbackHandlerService.java77
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowAsyncResource.java7
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowMessageResource.java22
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowProcessor.java17
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowResource.java110
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/LoggingAndURNMappingPlugin.java9
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/CXFConfiguration.java7
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/MSOInfrastructureApplication.java19
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/main/resources/application-local.yml41
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/main/resources/application.yaml2
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/CreateAAIVfModuleIT.java14
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/CreateAAIVfModuleVolumeGroupIT.java19
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/DeleteAAIVfModuleIT.java6
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/FalloutHandlerIT.java13
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/ManualHandlingIT.java15
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/OofHomingTestIT.java25
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/PrepareUpdateAAIVfModuleIT.java32
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/SDNCAdapterRestV2IT.java7
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/SniroHomingV1IT.java9
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/UpdateAAIGenericVnfIT.java23
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/UpdateAAIVfModuleIT.java20
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/VnfAdapterRestV1IT.java23
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTest.java181
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAndActivatePnfResourceTest.java10
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/DmaapClientTestImpl.java18
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfManagementTestImpl.java8
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/resources/application-test.yaml2
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVfModuleBB.bpmn4
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UpdateNetworkBB.bpmn158
-rw-r--r--bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UpdateNetworkBBTest.java8
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfCmBase.groovy20
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/aai/groovyflows/AAICreateResources.java14
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CancelDmaapSubscription.java4
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CheckAaiForPnfCorrelationIdDelegate.java (renamed from bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CheckAaiForCorrelationIdDelegate.java)20
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreatePnfEntryInAaiDelegate.java12
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateRelation.java2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/ExecutionVariableNames.java2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClient.java4
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputs.java12
-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/JsonUtilForPnfCorrelationId.java (renamed from bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/JsonUtilForCorrelationId.java)16
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClient.java24
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/management/PnfManagement.java4
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/management/PnfManagementImpl.java8
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/service/ServicePluginFactory.java16
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java9
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncNetworkTopologyOperationTask.java20
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncServiceTopologyOperationTask.java20
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncUnderlayVpnOperationClient.java7
-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/CheckAaiForPnfCorrelationIdDelegateTest.java (renamed from bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CheckAaiForCorrelationIdDelegateTest.java)22
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreatePnfEntryInAaiDelegateTest.java8
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateRelationTest.java2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/DmaapClientTestImpl.java18
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClientTest.java6
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputsTest.java16
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfManagementTestImpl.java8
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfManagementThrowingException.java4
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/JsonUtilForPnfCorrelationIdTest.java (renamed from bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/JsonUtilForCorrelationIdTest.java)30
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClientTest.java28
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateAndActivatePnfResource.bpmn14
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustServiceV2.bpmn2
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustService_simplified.bpmn2
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/VnfInPlaceUpdate.bpmn779
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/SniroHomingV2.java125
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasks.java32
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIDeleteTasks.java9
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIFlagTasks.java8
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIQueryTasks.java11
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java40
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/activity/ExecuteActivity.java18
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/network/tasks/NetworkAdapterUpdateTasks.java32
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterCreateTasks.java7
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterDeleteTasks.java7
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterImpl.java19
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/appc/tasks/AppcRunTasks.java22
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignNetwork.java10
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignNetworkBBUtils.java10
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/CloudSiteCatalogUtils.java76
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigurationScaleOut.java24
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/CreateNetwork.java7
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/CreateNetworkCollection.java7
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheck.java33
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/UnassignNetworkBB.java7
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCActivateTasks.java7
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCAssignTasks.java9
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCDeactivateTasks.java8
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCQueryTasks.java8
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCUnassignTasks.java7
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/validations/CloudRegionOrchestrationValidator.java2
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/OrchestrationStatusValidator.java7
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/sdno/tasks/SDNOHealthCheckTasks.java11
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapper.java6
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java60
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/namingservice/NamingClient.java11
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/namingservice/NamingClientResponseValidator.java42
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIServiceInstanceResources.java8
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVfModuleResources.java7
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVnfResources.java9
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVolumeGroupResources.java7
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/NamingServiceResources.java7
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/SDNCNetworkResources.java8
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/SDNCVfModuleResources.java8
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/SDNCVnfResources.java7
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/VnfAdapterVfModuleResources.java7
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/VnfAdapterVolumeGroupResources.java7
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SDNCClient.java7
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SdnCommonTasks.java41
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/GCTopologyOperationRequestMapper.java18
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/GeneralTopologyObjectMapper.java52
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/NetworkTopologyOperationRequestMapper.java27
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/ServiceTopologyOperationMapper.java21
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapper.java47
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VnfTopologyOperationRequestMapper.java29
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/SniroClient.java23
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/SniroValidator.java43
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/SniroConductorRequest.java10
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/SniroManagerRequest.java11
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/FileUtil.java9
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java24
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/network/tasks/NetworkAdapterUpdateTasksTest.java39
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/CloudSiteCatalogUtilsTest.java88
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/SniroHomingV2IT.java25
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapperTest.java13
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapperPayloadTest.java22
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapperTest.java2
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/SDNCConfigurationResourcesTest.java35
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/GCTopologyOperationRequestMapperTest.java23
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/GeneralTopologyObjectMapperTest.java3
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/NetworkTopologyOperationRequestMapperTest.java24
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/ServiceTopologyOperationMapperTest.java15
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapperTest.java23
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/VnfTopologyOperationRequestMapperTest.java15
169 files changed, 2667 insertions, 1723 deletions
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 1157750312..2dbf2feaf7 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
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
* ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -36,6 +38,8 @@ import org.onap.so.bpmn.core.UrnPropertiesReader;
import org.onap.so.logger.MessageEnum;
import org.onap.so.logger.MsoLogger;
import org.onap.so.utils.CryptoUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
@@ -53,6 +57,8 @@ import org.springframework.stereotype.Component;
@Component
public class BpmnRestClient {
+ private static Logger logger = LoggerFactory.getLogger(BpmnRestClient.class);
+
public static final String DEFAULT_BPEL_AUTH = "admin:admin";
public static final String ENCRYPTION_KEY_PROP = "org.onap.so.adapters.network.encryptionKey";
@@ -64,7 +70,6 @@ public class BpmnRestClient {
private static final String MSO_PROP_APIHANDLER_INFRA = "MSO_PROP_APIHANDLER_INFRA";
@Autowired
private UrnPropertiesReader urnPropertiesReader;
- private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, BpmnRestClient.class);
private static boolean noProperties = true;
@@ -101,7 +106,7 @@ public class BpmnRestClient {
RequestConfig requestConfig =
RequestConfig.custom().setSocketTimeout(recipeTimeout).setConnectTimeout(recipeTimeout).setConnectionRequestTimeout(recipeTimeout).build();
post.setConfig(requestConfig);
- msoLogger.debug("call the bpmn, url:" + recipeUri);
+ logger.debug("call the bpmn, url: {}", recipeUri);
String jsonReq = wrapResourceRequest(requestId, recipeTimeout, requestAction, serviceInstanceId, serviceType, requestDetails, recipeParamXsd);
StringEntity input = new StringEntity(jsonReq);
@@ -177,10 +182,10 @@ public class BpmnRestClient {
recipeRequest.setResourceInput(resourceInput);
recipeRequest.setRecipeTimeout(recipeTimeoutInput);
jsonReq = recipeRequest.toString();
- msoLogger.trace("request body is " + jsonReq);
+ logger.trace("request body is {}", jsonReq);
} catch(Exception e) {
- msoLogger.error(MessageEnum.APIH_WARP_REQUEST, "Camunda", "wrapVIDRequest", MsoLogger.ErrorCode.BusinessProcesssError, "Error in APIH Warp request",
- e);
+ logger.error("{} {} {} {} {}", MessageEnum.APIH_WARP_REQUEST.toString(), "Camunda", "wrapVIDRequest",
+ MsoLogger.ErrorCode.BusinessProcesssError.getValue(), "Error in APIH Warp request", e);
}
return jsonReq;
}
@@ -198,7 +203,7 @@ public class BpmnRestClient {
try {
return CryptoUtils.decrypt(prop, urnPropertiesReader.getVariable(encryptionKey));
} catch(GeneralSecurityException e) {
- msoLogger.debug("Security exception", e);
+ logger.debug("Security exception", e);
}
return defaultValue;
}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/recipe/ResourceInput.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/recipe/ResourceInput.java
index f574288a67..2119b2dfa8 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/recipe/ResourceInput.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/recipe/ResourceInput.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
* ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -20,7 +22,6 @@
package org.onap.so.bpmn.common.recipe;
import org.onap.so.bpmn.core.domain.ModelInfo;
-import org.onap.so.logger.MsoLogger;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
@@ -28,6 +29,8 @@ import com.fasterxml.jackson.annotation.JsonRootName;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* the inputs for the resource recipe
@@ -42,7 +45,7 @@ import com.fasterxml.jackson.databind.SerializationFeature;
@JsonRootName("variables")
public class ResourceInput {
- private static MsoLogger msoLogger = MsoLogger.getMsoLogger (MsoLogger.Catalog.GENERAL, ResourceInput.class);
+ private static Logger logger = LoggerFactory.getLogger(ResourceInput.class);
@JsonProperty("resourceInstanceName")
private String resourceInstanceName;
@@ -307,8 +310,8 @@ public class ResourceInput {
String jsonStr = "";
try {
jsonStr = mapper.writeValueAsString(this);
- } catch(JsonProcessingException e) {
- msoLogger.error("JsonProcessingException", e);
+ } catch (JsonProcessingException e) {
+ logger.error("JsonProcessingException", e);
}
return jsonStr;
}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/recipe/ResourceRecipeRequest.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/recipe/ResourceRecipeRequest.java
index 4c6edfa099..d1e26582a3 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/recipe/ResourceRecipeRequest.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/recipe/ResourceRecipeRequest.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
* ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -20,14 +22,14 @@
package org.onap.so.bpmn.common.recipe;
-import org.onap.so.logger.MsoLogger;
-
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonRootName;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* java object of the resource recipe , it
@@ -37,7 +39,7 @@ import com.fasterxml.jackson.databind.SerializationFeature;
@JsonRootName("variables")
public class ResourceRecipeRequest {
- private static MsoLogger msoLogger = MsoLogger.getMsoLogger (MsoLogger.Catalog.GENERAL, ResourceRecipeRequest.class);
+ private static Logger logger = LoggerFactory.getLogger(ResourceRecipeRequest.class);
@JsonProperty("resourceInput")
private BpmnParam resourceInput;
@@ -145,15 +147,14 @@ public class ResourceRecipeRequest {
@Override
public String toString() {
- ObjectMapper mapper = new ObjectMapper();
- mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true);
- String jsonStr = "ResourceRecipeRequest";
- try {
- jsonStr = mapper.writeValueAsString(this);
- } catch(JsonProcessingException e) {
- msoLogger.error("JsonProcessingException", e);
- }
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true);
+ String jsonStr = "ResourceRecipeRequest";
+ try {
+ jsonStr = mapper.writeValueAsString(this);
+ } catch (JsonProcessingException e) {
+ logger.error("JsonProcessingException", e);
+ }
return jsonStr;
}
-
}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java
index 750f25532c..03f56b31f6 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java
@@ -38,7 +38,6 @@ import org.onap.so.bpmn.core.UrnPropertiesReader;
import org.onap.so.bpmn.core.json.JsonUtils;
import org.onap.so.client.HttpClient;
import org.onap.so.client.HttpClientFactory;
-import org.onap.so.logger.MsoLogger;
import org.onap.so.utils.TargetEntity;
import com.fasterxml.jackson.core.JsonProcessingException;
@@ -46,6 +45,8 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class ResourceRequestBuilder {
@@ -53,7 +54,7 @@ public class ResourceRequestBuilder {
private static String SERVICE_URL_SERVICE_INSTANCE = "/v2/serviceResources";
- private static MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA, ResourceRequestBuilder.class);
+ private static Logger logger = LoggerFactory.getLogger(ResourceRequestBuilder.class);
static JsonUtils jsonUtil = new JsonUtils();
@@ -74,7 +75,7 @@ public class ResourceRequestBuilder {
}
}
} catch (Exception e) {
- LOGGER.error("not able to retrieve service order.");
+ logger.error("not able to retrieve service order.");
}
return resourceSequence;
}
@@ -161,7 +162,7 @@ public class ResourceRequestBuilder {
}
} catch (Exception e) {
- LOGGER.error("not able to retrieve service instance");
+ logger.error("not able to retrieve service instance");
}
return new HashMap();
}
@@ -227,8 +228,8 @@ public class ResourceRequestBuilder {
mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true);
try {
return mapper.readValue(jsonstr, type);
- } catch(IOException e) {
- LOGGER.error("fail to unMarshal json" + e.getMessage ());
+ } catch (IOException e) {
+ logger.error("fail to unMarshal json {}", e.getMessage());
}
return null;
}
@@ -239,8 +240,8 @@ public class ResourceRequestBuilder {
String jsonStr = null;
try {
jsonStr = mapper.writeValueAsString(srcObj);
- } catch(JsonProcessingException e) {
- LOGGER.error("SdcToscaParserException", e);
+ } catch (JsonProcessingException e) {
+ logger.error("SdcToscaParserException", e);
}
return jsonStr;
}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/util/CryptoHandler.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/util/CryptoHandler.java
index 093dac39c3..0fd0d9297d 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/util/CryptoHandler.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/util/CryptoHandler.java
@@ -5,6 +5,8 @@
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
* ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -25,10 +27,11 @@ import java.security.GeneralSecurityException;
import java.util.Properties;
import org.onap.so.utils.CryptoUtils;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class CryptoHandler implements ICryptoHandler {
- private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, CryptoHandler.class);
+ private static final Logger logger = LoggerFactory.getLogger(CryptoHandler.class);
private static final String GENERAL_SECURITY_EXCEPTION_PREFIX = "GeneralSecurityException :";
private static final String MSO_KEY = "aa3871669d893c7fb8abbcda31b88b4f";
private static final String PROPERTY_KEY = "mso.AaiEncrypted.Pwd";
@@ -40,7 +43,7 @@ public class CryptoHandler implements ICryptoHandler {
keyProp.load (Thread.currentThread ().getContextClassLoader ().getResourceAsStream ("urn.properties"));
return CryptoUtils.decrypt((String) keyProp.get(PROPERTY_KEY), MSO_KEY);
} catch (GeneralSecurityException | IOException e) {
- LOGGER.error(GENERAL_SECURITY_EXCEPTION_PREFIX + e.getMessage(), e);
+ logger.error(GENERAL_SECURITY_EXCEPTION_PREFIX + e.getMessage(), e);
return null;
}
}
@@ -51,7 +54,7 @@ public class CryptoHandler implements ICryptoHandler {
try {
return CryptoUtils.encrypt(plainMsoPwd, MSO_KEY);
} catch (GeneralSecurityException e) {
- LOGGER.error(GENERAL_SECURITY_EXCEPTION_PREFIX + e.getMessage(), e);
+ logger.error(GENERAL_SECURITY_EXCEPTION_PREFIX + e.getMessage(), e);
return null;
}
}
@@ -61,7 +64,7 @@ public class CryptoHandler implements ICryptoHandler {
try {
return CryptoUtils.decrypt(encryptedPwd, MSO_KEY);
} catch (GeneralSecurityException e) {
- LOGGER.error(GENERAL_SECURITY_EXCEPTION_PREFIX + e.getMessage(), e);
+ logger.error(GENERAL_SECURITY_EXCEPTION_PREFIX + e.getMessage(), e);
return null;
}
}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/util/OofInfraUtils.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/util/OofInfraUtils.java
index df7b57f3a3..6b178bd215 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/util/OofInfraUtils.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/util/OofInfraUtils.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2018. Intel Corp. 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
@@ -24,16 +26,14 @@ import org.onap.so.bpmn.core.UrnPropertiesReader;
import org.onap.so.db.catalog.beans.CloudSite;
import org.onap.so.db.catalog.beans.HomingInstance;
import org.onap.so.db.catalog.client.CatalogDbClient;
-import org.onap.so.logger.MsoLogger;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
-import java.util.Arrays;
import java.util.Optional;
public class OofInfraUtils {
- private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, OofInfraUtils.class);
+ private static final Logger logger = LoggerFactory.getLogger(OofInfraUtils.class);
/**
* This method creates a cloudsite in catalog database.
@@ -53,16 +53,16 @@ public class OofInfraUtils {
getCloudsite = Optional.ofNullable(client.getCloudSite(cloudSite.getId(), endpoint + "/cloudSite/")).orElse(new CloudSite());
if (!cloudSite.getId().equals(getCloudsite.getId())) {
client.postCloudSite(cloudSite);
- LOGGER.debug("Did not findd cloudsite : " + cloudSite.getId());
- LOGGER.debug("Will create cloudSite: " + cloudSite.toString());
+ logger.debug("Did not findd cloudsite : {}", cloudSite.getId());
+ logger.debug("Will create cloudSite: {}", cloudSite.toString());
}
else {
- LOGGER.debug("Found cloudsite : " + cloudSite.getId());
- LOGGER.debug("Will not create cloudSite: " + cloudSite.toString());
+ logger.debug("Found cloudsite : {}", cloudSite.getId());
+ logger.debug("Will not create cloudSite: {}", cloudSite.toString());
}
} catch (Exception e) {
- LOGGER.debug("Error looking up or creating cloudsite : " + cloudSite.getId());
- LOGGER.debug("CloudSite Lookup/Creation Error: " + e);
+ logger.debug("Error looking up or creating cloudsite : {}", cloudSite.getId());
+ logger.debug("CloudSite Lookup/Creation Error: " + e);
}
@@ -83,8 +83,8 @@ public class OofInfraUtils {
try {
client.postHomingInstance(homingInstance);
} catch (Exception exception) {
- LOGGER.debug("Could not create HomingInstance : " + homingInstance.getServiceInstanceId());
- LOGGER.debug("HomingInstance Creation Error: " + exception);
+ logger.debug("Could not create HomingInstance : {}", homingInstance.getServiceInstanceId());
+ logger.debug("HomingInstance Creation Error: {}", exception);
}
}
@@ -104,8 +104,8 @@ public class OofInfraUtils {
try {
return client.getHomingInstance(serviceInstanceId, endpoint + "/homingInstance/");
} catch (Exception exception) {
- LOGGER.debug("Could not get HomingInstance for serviceInstanceId : " + serviceInstanceId);
- LOGGER.debug("Get HomingInstance Error: " + exception);
+ logger.debug("Could not get HomingInstance for serviceInstanceId : {}", serviceInstanceId);
+ logger.debug("Get HomingInstance Error: {}", exception);
}
return null;
}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/validation/FlowValidatorRunner.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/validation/FlowValidatorRunner.java
index 636c8e32cf..5352fc2fe0 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/validation/FlowValidatorRunner.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/validation/FlowValidatorRunner.java
@@ -122,7 +122,7 @@ public abstract class FlowValidatorRunner<S extends FlowValidator, E extends Flo
protected List<FlowValidator> filterValidators(List<? extends FlowValidator> validators, String bbName) {
return validators.stream()
.filter(item -> {
- return item.shouldRunFor(bbName);
+ return !item.getClass().isAnnotationPresent(Skip.class) && item.shouldRunFor(bbName);
})
.sorted(Comparator.comparing(item -> {
Priority p = Optional.ofNullable(item.getClass().getAnnotation(Priority.class)).orElse(new Priority() {
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/validation/Skip.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/validation/Skip.java
new file mode 100644
index 0000000000..0148e8f10c
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/validation/Skip.java
@@ -0,0 +1,9 @@
+package org.onap.so.bpmn.common.validation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Skip {
+
+}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/workflow/context/WorkflowContextHolder.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/workflow/context/WorkflowContextHolder.java
index eb7290b685..db7f1da10f 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/workflow/context/WorkflowContextHolder.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/workflow/context/WorkflowContextHolder.java
@@ -5,6 +5,8 @@ package org.onap.so.bpmn.common.workflow.context;
* ================================================================================
* 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
@@ -26,6 +28,8 @@ import java.util.concurrent.TimeUnit;
import org.onap.so.logger.MessageEnum;
import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
/**
@@ -37,7 +41,7 @@ import org.springframework.stereotype.Component;
@Component
public class WorkflowContextHolder {
- private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,WorkflowContextHolder.class);
+ private static Logger logger = LoggerFactory.getLogger(WorkflowContextHolder.class);
private static final String logMarker = "[WORKFLOW-CONTEXT-HOLDER]";
private static WorkflowContextHolder instance = null;
@@ -67,14 +71,12 @@ public class WorkflowContextHolder {
}
public void put(WorkflowContext context) {
- msoLogger.debug(logMarker + " Adding context to the queue: "
- + context.getRequestId());
+ logger.debug("{} Adding context to the queue: {}", logMarker, context.getRequestId());
responseQueue.put(context);
}
public void remove(WorkflowContext context) {
- msoLogger.debug(logMarker + " Removing context from the queue: "
- + context.getRequestId());
+ logger.debug("{} Removing context from the queue: {}", logMarker, context.getRequestId());
responseQueue.remove(context);
}
@@ -120,18 +122,20 @@ public class WorkflowContextHolder {
try {
WorkflowContext requestObject = responseQueue.take();
MsoLogger.setLogContext(requestObject.getRequestId(), null);
- msoLogger.debug("Time remaining for request id: " + requestObject.getRequestId() + ":" + requestObject.getDelay(TimeUnit.MILLISECONDS));
- msoLogger.debug("Preparing timeout response for " + requestObject.getProcessKey() + ":" + ":" + requestObject.getRequestId());
+ logger.debug("Time remaining for request id: {}:{}", requestObject.getRequestId(), requestObject
+ .getDelay
+ (TimeUnit.MILLISECONDS));
+ logger.debug("Preparing timeout response for {}:{}", requestObject.getProcessKey(), requestObject
+ .getRequestId());
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
} catch (Exception e) {
- msoLogger.debug("WorkflowContextHolder timeout thread caught exception: " + e);
- msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(),
- MsoLogger.ErrorCode.UnknownError, "Error in WorkflowContextHolder timeout thread");
-
+ logger.debug("WorkflowContextHolder timeout thread caught exception: ", e);
+ logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION.toString(), "BPMN", MsoLogger.getServiceName(),
+ MsoLogger.ErrorCode.UnknownError.getValue(), "Error in WorkflowContextHolder timeout thread");
}
}
- msoLogger.debug("WorkflowContextHolder timeout thread interrupted, quitting");
+ logger.debug("WorkflowContextHolder timeout thread interrupted, quitting");
}
}
}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/generalobjects/RequestContext.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/generalobjects/RequestContext.java
index d37c8d13f3..cd66e512a5 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/generalobjects/RequestContext.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/generalobjects/RequestContext.java
@@ -43,7 +43,7 @@ public class RequestContext implements Serializable{
@JsonProperty("subscription-service-type")
private String subscriptionServiceType;
@JsonProperty("user-params")
- private HashMap<String, String> userParams;
+ private Map<String, Object> userParams = new HashMap<>();
@JsonProperty("action")
private String action;
@JsonProperty("callback-url")
@@ -87,10 +87,10 @@ public class RequestContext implements Serializable{
public void setSubscriptionServiceType(String subscriptionServiceType) {
this.subscriptionServiceType = subscriptionServiceType;
}
- public HashMap<String, String> getUserParams() {
+ public Map<String, Object> getUserParams() {
return userParams;
}
- public void setUserParams(HashMap<String, String> userParams) {
+ public void setUserParams(Map<String, Object> userParams) {
this.userParams = userParams;
}
public String getAction() {
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/generalobjects/RequestParameters.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/generalobjects/RequestParameters.java
index 1e390701df..3761d26d0b 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/generalobjects/RequestParameters.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/generalobjects/RequestParameters.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -25,20 +27,20 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map;
-import org.onap.so.logger.MsoLogger;
-
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.ObjectWriter;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonRootName;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
@JsonRootName(value = "requestParameters")
@JsonInclude(Include.NON_DEFAULT)
public class RequestParameters implements Serializable {
- private static final MsoLogger log = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, RequestParameters.class);
+ private static final Logger logger = LoggerFactory.getLogger(RequestParameters.class);
private static final long serialVersionUID = -5979049912538894930L;
@JsonProperty("subscriptionServiceType")
@@ -122,7 +124,7 @@ public class RequestParameters implements Serializable {
try{
json = ow.writeValueAsString(this);
}catch (Exception e){
- log.error("Unable to convert Sniro Manager Request to string", e);
+ logger.error("Unable to convert Sniro Manager Request to string", e);
}
return json;
}
@@ -133,4 +135,4 @@ public class RequestParameters implements Serializable {
+ subscriptionServiceType + ", userParams=" + userParams
+ ", aLaCarte=" + aLaCarte + "]";
}
-} \ No newline at end of file
+}
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 fbff0620a3..fb3094665e 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
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -75,7 +77,6 @@ import org.onap.so.db.catalog.beans.VnfResourceCustomization;
import org.onap.so.db.catalog.beans.VnfVfmoduleCvnfcConfigurationCustomization;
import org.onap.so.db.catalog.beans.VnfcInstanceGroupCustomization;
import org.onap.so.db.request.beans.InfraActiveRequests;
-import org.onap.so.logger.MsoLogger;
import org.onap.so.serviceinstancebeans.CloudConfiguration;
import org.onap.so.serviceinstancebeans.ModelInfo;
import org.onap.so.serviceinstancebeans.ModelType;
@@ -87,17 +88,18 @@ import org.onap.so.serviceinstancebeans.RequestParameters;
import org.onap.so.serviceinstancebeans.Resources;
import org.onap.so.serviceinstancebeans.VfModules;
import org.onap.so.serviceinstancebeans.Vnfs;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
-import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
@Component("BBInputSetup")
public class BBInputSetup implements JavaDelegate {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, BBInputSetup.class);
+ private static final Logger logger = LoggerFactory.getLogger(BBInputSetup.class);
private static final String FLOW_VAR_NAME = "flowToBeCalled";
private static final String LOOKUP_KEY_MAP_VAR_NAME = "lookupKeyMap";
private static final String GBB_INPUT_VAR_NAME = "gBBInput";
@@ -157,7 +159,7 @@ public class BBInputSetup implements JavaDelegate {
outputBB = this.getGBB(executeBB, lookupKeyMap, requestAction, aLaCarte, resourceId, vnfType);
ObjectMapper mapper = new ObjectMapper();
mapper.enable(SerializationFeature.INDENT_OUTPUT);
- msoLogger.debug("GeneralBB: " + mapper.writeValueAsString(outputBB));
+ logger.debug("GeneralBB: " + mapper.writeValueAsString(outputBB));
setHomingFlag(outputBB, homing, lookupKeyMap);
@@ -170,7 +172,7 @@ public class BBInputSetup implements JavaDelegate {
execution.setVariable("RetryCount", 1);
execution.setVariable("handlingCode", "Success");
} catch (Exception e) {
- msoLogger.error(e);
+ logger.error("Exception occurred", e);
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, e.getMessage());
}
}
@@ -244,8 +246,8 @@ public class BBInputSetup implements JavaDelegate {
resourceId, vnfType);
return this.populateGBBWithSIAndAdditionalInfo(requestDetails, serviceInstance, executeBB, requestAction, null);
} else {
- msoLogger.debug("Related Service Instance from AAI: " + aaiServiceInstance);
- msoLogger.debug("Related Service Instance Model Info from AAI: " + service);
+ logger.debug("Related Service Instance from AAI: {}", aaiServiceInstance);
+ logger.debug("Related Service Instance Model Info from AAI: {}", service);
throw new Exception("Could not find relevant information for related Service Instance");
}
}
@@ -419,7 +421,7 @@ public class BBInputSetup implements JavaDelegate {
mapCatalogVfModule(vfModule, modelInfo, service, vnfModelCustomizationUUID);
}
} else {
- msoLogger.debug("Related VNF instance Id not found: " + lookupKeyMap.get(ResourceKey.GENERIC_VNF_ID));
+ logger.debug("Related VNF instance Id not found: {}", lookupKeyMap.get(ResourceKey.GENERIC_VNF_ID));
throw new Exception("Could not find relevant information for related VNF");
}
}
@@ -526,7 +528,7 @@ public class BBInputSetup implements JavaDelegate {
mapCatalogVolumeGroup(volumeGroup, modelInfo, service, vnfModelCustomizationUUID);
}
} else {
- msoLogger.debug("Related VNF instance Id not found: " + lookupKeyMap.get(ResourceKey.GENERIC_VNF_ID));
+ logger.debug("Related VNF instance Id not found: {}", lookupKeyMap.get(ResourceKey.GENERIC_VNF_ID));
throw new Exception("Could not find relevant information for related VNF");
}
}
@@ -968,10 +970,10 @@ public class BBInputSetup implements JavaDelegate {
this.populateL3Network(null, networkModelInfo, service, bbName, serviceInstance, lookupKeyMap,
networkId, null);
} else {
- msoLogger.debug("Could not find a network customization with key: " + key);
+ logger.debug("Could not find a network customization with key: {}", key);
}
} else {
- msoLogger.debug("Orchestrating on Collection Network Resource Customization");
+ logger.debug("Orchestrating on Collection Network Resource Customization");
CollectionNetworkResourceCustomization collectionNetworkResourceCust = bbInputSetupUtils.getCatalogCollectionNetworkResourceCustByID(key);
L3Network l3Network = getVirtualLinkL3Network(lookupKeyMap, bbName, key, networkId, collectionNetworkResourceCust, serviceInstance);
NetworkResourceCustomization networkResourceCustomization =
@@ -1039,8 +1041,8 @@ public class BBInputSetup implements JavaDelegate {
serviceInstance.setModelInfoServiceInstance(this.mapperLayer.mapCatalogServiceIntoServiceInstance(service));
gBB = populateGBBWithSIAndAdditionalInfo(requestDetails, serviceInstance, executeBB, requestAction, null);
} else {
- msoLogger.debug("Related Service Instance from AAI: " + aaiServiceInstance);
- msoLogger.debug("Related Service Instance Model Info from AAI: " + service);
+ logger.debug("Related Service Instance from AAI: {}", aaiServiceInstance);
+ logger.debug("Related Service Instance Model Info from AAI: {}", service);
throw new Exception("Could not find relevant information for related Service Instance");
}
ServiceInstance serviceInstance = gBB.getServiceInstance();
@@ -1212,7 +1214,7 @@ public class BBInputSetup implements JavaDelegate {
if(configurationCust != null) {
this.populateConfiguration(configurationModelInfo, service, bbName, serviceInstance, lookupKeyMap, configurationId, null, executeBB.getConfigurationResourceKeys());
} else {
- msoLogger.debug("Could not find a configuration customization with key: " + key);
+ logger.debug("Could not find a configuration customization with key: {}", key);
}
}
return gBB;
@@ -1276,7 +1278,7 @@ public class BBInputSetup implements JavaDelegate {
org.onap.aai.domain.yang.CloudRegion aaiCloudRegion = bbInputSetupUtils.getCloudRegion(cloudConfiguration);
return mapperLayer.mapCloudRegion(cloudConfiguration, aaiCloudRegion);
} else {
- msoLogger.debug("Could not find any cloud configuration for this request.");
+ logger.debug("Could not find any cloud configuration for this request.");
return null;
}
}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java
index 641f7f557c..108fd66488 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -78,9 +80,10 @@ import org.onap.so.db.catalog.beans.Service;
import org.onap.so.db.catalog.beans.VfModuleCustomization;
import org.onap.so.db.catalog.beans.VnfResourceCustomization;
import org.onap.so.db.catalog.beans.VnfVfmoduleCvnfcConfigurationCustomization;
-import org.onap.so.logger.MsoLogger;
import org.onap.so.serviceinstancebeans.CloudConfiguration;
import org.onap.so.serviceinstancebeans.RequestDetails;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
@Component("BBInputSetupMapperLayer")
@@ -88,8 +91,7 @@ public class BBInputSetupMapperLayer {
private static final String USER_PARAM_NAME_KEY = "name";
private static final String USER_PARAM_VALUE_KEY = "value";
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,
- BBInputSetupMapperLayer.class);
+ private static final Logger logger = LoggerFactory.getLogger(BBInputSetupMapperLayer.class);
private ModelMapper modelMapper = new ModelMapper();
@@ -353,14 +355,14 @@ public class BBInputSetupMapperLayer {
return requestParams;
}
- protected HashMap<String,String> mapNameValueUserParams(org.onap.so.serviceinstancebeans.RequestParameters requestParameters) {
- HashMap<String,String> userParamsResult = new HashMap<String,String>();
+ protected Map<String,Object> mapNameValueUserParams(org.onap.so.serviceinstancebeans.RequestParameters requestParameters) {
+ Map<String,Object> userParamsResult = new HashMap<String,Object>();
if (requestParameters.getUserParams() != null) {
List<Map<String, Object>> userParams = requestParameters.getUserParams();
for (Map<String, Object> userParamsMap : userParams) {
if ( userParamsMap.containsKey(USER_PARAM_NAME_KEY) && (userParamsMap.get(USER_PARAM_NAME_KEY) instanceof String)
- && userParamsMap.containsKey(USER_PARAM_VALUE_KEY) && (userParamsMap.get(USER_PARAM_VALUE_KEY) instanceof String)) {
- userParamsResult.put((String) userParamsMap.get(USER_PARAM_NAME_KEY), (String) userParamsMap.get(USER_PARAM_VALUE_KEY));
+ && userParamsMap.containsKey(USER_PARAM_VALUE_KEY)) {
+ userParamsResult.put((String) userParamsMap.get(USER_PARAM_NAME_KEY), userParamsMap.get(USER_PARAM_VALUE_KEY));
}
}
}
@@ -490,4 +492,4 @@ public class BBInputSetupMapperLayer {
CollectionNetworkResourceCustomization collectionNetworkResourceCust) {
return modelMapper.map(collectionNetworkResourceCust, NetworkResourceCustomization.class);
}
-} \ No newline at end of file
+}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java
index 4617fc4710..b3b4559f1d 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -55,9 +57,10 @@ import org.onap.so.db.catalog.beans.VnfcInstanceGroupCustomization;
import org.onap.so.db.catalog.client.CatalogDbClient;
import org.onap.so.db.request.beans.InfraActiveRequests;
import org.onap.so.db.request.client.RequestsDbClient;
-import org.onap.so.logger.MsoLogger;
import org.onap.so.serviceinstancebeans.CloudConfiguration;
import org.onap.so.serviceinstancebeans.RequestDetails;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@@ -68,7 +71,7 @@ import com.fasterxml.jackson.databind.SerializationFeature;
@Component("BBInputSetupUtils")
public class BBInputSetupUtils {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, BBInputSetupUtils.class);
+ private static final Logger logger = LoggerFactory.getLogger(BBInputSetupUtils.class);
private ObjectMapper objectMapper = new ObjectMapper();
private static final String REQUEST_ERROR = "Could not find request.";
@@ -86,7 +89,7 @@ public class BBInputSetupUtils {
request.setVnfId(vnfId);
this.requestsDbClient.updateInfraActiveRequests(request);
} else {
- msoLogger.debug(REQUEST_ERROR);
+ logger.debug(REQUEST_ERROR);
}
}
@@ -95,7 +98,7 @@ public class BBInputSetupUtils {
request.setVfModuleId(vfModuleId);
this.requestsDbClient.updateInfraActiveRequests(request);
} else {
- msoLogger.debug(REQUEST_ERROR);
+ logger.debug(REQUEST_ERROR);
}
}
@@ -104,7 +107,7 @@ public class BBInputSetupUtils {
request.setVolumeGroupId(volumeGroupId);
this.requestsDbClient.updateInfraActiveRequests(request);
} else {
- msoLogger.debug(REQUEST_ERROR);
+ logger.debug(REQUEST_ERROR);
}
}
@@ -113,7 +116,7 @@ public class BBInputSetupUtils {
request.setNetworkId(networkId);
this.requestsDbClient.updateInfraActiveRequests(request);
} else {
- msoLogger.debug(REQUEST_ERROR);
+ logger.debug(REQUEST_ERROR);
}
}
@@ -226,7 +229,7 @@ public class BBInputSetupUtils {
customer.getServiceSubscription().getServiceType())
.queryParam("service-instance-name", serviceInstanceName).depth(Depth.TWO))
.orElseGet(() -> {
- msoLogger.debug("No Service Instance matched by name");
+ logger.debug("No Service Instance matched by name");
return null;
});
}
@@ -254,7 +257,7 @@ public class BBInputSetupUtils {
AAIUriFactory.createResourceUri(AAIObjectPlurals.SERVICE_INSTANCE, globalCustomerId, serviceType)
.queryParam("service-instance-name", serviceInstanceName).depth(Depth.TWO))
.orElseGet(() -> {
- msoLogger.debug("No Service Instance matched by name");
+ logger.debug("No Service Instance matched by name");
return null;
});
}
@@ -299,7 +302,7 @@ public class BBInputSetupUtils {
return this.injectionHelper.getAaiClient().get(Configuration.class,
AAIUriFactory.createResourceUri(AAIObjectType.CONFIGURATION, configurationId).depth(Depth.ONE))
.orElseGet(() -> {
- msoLogger.debug("No Configuration matched by id");
+ logger.debug("No Configuration matched by id");
return null;
});
}
@@ -309,7 +312,7 @@ public class BBInputSetupUtils {
return this.injectionHelper.getAaiClient().get(GenericVnf.class,
AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId).depth(Depth.ONE))
.orElseGet(() -> {
- msoLogger.debug("No Generic Vnf matched by id");
+ logger.debug("No Generic Vnf matched by id");
return null;
});
}
@@ -318,7 +321,7 @@ public class BBInputSetupUtils {
return this.injectionHelper.getAaiClient().get(VolumeGroup.class,
AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP, cloudOwnerId, cloudRegionId, volumeGroupId).depth(Depth.ONE))
.orElseGet(() -> {
- msoLogger.debug("No Generic Vnf matched by id");
+ logger.debug("No Generic Vnf matched by id");
return null;
});
}
@@ -327,7 +330,7 @@ public class BBInputSetupUtils {
return this.injectionHelper.getAaiClient().get(VfModule.class,
AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, vnfId, vfModuleId).depth(Depth.ONE))
.orElseGet(() -> {
- msoLogger.debug("No Generic Vnf matched by id");
+ logger.debug("No Generic Vnf matched by id");
return null;
});
}
@@ -337,7 +340,7 @@ public class BBInputSetupUtils {
return this.injectionHelper.getAaiClient().get(L3Network.class,
AAIUriFactory.createResourceUri(AAIObjectType.L3_NETWORK, networkId).depth(Depth.ONE))
.orElseGet(() -> {
- msoLogger.debug("No Generic Vnf matched by id");
+ logger.debug("No Generic Vnf matched by id");
return null;
});
@@ -349,7 +352,7 @@ public class BBInputSetupUtils {
Optional<L3Networks> networks = injectionHelper.getAaiClient().get(L3Networks.class, uri);
L3Network network = null;
if (!networks.isPresent()) {
- msoLogger.debug("No Networks matched by name");
+ logger.debug("No Networks matched by name");
return Optional.empty();
} else {
if (networks.get().getL3Network().size() > 1) {
@@ -367,7 +370,7 @@ public class BBInputSetupUtils {
Optional<GenericVnfs> vnfs = injectionHelper.getAaiClient().get(GenericVnfs.class, uri);
GenericVnf vnf = null;
if (!vnfs.isPresent()) {
- msoLogger.debug("No Vnfs matched by name");
+ logger.debug("No Vnfs matched by name");
return Optional.empty();
} else {
if (vnfs.get().getGenericVnf().size() > 1) {
@@ -385,7 +388,7 @@ public class BBInputSetupUtils {
Optional<VolumeGroups> volumeGroups = injectionHelper.getAaiClient().get(VolumeGroups.class, uri);
VolumeGroup volumeGroup = null;
if (!volumeGroups.isPresent()) {
- msoLogger.debug("No VolumeGroups matched by name");
+ logger.debug("No VolumeGroups matched by name");
return Optional.empty();
} else {
if (volumeGroups.get().getVolumeGroup().size() > 1) {
@@ -403,7 +406,7 @@ public class BBInputSetupUtils {
Optional<VolumeGroups> volumeGroups = injectionHelper.getAaiClient().get(VolumeGroups.class, uri);
VolumeGroup volumeGroup = null;
if (!volumeGroups.isPresent()) {
- msoLogger.debug("No VolumeGroups matched by name");
+ logger.debug("No VolumeGroups matched by name");
return Optional.empty();
} else {
if (volumeGroups.get().getVolumeGroup().size() > 1) {
@@ -414,4 +417,4 @@ public class BBInputSetupUtils {
return Optional.of(volumeGroup);
}
}
-} \ No newline at end of file
+}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/CloudInfoFromAAI.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/CloudInfoFromAAI.java
index d7d1fecd1a..7fcc613913 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/CloudInfoFromAAI.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/CloudInfoFromAAI.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2017 - 2019 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
@@ -31,7 +33,8 @@ import org.onap.so.client.aai.AAICommonObjectMapperProvider;
import org.onap.so.client.aai.AAIObjectType;
import org.onap.so.client.aai.entities.AAIResultWrapper;
import org.onap.so.client.aai.entities.Relationships;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@@ -40,7 +43,7 @@ import com.fasterxml.jackson.core.JsonProcessingException;
@Component
public class CloudInfoFromAAI {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, CloudInfoFromAAI.class);
+ private static final Logger logger = LoggerFactory.getLogger(CloudInfoFromAAI.class);
@Autowired
private BBInputSetupUtils bbInputSetupUtils;
@@ -63,13 +66,13 @@ public class CloudInfoFromAAI {
new AAICommonObjectMapperProvider().getMapper().writeValueAsString(aaiL3Network));
relationshipsOp = getRelationshipsFromWrapper(networkWrapper);
} else {
- msoLogger.debug("BBInputSetup could not find a cloud region or tenant, since there are no resources under the SI.");
+ logger.debug("BBInputSetup could not find a cloud region or tenant, since there are no resources under the SI.");
return Optional.empty();
}
if (relationshipsOp.isPresent()) {
return getRelatedCloudRegionAndTenant(relationshipsOp.get());
} else {
- msoLogger.debug("BBInputSetup could not find a cloud region or tenant");
+ logger.debug("BBInputSetup could not find a cloud region or tenant");
return Optional.empty();
}
}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildingBlockRainyDay.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildingBlockRainyDay.java
index ee7999f995..aa992d6153 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildingBlockRainyDay.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildingBlockRainyDay.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -33,7 +35,8 @@ import org.onap.so.db.catalog.beans.macro.RainyDayHandlerStatus;
import org.onap.so.db.catalog.client.CatalogDbClient;
import org.onap.so.db.request.beans.InfraActiveRequests;
import org.onap.so.db.request.client.RequestsDbClient;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;
@@ -41,8 +44,7 @@ import org.springframework.stereotype.Component;
@Component
public class ExecuteBuildingBlockRainyDay {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,
- ExecuteBuildingBlockRainyDay.class);
+ private static final Logger logger = LoggerFactory.getLogger(ExecuteBuildingBlockRainyDay.class);
public static final String HANDLING_CODE = "handlingCode";
@Autowired
@@ -65,7 +67,7 @@ public class ExecuteBuildingBlockRainyDay {
String RetryDuration = "PT" + retryTimeToWait + "S";
execution.setVariable("RetryDuration", RetryDuration);
} catch (Exception e) {
- msoLogger.error(e);
+ logger.error("Exception occurred", e);
throw new BpmnError("Unknown error incrementing retry counter");
}
}
@@ -81,6 +83,15 @@ public class ExecuteBuildingBlockRainyDay {
boolean aLaCarte = (boolean) execution.getVariable("aLaCarte");
boolean suppressRollback = (boolean) execution.getVariable("suppressRollback");
String handlingCode = "";
+
+ WorkflowException workflowException = (WorkflowException) execution.getVariable("WorkflowException");
+ try {
+ // Extract error data to be returned to WorkflowAction
+ execution.setVariable("WorkflowExceptionErrorMessage", workflowException.getErrorMessage());
+ } catch (Exception e) {
+ logger.error("No WorkflowException Found",e);
+ }
+
if (suppressRollback) {
handlingCode = "Abort";
} else {
@@ -101,7 +112,7 @@ public class ExecuteBuildingBlockRainyDay {
} catch (Exception ex) {
// keep default vnfType value
}
- WorkflowException workflowException = (WorkflowException) execution.getVariable("WorkflowException");
+
String errorCode = ASTERISK;
try {
errorCode = "" + workflowException.getErrorCode();
@@ -121,12 +132,6 @@ public class ExecuteBuildingBlockRainyDay {
// keep default workStep value
}
- try {
- // Extract error data to be returned to WorkflowAction
- execution.setVariable("WorkflowExceptionErrorMessage", workflowException.getErrorMessage());
- } catch (Exception e) {
- msoLogger.error("No WorkflowException Found",e);
- }
RainyDayHandlerStatus rainyDayHandlerStatus;
rainyDayHandlerStatus = catalogDbClient
.getRainyDayHandlerStatusByFlowNameAndServiceTypeAndVnfTypeAndErrorCodeAndWorkStep(bbName,
@@ -163,25 +168,25 @@ public class ExecuteBuildingBlockRainyDay {
request.setRetryStatusMessage("Retries have been exhausted.");
requestDbclient.updateInfraActiveRequests(request);
} catch (Exception ex) {
- msoLogger.error("Failed to update Request Db Infra Active Requests with Retry Status",ex);
+ logger.error("Failed to update Request Db Infra Active Requests with Retry Status",ex);
}
}
if (handlingCode.equals("RollbackToAssigned") && !aLaCarte) {
handlingCode = "Rollback";
}
}
- msoLogger.debug("RainyDayHandler Status Code is: " + handlingCode);
+ logger.debug("RainyDayHandler Status Code is: {}", handlingCode);
execution.setVariable(HANDLING_CODE, handlingCode);
} catch (Exception e) {
String code = this.environment.getProperty(defaultCode);
- msoLogger.error("Failed to determine RainyDayHandler Status. Seting handlingCode = "+ code, e);
+ logger.error("Failed to determine RainyDayHandler Status. Seting handlingCode = {}", code, e);
execution.setVariable(HANDLING_CODE, code);
}
try{
int envMaxRetries = Integer.parseInt(this.environment.getProperty(maxRetries));
execution.setVariable("maxRetries", envMaxRetries);
} catch (Exception ex) {
- msoLogger.error("Could not read maxRetries from config file. Setting max to 5 retries");
+ logger.error("Could not read maxRetries from config file. Setting max to 5 retries");
execution.setVariable("maxRetries", 5);
}
}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExtractPojosForBB.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExtractPojosForBB.java
index a212668fec..79f4a07974 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExtractPojosForBB.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExtractPojosForBB.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -33,7 +35,8 @@ import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
import org.onap.so.bpmn.servicedecomposition.entities.GeneralBuildingBlock;
import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey;
import org.onap.so.client.exception.BBObjectNotFoundException;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import com.google.common.base.CaseFormat;
@@ -41,7 +44,7 @@ import com.google.common.base.CaseFormat;
@Component
public class ExtractPojosForBB {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, ExtractPojosForBB.class);
+ private static final Logger logger = LoggerFactory.getLogger(ExtractPojosForBB.class);
public <T> T extractByKey(BuildingBlockExecution execution, ResourceKey key, String value)
throws BBObjectNotFoundException {
@@ -93,7 +96,8 @@ public class ExtractPojosForBB {
} catch (BBObjectNotFoundException e) { // re-throw parent object not found
throw e;
} catch (Exception e) { // convert all other exceptions to object not found
- msoLogger.warnSimple("BBObjectNotFoundException in ExtractPojosForBB", "BBObject " + key + " was not found in gBBInput using reference value: " + value);
+ logger.warn("BBObjectNotFoundException in ExtractPojosForBB", "BBObject " + key + " was not found in "
+ + "gBBInput using reference value: " + value);
throw new BBObjectNotFoundException(key, value);
}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/dmaapproperties/DmaapPropertiesClient.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/dmaapproperties/DmaapPropertiesClient.java
index af7c608fee..cbedefe7eb 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/dmaapproperties/DmaapPropertiesClient.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/dmaapproperties/DmaapPropertiesClient.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -27,7 +29,8 @@ import org.onap.so.client.avpn.dmaap.beans.AsyncRequestStatus;
import org.onap.so.client.avpn.dmaap.beans.InstanceReferences;
import org.onap.so.client.avpn.dmaap.beans.RequestStatus;
import org.onap.so.client.exception.MapperException;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@@ -37,7 +40,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
@Component
public class DmaapPropertiesClient {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DmaapPropertiesClient.class);
+ private static final Logger logger = LoggerFactory.getLogger(DmaapPropertiesClient.class);
@Autowired
private Provider<GlobalDmaapPublisher> dmaapPublisher;
@@ -62,7 +65,7 @@ public class DmaapPropertiesClient {
try {
return new ObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsString(dmaapBean);
} catch (JsonProcessingException e) {
- msoLogger.error(e);
+ logger.error("Exception occurred", e);
throw new MapperException(e.getMessage());
}
}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java
index 459ef66e5b..d43218c584 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -27,16 +29,18 @@ import org.onap.so.bpmn.common.DelegateExecutionImpl;
import org.onap.so.bpmn.core.WorkflowException;
import org.onap.so.logger.MessageEnum;
import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
@Component
public class ExceptionBuilder {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, ExceptionBuilder.class);
+ private static final Logger logger = LoggerFactory.getLogger(ExceptionBuilder.class);
public void buildAndThrowWorkflowException(BuildingBlockExecution execution, int errorCode, Exception exception) {
String msg = "Exception in %s.%s ";
try{
- msoLogger.error(exception);
+ logger.error("Exception occurred", exception);
String errorVariable = "Error%s%s";
@@ -50,11 +54,12 @@ public class ExceptionBuilder {
}
}
- msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, msg, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, msg.toString());
+ logger.error("{} {} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
+ MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError.getValue(), msg.toString());
execution.setVariable(errorVariable, exception.getMessage());
} catch (Exception ex){
//log trace, allow process to complete gracefully
- msoLogger.error(ex);
+ logger.error("Exception occurred", ex);
}
if (exception.getMessage() != null)
@@ -65,7 +70,7 @@ public class ExceptionBuilder {
public void buildAndThrowWorkflowException(DelegateExecution execution, int errorCode, Exception exception) {
String msg = "Exception in %s.%s ";
try{
- msoLogger.error(exception);
+ logger.error("Exception occurred", exception);
String errorVariable = "Error%s%s";
@@ -78,11 +83,12 @@ public class ExceptionBuilder {
break;
}
}
- msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, msg, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, msg.toString());
+ logger.error("{} {} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
+ MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError.getValue(), msg.toString());
execution.setVariable(errorVariable, exception.getMessage());
} catch (Exception ex){
//log trace, allow process to complete gracefully
- msoLogger.error(ex);
+ logger.error("Exception occurred", ex);
}
if (exception.getMessage() != null)
@@ -98,13 +104,13 @@ public class ExceptionBuilder {
public void buildAndThrowWorkflowException(DelegateExecution execution, int errorCode, String errorMessage) {
String processKey = getProcessKey(execution);
- msoLogger.info("Building a WorkflowException for Subflow");
+ logger.info("Building a WorkflowException for Subflow");
WorkflowException exception = new WorkflowException(processKey, errorCode, errorMessage);
execution.setVariable("WorkflowException", exception);
execution.setVariable("WorkflowExceptionErrorMessage", errorMessage);
- msoLogger.info("Outgoing WorkflowException is " + exception);
- msoLogger.info("Throwing MSOWorkflowException");
+ logger.info("Outgoing WorkflowException is {}", exception);
+ logger.info("Throwing MSOWorkflowException");
throw new BpmnError("MSOWorkflowException");
}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/MSOCommonApplication.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/MSOCommonApplication.java
index a513acc952..63e5ccbbf3 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/MSOCommonApplication.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/MSOCommonApplication.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -27,7 +29,8 @@ import org.camunda.bpm.application.PostDeploy;
import org.camunda.bpm.application.PreUndeploy;
import org.camunda.bpm.application.ProcessApplicationInfo;
import org.camunda.bpm.engine.ProcessEngine;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@@ -49,8 +52,7 @@ import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
@Filter(type = FilterType.ANNOTATION, classes = SpringBootApplication.class)})
public class MSOCommonApplication {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,
- MSOCommonApplication.class);
+ private static final Logger logger = LoggerFactory.getLogger(MSOCommonApplication.class);
@Value("${mso.async.core-pool-size}")
private int corePoolSize;
@@ -78,20 +80,11 @@ public class MSOCommonApplication {
@PostDeploy
public void postDeploy(ProcessEngine processEngineInstance) {
- long startTime = System.currentTimeMillis();
-
- msoLogger.recordAuditEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
- "Post deployment complete...");
}
@PreUndeploy
public void cleanup(ProcessEngine processEngine, ProcessApplicationInfo processApplicationInfo,
List<ProcessEngine> processEngines) {
- long startTime = System.currentTimeMillis();
-
- msoLogger.recordAuditEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
- "Pre Undeploy complete...");
-
}
@Bean
@@ -105,4 +98,4 @@ public class MSOCommonApplication {
executor.initialize();
return executor;
}
-} \ No newline at end of file
+}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/validation/MyDisabledValidator.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/validation/MyDisabledValidator.java
new file mode 100644
index 0000000000..78e4791b1c
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/validation/MyDisabledValidator.java
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.common.validation;
+
+import java.util.Collections;
+import java.util.Optional;
+
+import org.onap.so.bpmn.common.BuildingBlockExecution;
+import org.springframework.stereotype.Component;
+
+@Component
+@Skip
+public class MyDisabledValidator implements PreBuildingBlockValidator {
+
+ @Override
+ public boolean shouldRunFor(String bbName) {
+
+ return Collections.singleton("test").contains(bbName);
+ }
+
+ @Override
+ public Optional<String> validate(BuildingBlockExecution exeuction) {
+ return Optional.of("my-disabled-validator");
+ }
+
+}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/FileUtil.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/FileUtil.java
index b6acdf7adb..6a3668b175 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/FileUtil.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/FileUtil.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -22,7 +24,8 @@ package org.onap.so.bpmn.mock;
import java.io.IOException;
import java.io.InputStream;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
*
@@ -35,7 +38,7 @@ import org.onap.so.logger.MsoLogger;
*/
public class FileUtil {
- private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA, FileUtil.class);
+ private static final Logger logger = LoggerFactory.getLogger(FileUtil.class);
/**
* Read the specified resource file and return the contents as a String.
@@ -58,7 +61,7 @@ public class FileUtil {
return "";
}
} catch (IOException e) {
- LOGGER.debug("Exception:", e);
+ logger.debug("Exception:", e);
return "";
}
}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/SDNCAdapterMockTransformer.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/SDNCAdapterMockTransformer.java
index f129164b4c..11788be76e 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/SDNCAdapterMockTransformer.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/SDNCAdapterMockTransformer.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -24,7 +26,6 @@ import javax.ws.rs.core.UriBuilder;
import org.onap.so.client.HttpClient;
import org.onap.so.client.HttpClientFactory;
-import org.onap.so.logger.MsoLogger;
import org.onap.so.utils.TargetEntity;
import com.github.tomakehurst.wiremock.client.ResponseDefinitionBuilder;
@@ -33,6 +34,8 @@ import com.github.tomakehurst.wiremock.extension.Parameters;
import com.github.tomakehurst.wiremock.extension.ResponseDefinitionTransformer;
import com.github.tomakehurst.wiremock.http.Request;
import com.github.tomakehurst.wiremock.http.ResponseDefinition;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
*
@@ -41,7 +44,7 @@ import com.github.tomakehurst.wiremock.http.ResponseDefinition;
*/
public class SDNCAdapterMockTransformer extends ResponseDefinitionTransformer {
- private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, SDNCAdapterMockTransformer.class);
+ private static final Logger logger = LoggerFactory.getLogger(SDNCAdapterMockTransformer.class);
private String callbackResponse;
private String requestId;
@@ -74,7 +77,7 @@ public class SDNCAdapterMockTransformer extends ResponseDefinitionTransformer {
String requestId = requestBody.substring(requestBody.indexOf("<sdncadapter:RequestId>")+23, requestBody.indexOf("</sdncadapter:RequestId>"));
callbackResponse = FileUtil.readResourceFile("__files/" + responseDefinition.getBodyFileName());
- System.out.println("callbackResponse:" + callbackResponse);
+ logger.info("callbackResponse:" + callbackResponse);
if (this.requestId != null) {
callbackResponse = callbackResponse.replace(this.requestId, requestId);
@@ -90,7 +93,7 @@ public class SDNCAdapterMockTransformer extends ResponseDefinitionTransformer {
}
//Kick off callback thread
- System.out.println("callback Url:" + callbackUrl + ":delay:" + delay);
+ logger.info("callback Url:" + callbackUrl + ":delay:" + delay);
CallbackResponseThread calbackResponseThread = new CallbackResponseThread(callbackUrl,callbackResponse, delay);
calbackResponseThread.start();
@@ -128,16 +131,16 @@ public class SDNCAdapterMockTransformer extends ResponseDefinitionTransformer {
//Delay sending callback response
sleep(delay);
} catch (InterruptedException e1) {
- LOGGER.debug("Exception :",e1);
+ logger.debug("Exception :", e1);
}
- LOGGER.debug("Sending callback response:" + callbackUrl);
+ logger.debug("Sending callback response:" + callbackUrl);
try {
HttpClient client = new HttpClientFactory().newTextXmlClient(
UriBuilder.fromUri(callbackUrl).build().toURL(),
TargetEntity.SDNC_ADAPTER);
client.post(payLoad);
} catch (Exception e) {
- LOGGER.debug("Exception :",e);
+ logger.debug("Exception :", e);
}
}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/SDNCAdapterNetworkTopologyMockTransformer.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/SDNCAdapterNetworkTopologyMockTransformer.java
index 832caae803..344c3b521d 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/SDNCAdapterNetworkTopologyMockTransformer.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/SDNCAdapterNetworkTopologyMockTransformer.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -25,7 +27,6 @@ import javax.ws.rs.core.UriBuilder;
import org.onap.so.client.HttpClient;
import org.onap.so.client.HttpClientFactory;
-import org.onap.so.logger.MsoLogger;
import org.onap.so.utils.TargetEntity;
import com.github.tomakehurst.wiremock.client.ResponseDefinitionBuilder;
@@ -34,10 +35,12 @@ import com.github.tomakehurst.wiremock.extension.Parameters;
import com.github.tomakehurst.wiremock.extension.ResponseDefinitionTransformer;
import com.github.tomakehurst.wiremock.http.Request;
import com.github.tomakehurst.wiremock.http.ResponseDefinition;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class SDNCAdapterNetworkTopologyMockTransformer extends ResponseDefinitionTransformer {
- private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, SDNCAdapterNetworkTopologyMockTransformer.class);
+ private static final Logger logger = LoggerFactory.getLogger(SDNCAdapterNetworkTopologyMockTransformer.class);
private String callbackResponse;
private String requestId;
@@ -61,22 +64,22 @@ public class SDNCAdapterNetworkTopologyMockTransformer extends ResponseDefinitio
String callbackUrl = requestBody.substring(requestBody.indexOf("<sdncadapter:CallbackUrl>")+25, requestBody.indexOf("</sdncadapter:CallbackUrl>"));
String requestId = requestBody.substring(requestBody.indexOf("<sdncadapter:RequestId>")+23, requestBody.indexOf("</sdncadapter:RequestId>"));
- System.out.println("request callbackUrl : " + callbackUrl);
- System.out.println("request requestId : " + requestId);
-
- System.out.println("file path/name : " + responseDefinition.getBodyFileName());
+ logger.info("request callbackUrl : " + callbackUrl);
+ logger.info("request requestId : " + requestId);
+
+ logger.info("file path/name : " + responseDefinition.getBodyFileName());
callbackResponse = FileUtil.readResourceFile("__files/" + responseDefinition.getBodyFileName());
// extract Response responseRequestId
String responseRequestId = callbackResponse.substring(callbackResponse.indexOf("<RequestId>")+11, callbackResponse.indexOf("</RequestId>"));
- System.out.println("response requestId: " + responseRequestId);
- System.out.println("callbackResponse (before): " + callbackResponse);
+ logger.info("response requestId: " + responseRequestId);
+ logger.info("callbackResponse (before): " + callbackResponse);
callbackResponse = callbackResponse.replace(responseRequestId, requestId);
if (this.requestId != null) {
callbackResponse = callbackResponse.replace(this.requestId, requestId);
} else {
callbackResponse = callbackResponse.replace(responseRequestId, requestId);
}
- System.out.println("callbackResponse (after):" + callbackResponse);
+ logger.info("callbackResponse (after):" + callbackResponse);
Object sdncDelay = MockResource.getMockProperties().get("sdnc_delay");
int delay = 300;
@@ -85,7 +88,7 @@ public class SDNCAdapterNetworkTopologyMockTransformer extends ResponseDefinitio
}
//Kick off callback thread
- System.out.println("(NetworkTopologyMockTransformer) callback Url:" + callbackUrl + ":delay:" + delay);
+ logger.info("(NetworkTopologyMockTransformer) callback Url:" + callbackUrl + ":delay:" + delay);
CallbackResponseThread calbackResponseThread = new CallbackResponseThread(callbackUrl,callbackResponse, delay);
calbackResponseThread.start();
@@ -119,19 +122,18 @@ public class SDNCAdapterNetworkTopologyMockTransformer extends ResponseDefinitio
sleep(delay);
} catch (InterruptedException e1) {
// TODO Auto-generated catch block
- LOGGER.debug("Exception :",e1);
+ logger.debug("Exception :", e1);
}
- LOGGER.debug("Sending callback response to url: " + callbackUrl);
+ logger.debug("Sending callback response to url: {}", callbackUrl);
try {
- HttpClient client = new HttpClientFactory().newTextXmlClient(
- UriBuilder.fromUri(callbackUrl).build().toURL(),
- TargetEntity.SDNC_ADAPTER);
+ HttpClient client = new HttpClientFactory()
+ .newTextXmlClient(UriBuilder.fromUri(callbackUrl).build().toURL(), TargetEntity.SDNC_ADAPTER);
Response response = client.post(payLoad);
- LOGGER.debug("Successfully posted callback? Status: " + response.getStatus());
+ logger.debug("Successfully posted callback? Status: {}", response.getStatus());
} catch (Exception e) {
// TODO Auto-generated catch block
- LOGGER.debug("catch error in - request.post() ");
- LOGGER.debug("Exception :",e);
+ logger.debug("catch error in - request.post() ");
+ logger.debug("Exception :", e);
}
}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterCreateMockTransformer.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterCreateMockTransformer.java
index 107a70d1d0..362d9508d3 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterCreateMockTransformer.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterCreateMockTransformer.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -25,7 +27,6 @@ import javax.ws.rs.core.UriBuilder;
import org.onap.so.client.HttpClient;
import org.onap.so.client.HttpClientFactory;
-import org.onap.so.logger.MsoLogger;
import org.onap.so.utils.TargetEntity;
import com.github.tomakehurst.wiremock.client.ResponseDefinitionBuilder;
@@ -34,6 +35,8 @@ import com.github.tomakehurst.wiremock.extension.Parameters;
import com.github.tomakehurst.wiremock.extension.ResponseDefinitionTransformer;
import com.github.tomakehurst.wiremock.http.Request;
import com.github.tomakehurst.wiremock.http.ResponseDefinition;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Please describe the VnfAdapterCreateMockTransformer.java class
@@ -41,7 +44,7 @@ import com.github.tomakehurst.wiremock.http.ResponseDefinition;
*/
public class VnfAdapterCreateMockTransformer extends ResponseDefinitionTransformer {
- private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, VnfAdapterCreateMockTransformer.class);
+ private static final Logger logger = LoggerFactory.getLogger(VnfAdapterCreateMockTransformer.class);
private String notifyCallbackResponse;
private String ackResponse;
@@ -74,17 +77,17 @@ public class VnfAdapterCreateMockTransformer extends ResponseDefinitionTransform
responseMessageId = ackResponse.substring(ackResponse.indexOf("<messageId>")+11, ackResponse.indexOf("</messageId>"));
updatedResponse = ackResponse.replace(responseMessageId, messageId);
} catch (Exception ex) {
- LOGGER.debug("Exception :",ex);
+ logger.debug("Exception :",ex);
System.out.println(" ******* Use default response file in '__files/vnfAdapterMocks/vnfCreateSimResponse.xml'");
responseMessageId = notifyCallbackResponse.substring(notifyCallbackResponse.indexOf("<messageId>")+11, notifyCallbackResponse.indexOf("</messageId>"));
updatedResponse = notifyCallbackResponse.replace(responseMessageId, messageId);
}
- System.out.println("response (mock) messageId : " + responseMessageId);
- System.out.println("request (replacement) messageId: " + messageId);
+ logger.info("response (mock) messageId : {}", responseMessageId);
+ logger.info("request (replacement) messageId: {}", messageId);
- System.out.println("vnf Response (before):" + notifyCallbackResponse);
- System.out.println("vnf Response (after):" + updatedResponse);
+ logger.info("vnf Response (before): {}", notifyCallbackResponse);
+ logger.info("vnf Response (after): {}", updatedResponse);
Object vnfDelay = MockResource.getMockProperties().get("vnf_delay");
int delay = 300;
@@ -93,7 +96,7 @@ public class VnfAdapterCreateMockTransformer extends ResponseDefinitionTransform
}
//Kick off callback thread
- System.out.println("VnfAdapterCreateMockTransformer notficationUrl: " + notficationUrl + ":delay: " + delay);
+ logger.info("VnfAdapterCreateMockTransformer notficationUrl: {} :delay: {}", notficationUrl, delay);
CallbackResponseThread callbackResponseThread = new CallbackResponseThread(notficationUrl,updatedResponse, delay);
callbackResponseThread.start();
@@ -128,20 +131,19 @@ public class VnfAdapterCreateMockTransformer extends ResponseDefinitionTransform
sleep(delay);
} catch (InterruptedException e1) {
// TODO Auto-generated catch block
- LOGGER.debug("Exception :",e1);
+ logger.debug("Exception :",e1);
}
- LOGGER.debug("Sending callback response to url: " + callbackUrl);
+ logger.debug("Sending callback response to url: {}", callbackUrl);
try {
HttpClient client = new HttpClientFactory().newTextXmlClient(
UriBuilder.fromUri(callbackUrl).build().toURL(),
TargetEntity.VNF_ADAPTER);
Response response = client.post(payLoad);
- LOGGER.debug("Successfully posted callback? Status: " + response.getStatus());
- //System.err.println("Successfully posted callback:" + result.getStatus());
+ logger.debug("Successfully posted callback? Status: {}", response.getStatus());
} catch (Exception e) {
// TODO Auto-generated catch block
- LOGGER.debug("catch error in - request.post() ");
- LOGGER.debug("Exception :",e);
+ logger.debug("catch error in - request.post() ");
+ logger.debug("Exception :", e);
}
}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterDeleteMockTransformer.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterDeleteMockTransformer.java
index cf0f966414..b67f3dcedd 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterDeleteMockTransformer.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterDeleteMockTransformer.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -24,7 +26,6 @@ import javax.ws.rs.core.UriBuilder;
import org.onap.so.client.HttpClient;
import org.onap.so.client.HttpClientFactory;
-import org.onap.so.logger.MsoLogger;
import org.onap.so.utils.TargetEntity;
import com.github.tomakehurst.wiremock.client.ResponseDefinitionBuilder;
@@ -33,6 +34,8 @@ import com.github.tomakehurst.wiremock.extension.Parameters;
import com.github.tomakehurst.wiremock.extension.ResponseDefinitionTransformer;
import com.github.tomakehurst.wiremock.http.Request;
import com.github.tomakehurst.wiremock.http.ResponseDefinition;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Please describe the VnfAdapterCreateMockTransformer.java class
@@ -40,7 +43,7 @@ import com.github.tomakehurst.wiremock.http.ResponseDefinition;
*/
public class VnfAdapterDeleteMockTransformer extends ResponseDefinitionTransformer {
- private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, VnfAdapterDeleteMockTransformer.class);
+ private static final Logger logger = LoggerFactory.getLogger(VnfAdapterDeleteMockTransformer.class);
private String notifyCallbackResponse;
private String ackResponse;
@@ -58,8 +61,6 @@ public class VnfAdapterDeleteMockTransformer extends ResponseDefinitionTransform
public ResponseDefinition transform(Request request, ResponseDefinition responseDefinition,
FileSource fileSource, Parameters parameters) {
- // System.err.println("notifyCallbackResponse:" + notifyCallbackResponse);
-
String requestBody = request.getBodyAsString();
String notficationUrl = requestBody.substring(requestBody.indexOf("<notificationUrl>")+17, requestBody.indexOf("</notificationUrl>"));
@@ -69,23 +70,23 @@ public class VnfAdapterDeleteMockTransformer extends ResponseDefinitionTransform
try {
// try supplied response file (if any)
- System.out.println(" Supplied fileName: " + responseDefinition.getBodyFileName());
+ logger.info(" Supplied fileName: {}", responseDefinition.getBodyFileName());
ackResponse = FileUtil.readResourceFile("__files/" + responseDefinition.getBodyFileName());
notifyCallbackResponse = ackResponse;
responseMessageId = ackResponse.substring(ackResponse.indexOf("<messageId>")+11, ackResponse.indexOf("</messageId>"));
updatedResponse = ackResponse.replace(responseMessageId, messageId);
} catch (Exception ex) {
- LOGGER.debug("Exception :",ex);
- System.out.println(" ******* Use default response file in '__files/vnfAdapterMocks/vnfDeleteSimResponse.xml'");
+ logger.debug("Exception :",ex);
+ logger.info(" ******* Use default response file in '__files/vnfAdapterMocks/vnfDeleteSimResponse.xml'");
responseMessageId = notifyCallbackResponse.substring(notifyCallbackResponse.indexOf("<messageId>")+11, notifyCallbackResponse.indexOf("</messageId>"));
updatedResponse = notifyCallbackResponse.replace(responseMessageId, messageId);
}
- System.out.println("response (mock) messageId : " + responseMessageId);
- System.out.println("request (replacement) messageId: " + messageId);
+ logger.info("response (mock) messageId : {}", responseMessageId);
+ logger.info("request (replacement) messageId: {}", messageId);
- System.out.println("vnf Response (before):" + notifyCallbackResponse);
- System.out.println("vnf Response (after):" + updatedResponse);
+ logger.info("vnf Response (before):{}", notifyCallbackResponse);
+ logger.info("vnf Response (after):{}", updatedResponse);
Object vnfDelay = MockResource.getMockProperties().get("vnf_delay");
int delay = 300;
@@ -94,7 +95,7 @@ public class VnfAdapterDeleteMockTransformer extends ResponseDefinitionTransform
}
//Kick off callback thread
- System.out.println("VnfAdapterDeleteMockTransformer notficationUrl: " + notficationUrl + ":delay: " + delay);
+ logger.info("VnfAdapterDeleteMockTransformer notficationUrl: {} :delay: {}", notficationUrl, delay);
CallbackResponseThread callbackResponseThread = new CallbackResponseThread(notficationUrl,updatedResponse, delay);
callbackResponseThread.start();
@@ -129,7 +130,7 @@ public class VnfAdapterDeleteMockTransformer extends ResponseDefinitionTransform
sleep(delay);
} catch (InterruptedException e1) {
// TODO Auto-generated catch block
- LOGGER.debug("Exception :",e1);
+ logger.debug("Exception :",e1);
}
try {
@@ -139,8 +140,8 @@ public class VnfAdapterDeleteMockTransformer extends ResponseDefinitionTransform
client.post(payLoad);
} catch (Exception e) {
// TODO Auto-generated catch block
- System.out.println("catch error in - request.post() ");
- LOGGER.debug("Exception :",e);
+ logger.info("catch error in - request.post() ");
+ logger.debug("Exception :",e);
}
}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterQueryMockTransformer.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterQueryMockTransformer.java
index 5eaa4e75b0..48ced35810 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterQueryMockTransformer.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterQueryMockTransformer.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -25,7 +27,6 @@ import javax.ws.rs.core.UriBuilder;
import org.onap.so.client.HttpClient;
import org.onap.so.client.HttpClientFactory;
-import org.onap.so.logger.MsoLogger;
import org.onap.so.utils.TargetEntity;
import com.github.tomakehurst.wiremock.client.ResponseDefinitionBuilder;
@@ -34,6 +35,8 @@ import com.github.tomakehurst.wiremock.extension.Parameters;
import com.github.tomakehurst.wiremock.extension.ResponseDefinitionTransformer;
import com.github.tomakehurst.wiremock.http.Request;
import com.github.tomakehurst.wiremock.http.ResponseDefinition;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Please describe the VnfAdapterQueryMockTransformer.java class
@@ -43,7 +46,8 @@ import com.github.tomakehurst.wiremock.http.ResponseDefinition;
public class VnfAdapterQueryMockTransformer extends ResponseDefinitionTransformer{
- private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, VnfAdapterQueryMockTransformer.class);
+ private static final Logger logger = LoggerFactory.getLogger(VnfAdapterQueryMockTransformer
+ .class);
private String notifyCallbackResponse;
private String ackResponse;
@@ -70,36 +74,29 @@ public class VnfAdapterQueryMockTransformer extends ResponseDefinitionTransforme
String notficationUrl = requestBody.substring(requestBody.indexOf("<notificationUrl>")+17, requestBody.indexOf("</notificationUrl>"));
String messageId = requestBody.substring(requestBody.indexOf("<messageId>")+11, requestBody.indexOf("</messageId>"));
- // String updatedResponse = notifyCallbackResponse.replace("b1a82ce6-7f5c-45fd-9273-acaf88fc2137", messageId);
-
+
String responseMessageId = "";
String updatedResponse = "";
-
- // if (ackResponse == null) {
- //System.err.println("file:" + responseDefinition.getBodyFileName());
- // ackResponse = FileUtil.readResourceFile("__files/" + responseDefinition.getBodyFileName());
- //}
-
try {
// try supplied response file (if any)
- System.out.println(" Supplied fileName: " + responseDefinition.getBodyFileName());
+ logger.info(" Supplied fileName: {}", responseDefinition.getBodyFileName());
ackResponse = FileUtil.readResourceFile("__files/" + responseDefinition.getBodyFileName());
notifyCallbackResponse = ackResponse;
responseMessageId = ackResponse.substring(ackResponse.indexOf("<messageId>")+11, ackResponse.indexOf("</messageId>"));
updatedResponse = ackResponse.replace(responseMessageId, messageId);
} catch (Exception ex) {
- LOGGER.debug("Exception :",ex);
- System.out.println(" ******* Use default response file in '__files/vnfAdapterMocks/vnfQuerySimResponse.xml'");
+ logger.debug("Exception :",ex);
+ logger.info(" ******* Use default response file in '__files/vnfAdapterMocks/vnfQuerySimResponse.xml'");
responseMessageId = notifyCallbackResponse.substring(notifyCallbackResponse.indexOf("<messageId>")+11, notifyCallbackResponse.indexOf("</messageId>"));
updatedResponse = notifyCallbackResponse.replace(responseMessageId, messageId);
}
-
- System.out.println("response (mock) messageId : " + responseMessageId);
- System.out.println("request (replacement) messageId: " + messageId);
-
- System.out.println("vnf Response (before):" + notifyCallbackResponse);
- System.out.println("vnf Response (after):" + updatedResponse);
+
+ logger.info("response (mock) messageId : {}", responseMessageId);
+ logger.info("request (replacement) messageId: {}", messageId);
+
+ logger.info("vnf Response (before):{}", notifyCallbackResponse);
+ logger.info("vnf Response (after):{}", updatedResponse);
Object vnfDelay = MockResource.getMockProperties().get("vnf_delay");
@@ -109,12 +106,9 @@ public class VnfAdapterQueryMockTransformer extends ResponseDefinitionTransforme
}
//Kick off callback thread
-
- //System.out.println("notficationUrl" + notficationUrl);
- //System.out.println("updatedResponse" + updatedResponse);
- System.out.println("VnfAdapterQueryMockTransformer notficationUrl: " + notficationUrl + ":delay: " + delay);
+ logger.info("VnfAdapterQueryMockTransformer notficationUrl: {}:delay: {}", notficationUrl, delay);
CallbackResponseThread callbackResponseThread = new CallbackResponseThread(notficationUrl,updatedResponse, delay);
- System.out.println("Inside Callback" );
+ logger.info("Inside Callback" );
callbackResponseThread.start();
return ResponseDefinitionBuilder
@@ -145,7 +139,7 @@ public class VnfAdapterQueryMockTransformer extends ResponseDefinitionTransforme
//Delay sending callback response
sleep(delay);
} catch (InterruptedException e1) {
- LOGGER.debug("Exception :",e1);
+ logger.debug("Exception :",e1);
}
try {
@@ -154,7 +148,7 @@ public class VnfAdapterQueryMockTransformer extends ResponseDefinitionTransforme
TargetEntity.VNF_ADAPTER);
client.post(payLoad);
} catch (Exception e) {
- LOGGER.debug("Exception :",e);
+ logger.debug("Exception :",e);
}
}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterRollbackMockTransformer.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterRollbackMockTransformer.java
index 06f2fb7d5f..edf05422d1 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterRollbackMockTransformer.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterRollbackMockTransformer.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -24,7 +26,6 @@ import javax.ws.rs.core.UriBuilder;
import org.onap.so.client.HttpClient;
import org.onap.so.client.HttpClientFactory;
-import org.onap.so.logger.MsoLogger;
import org.onap.so.utils.TargetEntity;
import com.github.tomakehurst.wiremock.client.ResponseDefinitionBuilder;
@@ -33,6 +34,8 @@ import com.github.tomakehurst.wiremock.extension.Parameters;
import com.github.tomakehurst.wiremock.extension.ResponseDefinitionTransformer;
import com.github.tomakehurst.wiremock.http.Request;
import com.github.tomakehurst.wiremock.http.ResponseDefinition;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Please describe the VnfAdapterCreateMockTransformer.java class
@@ -40,7 +43,7 @@ import com.github.tomakehurst.wiremock.http.ResponseDefinition;
*/
public class VnfAdapterRollbackMockTransformer extends ResponseDefinitionTransformer {
- private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, VnfAdapterRollbackMockTransformer.class);
+ private static final Logger logger = LoggerFactory.getLogger(VnfAdapterRollbackMockTransformer.class);
private String notifyCallbackResponse;
private String ackResponse;
@@ -72,23 +75,23 @@ public class VnfAdapterRollbackMockTransformer extends ResponseDefinitionTransfo
try {
// try supplied response file (if any)
- System.out.println(" Supplied fileName: " + responseDefinition.getBodyFileName());
+ logger.info(" Supplied fileName: {}", responseDefinition.getBodyFileName());
ackResponse = FileUtil.readResourceFile("__files/" + responseDefinition.getBodyFileName());
notifyCallbackResponse = ackResponse;
responseMessageId = ackResponse.substring(ackResponse.indexOf("<messageId>")+11, ackResponse.indexOf("</messageId>"));
updatedResponse = ackResponse.replace(responseMessageId, messageId);
} catch (Exception ex) {
- LOGGER.debug("Exception :",ex);
- System.out.println(" ******* Use default response file in '__files/vnfAdapterMocks/vnfRollbackSimResponse.xml'");
+ logger.debug("Exception :",ex);
+ logger.info(" ******* Use default response file in '__files/vnfAdapterMocks/vnfRollbackSimResponse.xml'");
responseMessageId = notifyCallbackResponse.substring(notifyCallbackResponse.indexOf("<messageId>")+11, notifyCallbackResponse.indexOf("</messageId>"));
updatedResponse = notifyCallbackResponse.replace(responseMessageId, messageId);
}
-
- System.out.println("response (mock) messageId : " + responseMessageId);
- System.out.println("request (replacement) messageId: " + messageId);
-
- System.out.println("vnf Response (before):" + notifyCallbackResponse);
- System.out.println("vnf Response (after):" + updatedResponse);
+
+ logger.info("response (mock) messageId : {}", responseMessageId);
+ logger.info("request (replacement) messageId: {}", messageId);
+
+ logger.info("vnf Response (before):{}", notifyCallbackResponse);
+ logger.info("vnf Response (after):{}", updatedResponse);
Object vnfDelay = MockResource.getMockProperties().get("vnf_delay");
int delay = 300;
@@ -97,7 +100,7 @@ public class VnfAdapterRollbackMockTransformer extends ResponseDefinitionTransfo
}
//Kick off callback thread
- System.out.println("VnfAdapterRollbackMockTransformer notficationUrl: " + notficationUrl + ":delay: " + delay);
+ logger.info("VnfAdapterRollbackMockTransformer notficationUrl: {} :delay: {}", notficationUrl, delay);
CallbackResponseThread callbackResponseThread = new CallbackResponseThread(notficationUrl,updatedResponse, delay);
callbackResponseThread.start();
@@ -130,7 +133,7 @@ public class VnfAdapterRollbackMockTransformer extends ResponseDefinitionTransfo
//Delay sending callback response
sleep(delay);
} catch (InterruptedException e1) {
- LOGGER.debug("Exception :",e1);
+ logger.debug("Exception :",e1);
}
try {
@@ -139,8 +142,8 @@ public class VnfAdapterRollbackMockTransformer extends ResponseDefinitionTransfo
TargetEntity.VNF_ADAPTER);
client.post(payLoad);
} catch (Exception e) {
- System.out.println("catch error in - request.post() ");
- LOGGER.debug("Exception :",e);
+ logger.info("catch error in - request.post() ");
+ logger.debug("Exception :", e);
}
}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterUpdateMockTransformer.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterUpdateMockTransformer.java
index 9e60e87644..5693877574 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterUpdateMockTransformer.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterUpdateMockTransformer.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -24,7 +26,6 @@ import javax.ws.rs.core.UriBuilder;
import org.onap.so.client.HttpClient;
import org.onap.so.client.HttpClientFactory;
-import org.onap.so.logger.MsoLogger;
import org.onap.so.utils.TargetEntity;
import com.github.tomakehurst.wiremock.client.ResponseDefinitionBuilder;
@@ -33,6 +34,8 @@ import com.github.tomakehurst.wiremock.extension.Parameters;
import com.github.tomakehurst.wiremock.extension.ResponseDefinitionTransformer;
import com.github.tomakehurst.wiremock.http.Request;
import com.github.tomakehurst.wiremock.http.ResponseDefinition;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Please describe the VnfAdapterUpdateMockTransformer.java class
@@ -40,7 +43,7 @@ import com.github.tomakehurst.wiremock.http.ResponseDefinition;
*/
public class VnfAdapterUpdateMockTransformer extends ResponseDefinitionTransformer {
- private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, VnfAdapterUpdateMockTransformer.class);
+ private static final Logger logger = LoggerFactory.getLogger(VnfAdapterUpdateMockTransformer.class);
private String notifyCallbackResponse;
private String requestId;
@@ -72,23 +75,23 @@ public class VnfAdapterUpdateMockTransformer extends ResponseDefinitionTransform
try {
// try supplied response file (if any)
- System.out.println(" Supplied fileName: " + responseDefinition.getBodyFileName());
+ logger.info(" Supplied fileName: {}", responseDefinition.getBodyFileName());
ackResponse = FileUtil.readResourceFile("__files/" + responseDefinition.getBodyFileName());
notifyCallbackResponse = ackResponse;
responseMessageId = ackResponse.substring(ackResponse.indexOf("<messageId>")+11, ackResponse.indexOf("</messageId>"));
updatedResponse = ackResponse.replace(responseMessageId, messageId);
} catch (Exception ex) {
- LOGGER.debug("Exception :",ex);
- System.out.println(" ******* Use default response file in 'vnfAdapter/vnfUpdateSimResponse.xml'");
+ logger.debug("Exception :",ex);
+ logger.info(" ******* Use default response file in 'vnfAdapter/vnfUpdateSimResponse.xml'");
responseMessageId = notifyCallbackResponse.substring(notifyCallbackResponse.indexOf("<messageId>")+11, notifyCallbackResponse.indexOf("</messageId>"));
updatedResponse = notifyCallbackResponse.replace(responseMessageId, messageId);
}
-
- System.out.println("response (mock) messageId : " + responseMessageId);
- System.out.println("request (replacement) messageId: " + messageId);
-
- System.out.println("vnf Response (before):" + notifyCallbackResponse);
- System.out.println("vnf Response (after):" + updatedResponse);
+
+ logger.info("response (mock) messageId : {}", responseMessageId);
+ logger.info("request (replacement) messageId: {}", messageId);
+
+ logger.info("vnf Response (before):{}", notifyCallbackResponse);
+ logger.info("vnf Response (after):{}", updatedResponse);
Object vnfDelay = MockResource.getMockProperties().get("vnf_delay");
int delay = 300;
@@ -97,7 +100,7 @@ public class VnfAdapterUpdateMockTransformer extends ResponseDefinitionTransform
}
//Kick off callback thread
- System.out.println("VnfAdapterUpdateMockTransformer notficationUrl: " + notficationUrl + ":delay: " + delay);
+ logger.info("VnfAdapterUpdateMockTransformer notficationUrl: {} :delay: {}", notficationUrl, delay);
CallbackResponseThread callbackResponseThread = new CallbackResponseThread(notficationUrl,updatedResponse, delay);
callbackResponseThread.start();
@@ -130,7 +133,7 @@ public class VnfAdapterUpdateMockTransformer extends ResponseDefinitionTransform
//Delay sending callback response
sleep(delay);
} catch (InterruptedException e1) {
- LOGGER.debug("Exception :", e1);
+ logger.debug("Exception :", e1);
}
try {
@@ -139,8 +142,8 @@ public class VnfAdapterUpdateMockTransformer extends ResponseDefinitionTransform
TargetEntity.VNF_ADAPTER);
client.post(payLoad);
} catch (Exception e) {
- System.out.println("catch error in - request.post() ");
- LOGGER.debug("Exception :",e);
+ logger.info("catch error in - request.post() ");
+ logger.debug("Exception :", e);
}
}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java
index 7e76e52959..3cb7b241dc 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java
@@ -643,14 +643,16 @@ public class BBInputSetupMapperLayerTest {
@Test
public void testMapNameValueUserParams() throws IOException {
RequestDetails requestDetails = mapper.readValue(new File(RESOURCE_PATH + "RequestDetailsInput_mapReqContext.json"), RequestDetails.class);
- HashMap<String,String> actual = bbInputSetupMapperLayer.mapNameValueUserParams(requestDetails.getRequestParameters());
+ Map<String,Object> actual = bbInputSetupMapperLayer.mapNameValueUserParams(requestDetails.getRequestParameters());
+ assertTrue(actual.containsKey("mns_vfw_protected_route_prefixes"));
+ assertTrue(actual.get("mns_vfw_protected_route_prefixes").toString().contains("interface_route_table_routes_route"));
+ assertTrue(actual.get("mns_vfw_protected_route_prefixes").toString().contains("1.1.1.1/32"));
+ assertTrue(actual.get("mns_vfw_protected_route_prefixes").toString().contains("0::1/128"));
assertTrue(actual.containsKey("name1"));
assertTrue(actual.containsValue("value1"));
assertTrue(actual.get("name1").equals("value1"));
- assertTrue(actual.containsKey("name2"));
- assertTrue(actual.containsValue("value2"));
- assertTrue(actual.get("name2").equals("value2"));
+
assertFalse(actual.containsKey("ignore"));
assertFalse(actual.containsValue("ignore"));
}
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 56875d315b..cea8fc3cc2 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
@@ -776,7 +776,7 @@ public class BBInputSetupTest {
@Test
public void testPopulateGBBWithSIAndAdditionalInfo() throws Exception {
- GeneralBuildingBlock expected = mapper.readValue(new File(RESOURCE_PATH + "GeneralBuildingBlockExpected.json"),
+ GeneralBuildingBlock expected = mapper.readValue(new File(RESOURCE_PATH + "GeneralBuildingBlockExpectedWUserParamsInfo.json"),
GeneralBuildingBlock.class);
ExecuteBuildingBlock executeBB = mapper.readValue(new File(RESOURCE_PATH + "ExecuteBuildingBlockSimple.json"),
ExecuteBuildingBlock.class);
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/GeneralBuildingBlockExpectedWUserParamsInfo.json b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/GeneralBuildingBlockExpectedWUserParamsInfo.json
new file mode 100644
index 0000000000..5ac07c6546
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/GeneralBuildingBlockExpectedWUserParamsInfo.json
@@ -0,0 +1,132 @@
+{
+ "requestContext": {
+ "product-family-id": "productFamilyId",
+ "source": "source",
+ "requestor-id": "requestorId",
+ "mso-request-id": "requestId",
+ "subscription-service-type": "subscriptionServiceType",
+ "user-params": {
+
+ "mns_vfw_protected_route_prefixes": [ {
+ "interface_route_table_routes_route" : "1.1.1.1/32"
+ }, {
+ "interface_route_table_routes_route" : "0::1/128"
+ } ],
+ "name1": "value1"
+ },
+ "action": "createInstance",
+ "callback-url": "callbackURL",
+ "requestParameters": {
+ "subscriptionServiceType": "subscriptionServiceType",
+ "userParams": [
+
+ {
+ "name" : "mns_vfw_protected_route_prefixes",
+ "value" : [ {
+ "interface_route_table_routes_route" : "1.1.1.1/32"
+ }, {
+ "interface_route_table_routes_route" : "0::1/128"
+ } ]
+ },
+ {
+ "name": "name1",
+ "value": "value1"
+ },
+ {
+ "ignore": "false",
+ "skip": "ignore"
+ }
+ ]
+ },
+ "configurationParameters": [
+ {
+ "availability-zone":"$.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone[0]",
+ "xtz-123":"$.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone[0]"
+ }
+ ]
+ },
+ "orchContext": {
+ "is-rollback-enabled": false
+ },
+ "cloudRegion": {
+ "lcp-cloud-region-id": "lcpCloudRegionId",
+ "cloud-owner": "test-owner-name",
+ "tenant-id": "tenantId",
+ "complex": "complexName"
+ },
+ "userInput": null,
+ "customer": {
+ "global-customer-id": "globalCustomerId",
+ "subscriber-name": "subscriberName",
+ "subscriber-type": "subscriberType",
+ "service-subscription": {
+ "service-type": "subscriptionServiceType",
+ "service-instances": [
+ {
+ "service-instance-id": "3655a595-05d1-433c-93c0-3afd6b572545",
+ "service-instance-name": "serviceInstanceName",
+ "orchestration-status": "PRECREATED",
+ "owning-entity": {
+ "owning-entity-id": "owningEntityId",
+ "owning-entity-name": "owningEntityName"
+ },
+ "project": {
+ "project-name": "projectName"
+ },
+ "vnfs": [],
+ "allotted-resources": [],
+ "networks": [],
+ "vhn-portal-url": null,
+ "service-instance-location-id": null,
+ "selflink": null,
+ "metadata": null,
+ "configurations": [],
+ "model-info-service-instance": {
+ "description": "description",
+ "created": null,
+ "model-name": "modelName",
+ "model-uuid": "modelUUID",
+ "model-invariant-uuid": "modelInvariantUUID",
+ "model-version": "modelVersion",
+ "service-type": "serviceType",
+ "service-role": "serviceRole",
+ "environment-context": "environmentContext",
+ "workload-context": "workloadContext"
+ }
+ }
+ ]
+ }
+ },
+ "serviceInstance": {
+ "service-instance-id": "3655a595-05d1-433c-93c0-3afd6b572545",
+ "service-instance-name": "serviceInstanceName",
+ "orchestration-status": "PRECREATED",
+ "owning-entity": {
+ "owning-entity-id": "owningEntityId",
+ "owning-entity-name": "owningEntityName"
+ },
+ "project": {
+ "project-name": "projectName"
+ },
+ "vnfs": [],
+ "allotted-resources": [],
+ "networks": [],
+ "vhn-portal-url": null,
+ "service-instance-location-id": null,
+ "selflink": null,
+ "metadata": null,
+ "configurations": [],
+ "model-info-service-instance": {
+ "description": "description",
+ "created": null,
+ "model-name": "modelName",
+ "model-uuid": "modelUUID",
+ "model-invariant-uuid": "modelInvariantUUID",
+ "model-version": "modelVersion",
+ "service-type": "serviceType",
+ "service-role": "serviceRole",
+ "environment-context": "environmentContext",
+ "workload-context": "workloadContext"
+ }
+ }
+}
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/RequestContextExpected.json b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/RequestContextExpected.json
index 906903e0b2..06b219df38 100644
--- a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/RequestContextExpected.json
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/RequestContextExpected.json
@@ -6,21 +6,31 @@
"action": null,
"callback-url": "callbackURL",
"user-params": {
- "name1": "value1",
- "name2": "value2"
+
+ "mns_vfw_protected_route_prefixes": [ {
+ "interface_route_table_routes_route" : "1.1.1.1/32"
+ }, {
+ "interface_route_table_routes_route" : "0::1/128"
+ } ],
+ "name1": "value1"
},
"requestParameters": {
"subscriptionServiceType": "subscriptionServiceType",
"userParams": [
+
{
+ "name" : "mns_vfw_protected_route_prefixes",
+ "value" : [ {
+ "interface_route_table_routes_route" : "1.1.1.1/32"
+ }, {
+ "interface_route_table_routes_route" : "0::1/128"
+ } ]
+ },
+ {
"name": "name1",
"value": "value1"
},
{
- "name": "name2",
- "value": "value2"
- },
- {
"ignore": "false",
"skip": "ignore"
}
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/RequestDetailsInput_mapReqContext.json b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/RequestDetailsInput_mapReqContext.json
index 9afbdd9150..7e28b44abd 100644
--- a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/RequestDetailsInput_mapReqContext.json
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/RequestDetailsInput_mapReqContext.json
@@ -9,20 +9,22 @@
"requestParameters": {
"subscriptionServiceType": "subscriptionServiceType",
"userParams": [
- {
- "name": "name1",
- "value": "value1"
- },
- {
- "name": "name2",
- "value": "value2"
- },
- {
- "ignore": "false",
- "skip": "ignore"
- }
- ]
-
+ {
+ "name" : "mns_vfw_protected_route_prefixes",
+ "value" : [ {
+ "interface_route_table_routes_route" : "1.1.1.1/32"
+ }, {
+ "interface_route_table_routes_route" : "0::1/128"
+ } ]
+ },
+ {
+ "name": "name1",
+ "value": "value1"
+ },
+ {
+ "ignore": "false",
+ "skip": "ignore"
+ }]
},
"configurationParameters": [
{
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/xml/XmlTool.java b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/xml/XmlTool.java
index 49bf95fab0..6c8070f9bd 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/xml/XmlTool.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/xml/XmlTool.java
@@ -5,6 +5,8 @@
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
* ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -21,7 +23,6 @@
package org.onap.so.bpmn.core.xml;
-import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
@@ -50,9 +51,9 @@ import javax.xml.xpath.XPathExpressionException;
import javax.xml.xpath.XPathFactory;
import org.apache.commons.lang3.StringEscapeUtils;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.w3c.dom.Document;
-import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.InputSource;
@@ -64,7 +65,7 @@ import org.xml.sax.SAXException;
public final class XmlTool {
private static final Map<String, Integer> ENTITIES = new HashMap<>();
- private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.BPEL, XmlTool.class);
+ private static final Logger logger = LoggerFactory.getLogger(XmlTool.class);
static {
ENTITIES.put("amp", 38);
ENTITIES.put("quot", 34);
@@ -165,7 +166,7 @@ public final class XmlTool {
*/
public static String removeNamespaces(Object xml) {
if (xml == null) {
- LOGGER.debug("removeNamespaces input object is null , returning null");
+ logger.debug("removeNamespaces input object is null , returning null");
return null;
}
@@ -204,7 +205,7 @@ public final class XmlTool {
}
return out.toString();
} catch (Exception e) {
- LOGGER.debug("Exception at readResourceFile stream: " + e);
+ logger.debug("Exception at readResourceFile stream: " + e);
return null;
}
}
@@ -242,7 +243,7 @@ public final class XmlTool {
//System.out.println("Did not find element tag " + elementTag + " in XML");
return Optional.empty();
} else {
- modNode.setTextContent(newValue);
+ modNode.setTextContent(newValue);
}
TransformerFactory transformerFactory = TransformerFactory.newInstance();
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/utils/CamundaDBSetup.java b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/utils/CamundaDBSetup.java
index f3cc094873..15f6fbe008 100644
--- a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/utils/CamundaDBSetup.java
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/utils/CamundaDBSetup.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -21,18 +23,18 @@
package org.onap.so.bpmn.core.utils;
import java.sql.Connection;
-import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.SQLException;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Sets up the unit test (H2) database for Camunda.
*/
public class CamundaDBSetup {
private static boolean isDBConfigured = false;
- private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, CamundaDBSetup.class);
+ private static final Logger logger = LoggerFactory.getLogger(CamundaDBSetup.class);
private CamundaDBSetup() {
}
@@ -42,7 +44,7 @@ public class CamundaDBSetup {
return;
}
- LOGGER.debug ("Configuring the Camunda H2 database for MSO");
+ logger.debug ("Configuring the Camunda H2 database for MSO");
Connection connection = null;
PreparedStatement stmt = null;
@@ -57,7 +59,7 @@ public class CamundaDBSetup {
try {
stmt.close();
} catch (Exception e) {
- LOGGER.debug("Exception :",e);
+ logger.debug("Exception :",e);
}
}
@@ -65,9 +67,9 @@ public class CamundaDBSetup {
try {
connection.close();
} catch (Exception e) {
- LOGGER.debug("Exception :",e);
+ logger.debug("Exception :",e);
}
}
}
}
-} \ No newline at end of file
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/CallbackHandlerService.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/CallbackHandlerService.java
index 02164ccec1..920cb11e4c 100644
--- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/CallbackHandlerService.java
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/CallbackHandlerService.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -33,6 +35,8 @@ import org.camunda.bpm.engine.runtime.MessageCorrelationResult;
import org.onap.so.bpmn.core.UrnPropertiesReader;
import org.onap.so.logger.MessageEnum;
import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
@@ -47,7 +51,7 @@ public class CallbackHandlerService {
public static final long FAST_POLL_INT_MS = 100;
public static final long SLOW_POLL_INT_MS = 1000;
- private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, CallbackHandlerService.class);
+ private static final Logger logger = LoggerFactory.getLogger(CallbackHandlerService.class);
@Autowired
RuntimeService runtimeService;
@@ -75,7 +79,7 @@ public class CallbackHandlerService {
long startTime = System.currentTimeMillis();
- LOGGER.debug(logMarker + " " + method + " received message: "
+ logger.debug(logMarker + " " + method + " received message: "
+ (message == null ? "" : System.lineSeparator()) + message);
try {
@@ -101,7 +105,7 @@ public class CallbackHandlerService {
logCallbackSuccess(method, startTime);
return new CallbackSuccess();
} catch (Exception e) {
- LOGGER.debug("Exception :",e);
+ logger.debug("Exception :",e);
String msg = "Caught " + e.getClass().getSimpleName()
+ " processing " + messageEventName + " with " + correlationVariable
+ " = '" + correlationValue + "'";
@@ -133,7 +137,7 @@ public class CallbackHandlerService {
protected boolean correlate(String messageEventName, String correlationVariable,
String correlationValue, Map<String, Object> variables, String logMarker) {
try{
- LOGGER.debug(logMarker + " Attempting to find process waiting"
+ logger.debug(logMarker + " Attempting to find process waiting"
+ " for " + messageEventName + " with " + correlationVariable
+ " = '" + correlationValue + "'");
@@ -200,7 +204,7 @@ public class CallbackHandlerService {
execInfoList.add(new ExecInfo(execution));
}
- LOGGER.debug(logMarker + " Found " + count + " process(es) waiting"
+ logger.debug(logMarker + " Found " + count + " process(es) waiting"
+ " for " + messageEventName + " with " + correlationVariable
+ " = '" + correlationValue + "': " + execInfoList);
@@ -211,9 +215,9 @@ public class CallbackHandlerService {
+ messageEventName + " with " + correlationVariable
+ " = '" + correlationValue + "'; last exception was:"
+ queryException;
- LOGGER.debug(msg);
- LOGGER.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(),
- MsoLogger.ErrorCode.UnknownError, msg, queryException);
+ logger.debug(msg);
+ logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION.toString(), "BPMN", MsoLogger.getServiceName(),
+ MsoLogger.ErrorCode.UnknownError.getValue(), msg, queryException);
}
return false;
@@ -234,7 +238,7 @@ public class CallbackHandlerService {
// acknowledged the notification associated with request #1.
try {
- LOGGER.debug(logMarker + " Running " + execInfoList.get(0) + " to receive "
+ logger.debug(logMarker + " Running " + execInfoList.get(0) + " to receive "
+ messageEventName + " with " + correlationVariable + " = '"
+ correlationValue + "'");
@@ -254,9 +258,9 @@ public class CallbackHandlerService {
String msg = "Caught " + ole.getClass().getSimpleName() + " after receiving " + messageEventName
+ " with " + correlationVariable + " = '" + correlationValue
+ "': " + ole;
- LOGGER.debug(msg);
- LOGGER.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN CORRELATION ERROR -", MsoLogger.getServiceName(),
- MsoLogger.ErrorCode.UnknownError, msg, ole);
+ logger.debug(msg);
+ logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION.toString(), "BPMN CORRELATION ERROR -",
+ MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError.getValue(), msg, ole);
//Retry for OptimisticLocking Exceptions
int retryCount = 0;
@@ -269,7 +273,7 @@ public class CallbackHandlerService {
}
}
- LOGGER.debug("Retry correlate for OptimisticLockingException, retryCount:" + retryCount);
+ logger.debug("Retry correlate for OptimisticLockingException, retryCount:{}", retryCount);
for (; retryCount >0 ; retryCount--) {
@@ -283,20 +287,20 @@ public class CallbackHandlerService {
.processInstanceVariableEquals(correlationVariable, correlationValue)
.correlateWithResult();
retryCount = 0;
- LOGGER.debug("OptimisticLockingException retry was successful, seting retryCount: " + retryCount);
+ logger.debug("OptimisticLockingException retry was successful, seting retryCount: {}", retryCount);
} catch (OptimisticLockingException olex) {
//oleFlag = ex instanceof org.camunda.bpm.engine.OptimisticLockingException;
String strMsg = "Received exception, OptimisticLockingException retry failed, retryCount:" + retryCount + " | exception returned: " + olex;
- LOGGER.debug(strMsg);
- LOGGER.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(),
- MsoLogger.ErrorCode.UnknownError, strMsg, olex);
+ logger.debug(strMsg);
+ logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION.toString(), "BPMN", MsoLogger.getServiceName(),
+ MsoLogger.ErrorCode.UnknownError.getValue(), strMsg, olex);
} catch (Exception excep) {
retryCount = 0;
//oleFlag = ex instanceof org.camunda.bpm.engine.OptimisticLockingException;
String strMsg = "Received exception, OptimisticLockingException retry failed, retryCount:" + retryCount + " | exception returned: " + excep;
- LOGGER.debug(strMsg);
- LOGGER.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(),
- MsoLogger.ErrorCode.UnknownError, strMsg, excep);
+ logger.debug(strMsg);
+ logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION.toString(), "BPMN", MsoLogger.getServiceName(),
+ MsoLogger.ErrorCode.UnknownError.getValue(), strMsg, excep);
}
}
@@ -308,9 +312,9 @@ public class CallbackHandlerService {
+ execInfoList.get(0) + " after receiving " + messageEventName
+ " with " + correlationVariable + " = '" + correlationValue
+ "': " + e;
- LOGGER.debug(msg);
- LOGGER.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(),
- MsoLogger.ErrorCode.UnknownError, msg, e);
+ logger.debug(msg);
+ logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION.toString(), "BPMN", MsoLogger.getServiceName(),
+ MsoLogger.ErrorCode.UnknownError.getValue(), msg, e);
}
} catch (Exception e) {
// This must be an exception from the flow itself. Log it, but don't
@@ -318,9 +322,9 @@ public class CallbackHandlerService {
String msg = "Caught " + e.getClass().getSimpleName() + " after receiving " + messageEventName
+ " with " + correlationVariable + " = '" + correlationValue
+ "': " + e;
- LOGGER.debug(msg);
- LOGGER.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN CORRELATION ERROR -", MsoLogger.getServiceName(),
- MsoLogger.ErrorCode.UnknownError, msg, e);
+ logger.debug(msg);
+ logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION.toString(), "BPMN CORRELATION ERROR -",
+ MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError.getValue(), msg, e);
}
return true;
@@ -332,12 +336,6 @@ public class CallbackHandlerService {
* @param startTime the request start time
*/
protected void logCallbackSuccess(String method, long startTime) {
- LOGGER.recordAuditEvent(startTime, MsoLogger.StatusCode.COMPLETE,
- MsoLogger.ResponseCode.Suc, "Completed " + method);
-
- LOGGER.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE,
- MsoLogger.ResponseCode.Suc, "Completed " + method,
- "BPMN", MsoLogger.getServiceName(), null);
}
/**
@@ -361,19 +359,12 @@ public class CallbackHandlerService {
*/
protected void logCallbackError(String method, long startTime, String msg, Exception e) {
if (e == null) {
- LOGGER.error(MessageEnum.BPMN_CALLBACK_EXCEPTION, "BPMN", MsoLogger.getServiceName(),
- MsoLogger.ErrorCode.UnknownError, msg);
+ logger.error("{} {} {} {} {}", MessageEnum.BPMN_CALLBACK_EXCEPTION.toString(), "BPMN", MsoLogger.getServiceName(),
+ MsoLogger.ErrorCode.UnknownError.getValue(), msg);
} else {
- LOGGER.error(MessageEnum.BPMN_CALLBACK_EXCEPTION, "BPMN", MsoLogger.getServiceName(),
- MsoLogger.ErrorCode.UnknownError, msg, e);
+ logger.error("{} {} {} {} {}", MessageEnum.BPMN_CALLBACK_EXCEPTION.toString(), "BPMN", MsoLogger.getServiceName(),
+ MsoLogger.ErrorCode.UnknownError.getValue(), msg, e);
}
-
- LOGGER.recordAuditEvent(startTime, MsoLogger.StatusCode.COMPLETE,
- MsoLogger.ResponseCode.InternalError, "Completed " + method);
-
- LOGGER.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE,
- MsoLogger.ResponseCode.InternalError, "Completed " + method,
- "BPMN", MsoLogger.getServiceName(), null);
}
/**
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 014b06deff..f9f06447a7 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
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -39,8 +41,9 @@ import org.onap.logging.ref.slf4j.ONAPLogConstants;
import org.onap.so.bpmn.common.workflow.context.WorkflowContext;
import org.onap.so.bpmn.common.workflow.context.WorkflowContextHolder;
import org.onap.so.bpmn.common.workflow.context.WorkflowResponse;
-import org.onap.so.logger.MsoLogger;
import org.openecomp.mso.bpmn.common.workflow.service.WorkflowProcessorException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.slf4j.MDC;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@@ -79,7 +82,7 @@ public class WorkflowAsyncResource extends ProcessEngineAwareService {
this.processor = processor;
}
- protected static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,WorkflowAsyncResource.class);
+ protected static final Logger logger = LoggerFactory.getLogger(WorkflowAsyncResource.class);
protected static final long DEFAULT_WAIT_TIME = 60000; //default wait time
/**
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowMessageResource.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowMessageResource.java
index 02cda8009f..8b35f0e6d6 100644
--- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowMessageResource.java
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowMessageResource.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -36,6 +38,8 @@ import org.onap.so.bpmn.common.workflow.service.CallbackHandlerService.CallbackE
import org.onap.so.bpmn.common.workflow.service.CallbackHandlerService.CallbackResult;
import org.onap.so.logger.MessageEnum;
import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@@ -54,7 +58,7 @@ import io.swagger.annotations.ApiOperation;
@Api(description = "Provides a generic service to inject messages into a waiting BPMN Proccess")
@Component
public class WorkflowMessageResource{
- private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, WorkflowMessageResource.class);
+ private static final Logger logger = LoggerFactory.getLogger(WorkflowMessageResource.class);
private static final String LOGMARKER = "[WORKFLOW-MESSAGE]";
@Autowired
@@ -78,7 +82,7 @@ public class WorkflowMessageResource{
MsoLogger.setServiceName("MSO." + method);
MsoLogger.setLogContext(correlator, "N/A");
- LOGGER.debug(LOGMARKER + " Received workflow message"
+ logger.debug(LOGMARKER + " Received workflow message"
+ " type='" + messageType + "'"
+ " correlator='" + correlator + "'"
+ (contentType == null ? "" : " contentType='" + contentType + "'")
@@ -86,17 +90,17 @@ public class WorkflowMessageResource{
if (messageType == null || messageType.isEmpty()) {
String msg = "Missing message type";
- LOGGER.debug(LOGMARKER + " " + msg);
- LOGGER.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(),
- MsoLogger.ErrorCode.DataError, LOGMARKER + ":" + msg);
+ logger.debug(LOGMARKER + " " + msg);
+ logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION.toString(), "BPMN", MsoLogger.getServiceName(),
+ MsoLogger.ErrorCode.DataError.getValue(), LOGMARKER + ":" + msg);
return Response.status(400).entity(msg).build();
}
if (correlator == null || correlator.isEmpty()) {
String msg = "Missing correlator";
- LOGGER.debug(LOGMARKER + " " + msg);
- LOGGER.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(),
- MsoLogger.ErrorCode.DataError, LOGMARKER + ":" + msg);
+ logger.debug(LOGMARKER + " " + msg);
+ logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION.toString(), "BPMN", MsoLogger.getServiceName(),
+ MsoLogger.ErrorCode.DataError.getValue(), LOGMARKER + ":" + msg);
return Response.status(400).entity(msg).build();
}
@@ -121,4 +125,4 @@ public class WorkflowMessageResource{
return Response.status(204).build();
}
}
-} \ No newline at end of file
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowProcessor.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowProcessor.java
index 5afd7e00e8..b1062962a6 100644
--- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowProcessor.java
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowProcessor.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -29,15 +31,16 @@ import org.camunda.bpm.engine.RuntimeService;
import org.camunda.bpm.engine.runtime.ProcessInstance;
import org.camunda.bpm.engine.variable.impl.VariableMapImpl;
import org.onap.so.bpmn.common.workflow.context.WorkflowResponse;
-import org.onap.so.logger.MsoLogger;
import org.openecomp.mso.bpmn.common.workflow.service.WorkflowProcessorException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
@Service
public class WorkflowProcessor extends ProcessEngineAwareService {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, WorkflowProcessor.class);
+ private static final Logger logger = LoggerFactory.getLogger(WorkflowProcessor.class);
protected static final String logMarker = "[WRKFLOW-RESOURCE]";
@Async
@@ -55,21 +58,17 @@ public class WorkflowProcessor extends ProcessEngineAwareService {
// Note: this creates a random businessKey if it wasn't specified.
String businessKey = getBusinessKey(inputVariables);
- msoLogger.debug("***Received MSO startProcessInstanceByKey with processKey: " + processKey
- + " and variables: " + inputVariables);
+ logger.debug("***Received MSO startProcessInstanceByKey with processKey: {} and variables: {}", processKey,
+ inputVariables);
RuntimeService runtimeService = getProcessEngineServices().getRuntimeService();
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(processKey, businessKey,
inputVariables);
processInstanceId = processInstance.getId();
- msoLogger.debug(logMarker + "Process " + processKey + ":" + processInstanceId + " "
+ logger.debug(logMarker + "Process " + processKey + ":" + processInstanceId + " "
+ (processInstance.isEnded() ? "ENDED" : "RUNNING"));
} catch (Exception e) {
-
- msoLogger.recordAuditEvent(startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.InternalError,
- logMarker + "Error in starting the process: " + e.getMessage());
-
WorkflowResponse workflowResponse = new WorkflowResponse();
workflowResponse.setResponse("Error occurred while executing the process: " + e);
workflowResponse.setProcessInstanceID(processInstanceId);
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowResource.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowResource.java
index c2a7f41140..92f1b7a816 100644
--- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowResource.java
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowResource.java
@@ -5,6 +5,8 @@
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
* ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -50,6 +52,8 @@ import org.onap.so.bpmn.common.workflow.context.WorkflowResponse;
import org.onap.so.bpmn.core.WorkflowException;
import org.onap.so.logger.MessageEnum;
import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.slf4j.MDC;
import org.springframework.stereotype.Component;
@@ -61,7 +65,7 @@ import io.swagger.annotations.ApiOperation;
@Component
public class WorkflowResource extends ProcessEngineAwareService {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, WorkflowResource.class);
+ private static final Logger logger = LoggerFactory.getLogger(WorkflowResource.class);
private static final String LOGMARKER = "[WRKFLOW-RESOURCE]";
private static final int DEFAULT_WAIT_TIME = 30000;
@@ -99,7 +103,7 @@ public class WorkflowResource extends ProcessEngineAwareService {
try {
//Kickoff the process
- ProcessThread thread = new ProcessThread(inputVariables,processKey,msoLogger);
+ ProcessThread thread = new ProcessThread(inputVariables,processKey);
thread.start();
Map<String, Object> responseMap = null;
@@ -141,7 +145,7 @@ public class WorkflowResource extends ProcessEngineAwareService {
processInstance = thread.getProcessInstance();
if (processInstance == null) {
- msoLogger.debug(LOGMARKER + processKey + " process has not been created yet");
+ logger.debug("{} process has not been created yet", LOGMARKER + processKey );
continue;
}
@@ -151,7 +155,7 @@ public class WorkflowResource extends ProcessEngineAwareService {
responseMap = getResponseMap(processInstance, processKey, timeProcessEnded);
if (responseMap == null) {
- msoLogger.debug(LOGMARKER + processKey + " has not produced a response yet");
+ logger.debug("{} has not produced a response yet", LOGMARKER + processKey);
if (timeProcessEnded.longValue() != 0) {
long elapsedSinceEnded = System.currentTimeMillis() - timeProcessEnded.longValue();
@@ -192,14 +196,15 @@ public class WorkflowResource extends ProcessEngineAwareService {
workflowResponse.setMessageCode(500);
return Response.status(500).entity(workflowResponse).build();
} catch (Exception ex) {
- msoLogger.debug(LOGMARKER + "Exception in startProcessInstance by key",ex);
+ logger.debug(LOGMARKER + "Exception in startProcessInstance by key",ex);
workflowResponse.setMessage("Fail" );
workflowResponse.setResponse("Error occurred while executing the process: " + ex.getMessage());
if (processInstance != null) workflowResponse.setProcessInstanceID(processInstance.getId());
-
- msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "BPMN", MDC.get(processKey),
- MsoLogger.ErrorCode.UnknownError, LOGMARKER + workflowResponse.getMessage()
- + " for processKey: " + processKey + " with response: " + workflowResponse.getResponse());
+
+ logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), "BPMN", MDC.get(processKey),
+ MsoLogger.ErrorCode.UnknownError.getValue(),
+ LOGMARKER + workflowResponse.getMessage() + " for processKey: " + processKey + " with response: "
+ + workflowResponse.getResponse());
workflowResponse.setMessageCode(500);
recordEvents(processKey, workflowResponse, startTime);
@@ -222,21 +227,13 @@ public class WorkflowResource extends ProcessEngineAwareService {
try {
return Integer.parseInt(timeout)*1000;
} catch (NumberFormatException nex) {
- msoLogger.debug("Invalid input for mso-service-request-timeout");
+ logger.debug("Invalid input for mso-service-request-timeout");
}
}
return DEFAULT_WAIT_TIME;
}
private void recordEvents(String processKey, WorkflowResponse response, long startTime) {
-
- msoLogger.recordMetricEvent ( startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
- LOGMARKER + response.getMessage() + " for processKey: "
- + processKey + " with response: " + response.getResponse(), "BPMN", MDC.get(processKey), null);
-
- msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
- LOGMARKER + response.getMessage() + " for processKey: "
- + processKey + " with response: " + response.getResponse());
}
private void setLogContext(String processKey, Map<String, Object> inputVariables) {
@@ -266,7 +263,7 @@ public class WorkflowResource extends ProcessEngineAwareService {
try {
return pes.getRuntimeService().createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult() == null ? true : false ;
} catch (Exception e) {
- msoLogger.debug("Exception :",e);
+ logger.debug("Exception :",e);
return true;
}
}
@@ -287,7 +284,7 @@ public class WorkflowResource extends ProcessEngineAwareService {
try {
workflowResponse.setMessageCode(Integer.parseInt(responseCode));
} catch(NumberFormatException nex) {
- msoLogger.debug(LOGMARKER + "Failed to parse ResponseCode: " + responseCode);
+ logger.debug(LOGMARKER + "Failed to parse ResponseCode: " + responseCode);
workflowResponse.setMessageCode(-1);
}
@@ -298,7 +295,7 @@ public class WorkflowResource extends ProcessEngineAwareService {
} else if ("Fail".equalsIgnoreCase(String.valueOf(status))) {
workflowResponse.setMessage("Fail");
} else {
- msoLogger.debug(LOGMARKER + "Unrecognized Status: " + responseCode);
+ logger.debug(LOGMARKER + "Unrecognized Status: " + responseCode);
workflowResponse.setMessage("Fail");
}
}
@@ -310,15 +307,13 @@ public class WorkflowResource extends ProcessEngineAwareService {
private class ProcessThread extends Thread {
private final Map<String,Object> inputVariables;
private final String processKey;
- private final MsoLogger msoLogger;
private final String businessKey;
private ProcessInstance processInstance = null;
private Exception exception = null;
- public ProcessThread(Map<String, Object> inputVariables, String processKey, MsoLogger msoLogger) {
+ public ProcessThread(Map<String, Object> inputVariables, String processKey) {
this.inputVariables = inputVariables;
this.processKey = processKey;
- this.msoLogger = msoLogger;
this.businessKey = UUID.randomUUID().toString();
}
@@ -352,14 +347,6 @@ public class WorkflowResource extends ProcessEngineAwareService {
long startTime = System.currentTimeMillis();
try {
- msoLogger.debug(LOGMARKER + "***Received MSO startProcessInstanceByKey with processKey:"
- + processKey + " and variables: " + inputVariables);
-
- msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, LOGMARKER
- + "Call to MSO workflow/services in Camunda. Received MSO startProcessInstanceByKey with"
- + " processKey:" + processKey
- + " businessKey:" + businessKey
- + " variables: " + inputVariables);
RuntimeService runtimeService = getProcessEngineServices().getRuntimeService();
@@ -370,7 +357,7 @@ public class WorkflowResource extends ProcessEngineAwareService {
processKey, inputVariables);
} catch (Exception e) {
- msoLogger.debug(LOGMARKER + "ProcessThread caught an exception executing "
+ logger.debug(LOGMARKER + "ProcessThread caught an exception executing "
+ processKey + ": " + e);
setException(e);
}
@@ -441,7 +428,7 @@ public class WorkflowResource extends ProcessEngineAwareService {
responseMapVariable);
if (responseMap != null) {
- msoLogger.debug(LOGMARKER + "Obtained " + responseMapVariable
+ logger.debug(LOGMARKER + "Obtained " + responseMapVariable
+ " from process " + processInstanceId + " history");
return responseMap;
}
@@ -455,12 +442,12 @@ public class WorkflowResource extends ProcessEngineAwareService {
// Check for 'WorkflowResponse' variable
Object workflowResponseObject = getVariableFromHistory(historyService, processInstanceId, "WorkflowResponse");
String workflowResponse = workflowResponseObject == null ? null : String.valueOf(workflowResponseObject);
- msoLogger.debug(LOGMARKER + "WorkflowResponse: " + workflowResponse);
+ logger.debug(LOGMARKER + "WorkflowResponse: " + workflowResponse);
if (workflowResponse != null) {
Object responseCodeObject = getVariableFromHistory(historyService, processInstanceId, prefix + "ResponseCode");
String responseCode = responseCodeObject == null ? null : String.valueOf(responseCodeObject);
- msoLogger.debug(LOGMARKER + prefix + "ResponseCode: " + responseCode);
+ logger.debug(LOGMARKER + prefix + "ResponseCode: " + responseCode);
responseMap = new HashMap<>();
responseMap.put("WorkflowResponse", workflowResponse);
responseMap.put("ResponseCode", responseCode);
@@ -496,17 +483,17 @@ public class WorkflowResource extends ProcessEngineAwareService {
}
}
- msoLogger.debug(LOGMARKER + "WorkflowException: " + workflowExceptionText);
+ logger.debug(LOGMARKER + "WorkflowException: " + workflowExceptionText);
// BEGIN LEGACY SUPPORT. TODO: REMOVE THIS CODE
Object object = getVariableFromHistory(historyService, processInstanceId, processKey + "Response");
String response = object == null ? null : String.valueOf(object);
- msoLogger.debug(LOGMARKER + processKey + "Response: " + response);
+ logger.debug(LOGMARKER + processKey + "Response: " + response);
if (response != null) {
object = getVariableFromHistory(historyService, processInstanceId, prefix + "ResponseCode");
String responseCode = object == null ? null : String.valueOf(object);
- msoLogger.debug(LOGMARKER + prefix + "ResponseCode: " + responseCode);
+ logger.debug(LOGMARKER + prefix + "ResponseCode: " + responseCode);
responseMap = new HashMap<>();
responseMap.put("Response", response);
responseMap.put("ResponseCode", responseCode);
@@ -516,12 +503,12 @@ public class WorkflowResource extends ProcessEngineAwareService {
object = getVariableFromHistory(historyService, processInstanceId, prefix + "ErrorResponse");
String errorResponse = object == null ? null : String.valueOf(object);
- msoLogger.debug(LOGMARKER + prefix + "ErrorResponse: " + errorResponse);
+ logger.debug(LOGMARKER + prefix + "ErrorResponse: " + errorResponse);
if (errorResponse != null) {
object = getVariableFromHistory(historyService, processInstanceId, prefix + "ResponseCode");
String responseCode = object == null ? null : String.valueOf(object);
- msoLogger.debug(LOGMARKER + prefix + "ResponseCode: " + responseCode);
+ logger.debug(LOGMARKER + prefix + "ResponseCode: " + responseCode);
responseMap = new HashMap<>();
responseMap.put("Response", errorResponse);
responseMap.put("ResponseCode", responseCode);
@@ -545,7 +532,7 @@ public class WorkflowResource extends ProcessEngineAwareService {
return runtimeService.getVariable(executionId, variableName);
} catch (ProcessEngineException e) {
// Most likely cause is that the execution no longer exists.
- msoLogger.debug("Error retrieving execution " + executionId
+ logger.debug("Error retrieving execution " + executionId
+ " variable " + variableName + ": " + e);
return null;
}
@@ -562,8 +549,8 @@ public class WorkflowResource extends ProcessEngineAwareService {
.processInstanceId(processInstanceId).variableName(variableName).singleResult();
return v == null ? null : v.getValue();
} catch (Exception e) {
- msoLogger.debug("Error retrieving process " + processInstanceId
- + " variable " + variableName + " from history: " + e);
+ logger.debug("Error retrieving process {} variable {} from history: ", processInstanceId,
+ variableName, e);
return null;
}
}
@@ -589,42 +576,27 @@ public class WorkflowResource extends ProcessEngineAwareService {
variablesMap.put(variableInstance.getName(), variableInstance.getValue().toString());
}
- msoLogger.debug(LOGMARKER + "***Received MSO getProcessVariables with processKey:" + processKey + " and variables: " + variablesMap.toString());
-
- msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, LOGMARKER
- + "Call to MSO workflow/services in Camunda. Received MSO getProcessVariables with processKey:"
- + processKey + " and variables: "
- + variablesMap.toString());
-
+ logger.debug(LOGMARKER + "***Received MSO getProcessVariables with processKey:" + processKey + " and variables: " +
+ variablesMap.toString());
response.setVariables(variablesMap);
response.setMessage("Success");
response.setResponse("Successfully retrieved the variables");
response.setProcessInstanceID(processInstanceId);
- msoLogger.debug(LOGMARKER + response.getMessage() + " for processKey: " + processKey + " with response: " + response.getResponse());
+ logger.debug(LOGMARKER + response.getMessage() + " for processKey: " + processKey + " with response: " + response
+ .getResponse());
} catch (Exception ex) {
response.setMessage("Fail");
response.setResponse("Failed to retrieve the variables," + ex.getMessage());
response.setProcessInstanceID(processInstanceId);
-
- msoLogger.error (MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "BPMN", MDC.get(processKey), MsoLogger.ErrorCode.UnknownError, LOGMARKER
- + response.getMessage()
- + " for processKey: "
- + processKey
- + " with response: "
- + response.getResponse());
- msoLogger.debug("Exception :",ex);
+
+ logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), "BPMN", MDC.get(processKey),
+ MsoLogger.ErrorCode.UnknownError.getValue(),
+ LOGMARKER + response.getMessage() + " for processKey: " + processKey + " with response: " + response
+ .getResponse());
+ logger.debug("Exception :",ex);
}
-
- msoLogger.recordMetricEvent ( startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
- LOGMARKER + response.getMessage() + " for processKey: "
- + processKey + " with response: " + response.getResponse(), "BPMN", MDC.get(processKey), null);
-
- msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
- LOGMARKER + response.getMessage() + " for processKey: "
- + processKey + " with response: " + response.getResponse());
-
return response;
}
}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/LoggingAndURNMappingPlugin.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/LoggingAndURNMappingPlugin.java
index 5435194f39..62aad7e345 100644
--- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/LoggingAndURNMappingPlugin.java
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/LoggingAndURNMappingPlugin.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -56,7 +58,8 @@ import org.onap.so.bpmn.core.BPMNLogger;
import org.onap.so.logger.MessageEnum;
import org.onap.so.logger.MsoLogger;
-import org.slf4j.MDC;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.AbstractEnvironment;
import org.springframework.core.env.Environment;
@@ -279,7 +282,7 @@ public class LoggingAndURNMappingPlugin extends AbstractProcessEnginePlugin {
* Logs details about the current activity.
*/
public class LoggingExecutionListener implements ExecutionListener {
- private final MsoLogger logger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,LoggingExecutionListener.class);
+ private final Logger logger = LoggerFactory.getLogger(LoggingExecutionListener.class);
private String event;
@@ -317,7 +320,7 @@ public class LoggingAndURNMappingPlugin extends AbstractProcessEnginePlugin {
MsoLogger.setLogContext(requestId, svcid);
}
} catch(Exception e) {
- logger.error(e);
+ logger.error("Exception occurred", e);
}
}
}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/CXFConfiguration.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/CXFConfiguration.java
index 62be1330b1..cb20ded8de 100644
--- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/CXFConfiguration.java
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/CXFConfiguration.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -36,10 +38,11 @@ import org.onap.so.bpmn.common.adapter.vnf.VnfAdapterNotify;
import org.onap.so.bpmn.common.workflow.service.WorkflowAsyncResource;
import org.onap.so.bpmn.common.workflow.service.WorkflowMessageResource;
import org.onap.so.bpmn.common.workflow.service.WorkflowResource;
-import org.onap.so.logger.MsoLogger;
import org.onap.so.logging.cxf.interceptor.SOAPLoggingInInterceptor;
import org.onap.so.logging.cxf.interceptor.SOAPLoggingOutInterceptor;
import org.onap.so.logging.jaxrs.filter.JaxRsFilterLogging;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
@@ -52,7 +55,7 @@ import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider;
@Configuration
public class CXFConfiguration {
- private static final MsoLogger logger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,CXFConfiguration.class);
+ private static final Logger logger = LoggerFactory.getLogger(CXFConfiguration.class);
@Autowired
private Bus bus;
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/MSOInfrastructureApplication.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/MSOInfrastructureApplication.java
index 7956ecc363..af9ab2899e 100644
--- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/MSOInfrastructureApplication.java
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/MSOInfrastructureApplication.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -28,8 +30,9 @@ import org.camunda.bpm.application.PreUndeploy;
import org.camunda.bpm.application.ProcessApplicationInfo;
import org.camunda.bpm.engine.ProcessEngine;
import org.onap.so.bpmn.common.DefaultToShortClassNameBeanNameGenerator;
-import org.onap.so.logger.MsoLogger;
import org.onap.so.logging.jaxrs.filter.MDCTaskDecorator;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@@ -52,8 +55,7 @@ import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
@Filter(type = FilterType.ANNOTATION, classes = SpringBootApplication.class) })
public class MSOInfrastructureApplication {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,
- MSOInfrastructureApplication.class);
+ private static final Logger logger = LoggerFactory.getLogger(MSOInfrastructureApplication.class);
@Value("${mso.async.core-pool-size}")
private int corePoolSize;
@@ -81,20 +83,11 @@ public class MSOInfrastructureApplication {
@PostDeploy
public void postDeploy(ProcessEngine processEngineInstance) {
- long startTime = System.currentTimeMillis();
-
- msoLogger.recordAuditEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
- "Post deployment complete...");
}
@PreUndeploy
public void cleanup(ProcessEngine processEngine, ProcessApplicationInfo processApplicationInfo,
List<ProcessEngine> processEngines) {
- long startTime = System.currentTimeMillis();
-
- msoLogger.recordAuditEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
- "Pre Undeploy complete...");
-
}
@Bean
@@ -109,4 +102,4 @@ public class MSOInfrastructureApplication {
executor.initialize();
return executor;
}
-} \ No newline at end of file
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/resources/application-local.yml b/bpmn/mso-infrastructure-bpmn/src/main/resources/application-local.yml
index ccea9483a8..d7effb093f 100644
--- a/bpmn/mso-infrastructure-bpmn/src/main/resources/application-local.yml
+++ b/bpmn/mso-infrastructure-bpmn/src/main/resources/application-local.yml
@@ -14,8 +14,6 @@ camunda:
job-execution:
max-pool-size: 30
core-pool-size: 3
-entitymanager:
- packagesToScan: com
pnf:
dmaap:
host: message-router
@@ -34,7 +32,10 @@ mso:
core-pool-size: 50
max-pool-size: 50
queue-capacity: 500
- adapters:
+ adapters:
+ requestDb:
+ endpoint: http://request-db-adapter:8083
+ auth: Basic bTA0NzY4QG5vbi1wcm9kLm1zby5lY29tcC5hdHQuY29tOkF0dG0wNDc2OExpZmUhQA==
completemsoprocess:
endpoint: http://localhost:30253/CompleteMsoProcess
db:
@@ -224,20 +225,8 @@ appc:
secret: lgjXraD1HutKxv8jEN6tVouu
service: ueb
poolMembers: localhost:3904
-server:
- port: 8080
- tomcat:
- max-threads: 50
-spring:
- h2:
- console:
- enabled: true
- path: /h2
- datasource:
- url: jdbc:h2:mem:AZ;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
- username: sa
- password: sa
- driverClassName: org.h2.Driver
+
+spring:
security:
usercredentials:
-
@@ -264,23 +253,5 @@ spring:
username: mso_admin
password: '$2a$12$tidKuu.h88E2nuL95pTVY.ZOYMN/1dp29A9b1o.0GFDsVVSYlMkHa'
role: ACTUATOR
-request:
- datasource:
- url: jdbc:h2:mem:AZ;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
- username: sa
- password: sa
- driver-class-name: org.h2.Driver
- intialize: true
-
-# Hibernate
-hibernate:
- dialect: org.hibernate.dialect.MySQL5Dialect
- show_sql: true
- hbm2ddl:
- auto: create
-
-#Actuator
-management:
- context-path: /manage
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/resources/application.yaml b/bpmn/mso-infrastructure-bpmn/src/main/resources/application.yaml
index 18b94e725a..a91cb9d88d 100644
--- a/bpmn/mso-infrastructure-bpmn/src/main/resources/application.yaml
+++ b/bpmn/mso-infrastructure-bpmn/src/main/resources/application.yaml
@@ -8,7 +8,7 @@ mso:
spring:
datasource:
driver-class-name: org.mariadb.jdbc.Driver
- jdbcUrl: jdbc:mariadb://${DB_HOST}:${DB_PORT}/camundabpmn
+ url: jdbc:mariadb://${DB_HOST}:${DB_PORT}/camundabpmn
username: ${DB_ADMIN_USERNAME}
password: ${DB_ADMIN_PASSWORD}
http:
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/CreateAAIVfModuleIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/CreateAAIVfModuleIT.java
index fd38ff024d..f6284f3535 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/CreateAAIVfModuleIT.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/CreateAAIVfModuleIT.java
@@ -3,7 +3,9 @@
* 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
@@ -31,14 +33,12 @@ import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
-import org.camunda.bpm.engine.RuntimeService;
-import org.camunda.bpm.engine.test.Deployment;
import org.junit.Assert;
-import org.junit.Ignore;
import org.junit.Test;
import org.onap.so.BaseIntegrationTest;
import org.onap.so.bpmn.core.WorkflowException;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Unit test for CreateAAIVfModule.bpmn.
@@ -46,7 +46,7 @@ import org.onap.so.logger.MsoLogger;
public class CreateAAIVfModuleIT extends BaseIntegrationTest {
- MsoLogger logger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,CreateAAIVfModuleIT.class);
+ Logger logger = LoggerFactory.getLogger(CreateAAIVfModuleIT.class);
@Test
public void TestCreateGenericVnfSuccess_200() {
@@ -264,4 +264,4 @@ public class CreateAAIVfModuleIT extends BaseIntegrationTest {
.withStatus(200)));
}
-} \ No newline at end of file
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/CreateAAIVfModuleVolumeGroupIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/CreateAAIVfModuleVolumeGroupIT.java
index 6af705fd54..f72ca79dc6 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/CreateAAIVfModuleVolumeGroupIT.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/CreateAAIVfModuleVolumeGroupIT.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -34,7 +36,8 @@ import org.junit.Assert;
import org.junit.Test;
import org.onap.so.BaseIntegrationTest;
import org.onap.so.bpmn.mock.FileUtil;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Unit tests for CreateAAIVfModuleVolumeGroup.bpmn.
@@ -42,7 +45,7 @@ import org.onap.so.logger.MsoLogger;
public class CreateAAIVfModuleVolumeGroupIT extends BaseIntegrationTest {
- MsoLogger logger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,CreateAAIVfModuleVolumeGroupIT.class);
+ Logger logger = LoggerFactory.getLogger(CreateAAIVfModuleVolumeGroupIT.class);
/**
* Test the happy path through the flow.
@@ -66,8 +69,8 @@ public class CreateAAIVfModuleVolumeGroupIT extends BaseIntegrationTest {
Assert.assertTrue(isProcessEnded(businessKey));
String response = (String) getVariableFromHistory(businessKey, "CAAIVfModVG_updateVfModuleResponse");
Integer responseCode = (Integer) getVariableFromHistory(businessKey, "CAAIVfModVG_updateVfModuleResponseCode");
- logger.debug("Subflow response code: " + responseCode);
- logger.debug("Subflow response: " + response);
+ logger.debug("Subflow response code: {}", responseCode);
+ logger.debug("Subflow response: {}", response);
Assert.assertEquals(200, responseCode.intValue());
logEnd();
@@ -93,8 +96,8 @@ public class CreateAAIVfModuleVolumeGroupIT extends BaseIntegrationTest {
Assert.assertTrue(isProcessEnded(businessKey));
String response = (String) getVariableFromHistory(businessKey, "CAAIVfModVG_getVfModuleResponse");
Integer responseCode = (Integer) getVariableFromHistory(businessKey, "CAAIVfModVG_getVfModuleResponseCode");
- logger.debug("Subflow response code: " + responseCode);
- logger.debug("Subflow response: " + response);
+ logger.debug("Subflow response code: {}", responseCode);
+ logger.debug("Subflow response: {}", response);
Assert.assertEquals(404, responseCode.intValue());
logEnd();
@@ -122,8 +125,8 @@ public class CreateAAIVfModuleVolumeGroupIT extends BaseIntegrationTest {
Assert.assertTrue(isProcessEnded(businessKey));
String response = (String) getVariableFromHistory(businessKey, "CAAIVfModVG_updateVfModuleResponse");
Integer responseCode = (Integer) getVariableFromHistory(businessKey, "CAAIVfModVG_updateVfModuleResponseCode");
- logger.debug("Subflow response code: " + responseCode);
- logger.debug("Subflow response: " + response);
+ logger.debug("Subflow response code: {}", responseCode);
+ logger.debug("Subflow response: {}", response);
Assert.assertEquals(404, responseCode.intValue());
logEnd();
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/DeleteAAIVfModuleIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/DeleteAAIVfModuleIT.java
index 27b39aec64..f98e4477aa 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/DeleteAAIVfModuleIT.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/DeleteAAIVfModuleIT.java
@@ -33,11 +33,11 @@ import java.util.UUID;
import org.camunda.bpm.engine.RuntimeService;
import org.camunda.bpm.engine.test.Deployment;
import org.junit.Assert;
-import org.junit.Ignore;
import org.junit.Test;
import org.onap.so.BaseIntegrationTest;
import org.onap.so.bpmn.core.WorkflowException;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Unit test for DeleteAAIVfModule.bpmn.
@@ -46,7 +46,7 @@ import org.onap.so.logger.MsoLogger;
public class DeleteAAIVfModuleIT extends BaseIntegrationTest {
private static final String EOL = "\n";
- MsoLogger logger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,DeleteAAIVfModuleIT.class);
+ Logger logger = LoggerFactory.getLogger(DeleteAAIVfModuleIT.class);
@Test
public void TestDeleteGenericVnfSuccess_200() {
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/FalloutHandlerIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/FalloutHandlerIT.java
index a6d26540dc..f477926f99 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/FalloutHandlerIT.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/FalloutHandlerIT.java
@@ -3,7 +3,9 @@
* 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
@@ -33,7 +35,8 @@ import java.util.UUID;
import org.junit.Assert;
import org.junit.Test;
import org.onap.so.BaseIntegrationTest;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Unit test for FalloutHandler.bpmn.
@@ -41,7 +44,7 @@ import org.onap.so.logger.MsoLogger;
public class FalloutHandlerIT extends BaseIntegrationTest {
- MsoLogger logger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,FalloutHandlerIT.class);
+ Logger logger = LoggerFactory.getLogger(FalloutHandlerIT.class);
private void setupMocks() {
@@ -147,7 +150,7 @@ public class FalloutHandlerIT extends BaseIntegrationTest {
public void msoFalloutHandlerWithNotificationurlNoRequestId() throws Exception{
String method = getClass().getSimpleName() + "." + new Object() {
}.getClass().getEnclosingMethod().getName();
- logger.debug("STARTED TEST: " + method);
+ logger.debug("STARTED TEST: {}", method);
//Setup Mocks
setupMocks();
//Execute Flow
@@ -186,7 +189,7 @@ public class FalloutHandlerIT extends BaseIntegrationTest {
public void msoFalloutHandlerWithNoNotificationurlNoRequestId() throws Exception{
String method = getClass().getSimpleName() + "." + new Object() {
}.getClass().getEnclosingMethod().getName();
- logger.debug("STARTED TEST: " + method);
+ logger.debug("STARTED TEST: {}", method);
//Setup Mocks
setupMocks();
//Execute Flow
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/ManualHandlingIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/ManualHandlingIT.java
index 744ef9bea5..67ae7de928 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/ManualHandlingIT.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/ManualHandlingIT.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -33,13 +35,14 @@ import org.camunda.bpm.engine.task.TaskQuery;
import org.junit.Assert;
import org.junit.Test;
import org.onap.so.BaseIntegrationTest;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Unit test for RainyDayHandler.bpmn.
*/
public class ManualHandlingIT extends BaseIntegrationTest {
- MsoLogger logger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,ManualHandlingIT.class);
+ Logger logger = LoggerFactory.getLogger(ManualHandlingIT.class);
@Test
public void TestManualHandlingSuccess() {
@@ -76,8 +79,8 @@ public class ManualHandlingIT extends BaseIntegrationTest {
List<Task> tasks = q.orderByTaskCreateTime().asc().list();
for (Task task : tasks) {
- logger.debug("TASK ID: " + task.getId());
- logger.debug("TASK NAME: " + task.getName());
+ logger.debug("TASK ID: {}", task.getId());
+ logger.debug("TASK NAME: {}", task.getName());
try {
logger.debug("Completing the task");
@@ -85,7 +88,7 @@ public class ManualHandlingIT extends BaseIntegrationTest {
completeVariables.put("responseValue", "skip");
taskService.complete(task.getId(), completeVariables);
} catch(Exception e) {
- logger.debug("GOT EXCEPTION: " + e.getMessage());
+ logger.debug("GOT EXCEPTION: {}", e.getMessage());
}
}
@@ -93,4 +96,4 @@ public class ManualHandlingIT extends BaseIntegrationTest {
Assert.assertTrue(isProcessEnded(businessKey));
}
-} \ No newline at end of file
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/OofHomingTestIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/OofHomingTestIT.java
index 398efb972f..b370e6c48f 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/OofHomingTestIT.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/OofHomingTestIT.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -34,7 +36,8 @@ import org.onap.so.bpmn.core.domain.ServiceDecomposition;
import org.onap.so.bpmn.core.domain.ServiceInstance;
import org.onap.so.bpmn.core.domain.VnfResource;
import org.onap.so.bpmn.mock.FileUtil;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.util.ArrayList;
@@ -56,7 +59,7 @@ import static org.onap.so.bpmn.mock.StubResponseOof.mockOof_500;
@Ignore
public class OofHomingTestIT extends BaseIntegrationTest {
- MsoLogger logger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,CreateAAIVfModuleIT.class);
+ Logger logger = LoggerFactory.getLogger(CreateAAIVfModuleIT.class);
ServiceDecomposition serviceDecomposition = new ServiceDecomposition();
String subscriber = "";
@@ -261,7 +264,7 @@ public class OofHomingTestIT extends BaseIntegrationTest {
vnfModel.setModelType("testModelTypeVNF");
vnf.setModelInfo(vnfModel);
vnfList.add(vnf);
- logger.debug("SERVICE DECOMP: " + serviceDecomposition.getServiceResourcesJsonString());
+ logger.debug("SERVICE DECOMP: {}", serviceDecomposition.getServiceResourcesJsonString());
serviceDecomposition.setModelInfo(sModel);
serviceDecomposition.setAllottedResources(arList);
serviceDecomposition.setVnfResources(vnfList);
@@ -416,9 +419,8 @@ public class OofHomingTestIT extends BaseIntegrationTest {
ServiceDecomposition sd = (ServiceDecomposition) getVariableFromHistory(busKey,
"serviceDecomposition");
- logger.debug("In testHoming_success_vnfResourceList, ServiceDecomposition = " + sd);
+ logger.debug("In testHoming_success_vnfResourceList, ServiceDecomposition = {}", sd);
List<VnfResource> vnfResourceList = sd.getVnfResources();
-//logger.debug(" vnfResourceList = " + vnfResourceList);
vnfResourceList.get(0).setResourceId("test-resource-id-000");
// Invoke Homing
@@ -454,29 +456,27 @@ public class OofHomingTestIT extends BaseIntegrationTest {
"WorkflowException");
ServiceDecomposition serviceDecompositionExp = (ServiceDecomposition) getVariableFromHistory(businessKey,
"serviceDecomposition");
- logger.debug("serviceDecompositionExp is: " + serviceDecompositionExp);
+ logger.debug("serviceDecompositionExp is: {}", serviceDecompositionExp);
Resource resourceVnf = serviceDecompositionExp.getServiceResource("test-resource-id-000");
- logger.debug("resourceVnf is: " + resourceVnf);
+ logger.debug("resourceVnf is: {}", resourceVnf);
HomingSolution resourceVnfHoming = resourceVnf.getHomingSolution();
String resourceVnfHomingString = resourceVnfHoming.toString();
- logger.debug("resourceVnfHomingString is: " + resourceVnfHomingString);
+ logger.debug("resourceVnfHomingString is: {}", resourceVnfHomingString);
resourceVnfHomingString = resourceVnfHomingString.replaceAll("\\s+", " ");
- logger.debug("Now resourceVnfHomingString is: " + resourceVnfHomingString);
+ logger.debug("Now resourceVnfHomingString is: {}", resourceVnfHomingString);
assertNull(workflowException);
//Verify request
String oofRequest = (String) getVariableFromHistory(businessKey, "oofRequest");
- logger.debug("oofRequest is: " + oofRequest);
+ logger.debug("oofRequest is: {}", oofRequest);
assertEquals(FileUtil.readResourceFile("__files/BuildingBlocks/oofRequest_infravnf").
replaceAll("\n", "").replaceAll("\r", "").
replaceAll("\t", ""), oofRequest.replaceAll("\n", "").
replaceAll("\r", "").replaceAll("\t", ""));
- //logger.debug("resourceVnfHoming.getVnf().getResourceId() is: " + resourceVnfHoming.getVnf().getResourceId());
-
assertEquals(homingSolutionService("service", "service-instance-01234",
"MDTNJ01", "test-resource-id-000","CloudOwner",
"mtmnj1a",
@@ -539,7 +539,6 @@ public class OofHomingTestIT extends BaseIntegrationTest {
}
@Test
-
public void testHoming_error_inputVariable() throws Exception {
String businessKey = UUID.randomUUID().toString();
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/PrepareUpdateAAIVfModuleIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/PrepareUpdateAAIVfModuleIT.java
index b8ae341361..8b8abab6b2 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/PrepareUpdateAAIVfModuleIT.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/PrepareUpdateAAIVfModuleIT.java
@@ -3,7 +3,9 @@
* 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
@@ -33,12 +35,12 @@ import java.util.UUID;
import org.camunda.bpm.engine.test.Deployment;
import org.junit.Assert;
-import org.junit.Ignore;
import org.junit.Test;
import org.onap.so.BaseIntegrationTest;
import org.onap.so.bpmn.core.WorkflowException;
import org.onap.so.bpmn.mock.FileUtil;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Unit tests for PrepareUpdateAAIVfModule.bpmn.
@@ -46,7 +48,7 @@ import org.onap.so.logger.MsoLogger;
public class PrepareUpdateAAIVfModuleIT extends BaseIntegrationTest {
- MsoLogger logger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,PrepareUpdateAAIVfModuleIT.class);
+ Logger logger = LoggerFactory.getLogger(PrepareUpdateAAIVfModuleIT.class);
/**
* Test the happy path through the flow.
@@ -73,11 +75,11 @@ public class PrepareUpdateAAIVfModuleIT extends BaseIntegrationTest {
Assert.assertTrue(isProcessEnded(businessKey));
String response = (String) getVariableFromHistory(businessKey, "PUAAIVfMod_updateVfModuleResponse");
Integer responseCode = (Integer) getVariableFromHistory(businessKey, "PUAAIVfMod_updateVfModuleResponseCode");
- logger.debug("Subflow response code: " + responseCode);
- logger.debug("Subflow response: " + response);
+ logger.debug("Subflow response code: {}", responseCode);
+ logger.debug("Subflow response: {}", response);
Assert.assertEquals(200, responseCode.intValue());
String heatStackId = (String) getVariableFromHistory(businessKey, "PUAAIVfMod_heatStackId");
- logger.debug("Ouput heat-stack-id:" + heatStackId);
+ logger.debug("Ouput heat-stack-id:{}", heatStackId);
Assert.assertEquals("slowburn", heatStackId);
logEnd();
@@ -106,11 +108,11 @@ public class PrepareUpdateAAIVfModuleIT extends BaseIntegrationTest {
String response = (String) getVariableFromHistory(businessKey, "PUAAIVfMod_getVnfResponse");
Integer responseCode = (Integer) getVariableFromHistory(businessKey, "PUAAIVfMod_getVnfResponseCode");
WorkflowException workflowException = (WorkflowException) getVariableFromHistory(businessKey, "WorkflowException");
- logger.debug("Subflow response code: " + responseCode);
- logger.debug("Subflow response: " + response);
+ logger.debug("Subflow response code: {}", responseCode);
+ logger.debug("Subflow response: {}", response);
Assert.assertEquals(404, responseCode.intValue());
Assert.assertNotNull(workflowException);
- logger.debug("Subflow WorkflowException error message: " + workflowException.getErrorMessage());
+ logger.debug("Subflow WorkflowException error message: {}", workflowException.getErrorMessage());
logEnd();
}
@@ -137,7 +139,7 @@ public class PrepareUpdateAAIVfModuleIT extends BaseIntegrationTest {
WorkflowException workflowException = (WorkflowException) getVariableFromHistory(businessKey, "WorkflowException");
Assert.assertNotNull(workflowException);
- logger.debug("Subflow WorkflowException error message: " + workflowException.getErrorMessage());
+ logger.debug("Subflow WorkflowException error message: {}", workflowException.getErrorMessage());
Assert.assertTrue(workflowException.getErrorMessage().startsWith("VF Module validation error: Orchestration"));
logEnd();
@@ -165,7 +167,7 @@ public class PrepareUpdateAAIVfModuleIT extends BaseIntegrationTest {
WorkflowException workflowException = (WorkflowException) getVariableFromHistory(businessKey, "WorkflowException");
Assert.assertNotNull(workflowException);
- logger.debug("Subflow WorkflowException error message: " + workflowException.getErrorMessage());
+ logger.debug("Subflow WorkflowException error message: {}", workflowException.getErrorMessage());
Assert.assertTrue(workflowException.getErrorMessage().startsWith("VF Module validation error: VF Module"));
logEnd();
@@ -196,11 +198,11 @@ public class PrepareUpdateAAIVfModuleIT extends BaseIntegrationTest {
String response = (String) getVariableFromHistory(businessKey, "PUAAIVfMod_updateVfModuleResponse");
Integer responseCode = (Integer) getVariableFromHistory(businessKey, "PUAAIVfMod_updateVfModuleResponseCode");
WorkflowException workflowException = (WorkflowException) getVariableFromHistory(businessKey, "WorkflowException");
- logger.debug("Subflow response code: " + responseCode);
- logger.debug("Subflow response: " + response);
+ logger.debug("Subflow response code: {}", responseCode);
+ logger.debug("Subflow response: {}", response);
Assert.assertEquals(404, responseCode.intValue());
Assert.assertNotNull(workflowException);
- logger.debug("Subflow WorkflowException error message: " + workflowException.getErrorMessage());
+ logger.debug("Subflow WorkflowException error message: {}", workflowException.getErrorMessage());
logEnd();
}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/SDNCAdapterRestV2IT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/SDNCAdapterRestV2IT.java
index baf41d120b..12e12dc7d6 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/SDNCAdapterRestV2IT.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/SDNCAdapterRestV2IT.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -35,7 +37,8 @@ import org.junit.Ignore;
import org.junit.Test;
import org.onap.so.BaseIntegrationTest;
import org.onap.so.bpmn.mock.FileUtil;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Unit tests for SDNCAdapterRestV2.bpmn.
@@ -48,7 +51,7 @@ public class SDNCAdapterRestV2IT extends BaseIntegrationTest {
private final CallbackSet callbacks = new CallbackSet();
- MsoLogger logger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,SDNCAdapterRestV2IT.class);
+ Logger logger = LoggerFactory.getLogger(SDNCAdapterRestV2IT.class);
/**
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/SniroHomingV1IT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/SniroHomingV1IT.java
index f3f950746c..2205d01cca 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/SniroHomingV1IT.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/SniroHomingV1IT.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -38,7 +40,8 @@ import org.onap.so.BaseIntegrationTest;
import org.onap.so.bpmn.core.WorkflowException;
import org.onap.so.bpmn.core.domain.*;
import org.onap.so.bpmn.mock.FileUtil;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
@@ -47,7 +50,7 @@ import org.onap.so.logger.MsoLogger;
@Ignore
public class SniroHomingV1IT extends BaseIntegrationTest {
- MsoLogger logger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,SniroHomingV1IT.class);
+ Logger logger = LoggerFactory.getLogger(SniroHomingV1IT.class);
ServiceDecomposition serviceDecomposition = new ServiceDecomposition();
@@ -121,7 +124,7 @@ public class SniroHomingV1IT extends BaseIntegrationTest {
vnfModel.setModelType("testModelTypeVNF");
vnf.setModelInfo(vnfModel);
vnfList.add(vnf);
- logger.debug("SERVICE DECOMP: " + serviceDecomposition.getServiceResourcesJsonString());
+ logger.debug("SERVICE DECOMP: {}", serviceDecomposition.getServiceResourcesJsonString());
serviceDecomposition.setModelInfo(sModel);
serviceDecomposition.setAllottedResources(arList);
serviceDecomposition.setVnfResources(vnfList);
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/UpdateAAIGenericVnfIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/UpdateAAIGenericVnfIT.java
index e1a265b274..48790708f0 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/UpdateAAIGenericVnfIT.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/UpdateAAIGenericVnfIT.java
@@ -3,7 +3,9 @@
* 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
@@ -39,7 +41,8 @@ import org.junit.Test;
import org.onap.so.BaseIntegrationTest;
import org.onap.so.bpmn.core.WorkflowException;
import org.onap.so.bpmn.mock.FileUtil;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Unit tests for UpdateAAIGenericVnf bpmn.
@@ -47,7 +50,7 @@ import org.onap.so.logger.MsoLogger;
public class UpdateAAIGenericVnfIT extends BaseIntegrationTest {
- MsoLogger logger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,CreateAAIVfModuleIT.class);
+ Logger logger = LoggerFactory.getLogger(CreateAAIVfModuleIT.class);
/**
@@ -73,8 +76,8 @@ public class UpdateAAIGenericVnfIT extends BaseIntegrationTest {
Assert.assertTrue(isProcessEnded(businessKey));
String response = (String) getVariableFromHistory(businessKey, "UAAIGenVnf_updateGenericVnfResponse");
Integer responseCode = (Integer) getVariableFromHistory(businessKey, "UAAIGenVnf_updateGenericVnfResponseCode");
- logger.debug("Subflow response code: " + responseCode);
- logger.debug("Subflow response: " + response);
+ logger.debug("Subflow response code: {}", responseCode);
+ logger.debug("Subflow response: {}", response);
Assert.assertEquals(200, responseCode.intValue());
logEnd();
@@ -103,7 +106,7 @@ public class UpdateAAIGenericVnfIT extends BaseIntegrationTest {
Assert.assertTrue(isProcessEnded(businessKey));
WorkflowException workflowException = (WorkflowException) getVariableFromHistory(businessKey, "WorkflowException");
- logger.debug("Workflow Exception: " + workflowException);
+ logger.debug("Workflow Exception: {}", workflowException);
Assert.assertNotNull(workflowException);
logEnd();
@@ -132,8 +135,8 @@ public class UpdateAAIGenericVnfIT extends BaseIntegrationTest {
Assert.assertTrue(isProcessEnded(businessKey));
String response = (String) getVariableFromHistory(businessKey, "UAAIGenVnf_getGenericVnfResponse");
Integer responseCode = (Integer) getVariableFromHistory(businessKey, "UAAIGenVnf_getGenericVnfResponseCode");
- logger.debug("Subflow response code: " + responseCode);
- logger.debug("Subflow response: " + response);
+ logger.debug("Subflow response code: {}", responseCode);
+ logger.debug("Subflow response: {}", response);
Assert.assertEquals(404, responseCode.intValue());
logEnd();
@@ -164,8 +167,8 @@ public class UpdateAAIGenericVnfIT extends BaseIntegrationTest {
Assert.assertTrue(isProcessEnded(businessKey));
String response = (String) getVariableFromHistory(businessKey, "UAAIGenVnf_updateGenericVnfResponse");
Integer responseCode = (Integer) getVariableFromHistory(businessKey, "UAAIGenVnf_updateGenericVnfResponseCode");
- logger.debug("Subflow response code: " + responseCode);
- logger.debug("Subflow response: " + response);
+ logger.debug("Subflow response code: {}", responseCode);
+ logger.debug("Subflow response: {}", response);
Assert.assertEquals(404, responseCode.intValue());
logEnd();
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/UpdateAAIVfModuleIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/UpdateAAIVfModuleIT.java
index 3ff2657193..3dd2ac957c 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/UpdateAAIVfModuleIT.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/UpdateAAIVfModuleIT.java
@@ -3,7 +3,9 @@
* 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
@@ -39,6 +41,8 @@ import org.junit.Test;
import org.onap.so.BaseIntegrationTest;
import org.onap.so.bpmn.mock.FileUtil;
import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Unit tests for UpdateAAIVfModuleTest.bpmn.
@@ -46,7 +50,7 @@ import org.onap.so.logger.MsoLogger;
public class UpdateAAIVfModuleIT extends BaseIntegrationTest {
- MsoLogger logger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,CreateAAIVfModuleIT.class);
+ Logger logger = LoggerFactory.getLogger(CreateAAIVfModuleIT.class);
/**
@@ -72,8 +76,8 @@ public class UpdateAAIVfModuleIT extends BaseIntegrationTest {
Assert.assertTrue(isProcessEnded(businessKey));
String response = (String) getVariableFromHistory(businessKey, "UAAIVfMod_updateVfModuleResponse");
Integer responseCode = (Integer) getVariableFromHistory(businessKey, "UAAIVfMod_updateVfModuleResponseCode");
- logger.debug("Subflow response code: " + responseCode);
- logger.debug("Subflow response: " + response);
+ logger.debug("Subflow response code: {}", responseCode);
+ logger.debug("Subflow response: {}", response);
Assert.assertEquals(200, responseCode.intValue());
logEnd();
@@ -101,8 +105,8 @@ public class UpdateAAIVfModuleIT extends BaseIntegrationTest {
Assert.assertTrue(isProcessEnded(businessKey));
String response = (String) getVariableFromHistory(businessKey, "UAAIVfMod_getVfModuleResponse");
Integer responseCode = (Integer) getVariableFromHistory(businessKey, "UAAIVfMod_getVfModuleResponseCode");
- logger.debug("Subflow response code: " + responseCode);
- logger.debug("Subflow response: " + response);
+ logger.debug("Subflow response code: {}", responseCode);
+ logger.debug("Subflow response: {}", response);
Assert.assertEquals(404, responseCode.intValue());
logEnd();
@@ -132,8 +136,8 @@ public class UpdateAAIVfModuleIT extends BaseIntegrationTest {
Assert.assertTrue(isProcessEnded(businessKey));
String response = (String) getVariableFromHistory(businessKey, "UAAIVfMod_updateVfModuleResponse");
Integer responseCode = (Integer) getVariableFromHistory(businessKey, "UAAIVfMod_updateVfModuleResponseCode");
- logger.debug("Subflow response code: " + responseCode);
- logger.debug("Subflow response: " + response);
+ logger.debug("Subflow response code: {}", responseCode);
+ logger.debug("Subflow response: {}", response);
Assert.assertEquals(404, responseCode.intValue());
logEnd();
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/VnfAdapterRestV1IT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/VnfAdapterRestV1IT.java
index fc15e92bca..ad08f8b2bb 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/VnfAdapterRestV1IT.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/VnfAdapterRestV1IT.java
@@ -1,9 +1,11 @@
/*-
- * ============LICENSE_START=======================================================
+ * ============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
@@ -38,7 +40,8 @@ import org.junit.Ignore;
import org.junit.Test;
import org.onap.so.BaseIntegrationTest;
import org.onap.so.bpmn.core.WorkflowException;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Unit tests for VnfAdapterRestV1.
@@ -46,7 +49,7 @@ import org.onap.so.logger.MsoLogger;
public class VnfAdapterRestV1IT extends BaseIntegrationTest {
- MsoLogger logger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,VnfAdapterRestV1IT.class);
+ Logger logger = LoggerFactory.getLogger(VnfAdapterRestV1IT.class);
private static final String EOL = "\n";
@@ -256,7 +259,7 @@ public class VnfAdapterRestV1IT extends BaseIntegrationTest {
waitForProcessEnd(businessKey, 10000);
String response = (String) getVariableFromHistory(businessKey, "vnfAdapterRestV1Response");
- logger.debug("Response:\n" + response);
+ logger.debug("Response:\n{}", response);
assertTrue(response!=null && response.contains("<createVfModuleResponse>"));
assertTrue((boolean) getVariableFromHistory(businessKey, "VNFREST_SuccessIndicator"));
@@ -285,7 +288,7 @@ public class VnfAdapterRestV1IT extends BaseIntegrationTest {
waitForProcessEnd(businessKey, 10000);
String response = (String) getVariableFromHistory(businessKey, "vnfAdapterRestV1Response");
- logger.debug("Response:\n" + response);
+ logger.debug("Response:\n{}", response);
assertTrue(response.contains("<updateVfModuleResponse>"));
assertTrue((boolean) getVariableFromHistory(businessKey, "VNFREST_SuccessIndicator"));
@@ -314,7 +317,7 @@ public class VnfAdapterRestV1IT extends BaseIntegrationTest {
waitForProcessEnd(businessKey, 10000);
String response = (String) getVariableFromHistory(businessKey, "vnfAdapterRestV1Response");
- logger.debug("Response:\n" + response);
+ logger.debug("Response:\n{}", response);
assertTrue(response.contains("<deleteVfModuleResponse>"));
assertTrue((boolean) getVariableFromHistory(businessKey, "VNFREST_SuccessIndicator"));
@@ -343,7 +346,7 @@ public class VnfAdapterRestV1IT extends BaseIntegrationTest {
waitForProcessEnd(businessKey, 10000);
String response = (String) getVariableFromHistory(businessKey, "vnfAdapterRestV1Response");
- logger.debug("Response:\n" + response);
+ logger.debug("Response:\n{}", response);
assertTrue(response.contains("<rollbackVfModuleResponse>"));
assertTrue((boolean) getVariableFromHistory(businessKey, "VNFREST_SuccessIndicator"));
@@ -376,7 +379,7 @@ public class VnfAdapterRestV1IT extends BaseIntegrationTest {
logger.debug(wfe.toString());
String response = (String) getVariableFromHistory(businessKey, "WorkflowResponse");
- logger.debug("Response:\n" + response);
+ logger.debug("Response:\n{}", response);
assertTrue(response.contains("<vfModuleException>"));
assertFalse((boolean) getVariableFromHistory(businessKey, "VNFREST_SuccessIndicator"));
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTest.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTest.java
index d24e953196..117d3b213a 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTest.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTest.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -81,7 +83,8 @@ import org.onap.so.bpmn.common.workflow.service.WorkflowMessageResource;
import org.onap.so.bpmn.common.workflow.service.WorkflowResource;
import org.onap.so.bpmn.core.domain.Resource;
import org.onap.so.bpmn.core.domain.ServiceDecomposition;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -106,7 +109,7 @@ import org.xml.sax.SAXException;
public abstract class WorkflowTest {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, WorkflowTest.class);
+ private static final Logger logger = LoggerFactory.getLogger(WorkflowTest.class);
//TODO this is not used anymore, can maybe be removed
@Rule
@@ -165,14 +168,14 @@ public abstract class WorkflowTest {
* Logs a test start method.
*/
protected void logStart() {
- msoLogger.debug("STARTED TEST");
+ logger.debug("STARTED TEST");
}
/**
* Logs a test end method.
*/
protected void logEnd() {
- msoLogger.debug("ENDED TEST");
+ logger.debug("ENDED TEST");
}
/**
@@ -184,14 +187,14 @@ public abstract class WorkflowTest {
protected void invokeSubProcess(String processKey, String businessKey, Map<String, Object> injectedVariables) {
RuntimeMXBean runtimeMxBean = ManagementFactory.getRuntimeMXBean();
List<String> arguments = runtimeMxBean.getInputArguments();
- msoLogger.debug("JVM args = " + arguments);
+ logger.debug("JVM args = {}", arguments);
msoRequestId = (String) injectedVariables.get("mso-request-id");
String requestId = (String) injectedVariables.get("msoRequestId");
if (msoRequestId == null && requestId == null) {
String msg = "mso-request-id variable was not provided";
- msoLogger.debug(msg);
+ logger.debug(msg);
fail(msg);
}
@@ -205,14 +208,14 @@ public abstract class WorkflowTest {
protected String invokeSubProcess(String processKey, Map<String, Object> injectedVariables) {
RuntimeMXBean runtimeMxBean = ManagementFactory.getRuntimeMXBean();
List<String> arguments = runtimeMxBean.getInputArguments();
- msoLogger.debug("JVM args = " + arguments);
+ logger.debug("JVM args = {}", arguments);
msoRequestId = (String) injectedVariables.get("mso-request-id");
String requestId = (String) injectedVariables.get("msoRequestId");
if (msoRequestId == null && requestId == null) {
String msg = "mso-request-id variable was not provided";
- msoLogger.debug(msg);
+ logger.debug(msg);
fail(msg);
}
@@ -256,13 +259,13 @@ public abstract class WorkflowTest {
RuntimeMXBean runtimeMxBean = ManagementFactory.getRuntimeMXBean();
List<String> arguments = runtimeMxBean.getInputArguments();
- msoLogger.debug("JVM args = " + arguments);
+ logger.debug("JVM args = {}", arguments);
Map<String, Object> variables = createVariables(schemaVersion, businessKey,
request, injectedVariables, false);
VariableMapImpl variableMapImpl = createVariableMapImpl(variables);
- msoLogger.debug("Sending " + request + " to " + processKey + " process");
+ logger.debug("Sending {} to {} process", request, processKey);
TestAsyncResponse asyncResponse = new TestAsyncResponse();
@@ -290,13 +293,13 @@ public abstract class WorkflowTest {
RuntimeMXBean runtimeMxBean = ManagementFactory.getRuntimeMXBean();
List<String> arguments = runtimeMxBean.getInputArguments();
- msoLogger.debug("JVM args = " + arguments);
+ logger.debug("JVM args = {}", arguments);
Map<String, Object> variables = createVariables(schemaVersion, businessKey,
request, injectedVariables, serviceInstantiationModel);
VariableMapImpl variableMapImpl = createVariableMapImpl(variables);
- msoLogger.debug("Sending " + request + " to " + processKey + " process");
+ logger.debug("Sending {} to {} process", request, processKey);
return workflowResource.startProcessInstanceByKey( processKey, variableMapImpl);
@@ -337,7 +340,7 @@ public abstract class WorkflowTest {
for (String var : notAllowed) {
if (var.equals(key)) {
String msg = "Cannot specify " + var + " in injected variables";
- msoLogger.debug(msg);
+ logger.debug(msg);
fail(msg);
}
}
@@ -367,11 +370,11 @@ public abstract class WorkflowTest {
catch(Exception e) {
}
if (msoRequestId == null || msoRequestId.trim().equals("")) {
- msoLogger.debug("No requestId element in injectedVariables");
+ logger.debug("No requestId element in injectedVariables");
variables.put("mso-request-id", UUID.randomUUID().toString());
}
if (msoServiceInstanceId == null || msoServiceInstanceId.trim().equals("")) {
- msoLogger.debug("No seviceInstanceId element in injectedVariables");
+ logger.debug("No seviceInstanceId element in injectedVariables");
variables.put("mso-service-instance-id", UUID.randomUUID().toString());
}
@@ -387,7 +390,7 @@ public abstract class WorkflowTest {
}
if (msoRequestId == null || msoRequestId.trim().equals("")) {
String msg = "No request-id element in " + request;
- msoLogger.debug(msg);
+ logger.debug(msg);
fail(msg);
}
}
@@ -446,8 +449,7 @@ public abstract class WorkflowTest {
*/
protected WorkflowResponse receiveResponse(String businessKey,
TestAsyncResponse asyncResponse, long timeout) {
- msoLogger.debug("Waiting " + timeout + "ms for process with business key " + businessKey
- + " to send a response");
+ logger.debug("Waiting {}ms for process with business key {} to send a response", timeout, businessKey);
long now = System.currentTimeMillis() + timeout;
long endTime = now + timeout;
@@ -456,7 +458,7 @@ public abstract class WorkflowTest {
Response response = asyncResponse.getResponse();
if (response != null) {
- msoLogger.debug("Received a response from process with business key " + businessKey);
+ logger.debug("Received a response from process with business key {}", businessKey);
Object entity = response.getEntity();
@@ -464,7 +466,7 @@ public abstract class WorkflowTest {
String msg = "Response entity is " +
(entity == null ? "null" : entity.getClass().getName()) +
", expected WorkflowResponse";
- msoLogger.debug(msg);
+ logger.debug(msg);
fail(msg);
return null; // unreachable
}
@@ -477,7 +479,7 @@ public abstract class WorkflowTest {
} catch (InterruptedException e) {
String msg = "Interrupted waiting for a response from process with business key " +
businessKey;
- msoLogger.debug(msg);
+ logger.debug(msg);
fail(msg);
return null; // unreachable
}
@@ -487,7 +489,7 @@ public abstract class WorkflowTest {
String msg = "No response received from process with business key " + businessKey +
" within " + timeout + "ms";
- msoLogger.debug(msg);
+ logger.debug(msg);
fail("Process with business key " + businessKey + " did not end within 10000ms");
return null; // unreachable
}
@@ -525,7 +527,7 @@ public abstract class WorkflowTest {
if (callbackData == null) {
String msg = "No callback defined for '" + action + "' SDNC request";
- msoLogger.debug(msg);
+ logger.debug(msg);
fail(msg);
}
@@ -536,7 +538,7 @@ public abstract class WorkflowTest {
contentType = JSON;
} else {
String msg = "Invalid SDNC program modifier: '" + modifier + "'";
- msoLogger.debug(msg);
+ logger.debug(msg);
fail(msg);
}
@@ -625,7 +627,7 @@ public abstract class WorkflowTest {
if (callbackData == null) {
String msg = "No callback defined for '" + action + "' SDNC request";
- msoLogger.debug(msg);
+ logger.debug(msg);
fail(msg);
}
@@ -637,7 +639,7 @@ public abstract class WorkflowTest {
if (callbackData == null) {
String msg = "No callback defined for '" + action + "' SDNC request";
- msoLogger.debug(msg);
+ logger.debug(msg);
fail(msg);
}
@@ -650,7 +652,7 @@ public abstract class WorkflowTest {
respMsg = "SERVER ERROR";
} else {
String msg = "Invalid SDNC program modifier: '" + modifier + "'";
- msoLogger.debug(msg);
+ logger.debug(msg);
fail(msg);
}
@@ -699,7 +701,7 @@ public abstract class WorkflowTest {
if (callbackData == null) {
String msg = "No callback defined for '" + action + "' VNF REST request";
- msoLogger.debug(msg);
+ logger.debug(msg);
fail(msg);
}
@@ -710,7 +712,7 @@ public abstract class WorkflowTest {
contentType = "text/plain";
} else {
String msg = "Invalid VNF REST program modifier: '" + modifier + "'";
- msoLogger.debug(msg);
+ logger.debug(msg);
fail(msg);
}
@@ -763,18 +765,18 @@ public abstract class WorkflowTest {
if (callbackData == null) {
String msg = "No callback defined for '" + action + "' VNF request";
- msoLogger.debug(msg);
+ logger.debug(msg);
fail(msg);
}
content = callbackData.getContent();
} else if ("ERR".equals(modifier)) {
String msg = "Currently unsupported VNF program modifier: '" + modifier + "'";
- msoLogger.debug(msg);
+ logger.debug(msg);
fail(msg);
} else {
String msg = "Invalid VNF program modifier: '" + modifier + "'";
- msoLogger.debug(msg);
+ logger.debug(msg);
fail(msg);
}
@@ -790,7 +792,7 @@ public abstract class WorkflowTest {
if (!injected) {
String msg = "Failed to inject VNF '" + action + "' callback";
- msoLogger.debug(msg);
+ logger.debug(msg);
fail(msg);
}
@@ -810,8 +812,7 @@ public abstract class WorkflowTest {
* @param timeout the timeout in milliseconds
*/
protected void waitForRunningProcessCount(String processKey, int count, long timeout) {
- msoLogger.debug("Waiting " + timeout + "ms for there to be " + count + " "
- + processKey + " instances");
+ logger.debug("Waiting {}ms for there to be {} {} instances", timeout, count, processKey);
long now = System.currentTimeMillis() + timeout;
long endTime = now + timeout;
@@ -824,8 +825,7 @@ public abstract class WorkflowTest {
.list().size();
if (actual != last) {
- msoLogger.debug("There are now " + actual + " "
- + processKey + " instances");
+ logger.debug("There are now {} {} instances", actual, processKey);
last = actual;
}
@@ -838,7 +838,7 @@ public abstract class WorkflowTest {
} catch (InterruptedException e) {
String msg = "Interrupted waiting for there to be " + count + " "
+ processKey + " instances";
- msoLogger.debug(msg);
+ logger.debug(msg);
fail(msg);
}
@@ -847,7 +847,7 @@ public abstract class WorkflowTest {
String msg = "Timed out waiting for there to be " + count + " "
+ processKey + " instances";
- msoLogger.debug(msg);
+ logger.debug(msg);
fail(msg);
}
@@ -862,8 +862,7 @@ public abstract class WorkflowTest {
protected Object getProcessVariable(String processKey, String variable,
long timeout) {
- msoLogger.debug("Waiting " + timeout + "ms for "
- + processKey + "." + variable + " to be set");
+ logger.debug("Waiting " + timeout + "ms for " + processKey + "." + variable + " to be set");
long now = System.currentTimeMillis() + timeout;
long endTime = now + timeout;
@@ -874,10 +873,10 @@ public abstract class WorkflowTest {
while (value == null) {
if (now > endTime) {
if (processInstance == null) {
- msoLogger.debug("Timed out waiting for "
+ logger.debug("Timed out waiting for "
+ processKey + " to start");
} else {
- msoLogger.debug("Timed out waiting for "
+ logger.debug("Timed out waiting for "
+ processKey + "[" + processInstance.getId()
+ "]." + variable + " to be set");
}
@@ -896,7 +895,8 @@ public abstract class WorkflowTest {
processInstance = processInstanceQuery.singleResult();
}else{
//TODO There shouldnt be more than one in the list but seems to be happening, need to figure out why happening and best way to get correct one from list
- msoLogger.debug("Process Instance Query returned " + processInstanceQuery.count() + " instance. Getting the last instance in the list");
+ logger.debug("Process Instance Query returned {} instance. Getting the last instance in the list",
+ processInstanceQuery.count());
List<ProcessInstance> processList = processInstanceQuery.list();
processInstance = processList.get((processList.size() - 1));
}
@@ -910,15 +910,14 @@ public abstract class WorkflowTest {
try {
Thread.sleep(200);
} catch (InterruptedException e) {
- msoLogger.debug("Interrupted waiting for "
- + processKey + "." + variable + " to be set");
+ logger.debug("Interrupted waiting for {}.{} to be set", processKey, variable);
return null;
}
now = System.currentTimeMillis();
}
- msoLogger.debug(processKey + "["
+ logger.debug(processKey + "["
+ processInstance.getId() + "]." + variable + "="
+ value);
@@ -952,10 +951,10 @@ public abstract class WorkflowTest {
// Deprecated usage. All test code should switch to the (( ... )) syntax.
content = content.replace("{{REQUEST-ID}}", sdncRequestId);
- msoLogger.debug("Injecting SDNC adapter callback");
+ logger.debug("Injecting SDNC adapter callback");
Response response = workflowMessageResource.deliver(contentType, "SDNCAResponse", sdncRequestId, content);
- msoLogger.debug("Workflow response to SDNC adapter callback: " + response);
+ logger.debug("Workflow response to SDNC adapter callback: " + response);
return true;
}
@@ -987,7 +986,7 @@ public abstract class WorkflowTest {
// TODO this needs to be fixed. It is causing double tags and content
// Need to parse content before setting below since content includes not just RequestData or modify callback files to only contain RequestData contents.
- msoLogger.debug("Injecting SDNC adapter callback");
+ logger.debug("Injecting SDNC adapter callback");
CallbackHeader callbackHeader = new CallbackHeader();
callbackHeader.setRequestId(sdncRequestId);
callbackHeader.setResponseCode(String.valueOf(respCode));
@@ -996,7 +995,7 @@ public abstract class WorkflowTest {
sdncAdapterCallbackRequest.setCallbackHeader(callbackHeader);
sdncAdapterCallbackRequest.setRequestData(content);
SDNCAdapterResponse sdncAdapterResponse = callbackService.sdncAdapterCallback(sdncAdapterCallbackRequest);
- msoLogger.debug("Workflow response to SDNC adapter callback: " + sdncAdapterResponse);
+ logger.debug("Workflow response to SDNC adapter callback: " + sdncAdapterResponse);
return true;
}
@@ -1023,10 +1022,10 @@ public abstract class WorkflowTest {
// Deprecated usage. All test code should switch to the (( ... )) syntax.
content = content.replace("{{MESSAGE-ID}}", messageId);
- msoLogger.debug("Injecting VNF adapter callback");
+ logger.debug("Injecting VNF adapter callback");
Response response = workflowMessageResource.deliver(contentType, "VNFAResponse", messageId, content);
- msoLogger.debug("Workflow response to VNF adapter callback: " + response);
+ logger.debug("Workflow response to VNF adapter callback: {}", response);
return true;
}
@@ -1059,7 +1058,7 @@ public abstract class WorkflowTest {
content = content.replace("{{REQUEST-ID}}", msoRequestId);
}
- msoLogger.debug("Injecting VNF adapter callback");
+ logger.debug("Injecting VNF adapter callback");
// Is it possible to unmarshal this with JAXB? I couldn't.
@@ -1132,8 +1131,8 @@ public abstract class WorkflowTest {
createVnfNotification.setRollback(rollback);
} catch (Exception e) {
- msoLogger.debug("Failed to unmarshal VNF callback content:");
- msoLogger.debug(content);
+ logger.debug("Failed to unmarshal VNF callback content:");
+ logger.debug(content);
return false;
}
@@ -1175,7 +1174,7 @@ public abstract class WorkflowTest {
// Deprecated usage. All test code should switch to the (( ... )) syntax.
content = content.replace("{{MESSAGE-ID}}", messageId);
- msoLogger.debug("Injecting VNF adapter delete callback");
+ logger.debug("Injecting VNF adapter delete callback");
// Is it possible to unmarshal this with JAXB? I couldn't.
@@ -1195,8 +1194,8 @@ public abstract class WorkflowTest {
}
} catch (Exception e) {
- msoLogger.debug("Failed to unmarshal VNF Delete callback content:");
- msoLogger.debug(content);
+ logger.debug("Failed to unmarshal VNF Delete callback content:");
+ logger.debug(content);
return false;
}
@@ -1239,7 +1238,7 @@ public abstract class WorkflowTest {
// Deprecated usage. All test code should switch to the (( ... )) syntax.
content = content.replace("{{REQUEST-ID}}", msoRequestId);
- msoLogger.debug("Injecting VNF adapter callback");
+ logger.debug("Injecting VNF adapter callback");
// Is it possible to unmarshal this with JAXB? I couldn't.
@@ -1308,8 +1307,8 @@ public abstract class WorkflowTest {
updateVnfNotification.setRollback(rollback);
} catch (Exception e) {
- msoLogger.debug("Failed to unmarshal VNF callback content:");
- msoLogger.debug(content);
+ logger.debug("Failed to unmarshal VNF callback content:");
+ logger.debug(content);
return false;
}
@@ -1362,7 +1361,7 @@ public abstract class WorkflowTest {
if (callbackData == null) {
String msg = "No '" + action + "' workflow message callback is defined";
- msoLogger.debug(msg);
+ logger.debug(msg);
fail(msg);
}
@@ -1370,7 +1369,7 @@ public abstract class WorkflowTest {
if (messageType == null || messageType.trim().equals("")) {
String msg = "No workflow message type is defined in the '" + action + "' callback";
- msoLogger.debug(msg);
+ logger.debug(msg);
fail(msg);
}
@@ -1378,7 +1377,7 @@ public abstract class WorkflowTest {
contentType = callbackData.getContentType();
} else {
String msg = "Invalid workflow message program modifier: '" + modifier + "'";
- msoLogger.debug(msg);
+ logger.debug(msg);
fail(msg);
}
@@ -1416,10 +1415,10 @@ public abstract class WorkflowTest {
content = content.replace("((CORRELATOR))", correlator);
}
- msoLogger.debug("Injecting " + messageType + " message");
+ logger.debug("Injecting " + messageType + " message");
Response response = workflowMessageResource.deliver(contentType, messageType, correlator, content);
- msoLogger.debug("Workflow response to " + messageType + " message: " + response);
+ logger.debug("Workflow response to {} message: {}", messageType, response);
return true;
}
@@ -1458,7 +1457,7 @@ public abstract class WorkflowTest {
if (callbackData == null) {
String msg = "No '" + action + "' workflow message callback is defined";
- msoLogger.debug(msg);
+ logger.debug(msg);
fail(msg);
}
@@ -1466,7 +1465,7 @@ public abstract class WorkflowTest {
if (messageType == null || messageType.trim().equals("")) {
String msg = "No workflow message type is defined in the '" + action + "' callback";
- msoLogger.debug(msg);
+ logger.debug(msg);
fail(msg);
}
@@ -1474,7 +1473,7 @@ public abstract class WorkflowTest {
contentType = callbackData.getContentType();
} else {
String msg = "Invalid workflow message program modifier: '" + modifier + "'";
- msoLogger.debug(msg);
+ logger.debug(msg);
fail(msg);
}
@@ -1588,10 +1587,10 @@ public abstract class WorkflowTest {
}
}
}
- msoLogger.debug("Injecting " + messageType + " message");
+ logger.debug("Injecting " + messageType + " message");
Response response = workflowMessageResource.deliver(contentType, messageType, correlator, content);
- msoLogger.debug("Workflow response to " + messageType + " message: " + response);
+ logger.debug("Workflow response to {} message: {}", messageType, response);
return true;
}
@@ -1602,15 +1601,14 @@ public abstract class WorkflowTest {
* @param timeout the amount of time to wait, in milliseconds
*/
protected void waitForProcessEnd(String businessKey, long timeout) {
- msoLogger.debug("Waiting " + timeout + "ms for process with business key " +
- businessKey + " to end");
+ logger.debug("Waiting {}ms for process with business key {} to end", timeout, businessKey);
long now = System.currentTimeMillis() + timeout;
long endTime = now + timeout;
while (now <= endTime) {
if (isProcessEnded(businessKey)) {
- msoLogger.debug("Process with business key " + businessKey + " has ended");
+ logger.debug("Process with business key {} has ended", businessKey);
return;
}
@@ -1619,7 +1617,7 @@ public abstract class WorkflowTest {
} catch (InterruptedException e) {
String msg = "Interrupted waiting for process with business key " +
businessKey + " to end";
- msoLogger.debug(msg);
+ logger.debug(msg);
fail(msg);
}
@@ -1628,7 +1626,7 @@ public abstract class WorkflowTest {
String msg = "Process with business key " + businessKey +
" did not end within " + timeout + "ms";
- msoLogger.debug(msg);
+ logger.debug(msg);
fail(msg);
}
@@ -1643,15 +1641,14 @@ public abstract class WorkflowTest {
* @author cb645j
*/
protected void waitForProcessEnd(String businessKey, String processName, long timeout) {
- msoLogger.debug("Waiting " + timeout + "ms for process with business key " +
- businessKey + " to end");
+ logger.debug("Waiting {}ms for process with business key {} to end", timeout, businessKey);
long now = System.currentTimeMillis() + timeout;
long endTime = now + timeout;
while (now <= endTime) {
if (isProcessEnded(businessKey, processName)) {
- msoLogger.debug("Process with business key " + businessKey + " has ended");
+ logger.debug("Process with business key {} has ended", businessKey);
return;
}
@@ -1660,7 +1657,7 @@ public abstract class WorkflowTest {
} catch (InterruptedException e) {
String msg = "Interrupted waiting for process with business key " +
businessKey + " to end";
- msoLogger.debug(msg);
+ logger.debug(msg);
fail(msg);
}
@@ -1669,7 +1666,7 @@ public abstract class WorkflowTest {
String msg = "Process with business key " + businessKey +
" did not end within " + timeout + "ms";
- msoLogger.debug(msg);
+ logger.debug(msg);
fail(msg);
}
@@ -1747,8 +1744,8 @@ public abstract class WorkflowTest {
.variableName(variableName).singleResult();
return v == null ? null : v.getValue();
} catch (Exception e) {
- msoLogger.debug("Error retrieving variable " + variableName +
- " from historical process with business key " + businessKey + ": " + e);
+ logger.debug("Error retrieving variable {} from historical process with business key {}: ", variableName, businessKey,
+ e);
return null;
}
}
@@ -1777,10 +1774,12 @@ public abstract class WorkflowTest {
return variable == null ? null : variable.getValue();
}catch(ProcessEngineException e){
- msoLogger.debug("Multiple proccess instances exist with process name " + processName + " and business key " + businessKey + ". Must pass instance index as a parameter.");
+ logger.debug("Multiple proccess instances exist with process name {} and business key {}. Must pass instance "
+ + "index as a parameter.", processName, businessKey);
return null;
}catch(Exception e){
- msoLogger.debug("Error retrieving variable " + variableName + " from historical process for process " + processName + " with business key " + businessKey + ": " + e);
+ logger.debug("Error retrieving variable {} from historical process for process {} with business key {}: ",
+ variableName, processName, businessKey, e);
return null;
}
}
@@ -1814,7 +1813,8 @@ public abstract class WorkflowTest {
return variable == null ? null : variable.getValue();
}catch(Exception e) {
- msoLogger.debug("Error retrieving variable " + variableName + " from historical process for process " + processName + " with business key " + businessKey + ": " + e);
+ logger.debug("Error retrieving variable {} from historical process for process {} with business key {}: ",
+ variableName, processName, businessKey, e);
return null;
}
}
@@ -1851,8 +1851,7 @@ public abstract class WorkflowTest {
.variableName(variableName).singleResult();
return v == null ? null : v.getValue();
} catch (Exception e) {
- msoLogger.debug("Error retrieving variable " + variableName +
- " from sub flow: " + subflowName + ", Exception is: " + e);
+ logger.debug("Error retrieving variable {} from sub flow: {}, Exception is: ", variableName, subflowName, e);
return null;
}
}
@@ -1886,8 +1885,8 @@ public abstract class WorkflowTest {
.variableName(variableName).singleResult();
return v == null ? null : v.getValue();
} catch (Exception e) {
- msoLogger.debug("Error retrieving variable " + variableName +
- " from " + subflowInstanceIndex + " instance index of sub flow: " + subflowName + ", Exception is: " + e);
+ logger.debug("Error retrieving variable {} from {} instance index of sub flow: {}, Exception is: ", variableName,
+ subflowInstanceIndex, subflowName, e);
return null;
}
}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAndActivatePnfResourceTest.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAndActivatePnfResourceTest.java
index 13fe61f704..5cc0281407 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAndActivatePnfResourceTest.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAndActivatePnfResourceTest.java
@@ -23,7 +23,7 @@
package org.onap.so.bpmn.infrastructure.pnf.delegate;
import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat;
-import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.CORRELATION_ID;
+import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.PNF_CORRELATION_ID;
import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.PNF_UUID;
import java.util.HashMap;
@@ -62,7 +62,7 @@ public class CreateAndActivatePnfResourceTest extends BaseIntegrationTest {
@Test
public void shouldWaitForMessageFromDmaapAndUpdateAaiEntryWhenAaiEntryExists() {
// given
- variables.put(CORRELATION_ID, PnfManagementTestImpl.ID_WITH_ENTRY);
+ variables.put(PNF_CORRELATION_ID, PnfManagementTestImpl.ID_WITH_ENTRY);
// when
ProcessInstance instance = runtimeService
.startProcessInstanceByKey("CreateAndActivatePnfResource", "businessKey", variables);
@@ -73,7 +73,7 @@ public class CreateAndActivatePnfResourceTest extends BaseIntegrationTest {
assertThat(instance).isEnded().hasPassedInOrder(
"CreateAndActivatePnf_StartEvent",
"CheckInputs",
- "CheckAiiForCorrelationId",
+ "CheckAiiForPnfCorrelationId",
"DoesAaiContainInfoAboutPnf",
"AaiEntryExists",
"InformDmaapClient",
@@ -88,7 +88,7 @@ public class CreateAndActivatePnfResourceTest extends BaseIntegrationTest {
@Test
public void shouldCreateAaiEntryWaitForMessageFromDmaapAndUpdateAaiEntryWhenNoAaiEntryExists() {
// given
- variables.put(CORRELATION_ID, PnfManagementTestImpl.ID_WITHOUT_ENTRY);
+ variables.put(PNF_CORRELATION_ID, PnfManagementTestImpl.ID_WITHOUT_ENTRY);
// when
ProcessInstance instance = runtimeService
.startProcessInstanceByKey("CreateAndActivatePnfResource", "businessKey", variables);
@@ -99,7 +99,7 @@ public class CreateAndActivatePnfResourceTest extends BaseIntegrationTest {
assertThat(instance).isEnded().hasPassedInOrder(
"CreateAndActivatePnf_StartEvent",
"CheckInputs",
- "CheckAiiForCorrelationId",
+ "CheckAiiForPnfCorrelationId",
"DoesAaiContainInfoAboutPnf",
"CreatePnfEntryInAai",
"AaiEntryExists",
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 146e07b820..6a5f9fac74 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
@@ -30,19 +30,19 @@ import org.springframework.stereotype.Component;
@Primary
public class DmaapClientTestImpl implements DmaapClient {
- private String correlationId;
+ private String pnfCorrelationId;
private Runnable informConsumer;
@Override
- public void registerForUpdate(String correlationId, Runnable informConsumer) {
- this.correlationId = correlationId;
+ public void registerForUpdate(String pnfCorrelationId, Runnable informConsumer) {
+ this.pnfCorrelationId = pnfCorrelationId;
this.informConsumer = informConsumer;
}
@Override
- public Runnable unregister(String correlationId) {
- if (Objects.equals(this.correlationId, correlationId)) {
- this.correlationId = null;
+ public Runnable unregister(String pnfCorrelationId) {
+ if (Objects.equals(this.pnfCorrelationId, pnfCorrelationId)) {
+ this.pnfCorrelationId = null;
Runnable informConsumer = this.informConsumer;
this.informConsumer = null;
return informConsumer;
@@ -50,8 +50,8 @@ public class DmaapClientTestImpl implements DmaapClient {
return null;
}
- public String getCorrelationId() {
- return correlationId;
+ public String getPnfCorrelationId() {
+ return pnfCorrelationId;
}
public Runnable getInformConsumer() {
@@ -63,6 +63,6 @@ public class DmaapClientTestImpl implements DmaapClient {
}
public boolean haveRegisteredConsumer() {
- return correlationId != null;
+ return pnfCorrelationId != null;
}
}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfManagementTestImpl.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfManagementTestImpl.java
index 84c983619b..f9db93e3f7 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfManagementTestImpl.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfManagementTestImpl.java
@@ -40,8 +40,8 @@ public class PnfManagementTestImpl implements PnfManagement {
private Map<String, String> serviceAndPnfRelationMap = new HashMap<>();
@Override
- public Optional<Pnf> getEntryFor(String correlationId) {
- if (Objects.equals(correlationId, ID_WITH_ENTRY)) {
+ public Optional<Pnf> getEntryFor(String pnfCorrelationId) {
+ if (Objects.equals(pnfCorrelationId, ID_WITH_ENTRY)) {
return Optional.of(new Pnf());
} else {
return Optional.empty();
@@ -49,8 +49,8 @@ public class PnfManagementTestImpl implements PnfManagement {
}
@Override
- public void createEntry(String correlationId, Pnf entry) {
- created.put(correlationId, entry);
+ public void createEntry(String pnfCorrelationId, Pnf entry) {
+ created.put(pnfCorrelationId, entry);
}
@Override
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/resources/application-test.yaml b/bpmn/mso-infrastructure-bpmn/src/test/resources/application-test.yaml
index 21ad485fdb..56a92cbd01 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/resources/application-test.yaml
+++ b/bpmn/mso-infrastructure-bpmn/src/test/resources/application-test.yaml
@@ -157,7 +157,7 @@ sniro:
headers.latestVersion: 2
spring:
datasource:
- jdbcUrl: jdbc:mariadb://localhost:3307/camundabpmn
+ url: jdbc:mariadb://localhost:3307/camundabpmn
username: root
password: password
driver-class-name: org.mariadb.jdbc.Driver
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVfModuleBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVfModuleBB.bpmn
index 1109e9cd9d..228eaefdb9 100644
--- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVfModuleBB.bpmn
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVfModuleBB.bpmn
@@ -1,5 +1,5 @@
<?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.8.2">
+<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.4.0">
<bpmn:process id="AssignVfModuleBB" name="AssignVfModuleBB" isExecutable="true">
<bpmn:startEvent id="AssignVfModuleBB_Start">
<bpmn:outgoing>SequenceFlow_1xr6chl</bpmn:outgoing>
@@ -18,7 +18,7 @@
<bpmn:incoming>SequenceFlow_14xl505</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="SequenceFlow_14xl505" sourceRef="UpdateVfModuleStatus" targetRef="AssignVfModuleBB_End" />
- <bpmn:serviceTask id="UpdateVfModuleStatus" name="&#10;AAI&#10;Update&#10;(vf module)&#10;" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedOrPendingActivationVfModule(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
+ <bpmn:serviceTask id="UpdateVfModuleStatus" name="&#10;AAI&#10;Update&#10;(vf module)&#10;" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedVfModule(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
<bpmn:incoming>SequenceFlow_1dttbxh</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_14xl505</bpmn:outgoing>
</bpmn:serviceTask>
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UpdateNetworkBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UpdateNetworkBB.bpmn
index 1cfb9a3860..1235469b42 100644
--- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UpdateNetworkBB.bpmn
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UpdateNetworkBB.bpmn
@@ -1,19 +1,18 @@
<?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="_MagIIMOUEeW8asg-vCEgWQ" 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: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="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.7.2" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
<bpmn2:process id="UpdateNetworkBB" name="UpdateNetworkBB" isExecutable="true">
<bpmn2:startEvent id="UpdateNetworkBB_Start" name="Start">
<bpmn2:outgoing>SequenceFlow_074w2et</bpmn2:outgoing>
</bpmn2:startEvent>
<bpmn2:serviceTask id="SDNCChangeAssignNetwork" name="SDNC ChangeAssign Network" camunda:expression="${SDNCChangeAssignTasks.changeAssignNetwork(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
<bpmn2:incoming>SequenceFlow_074w2et</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_04yezm3</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0rvstwt</bpmn2:outgoing>
</bpmn2:serviceTask>
<bpmn2:sequenceFlow id="SequenceFlow_074w2et" sourceRef="UpdateNetworkBB_Start" targetRef="SDNCChangeAssignNetwork" />
<bpmn2:intermediateThrowEvent id="SDNC_End" name="To AAI">
- <bpmn2:incoming>SequenceFlow_04yezm3</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1eacnem</bpmn2:incoming>
<bpmn2:linkEventDefinition name="SDNC_to_AAI" />
</bpmn2:intermediateThrowEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_04yezm3" sourceRef="SDNCChangeAssignNetwork" targetRef="SDNC_End" />
<bpmn2:intermediateCatchEvent id="AAI_Start" name="To AAI">
<bpmn2:outgoing>SequenceFlow_1trqq6d</bpmn2:outgoing>
<bpmn2:linkEventDefinition name="SDNC_to_AAI" />
@@ -38,24 +37,51 @@
<bpmn2:linkEventDefinition name="AAI_to_AIC" />
</bpmn2:intermediateThrowEvent>
<bpmn2:sequenceFlow id="SequenceFlow_00xbxe7" sourceRef="QueryNetworkTableRefAAI" targetRef="AAI_End" />
- <bpmn2:intermediateCatchEvent id="AIC_Start" name="To AIC">
- <bpmn2:outgoing>SequenceFlow_196cgux</bpmn2:outgoing>
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_0y5f10a" name="To AIC">
+ <bpmn2:outgoing>SequenceFlow_0qrtpcy</bpmn2:outgoing>
<bpmn2:linkEventDefinition name="AAI_to_AIC" />
</bpmn2:intermediateCatchEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_196cgux" sourceRef="AIC_Start" targetRef="UpdateNetworkAdapter" />
- <bpmn2:serviceTask id="UpdateNetworkAdapter" name="Update Network (Network Adapter)" camunda:expression="${NetworkAdapterUpdateTasks.updateNetwork(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
- <bpmn2:incoming>SequenceFlow_196cgux</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_0hsvgje</bpmn2:outgoing>
- </bpmn2:serviceTask>
- <bpmn2:sequenceFlow id="SequenceFlow_0hsvgje" sourceRef="UpdateNetworkAdapter" targetRef="UpdateNetworkAAI" />
- <bpmn2:serviceTask id="UpdateNetworkAAI" name="Update Network (AAI)" camunda:expression="${AAIUpdateTasks.updateObjectNetwork(execution.getVariable(&#34;&#34;))}">
- <bpmn2:incoming>SequenceFlow_0hsvgje</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_0fhfitm</bpmn2:outgoing>
+ <bpmn2:serviceTask id="Update_Network_AAI_ServiceTask" name="Update Network (AAI)" camunda:expression="${AAIUpdateTasks.updateNetworkUpdated(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
+ <bpmn2:incoming>SequenceFlow_001ursg</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_06ei0em</bpmn2:outgoing>
</bpmn2:serviceTask>
<bpmn2:endEvent id="UpdateNetworkBB_End" name="End">
- <bpmn2:incoming>SequenceFlow_0fhfitm</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_06ei0em</bpmn2:incoming>
</bpmn2:endEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_0fhfitm" sourceRef="UpdateNetworkAAI" targetRef="UpdateNetworkBB_End" />
+ <bpmn2:callActivity id="CallActivity_NetworkAdapterRestV1" name="Call NetworkAdapterRestV1" calledElement="NetworkAdapterRestV1">
+ <bpmn2:extensionElements>
+ <camunda:in source="networkAdapterRequest" target="networkAdapterRequest" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="updateNetworkResponse" target="updateNetworkResponse" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_07hq1eg</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_183ph5i</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:serviceTask id="ServiceTask_ProcessResponse" name="Process Response From Openstack" camunda:expression="${NetworkAdapterUpdateTasks.processResponseFromOpenstack(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
+ <bpmn2:incoming>SequenceFlow_183ph5i</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_001ursg</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:serviceTask id="Create_Network_ServiceTask" name="&#10;AIC&#10;Update&#10;(network)&#10;" camunda:expression="${NetworkAdapterUpdateTasks.updateNetwork(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
+ <bpmn2:incoming>SequenceFlow_0qrtpcy</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_07hq1eg</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_0qrtpcy" sourceRef="IntermediateCatchEvent_0y5f10a" targetRef="Create_Network_ServiceTask" />
+ <bpmn2:sequenceFlow id="SequenceFlow_001ursg" sourceRef="ServiceTask_ProcessResponse" targetRef="Update_Network_AAI_ServiceTask" />
+ <bpmn2:sequenceFlow id="SequenceFlow_06ei0em" sourceRef="Update_Network_AAI_ServiceTask" targetRef="UpdateNetworkBB_End" />
+ <bpmn2:sequenceFlow id="SequenceFlow_07hq1eg" sourceRef="Create_Network_ServiceTask" targetRef="CallActivity_NetworkAdapterRestV1" />
+ <bpmn2:sequenceFlow id="SequenceFlow_183ph5i" sourceRef="CallActivity_NetworkAdapterRestV1" targetRef="ServiceTask_ProcessResponse" />
+ <bpmn2:callActivity id="CallActivity_sdncHandlerCallChangeAssign" name="SDNC Change Assign (network)" calledElement="SDNCHandler">
+ <bpmn2:extensionElements>
+ <camunda:in source="SDNCRequest" target="SDNCRequest" />
+ <camunda:out source="SDNCResponse" target="SDNCResponse" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0rvstwt</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1eacnem</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_0rvstwt" sourceRef="SDNCChangeAssignNetwork" targetRef="CallActivity_sdncHandlerCallChangeAssign" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1eacnem" sourceRef="CallActivity_sdncHandlerCallChangeAssign" targetRef="SDNC_End" />
</bpmn2:process>
<bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
<bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
@@ -79,18 +105,11 @@
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="IntermediateThrowEvent_0pce3rm_di" bpmnElement="SDNC_End">
- <dc:Bounds x="487" y="77" width="36" height="36" />
+ <dc:Bounds x="665" y="77" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="490" y="117" width="33" height="12" />
+ <dc:Bounds x="669" y="117" width="32" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_04yezm3_di" bpmnElement="SequenceFlow_04yezm3">
- <di:waypoint xsi:type="dc:Point" x="378" y="95" />
- <di:waypoint xsi:type="dc:Point" x="487" y="95" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="432.5" y="74" width="0" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="IntermediateCatchEvent_1hbb3j8_di" bpmnElement="AAI_Start">
<dc:Bounds x="144" y="215" width="36" height="36" />
<bpmndi:BPMNLabel>
@@ -140,43 +159,82 @@
<dc:Bounds x="755" y="212" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="IntermediateCatchEvent_0sx0nb6_di" bpmnElement="AIC_Start">
- <dc:Bounds x="144" y="332" width="36" height="36" />
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0y5f10a_di" bpmnElement="IntermediateCatchEvent_0y5f10a">
+ <dc:Bounds x="144" y="384" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="146" y="372" width="34" height="12" />
+ <dc:Bounds x="147" y="424" width="33" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_196cgux_di" bpmnElement="SequenceFlow_196cgux">
- <di:waypoint xsi:type="dc:Point" x="180" y="350" />
- <di:waypoint xsi:type="dc:Point" x="248" y="350" />
+ <bpmndi:BPMNShape id="ServiceTask_1ltcf7v_di" bpmnElement="Update_Network_AAI_ServiceTask">
+ <dc:Bounds x="806" y="362" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1nhzcte_di" bpmnElement="UpdateNetworkBB_End">
+ <dc:Bounds x="983" y="384" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="169" y="329" width="90" height="12" />
+ <dc:Bounds x="992" y="424" width="19" height="12" />
</bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ServiceTask_0i66n9g_di" bpmnElement="UpdateNetworkAdapter">
- <dc:Bounds x="248" y="310" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_0hsvgje_di" bpmnElement="SequenceFlow_0hsvgje">
- <di:waypoint xsi:type="dc:Point" x="348" y="350" />
- <di:waypoint xsi:type="dc:Point" x="422" y="350" />
+ <bpmndi:BPMNShape id="CallActivity_1jpfzuh_di" bpmnElement="CallActivity_NetworkAdapterRestV1">
+ <dc:Bounds x="445" y="362" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_1kgckv9_di" bpmnElement="ServiceTask_ProcessResponse">
+ <dc:Bounds x="625" y="362" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_03ywm5v_di" bpmnElement="Create_Network_ServiceTask">
+ <dc:Bounds x="278" y="362" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0qrtpcy_di" bpmnElement="SequenceFlow_0qrtpcy">
+ <di:waypoint xsi:type="dc:Point" x="180" y="402" />
+ <di:waypoint xsi:type="dc:Point" x="229" y="402" />
+ <di:waypoint xsi:type="dc:Point" x="229" y="402" />
+ <di:waypoint xsi:type="dc:Point" x="278" y="402" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="340" y="329" width="90" height="12" />
+ <dc:Bounds x="199" y="396" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ServiceTask_1ydm5u9_di" bpmnElement="UpdateNetworkAAI">
- <dc:Bounds x="422" y="310" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="EndEvent_0fsts2w_di" bpmnElement="UpdateNetworkBB_End">
- <dc:Bounds x="637" y="332" width="36" height="36" />
+ <bpmndi:BPMNEdge id="SequenceFlow_001ursg_di" bpmnElement="SequenceFlow_001ursg">
+ <di:waypoint xsi:type="dc:Point" x="725" y="402" />
+ <di:waypoint xsi:type="dc:Point" x="806" y="402" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="646" y="372" width="19" height="12" />
+ <dc:Bounds x="720.5" y="381" width="0" height="12" />
</bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_06ei0em_di" bpmnElement="SequenceFlow_06ei0em">
+ <di:waypoint xsi:type="dc:Point" x="906" y="402" />
+ <di:waypoint xsi:type="dc:Point" x="983" y="402" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="899.5" y="381" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_07hq1eg_di" bpmnElement="SequenceFlow_07hq1eg">
+ <di:waypoint xsi:type="dc:Point" x="378" y="402" />
+ <di:waypoint xsi:type="dc:Point" x="445" y="402" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="411.5" y="381" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_183ph5i_di" bpmnElement="SequenceFlow_183ph5i">
+ <di:waypoint xsi:type="dc:Point" x="545" y="402" />
+ <di:waypoint xsi:type="dc:Point" x="625" y="402" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="585" y="381" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1da6ys0_di" bpmnElement="CallActivity_sdncHandlerCallChangeAssign">
+ <dc:Bounds x="455" y="55" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_0fhfitm_di" bpmnElement="SequenceFlow_0fhfitm">
- <di:waypoint xsi:type="dc:Point" x="522" y="350" />
- <di:waypoint xsi:type="dc:Point" x="637" y="350" />
+ <bpmndi:BPMNEdge id="SequenceFlow_0rvstwt_di" bpmnElement="SequenceFlow_0rvstwt">
+ <di:waypoint xsi:type="dc:Point" x="378" y="95" />
+ <di:waypoint xsi:type="dc:Point" x="455" y="95" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="416.5" y="74" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1eacnem_di" bpmnElement="SequenceFlow_1eacnem">
+ <di:waypoint xsi:type="dc:Point" x="555" y="95" />
+ <di:waypoint xsi:type="dc:Point" x="665" y="95" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="535" y="329" width="90" height="12" />
+ <dc:Bounds x="610" y="74" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UpdateNetworkBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UpdateNetworkBBTest.java
index 98e049f440..1bb065ae06 100644
--- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UpdateNetworkBBTest.java
+++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UpdateNetworkBBTest.java
@@ -33,22 +33,24 @@ import org.onap.so.bpmn.common.BuildingBlockExecution;
public class UpdateNetworkBBTest extends BaseBPMNTest {
@Test
public void updateNetworkBBTest() throws InterruptedException {
+ mockSubprocess("SDNCHandler", "My Mock Process Name", "GenericStub");
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("UpdateNetworkBB", variables);
assertThat(processInstance).isNotNull();
assertThat(processInstance).isStarted().hasPassedInOrder(
- "UpdateNetworkBB_Start", "SDNCChangeAssignNetwork",
+ "UpdateNetworkBB_Start", "SDNCChangeAssignNetwork", "CallActivity_sdncHandlerCallChangeAssign",
"QueryVpnBindingAAI", "QueryNetworkPolicyAAI", "QueryNetworkTableRefAAI",
- "UpdateNetworkAdapter", "UpdateNetworkAAI", "UpdateNetworkBB_End");
+ "Create_Network_ServiceTask", "CallActivity_NetworkAdapterRestV1", "ServiceTask_ProcessResponse", "Update_Network_AAI_ServiceTask", "UpdateNetworkBB_End");
assertThat(processInstance).isEnded();
}
@Test
public void updateNetworkBBExceptionTest() throws Exception {
+ mockSubprocess("SDNCHandler", "My Mock Process Name", "GenericStub");
doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiQueryTasks).queryNetworkVpnBinding(any(BuildingBlockExecution.class));
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("UpdateNetworkBB", variables);
assertThat(processInstance).isStarted().hasPassedInOrder(
- "UpdateNetworkBB_Start", "SDNCChangeAssignNetwork",
+ "UpdateNetworkBB_Start", "SDNCChangeAssignNetwork", "CallActivity_sdncHandlerCallChangeAssign",
"QueryVpnBindingAAI")
.hasNotPassed("QueryNetworkPolicyAAI", "QueryNetworkTableRefAAI",
"UpdateNetworkAdapter", "UpdateNetworkAAI", "UpdateNetworkBB_End");
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfCmBase.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfCmBase.groovy
index 4237a8d6a4..32fc46a84f 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfCmBase.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfCmBase.groovy
@@ -264,24 +264,8 @@ public abstract class VnfCmBase extends AbstractServiceTaskProcessor {
execution.setVariable("vmIdList", vmidsArray.toString())
execution.setVariable("vserverIdList", vserveridsArray.toString())
}
- }
-
- if (cloudRegionId != null) {
- AAIUri cloudRegionUri = AAIUriFactory.createResourceUri(AAIObjectType.DEFAULT_CLOUD_REGION, cloudRegionId)
- // Check if this client region exists
- if (!client.exists(cloudRegionUri)) {
- msoLogger.debug("Cloud Region with cloudRegionId " + cloudRegionId + " does not exist in A&AI")
- exceptionUtil.buildAndThrowWorkflowException(execution, 404, "Cloud Region with cloudRegionId " + cloudRegionId + " does not exist in A&AI")
- }
-
- AAIResultWrapper aaiRWCloud = client.get(cloudRegionUri)
+ }
- Map<String, Object> resultCloud = aaiRWCloud.asMap()
-
- String aicIdentity = resultCloud.get("identity-url")
- msoLogger.debug("aicIdentity from A&AI is: " + aicIdentity)
- execution.setVariable("aicIdentity", aicIdentity)
- }
// preserve relationships if exist
Optional<Relationships> relationships = aaiRW.getRelationships()
@@ -825,7 +809,5 @@ public abstract class VnfCmBase extends AbstractServiceTaskProcessor {
}
msoLogger.trace("Exit postProcessRollback ")
}
-
-
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/aai/groovyflows/AAICreateResources.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/aai/groovyflows/AAICreateResources.java
index 6062129a71..0c519ef29f 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/aai/groovyflows/AAICreateResources.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/aai/groovyflows/AAICreateResources.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -24,23 +26,19 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
-import javax.ws.rs.NotFoundException;
-
-import org.onap.aai.domain.yang.ServiceInstance;
-import org.onap.aai.domain.yang.ServiceInstances;
import org.onap.aai.domain.yang.OwningEntities;
import org.onap.aai.domain.yang.OwningEntity;
-import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetupUtils;
import org.onap.so.client.aai.AAIObjectPlurals;
import org.onap.so.client.aai.AAIObjectType;
import org.onap.so.client.aai.AAIResourcesClient;
import org.onap.so.client.aai.entities.uri.AAIResourceUri;
import org.onap.so.client.aai.entities.uri.AAIUriFactory;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class AAICreateResources {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, AAICreateResources.class);
+ private static final Logger logger = LoggerFactory.getLogger(AAICreateResources.class);
public void createAAIProject (String projectName, String serviceInstance){
AAIResourceUri projectURI = AAIUriFactory.createResourceUri(AAIObjectType.PROJECT, projectName);
@@ -73,7 +71,7 @@ public class AAICreateResources {
.createResourceUri(AAIObjectPlurals.OWNING_ENTITY)
.queryParam("owning-entity-name", owningEntityName))
.orElseGet(() -> {
- msoLogger.debug("No Owning Entity matched by name");
+ logger.debug("No Owning Entity matched by name");
return null;
});
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CancelDmaapSubscription.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CancelDmaapSubscription.java
index 05109abc84..439591a295 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CancelDmaapSubscription.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CancelDmaapSubscription.java
@@ -33,8 +33,8 @@ public class CancelDmaapSubscription implements JavaDelegate {
@Override
public void execute(DelegateExecution execution) {
- String correlationId = (String) execution.getVariable(ExecutionVariableNames.CORRELATION_ID);
- dmaapClient.unregister(correlationId);
+ String pnfCorrelationId = (String) execution.getVariable(ExecutionVariableNames.PNF_CORRELATION_ID);
+ dmaapClient.unregister(pnfCorrelationId);
}
@Autowired
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CheckAaiForCorrelationIdDelegate.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CheckAaiForPnfCorrelationIdDelegate.java
index a8fb21540a..e0fa41b7a1 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CheckAaiForCorrelationIdDelegate.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CheckAaiForPnfCorrelationIdDelegate.java
@@ -21,7 +21,7 @@
package org.onap.so.bpmn.infrastructure.pnf.delegate;
import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.AAI_CONTAINS_INFO_ABOUT_PNF;
-import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.CORRELATION_ID;
+import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.PNF_CORRELATION_ID;
import java.io.IOException;
@@ -35,16 +35,16 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
- * Implementation of "Check AAI for correlation_id" task in CreateAndActivatePnfResource.bpmn
+ * Implementation of "Check AAI for pnf_correlation_id" task in CreateAndActivatePnfResource.bpmn
*
- * Inputs: - correlationId - String
+ * Inputs: - pnfCorrelationId - String
*
* Outputs: - aaiContainsInfoAboutPnf - local Boolean
*/
@Component
-public class CheckAaiForCorrelationIdDelegate implements JavaDelegate {
+public class CheckAaiForPnfCorrelationIdDelegate implements JavaDelegate {
- private static final Logger logger = LoggerFactory.getLogger(CheckAaiForCorrelationIdDelegate.class);
+ private static final Logger logger = LoggerFactory.getLogger(CheckAaiForPnfCorrelationIdDelegate.class);
private PnfManagement pnfManagement;
@@ -55,13 +55,13 @@ public class CheckAaiForCorrelationIdDelegate implements JavaDelegate {
@Override
public void execute(DelegateExecution execution) {
- String correlationId = (String) execution.getVariable(CORRELATION_ID);
- if (correlationId == null) {
- new ExceptionUtil().buildAndThrowWorkflowException(execution, 500, CORRELATION_ID + " is not set");
+ String pnfCorrelationId = (String) execution.getVariable(PNF_CORRELATION_ID);
+ if (pnfCorrelationId == null) {
+ new ExceptionUtil().buildAndThrowWorkflowException(execution, 500, PNF_CORRELATION_ID + " is not set");
}
try {
- boolean isEntry = pnfManagement.getEntryFor(correlationId).isPresent();
- logger.debug("AAI entry is found for pnf correlation id {}: {}", CORRELATION_ID, isEntry);
+ boolean isEntry = pnfManagement.getEntryFor(pnfCorrelationId).isPresent();
+ logger.debug("AAI entry is found for pnf correlation id {}: {}", PNF_CORRELATION_ID, isEntry);
execution.setVariableLocal(AAI_CONTAINS_INFO_ABOUT_PNF, isEntry);
} catch (IOException e) {
new ExceptionUtil().buildAndThrowWorkflowException(execution, 9999, e.getMessage());
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreatePnfEntryInAaiDelegate.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreatePnfEntryInAaiDelegate.java
index c31041fbf7..e56cb83119 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreatePnfEntryInAaiDelegate.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreatePnfEntryInAaiDelegate.java
@@ -22,7 +22,7 @@
package org.onap.so.bpmn.infrastructure.pnf.delegate;
-import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.CORRELATION_ID;
+import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.PNF_CORRELATION_ID;
import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.PNF_UUID;
import org.camunda.bpm.engine.delegate.DelegateExecution;
@@ -38,7 +38,7 @@ import org.springframework.stereotype.Component;
* Implementation of "Create Pnf entry in AAI" task in CreateAndActivatePnfResource.bpmn
*
* Inputs:
- * - correlationId - String
+ * - pnfCorrelationId - String
* - pnfUuid - String
*/
@Component
@@ -54,12 +54,12 @@ public class CreatePnfEntryInAaiDelegate implements JavaDelegate {
@Override
public void execute(DelegateExecution execution) throws Exception {
- String correlationId = (String) execution.getVariable(CORRELATION_ID);
+ String pnfCorrelationId = (String) execution.getVariable(PNF_CORRELATION_ID);
String pnfUuid = (String) execution.getVariable(PNF_UUID);
Pnf pnf = new Pnf();
pnf.setPnfId(pnfUuid);
- pnf.setPnfName(correlationId);
- pnfManagement.createEntry(correlationId, pnf);
- logger.debug("AAI entry is created for pnf correlation id: {}, pnf uuid: {}", correlationId, pnfUuid);
+ pnf.setPnfName(pnfCorrelationId);
+ pnfManagement.createEntry(pnfCorrelationId, pnf);
+ logger.debug("AAI entry is created for pnf correlation id: {}, pnf uuid: {}", pnfCorrelationId, pnfUuid);
}
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateRelation.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateRelation.java
index 7b6706f820..a367bada02 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateRelation.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateRelation.java
@@ -44,7 +44,7 @@ public class CreateRelation implements JavaDelegate {
@Override
public void execute(DelegateExecution delegateExecution) {
String serviceInstanceId = (String) delegateExecution.getVariable("serviceInstanceId");
- String pnfName = (String) delegateExecution.getVariable("correlationId");
+ String pnfName = (String) delegateExecution.getVariable("pnfCorrelationId");
try {
pnfManagementImpl.createRelation(serviceInstanceId, pnfName);
} catch (Exception e) {
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/ExecutionVariableNames.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/ExecutionVariableNames.java
index c5caea5f2f..7d449e72a8 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/ExecutionVariableNames.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/ExecutionVariableNames.java
@@ -27,7 +27,7 @@ public class ExecutionVariableNames {
private ExecutionVariableNames() {}
- public final static String CORRELATION_ID = "correlationId";
+ public final static String PNF_CORRELATION_ID = "pnfCorrelationId";
public final static String AAI_CONTAINS_INFO_ABOUT_PNF = "aaiContainsInfoAboutPnf";
public final static String AAI_CONTAINS_INFO_ABOUT_IP = "aaiContainsInfoAboutIp";
public final static String DMAAP_MESSAGE = "dmaapMessage";
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 1a75b0998c..96455acb84 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
@@ -34,9 +34,9 @@ public class InformDmaapClient implements JavaDelegate {
@Override
public void execute(DelegateExecution execution) {
- String correlationId = (String) execution.getVariable(ExecutionVariableNames.CORRELATION_ID);
+ String pnfCorrelationId = (String) execution.getVariable(ExecutionVariableNames.PNF_CORRELATION_ID);
RuntimeService runtimeService = execution.getProcessEngineServices().getRuntimeService();
- dmaapClient.registerForUpdate(correlationId, () ->
+ dmaapClient.registerForUpdate(pnfCorrelationId, () ->
runtimeService
.createMessageCorrelation("WorkflowMessage")
.processInstanceBusinessKey(execution.getProcessBusinessKey())
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputs.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputs.java
index 1b185f7c03..1caadea0de 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputs.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputs.java
@@ -22,7 +22,7 @@
package org.onap.so.bpmn.infrastructure.pnf.delegate;
-import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.CORRELATION_ID;
+import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.PNF_CORRELATION_ID;
import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.PNF_UUID;
import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.SERVICE_INSTANCE_ID;
import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.TIMEOUT_FOR_NOTIFICATION;
@@ -49,16 +49,16 @@ public class PnfCheckInputs implements JavaDelegate {
@Override
public void execute(DelegateExecution execution) {
- validateCorrelationId(execution);
+ validatePnfCorrelationId(execution);
validatePnfUuid(execution);
validateTimeout(execution);
validateServiceInstanceId(execution);
}
- private void validateCorrelationId(DelegateExecution execution) {
- String correlationId = (String) execution.getVariable(CORRELATION_ID);
- if (Strings.isNullOrEmpty(correlationId)) {
- new ExceptionUtil().buildAndThrowWorkflowException(execution, 9999, "correlationId variable not defined");
+ private void validatePnfCorrelationId(DelegateExecution execution) {
+ String pnfCorrelationId = (String) execution.getVariable(PNF_CORRELATION_ID);
+ if (Strings.isNullOrEmpty(pnfCorrelationId)) {
+ new ExceptionUtil().buildAndThrowWorkflowException(execution, 9999, "pnfCorrelationId variable not defined");
}
}
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 c7e7c7848c..fbf86cc411 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
@@ -22,7 +22,7 @@ package org.onap.so.bpmn.infrastructure.pnf.dmaap;
public interface DmaapClient {
- void registerForUpdate(String correlationId, Runnable informConsumer);
+ void registerForUpdate(String pnfCorrelationId, Runnable informConsumer);
- Runnable unregister(String correlationId);
+ Runnable unregister(String pnfCorrelationId);
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/JsonUtilForCorrelationId.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/JsonUtilForPnfCorrelationId.java
index 159298b4ad..53f6b78d69 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/JsonUtilForCorrelationId.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/JsonUtilForPnfCorrelationId.java
@@ -31,19 +31,19 @@ import java.util.List;
import java.util.Optional;
import java.util.Spliterator;
-public final class JsonUtilForCorrelationId {
+public final class JsonUtilForPnfCorrelationId {
- private static final String JSON_CORRELATION_ID_FIELD_NAME = "correlationId";
+ private static final String JSON_PNF_CORRELATION_ID_FIELD_NAME = "pnfCorrelationId";
- static List<String> parseJsonToGelAllCorrelationId(String json) {
+ static List<String> parseJsonToGelAllPnfCorrelationId(String json) {
JsonElement je = new JsonParser().parse(json);
JsonArray array = je.getAsJsonArray();
List<String> list = new ArrayList<>();
Spliterator<JsonElement> spliterator = array.spliterator();
spliterator.forEachRemaining(jsonElement -> {
handleEscapedCharacters(jsonElement)
- .ifPresent(jsonObject -> getCorrelationId(jsonObject)
- .ifPresent(correlationId -> list.add(correlationId)));
+ .ifPresent(jsonObject -> getPnfCorrelationId(jsonObject)
+ .ifPresent(pnfCorrelationId -> list.add(pnfCorrelationId)));
});
return list;
}
@@ -55,9 +55,9 @@ public final class JsonUtilForCorrelationId {
return Optional.ofNullable(new JsonParser().parse(jsonElement.getAsString()).getAsJsonObject());
}
- private static Optional<String> getCorrelationId(JsonObject jsonObject) {
- if (jsonObject.has(JSON_CORRELATION_ID_FIELD_NAME)) {
- return Optional.ofNullable(jsonObject.get(JSON_CORRELATION_ID_FIELD_NAME).getAsString());
+ private static Optional<String> getPnfCorrelationId(JsonObject jsonObject) {
+ if (jsonObject.has(JSON_PNF_CORRELATION_ID_FIELD_NAME)) {
+ return Optional.ofNullable(jsonObject.get(JSON_PNF_CORRELATION_ID_FIELD_NAME).getAsString());
}
return Optional.empty();
}
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 52f879b0ad..1b7a69eec8 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
@@ -69,18 +69,18 @@ public class PnfEventReadyDmaapClient implements DmaapClient {
}
@Override
- public synchronized void registerForUpdate(String correlationId, Runnable informConsumer) {
- logger.debug("registering for pnf ready dmaap event for correlation id: {}", correlationId);
- pnfCorrelationIdToThreadMap.put(correlationId, informConsumer);
+ public synchronized void registerForUpdate(String pnfCorrelationId, Runnable informConsumer) {
+ logger.debug("registering for pnf ready dmaap event for pnf correlation id: {}", pnfCorrelationId);
+ pnfCorrelationIdToThreadMap.put(pnfCorrelationId, informConsumer);
if (!dmaapThreadListenerIsRunning) {
startDmaapThreadListener();
}
}
@Override
- public synchronized Runnable unregister(String correlationId) {
- logger.debug("unregistering from pnf ready dmaap event for correlation id: {}", correlationId);
- Runnable runnable = pnfCorrelationIdToThreadMap.remove(correlationId);
+ public synchronized Runnable unregister(String pnfCorrelationId) {
+ logger.debug("unregistering from pnf ready dmaap event for pnf correlation id: {}", pnfCorrelationId);
+ Runnable runnable = pnfCorrelationIdToThreadMap.remove(pnfCorrelationId);
if (pnfCorrelationIdToThreadMap.isEmpty()) {
stopDmaapThreadListener();
}
@@ -113,7 +113,7 @@ public class PnfEventReadyDmaapClient implements DmaapClient {
try {
logger.debug("dmaap listener starts listening pnf ready dmaap topic");
HttpResponse response = httpClient.execute(getRequest);
- getCorrelationIdListFromResponse(response).forEach(this::informAboutPnfReadyIfCorrelationIdFound);
+ getPnfCorrelationIdListFromResponse(response).forEach(this::informAboutPnfReadyIfPnfCorrelationIdFound);
} catch (IOException e) {
logger.error("Exception caught during sending rest request to dmaap for listening event topic", e);
}
@@ -122,20 +122,20 @@ public class PnfEventReadyDmaapClient implements DmaapClient {
}
}
- private List<String> getCorrelationIdListFromResponse(HttpResponse response) throws IOException {
+ 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 JsonUtilForCorrelationId.parseJsonToGelAllCorrelationId(responseString);
+ return JsonUtilForPnfCorrelationId.parseJsonToGelAllPnfCorrelationId(responseString);
}
}
return Collections.emptyList();
}
- private void informAboutPnfReadyIfCorrelationIdFound(String correlationId) {
- Runnable runnable = unregister(correlationId);
+ private void informAboutPnfReadyIfPnfCorrelationIdFound(String pnfCorrelationId) {
+ Runnable runnable = unregister(pnfCorrelationId);
if (runnable != null) {
- logger.debug("dmaap listener gets pnf ready event for correlationId: {}", correlationId);
+ logger.debug("dmaap listener gets pnf ready event for pnfCorrelationId: {}", pnfCorrelationId);
runnable.run();
}
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/management/PnfManagement.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/management/PnfManagement.java
index b66bb5f61b..9e720fe0a4 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/management/PnfManagement.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/management/PnfManagement.java
@@ -26,9 +26,9 @@ import org.onap.aai.domain.yang.Pnf;
public interface PnfManagement {
- Optional<Pnf> getEntryFor(String correlationId) throws IOException;
+ Optional<Pnf> getEntryFor(String pnfCorrelationId) throws IOException;
- void createEntry(String correlationId, Pnf entry) throws IOException;
+ void createEntry(String pnfCorrelationId, Pnf entry) throws IOException;
void createRelation(String serviceInstanceId, String pnfName) throws IOException;
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/management/PnfManagementImpl.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/management/PnfManagementImpl.java
index 3d8da2a106..32ea357817 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/management/PnfManagementImpl.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/management/PnfManagementImpl.java
@@ -33,15 +33,15 @@ import org.springframework.stereotype.Component;
public class PnfManagementImpl implements PnfManagement {
@Override
- public Optional<Pnf> getEntryFor(String correlationId) {
+ public Optional<Pnf> getEntryFor(String pnfCorrelationId) {
AAIRestClientImpl restClient = new AAIRestClientImpl();
- return restClient.getPnfByName(correlationId);
+ return restClient.getPnfByName(pnfCorrelationId);
}
@Override
- public void createEntry(String correlationId, Pnf entry) {
+ public void createEntry(String pnfCorrelationId, Pnf entry) {
AAIRestClientImpl restClient = new AAIRestClientImpl();
- restClient.createPnf(correlationId, entry);
+ restClient.createPnf(pnfCorrelationId, entry);
}
@Override
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 477dc34dbd..1f837eb444 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
@@ -64,6 +64,8 @@ import org.onap.so.client.aai.entities.uri.AAIResourceUri;
import org.onap.so.client.aai.entities.uri.AAIUriFactory;
import org.onap.so.logger.MessageEnum;
import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.web.util.UriUtils;
import com.fasterxml.jackson.core.JsonProcessingException;
@@ -83,7 +85,7 @@ public class ServicePluginFactory {
static JsonUtils jsonUtil = new JsonUtils();
- private static MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, ServicePluginFactory.class);
+ private static Logger logger = LoggerFactory.getLogger(ServicePluginFactory.class);
private static ServicePluginFactory instance;
@@ -227,7 +229,7 @@ public class ServicePluginFactory {
break;
}
}
- LOGGER.debug("Get Terminal TP from InventoryOSS");
+ logger.debug("Get Terminal TP from InventoryOSS");
return tpInfoMap;
}
@@ -685,8 +687,8 @@ public class ServicePluginFactory {
try {
return mapper.readValue(jsonstr, type);
} catch (IOException e) {
- LOGGER.error(MessageEnum.RA_NS_EXC, "", "", MsoLogger.ErrorCode.BusinessProcesssError,
- "fail to unMarshal json", e);
+ logger.error("{} {} fail to unMarshal json", MessageEnum.RA_NS_EXC.toString(),
+ MsoLogger.ErrorCode.BusinessProcesssError.getValue(), e);
}
return null;
}
@@ -698,7 +700,7 @@ public class ServicePluginFactory {
try {
jsonStr = mapper.writeValueAsString(srcObj);
} catch (JsonProcessingException e) {
- LOGGER.debug("SdcToscaParserException", e);
+ logger.debug("SdcToscaParserException", e);
}
return jsonStr;
}
@@ -745,9 +747,9 @@ public class ServicePluginFactory {
try {
responseContent = EntityUtils.toString(httpResponse.getEntity(), "UTF-8");
} catch (ParseException e) {
- LOGGER.debug("ParseException in sendrequest", e);
+ logger.debug("ParseException in sendrequest", e);
} catch (IOException e) {
- LOGGER.debug("IOException in sendrequest", e);
+ logger.debug("IOException in sendrequest", e);
}
}
if (null != method) {
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java
index 3108adaa53..4f02fe2ec0 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -58,8 +60,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
public abstract class AbstractSdncOperationTask extends BaseTask {
private static final Logger logger = LoggerFactory.getLogger(AbstractSdncOperationTask.class);
- protected static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA, AbstractSdncOperationTask.class);
-
+
@Autowired
private Environment env;
private static final String DEFAULT_MSB_IP = "127.0.0.1";
@@ -282,7 +283,9 @@ public abstract class AbstractSdncOperationTask extends BaseTask {
} catch (Exception exception) {
logger.info("exception: AbstractSdncOperationTask.updateProgress fail!");
logger.error("exception: AbstractSdncOperationTask.updateProgress fail:", exception);
- msoLogger.error(MessageEnum.GENERAL_EXCEPTION, " updateProgress catch exception: ", "", this.getTaskName(), MsoLogger.ErrorCode.UnknownError, exception.getClass().toString());
+ logger.error("{} {} {} {} {}", MessageEnum.GENERAL_EXCEPTION.toString(),
+ " updateProgress catch exception: ", this.getTaskName(),
+ MsoLogger.ErrorCode.UnknownError.getValue(), exception.getClass().toString());
}
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncNetworkTopologyOperationTask.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncNetworkTopologyOperationTask.java
index 3ef1410425..a5c609dc2a 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncNetworkTopologyOperationTask.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncNetworkTopologyOperationTask.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -41,7 +43,7 @@ import org.springframework.stereotype.Component;
@Component
public class SdncNetworkTopologyOperationTask extends AbstractSdncOperationTask {
- private static final Logger sdncLogger = LoggerFactory.getLogger(SdncNetworkTopologyOperationTask.class);
+ private static final Logger logger = LoggerFactory.getLogger(SdncNetworkTopologyOperationTask.class);
private static final String URL = "/restconf/operations/GENERIC-RESOURCE-API:network-topology-operation";
@@ -50,7 +52,7 @@ public class SdncNetworkTopologyOperationTask extends AbstractSdncOperationTask
public void sendRestrequestAndHandleResponse(DelegateExecution execution,
Map<String, String> inputs,
GenericResourceApi genericResourceApiClient) throws Exception {
- sdncLogger.info("SdncNetworkTopologyOperationTask.sendRestrequestAndHandleResponse begin!");
+ logger.info("SdncNetworkTopologyOperationTask.sendRestrequestAndHandleResponse begin!");
updateProgress(execution, RequestsDbConstant.Status.PROCESSING, null, "40", "sendRestrequestAndHandleResponse begin!");
NetworkRpcInputEntityBuilder builder = new NetworkRpcInputEntityBuilder();
RpcNetworkTopologyOperationInputEntity inputEntity = builder.build(execution, inputs);
@@ -65,25 +67,25 @@ public class SdncNetworkTopologyOperationTask extends AbstractSdncOperationTask
send2SdncDirectly(HeaderUtil.DefaulAuth, inputEntity);
}
updateProgress(execution, RequestsDbConstant.Status.FINISHED, null, RequestsDbConstant.Progress.ONE_HUNDRED, "execute finished!");
- sdncLogger.info("SdncNetworkTopologyOperationTask.sendRestrequestAndHandleResponse end!");
+ logger.info("SdncNetworkTopologyOperationTask.sendRestrequestAndHandleResponse end!");
}
private void send2SdncDirectly(String defaulAuth,
RpcNetworkTopologyOperationInputEntity inputEntity) throws RouteException {
- sdncLogger.info("SdncNetworkTopologyOperationTask.send2SdncDirectly begin!");
+ logger.info("SdncNetworkTopologyOperationTask.send2SdncDirectly begin!");
String url = "http://" + getSdncIp() + ":" + getSdncPort() + URL;
HttpPost httpPost = new HttpPost(url);
httpPost.addHeader("Authorization", defaulAuth);
httpPost.addHeader("Content-type", "application/json");
String postBody = getPostbody(inputEntity);
- msoLogger.info(MessageEnum.RA_SEND_REQUEST_SDNC, postBody, "SDNC", "");
+ logger.info("{} {} {}", MessageEnum.RA_SEND_REQUEST_SDNC, postBody, "SDNC");
httpPost.setEntity(new StringEntity(postBody, ContentType.APPLICATION_XML));
httpPost(url, httpPost);
- sdncLogger.info("SdncNetworkTopologyOperationTask.send2SdncDirectly end!");
+ logger.info("SdncNetworkTopologyOperationTask.send2SdncDirectly end!");
}
private void saveOutput(DelegateExecution execution, RpcNetworkTopologyOperationOutputEntity output) throws RouteException {
- sdncLogger.info("SdncNetworkTopologyOperationTask.saveOutput begin!");
+ logger.info("SdncNetworkTopologyOperationTask.saveOutput begin!");
String responseCode = output.getOutput().getResponseCode();
if (!"200".equals(responseCode)) {
String processKey = getProcessKey(execution);
@@ -92,11 +94,11 @@ public class SdncNetworkTopologyOperationTask extends AbstractSdncOperationTask
WorkflowException workflowException = new WorkflowException(processKey, errorCode, errorMessage);
execution.setVariable("SDNCA_SuccessIndicator", workflowException);
updateProgress(execution, RequestsDbConstant.Status.ERROR, String.valueOf(errorCode), "100", errorMessage);
- sdncLogger.info("exception: SdncNetworkTopologyOperationTask.saveOutput fail!");
+ logger.info("exception: SdncNetworkTopologyOperationTask.saveOutput fail!");
throw new RouteException();
}
- sdncLogger.info("SdncNetworkTopologyOperationTask.saveOutput end!");
+ logger.info("SdncNetworkTopologyOperationTask.saveOutput end!");
}
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncServiceTopologyOperationTask.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncServiceTopologyOperationTask.java
index dc625d35c3..2fd550dbb8 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncServiceTopologyOperationTask.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncServiceTopologyOperationTask.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -42,7 +44,7 @@ import org.springframework.stereotype.Component;
@Component
public class SdncServiceTopologyOperationTask extends AbstractSdncOperationTask {
- private static final Logger sdncLogger = LoggerFactory.getLogger(SdncServiceTopologyOperationTask.class);
+ private static final Logger logger = LoggerFactory.getLogger(SdncServiceTopologyOperationTask.class);
private static final String URL = "/restconf/operations/GENERIC-RESOURCE-API:service-topology-operation";
@@ -51,7 +53,7 @@ public class SdncServiceTopologyOperationTask extends AbstractSdncOperationTask
public void sendRestrequestAndHandleResponse(DelegateExecution execution,
Map<String, String> inputs,
GenericResourceApi genericResourceApiClient) throws Exception {
- sdncLogger.info("SdncServiceTopologyOperationTask.sendRestrequestAndHandleResponse begin!");
+ logger.info("SdncServiceTopologyOperationTask.sendRestrequestAndHandleResponse begin!");
updateProgress(execution, null, null, "40", "sendRestrequestAndHandleResponse begin!");
ServiceRpcInputEntityBuilder builder = new ServiceRpcInputEntityBuilder();
RpcServiceTopologyOperationInputEntity inputEntity = builder.build(execution, inputs);
@@ -65,26 +67,26 @@ public class SdncServiceTopologyOperationTask extends AbstractSdncOperationTask
} else {
send2SdncDirectly(HeaderUtil.DefaulAuth, inputEntity);
}
- sdncLogger.info("SdncServiceTopologyOperationTask.sendRestrequestAndHandleResponse end!");
+ logger.info("SdncServiceTopologyOperationTask.sendRestrequestAndHandleResponse end!");
}
private void send2SdncDirectly(String defaulAuth,
RpcServiceTopologyOperationInputEntity inputEntity) throws RouteException {
- sdncLogger.info("SdncServiceTopologyOperationTask.send2SdncDirectly begin!");
+ logger.info("SdncServiceTopologyOperationTask.send2SdncDirectly begin!");
String url = getSdncHost() + URL;
HttpPost httpPost = new HttpPost(url);
httpPost.addHeader("Authorization", defaulAuth);
httpPost.addHeader("Content-type", "application/json");
String postBody = getPostbody(inputEntity);
- msoLogger.info(MessageEnum.RA_SEND_REQUEST_SDNC, postBody, "SDNC", "");
+ logger.info("{} {} {}", MessageEnum.RA_SEND_REQUEST_SDNC, postBody, "SDNC");
httpPost.setEntity(new StringEntity(postBody, ContentType.APPLICATION_XML));
httpPost(url, httpPost);
- sdncLogger.info("SdncServiceTopologyOperationTask.send2SdncDirectly end!");
+ logger.info("SdncServiceTopologyOperationTask.send2SdncDirectly end!");
}
private void saveOutput(DelegateExecution execution, RpcServiceTopologyOperationOutputEntity output) throws Exception {
- sdncLogger.info("SdncServiceTopologyOperationTask.saveOutput begin!");
+ logger.info("SdncServiceTopologyOperationTask.saveOutput begin!");
String responseCode = output.getOutput().getResponseCode();
if (!"200".equals(responseCode)) {
String processKey = getProcessKey(execution);
@@ -93,9 +95,9 @@ public class SdncServiceTopologyOperationTask extends AbstractSdncOperationTask
WorkflowException workflowException = new WorkflowException(processKey, errorCode, errorMessage);
execution.setVariable("SDNCA_SuccessIndicator", workflowException);
updateProgress(execution, RequestsDbConstant.Status.ERROR, String.valueOf(errorCode), null, errorMessage);
- sdncLogger.info("exception: SdncServiceTopologyOperationTask.saveOutput fail!");
+ logger.info("exception: SdncServiceTopologyOperationTask.saveOutput fail!");
throw new RouteException();
}
- sdncLogger.info("SdncServiceTopologyOperationTask.saveOutput end!");
+ logger.info("SdncServiceTopologyOperationTask.saveOutput end!");
}
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncUnderlayVpnOperationClient.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncUnderlayVpnOperationClient.java
index b13d7fc419..f54d6692d6 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncUnderlayVpnOperationClient.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncUnderlayVpnOperationClient.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -31,8 +33,9 @@ import org.onap.so.bpmn.infrastructure.workflow.serviceTask.client.builder.Netwo
import org.onap.so.bpmn.infrastructure.workflow.serviceTask.client.entity.RpcNetworkTopologyOperationInputEntity;
import org.onap.so.db.request.beans.ResourceOperationStatus;
import org.onap.so.db.request.beans.ResourceOperationStatusId;
-import org.onap.so.logger.MsoLogger;
import org.onap.so.requestsdb.RequestsDbConstant;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
@Component
@@ -41,7 +44,7 @@ public class SdncUnderlayVpnOperationClient {
private static final String DEFAULT_MSB_IP = "127.0.0.1";
private static final int DEFAULT_MSB_PORT = 10081;
- private static MsoLogger logger = MsoLogger.getMsoLogger(MsoLogger.Catalog.GENERAL, SdncUnderlayVpnOperationClient.class);
+ private static Logger logger = LoggerFactory.getLogger(SdncUnderlayVpnOperationClient.class);
public boolean excute(String msbIp,
int msbPort,
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 8507d9c092..b0ff82e3aa 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
@@ -37,9 +37,9 @@ public class CancelDmaapSubscriptionTest {
DmaapClientTestImpl dmaapClientTest = new DmaapClientTestImpl();
delegate.setDmaapClient(dmaapClientTest);
DelegateExecution delegateExecution = mock(DelegateExecution.class);
- when(delegateExecution.getVariable(eq(ExecutionVariableNames.CORRELATION_ID))).thenReturn("testCorrelationId");
+ when(delegateExecution.getVariable(eq(ExecutionVariableNames.PNF_CORRELATION_ID))).thenReturn("testPnfCorrelationId");
when(delegateExecution.getProcessBusinessKey()).thenReturn("testBusinessKey");
- dmaapClientTest.registerForUpdate("testCorrelationId", () -> {
+ dmaapClientTest.registerForUpdate("testPnfCorrelationId", () -> {
});
// when
delegate.execute(delegateExecution);
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CheckAaiForCorrelationIdDelegateTest.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CheckAaiForPnfCorrelationIdDelegateTest.java
index 4b47ed6407..6a0aaf776e 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CheckAaiForCorrelationIdDelegateTest.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CheckAaiForPnfCorrelationIdDelegateTest.java
@@ -28,7 +28,7 @@ import static org.mockito.Mockito.when;
import static org.onap.so.bpmn.infrastructure.pnf.delegate.PnfManagementTestImpl.ID_WITHOUT_ENTRY;
import static org.onap.so.bpmn.infrastructure.pnf.delegate.PnfManagementTestImpl.ID_WITH_ENTRY;
import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.AAI_CONTAINS_INFO_ABOUT_PNF;
-import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.CORRELATION_ID;
+import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.PNF_CORRELATION_ID;
import org.camunda.bpm.engine.delegate.BpmnError;
import org.camunda.bpm.engine.delegate.DelegateExecution;
@@ -41,26 +41,26 @@ import org.junit.runner.RunWith;
import org.onap.so.bpmn.core.WorkflowException;
@RunWith(Enclosed.class)
-public class CheckAaiForCorrelationIdDelegateTest {
+public class CheckAaiForPnfCorrelationIdDelegateTest {
public static class ConnectionOkTests {
- private CheckAaiForCorrelationIdDelegate delegate;
+ private CheckAaiForPnfCorrelationIdDelegate delegate;
@Rule
public ExpectedException expectedException = ExpectedException.none();
@Before
public void setUp() {
- delegate = new CheckAaiForCorrelationIdDelegate();
+ delegate = new CheckAaiForPnfCorrelationIdDelegate();
delegate.setPnfManagement(new PnfManagementTestImpl());
}
@Test
- public void shouldThrowExceptionWhenCorrelationIdIsNotSet() throws Exception {
+ public void shouldThrowExceptionWhenPnfCorrelationIdIsNotSet() throws Exception {
// given
DelegateExecution execution = mock(DelegateExecution.class);
- when(execution.getVariable(CORRELATION_ID)).thenReturn(null);
+ when(execution.getVariable(PNF_CORRELATION_ID)).thenReturn(null);
when(execution.getVariable("testProcessKey")).thenReturn("testProcessKeyValue");
// when, then
expectedException.expect(BpmnError.class);
@@ -72,7 +72,7 @@ public class CheckAaiForCorrelationIdDelegateTest {
public void shouldSetCorrectVariablesWhenAaiDoesNotContainInfoAboutPnf() throws Exception {
// given
DelegateExecution execution = mock(DelegateExecution.class);
- when(execution.getVariable(CORRELATION_ID)).thenReturn(ID_WITHOUT_ENTRY);
+ when(execution.getVariable(PNF_CORRELATION_ID)).thenReturn(ID_WITHOUT_ENTRY);
// when
delegate.execute(execution);
// then
@@ -83,7 +83,7 @@ public class CheckAaiForCorrelationIdDelegateTest {
public void shouldSetCorrectVariablesWhenAaiContainsInfoAboutPnfWithoutIp() throws Exception {
// given
DelegateExecution execution = mock(DelegateExecution.class);
- when(execution.getVariable(CORRELATION_ID)).thenReturn(ID_WITH_ENTRY);
+ when(execution.getVariable(PNF_CORRELATION_ID)).thenReturn(ID_WITH_ENTRY);
// when
delegate.execute(execution);
// then
@@ -93,14 +93,14 @@ public class CheckAaiForCorrelationIdDelegateTest {
public static class NoConnectionTests {
- private CheckAaiForCorrelationIdDelegate delegate;
+ private CheckAaiForPnfCorrelationIdDelegate delegate;
@Rule
public ExpectedException expectedException = ExpectedException.none();
@Before
public void setUp() {
- delegate = new CheckAaiForCorrelationIdDelegate();
+ delegate = new CheckAaiForPnfCorrelationIdDelegate();
delegate.setPnfManagement(new PnfManagementThrowingException());
}
@@ -108,7 +108,7 @@ public class CheckAaiForCorrelationIdDelegateTest {
public void shouldThrowExceptionWhenIoExceptionOnConnectionToAai() throws Exception {
// given
DelegateExecution execution = mock(DelegateExecution.class);
- when(execution.getVariable(CORRELATION_ID)).thenReturn(ID_WITH_ENTRY);
+ when(execution.getVariable(PNF_CORRELATION_ID)).thenReturn(ID_WITH_ENTRY);
when(execution.getVariable("testProcessKey")).thenReturn("testProcessKey");
// when, then
expectedException.expect(BpmnError.class);
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreatePnfEntryInAaiDelegateTest.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreatePnfEntryInAaiDelegateTest.java
index 9c5f8f3fc4..986edfeecf 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreatePnfEntryInAaiDelegateTest.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreatePnfEntryInAaiDelegateTest.java
@@ -25,7 +25,7 @@ import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.BDDMockito.given;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.mock;
-import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.CORRELATION_ID;
+import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.PNF_CORRELATION_ID;
import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.PNF_UUID;
import java.util.UUID;
@@ -43,14 +43,14 @@ public class CreatePnfEntryInAaiDelegateTest {
PnfManagementTestImpl pnfManagementTest = new PnfManagementTestImpl();
delegate.setPnfManagement(pnfManagementTest);
DelegateExecution execution = mock(DelegateExecution.class);
- given(execution.getVariable(eq(CORRELATION_ID))).willReturn("testCorrelationId");
+ given(execution.getVariable(eq(PNF_CORRELATION_ID))).willReturn("testPnfCorrelationId");
given(execution.getVariable(eq(PNF_UUID))).willReturn(pnfUuid);
// when
delegate.execute(execution);
// then
- Pnf createdEntry = pnfManagementTest.getCreated().get("testCorrelationId");
+ Pnf createdEntry = pnfManagementTest.getCreated().get("testPnfCorrelationId");
assertThat(createdEntry.getPnfId()).isEqualTo(pnfUuid);
- assertThat(createdEntry.getPnfName()).isEqualTo("testCorrelationId");
+ assertThat(createdEntry.getPnfName()).isEqualTo("testPnfCorrelationId");
assertThat(createdEntry.isInMaint()).isNull();
}
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateRelationTest.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateRelationTest.java
index 2a78337e34..c743ee7018 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateRelationTest.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateRelationTest.java
@@ -42,7 +42,7 @@ public class CreateRelationTest {
public void setUp() {
executionFake = new DelegateExecutionFake();
executionFake.setVariable("serviceInstanceId", SERVICE_INSTANCE_ID);
- executionFake.setVariable("correlationId", PNF_NAME);
+ executionFake.setVariable("pnfCorrelationId", PNF_NAME);
}
@Test
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 f2a4205ebd..19ba18f6de 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
@@ -25,19 +25,19 @@ import java.util.Objects;
public class DmaapClientTestImpl implements DmaapClient {
- private String correlationId;
+ private String pnfCorrelationId;
private Runnable informConsumer;
@Override
- public void registerForUpdate(String correlationId, Runnable informConsumer) {
- this.correlationId = correlationId;
+ public void registerForUpdate(String pnfCorrelationId, Runnable informConsumer) {
+ this.pnfCorrelationId = pnfCorrelationId;
this.informConsumer = informConsumer;
}
@Override
- public Runnable unregister(String correlationId) {
- if (Objects.equals(this.correlationId, correlationId)) {
- this.correlationId = null;
+ public Runnable unregister(String pnfCorrelationId) {
+ if (Objects.equals(this.pnfCorrelationId, pnfCorrelationId)) {
+ this.pnfCorrelationId = null;
Runnable informConsumer = this.informConsumer;
this.informConsumer = null;
return informConsumer;
@@ -45,8 +45,8 @@ public class DmaapClientTestImpl implements DmaapClient {
return null;
}
- public String getCorrelationId() {
- return correlationId;
+ public String getPnfCorrelationId() {
+ return pnfCorrelationId;
}
public Runnable getInformConsumer() {
@@ -58,6 +58,6 @@ public class DmaapClientTestImpl implements DmaapClient {
}
public boolean haveRegisteredConsumer() {
- return correlationId != null;
+ 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 23c82229fe..eb9f657d4f 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
@@ -55,7 +55,7 @@ public class InformDmaapClientTest {
// when
informDmaapClient.execute(delegateExecution);
// then
- assertThat(dmaapClientTest.getCorrelationId()).isEqualTo("testCorrelationId");
+ assertThat(dmaapClientTest.getPnfCorrelationId()).isEqualTo("testPnfCorrelationId");
assertThat(dmaapClientTest.getInformConsumer()).isNotNull();
verifyZeroInteractions(messageCorrelationBuilder);
}
@@ -66,7 +66,7 @@ public class InformDmaapClientTest {
informDmaapClient.execute(delegateExecution);
dmaapClientTest.getInformConsumer().run();
// then
- assertThat(dmaapClientTest.getCorrelationId()).isEqualTo("testCorrelationId");
+ assertThat(dmaapClientTest.getPnfCorrelationId()).isEqualTo("testPnfCorrelationId");
InOrder inOrder = inOrder(messageCorrelationBuilder);
inOrder.verify(messageCorrelationBuilder).processInstanceBusinessKey("testBusinessKey");
inOrder.verify(messageCorrelationBuilder).correlateWithResult();
@@ -74,7 +74,7 @@ public class InformDmaapClientTest {
private DelegateExecution mockDelegateExecution() {
DelegateExecution delegateExecution = mock(DelegateExecution.class);
- when(delegateExecution.getVariable(eq(ExecutionVariableNames.CORRELATION_ID))).thenReturn("testCorrelationId");
+ when(delegateExecution.getVariable(eq(ExecutionVariableNames.PNF_CORRELATION_ID))).thenReturn("testPnfCorrelationId");
when(delegateExecution.getProcessBusinessKey()).thenReturn("testBusinessKey");
ProcessEngineServices processEngineServices = mock(ProcessEngineServices.class);
when(delegateExecution.getProcessEngineServices()).thenReturn(processEngineServices);
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputsTest.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputsTest.java
index 80693d7ce6..001815b206 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputsTest.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputsTest.java
@@ -21,7 +21,7 @@
package org.onap.so.bpmn.infrastructure.pnf.delegate;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
-import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.CORRELATION_ID;
+import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.PNF_CORRELATION_ID;
import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.PNF_UUID;
import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.SERVICE_INSTANCE_ID;
@@ -39,7 +39,7 @@ public class PnfCheckInputsTest {
private static final String VALID_UUID = UUID.nameUUIDFromBytes("testUuid".getBytes()).toString();
private static final String RESERVED_UUID = new UUID(0, 0).toString();
private static final String DEFAULT_SERVICE_INSTANCE_ID = "da7d07d9-b71c-4128-809d-2ec01c807169";
- private static final String DEFAULT_CORRELATION_ID = "testCorrelationId";
+ private static final String DEFAULT_PNF_CORRELATION_ID = "testPnfCorrelationId";
private DelegateExecutionBuilder delegateExecutionBuilder;
@@ -49,9 +49,9 @@ public class PnfCheckInputsTest {
}
@Test
- public void shouldThrowException_whenCorrelationIdNotSet() {
+ public void shouldThrowException_whenPnfCorrelationIdNotSet() {
PnfCheckInputs testedObject = new PnfCheckInputs(PNF_ENTRY_NOTIFICATION_TIMEOUT);
- DelegateExecution execution = delegateExecutionBuilder.setCorrelationId(null).setPnfUuid(VALID_UUID).build();
+ DelegateExecution execution = delegateExecutionBuilder.setPnfCorrelationId(null).setPnfUuid(VALID_UUID).build();
assertThatThrownBy(() -> testedObject.execute(execution)).isInstanceOf(BpmnError.class);
}
@@ -98,12 +98,12 @@ public class PnfCheckInputsTest {
}
private static class DelegateExecutionBuilder {
- private String correlationId = DEFAULT_CORRELATION_ID;
+ private String pnfCorrelationId = DEFAULT_PNF_CORRELATION_ID;
private String pnfUuid = VALID_UUID;
private String serviceInstanceId = DEFAULT_SERVICE_INSTANCE_ID;
- public DelegateExecutionBuilder setCorrelationId(String correlationId) {
- this.correlationId = correlationId;
+ public DelegateExecutionBuilder setPnfCorrelationId(String pnfCorrelationId) {
+ this.pnfCorrelationId = pnfCorrelationId;
return this;
}
@@ -120,7 +120,7 @@ public class PnfCheckInputsTest {
public DelegateExecution build() {
DelegateExecution execution = new DelegateExecutionFake();
execution.setVariable("testProcessKey", "testProcessKeyValue");
- execution.setVariable(CORRELATION_ID, this.correlationId);
+ execution.setVariable(PNF_CORRELATION_ID, this.pnfCorrelationId);
execution.setVariable(PNF_UUID, this.pnfUuid);
execution.setVariable(SERVICE_INSTANCE_ID, this.serviceInstanceId);
return execution;
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfManagementTestImpl.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfManagementTestImpl.java
index 1377c8295f..3a9d6d0055 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfManagementTestImpl.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfManagementTestImpl.java
@@ -37,8 +37,8 @@ public class PnfManagementTestImpl implements PnfManagement {
private Map<String, Pnf> created = new HashMap<>();
@Override
- public Optional<Pnf> getEntryFor(String correlationId) {
- if (Objects.equals(correlationId, ID_WITH_ENTRY)) {
+ public Optional<Pnf> getEntryFor(String pnfCorrelationId) {
+ if (Objects.equals(pnfCorrelationId, ID_WITH_ENTRY)) {
return Optional.of(new Pnf());
} else {
return Optional.empty();
@@ -46,8 +46,8 @@ public class PnfManagementTestImpl implements PnfManagement {
}
@Override
- public void createEntry(String correlationId, Pnf entry) throws IOException {
- created.put(correlationId, entry);
+ public void createEntry(String pnfCorrelationId, Pnf entry) throws IOException {
+ created.put(pnfCorrelationId, entry);
}
@Override
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfManagementThrowingException.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfManagementThrowingException.java
index 43315d3803..f9b467c650 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfManagementThrowingException.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfManagementThrowingException.java
@@ -28,12 +28,12 @@ import org.onap.so.bpmn.infrastructure.pnf.management.PnfManagement;
public class PnfManagementThrowingException implements PnfManagement {
@Override
- public Optional<Pnf> getEntryFor(String correlationId) throws IOException {
+ public Optional<Pnf> getEntryFor(String pnfCorrelationId) throws IOException {
throw new IOException();
}
@Override
- public void createEntry(String correlationId, Pnf entry) throws IOException {
+ public void createEntry(String pnfCorrelationId, Pnf entry) throws IOException {
throw new IOException();
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/JsonUtilForCorrelationIdTest.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/JsonUtilForPnfCorrelationIdTest.java
index fde112b009..02a6f20992 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/JsonUtilForCorrelationIdTest.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/JsonUtilForPnfCorrelationIdTest.java
@@ -27,40 +27,40 @@ import static org.assertj.core.api.Assertions.assertThat;
import java.util.List;
import org.junit.Test;
-public class JsonUtilForCorrelationIdTest {
+public class JsonUtilForPnfCorrelationIdTest {
- private static final String JSON_EXAMPLE_WITH_CORRELATION_ID = "[{\"correlationId\": \"corrTest1\","
- + "\"key1\":\"value1\"},{\"correlationId\": \"corrTest2\",\"key2\":\"value2\"}]";
+ private static final String JSON_EXAMPLE_WITH_PNF_CORRELATION_ID = "[{\"pnfCorrelationId\": \"corrTest1\","
+ + "\"key1\":\"value1\"},{\"pnfCorrelationId\": \"corrTest2\",\"key2\":\"value2\"}]";
- private static final String JSON_WITH_ONE_CORRELATION_ID = "[{\"correlationId\":\"corrTest3\"}]";
+ private static final String JSON_WITH_ONE_PNF_CORRELATION_ID = "[{\"pnfCorrelationId\":\"corrTest3\"}]";
- private static final String JSON_WITH_TWO_CORRELATION_ID_AND_ESCAPED_CHARACTERS =
- "[\"{\\\"correlationId\\\":\\\"corrTest4\\\"}\", \"{\\\"correlationId\\\":\\\"corrTest5\\\"}\"]";
+ private static final String JSON_WITH_TWO_PNF_CORRELATION_ID_AND_ESCAPED_CHARACTERS =
+ "[\"{\\\"pnfCorrelationId\\\":\\\"corrTest4\\\"}\", \"{\\\"pnfCorrelationId\\\":\\\"corrTest5\\\"}\"]";
- private static final String JSON_WITH_NO_CORRELATION_ID = "[{\"key1\":\"value1\"}]";
+ private static final String JSON_WITH_NO_PNF_CORRELATION_ID = "[{\"key1\":\"value1\"}]";
@Test
public void parseJsonSuccessful() {
- List<String> expectedResult = JsonUtilForCorrelationId
- .parseJsonToGelAllCorrelationId(JSON_EXAMPLE_WITH_CORRELATION_ID);
+ List<String> expectedResult = JsonUtilForPnfCorrelationId
+ .parseJsonToGelAllPnfCorrelationId(JSON_EXAMPLE_WITH_PNF_CORRELATION_ID);
assertThat(expectedResult).containsExactly("corrTest1", "corrTest2");
- List<String> expectedResult2 = JsonUtilForCorrelationId
- .parseJsonToGelAllCorrelationId(JSON_WITH_ONE_CORRELATION_ID);
+ List<String> expectedResult2 = JsonUtilForPnfCorrelationId
+ .parseJsonToGelAllPnfCorrelationId(JSON_WITH_ONE_PNF_CORRELATION_ID);
assertThat(expectedResult2).containsExactly("corrTest3");
}
@Test
public void parseJsonWithEscapeCharacters_Successful() {
- List<String> expectedResult = JsonUtilForCorrelationId
- .parseJsonToGelAllCorrelationId(JSON_WITH_TWO_CORRELATION_ID_AND_ESCAPED_CHARACTERS);
+ List<String> expectedResult = JsonUtilForPnfCorrelationId
+ .parseJsonToGelAllPnfCorrelationId(JSON_WITH_TWO_PNF_CORRELATION_ID_AND_ESCAPED_CHARACTERS);
assertThat(expectedResult).containsExactly("corrTest4", "corrTest5");
}
@Test
public void parseJson_emptyListReturnedWhenNothingFound() {
- List<String> expectedResult = JsonUtilForCorrelationId
- .parseJsonToGelAllCorrelationId(JSON_WITH_NO_CORRELATION_ID);
+ List<String> expectedResult = JsonUtilForPnfCorrelationId
+ .parseJsonToGelAllPnfCorrelationId(JSON_WITH_NO_PNF_CORRELATION_ID);
assertThat(expectedResult).isEmpty();
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClientTest.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClientTest.java
index b30239d9c0..078c2f7784 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClientTest.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClientTest.java
@@ -56,12 +56,12 @@ import org.springframework.core.env.Environment;
@RunWith(MockitoJUnitRunner.class)
public class PnfEventReadyDmaapClientTest {
- private static final String CORRELATION_ID = "corrTestId";
- private static final String CORRELATION_ID_NOT_FOUND_IN_MAP = "otherCorrId";
- private static final String JSON_EXAMPLE_WITH_CORRELATION_ID = "[{\"correlationId\": \"%s\","
- + "\"value\":\"value1\"},{\"correlationId\": \"corr\",\"value\":\"value2\"}]";
+ private static final String PNF_CORRELATION_ID = "corrTestId";
+ private static final String PNF_CORRELATION_ID_NOT_FOUND_IN_MAP = "otherCorrId";
+ private static final String JSON_EXAMPLE_WITH_PNF_CORRELATION_ID = "[{\"pnfCorrelationId\": \"%s\","
+ + "\"value\":\"value1\"},{\"pnfCorrelationId\": \"corr\",\"value\":\"value2\"}]";
- private static final String JSON_EXAMPLE_WITH_NO_CORRELATION_ID = "[{\"key1\":\"value1\"}]";
+ private static final String JSON_EXAMPLE_WITH_NO_PNF_CORRELATION_ID = "[{\"key1\":\"value1\"}]";
private static final String HOST = "hostTest";
private static final int PORT = 1234;
@@ -108,10 +108,10 @@ public class PnfEventReadyDmaapClientTest {
* empty) and shutdown the executor because of empty map
*/
@Test
- public void correlationIdIsFoundInHttpResponse_notifyAboutPnfReady()
+ public void pnfCorrelationIdIsFoundInHttpResponse_notifyAboutPnfReady()
throws IOException {
when(httpClientMock.execute(any(HttpGet.class))).
- thenReturn(createResponse(String.format(JSON_EXAMPLE_WITH_CORRELATION_ID, CORRELATION_ID)));
+ thenReturn(createResponse(String.format(JSON_EXAMPLE_WITH_PNF_CORRELATION_ID, PNF_CORRELATION_ID)));
testedObjectInnerClassThread.run();
ArgumentCaptor<HttpGet> captor1 = ArgumentCaptor.forClass(HttpGet.class);
verify(httpClientMock).execute(captor1.capture());
@@ -128,16 +128,16 @@ public class PnfEventReadyDmaapClientTest {
/**
* Test run method, where the are following conditions:
* <p> - DmaapThreadListener is running, flag is set to true
- * <p> - map is filled with one entry with the correlationId that does not match to correlationId
+ * <p> - map is filled with one entry with the pnfCorrelationId that does not match to pnfCorrelationId
* taken from http response. run method should not do anything with the map not run any thread to notify camunda
* process
*/
@Test
- public void correlationIdIsFoundInHttpResponse_NotFoundInMap()
+ public void pnfCorrelationIdIsFoundInHttpResponse_NotFoundInMap()
throws IOException {
when(httpClientMock.execute(any(HttpGet.class))).
thenReturn(createResponse(
- String.format(JSON_EXAMPLE_WITH_CORRELATION_ID, CORRELATION_ID_NOT_FOUND_IN_MAP)));
+ String.format(JSON_EXAMPLE_WITH_PNF_CORRELATION_ID, PNF_CORRELATION_ID_NOT_FOUND_IN_MAP)));
testedObjectInnerClassThread.run();
verifyZeroInteractions(threadMockToNotifyCamundaFlow, executorMock);
}
@@ -145,13 +145,13 @@ public class PnfEventReadyDmaapClientTest {
/**
* Test run method, where the are following conditions:
* <p> - DmaapThreadListener is running, flag is set to true
- * <p> - map is filled with one entry with the correlationId but no correlation id is taken from HttpResponse
+ * <p> - map is filled with one entry with the pnfCorrelationId but no correlation id is taken from HttpResponse
* run method should not do anything with the map and not run any thread to notify camunda process
*/
@Test
- public void correlationIdIsNotFoundInHttpResponse() throws IOException {
+ public void pnfCorrelationIdIsNotFoundInHttpResponse() throws IOException {
when(httpClientMock.execute(any(HttpGet.class))).
- thenReturn(createResponse(JSON_EXAMPLE_WITH_NO_CORRELATION_ID));
+ thenReturn(createResponse(JSON_EXAMPLE_WITH_NO_PNF_CORRELATION_ID));
testedObjectInnerClassThread.run();
verifyZeroInteractions(threadMockToNotifyCamundaFlow, executorMock);
}
@@ -171,7 +171,7 @@ public class PnfEventReadyDmaapClientTest {
.getDeclaredField("pnfCorrelationIdToThreadMap");
pnfCorrelationToThreadMapField.setAccessible(true);
Map<String, Runnable> pnfCorrelationToThreadMap = new ConcurrentHashMap<>();
- pnfCorrelationToThreadMap.put(CORRELATION_ID, threadMockToNotifyCamundaFlow);
+ pnfCorrelationToThreadMap.put(PNF_CORRELATION_ID, threadMockToNotifyCamundaFlow);
pnfCorrelationToThreadMapField.set(testedObject, pnfCorrelationToThreadMap);
Field threadRunFlag = testedObject.getClass().getDeclaredField("dmaapThreadListenerIsRunning");
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateAndActivatePnfResource.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateAndActivatePnfResource.bpmn
index 5defe2121b..8ffa32e10d 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateAndActivatePnfResource.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateAndActivatePnfResource.bpmn
@@ -5,8 +5,8 @@
<bpmn:participant id="Participant_0atuyq0" name="AAI" />
<bpmn:participant id="Participant_19w87ws" name="Workflow Message Service&#10;(communication with DMAAP)&#10;" />
<bpmn:messageFlow id="MessageFlow_1h3xu88" sourceRef="CreatePnfEntryInAai" targetRef="Participant_0atuyq0" />
- <bpmn:messageFlow id="MessageFlow_09ibv5a" sourceRef="CheckAiiForCorrelationId" targetRef="Participant_0atuyq0" />
- <bpmn:messageFlow id="MessageFlow_0vjul4t" sourceRef="Participant_0atuyq0" targetRef="CheckAiiForCorrelationId" />
+ <bpmn:messageFlow id="MessageFlow_09ibv5a" sourceRef="CheckAiiForPnfCorrelationId" targetRef="Participant_0atuyq0" />
+ <bpmn:messageFlow id="MessageFlow_0vjul4t" sourceRef="Participant_0atuyq0" targetRef="CheckAiiForPnfCorrelationId" />
<bpmn:messageFlow id="MessageFlow_1vrcp2d" sourceRef="Participant_19w87ws" targetRef="WaitForDmaapPnfReadyNotification" />
<bpmn:messageFlow id="MessageFlow_0tg4hw9" sourceRef="InformDmaapClient" targetRef="Participant_19w87ws" />
<bpmn:messageFlow id="MessageFlow_1py54jr" sourceRef="CancelDmaapClientSubscription" targetRef="Participant_19w87ws" />
@@ -20,13 +20,13 @@
<bpmn:sequenceFlow id="SequenceFlow_0p09qgm" sourceRef="WaitForDmaapPnfReadyNotification" targetRef="CreateRelationId" />
<bpmn:sequenceFlow id="SequenceFlow_17s9025" sourceRef="AaiEntryExists" targetRef="InformDmaapClient" />
<bpmn:sequenceFlow id="SequenceFlow_1qr6cmf" sourceRef="CreatePnfEntryInAai" targetRef="AaiEntryExists" />
- <bpmn:sequenceFlow id="SequenceFlow_1j4r3zt" sourceRef="CheckAiiForCorrelationId" targetRef="DoesAaiContainInfoAboutPnf" />
+ <bpmn:sequenceFlow id="SequenceFlow_1j4r3zt" sourceRef="CheckAiiForPnfCorrelationId" targetRef="DoesAaiContainInfoAboutPnf" />
<bpmn:sequenceFlow id="SequenceFlow_0j5ksz1" sourceRef="CreateAndActivatePnf_StartEvent" targetRef="CheckInputs" />
<bpmn:sequenceFlow id="SequenceFlow_1miyzfe" sourceRef="CancelDmaapClientSubscription" targetRef="ThrowTimeoutException" />
<bpmn:sequenceFlow id="SequenceFlow_1l1t6ak" name="Yes" sourceRef="DoesAaiContainInfoAboutPnf" targetRef="AaiEntryExists">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{aaiContainsInfoAboutPnf}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
- <bpmn:sequenceFlow id="SequenceFlow_0967g8p" sourceRef="CheckInputs" targetRef="CheckAiiForCorrelationId" />
+ <bpmn:sequenceFlow id="SequenceFlow_0967g8p" sourceRef="CheckInputs" targetRef="CheckAiiForPnfCorrelationId" />
<bpmn:serviceTask id="CheckInputs" name="Check inputs" camunda:delegateExpression="${PnfCheckInputs}">
<bpmn:incoming>SequenceFlow_0j5ksz1</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0967g8p</bpmn:outgoing>
@@ -48,7 +48,7 @@
<bpmn:outgoing>SequenceFlow_1l1t6ak</bpmn:outgoing>
<bpmn:outgoing>SequenceFlow_0v5ffpe</bpmn:outgoing>
</bpmn:exclusiveGateway>
- <bpmn:serviceTask id="CheckAiiForCorrelationId" name="Check AAI for correlation_id" camunda:delegateExpression="${CheckAaiForCorrelationIdDelegate}">
+ <bpmn:serviceTask id="CheckAiiForPnfCorrelationId" name="Check AAI for pnf_correlation_id" camunda:delegateExpression="${CheckAaiForPnfCorrelationIdDelegate}">
<bpmn:incoming>SequenceFlow_0967g8p</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1j4r3zt</bpmn:outgoing>
</bpmn:serviceTask>
@@ -86,7 +86,7 @@
<bpmn:textAnnotation id="TextAnnotation_1eyzes8">
<bpmn:text><![CDATA[Inputs:
 - timeoutForPnfEntryNotification - String
- - correlationId - String
+ - pnfCorrelationId - String
- uuid - String]]></bpmn:text>
</bpmn:textAnnotation>
</bpmn:process>
@@ -115,7 +115,7 @@
<dc:Bounds x="-80" y="228" width="90" height="20" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ServiceTask_0a5uk9o_di" bpmnElement="CheckAiiForCorrelationId">
+ <bpmndi:BPMNShape id="ServiceTask_0a5uk9o_di" bpmnElement="CheckAiiForPnfCorrelationId">
<dc:Bounds x="219" y="167" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ServiceTask_0iimk5v_di" bpmnElement="CreatePnfEntryInAai">
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustServiceV2.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustServiceV2.bpmn
index 2dbf12717c..22b09966a4 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustServiceV2.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustServiceV2.bpmn
@@ -586,7 +586,7 @@ CreateVcpeResCustService.validateVnfCreate(execution)]]></bpmn2:script>
<bpmn2:callActivity id="Task_14l19kv" name="Create And Activate Pnf Resource" calledElement="CreateAndActivatePnfResource">
<bpmn2:extensionElements>
<camunda:in source="timeoutForPnfEntryNotification" target="timeoutForPnfEntryNotification" />
- <camunda:in source="correlationId" target="correlationId" />
+ <camunda:in source="pnfCorrelationId" target="pnfCorrelationId" />
<camunda:in businessKey="#{execution.processBusinessKey}" />
</bpmn2:extensionElements>
<bpmn2:incoming>SequenceFlow_0gj4vud</bpmn2:incoming>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustService_simplified.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustService_simplified.bpmn
index c8a5cf03cd..9579f770fc 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustService_simplified.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustService_simplified.bpmn
@@ -359,7 +359,7 @@ CreateVcpeResCustService.processDecomposition(execution)</bpmn2:script>
<bpmn2:callActivity id="Task_14l19kv" name="Create And Activate Pnf Resource" calledElement="CreateAndActivatePnfResource">
<bpmn2:extensionElements>
<camunda:in source="timeoutForPnfEntryNotification" target="timeoutForPnfEntryNotification" />
- <camunda:in source="correlationId" target="correlationId" />
+ <camunda:in source="pnfCorrelationId" target="pnfCorrelationId" />
<camunda:in businessKey="#{execution.processBusinessKey}" />
<camunda:in source="pnfUuid" target="pnfUuid" />
<camunda:in source="serviceInstanceId" target="serviceInstanceId" />
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/VnfInPlaceUpdate.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/VnfInPlaceUpdate.bpmn
index 3c42320302..3663badb6e 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/VnfInPlaceUpdate.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/VnfInPlaceUpdate.bpmn
@@ -131,7 +131,7 @@ uvfm.postProcessRollback(execution)]]></bpmn2:script>
</bpmn2:startEvent>
<bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="StartEvent_1" targetRef="PreProcessRequest" />
<bpmn2:sequenceFlow id="SequenceFlow_3" name="no" sourceRef="ExclusiveGateway_18j1ow5" targetRef="ScriptTask_10" />
- <bpmn2:sequenceFlow id="SequenceFlow_053qjfy" sourceRef="Task_1opcb4j" targetRef="Task_0vy2zge" />
+ <bpmn2:sequenceFlow id="SequenceFlow_053qjfy" sourceRef="Task_1opcb4j" targetRef="Task_0op98k0" />
<bpmn2:scriptTask id="Task_1opcb4j" name="Query A&#38;AI for VNF" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_0y0jt4l</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_053qjfy</bpmn2:outgoing>
@@ -169,8 +169,8 @@ uvfm.setVnfInMaintFlagInAAI(execution, false)
]]></bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:scriptTask id="Task_0vy2zge" name="Check If Physical Servers Are Locked in A&#38;AI" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_053qjfy</bpmn2:incoming>
<bpmn2:incoming>SequenceFlow_179tyul</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1us5byg</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_0usxnlk</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
def uvfm = new VnfInPlaceUpdate()
@@ -240,7 +240,7 @@ uvfm.checkIfPserversInMaintInAAI(execution)
<bpmn2:outgoing>SequenceFlow_1c0vdki</bpmn2:outgoing>
<bpmn2:outgoing>SequenceFlow_11o5j55</bpmn2:outgoing>
</bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_1c0vdki" name="no" sourceRef="ExclusiveGateway_1etgtgi" targetRef="Task_0eae8go" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1c0vdki" name="no" sourceRef="ExclusiveGateway_1etgtgi" targetRef="Task_0qa3yfr" />
<bpmn2:exclusiveGateway id="ExclusiveGateway_02tj4dw" name="Error on Upgrade Software?" default="SequenceFlow_162mm0m">
<bpmn2:incoming>SequenceFlow_1uno5rs</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_162mm0m</bpmn2:outgoing>
@@ -295,13 +295,15 @@ uvfm.abortProcessing(execution)]]></bpmn2:script>
<bpmn2:outgoing>SequenceFlow_1quapjx</bpmn2:outgoing>
<bpmn2:outgoing>SequenceFlow_101n488</bpmn2:outgoing>
<bpmn2:outgoing>SequenceFlow_021ah63</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_015qhj5</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1xeh8rb</bpmn2:outgoing>
</bpmn2:exclusiveGateway>
<bpmn2:sequenceFlow id="SequenceFlow_05gpym3" name="Skip" sourceRef="ExclusiveGateway_0xlxgl0" targetRef="ExclusiveGateway_0y82zzx">
<bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("disposition") == "Skip"]]></bpmn2:conditionExpression>
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="SequenceFlow_19ba94v" sourceRef="Task_0eae8go" targetRef="ExclusiveGateway_19an3h2" />
<bpmn2:sequenceFlow id="SequenceFlow_1nlqlwn" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_0ee7wot">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[(execution.getVariable("disposition") == "Skip" && execution.getVariable("workStep") == "QuiesceTraffic") ||
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[(execution.getVariable("disposition") == "Skip" && execution.getVariable("workStep") == "Stop") ||
(execution.getVariable("disposition") == "Retry" && execution.getVariable("workStep") == "Snapshot")]]></bpmn2:conditionExpression>
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="SequenceFlow_1c022sy" sourceRef="ExclusiveGateway_0y82zzx" targetRef="Task_1tg549h" />
@@ -371,15 +373,6 @@ uvfm.checkIfClosedLoopDisabledInAAI(execution)
<bpmn2:sequenceFlow id="SequenceFlow_0zzwdwf" sourceRef="IntermediateThrowEvent_1wdxgjm" targetRef="Task_0e313zv" />
<bpmn2:sequenceFlow id="SequenceFlow_06ajc11" name="no" sourceRef="ExclusiveGateway_0ud5uwa" targetRef="Task_0e313zv" />
<bpmn2:sequenceFlow id="SequenceFlow_179z9vl" sourceRef="Task_0n1d5f2" targetRef="ExclusiveGateway_148eo7w" />
- <bpmn2:scriptTask id="Task_0n1d5f2" name="Set VF Is Closed Loop Disabled Flag in A&#38;AI" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_0du9273</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_032tm9y</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_179z9vl</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
-def uvfm = new VnfInPlaceUpdate()
-uvfm.setClosedLoopDisabledInAAI(execution, true)
-]]></bpmn2:script>
- </bpmn2:scriptTask>
<bpmn2:sequenceFlow id="SequenceFlow_032tm9y" sourceRef="IntermediateThrowEvent_1552q1o" targetRef="Task_0n1d5f2" />
<bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_1552q1o" name="To set Closed Loop Disabled">
<bpmn2:outgoing>SequenceFlow_032tm9y</bpmn2:outgoing>
@@ -434,7 +427,7 @@ uvfm.setClosedLoopDisabledInAAI(execution, true)
<bpmn2:outgoing>SequenceFlow_1fuaq5k</bpmn2:outgoing>
<bpmn2:outgoing>SequenceFlow_04gth9f</bpmn2:outgoing>
</bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_1fuaq5k" name="no" sourceRef="ExclusiveGateway_19an3h2" targetRef="Task_1mdr1nd" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1fuaq5k" name="no" sourceRef="ExclusiveGateway_19an3h2" targetRef="Task_1j68pc1" />
<bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_0a1s69h" name="To SnapShot">
<bpmn2:outgoing>SequenceFlow_0if6xj4</bpmn2:outgoing>
<bpmn2:linkEventDefinition name="To SnapShot" />
@@ -594,11 +587,11 @@ uvfm.setClosedLoopDisabledInAAI(execution, false)
(execution.getVariable("disposition") == "Retry" && execution.getVariable("workStep") == "Lock")]]></bpmn2:conditionExpression>
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="SequenceFlow_1ar6ikk" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_1p9i2bi">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[(execution.getVariable("disposition") == "Skip" && execution.getVariable("workStep") == "UpgradePreCheck") ||
-(execution.getVariable("disposition") == "Retry" && execution.getVariable("workStep") == "QuiesceTraffic")]]></bpmn2:conditionExpression>
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[(execution.getVariable("disposition") == "Skip" && execution.getVariable("workStep") == "QuiesceTraffic") ||
+(execution.getVariable("disposition") == "Retry" && execution.getVariable("workStep") == "Stop")]]></bpmn2:conditionExpression>
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="SequenceFlow_171iq7e" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_0rp1ax0">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[(execution.getVariable("disposition") == "Skip" && execution.getVariable("workStep") == "Snapshot") ||
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[(execution.getVariable("disposition") == "Skip" && execution.getVariable("workStep") == "Start") ||
(execution.getVariable("disposition") == "Retry" && execution.getVariable("workStep") == "UpgradeBackup")]]></bpmn2:conditionExpression>
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="SequenceFlow_1553o9f" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_01ngkx2">
@@ -653,9 +646,9 @@ uvfm.setClosedLoopDisabledInAAI(execution, false)
<bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[(execution.getVariable("disposition") == "Skip" && execution.getVariable("workStep") == "Lock") ||
(execution.getVariable("disposition") == "Retry" && execution.getVariable("workStep") == "UpgradePreCheck")]]></bpmn2:conditionExpression>
</bpmn2:sequenceFlow>
- <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1p9i2bi" name="To Quiesce Traffic">
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1p9i2bi" name="To Stop VNF">
<bpmn2:incoming>SequenceFlow_1ar6ikk</bpmn2:incoming>
- <bpmn2:linkEventDefinition name="To Quiesce Traffic" />
+ <bpmn2:linkEventDefinition name="To Stop VNF" />
</bpmn2:intermediateThrowEvent>
<bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0ee7wot" name="To SnapShot">
<bpmn2:incoming>SequenceFlow_1nlqlwn</bpmn2:incoming>
@@ -718,12 +711,12 @@ uvfm.setClosedLoopDisabledInAAI(execution, false)
<camunda:out source="workStep" target="workStep" />
<camunda:out source="failedActivity" target="failedActivity" />
<camunda:in source="vmIdList" target="vmIdList" />
- <camunda:in source="aicIdentity" target="identityUrl" />
+ <camunda:in source="identityUrl" target="identityUrl" />
<camunda:in source="controllerType" target="controllerType" />
<camunda:in source="vserverIdList" target="vserverIdList" />
</bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_1c0vdki</bpmn2:incoming>
<bpmn2:incoming>SequenceFlow_0if6xj4</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_10yw9oj</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_19ba94v</bpmn2:outgoing>
</bpmn2:callActivity>
<bpmn2:callActivity id="Task_1dtbnuy" name="Call APP-C VNF Lock" calledElement="AppCClient">
@@ -888,8 +881,8 @@ execution.getVariable(retryVariableName) < execution.getVariable("maxRetryCount"
<camunda:in source="vnfName" target="vnfName" />
<camunda:in source="controllerType" target="controllerType" />
</bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_1fuaq5k</bpmn2:incoming>
<bpmn2:incoming>SequenceFlow_1v59be9</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0ugaydb</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_04rprct</bpmn2:outgoing>
</bpmn2:callActivity>
<bpmn2:callActivity id="Task_1hdg951" name="Call APP-C Upgrade Software" calledElement="AppCClient">
@@ -934,6 +927,107 @@ execution.getVariable(retryVariableName) < execution.getVariable("maxRetryCount"
<bpmn2:outgoing>SequenceFlow_1j81s6b</bpmn2:outgoing>
<bpmn2:outgoing>SequenceFlow_0qy68ib</bpmn2:outgoing>
</bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_10yw9oj" sourceRef="ExclusiveGateway_0bd79on" targetRef="Task_0eae8go" />
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_10hdz40" name="To Stop VNF">
+ <bpmn2:outgoing>SequenceFlow_02zphll</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To Stop VNF" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_02zphll" sourceRef="IntermediateThrowEvent_10hdz40" targetRef="Task_0qa3yfr" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0bd79on" name="Error on Stop VNF?" default="SequenceFlow_10yw9oj">
+ <bpmn2:incoming>SequenceFlow_0ayfzd3</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_10yw9oj</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1qdt3ml</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0ayfzd3" sourceRef="Task_0qa3yfr" targetRef="ExclusiveGateway_0bd79on" />
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0u4t4eb" name="To Rainy Day Handling">
+ <bpmn2:incoming>SequenceFlow_1qdt3ml</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1qdt3ml" name="yes" sourceRef="ExclusiveGateway_0bd79on" targetRef="IntermediateThrowEvent_0u4t4eb">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:callActivity id="Task_0qa3yfr" name="Call APP-C Stop VNF" calledElement="AppCClient">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="actionStop" target="action" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="identityUrl" target="identityUrl" />
+ <camunda:in source="controllerType" target="controllerType" />
+ <camunda:out source="errorCode" target="errorCode" />
+ <camunda:out source="errorText" target="errorText" />
+ <camunda:out source="workStep" target="workStep" />
+ <camunda:out source="failedActivity" target="failedActivity" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1c0vdki</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_02zphll</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0ayfzd3</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_015qhj5" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_0utxo48">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[(execution.getVariable("disposition") == "Skip" && execution.getVariable("workStep") == "UpgradePreCheck") ||
+(execution.getVariable("disposition") == "Retry" && execution.getVariable("workStep") == "QuiesceTraffic")]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0utxo48" name="To Quiesce Traffic">
+ <bpmn2:incoming>SequenceFlow_015qhj5</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Quiesce Traffic" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1xeh8rb" sourceRef="ExclusiveGateway_0y82zzx" targetRef="IntermediateThrowEvent_034letx">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[(execution.getVariable("disposition") == "Skip" && execution.getVariable("workStep") == "Snapshot") ||
+(execution.getVariable("disposition") == "Retry" && execution.getVariable("workStep") == "Start")]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_034letx" name="To Start VNF">
+ <bpmn2:incoming>SequenceFlow_1xeh8rb</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Start VNF" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1c2q423" sourceRef="Task_1j68pc1" targetRef="ExclusiveGateway_1aepvyq" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_1aepvyq" name="Error on Start VNF?" default="SequenceFlow_0ugaydb">
+ <bpmn2:incoming>SequenceFlow_1c2q423</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0ugaydb</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1ouddzv</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0ugaydb" name="no" sourceRef="ExclusiveGateway_1aepvyq" targetRef="Task_1mdr1nd" />
+ <bpmn2:sequenceFlow id="SequenceFlow_12k801c" sourceRef="IntermediateThrowEvent_01xb76a" targetRef="Task_1j68pc1" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1ouddzv" name="yes" sourceRef="ExclusiveGateway_1aepvyq" targetRef="IntermediateThrowEvent_0d6k86e">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateCatchEvent id="IntermediateThrowEvent_01xb76a" name="To Start VNF">
+ <bpmn2:outgoing>SequenceFlow_12k801c</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="To Start VNF" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0d6k86e" name="To Rainy Day Handler">
+ <bpmn2:incoming>SequenceFlow_1ouddzv</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="To Rainy Day Handling" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:callActivity id="Task_1j68pc1" name="Call APP-C Start VNF" calledElement="AppCClient">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="actionStart" target="action" />
+ <camunda:in source="vnfId" target="vnfId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="identityUrl" target="identityUrl" />
+ <camunda:in source="controllerType" target="controllerType" />
+ <camunda:out source="errorCode" target="errorCode" />
+ <camunda:out source="errorText" target="errorText" />
+ <camunda:out source="workStep" target="workStep" />
+ <camunda:out source="failedActivity" target="failedActivity" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_1fuaq5k</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_12k801c</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1c2q423</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="Task_0n1d5f2" name="Set VF Is Closed Loop Disabled Flag in A&#38;AI" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0du9273</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_032tm9y</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_179z9vl</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def uvfm = new VnfInPlaceUpdate()
+uvfm.setClosedLoopDisabledInAAI(execution, true)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1us5byg" sourceRef="Task_0op98k0" targetRef="Task_0vy2zge" />
+ <bpmn2:serviceTask id="Task_0op98k0" name="Query Catalog DB for IdentityUrl" camunda:expression="${CloudSiteCatalogUtils.getIdentityUrlFromCloudSite(execution)}">
+ <bpmn2:incoming>SequenceFlow_053qjfy</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1us5byg</bpmn2:outgoing>
+ </bpmn2:serviceTask>
</bpmn2:process>
<bpmn2:error id="Error_1" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
@@ -945,9 +1039,9 @@ execution.getVariable(retryVariableName) < execution.getVariable("maxRetryCount"
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_EndEvent_125" bpmnElement="EndEvent_1">
- <dc:Bounds x="569" y="1073" width="36" height="36" />
+ <dc:Bounds x="1248" y="1096" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="568" y="1114" width="38" height="12" />
+ <dc:Bounds x="1247" y="1137" width="38" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_StartEvent_50" targetElement="_BPMNShape_ScriptTask_124">
@@ -978,30 +1072,30 @@ execution.getVariable(retryVariableName) < execution.getVariable("maxRetryCount"
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="_BPMNShape_ScriptTask_127" bpmnElement="ScriptTask_4">
- <dc:Bounds x="415" y="1051" width="100" height="80" />
+ <dc:Bounds x="1094" y="1074" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_127" targetElement="_BPMNShape_EndEvent_125">
- <di:waypoint xsi:type="dc:Point" x="515" y="1091" />
- <di:waypoint xsi:type="dc:Point" x="549" y="1091" />
- <di:waypoint xsi:type="dc:Point" x="549" y="1091" />
- <di:waypoint xsi:type="dc:Point" x="569" y="1091" />
+ <di:waypoint xsi:type="dc:Point" x="1194" y="1114" />
+ <di:waypoint xsi:type="dc:Point" x="1228" y="1114" />
+ <di:waypoint xsi:type="dc:Point" x="1228" y="1114" />
+ <di:waypoint xsi:type="dc:Point" x="1248" y="1114" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="564" y="1091" width="0" height="0" />
+ <dc:Bounds x="1243" y="1114" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="_BPMNShape_ScriptTask_133" bpmnElement="ScriptTask_10">
- <dc:Bounds x="126" y="1051" width="100" height="80" />
+ <dc:Bounds x="805" y="1074" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_CallActivity_27" bpmnElement="CallActivity_1">
- <dc:Bounds x="269" y="1051" width="100" height="80" />
+ <dc:Bounds x="948" y="1074" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_ScriptTask_133" targetElement="_BPMNShape_CallActivity_27">
- <di:waypoint xsi:type="dc:Point" x="226" y="1091" />
- <di:waypoint xsi:type="dc:Point" x="248" y="1091" />
- <di:waypoint xsi:type="dc:Point" x="248" y="1091" />
- <di:waypoint xsi:type="dc:Point" x="269" y="1091" />
+ <di:waypoint xsi:type="dc:Point" x="905" y="1114" />
+ <di:waypoint xsi:type="dc:Point" x="927" y="1114" />
+ <di:waypoint xsi:type="dc:Point" x="927" y="1114" />
+ <di:waypoint xsi:type="dc:Point" x="948" y="1114" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="263" y="1091" width="0" height="0" />
+ <dc:Bounds x="942" y="1114" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="_BPMNShape_SubProcess_17" bpmnElement="SubProcess_1" isExpanded="true">
@@ -1059,12 +1153,12 @@ execution.getVariable(retryVariableName) < execution.getVariable("maxRetryCount"
<dc:Bounds x="748" y="1446" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_CallActivity_27" targetElement="_BPMNShape_ScriptTask_127">
- <di:waypoint xsi:type="dc:Point" x="369" y="1091" />
- <di:waypoint xsi:type="dc:Point" x="392" y="1091" />
- <di:waypoint xsi:type="dc:Point" x="392" y="1091" />
- <di:waypoint xsi:type="dc:Point" x="415" y="1091" />
+ <di:waypoint xsi:type="dc:Point" x="1048" y="1114" />
+ <di:waypoint xsi:type="dc:Point" x="1071" y="1114" />
+ <di:waypoint xsi:type="dc:Point" x="1071" y="1114" />
+ <di:waypoint xsi:type="dc:Point" x="1094" y="1114" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="407" y="1091" width="0" height="0" />
+ <dc:Bounds x="1086" y="1114" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_CallActivity_28" targetElement="_BPMNShape_EndEvent_126">
@@ -1075,25 +1169,17 @@ execution.getVariable(retryVariableName) < execution.getVariable("maxRetryCount"
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" targetElement="_BPMNShape_ScriptTask_133">
- <di:waypoint xsi:type="dc:Point" x="1459" y="800" />
- <di:waypoint xsi:type="dc:Point" x="1561" y="800" />
- <di:waypoint xsi:type="dc:Point" x="1561" y="989" />
- <di:waypoint xsi:type="dc:Point" x="99" y="989" />
- <di:waypoint xsi:type="dc:Point" x="99" y="1091" />
- <di:waypoint xsi:type="dc:Point" x="126" y="1091" />
+ <di:waypoint xsi:type="dc:Point" x="756" y="1114" />
+ <di:waypoint xsi:type="dc:Point" x="805" y="1114" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1482" y="772.5275881403734" width="12" height="12" />
+ <dc:Bounds x="794" y="1090.1083303171945" width="12" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_053qjfy_di" bpmnElement="SequenceFlow_053qjfy">
<di:waypoint xsi:type="dc:Point" x="671" y="90" />
- <di:waypoint xsi:type="dc:Point" x="982" y="90" />
- <di:waypoint xsi:type="dc:Point" x="982" y="156" />
- <di:waypoint xsi:type="dc:Point" x="103" y="156" />
- <di:waypoint xsi:type="dc:Point" x="103" y="237" />
- <di:waypoint xsi:type="dc:Point" x="131" y="237" />
+ <di:waypoint xsi:type="dc:Point" x="750" y="90" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="543" y="141" width="0" height="0" />
+ <dc:Bounds x="711" y="75" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ScriptTask_08xzuox_di" bpmnElement="Task_1opcb4j">
@@ -1120,7 +1206,7 @@ execution.getVariable(retryVariableName) < execution.getVariable("maxRetryCount"
<dc:Bounds x="608" y="197" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_0sgm9bu_di" bpmnElement="Task_1drglpt">
- <dc:Bounds x="1058" y="760" width="100" height="80" />
+ <dc:Bounds x="355" y="1074" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_16jtt5t_di" bpmnElement="Task_0vy2zge">
<dc:Bounds x="131" y="197" width="100" height="80" />
@@ -1147,24 +1233,24 @@ execution.getVariable(retryVariableName) < execution.getVariable("maxRetryCount"
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1uno5rs_di" bpmnElement="SequenceFlow_1uno5rs">
- <di:waypoint xsi:type="dc:Point" x="223" y="800" />
- <di:waypoint xsi:type="dc:Point" x="266" y="800" />
+ <di:waypoint xsi:type="dc:Point" x="683" y="800" />
+ <di:waypoint xsi:type="dc:Point" x="726" y="800" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="245" y="785" width="0" height="0" />
+ <dc:Bounds x="706" y="785" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1c79909_di" bpmnElement="SequenceFlow_1c79909">
- <di:waypoint xsi:type="dc:Point" x="464" y="800" />
- <di:waypoint xsi:type="dc:Point" x="513" y="800" />
+ <di:waypoint xsi:type="dc:Point" x="924" y="800" />
+ <di:waypoint xsi:type="dc:Point" x="973" y="800" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="489" y="785" width="0" height="0" />
+ <dc:Bounds x="949" y="785" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1xfbwpi_di" bpmnElement="SequenceFlow_1xfbwpi">
- <di:waypoint xsi:type="dc:Point" x="926" y="800" />
- <di:waypoint xsi:type="dc:Point" x="955" y="800" />
+ <di:waypoint xsi:type="dc:Point" x="223" y="1114" />
+ <di:waypoint xsi:type="dc:Point" x="252" y="1114" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="941" y="785" width="0" height="0" />
+ <dc:Bounds x="238" y="1099" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ExclusiveGateway_0q323wc_di" bpmnElement="ExclusiveGateway_0q323wc" isMarkerVisible="true">
@@ -1262,41 +1348,41 @@ execution.getVariable(retryVariableName) < execution.getVariable("maxRetryCount"
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1c0vdki_di" bpmnElement="SequenceFlow_1c0vdki">
<di:waypoint xsi:type="dc:Point" x="785" y="510" />
- <di:waypoint xsi:type="dc:Point" x="826" y="510" />
+ <di:waypoint xsi:type="dc:Point" x="824" y="510" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="804" y="487" width="12" height="12" />
+ <dc:Bounds x="1024" y="485" width="12" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ExclusiveGateway_02tj4dw_di" bpmnElement="ExclusiveGateway_02tj4dw" isMarkerVisible="true">
- <dc:Bounds x="266" y="775" width="50" height="50" />
+ <dc:Bounds x="726" y="775" width="50" height="50" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="247" y="735" width="88" height="24" />
+ <dc:Bounds x="709" y="735" width="84" height="26" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_162mm0m_di" bpmnElement="SequenceFlow_162mm0m">
- <di:waypoint xsi:type="dc:Point" x="316" y="800" />
- <di:waypoint xsi:type="dc:Point" x="364" y="800" />
+ <di:waypoint xsi:type="dc:Point" x="776" y="800" />
+ <di:waypoint xsi:type="dc:Point" x="824" y="800" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="333" y="780" width="12" height="12" />
+ <dc:Bounds x="793" y="780" width="12" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ExclusiveGateway_1gn5lab_di" bpmnElement="ExclusiveGateway_1gn5lab" isMarkerVisible="true">
- <dc:Bounds x="513" y="775" width="50" height="50" />
+ <dc:Bounds x="973" y="775" width="50" height="50" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="502" y="735" width="72" height="24" />
+ <dc:Bounds x="962" y="735" width="72" height="26" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ExclusiveGateway_0l2z6wc_di" bpmnElement="ExclusiveGateway_0l2z6wc" isMarkerVisible="true">
- <dc:Bounds x="1195" y="775" width="50" height="50" />
+ <dc:Bounds x="492" y="1089" width="50" height="50" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1183" y="728" width="73" height="36" />
+ <dc:Bounds x="480" y="1042" width="73" height="36" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_12mfil6_di" bpmnElement="SequenceFlow_12mfil6">
- <di:waypoint xsi:type="dc:Point" x="1158" y="800" />
- <di:waypoint xsi:type="dc:Point" x="1195" y="800" />
+ <di:waypoint xsi:type="dc:Point" x="455" y="1114" />
+ <di:waypoint xsi:type="dc:Point" x="492" y="1114" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1178" y="785" width="0" height="0" />
+ <dc:Bounds x="475" y="1099" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ScriptTask_1lb0lk5_di" bpmnElement="Task_1tg549h">
@@ -1322,10 +1408,10 @@ execution.getVariable(retryVariableName) < execution.getVariable("maxRetryCount"
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_19ba94v_di" bpmnElement="SequenceFlow_19ba94v">
- <di:waypoint xsi:type="dc:Point" x="926" y="510" />
- <di:waypoint xsi:type="dc:Point" x="955" y="510" />
+ <di:waypoint xsi:type="dc:Point" x="1160" y="510" />
+ <di:waypoint xsi:type="dc:Point" x="1193" y="510" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="941" y="495" width="0" height="0" />
+ <dc:Bounds x="1177" y="495" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1nlqlwn_di" bpmnElement="SequenceFlow_1nlqlwn">
@@ -1488,9 +1574,6 @@ execution.getVariable(retryVariableName) < execution.getVariable("maxRetryCount"
<dc:Bounds x="1165" y="222" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_1iio503_di" bpmnElement="Task_0n1d5f2">
- <dc:Bounds x="1046" y="197" width="100" height="80" />
- </bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_032tm9y_di" bpmnElement="SequenceFlow_032tm9y">
<di:waypoint xsi:type="dc:Point" x="1096" y="308" />
<di:waypoint xsi:type="dc:Point" x="1096" y="277" />
@@ -1602,393 +1685,394 @@ execution.getVariable(retryVariableName) < execution.getVariable("maxRetryCount"
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ExclusiveGateway_19an3h2_di" bpmnElement="ExclusiveGateway_19an3h2" isMarkerVisible="true">
- <dc:Bounds x="955" y="485" width="50" height="50" />
+ <dc:Bounds x="1193" y="485" width="50" height="50" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="953" y="441" width="53" height="24" />
+ <dc:Bounds x="1191" y="441" width="54" height="26" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1fuaq5k_di" bpmnElement="SequenceFlow_1fuaq5k">
- <di:waypoint xsi:type="dc:Point" x="1005" y="510" />
- <di:waypoint xsi:type="dc:Point" x="1064" y="510" />
+ <di:waypoint xsi:type="dc:Point" x="1243" y="510" />
+ <di:waypoint xsi:type="dc:Point" x="1294" y="510" />
+ <di:waypoint xsi:type="dc:Point" x="1294" y="681" />
+ <di:waypoint xsi:type="dc:Point" x="98" y="681" />
+ <di:waypoint xsi:type="dc:Point" x="98" y="800" />
+ <di:waypoint xsi:type="dc:Point" x="124" y="800" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1030" y="485" width="12" height="12" />
+ <dc:Bounds x="1260" y="484.09433477074754" width="12" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="IntermediateCatchEvent_199cotj_di" bpmnElement="IntermediateThrowEvent_0a1s69h">
- <dc:Bounds x="858" y="581" width="36" height="36" />
+ <dc:Bounds x="1092" y="581" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="844" y="617" width="63" height="13" />
+ <dc:Bounds x="1079" y="617" width="62" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0if6xj4_di" bpmnElement="SequenceFlow_0if6xj4">
- <di:waypoint xsi:type="dc:Point" x="876" y="581" />
- <di:waypoint xsi:type="dc:Point" x="876" y="550" />
+ <di:waypoint xsi:type="dc:Point" x="1110" y="581" />
+ <di:waypoint xsi:type="dc:Point" x="1110" y="550" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="891" y="565.5" width="0" height="0" />
+ <dc:Bounds x="1125" y="565.5" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_04gth9f_di" bpmnElement="SequenceFlow_04gth9f">
- <di:waypoint xsi:type="dc:Point" x="980" y="535" />
- <di:waypoint xsi:type="dc:Point" x="980" y="581" />
+ <di:waypoint xsi:type="dc:Point" x="1218" y="535" />
+ <di:waypoint xsi:type="dc:Point" x="1218" y="581" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="986" y="558" width="18" height="12" />
+ <dc:Bounds x="1227" y="546.6958260869565" width="18" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="IntermediateThrowEvent_1ly7m7x_di" bpmnElement="IntermediateThrowEvent_11vs7u4">
- <dc:Bounds x="962" y="581" width="36" height="36" />
+ <dc:Bounds x="1200" y="581" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="945" y="617" width="69" height="24" />
+ <dc:Bounds x="1184" y="617" width="68" height="26" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1v59be9_di" bpmnElement="SequenceFlow_1v59be9">
- <di:waypoint xsi:type="dc:Point" x="1114" y="581" />
- <di:waypoint xsi:type="dc:Point" x="1114" y="550" />
+ <di:waypoint xsi:type="dc:Point" x="414" y="871" />
+ <di:waypoint xsi:type="dc:Point" x="414" y="840" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1129" y="565.5" width="0" height="0" />
+ <dc:Bounds x="429" y="856" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="IntermediateCatchEvent_0gvhqjf_di" bpmnElement="IntermediateThrowEvent_162mb2a">
- <dc:Bounds x="1096" y="581" width="36" height="36" />
+ <dc:Bounds x="396" y="871" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1084" y="617" width="60" height="25" />
+ <dc:Bounds x="385" y="907" width="58" height="26" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ExclusiveGateway_0ssvndw_di" bpmnElement="ExclusiveGateway_0ssvndw" isMarkerVisible="true">
- <dc:Bounds x="1195.192" y="485" width="50" height="50" />
+ <dc:Bounds x="495" y="775" width="50" height="50" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1177" y="439" width="85" height="24" />
+ <dc:Bounds x="478" y="729" width="84" height="26" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_04rprct_di" bpmnElement="SequenceFlow_04rprct">
- <di:waypoint xsi:type="dc:Point" x="1164" y="510" />
- <di:waypoint xsi:type="dc:Point" x="1195" y="510" />
+ <di:waypoint xsi:type="dc:Point" x="464" y="800" />
+ <di:waypoint xsi:type="dc:Point" x="495" y="800" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1180" y="495" width="0" height="0" />
+ <dc:Bounds x="480" y="785" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="IntermediateThrowEvent_14s9cw9_di" bpmnElement="IntermediateThrowEvent_1yfd3sz">
- <dc:Bounds x="1202" y="581" width="36" height="36" />
+ <dc:Bounds x="502" y="871" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1185" y="617" width="69" height="24" />
+ <dc:Bounds x="486" y="907" width="68" height="26" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1uceq96_di" bpmnElement="SequenceFlow_1uceq96">
- <di:waypoint xsi:type="dc:Point" x="1220" y="535" />
- <di:waypoint xsi:type="dc:Point" x="1220" y="581" />
+ <di:waypoint xsi:type="dc:Point" x="520" y="825" />
+ <di:waypoint xsi:type="dc:Point" x="520" y="871" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1226" y="548" width="18" height="12" />
+ <dc:Bounds x="526" y="838" width="18" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0txgesu_di" bpmnElement="SequenceFlow_0txgesu">
- <di:waypoint xsi:type="dc:Point" x="1245" y="510" />
- <di:waypoint xsi:type="dc:Point" x="1286" y="510" />
- <di:waypoint xsi:type="dc:Point" x="1286" y="676" />
- <di:waypoint xsi:type="dc:Point" x="95" y="676" />
- <di:waypoint xsi:type="dc:Point" x="95" y="800" />
- <di:waypoint xsi:type="dc:Point" x="123" y="800" />
+ <di:waypoint xsi:type="dc:Point" x="545" y="800" />
+ <di:waypoint xsi:type="dc:Point" x="583" y="800" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1259" y="488" width="12" height="12" />
+ <dc:Bounds x="559" y="778" width="12" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0trguug_di" bpmnElement="SequenceFlow_0trguug">
- <di:waypoint xsi:type="dc:Point" x="701" y="800" />
- <di:waypoint xsi:type="dc:Point" x="735" y="800" />
+ <di:waypoint xsi:type="dc:Point" x="1161" y="800" />
+ <di:waypoint xsi:type="dc:Point" x="1195" y="800" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="718" y="785" width="0" height="0" />
+ <dc:Bounds x="1178" y="785" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ExclusiveGateway_1ozuicc_di" bpmnElement="ExclusiveGateway_1ozuicc" isMarkerVisible="true">
- <dc:Bounds x="735.304" y="775" width="50" height="50" />
+ <dc:Bounds x="1195" y="775" width="50" height="50" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="716" y="735" width="87" height="24" />
+ <dc:Bounds x="1178" y="735" width="84" height="26" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1q3bwlt_di" bpmnElement="SequenceFlow_1q3bwlt">
- <di:waypoint xsi:type="dc:Point" x="785.304" y="800" />
- <di:waypoint xsi:type="dc:Point" x="826" y="800" />
+ <di:waypoint xsi:type="dc:Point" x="1245" y="800" />
+ <di:waypoint xsi:type="dc:Point" x="1290" y="800" />
+ <di:waypoint xsi:type="dc:Point" x="1290" y="969" />
+ <di:waypoint xsi:type="dc:Point" x="80" y="969" />
+ <di:waypoint xsi:type="dc:Point" x="80" y="1114" />
+ <di:waypoint xsi:type="dc:Point" x="123" y="1114" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="800" y="775" width="12" height="12" />
+ <dc:Bounds x="1260" y="770.0957837465772" width="12" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ExclusiveGateway_123vjyo_di" bpmnElement="ExclusiveGateway_123vjyo" isMarkerVisible="true">
- <dc:Bounds x="955" y="775" width="50" height="50" />
+ <dc:Bounds x="252" y="1089" width="50" height="50" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="946" y="735" width="68" height="24" />
+ <dc:Bounds x="243" y="1049" width="68" height="24" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1nr9o85_di" bpmnElement="SequenceFlow_1nr9o85">
- <di:waypoint xsi:type="dc:Point" x="1005" y="800" />
- <di:waypoint xsi:type="dc:Point" x="1037" y="800" />
- <di:waypoint xsi:type="dc:Point" x="1037" y="800" />
- <di:waypoint xsi:type="dc:Point" x="1058" y="800" />
+ <di:waypoint xsi:type="dc:Point" x="302" y="1114" />
+ <di:waypoint xsi:type="dc:Point" x="334" y="1114" />
+ <di:waypoint xsi:type="dc:Point" x="334" y="1114" />
+ <di:waypoint xsi:type="dc:Point" x="355" y="1114" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1024" y="772" width="12" height="12" />
+ <dc:Bounds x="321" y="1086" width="12" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="IntermediateThrowEvent_11ot6vh_di" bpmnElement="IntermediateThrowEvent_1nij04n">
- <dc:Bounds x="273" y="886" width="36" height="36" />
+ <dc:Bounds x="733" y="871" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="256" y="921.6089999999999" width="69" height="24" />
+ <dc:Bounds x="716" y="907" width="69" height="24" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1gagrha_di" bpmnElement="SequenceFlow_1gagrha">
- <di:waypoint xsi:type="dc:Point" x="291" y="825" />
- <di:waypoint xsi:type="dc:Point" x="291" y="886" />
+ <di:waypoint xsi:type="dc:Point" x="751" y="825" />
+ <di:waypoint xsi:type="dc:Point" x="751" y="871" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="297" y="845.5" width="18" height="12" />
+ <dc:Bounds x="757" y="839.1147540983607" width="18" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_16igl7b_di" bpmnElement="SequenceFlow_16igl7b">
- <di:waypoint xsi:type="dc:Point" x="414" y="886" />
- <di:waypoint xsi:type="dc:Point" x="414" y="840" />
+ <di:waypoint xsi:type="dc:Point" x="874" y="871" />
+ <di:waypoint xsi:type="dc:Point" x="874" y="840" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="429" y="863" width="0" height="0" />
+ <dc:Bounds x="889" y="855.5" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="IntermediateCatchEvent_174wgan_di" bpmnElement="IntermediateThrowEvent_0fhmhsk">
- <dc:Bounds x="396" y="886" width="36" height="36" />
+ <dc:Bounds x="856" y="871" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="384" y="922" width="59" height="24" />
+ <dc:Bounds x="844" y="907" width="60" height="24" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1urpp94_di" bpmnElement="SequenceFlow_1urpp94">
- <di:waypoint xsi:type="dc:Point" x="538" y="825" />
- <di:waypoint xsi:type="dc:Point" x="538" y="886" />
+ <di:waypoint xsi:type="dc:Point" x="998" y="825" />
+ <di:waypoint xsi:type="dc:Point" x="998" y="871" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="544" y="855.5" width="18" height="12" />
+ <dc:Bounds x="1004" y="846.4451837791199" width="18" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="IntermediateThrowEvent_1vi3wf9_di" bpmnElement="IntermediateThrowEvent_0vf0a28">
- <dc:Bounds x="520" y="886" width="36" height="36" />
+ <dc:Bounds x="980" y="871" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="503" y="922" width="69" height="24" />
+ <dc:Bounds x="963" y="907" width="69" height="24" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1c2xyhk_di" bpmnElement="SequenceFlow_1c2xyhk">
- <di:waypoint xsi:type="dc:Point" x="563" y="800" />
- <di:waypoint xsi:type="dc:Point" x="601" y="800" />
+ <di:waypoint xsi:type="dc:Point" x="1023" y="800" />
+ <di:waypoint xsi:type="dc:Point" x="1061" y="800" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="577" y="775" width="12" height="12" />
+ <dc:Bounds x="1037" y="775" width="12" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="IntermediateCatchEvent_165ve6q_di" bpmnElement="IntermediateThrowEvent_0pxvl24">
- <dc:Bounds x="632" y="886" width="36" height="36" />
+ <dc:Bounds x="1093" y="871" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="607" y="922" width="85" height="13" />
+ <dc:Bounds x="1066" y="907" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0yja56j_di" bpmnElement="SequenceFlow_0yja56j">
- <di:waypoint xsi:type="dc:Point" x="650" y="886" />
- <di:waypoint xsi:type="dc:Point" x="651" y="840" />
+ <di:waypoint xsi:type="dc:Point" x="1111" y="871" />
+ <di:waypoint xsi:type="dc:Point" x="1112" y="840" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="651" y="848" width="0" height="0" />
+ <dc:Bounds x="1112" y="840.5" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1xg6pwh_di" bpmnElement="SequenceFlow_1xg6pwh">
- <di:waypoint xsi:type="dc:Point" x="760" y="825" />
- <di:waypoint xsi:type="dc:Point" x="760" y="886" />
+ <di:waypoint xsi:type="dc:Point" x="1220" y="825" />
+ <di:waypoint xsi:type="dc:Point" x="1220" y="871" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="766" y="855.5" width="18" height="12" />
+ <dc:Bounds x="1226" y="846.655737704918" width="18" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="IntermediateThrowEvent_0unfhc9_di" bpmnElement="IntermediateThrowEvent_1vjqksl">
- <dc:Bounds x="742" y="886" width="36" height="36" />
+ <dc:Bounds x="1202" y="871" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="725" y="922" width="69" height="24" />
+ <dc:Bounds x="1185" y="907" width="69" height="24" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="IntermediateCatchEvent_1om2udh_di" bpmnElement="IntermediateThrowEvent_1vwqesb">
- <dc:Bounds x="859" y="886" width="36" height="36" />
+ <dc:Bounds x="156" y="1200" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="842" y="922" width="70" height="13" />
+ <dc:Bounds x="137" y="1236" width="74" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1hwtq9x_di" bpmnElement="SequenceFlow_1hwtq9x">
- <di:waypoint xsi:type="dc:Point" x="877" y="886" />
- <di:waypoint xsi:type="dc:Point" x="876" y="840" />
+ <di:waypoint xsi:type="dc:Point" x="174" y="1200" />
+ <di:waypoint xsi:type="dc:Point" x="173" y="1154" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="877" y="848" width="0" height="0" />
+ <dc:Bounds x="174" y="1162" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0ttowkv_di" bpmnElement="SequenceFlow_0ttowkv">
- <di:waypoint xsi:type="dc:Point" x="980" y="825" />
- <di:waypoint xsi:type="dc:Point" x="980" y="886" />
+ <di:waypoint xsi:type="dc:Point" x="277" y="1139" />
+ <di:waypoint xsi:type="dc:Point" x="277" y="1200" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="986" y="855.5" width="18" height="12" />
+ <dc:Bounds x="283" y="1170" width="18" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="IntermediateThrowEvent_1u04oef_di" bpmnElement="IntermediateThrowEvent_0m9jtv2">
- <dc:Bounds x="962" y="886" width="36" height="36" />
+ <dc:Bounds x="259" y="1200" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="945" y="922" width="69" height="24" />
+ <dc:Bounds x="242" y="1236" width="69" height="24" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="IntermediateCatchEvent_1bsxf5o_di" bpmnElement="IntermediateThrowEvent_0pk24h2">
- <dc:Bounds x="155" y="886" width="36" height="36" />
+ <dc:Bounds x="615" y="871" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="143" y="922" width="59" height="25" />
+ <dc:Bounds x="603" y="907" width="60" height="24" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1colra4_di" bpmnElement="SequenceFlow_1colra4">
- <di:waypoint xsi:type="dc:Point" x="173" y="886" />
- <di:waypoint xsi:type="dc:Point" x="173" y="863" />
- <di:waypoint xsi:type="dc:Point" x="173" y="863" />
- <di:waypoint xsi:type="dc:Point" x="173" y="840" />
+ <di:waypoint xsi:type="dc:Point" x="633" y="871" />
+ <di:waypoint xsi:type="dc:Point" x="633" y="840" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="188" y="863" width="0" height="0" />
+ <dc:Bounds x="648" y="855.5" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ExclusiveGateway_18j1ow5_di" bpmnElement="ExclusiveGateway_18j1ow5" isMarkerVisible="true">
- <dc:Bounds x="1409.304" y="775" width="50" height="50" />
+ <dc:Bounds x="706" y="1089" width="50" height="50" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1396" y="724" width="75" height="36" />
+ <dc:Bounds x="693" y="1038" width="75" height="36" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0u6ho2p_di" bpmnElement="SequenceFlow_0u6ho2p">
- <di:waypoint xsi:type="dc:Point" x="1245" y="800" />
- <di:waypoint xsi:type="dc:Point" x="1275" y="800" />
+ <di:waypoint xsi:type="dc:Point" x="542" y="1114" />
+ <di:waypoint xsi:type="dc:Point" x="572" y="1114" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1255" y="775" width="12" height="12" />
+ <dc:Bounds x="552" y="1089" width="12" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ScriptTask_08r89q9_di" bpmnElement="Task_0y1h8go">
- <dc:Bounds x="1275" y="760" width="100" height="80" />
+ <dc:Bounds x="572" y="1074" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1tzax6l_di" bpmnElement="SequenceFlow_1tzax6l">
- <di:waypoint xsi:type="dc:Point" x="1375" y="800" />
- <di:waypoint xsi:type="dc:Point" x="1409" y="800" />
+ <di:waypoint xsi:type="dc:Point" x="672" y="1114" />
+ <di:waypoint xsi:type="dc:Point" x="706" y="1114" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1392" y="775" width="0" height="0" />
+ <dc:Bounds x="689" y="1089" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="IntermediateCatchEvent_06j33fe_di" bpmnElement="IntermediateThrowEvent_0pmevcz">
- <dc:Bounds x="1090" y="886" width="36" height="36" />
+ <dc:Bounds x="387" y="1200" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1072" y="922" width="72" height="25" />
+ <dc:Bounds x="370" y="1236" width="70" height="24" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_16ff86u_di" bpmnElement="SequenceFlow_16ff86u">
- <di:waypoint xsi:type="dc:Point" x="1108" y="886" />
- <di:waypoint xsi:type="dc:Point" x="1108" y="840" />
+ <di:waypoint xsi:type="dc:Point" x="405" y="1200" />
+ <di:waypoint xsi:type="dc:Point" x="405" y="1154" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1123" y="853" width="0" height="0" />
+ <dc:Bounds x="420" y="1167" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0k3zxpd_di" bpmnElement="SequenceFlow_0k3zxpd">
- <di:waypoint xsi:type="dc:Point" x="1220" y="825" />
- <di:waypoint xsi:type="dc:Point" x="1220" y="886" />
+ <di:waypoint xsi:type="dc:Point" x="517" y="1139" />
+ <di:waypoint xsi:type="dc:Point" x="517" y="1200" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1226" y="855.5" width="18" height="12" />
+ <dc:Bounds x="523" y="1170" width="18" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="IntermediateThrowEvent_105mp22_di" bpmnElement="IntermediateThrowEvent_1awckg7">
- <dc:Bounds x="1202" y="886" width="36" height="36" />
+ <dc:Bounds x="499" y="1200" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1185" y="922" width="69" height="24" />
+ <dc:Bounds x="482" y="1236" width="69" height="24" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="IntermediateCatchEvent_0kglv4e_di" bpmnElement="IntermediateThrowEvent_1b3smly">
- <dc:Bounds x="1307" y="886" width="36" height="36" />
+ <dc:Bounds x="604" y="1200" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1285" y="922" width="79" height="25" />
+ <dc:Bounds x="581" y="1236" width="82" height="24" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_09xxorv_di" bpmnElement="SequenceFlow_09xxorv">
- <di:waypoint xsi:type="dc:Point" x="1325" y="886" />
- <di:waypoint xsi:type="dc:Point" x="1325" y="840" />
+ <di:waypoint xsi:type="dc:Point" x="622" y="1200" />
+ <di:waypoint xsi:type="dc:Point" x="622" y="1154" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1340" y="853" width="0" height="0" />
+ <dc:Bounds x="637" y="1167" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0w8mkkn_di" bpmnElement="SequenceFlow_0w8mkkn">
- <di:waypoint xsi:type="dc:Point" x="1434" y="825" />
- <di:waypoint xsi:type="dc:Point" x="1434" y="886" />
+ <di:waypoint xsi:type="dc:Point" x="731" y="1139" />
+ <di:waypoint xsi:type="dc:Point" x="731" y="1200" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1440" y="855.5" width="18" height="12" />
+ <dc:Bounds x="737" y="1170" width="18" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="IntermediateThrowEvent_0jwgx1d_di" bpmnElement="IntermediateThrowEvent_1cw8gsw">
- <dc:Bounds x="1416" y="886" width="36" height="36" />
+ <dc:Bounds x="713" y="1200" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1399" y="922" width="69" height="24" />
+ <dc:Bounds x="696" y="1236" width="69" height="24" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="IntermediateCatchEvent_0zw87jy_di" bpmnElement="IntermediateThrowEvent_0x846wp">
- <dc:Bounds x="158" y="1186" width="36" height="36" />
+ <dc:Bounds x="837" y="1200" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="140" y="1221.609" width="72" height="25" />
+ <dc:Bounds x="819" y="1236" width="72" height="24" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_07uuj2d_di" bpmnElement="SequenceFlow_07uuj2d">
- <di:waypoint xsi:type="dc:Point" x="176" y="1186" />
- <di:waypoint xsi:type="dc:Point" x="176" y="1160" />
- <di:waypoint xsi:type="dc:Point" x="176" y="1160" />
- <di:waypoint xsi:type="dc:Point" x="176" y="1131" />
+ <di:waypoint xsi:type="dc:Point" x="855" y="1200" />
+ <di:waypoint xsi:type="dc:Point" x="855" y="1154" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="191" y="1160" width="0" height="0" />
+ <dc:Bounds x="870" y="1177" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0ueoglv_di" bpmnElement="SequenceFlow_0ueoglv">
<di:waypoint xsi:type="dc:Point" x="2117" y="490" />
- <di:waypoint xsi:type="dc:Point" x="2173" y="264" />
+ <di:waypoint xsi:type="dc:Point" x="2168" y="266" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="2145" y="362" width="0" height="0" />
+ <dc:Bounds x="2143" y="363" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_15fqlwe_di" bpmnElement="SequenceFlow_15fqlwe">
- <di:waypoint xsi:type="dc:Point" x="2120" y="493" />
- <di:waypoint xsi:type="dc:Point" x="2209" y="290" />
+ <di:waypoint xsi:type="dc:Point" x="2119" y="492" />
+ <di:waypoint xsi:type="dc:Point" x="2194" y="302" />
+ <di:waypoint xsi:type="dc:Point" x="2201" y="283" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="2165" y="377" width="0" height="0" />
+ <dc:Bounds x="2157" y="382" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0yuj0l5_di" bpmnElement="SequenceFlow_0yuj0l5">
- <di:waypoint xsi:type="dc:Point" x="2122" y="495" />
- <di:waypoint xsi:type="dc:Point" x="2247" y="319" />
+ <di:waypoint xsi:type="dc:Point" x="2121" y="494" />
+ <di:waypoint xsi:type="dc:Point" x="2234" y="304" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="2185" y="392" width="0" height="0" />
+ <dc:Bounds x="2178" y="384" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1abb030_di" bpmnElement="SequenceFlow_1abb030">
- <di:waypoint xsi:type="dc:Point" x="2125" y="498" />
- <di:waypoint xsi:type="dc:Point" x="2284" y="348" />
+ <di:waypoint xsi:type="dc:Point" x="2123" y="496" />
+ <di:waypoint xsi:type="dc:Point" x="2268" y="329" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="2205" y="408" width="0" height="0" />
+ <dc:Bounds x="2196" y="397.5" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0ls3ej5_di" bpmnElement="SequenceFlow_0ls3ej5">
- <di:waypoint xsi:type="dc:Point" x="2127" y="500" />
- <di:waypoint xsi:type="dc:Point" x="2313" y="386" />
+ <di:waypoint xsi:type="dc:Point" x="2125" y="498" />
+ <di:waypoint xsi:type="dc:Point" x="2293" y="363" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="2220" y="428" width="0" height="0" />
+ <dc:Bounds x="2209" y="415.5" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1ar6ikk_di" bpmnElement="SequenceFlow_1ar6ikk">
<di:waypoint xsi:type="dc:Point" x="2133" y="506" />
- <di:waypoint xsi:type="dc:Point" x="2372" y="460" />
+ <di:waypoint xsi:type="dc:Point" x="2372" y="462" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="2253" y="468" width="0" height="0" />
+ <dc:Bounds x="2253" y="469" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_171iq7e_di" bpmnElement="SequenceFlow_171iq7e">
- <di:waypoint xsi:type="dc:Point" x="2134" y="513" />
- <di:waypoint xsi:type="dc:Point" x="2372" y="553" />
+ <di:waypoint xsi:type="dc:Point" x="2132" y="515" />
+ <di:waypoint xsi:type="dc:Point" x="2363" y="585" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="2253" y="518" width="0" height="0" />
+ <dc:Bounds x="2248" y="535" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1553o9f_di" bpmnElement="SequenceFlow_1553o9f">
- <di:waypoint xsi:type="dc:Point" x="2129" y="518" />
- <di:waypoint xsi:type="dc:Point" x="2353" y="595" />
+ <di:waypoint xsi:type="dc:Point" x="2128" y="519" />
+ <di:waypoint xsi:type="dc:Point" x="2335" y="623" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="2241" y="541.5" width="0" height="0" />
+ <dc:Bounds x="2232" y="556" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0dmxwel_di" bpmnElement="SequenceFlow_0dmxwel">
- <di:waypoint xsi:type="dc:Point" x="2125" y="522" />
- <di:waypoint xsi:type="dc:Point" x="2294" y="685" />
+ <di:waypoint xsi:type="dc:Point" x="2124" y="523" />
+ <di:waypoint xsi:type="dc:Point" x="2281" y="692" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="2210" y="588.5" width="0" height="0" />
+ <dc:Bounds x="2203" y="592.5" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1id2p8y_di" bpmnElement="SequenceFlow_1id2p8y">
@@ -2020,52 +2104,52 @@ execution.getVariable(retryVariableName) < execution.getVariable("maxRetryCount"
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="IntermediateThrowEvent_17syve1_di" bpmnElement="IntermediateThrowEvent_0rz6jh4">
- <dc:Bounds x="2159" y="229" width="36" height="36" />
+ <dc:Bounds x="2150" y="230" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="2165" y="189" width="84" height="36" />
+ <dc:Bounds x="2156" y="190" width="84" height="36" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="IntermediateThrowEvent_0nv8aic_di" bpmnElement="IntermediateThrowEvent_1wip9vc">
- <dc:Bounds x="2199" y="256" width="36" height="36" />
+ <dc:Bounds x="2189" y="249" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="2213" y="235" width="89" height="24" />
+ <dc:Bounds x="2203" y="228" width="89" height="24" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="IntermediateThrowEvent_1g4pmwc_di" bpmnElement="IntermediateThrowEvent_1hki8xj">
- <dc:Bounds x="2240" y="287" width="36" height="36" />
+ <dc:Bounds x="2227" y="273" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="2280" y="256" width="64" height="36" />
+ <dc:Bounds x="2267" y="242" width="64" height="36" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="IntermediateThrowEvent_1ypnogn_di" bpmnElement="IntermediateThrowEvent_1gfnt9b">
- <dc:Bounds x="2279" y="319" width="36" height="36" />
+ <dc:Bounds x="2263" y="299" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="2325" y="305" width="71" height="24" />
+ <dc:Bounds x="2309" y="285" width="71" height="24" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="IntermediateThrowEvent_1i9ttzs_di" bpmnElement="IntermediateThrowEvent_1gzhs1a">
- <dc:Bounds x="2311" y="359" width="36" height="36" />
+ <dc:Bounds x="2289" y="334" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="2357" y="356" width="64" height="12" />
+ <dc:Bounds x="2335" y="331" width="64" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="IntermediateThrowEvent_0840e02_di" bpmnElement="IntermediateThrowEvent_0385ons">
- <dc:Bounds x="2343" y="392" width="36" height="36" />
+ <dc:Bounds x="2324" y="362" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="2393" y="383" width="60" height="24" />
+ <dc:Bounds x="2374" y="353" width="60" height="24" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1quapjx_di" bpmnElement="SequenceFlow_1quapjx">
- <di:waypoint xsi:type="dc:Point" x="2130" y="503" />
- <di:waypoint xsi:type="dc:Point" x="2345" y="416" />
+ <di:waypoint xsi:type="dc:Point" x="2128" y="501" />
+ <di:waypoint xsi:type="dc:Point" x="2326" y="389" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="2239" y="445" width="0" height="0" />
+ <dc:Bounds x="2227" y="430" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="IntermediateThrowEvent_1xq4kx8_di" bpmnElement="IntermediateThrowEvent_1p9i2bi">
- <dc:Bounds x="2371" y="439" width="36" height="36" />
+ <dc:Bounds x="2371" y="441" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="2412" y="440" width="90" height="12" />
+ <dc:Bounds x="2419" y="444" width="62" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="IntermediateThrowEvent_03b4y60_di" bpmnElement="IntermediateThrowEvent_0ee7wot">
@@ -2075,21 +2159,21 @@ execution.getVariable(retryVariableName) < execution.getVariable("maxRetryCount"
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="IntermediateThrowEvent_1ghdnpx_di" bpmnElement="IntermediateThrowEvent_0rp1ax0">
- <dc:Bounds x="2371" y="538" width="36" height="36" />
+ <dc:Bounds x="2362" y="572" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="2424" y="544" width="60" height="24" />
+ <dc:Bounds x="2415" y="578" width="60" height="24" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="IntermediateThrowEvent_1nls1oo_di" bpmnElement="IntermediateThrowEvent_01ngkx2">
- <dc:Bounds x="2352" y="582" width="36" height="36" />
+ <dc:Bounds x="2333" y="612" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="2401" y="587" width="60" height="24" />
+ <dc:Bounds x="2382" y="617" width="60" height="24" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="IntermediateThrowEvent_0qt249a_di" bpmnElement="IntermediateThrowEvent_0lbd0cs">
- <dc:Bounds x="2289" y="679" width="36" height="36" />
+ <dc:Bounds x="2276" y="686" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="2337" y="706" width="90" height="12" />
+ <dc:Bounds x="2324" y="713" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="IntermediateThrowEvent_0frwxx8_di" bpmnElement="IntermediateThrowEvent_1ycbds3">
@@ -2156,31 +2240,31 @@ execution.getVariable(retryVariableName) < execution.getVariable("maxRetryCount"
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="CallActivity_1y81g09_di" bpmnElement="Task_0eae8go">
- <dc:Bounds x="826" y="470" width="100" height="80" />
+ <dc:Bounds x="1060" y="470" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="CallActivity_0n20gvh_di" bpmnElement="Task_1dtbnuy">
<dc:Bounds x="126" y="470" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="CallActivity_08wyi5l_di" bpmnElement="Task_1sove95">
- <dc:Bounds x="826" y="760" width="100" height="80" />
+ <dc:Bounds x="123" y="1074" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="CallActivity_1a5n5ff_di" bpmnElement="Task_1fj63ov">
<dc:Bounds x="364" y="470" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="CallActivity_0mp082m_di" bpmnElement="Task_1ca5ctq">
- <dc:Bounds x="364" y="760" width="100" height="80" />
+ <dc:Bounds x="824" y="760" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="IntermediateThrowEvent_07dp1m8_di" bpmnElement="IntermediateThrowEvent_1kbtw2p">
- <dc:Bounds x="2324" y="634" width="36" height="36" />
+ <dc:Bounds x="2303" y="648" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="2345" y="668" width="60" height="24" />
+ <dc:Bounds x="2324" y="682" width="60" height="24" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_021ah63_di" bpmnElement="SequenceFlow_021ah63">
- <di:waypoint xsi:type="dc:Point" x="2127" y="520" />
- <di:waypoint xsi:type="dc:Point" x="2327" y="643" />
+ <di:waypoint xsi:type="dc:Point" x="2126" y="521" />
+ <di:waypoint xsi:type="dc:Point" x="2307" y="655" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="2227" y="566.5" width="0" height="0" />
+ <dc:Bounds x="2217" y="573" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ScriptTask_1qr054i_di" bpmnElement="ScriptTask_1qr054i">
@@ -2253,13 +2337,13 @@ execution.getVariable(retryVariableName) < execution.getVariable("maxRetryCount"
<dc:Bounds x="600" y="470" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="CallActivity_1kw9f96_di" bpmnElement="Task_1mdr1nd">
- <dc:Bounds x="1064" y="470" width="100" height="80" />
+ <dc:Bounds x="364" y="760" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="CallActivity_0d1uai9_di" bpmnElement="Task_1hdg951">
- <dc:Bounds x="123" y="760" width="100" height="80" />
+ <dc:Bounds x="583" y="760" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="CallActivity_1onqhy5_di" bpmnElement="Task_0h2nq31">
- <dc:Bounds x="601" y="760" width="100" height="80" />
+ <dc:Bounds x="1061" y="760" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ExclusiveGateway_1slvyx2_di" bpmnElement="ExclusiveGateway_1slvyx2" isMarkerVisible="true">
<dc:Bounds x="266" y="485" width="50" height="50" />
@@ -2297,6 +2381,147 @@ execution.getVariable(retryVariableName) < execution.getVariable("maxRetryCount"
<bpmndi:BPMNShape id="ScriptTask_032b6ij_di" bpmnElement="Task_1mt62gu">
<dc:Bounds x="491" y="1446" width="100" height="80" />
</bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_10yw9oj_di" bpmnElement="SequenceFlow_10yw9oj">
+ <di:waypoint xsi:type="dc:Point" x="1006" y="510" />
+ <di:waypoint xsi:type="dc:Point" x="1060" y="510" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1033" y="495" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0mnk8wv_di" bpmnElement="IntermediateThrowEvent_10hdz40">
+ <dc:Bounds x="856" y="581" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="843" y="617" width="62" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_02zphll_di" bpmnElement="SequenceFlow_02zphll">
+ <di:waypoint xsi:type="dc:Point" x="874" y="581" />
+ <di:waypoint xsi:type="dc:Point" x="874" y="550" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="889" y="565.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0bd79on_di" bpmnElement="ExclusiveGateway_0bd79on" isMarkerVisible="true">
+ <dc:Bounds x="955" y="485" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="946" y="447" width="68" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ayfzd3_di" bpmnElement="SequenceFlow_0ayfzd3">
+ <di:waypoint xsi:type="dc:Point" x="924" y="510" />
+ <di:waypoint xsi:type="dc:Point" x="955" y="510" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="940" y="495" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_112p1kw_di" bpmnElement="IntermediateThrowEvent_0u4t4eb">
+ <dc:Bounds x="962" y="581" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="945" y="617" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1qdt3ml_di" bpmnElement="SequenceFlow_1qdt3ml">
+ <di:waypoint xsi:type="dc:Point" x="980" y="535" />
+ <di:waypoint xsi:type="dc:Point" x="980" y="581" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="986" y="548" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_04cfhj4_di" bpmnElement="Task_0qa3yfr">
+ <dc:Bounds x="824" y="470" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_015qhj5_di" bpmnElement="SequenceFlow_015qhj5">
+ <di:waypoint xsi:type="dc:Point" x="2130" y="503" />
+ <di:waypoint xsi:type="dc:Point" x="2354" y="422" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2242" y="447.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1leefua_di" bpmnElement="IntermediateThrowEvent_0utxo48">
+ <dc:Bounds x="2352" y="398" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2398" y="400.907" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1xeh8rb_di" bpmnElement="SequenceFlow_1xeh8rb">
+ <di:waypoint xsi:type="dc:Point" x="2134" y="513" />
+ <di:waypoint xsi:type="dc:Point" x="2386" y="551" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2260" y="517" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_05jik84_di" bpmnElement="IntermediateThrowEvent_034letx">
+ <dc:Bounds x="2385" y="536" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2431" y="547.9069999999999" width="63" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1c2q423_di" bpmnElement="SequenceFlow_1c2q423">
+ <di:waypoint xsi:type="dc:Point" x="224" y="800" />
+ <di:waypoint xsi:type="dc:Point" x="266" y="800" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="245" y="785" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1aepvyq_di" bpmnElement="ExclusiveGateway_1aepvyq" isMarkerVisible="true">
+ <dc:Bounds x="266" y="775" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="256" y="733" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ugaydb_di" bpmnElement="SequenceFlow_0ugaydb">
+ <di:waypoint xsi:type="dc:Point" x="316" y="800" />
+ <di:waypoint xsi:type="dc:Point" x="364" y="800" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="334" y="775" width="12" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_12k801c_di" bpmnElement="SequenceFlow_12k801c">
+ <di:waypoint xsi:type="dc:Point" x="174" y="871" />
+ <di:waypoint xsi:type="dc:Point" x="174" y="840" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="189" y="855.5" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ouddzv_di" bpmnElement="SequenceFlow_1ouddzv">
+ <di:waypoint xsi:type="dc:Point" x="291" y="825" />
+ <di:waypoint xsi:type="dc:Point" x="291" y="871" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="298" y="842" width="18" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_01iotuk_di" bpmnElement="IntermediateThrowEvent_01xb76a">
+ <dc:Bounds x="156" y="871" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="142" y="907" width="63" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_05f5orq_di" bpmnElement="IntermediateThrowEvent_0d6k86e">
+ <dc:Bounds x="273" y="871" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="256" y="907" width="69" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1acjd9q_di" bpmnElement="Task_1j68pc1">
+ <dc:Bounds x="124" y="760" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_19sq3od_di" bpmnElement="Task_0n1d5f2">
+ <dc:Bounds x="1046" y="197" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1us5byg_di" bpmnElement="SequenceFlow_1us5byg">
+ <di:waypoint xsi:type="dc:Point" x="850" y="90" />
+ <di:waypoint xsi:type="dc:Point" x="982" y="90" />
+ <di:waypoint xsi:type="dc:Point" x="982" y="156" />
+ <di:waypoint xsi:type="dc:Point" x="103" y="156" />
+ <di:waypoint xsi:type="dc:Point" x="103" y="237" />
+ <di:waypoint xsi:type="dc:Point" x="131" y="237" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="543" y="141" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ServiceTask_1jatgi1_di" bpmnElement="Task_0op98k0">
+ <dc:Bounds x="750" y="50" width="100" height="80" />
+ </bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/SniroHomingV2.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/SniroHomingV2.java
index cb893ce950..2e7184b9ff 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/SniroHomingV2.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/SniroHomingV2.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -67,7 +69,8 @@ import org.onap.so.client.sniro.beans.ServiceInfo;
import org.onap.so.client.sniro.beans.SniroManagerRequest;
import org.onap.so.client.sniro.beans.SubscriberInfo;
import org.onap.so.db.catalog.beans.OrchestrationStatus;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;
@@ -84,7 +87,7 @@ import org.springframework.web.util.UriUtils;
@Component("SniroHoming")
public class SniroHomingV2 {
- private static final MsoLogger log = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, SniroHomingV2.class);
+ private static final Logger logger = LoggerFactory.getLogger(SniroHomingV2.class);
private JsonUtils jsonUtils = new JsonUtils();
@Autowired
private Environment env;
@@ -100,7 +103,6 @@ public class SniroHomingV2 {
private static final String RESOURCE_MODULE_NAME = "resourceModuleName";
private static final String RESOURCE_MODEL_INFO = "resourceModelInfo";
private static final String IDENTIFIER_TYPE = "identifierType";
- private static final String INVENTORY_TYPE = "inventoryType";
private static final String SOLUTIONS = "solutions";
private static final String RESOURCE_MISSING_DATA = "Resource does not contain: ";
private static final String SERVICE_MISSING_DATA = "Service Instance does not contain: ";
@@ -114,7 +116,7 @@ public class SniroHomingV2 {
* @param execution
*/
public void callSniro(BuildingBlockExecution execution){
- log.debug("Started Sniro Homing Call Sniro");
+ logger.debug("Started Sniro Homing Call Sniro");
try{
GeneralBuildingBlock bb = execution.getGeneralBuildingBlock();
@@ -153,7 +155,7 @@ public class SniroHomingV2 {
if(placementDemands.size() > 0 || licenseDemands.size() > 0){
client.postDemands(request);
}else{
- log.debug(SERVICE_MISSING_DATA + "resources eligible for homing or licensing");
+ logger.debug(SERVICE_MISSING_DATA + "resources eligible for homing or licensing");
throw new BpmnError(UNPROCESSABLE, SERVICE_MISSING_DATA + "resources eligible for homing or licensing");
}
@@ -162,15 +164,15 @@ public class SniroHomingV2 {
execution.setVariable("asyncMessageType", "SNIROResponse");
execution.setVariable("asyncTimeout", timeout);
- log.trace("Completed Sniro Homing Call Sniro");
+ logger.trace("Completed Sniro Homing Call Sniro");
}catch(BpmnError e){
- log.error(e);
+ logger.error("Exception occurred", e);
exceptionUtil.buildAndThrowWorkflowException(execution, Integer.parseInt(e.getErrorCode()), e.getMessage());
}catch(BadResponseException e){
- log.error(e);
+ logger.error("Exception occurred", e);
exceptionUtil.buildAndThrowWorkflowException(execution, 400, e.getMessage());
}catch(Exception e){
- log.error(e);
+ logger.error("Exception occurred", e);
exceptionUtil.buildAndThrowWorkflowException(execution, INTERNAL, "Internal Error - occurred while preparing sniro request: " + e.getMessage());
}
}
@@ -183,13 +185,13 @@ public class SniroHomingV2 {
* @param asyncResponse
*/
public void processSolution(BuildingBlockExecution execution, String asyncResponse){
- log.trace("Started Sniro Homing Process Solution");
+ logger.trace("Started Sniro Homing Process Solution");
try{
//TODO improve handling multiple solutions but is dependent on sniro enhancing api + work with sniro conductor to improve "inventoryType" representation
validateSolution(asyncResponse);
ServiceInstance serviceInstance = execution.getGeneralBuildingBlock().getCustomer().getServiceSubscription().getServiceInstances().get(0);
- log.debug("Processing sniro manager asyncronous response");
+ logger.debug("Processing sniro manager asyncronous response");
JSONObject response = new JSONObject(asyncResponse);
if(response.has(SOLUTIONS)){
JSONObject allSolutions = response.getJSONObject(SOLUTIONS);
@@ -212,15 +214,15 @@ public class SniroHomingV2 {
execution.setVariable("generalBuildingBlock", execution.getGeneralBuildingBlock());
- log.trace("Completed Sniro Homing Process Solution");
+ logger.trace("Completed Sniro Homing Process Solution");
}catch(BpmnError e){
- log.error(e);
+ logger.error("Exception occurred", e);
exceptionUtil.buildAndThrowWorkflowException(execution, Integer.parseInt(e.getErrorCode()), e.getMessage());
}catch(BadResponseException e){
- log.error(e);
+ logger.error("Exception occurred", e);
exceptionUtil.buildAndThrowWorkflowException(execution, 400, e.getMessage());
}catch(Exception e){
- log.error(e);
+ logger.error("Exception occurred", e);
exceptionUtil.buildAndThrowWorkflowException(execution, INTERNAL, "Internal Error - occurred while processing sniro asynchronous response: " + e.getMessage());
}
}
@@ -231,7 +233,7 @@ public class SniroHomingV2 {
* @throws Exception
*/
private RequestInfo buildRequestInfo(String requestId, String timeout) throws Exception{
- log.trace("Building request information");
+ logger.trace("Building request information");
RequestInfo requestInfo = new RequestInfo();
if(requestId != null){
String host = env.getProperty("mso.workflow.message.endpoint");
@@ -256,7 +258,7 @@ public class SniroHomingV2 {
*
*/
private ServiceInfo buildServiceInfo(ServiceInstance serviceInstance){
- log.trace("Building service information");
+ logger.trace("Building service information");
ServiceInfo info = new ServiceInfo();
ModelInfoServiceInstance modelInfo = serviceInstance.getModelInfoServiceInstance();
if(isNotBlank(modelInfo.getModelInvariantUuid()) && isNotBlank(modelInfo.getModelUuid())){
@@ -281,14 +283,14 @@ public class SniroHomingV2 {
private PlacementInfo buildPlacementInfo(Customer customer, RequestParameters requestParams){
PlacementInfo placementInfo = new PlacementInfo();
if(customer != null){
- log.debug("Adding subscriber to placement information");
+ logger.debug("Adding subscriber to placement information");
SubscriberInfo subscriber = new SubscriberInfo();
subscriber.setGlobalSubscriberId(customer.getGlobalCustomerId());
subscriber.setSubscriberName(customer.getSubscriberName());
subscriber.setSubscriberCommonSiteId(customer.getSubscriberCommonSiteId());
placementInfo.setSubscriberInfo(subscriber);
if(requestParams != null){
- log.debug("Adding request parameters to placement information");
+ logger.debug("Adding request parameters to placement information");
placementInfo.setRequestParameters(requestParams.toJsonString());
}
}else{
@@ -303,12 +305,12 @@ public class SniroHomingV2 {
*
*/
private List<Demand> buildPlacementDemands(ServiceInstance serviceInstance){
- log.trace("Building placement information demands");
+ logger.trace("Building placement information demands");
List<Demand> placementDemands = new ArrayList<Demand>();
List<AllottedResource> allottedResourceList = serviceInstance.getAllottedResources();
if(!allottedResourceList.isEmpty()){
- log.debug("Adding allotted resources to placement demands list");
+ logger.debug("Adding allotted resources to placement demands list");
for(AllottedResource ar : allottedResourceList){
if(isBlank(ar.getId())){
ar.setId(UUID.randomUUID().toString());
@@ -320,7 +322,7 @@ public class SniroHomingV2 {
}
List<VpnBondingLink> vpnBondingLinkList = serviceInstance.getVpnBondingLinks();
if(!vpnBondingLinkList.isEmpty()){
- log.debug("Adding vpn bonding links to placement demands list");
+ logger.debug("Adding vpn bonding links to placement demands list");
for(VpnBondingLink vbl:vpnBondingLinkList){
List<ServiceProxy> serviceProxyList = vbl.getServiceProxies();
for(ServiceProxy sp : serviceProxyList){
@@ -341,11 +343,11 @@ public class SniroHomingV2 {
*
*/
private List<Demand> buildLicenseDemands(ServiceInstance serviceInstance){
- log.trace("Building license information");
+ logger.trace("Building license information");
List<Demand> licenseDemands = new ArrayList<Demand>();
List<GenericVnf> vnfList = serviceInstance.getVnfs();
if(!vnfList.isEmpty()){
- log.debug("Adding vnfs to license demands list");
+ logger.debug("Adding vnfs to license demands list");
for(GenericVnf vnf : vnfList){
Demand demand = buildDemand(vnf.getVnfId(), vnf.getModelInfoGenericVnf());
licenseDemands.add(demand);
@@ -359,7 +361,7 @@ public class SniroHomingV2 {
*
*/
private Demand buildDemand(String id, ModelInfoMetadata metadata){
- log.debug("Building demand for service or resource: " + id);
+ logger.debug("Building demand for service or resource: " + id);
Demand demand = new Demand();
if(isNotBlank(id) && isNotBlank(metadata.getModelInstanceName())){
demand.setServiceResourceId(id);
@@ -431,7 +433,7 @@ public class SniroHomingV2 {
private void processLicenseSolution(ServiceInstance serviceInstance, JSONArray licenseSolutions){
List<GenericVnf> vnfs = serviceInstance.getVnfs();
- log.debug("Processing the license solution");
+ logger.debug("Processing the license solution");
for(int i = 0; i < licenseSolutions.length(); i++){
JSONObject licenseSolution = licenseSolutions.getJSONObject(i);
for(GenericVnf vnf:vnfs){
@@ -460,7 +462,7 @@ public class SniroHomingV2 {
List<AllottedResource> allottes = serviceInstance.getAllottedResources();
List<GenericVnf> vnfs = serviceInstance.getVnfs();
- log.debug("Processing placement solution " + i+1);
+ logger.debug("Processing placement solution " + i+1);
for(int p = 0; p < placements.length(); p++){
JSONObject placement = placements.getJSONObject(p);
SolutionInfo solutionInfo = new SolutionInfo();
@@ -508,7 +510,7 @@ public class SniroHomingV2 {
*
*/
private ServiceInstance setSolution(SolutionInfo solutionInfo, JSONObject placement){
- log.debug("Mapping placement solution");
+ logger.debug("Mapping placement solution");
String invalidMessage = "Sniro Managers Response contains invalid: ";
JSONObject solution = placement.getJSONObject("solution");
@@ -519,51 +521,40 @@ public class SniroHomingV2 {
JSONArray assignments = placement.getJSONArray("assignmentInfo");
Map<String, String> assignmentsMap = jsonUtils.entryArrayToMap(assignments.toString(), "key", "value");
solutionInfo.setRehome(Boolean.parseBoolean(assignmentsMap.get("isRehome")));
- String type = placement.getString(INVENTORY_TYPE);
ServiceInstance si = new ServiceInstance();
CloudRegion cloud = setCloud(assignmentsMap);
- if(type.equals("service")){
- if(identifierType.equals(CandidateType.SERVICE_INSTANCE_ID.toString())){
- solutionInfo.setHomed(true);
- si.setServiceInstanceId(identifierValue);
- si.setOrchestrationStatus(OrchestrationStatus.CREATED);
- cloud.setLcpCloudRegionId(assignmentsMap.get("cloudRegionId"));
- if(assignmentsMap.containsKey("vnfHostName")){
- log.debug("Resources has been homed to a vnf");
- GenericVnf vnf = setVnf(assignmentsMap);
- vnf.setCloudRegion(cloud);
- si.getVnfs().add(vnf);
-
- }else if(assignmentsMap.containsKey("primaryPnfName")){
- log.debug("Resources has been homed to a pnf");
- Pnf priPnf = setPnf(assignmentsMap, "primary");
- priPnf.setCloudRegion(cloud);
- si.getPnfs().add(priPnf);
- if(assignmentsMap.containsKey("secondaryPnfName")){
- Pnf secPnf = setPnf(assignmentsMap, "secondary");
- secPnf.setCloudRegion(cloud);
- si.getPnfs().add(secPnf);
- }
+ if(identifierType.equals(CandidateType.SERVICE_INSTANCE_ID.toString())){
+ solutionInfo.setHomed(true);
+ si.setServiceInstanceId(identifierValue);
+ si.setOrchestrationStatus(OrchestrationStatus.CREATED);
+ cloud.setLcpCloudRegionId(assignmentsMap.get("cloudRegionId"));
+ if(assignmentsMap.containsKey("vnfHostName")){
+ logger.debug("Resources has been homed to a vnf");
+ GenericVnf vnf = setVnf(assignmentsMap);
+ vnf.setCloudRegion(cloud);
+ si.getVnfs().add(vnf);
+
+ }else if(assignmentsMap.containsKey("primaryPnfName")){
+ logger.debug("Resources has been homed to a pnf");
+ Pnf priPnf = setPnf(assignmentsMap, "primary");
+ priPnf.setCloudRegion(cloud);
+ si.getPnfs().add(priPnf);
+ if(assignmentsMap.containsKey("secondaryPnfName")){
+ Pnf secPnf = setPnf(assignmentsMap, "secondary");
+ secPnf.setCloudRegion(cloud);
+ si.getPnfs().add(secPnf);
}
- }else{
- log.debug(invalidMessage + IDENTIFIER_TYPE);
- throw new BpmnError(UNPROCESSABLE, invalidMessage + IDENTIFIER_TYPE);
- }
- }else if(type.equals("cloud")){
- if(identifierType.equals(CandidateType.CLOUD_REGION_ID.toString())){
- log.debug("Resources has been homed to a cloud region");
- cloud.setLcpCloudRegionId(identifierValue);
- solutionInfo.setHomed(false);
- solutionInfo.setTargetedCloudRegion(cloud);
- si.setOrchestrationStatus(OrchestrationStatus.PRECREATED);
- }else{
- log.debug(invalidMessage + IDENTIFIER_TYPE);
- throw new BpmnError(UNPROCESSABLE, invalidMessage + IDENTIFIER_TYPE);
}
+ }else if(identifierType.equals(CandidateType.CLOUD_REGION_ID.toString())){
+ logger.debug("Resources has been homed to a cloud region");
+ cloud.setLcpCloudRegionId(identifierValue);
+ solutionInfo.setHomed(false);
+ solutionInfo.setTargetedCloudRegion(cloud);
+ si.setOrchestrationStatus(OrchestrationStatus.PRECREATED);
}else{
- log.debug(invalidMessage + INVENTORY_TYPE);
- throw new BpmnError(UNPROCESSABLE, invalidMessage + INVENTORY_TYPE);
+ logger.debug(invalidMessage + IDENTIFIER_TYPE);
+ throw new BpmnError(UNPROCESSABLE, invalidMessage + IDENTIFIER_TYPE);
}
si.setSolutionInfo(solutionInfo);
return si;
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasks.java
index f47781082d..8711f965fd 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasks.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -70,9 +72,7 @@ import org.springframework.stereotype.Component;
@Component
public class AAICreateTasks {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, AAICreateTasks.class);
- private static final Logger logger = LoggerFactory.getLogger(AAICreateTasks.class.getName());
-
+ private static final Logger logger = LoggerFactory.getLogger(AAICreateTasks.class);
private static final String networkTypeProvider = "PROVIDER";
private static String NETWORK_COLLECTION_NAME = "networkCollectionName";
private static String CONTRAIL_NETWORK_POLICY_FQDN_LIST = "contrailNetworkPolicyFqdnList";
@@ -117,9 +117,9 @@ public class AAICreateTasks {
if (null == customer) {
String errorMessage = "Exception in creating ServiceSubscription. Customer not present for ServiceInstanceID: "
+ serviceInstance.getServiceInstanceId();
- msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, errorMessage, "BPMN", MsoLogger.getServiceName(),
- MsoLogger.ErrorCode.UnknownError, errorMessage);
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, errorMessage);
+ logger.error("{} {} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), errorMessage, "BPMN",
+ MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError.getValue(), errorMessage);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, errorMessage);
}
aaiSIResources.createServiceSubscription(customer);
} catch (BpmnError ex) {
@@ -136,7 +136,7 @@ public class AAICreateTasks {
Project project = serviceInstance.getProject();
if(project != null) {
if (project.getProjectName() == null || "".equals(project.getProjectName())) {
- msoLogger.info("ProjectName is null in input. Skipping create project...");
+ logger.info("ProjectName is null in input. Skipping create project...");
} else {
aaiSIResources.createProjectandConnectServiceInstance(project, serviceInstance);
}
@@ -162,14 +162,14 @@ public class AAICreateTasks {
} else {
if (owningEntityName == null || "".equals(owningEntityName)) {
String msg = "Exception in AAICreateOwningEntity. Can't create an owningEntity with no owningEntityName.";
- msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, msg, "BPMN", MsoLogger.getServiceName(),
- MsoLogger.ErrorCode.UnknownError, msg);
+ logger.error("{} {} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
+ MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError.getValue(), msg);
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg);
} else {
if(aaiSIResources.existsOwningEntityName(owningEntityName)){
String msg = "Exception in AAICreateOwningEntity. Can't create OwningEntity as name already exists in AAI associated with a different owning-entity-id (name must be unique)";
- msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, msg, "BPMN", MsoLogger.getServiceName(),
- MsoLogger.ErrorCode.UnknownError, msg);
+ logger.error("{} {} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
+ MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError.getValue(), msg);
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg);
}else{
aaiSIResources.createOwningEntityandConnectServiceInstance(owningEntity, serviceInstance);
@@ -199,7 +199,7 @@ public class AAICreateTasks {
Platform platform = vnf.getPlatform();
if(platform != null) {
if (platform.getPlatformName() == null || "".equals(platform.getPlatformName())) {
- msoLogger.debug("PlatformName is null in input. Skipping create platform...");
+ logger.debug("PlatformName is null in input. Skipping create platform...");
} else {
aaiVnfResources.createPlatformandConnectVnf(platform,vnf);
}
@@ -216,7 +216,7 @@ public class AAICreateTasks {
LineOfBusiness lineOfBusiness = vnf.getLineOfBusiness();
if(lineOfBusiness != null) {
if (lineOfBusiness.getLineOfBusinessName() == null || "".equals(lineOfBusiness.getLineOfBusinessName())) {
- msoLogger.info("lineOfBusiness is null in input. Skipping create lineOfBusiness...");
+ logger.info("lineOfBusiness is null in input. Skipping create lineOfBusiness...");
} else {
aaiVnfResources.createLineOfBusinessandConnectVnf(lineOfBusiness,vnf);
}
@@ -269,7 +269,7 @@ public class AAICreateTasks {
try{
volumeGroup = extractPojosForBB.extractByKey(execution, ResourceKey.VOLUME_GROUP_ID, execution.getLookupMap().get(ResourceKey.VOLUME_GROUP_ID));
} catch (BBObjectNotFoundException e){
- msoLogger.info("VolumeGroup not found. Skipping Connect between VfModule and VolumeGroup");
+ logger.info("VolumeGroup not found. Skipping Connect between VfModule and VolumeGroup");
}
if (volumeGroup != null) {
aaiVfModuleResources.connectVfModuleToVolumeGroup(vnf, vfModule, volumeGroup, execution.getGeneralBuildingBlock().getCloudRegion());
@@ -463,9 +463,9 @@ public class AAICreateTasks {
uri.queryParam(NETWORK_POLICY_FQDN_PARAM, fqdn);
Optional<org.onap.aai.domain.yang.NetworkPolicy> oNetPolicy = aaiNetworkResources.getNetworkPolicy(uri);
if(!oNetPolicy.isPresent()) {
- msoLogger.debug("This network policy FQDN is not in AAI yet: " + fqdn);
+ logger.debug("This network policy FQDN is not in AAI yet: {}", fqdn);
String networkPolicyId = UUID.randomUUID().toString();
- msoLogger.debug("Adding network-policy with network-policy-id " + networkPolicyId);
+ logger.debug("Adding network-policy with network-policy-id {}", networkPolicyId);
NetworkPolicy networkPolicy = new NetworkPolicy();
networkPolicy.setNetworkPolicyId(networkPolicyId);
networkPolicy.setNetworkPolicyFqdn(fqdn);
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIDeleteTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIDeleteTasks.java
index 0d9aeed1ae..4908cda26a 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIDeleteTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIDeleteTasks.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -46,13 +48,14 @@ import org.onap.so.client.orchestration.AAIServiceInstanceResources;
import org.onap.so.client.orchestration.AAIVfModuleResources;
import org.onap.so.client.orchestration.AAIVnfResources;
import org.onap.so.client.orchestration.AAIVolumeGroupResources;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class AAIDeleteTasks {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, AAIDeleteTasks.class);
+ private static final Logger logger = LoggerFactory.getLogger(AAIDeleteTasks.class);
private static String CONTRAIL_NETWORK_POLICY_FQDN_LIST = "contrailNetworkPolicyFqdnList";
private static String NETWORK_POLICY_FQDN_PARAM = "network-policy-fqdn";
@@ -177,7 +180,7 @@ public class AAIDeleteTasks {
if (networkPolicyList != null && !networkPolicyList.isEmpty()) {
NetworkPolicy networkPolicy = networkPolicyList.get(0);
String networkPolicyId = networkPolicy.getNetworkPolicyId();
- msoLogger.debug("Deleting network-policy with network-policy-id " + networkPolicyId);
+ logger.debug("Deleting network-policy with network-policy-id {}", networkPolicyId);
aaiNetworkResources.deleteNetworkPolicy(networkPolicyId);
}
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIFlagTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIFlagTasks.java
index 53d0e0a45c..94529f915b 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIFlagTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIFlagTasks.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -25,15 +27,15 @@ import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey;
import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB;
import org.onap.so.client.exception.ExceptionBuilder;
-import org.onap.so.client.orchestration.AAIVfModuleResources;
import org.onap.so.client.orchestration.AAIVnfResources;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class AAIFlagTasks {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, AAIFlagTasks.class);
+ private static final Logger logger = LoggerFactory.getLogger(AAIFlagTasks.class);
@Autowired
private AAIVnfResources aaiVnfResources;
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIQueryTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIQueryTasks.java
index 46ff8495f9..e89dffc6d9 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIQueryTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIQueryTasks.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -42,14 +44,15 @@ import org.onap.so.client.aai.entities.Relationships;
import org.onap.so.client.aai.entities.uri.AAIResourceUri;
import org.onap.so.client.exception.ExceptionBuilder;
import org.onap.so.client.orchestration.AAINetworkResources;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class AAIQueryTasks {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, AAIQueryTasks.class);
+ private static final Logger logger = LoggerFactory.getLogger(AAIQueryTasks.class);
private static final String ERROR_MSG = "No relationships were returned from AAIResultWrapper.getRelationships()";
@Autowired
private ExtractPojosForBB extractPojosForBB;
@@ -116,7 +119,7 @@ public class AAIQueryTasks {
.getRelatedAAIUris(AAIObjectType.VPN_BINDING);
List<org.onap.so.openstack.beans.RouteTarget> routeTargets = new ArrayList<>();
for (AAIResourceUri netBindingUri : netBindingsUriList) {
- msoLogger.info("Get Route Targests");
+ logger.info("Get Route Targests");
Optional<VpnBinding> oVpnBinding = aaiNetworkResources.getVpnBinding(netBindingUri);
if (oVpnBinding.isPresent()) {
VpnBinding vpnBinding = oVpnBinding.get();
@@ -247,4 +250,4 @@ public class AAIQueryTasks {
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
}
}
-} \ No newline at end of file
+}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java
index 5176bee0d6..34598ef00a 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -24,6 +26,7 @@ import java.util.List;
import java.util.Map;
import org.onap.so.adapters.nwrest.CreateNetworkResponse;
+import org.onap.so.adapters.nwrest.UpdateNetworkResponse;
import org.onap.so.bpmn.common.BuildingBlockExecution;
import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
import org.onap.so.bpmn.servicedecomposition.bbobjects.Collection;
@@ -47,13 +50,14 @@ import org.onap.so.client.orchestration.AAIVfModuleResources;
import org.onap.so.client.orchestration.AAIVnfResources;
import org.onap.so.client.orchestration.AAIVolumeGroupResources;
import org.onap.so.db.catalog.beans.OrchestrationStatus;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class AAIUpdateTasks {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, AAIUpdateTasks.class);
+ private static final Logger logger = LoggerFactory.getLogger(AAIUpdateTasks.class);
private static final String ALACARTE = "aLaCarte";
private static final String MULTI_STAGE_DESIGN_OFF = "false";
private static final String MULTI_STAGE_DESIGN_ON = "true";
@@ -335,7 +339,7 @@ public class AAIUpdateTasks {
}
/**
- * BPMN access method to update L3Network after it was created in AIC
+ * BPMN access method to update L3Network after it was created in cloud
* @param execution
* @throws Exception
*/
@@ -376,6 +380,34 @@ public class AAIUpdateTasks {
}
}
+ /**
+ * BPMN access method to update L3Network after it was updated in cloud
+ * @param execution
+ * @throws Exception
+ */
+ public void updateNetworkUpdated(BuildingBlockExecution execution) throws Exception {
+ L3Network l3network = extractPojosForBB.extractByKey(execution, ResourceKey.NETWORK_ID, execution.getLookupMap().get(ResourceKey.NETWORK_ID));
+ L3Network copiedl3network = l3network.shallowCopyId();
+ UpdateNetworkResponse response = execution.getVariable("updateNetworkResponse");
+ try {
+ copiedl3network.setNeutronNetworkId(response.getNeutronNetworkId());
+ aaiNetworkResources.updateNetwork(copiedl3network);
+
+ Map<String, String> subnetMap = response.getSubnetMap();
+ List<Subnet> subnets = l3network.getSubnets();
+ if (subnets != null && subnetMap != null){
+ for (Subnet subnet: subnets){
+ Subnet copiedSubnet = subnet.shallowCopyId();
+ copiedSubnet.setNeutronSubnetId(subnetMap.get(copiedSubnet.getSubnetId()));
+ copiedSubnet.setOrchestrationStatus(OrchestrationStatus.CREATED);
+ aaiNetworkResources.updateSubnet(copiedl3network, copiedSubnet);
+ }
+ }
+ } catch (Exception ex) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
+ }
+ }
+
public void updateObjectNetwork(BuildingBlockExecution execution) {
try {
L3Network l3network = extractPojosForBB.extractByKey(execution, ResourceKey.NETWORK_ID, execution.getLookupMap().get(ResourceKey.NETWORK_ID));
@@ -498,4 +530,4 @@ public class AAIUpdateTasks {
}
}
-} \ No newline at end of file
+}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/activity/ExecuteActivity.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/activity/ExecuteActivity.java
index acef0cb354..1402cebfbc 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/activity/ExecuteActivity.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/activity/ExecuteActivity.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -38,6 +40,8 @@ import org.onap.so.logger.MessageEnum;
import org.onap.so.logger.MsoLogger;
import org.onap.so.serviceinstancebeans.RequestDetails;
import org.onap.so.serviceinstancebeans.ServiceInstancesRequest;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@@ -46,7 +50,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
@Component("ExecuteActivity")
public class ExecuteActivity implements JavaDelegate {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, ExecuteActivity.class);
+ private static final Logger logger = LoggerFactory.getLogger(ExecuteActivity.class);
private static final String G_BPMN_REQUEST = "bpmnRequest";
private static final String VNF_TYPE = "vnfType";
private static final String G_ACTION = "requestAction";
@@ -70,12 +74,12 @@ public class ExecuteActivity implements JavaDelegate {
try {
final String implementationString = execution.getBpmnModelElementInstance().getAttributeValue(SERVICE_TASK_IMPLEMENTATION_ATTRIBUTE);
- msoLogger.debug("activity implementation String: " + implementationString);
+ logger.debug("activity implementation String: {}", implementationString);
if (!implementationString.startsWith(ACTIVITY_PREFIX)) {
buildAndThrowException(execution, "Implementation attribute has a wrong format");
}
String activityName = implementationString.replaceFirst(ACTIVITY_PREFIX, "");
- msoLogger.info("activityName is: " + activityName);
+ logger.info("activityName is: {}", activityName);
BuildingBlock buildingBlock = buildBuildingBlock(activityName);
ExecuteBuildingBlock executeBuildingBlock = buildExecuteBuildingBlock(execution, requestId, buildingBlock);
@@ -91,7 +95,7 @@ public class ExecuteActivity implements JavaDelegate {
WorkflowException workflowException = (WorkflowException) variableMap.get("WorklfowException");
if (workflowException != null) {
- msoLogger.error("Workflow exception is: " + workflowException.getErrorMessage());
+ logger.error("Workflow exception is: {}", workflowException.getErrorMessage());
}
execution.setVariable("WorkflowException", workflowException);
}
@@ -131,14 +135,14 @@ public class ExecuteActivity implements JavaDelegate {
}
protected void buildAndThrowException(DelegateExecution execution, String msg, Exception ex) {
- msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, msg, "BPMN", MsoLogger.getServiceName(),
- MsoLogger.ErrorCode.UnknownError, msg, ex);
+ logger.error("{} {} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
+ MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError.getValue(), msg, ex);
execution.setVariable("ExecuteActivityErrorMessage", msg);
exceptionBuilder.buildAndThrowWorkflowException(execution, 7000, msg);
}
protected void buildAndThrowException(DelegateExecution execution, String msg) {
- msoLogger.error(msg);
+ logger.error(msg);
execution.setVariable("ExecuteActuvityErrorMessage", msg);
exceptionBuilder.buildAndThrowWorkflowException(execution, 7000, msg);
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/network/tasks/NetworkAdapterUpdateTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/network/tasks/NetworkAdapterUpdateTasks.java
index ef2cf86f01..61687081d9 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/network/tasks/NetworkAdapterUpdateTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/network/tasks/NetworkAdapterUpdateTasks.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -20,8 +22,7 @@
package org.onap.so.bpmn.infrastructure.adapter.network.tasks;
-import java.util.Optional;
-
+import org.onap.so.adapters.nwrest.UpdateNetworkRequest;
import org.onap.so.adapters.nwrest.UpdateNetworkResponse;
import org.onap.so.bpmn.common.BuildingBlockExecution;
import org.onap.so.bpmn.servicedecomposition.bbobjects.L3Network;
@@ -29,20 +30,22 @@ import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
import org.onap.so.bpmn.servicedecomposition.entities.GeneralBuildingBlock;
import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey;
import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB;
+import org.onap.so.client.adapter.network.mapper.NetworkAdapterObjectMapper;
import org.onap.so.client.exception.ExceptionBuilder;
import org.onap.so.client.orchestration.NetworkAdapterResources;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class NetworkAdapterUpdateTasks {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, NetworkAdapterUpdateTasks.class);
+ private static final Logger logger = LoggerFactory.getLogger(NetworkAdapterUpdateTasks.class);
@Autowired
private ExtractPojosForBB extractPojosForBB;
@Autowired
- private NetworkAdapterResources networkAdapterResources;
+ private NetworkAdapterObjectMapper networkAdapterObjectMapper;
@Autowired
private ExceptionBuilder exceptionUtil;
@@ -51,14 +54,23 @@ public class NetworkAdapterUpdateTasks {
GeneralBuildingBlock gBBInput = execution.getGeneralBuildingBlock();
ServiceInstance serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID, execution.getLookupMap().get(ResourceKey.SERVICE_INSTANCE_ID));
L3Network l3Network = extractPojosForBB.extractByKey(execution, ResourceKey.NETWORK_ID, execution.getLookupMap().get(ResourceKey.NETWORK_ID));
- Optional<UpdateNetworkResponse> oUpdateNetworkResponse = networkAdapterResources.updateNetwork(gBBInput.getRequestContext(), gBBInput.getCloudRegion(), gBBInput.getOrchContext(), serviceInstance, l3Network, gBBInput.getUserInput(), gBBInput.getCustomer());
- if(oUpdateNetworkResponse.isPresent()) {
- UpdateNetworkResponse updateNetworkResponse = oUpdateNetworkResponse.get();
- execution.setVariable("NetworkAdapterUpdateNetworkResponse", updateNetworkResponse);
- }
+ UpdateNetworkRequest updateNetworkRequest = networkAdapterObjectMapper.createNetworkUpdateRequestMapper(gBBInput.getRequestContext(), gBBInput.getCloudRegion(), gBBInput.getOrchContext(), serviceInstance, l3Network, gBBInput.getUserInput(), gBBInput.getCustomer());
+ execution.setVariable("networkAdapterRequest", updateNetworkRequest);
+
} catch(Exception ex) {
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
}
}
+
+ public void processResponseFromOpenstack(BuildingBlockExecution execution) {
+ try {
+ UpdateNetworkResponse updateNetworkResponse = execution.getVariable("updateNetworkResponse");
+ if(updateNetworkResponse == null) {
+ throw new Exception("No response was sent back from NetworkAdapterRestV1 subflow.");
+ }
+ } catch (Exception ex) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
+ }
+ }
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterCreateTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterCreateTasks.java
index 3456fa1c56..932558d8ad 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterCreateTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterCreateTasks.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -37,13 +39,14 @@ import org.onap.so.client.exception.BBObjectNotFoundException;
import org.onap.so.client.exception.ExceptionBuilder;
import org.onap.so.client.orchestration.VnfAdapterVfModuleResources;
import org.onap.so.client.orchestration.VnfAdapterVolumeGroupResources;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class VnfAdapterCreateTasks {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, VnfAdapterCreateTasks.class);
+ private static final Logger logger = LoggerFactory.getLogger(VnfAdapterCreateTasks.class);
private static final String VNFREST_REQUEST = "VNFREST_Request";
@Autowired
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterDeleteTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterDeleteTasks.java
index 48b4ebb982..759ec61878 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterDeleteTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterDeleteTasks.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -33,13 +35,14 @@ import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB;
import org.onap.so.client.exception.ExceptionBuilder;
import org.onap.so.client.orchestration.VnfAdapterVfModuleResources;
import org.onap.so.client.orchestration.VnfAdapterVolumeGroupResources;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class VnfAdapterDeleteTasks {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, VnfAdapterDeleteTasks.class);
+ private static final Logger logger = LoggerFactory.getLogger(VnfAdapterDeleteTasks.class);
private static final String VNFREST_REQUEST = "VNFREST_Request";
@Autowired
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterImpl.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterImpl.java
index 0851dc9d95..47357d8ef3 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterImpl.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterImpl.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -37,6 +39,8 @@ import org.onap.so.client.exception.ExceptionBuilder;
import org.onap.so.exceptions.MarshallerException;
import org.onap.so.logger.MessageEnum;
import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.xml.sax.InputSource;
@@ -55,7 +59,7 @@ import java.util.Map;
@Component
public class VnfAdapterImpl {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, VnfAdapterImpl.class);
+ private static final Logger logger = LoggerFactory.getLogger(VnfAdapterImpl.class);
private static final String CONTRAIL_SERVICE_INSTANCE_FQDN = "contrailServiceInstanceFqdn";
private static final String OAM_MANAGEMENT_V4_ADDRESS = "oamManagementV4Address";
private static final String OAM_MANAGEMENT_V6_ADDRESS = "oamManagementV6Address";
@@ -163,8 +167,9 @@ public class VnfAdapterImpl {
SAXSource source = new SAXSource(xmlReader, inputSource);
return jaxbUnmarshaller.unmarshal(source);
} catch (Exception e) {
- msoLogger.error(MessageEnum.GENERAL_EXCEPTION, "", "", "", MsoLogger.ErrorCode.SchemaError, e.getMessage(), e);
- throw new MarshallerException("Error parsing VNF Adapter response. " + e.getMessage(), MsoLogger.ErrorCode.SchemaError.getValue(), e);
+ logger.error("{} {} {}", MessageEnum.GENERAL_EXCEPTION.toString(), MsoLogger.ErrorCode.SchemaError.getValue(),
+ e.getMessage(), e);
+ throw new MarshallerException("Error parsing VNF Adapter response. " + e.getMessage(), MsoLogger.ErrorCode.SchemaError.getValue(), e);
}
}
@@ -181,24 +186,24 @@ public class VnfAdapterImpl {
String key = keys.next();
if (key.equals("contrail-service-instance-fqdn")) {
String contrailServiceInstanceFqdn = vfModuleOutputs.get(key);
- msoLogger.debug("Obtained contrailServiceInstanceFqdn: " + contrailServiceInstanceFqdn);
+ logger.debug("Obtained contrailServiceInstanceFqdn: {}", contrailServiceInstanceFqdn);
vfModule.setContrailServiceInstanceFqdn(contrailServiceInstanceFqdn);
execution.setVariable(CONTRAIL_SERVICE_INSTANCE_FQDN, contrailServiceInstanceFqdn);
}
else if (key.endsWith("contrail_network_policy_fqdn")) {
String contrailNetworkPolicyFqdn = vfModuleOutputs.get(key);
- msoLogger.debug("Obtained contrailNetworkPolicyFqdn: " + contrailNetworkPolicyFqdn);
+ logger.debug("Obtained contrailNetworkPolicyFqdn: {}", contrailNetworkPolicyFqdn);
contrailNetworkPolicyFqdnList.add(contrailNetworkPolicyFqdn);
}
else if (key.equals("oam_management_v4_address")) {
String oamManagementV4Address = vfModuleOutputs.get(key);
- msoLogger.debug("Obtained oamManagementV4Address: " + oamManagementV4Address);
+ logger.debug("Obtained oamManagementV4Address: {}", oamManagementV4Address);
genericVnf.setIpv4OamAddress(oamManagementV4Address);
execution.setVariable(OAM_MANAGEMENT_V4_ADDRESS, oamManagementV4Address);
}
else if (key.equals("oam_management_v6_address")) {
String oamManagementV6Address = vfModuleOutputs.get(key);
- msoLogger.debug("Obtained oamManagementV6Address: " + oamManagementV6Address);
+ logger.debug("Obtained oamManagementV6Address: {}", oamManagementV6Address);
genericVnf.setManagementV6Address(oamManagementV6Address);
execution.setVariable(OAM_MANAGEMENT_V6_ADDRESS, oamManagementV6Address);
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/appc/tasks/AppcRunTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/appc/tasks/AppcRunTasks.java
index e0cbb82484..e0516ce9af 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/appc/tasks/AppcRunTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/appc/tasks/AppcRunTasks.java
@@ -39,12 +39,14 @@ import org.onap.so.db.catalog.beans.ControllerSelectionReference;
import org.onap.so.db.catalog.client.CatalogDbClient;
import org.onap.so.logger.MessageEnum;
import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class AppcRunTasks {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, AppcRunTasks.class);
+ private static final Logger logger = LoggerFactory.getLogger(AppcRunTasks.class);
@Autowired
private ExceptionBuilder exceptionUtil;
@Autowired
@@ -72,7 +74,7 @@ public class AppcRunTasks {
}
public void runAppcCommand(BuildingBlockExecution execution, Action action) {
- msoLogger.trace("Start runAppcCommand ");
+ logger.trace("Start runAppcCommand ");
String appcCode = "1002";
String appcMessage = "";
try {
@@ -123,22 +125,24 @@ public class AppcRunTasks {
if (pay != null) {
payload = Optional.of(pay);
}
- }
- msoLogger.debug("Running APP-C action: " + action.toString());
- msoLogger.debug("VNFID: " + vnfId);
+ }
+ logger.debug("Running APP-C action: {}", action.toString());
+ logger.debug("VNFID: {}", vnfId);
appCClient.runAppCCommand(action, msoRequestId, vnfId, payload, payloadInfo, controllerType);
appcCode = appCClient.getErrorCode();
appcMessage = appCClient.getErrorMessage();
mapRollbackVariables(execution, action, appcCode);
}
catch (Exception e) {
- msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "Caught exception in runAppcCommand", "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "APPC Error", e);
+ logger.error("{} {} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION.toString(),
+ "Caught exception in runAppcCommand", "BPMN", MsoLogger.getServiceName(),
+ MsoLogger.ErrorCode.UnknownError.getValue(), "APPC Error", e);
appcMessage = e.getMessage();
}
- msoLogger.error("Error Message: " + appcMessage);
- msoLogger.error("ERROR CODE: " + appcCode);
- msoLogger.trace("End of runAppCommand ");
+ logger.error("Error Message: {}", appcMessage);
+ logger.error("ERROR CODE: {}", appcCode);
+ logger.trace("End of runAppCommand ");
if (appcCode != null && !appcCode.equals("0")) {
exceptionUtil.buildAndThrowWorkflowException(execution, Integer.parseInt(appcCode), appcMessage);
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignNetwork.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignNetwork.java
index 7c9e000a44..753a29f208 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignNetwork.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignNetwork.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -24,15 +26,15 @@ import org.onap.so.bpmn.servicedecomposition.bbobjects.L3Network;
import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey;
import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB;
import org.onap.so.db.catalog.beans.OrchestrationStatus;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class AssignNetwork {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,
- AssignNetwork.class);
+ private static final Logger logger = LoggerFactory.getLogger(AssignNetwork.class);
@Autowired
private ExtractPojosForBB extractPojosForBB;
@@ -50,7 +52,7 @@ public class AssignNetwork {
if (!OrchestrationStatus.PRECREATED.equals(l3network.getOrchestrationStatus())){
networkFound = true;
- msoLogger.debug("network found in NOT PRECREATED status");
+ logger.debug("network found in NOT PRECREATED status");
}
} catch (Exception ex) {
// return false if no network present
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignNetworkBBUtils.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignNetworkBBUtils.java
index 6217f87420..df3f5465e6 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignNetworkBBUtils.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignNetworkBBUtils.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -27,15 +29,15 @@ import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB;
import org.onap.so.client.exception.ExceptionBuilder;
import org.onap.so.client.orchestration.AAINetworkResources;
import org.onap.so.client.orchestration.SDNCNetworkResources;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class AssignNetworkBBUtils {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,
- AssignNetworkBBUtils.class);
+ private static final Logger logger = LoggerFactory.getLogger(AssignNetworkBBUtils.class);
@Autowired
private ExceptionBuilder exceptionUtil;
@Autowired
@@ -85,7 +87,7 @@ public class AssignNetworkBBUtils {
*/
public void processSilentSuccess(BuildingBlockExecution execution) {
String msg = "Silent success processing network assign";
- msoLogger.info(msg);
+ logger.info(msg);
}
/**
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/CloudSiteCatalogUtils.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/CloudSiteCatalogUtils.java
new file mode 100644
index 0000000000..bba883e727
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/CloudSiteCatalogUtils.java
@@ -0,0 +1,76 @@
+/*-
+ * ============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.infrastructure.flowspecific.tasks;
+
+import java.util.Optional;
+
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.onap.so.client.exception.ExceptionBuilder;
+import org.onap.so.db.catalog.client.CatalogDbClient;
+import org.onap.so.db.catalog.beans.CloudSite;
+import org.onap.so.logger.MsoLogger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+@Component
+public class CloudSiteCatalogUtils {
+
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, CloudSiteCatalogUtils.class);
+ @Autowired
+ private ExceptionBuilder exceptionUtil;
+
+ @Autowired
+ private CatalogDbClient catalogDbClient;
+
+
+ public void getIdentityUrlFromCloudSite(DelegateExecution execution) {
+ String cloudRegionId = (String) execution.getVariable("lcpCloudRegionId");
+
+ if (cloudRegionId != null) {
+ Optional<CloudSite> cloudSite = getCloudSite(cloudRegionId);
+ if (!cloudSite.isPresent()) {
+ msoLogger.debug("Cloud Region with cloudRegionId " + cloudRegionId + " not found in Catalog DB");
+ exceptionUtil.buildAndThrowWorkflowException(execution, 404, "Cloud Region with cloudRegionId " + cloudRegionId + " not found in Catalog DB");
+ }
+
+ if (cloudSite.get().getIdentityService() == null) {
+ msoLogger.debug("No identityService found for Cloud Region with cloudRegionId " + cloudRegionId + " in Catalog DB");
+ exceptionUtil.buildAndThrowWorkflowException(execution, 404, "No identityService found for Cloud Region with cloudRegionId " + cloudRegionId + " in Catalog DB");
+ }
+ String identityUrl = cloudSite.get().getIdentityService().getIdentityUrl();
+
+ msoLogger.debug("identityUrl from Catalog DB is: " + identityUrl);
+ execution.setVariable("identityUrl", identityUrl);
+ }
+ }
+
+ protected Optional<CloudSite> getCloudSite(String id) {
+ if (id == null) {
+ return Optional.empty();
+ }
+ CloudSite cloudSite = catalogDbClient.getCloudSite(id);
+
+ if (cloudSite != null) {
+ return Optional.of(cloudSite);
+ } else {
+ return(Optional.of(catalogDbClient.getCloudSiteByClliAndAicVersion(id,"2.5")));
+ }
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigurationScaleOut.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigurationScaleOut.java
index 615b7279dc..ba04b16b14 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigurationScaleOut.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigurationScaleOut.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -39,6 +41,8 @@ import org.onap.so.db.catalog.beans.ControllerSelectionReference;
import org.onap.so.db.catalog.client.CatalogDbClient;
import org.onap.so.logger.MessageEnum;
import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@@ -48,7 +52,7 @@ import com.jayway.jsonpath.JsonPath;
@Component
public class ConfigurationScaleOut {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, ConfigurationScaleOut.class);
+ private static final Logger logger = LoggerFactory.getLogger(ConfigurationScaleOut.class);
@Autowired
private ExceptionBuilder exceptionUtil;
@Autowired
@@ -100,7 +104,7 @@ public class ConfigurationScaleOut {
configScaleOutParam = JsonPath.parse(sdncVfModuleQueryResponse).read(paramValue);
}catch(ClassCastException e){
configScaleOutParam = null;
- msoLogger.warnSimple("Incorrect JSON path. Path points to object rather than value causing: ", e);
+ logger.warn("Incorrect JSON path. Path points to object rather than value causing: ", e);
}
paramsMap.put(key, configScaleOutParam);
}
@@ -125,7 +129,7 @@ public class ConfigurationScaleOut {
}
public void callAppcClient(BuildingBlockExecution execution) {
- msoLogger.trace("Start runAppcCommand ");
+ logger.trace("Start runAppcCommand ");
String appcCode = "1002";
String appcMessage = "";
try{
@@ -141,20 +145,22 @@ public class ConfigurationScaleOut {
HashMap<String, String> payloadInfo = new HashMap<>();
payloadInfo.put(VNF_NAME, execution.getVariable(VNF_NAME));
payloadInfo.put(VFMODULE_ID,execution.getVariable(VFMODULE_ID));
- msoLogger.debug("Running APP-C action: " + commandAction.toString());
- msoLogger.debug("VNFID: " + vnfId);
+ logger.debug("Running APP-C action: {}", commandAction.toString());
+ logger.debug("VNFID: {}", vnfId);
//PayloadInfo contains extra information that adds on to payload before making request to appc
appCClient.runAppCCommand(commandAction, msoRequestId, vnfId, payloadString, payloadInfo, controllerType);
appcCode = appCClient.getErrorCode();
appcMessage = appCClient.getErrorMessage();
} catch (Exception e) {
- msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "Caught exception in runAppcCommand in ConfigurationScaleOut", "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "APPC Error", e);
+ logger.error("{} {} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION.toString(),
+ "Caught exception in runAppcCommand in ConfigurationScaleOut", "BPMN",
+ MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError.getValue(), "APPC Error", e);
appcMessage = e.getMessage();
}
- msoLogger.error("Error Message: " + appcMessage);
- msoLogger.error("ERROR CODE: " + appcCode);
- msoLogger.trace("End of runAppCommand ");
+ logger.error("Error Message: " + appcMessage);
+ logger.error("ERROR CODE: " + appcCode);
+ logger.trace("End of runAppCommand ");
if (appcCode != null && !appcCode.equals("0")) {
exceptionUtil.buildAndThrowWorkflowException(execution, Integer.parseInt(appcCode), appcMessage);
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/CreateNetwork.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/CreateNetwork.java
index 08d5afcc44..962d4fa8c4 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/CreateNetwork.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/CreateNetwork.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -30,14 +32,15 @@ import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey;
import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB;
import org.onap.so.client.adapter.network.mapper.NetworkAdapterObjectMapper;
import org.onap.so.client.exception.ExceptionBuilder;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class CreateNetwork {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, CreateNetwork.class);
+ private static final Logger logger = LoggerFactory.getLogger(CreateNetwork.class);
@Autowired
private ExceptionBuilder exceptionUtil;
@Autowired
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/CreateNetworkCollection.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/CreateNetworkCollection.java
index c8c4d439bd..060775e1d7 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/CreateNetworkCollection.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/CreateNetworkCollection.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -27,13 +29,14 @@ import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey;
import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB;
import org.onap.so.client.exception.ExceptionBuilder;
import org.onap.so.client.orchestration.AAINetworkResources;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class CreateNetworkCollection {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, CreateNetworkCollection.class);
+ private static final Logger logger = LoggerFactory.getLogger(CreateNetworkCollection.class);
@Autowired
private ExceptionBuilder exceptionUtil;
@Autowired
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheck.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheck.java
index 4f2e2c98d2..bb33b521d6 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheck.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheck.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -21,9 +23,6 @@ package org.onap.so.bpmn.infrastructure.flowspecific.tasks;
import java.util.HashMap;
import java.util.Optional;
-import java.net.HttpURLConnection;
-import java.net.SocketTimeoutException;
-import org.apache.http.conn.ConnectTimeoutException;
import org.camunda.bpm.engine.delegate.BpmnError;
import org.onap.appc.client.lcm.model.Action;
import org.onap.so.bpmn.common.BuildingBlockExecution;
@@ -37,13 +36,15 @@ import org.onap.so.db.catalog.client.CatalogDbClient;
import org.onap.so.db.catalog.beans.ControllerSelectionReference;
import org.onap.so.logger.MessageEnum;
import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class GenericVnfHealthCheck {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, GenericVnfHealthCheck.class);
+ private static final Logger logger = LoggerFactory.getLogger(GenericVnfHealthCheck.class);
@Autowired
private ExceptionBuilder exceptionUtil;
@Autowired
@@ -82,7 +83,7 @@ public class GenericVnfHealthCheck {
}
public void callAppcClient(BuildingBlockExecution execution) {
- msoLogger.trace("Start runAppcCommand ");
+ logger.trace("Start runAppcCommand ");
String appcCode = "1002";
String appcMessage = "";
try {
@@ -102,32 +103,38 @@ public class GenericVnfHealthCheck {
payloadInfo.put("oamIpAddress",execution.getVariable("oamIpAddress"));
payloadInfo.put("vnfHostIpAddress",execution.getVariable("vnfHostIpAddress"));
- msoLogger.debug("Running APP-C action: " + action.toString());
- msoLogger.debug("VNFID: " + vnfId);
+ logger.debug("Running APP-C action: {}", action.toString());
+ logger.debug("VNFID: {}", vnfId);
//PayloadInfo contains extra information that adds on to payload before making request to appc
appCClient.runAppCCommand(action, msoRequestId, vnfId, payload, payloadInfo, controllerType);
appcCode = appCClient.getErrorCode();
appcMessage = appCClient.getErrorMessage();
} catch (BpmnError ex) {
- msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Caught exception in GenericVnfHealthCheck", "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + ex);
+ logger.error("", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), "Caught exception in GenericVnfHealthCheck", "BPMN",
+ MsoLogger
+ .getServiceName(), MsoLogger.ErrorCode.UnknownError.getValue(), ex);
appcMessage = ex.getMessage();
exceptionUtil.buildAndThrowWorkflowException(execution, Integer.parseInt(appcCode), appcMessage);
} catch (Exception e) {
if (e instanceof java.util.concurrent.TimeoutException )
{
appcMessage = "Request to APPC timed out. ";
- msoLogger.error(MessageEnum.RA_CONNECTION_EXCEPTION, "Caught timedOut exception in runAppcCommand in GenericVnfHealthCheck", "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "APPC Error", e);
+ logger.error("{} {} {} {} {} {}", MessageEnum.RA_CONNECTION_EXCEPTION.toString(),
+ "Caught timedOut exception in runAppcCommand in GenericVnfHealthCheck", "BPMN",
+ MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError.getValue(), "APPC Error", e);
throw e;
}
else {
- msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "Caught exception in runAppcCommand in GenericVnfHealthCheck", "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "APPC Error", e);
+ logger.error("{} {} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION.toString(),
+ "Caught exception in runAppcCommand in GenericVnfHealthCheck", "BPMN", MsoLogger.getServiceName(),
+ MsoLogger.ErrorCode.UnknownError.getValue(), "APPC Error", e);
appcMessage = e.getMessage();
exceptionUtil.buildAndThrowWorkflowException(execution, Integer.parseInt(appcCode), appcMessage);
}
}
- msoLogger.error("Error Message: " + appcMessage);
- msoLogger.error("ERROR CODE: " + appcCode);
- msoLogger.trace("End of runAppCommand ");
+ logger.error("Error Message: " + appcMessage);
+ logger.error("ERROR CODE: " + appcCode);
+ logger.trace("End of runAppCommand ");
if (appcCode != null && !appcCode.equals("0")) {
exceptionUtil.buildAndThrowWorkflowException(execution, Integer.parseInt(appcCode), appcMessage);
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/UnassignNetworkBB.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/UnassignNetworkBB.java
index c45a47bc12..c7fd41c77a 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/UnassignNetworkBB.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/UnassignNetworkBB.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -29,14 +31,15 @@ import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB;
import org.onap.so.client.aai.entities.AAIResultWrapper;
import org.onap.so.client.exception.ExceptionBuilder;
import org.onap.so.client.orchestration.AAINetworkResources;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class UnassignNetworkBB {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, UnassignNetworkBB.class);
+ private static final Logger logger = LoggerFactory.getLogger(UnassignNetworkBB.class);
private static String MESSAGE_CANNOT_PERFORM_UNASSIGN = "Cannot perform Unassign Network. Network is still related to ";
private static String MESSAGE_ERROR_ROLLBACK = " Rollback is not possible. Please restore data manually.";
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCActivateTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCActivateTasks.java
index 43ee71e676..3793adc5d0 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCActivateTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCActivateTasks.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -41,13 +43,14 @@ import org.onap.so.client.orchestration.SDNCVfModuleResources;
import org.onap.so.client.orchestration.SDNCVnfResources;
import org.onap.so.client.sdnc.beans.SDNCRequest;
import org.onap.so.client.sdnc.endpoint.SDNCTopology;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class SDNCActivateTasks {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, SDNCActivateTasks.class);
+ private static final Logger logger = LoggerFactory.getLogger(SDNCActivateTasks.class);
@Autowired
private SDNCVnfResources sdncVnfResources;
@Autowired
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCAssignTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCAssignTasks.java
index 2695a170b4..715322bef3 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCAssignTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCAssignTasks.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -44,13 +46,14 @@ import org.onap.so.client.orchestration.SDNCVfModuleResources;
import org.onap.so.client.orchestration.SDNCVnfResources;
import org.onap.so.client.sdnc.beans.SDNCRequest;
import org.onap.so.client.sdnc.endpoint.SDNCTopology;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class SDNCAssignTasks {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, SDNCAssignTasks.class);
+ private static final Logger logger = LoggerFactory.getLogger(SDNCAssignTasks.class);
@Autowired
private SDNCServiceInstanceResources sdncSIResources;
@Autowired
@@ -109,7 +112,7 @@ public class SDNCAssignTasks {
try{
volumeGroup = extractPojosForBB.extractByKey(execution, ResourceKey.VOLUME_GROUP_ID, execution.getLookupMap().get(ResourceKey.VOLUME_GROUP_ID));
} catch (BBObjectNotFoundException e){
- msoLogger.info("No volume group was found.");
+ logger.info("No volume group was found.");
}
Customer customer = gBBInput.getCustomer();
CloudRegion cloudRegion = gBBInput.getCloudRegion();
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCDeactivateTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCDeactivateTasks.java
index eb078e04b4..d7313ad9a4 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCDeactivateTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCDeactivateTasks.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -42,14 +44,14 @@ import org.onap.so.client.orchestration.SDNCVfModuleResources;
import org.onap.so.client.orchestration.SDNCVnfResources;
import org.onap.so.client.sdnc.beans.SDNCRequest;
import org.onap.so.client.sdnc.endpoint.SDNCTopology;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class SDNCDeactivateTasks {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,
- SDNCDeactivateTasks.class);
+ private static final Logger logger = LoggerFactory.getLogger(SDNCDeactivateTasks.class);
@Autowired
private SDNCNetworkResources sdncNetworkResources;
@Autowired
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCQueryTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCQueryTasks.java
index 81ebfb1f41..b636fe1292 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCQueryTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCQueryTasks.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -27,17 +29,17 @@ import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule;
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.BadResponseException;
import org.onap.so.client.exception.ExceptionBuilder;
import org.onap.so.client.orchestration.SDNCVnfResources;
import org.onap.so.client.orchestration.SDNCVfModuleResources;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class SDNCQueryTasks {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, SDNCQueryTasks.class);
+ private static final Logger logger = LoggerFactory.getLogger(SDNCQueryTasks.class);
@Autowired
private SDNCVnfResources sdncVnfResources;
@Autowired
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCUnassignTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCUnassignTasks.java
index 960fb9988a..292f29c349 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCUnassignTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCUnassignTasks.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -42,13 +44,14 @@ import org.onap.so.client.orchestration.SDNCVfModuleResources;
import org.onap.so.client.orchestration.SDNCVnfResources;
import org.onap.so.client.sdnc.beans.SDNCRequest;
import org.onap.so.client.sdnc.endpoint.SDNCTopology;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class SDNCUnassignTasks {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, SDNCUnassignTasks.class);
+ private static final Logger logger = LoggerFactory.getLogger(SDNCUnassignTasks.class);
@Autowired
private SDNCServiceInstanceResources sdncSIResources;
@Autowired
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/validations/CloudRegionOrchestrationValidator.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/validations/CloudRegionOrchestrationValidator.java
index 7a433c06a6..c457034eca 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/validations/CloudRegionOrchestrationValidator.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/validations/CloudRegionOrchestrationValidator.java
@@ -5,6 +5,7 @@ import java.util.regex.Pattern;
import org.onap.so.bpmn.common.BuildingBlockExecution;
import org.onap.so.bpmn.common.validation.PreBuildingBlockValidator;
+import org.onap.so.bpmn.common.validation.Skip;
import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
import org.onap.so.client.exception.ExceptionBuilder;
import org.slf4j.Logger;
@@ -13,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
+@Skip
public class CloudRegionOrchestrationValidator implements PreBuildingBlockValidator {
private static Logger logger = LoggerFactory.getLogger(CloudRegionOrchestrationValidator.class);
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/OrchestrationStatusValidator.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/OrchestrationStatusValidator.java
index 2065dfb71e..75f293655f 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/OrchestrationStatusValidator.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/OrchestrationStatusValidator.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -33,13 +35,14 @@ import org.onap.so.db.catalog.beans.OrchestrationStatusStateTransitionDirective;
import org.onap.so.db.catalog.beans.OrchestrationStatusValidationDirective;
import org.onap.so.db.catalog.beans.ResourceType;
import org.onap.so.db.catalog.client.CatalogDbClient;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class OrchestrationStatusValidator {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, OrchestrationStatusValidator.class);
+ private static final Logger logger = LoggerFactory.getLogger(OrchestrationStatusValidator.class);
private static final String BUILDING_BLOCK_DETAIL_NOT_FOUND = "Building Block (%s) not set up in Orchestration_Status_Validation table in CatalogDB.";
private static final String UNKNOWN_RESOURCE_TYPE = "Building Block (%s) not set up correctly in Orchestration_Status_Validation table in CatalogDB. ResourceType=(%s), TargetAction=(%s)";
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/sdno/tasks/SDNOHealthCheckTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/sdno/tasks/SDNOHealthCheckTasks.java
index 9075fcc3cf..36162af740 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/sdno/tasks/SDNOHealthCheckTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/sdno/tasks/SDNOHealthCheckTasks.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -30,13 +32,14 @@ import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext;
import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB;
import org.onap.so.client.exception.ExceptionBuilder;
import org.onap.so.client.orchestration.SDNOHealthCheckResources;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class SDNOHealthCheckTasks {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, SDNOHealthCheckTasks.class);
+ private static final Logger logger = LoggerFactory.getLogger(SDNOHealthCheckTasks.class);
@Autowired
private ExceptionBuilder exceptionUtil;
@Autowired
@@ -61,12 +64,12 @@ public class SDNOHealthCheckTasks {
response = sdnoHealthCheckResources.healthCheck(vnf, requestContext);
}
catch (Exception ex) {
- msoLogger.error(ex);
+ logger.error("Exception occurred", ex);
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex.getMessage());
}
if (!response) {
- msoLogger.error("SDNO Health Check failed");
+ logger.error("SDNO Health Check failed");
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "SDNO Health Check failed");
}
}
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 701817ab58..2559087619 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
@@ -110,8 +110,8 @@ public class VnfAdapterObjectMapper {
return deleteVolumeGroupRequest;
}
- public Map<String, String> createVolumeGroupParams(RequestContext requestContext,GenericVnf genericVnf, VolumeGroup volumeGroup, String sdncVfModuleQueryResponse) throws JsonParseException, JsonMappingException, IOException {
- Map<String, String> volumeGroupParams = new HashMap<>();
+ public Map<String, Object> createVolumeGroupParams(RequestContext requestContext,GenericVnf genericVnf, VolumeGroup volumeGroup, String sdncVfModuleQueryResponse) throws JsonParseException, JsonMappingException, IOException {
+ Map<String, Object> volumeGroupParams = new HashMap<>();
final String USER_PARAM_NAME_KEY = "name";
final String USER_PARAM_VALUE_KEY = "value";
// sdncVfModuleQueryResponse will not be available in aLaCarte case
@@ -147,7 +147,7 @@ public class VnfAdapterObjectMapper {
return msoRequest;
}
- private void buildParamsMapFromSdncParams(Map<String,String> volumeGroupParams, GenericResourceApiParam sdncParameters) {
+ private void buildParamsMapFromSdncParams(Map<String,Object> volumeGroupParams, GenericResourceApiParam sdncParameters) {
if (sdncParameters != null) {
List<GenericResourceApiParamParam> sdncParametersList = sdncParameters.getParam();
if (sdncParametersList != null) {
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 352d4ec7d1..98174d59b6 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
@@ -161,7 +161,7 @@ public class VnfAdapterVfModuleObjectMapper {
return msoRequest;
}
- private Map<String,String> buildVfModuleParamsMap(RequestContext requestContext, ServiceInstance serviceInstance, GenericVnf genericVnf,
+ private Map<String,Object> buildVfModuleParamsMap(RequestContext requestContext, ServiceInstance serviceInstance, GenericVnf genericVnf,
VfModule vfModule, String sdncVnfQueryResponse, String sdncVfModuleQueryResponse) throws JsonParseException, JsonMappingException, IOException {
@@ -169,7 +169,7 @@ public class VnfAdapterVfModuleObjectMapper {
GenericResourceApiVfModuleTopology vfModuleTop = mapper.readValue(sdncVfModuleQueryResponse, GenericResourceApiVfModuleTopology.class);
GenericResourceApiVnftopologyVnfTopology vnfTopology = vnfTop.getVnfTopology();
GenericResourceApiVfmoduletopologyVfModuleTopology vfModuleTopology = vfModuleTop.getVfModuleTopology();
- Map<String,String> paramsMap = new HashMap<>();
+ Map<String,Object> paramsMap = new HashMap<>();
if( vfModuleTopology.getSdncGeneratedCloudResources()) {
buildParamsMapFromVfModuleSdncResponse(paramsMap, vfModuleTopology, true);
@@ -184,17 +184,15 @@ public class VnfAdapterVfModuleObjectMapper {
buildMandatoryParamsMap(paramsMap, serviceInstance, genericVnf, vfModule);
// Parameters received from the request should overwrite any parameters received from SDNC
+ paramsMap.putAll(requestContext.getUserParams());
- if (requestContext.getUserParams() != null) {
- paramsMap.putAll(requestContext.getUserParams());
- }
if (vfModule.getCloudParams() != null) {
paramsMap.putAll(vfModule.getCloudParams());
}
return paramsMap;
}
- private void buildMandatoryParamsMap(Map<String,String> paramsMap, ServiceInstance serviceInstance, GenericVnf genericVnf, VfModule vfModule) {
+ private void buildMandatoryParamsMap(Map<String,Object> paramsMap, ServiceInstance serviceInstance, GenericVnf genericVnf, VfModule vfModule) {
paramsMap.put("vnf_id", genericVnf.getVnfId());
paramsMap.put("vnf_name", genericVnf.getVnfName());
paramsMap.put("vf_module_id", vfModule.getVfModuleId());
@@ -209,7 +207,7 @@ public class VnfAdapterVfModuleObjectMapper {
}
}
- private void buildParamsMapFromVnfSdncResponse(Map<String,String> paramsMap, GenericResourceApiVnftopologyVnfTopology vnfTopology, Map<String,String> networkRoleMap, boolean skipVnfResourceAssignments) throws JsonParseException, JsonMappingException, IOException {
+ private void buildParamsMapFromVnfSdncResponse(Map<String,Object> paramsMap, GenericResourceApiVnftopologyVnfTopology vnfTopology, Map<String,String> networkRoleMap, boolean skipVnfResourceAssignments) throws JsonParseException, JsonMappingException, IOException {
// Get VNF parameters from SDNC response
GenericResourceApiParam vnfParametersData = vnfTopology.getVnfParametersData();
buildParamsMapFromSdncParams(paramsMap, vnfParametersData);
@@ -225,7 +223,7 @@ public class VnfAdapterVfModuleObjectMapper {
}
}
- private void buildAvailabilityZones (Map<String,String> paramsMap, GenericResourceApiVnfresourceassignmentsVnfResourceAssignments vnfResourceAssignments) {
+ private void buildAvailabilityZones (Map<String,Object> paramsMap, GenericResourceApiVnfresourceassignmentsVnfResourceAssignments vnfResourceAssignments) {
GenericResourceApiVnfresourceassignmentsVnfresourceassignmentsAvailabilityZones availabilityZones = vnfResourceAssignments.getAvailabilityZones();
if (availabilityZones != null) {
List<String> availabilityZonesList = availabilityZones.getAvailabilityZone();
@@ -237,7 +235,7 @@ public class VnfAdapterVfModuleObjectMapper {
}
}
- private void buildVnfNetworks (Map<String,String> paramsMap, GenericResourceApiVnfresourceassignmentsVnfResourceAssignments vnfResourceAssignments, Map<String,String> networkRoleMap) {
+ private void buildVnfNetworks (Map<String,Object> paramsMap, GenericResourceApiVnfresourceassignmentsVnfResourceAssignments vnfResourceAssignments, Map<String,String> networkRoleMap) {
GenericResourceApiVnfresourceassignmentsVnfresourceassignmentsVnfNetworks vnfNetworks = vnfResourceAssignments.getVnfNetworks();
if (vnfNetworks != null) {
List<GenericResourceApiVnfNetworkData> vnfNetworksList = vnfNetworks.getVnfNetwork();
@@ -264,7 +262,7 @@ public class VnfAdapterVfModuleObjectMapper {
}
}
- private void buildVnfNetworkSubnets(Map<String,String> paramsMap, GenericResourceApiVnfNetworkData vnfNetwork, String vnfNetworkKey) {
+ private void buildVnfNetworkSubnets(Map<String,Object> paramsMap, GenericResourceApiVnfNetworkData vnfNetwork, String vnfNetworkKey) {
String vnfNetworkString = convertToString(vnfNetwork);
Optional<String> ipv4Ips = jsonPath.locateResult(vnfNetworkString, "$.subnets-data.subnet-data[*].[?(@.ip-version == 'ipv4' && @.dhcp-enabled == 'Y')].subnet-id");
if(ipv4Ips.isPresent())
@@ -275,7 +273,7 @@ public class VnfAdapterVfModuleObjectMapper {
addPairToMap(paramsMap, vnfNetworkKey, V6_SUBNET_ID, ipv6Ips.get());
}
- private void buildParamsMapFromVfModuleSdncResponse(Map<String,String> paramsMap, GenericResourceApiVfmoduletopologyVfModuleTopology vfModuleTopology, boolean skipVfModuleAssignments) throws JsonParseException, JsonMappingException, IOException {
+ private void buildParamsMapFromVfModuleSdncResponse(Map<String,Object> paramsMap, GenericResourceApiVfmoduletopologyVfModuleTopology vfModuleTopology, boolean skipVfModuleAssignments) throws JsonParseException, JsonMappingException, IOException {
// Get VF Module parameters from SDNC response
GenericResourceApiParam vfModuleParametersData = vfModuleTopology.getVfModuleParameters();
buildParamsMapFromSdncParams(paramsMap, vfModuleParametersData);
@@ -322,7 +320,7 @@ public class VnfAdapterVfModuleObjectMapper {
}
}
- protected void buildVlanInformation(Map<String, String> paramsMap,
+ protected void buildVlanInformation(Map<String, Object> paramsMap,
GenericResourceApiVmNetworkData network, String key, String networkKey) {
String networkString = convertToString(network);
@@ -352,7 +350,7 @@ public class VnfAdapterVfModuleObjectMapper {
}
}
- private void buildVfModuleVmNames(Map<String,String> paramsMap, GenericResourceApiVmTopologyData vm, String key) {
+ private void buildVfModuleVmNames(Map<String,Object> paramsMap, GenericResourceApiVmTopologyData vm, String key) {
String values = "";
GenericResourceApiVmtopologydataVmNames vmNames = vm.getVmNames();
if (vmNames != null) {
@@ -373,7 +371,7 @@ public class VnfAdapterVfModuleObjectMapper {
}
}
- private void buildVfModuleFloatingIps(Map<String,String> paramsMap, GenericResourceApiVmNetworkData network, String key, String networkKey) {
+ private void buildVfModuleFloatingIps(Map<String,Object> paramsMap, GenericResourceApiVmNetworkData network, String key, String networkKey) {
GenericResourceApiVmnetworkdataFloatingIps floatingIps = network.getFloatingIps();
if (floatingIps != null) {
List<String> floatingIpV4List = floatingIps.getFloatingIpV4();
@@ -397,7 +395,7 @@ public class VnfAdapterVfModuleObjectMapper {
}
}
- private void buildVfModuleInterfaceRoutePrefixes(Map<String,String> paramsMap, GenericResourceApiVmNetworkData network, String key, String networkKey) {
+ private void buildVfModuleInterfaceRoutePrefixes(Map<String,Object> paramsMap, GenericResourceApiVmNetworkData network, String key, String networkKey) {
GenericResourceApiVmnetworkdataInterfaceRoutePrefixes interfaceRoutePrefixes = network.getInterfaceRoutePrefixes();
if (interfaceRoutePrefixes != null) {
List<String> interfaceRoutePrefixesList = interfaceRoutePrefixes.getInterfaceRoutePrefix();
@@ -421,7 +419,7 @@ public class VnfAdapterVfModuleObjectMapper {
}
}
- private void buildVfModuleSriovParameters(Map<String,String> paramsMap, GenericResourceApiVmNetworkData network, String networkKey) {
+ private void buildVfModuleSriovParameters(Map<String,Object> paramsMap, GenericResourceApiVmNetworkData network, String networkKey) {
// SRIOV Parameters
GenericResourceApiVmnetworkdataSriovParameters sriovParameters = network.getSriovParameters();
if (sriovParameters != null) {
@@ -447,7 +445,7 @@ public class VnfAdapterVfModuleObjectMapper {
}
}
- private void buildVfModuleNetworkInformation(Map<String,String> paramsMap, GenericResourceApiVmNetworkData network, String key, String networkKey) {
+ private void buildVfModuleNetworkInformation(Map<String,Object> paramsMap, GenericResourceApiVmNetworkData network, String key, String networkKey) {
GenericResourceApiVmnetworkdataNetworkInformationItems networkInformationItems = network.getNetworkInformationItems();
StringBuilder sbIpv4Ips = new StringBuilder();
@@ -500,7 +498,7 @@ public class VnfAdapterVfModuleObjectMapper {
* Build Count of SubInterfaces, VLAN Tag, network_name, network_id,
* ip_address (V4 and V6) and Floating IPs Addresses (V4 and V6) for Heat Template
*/
- private void buildParamsMapFromVfModuleForHeatTemplate(Map<String,String> paramsMap, GenericResourceApiVmTopologyData vm) {
+ private void buildParamsMapFromVfModuleForHeatTemplate(Map<String,Object> paramsMap, GenericResourceApiVmTopologyData vm) {
GenericResourceApiVmtopologydataVmNames vmNames = vm.getVmNames();
if (vmNames != null) {
@@ -520,7 +518,7 @@ public class VnfAdapterVfModuleObjectMapper {
/*
* Parse vnfcNames data to build Mapping from GenericResourceApi SDNC for Heat Template.
*/
- private void parseVnfcNamesData(Map<String,String> paramsMap, GenericResourceApiVmtopologydataVmnamesVnfcNames vnfcNames) {
+ private void parseVnfcNamesData(Map<String,Object> paramsMap, GenericResourceApiVmtopologydataVmnamesVnfcNames vnfcNames) {
if (vnfcNames != null) {
GenericResourceApiVnfcNetworkData vnfcNetworks = vnfcNames.getVnfcNetworks();
@@ -544,7 +542,7 @@ public class VnfAdapterVfModuleObjectMapper {
* Build Count of SubInterfaces, VLAN Tag, network_name, network_id,
* ip_address (V4 and V6) and Floating IPs Addresses (V4 and V6) for Heat Template
*/
- private void parseVnfcNetworkData(Map<String,String> paramsMap, GenericResourceApiVnfcnetworkdataVnfcNetworkData vnfcNetworkdata, int networkDataIdx) {
+ private void parseVnfcNetworkData(Map<String,Object> paramsMap, GenericResourceApiVnfcnetworkdataVnfcNetworkData vnfcNetworkdata, int networkDataIdx) {
String vmTypeKey = vnfcNetworkdata.getVnfcType();
GenericResourceApiVnfcnetworkdataVnfcnetworkdataVnfcPorts vnfcPorts = vnfcNetworkdata.getVnfcPorts();
@@ -588,7 +586,7 @@ public class VnfAdapterVfModuleObjectMapper {
* Example: fw_subint_ctrl_port_0_subintcount
*
*/
- private void buildVfModuleSubInterfacesCount(Map<String,String> paramsMap, String keyPrefix, GenericResourceApiSubInterfaceNetworkData vnicSubInterfaces) {
+ private void buildVfModuleSubInterfacesCount(Map<String,Object> paramsMap, String keyPrefix, GenericResourceApiSubInterfaceNetworkData vnicSubInterfaces) {
List<GenericResourceApiSubinterfacenetworkdataSubInterfaceNetworkData> subInterfaceNetworkDataList = vnicSubInterfaces.getSubInterfaceNetworkData();
@@ -614,7 +612,7 @@ public class VnfAdapterVfModuleObjectMapper {
* Example: fw_0_subint_ctrl_port_0_vlan_ids
*
*/
- protected void buildVfModuleVlanTag(Map<String,String> paramsMap, String keyPrefix, String vnicSubInterfaces) {
+ protected void buildVfModuleVlanTag(Map<String,Object> paramsMap, String keyPrefix, String vnicSubInterfaces) {
List<String> vlanTagIds = jsonPath.locateResultList(vnicSubInterfaces, "$.sub-interface-network-data[*].vlan-tag-id");
@@ -627,7 +625,7 @@ public class VnfAdapterVfModuleObjectMapper {
* Example: fw_0_subint_ctrl_port_0_net_names
*
*/
- protected void buildVfModuleNetworkName(Map<String,String> paramsMap, String keyPrefix, String vnicSubInterfaces) {
+ protected void buildVfModuleNetworkName(Map<String,Object> paramsMap, String keyPrefix, String vnicSubInterfaces) {
List<String> neworkNames = jsonPath.locateResultList(vnicSubInterfaces, "$.sub-interface-network-data[*].network-name");
@@ -641,7 +639,7 @@ public class VnfAdapterVfModuleObjectMapper {
* Example: fw_0_subint_ctrl_port_0_net_ids
*
*/
- protected void buildVfModuleNetworkId(Map<String,String> paramsMap, String keyPrefix, String vnicSubInterfaces) {
+ protected void buildVfModuleNetworkId(Map<String,Object> paramsMap, String keyPrefix, String vnicSubInterfaces) {
List<String> neworkIds = jsonPath.locateResultList(vnicSubInterfaces, "$.sub-interface-network-data[*].network-id");
@@ -654,7 +652,7 @@ public class VnfAdapterVfModuleObjectMapper {
* {vm-type}_{index}_subint_{network-role}_port_{index}_ip_{index} -- for ipV4
* key = vm-type, networkRoleKey = NetWork-Role
*/
- protected void buildVfModuleIpV4AddressHeatTemplate(Map<String,String> paramsMap, String keyPrefix, String vnicSubInterfaces) {
+ protected void buildVfModuleIpV4AddressHeatTemplate(Map<String,Object> paramsMap, String keyPrefix, String vnicSubInterfaces) {
List<String> ipv4Ips = jsonPath.locateResultList(vnicSubInterfaces, "$.sub-interface-network-data[*].network-information-items.network-information-item[?(@.ip-version == 'ipv4')].network-ips.network-ip[*]");
@@ -672,7 +670,7 @@ public class VnfAdapterVfModuleObjectMapper {
* {vm-type}_{index}_subint_{network-role}_port_{index}_v6_ip_{index} -- for ipV6
* key = vm-type, networkRoleKey = NetWork-Role
*/
- protected void buildVfModuleIpV6AddressHeatTemplate(Map<String,String> paramsMap, String keyPrefix, String vnicSubInterfaces) {
+ protected void buildVfModuleIpV6AddressHeatTemplate(Map<String,Object> paramsMap, String keyPrefix, String vnicSubInterfaces) {
List<String> ipv6Ips = jsonPath.locateResultList(vnicSubInterfaces, "$.sub-interface-network-data[*].network-information-items.network-information-item[?(@.ip-version == 'ipv6')].network-ips.network-ip[*]");
@@ -688,7 +686,7 @@ public class VnfAdapterVfModuleObjectMapper {
* Building Criteria :
* {vm-type}_subint_{network-role}_port_{index}_floating_ip -- for ipV4
*/
- protected void buildVfModuleFloatingIpV4HeatTemplate(Map<String,String> paramsMap, String keyPrefix, String vnicSubInterfaces) {
+ protected void buildVfModuleFloatingIpV4HeatTemplate(Map<String,Object> paramsMap, String keyPrefix, String vnicSubInterfaces) {
List<String> floatingV4 = jsonPath.locateResultList(vnicSubInterfaces, "$.sub-interface-network-data[*].floating-ips.floating-ip-v4[*]");
@@ -704,7 +702,7 @@ public class VnfAdapterVfModuleObjectMapper {
* Building Criteria :
* {vm-type}_subint_{network-role}_port_{index}_floating_v6_ip -- for ipV6
*/
- protected void buildVfModuleFloatingIpV6HeatTemplate(Map<String,String> paramsMap, String keyPrefix, String vnicSubInterfaces) {
+ protected void buildVfModuleFloatingIpV6HeatTemplate(Map<String,Object> paramsMap, String keyPrefix, String vnicSubInterfaces) {
List<String> floatingV6 = jsonPath.locateResultList(vnicSubInterfaces, "$.sub-interface-network-data[*].floating-ips.floating-ip-v6[*]");
@@ -714,19 +712,19 @@ public class VnfAdapterVfModuleObjectMapper {
addPairToMap(paramsMap, keyPrefix, FLOATING_V6_IP, floatingV6);
}
- protected void addPairToMap(Map<String, String> paramsMap, String keyPrefix, String key, String value) {
+ protected void addPairToMap(Map<String, Object> paramsMap, String keyPrefix, String key, String value) {
addPairToMap(paramsMap, keyPrefix, key, Collections.singletonList(value));
}
- protected void addPairToMap(Map<String, String> paramsMap, String keyPrefix, String key, List<String> value) {
+ protected void addPairToMap(Map<String, Object> paramsMap, String keyPrefix, String key, List<String> value) {
if (!value.isEmpty()) {
paramsMap.put(keyPrefix + key, Joiner.on(",").join(value));
}
}
- private void buildParamsMapFromSdncParams(Map<String,String> paramsMap, GenericResourceApiParam parametersData) {
+ private void buildParamsMapFromSdncParams(Map<String,Object> paramsMap, GenericResourceApiParam parametersData) {
if (parametersData != null) {
List<GenericResourceApiParamParam> paramsList = parametersData.getParam();
if (paramsList != null) {
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/namingservice/NamingClient.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/namingservice/NamingClient.java
index 0419896444..9613fbdcf1 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/namingservice/NamingClient.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/namingservice/NamingClient.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2017 - 2019 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
@@ -29,7 +31,8 @@ import org.onap.namingservice.model.NameGenDeleteResponse;
import org.onap.namingservice.model.NameGenRequest;
import org.onap.namingservice.model.NameGenResponse;
import org.onap.so.client.exception.BadResponseException;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.http.HttpEntity;
@@ -45,7 +48,7 @@ import org.springframework.web.client.RestTemplate;
@Component
public class NamingClient{
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, NamingClient.class);
+ private static final Logger logger = LoggerFactory.getLogger(NamingClient.class);
private static final String ENDPOINT = "mso.naming.endpoint";
private static final String AUTH = "mso.naming.auth";
@@ -59,7 +62,7 @@ public class NamingClient{
public String postNameGenRequest(NameGenRequest request) throws BadResponseException, IOException {
String targetUrl = env.getProperty(ENDPOINT);
HttpHeaders headers = setHeaders(env.getProperty(AUTH));
- msoLogger.info("Sending postNameGenRequest to url: " + targetUrl);
+ logger.info("Sending postNameGenRequest to url: {}", targetUrl);
HttpEntity<NameGenRequest> requestEntity = new HttpEntity<>(request, headers);
ResponseEntity<NameGenResponse> response;
try{
@@ -73,7 +76,7 @@ public class NamingClient{
public String deleteNameGenRequest(NameGenDeleteRequest request) throws BadResponseException, IOException {
String targetUrl = env.getProperty(ENDPOINT);
HttpHeaders headers = setHeaders(env.getProperty(AUTH));
- msoLogger.info("Sending deleteNameGenRequest to url: " + targetUrl);
+ logger.info("Sending deleteNameGenRequest to url: {}", targetUrl);
HttpEntity<NameGenDeleteRequest> requestEntity = new HttpEntity<>(request, headers);
ResponseEntity<NameGenDeleteResponse> response;
try{
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/namingservice/NamingClientResponseValidator.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/namingservice/NamingClientResponseValidator.java
index 3dcafe0ff4..787b811501 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/namingservice/NamingClientResponseValidator.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/namingservice/NamingClientResponseValidator.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2017 - 2019 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
@@ -31,6 +33,8 @@ import org.onap.namingservice.model.Respelement;
import org.onap.so.client.exception.BadResponseException;
import org.onap.so.logger.MessageEnum;
import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
import org.springframework.web.client.HttpStatusCodeException;
@@ -39,7 +43,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
@Component
public class NamingClientResponseValidator {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, NamingClientResponseValidator.class);
+ private static final Logger logger = LoggerFactory.getLogger(NamingClientResponseValidator.class);
private static final String INSTANCE_GROUP_NAME = "instance-group-name";
private static final String NO_RESPONSE_FROM_NAMING_SERVICE = "Error did not receive a response from Naming Service.";
private static final String NULL_RESPONSE_FROM_NAMING_SERVICE = "Error received a null response from Naming Service.";
@@ -47,8 +51,9 @@ public class NamingClientResponseValidator {
public String validateNameGenResponse(ResponseEntity<NameGenResponse> response) throws BadResponseException {
if (response == null) {
- msoLogger.error(MessageEnum.RA_GENERAL_EXCEPTION, NO_RESPONSE_FROM_NAMING_SERVICE, "BPMN",
- MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, NO_RESPONSE_FROM_NAMING_SERVICE);
+ logger.error("{} {} {} {} {} {}", MessageEnum.RA_GENERAL_EXCEPTION.toString(), NO_RESPONSE_FROM_NAMING_SERVICE,
+ "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError.getValue(),
+ NO_RESPONSE_FROM_NAMING_SERVICE);
throw new BadResponseException(NO_RESPONSE_FROM_NAMING_SERVICE);
}
@@ -56,13 +61,14 @@ public class NamingClientResponseValidator {
String generatedName = "";
NameGenResponse responseBody = response.getBody();
if (responseBody == null) {
- msoLogger.error(MessageEnum.RA_GENERAL_EXCEPTION, NULL_RESPONSE_FROM_NAMING_SERVICE, "BPMN",
- MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, NULL_RESPONSE_FROM_NAMING_SERVICE);
+ logger.error("{} {} {} {} {} {}", MessageEnum.RA_GENERAL_EXCEPTION.toString(), NULL_RESPONSE_FROM_NAMING_SERVICE,
+ "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError.getValue(),
+ NULL_RESPONSE_FROM_NAMING_SERVICE);
throw new BadResponseException(NULL_RESPONSE_FROM_NAMING_SERVICE);
}
if (isHttpCodeSuccess(responseCode)) {
- msoLogger.info("Successful Response from Naming Service");
+ logger.info("Successful Response from Naming Service");
List<Respelement> respList = responseBody.getElements();
if (respList != null) {
@@ -85,16 +91,17 @@ public class NamingClientResponseValidator {
errorMessageString = error.getMessage();
}
String errorMessage = String.format(NAMING_SERVICE_ERROR, errorMessageString);
- msoLogger.error(MessageEnum.RA_GENERAL_EXCEPTION, errorMessage, "BPMN", MsoLogger.getServiceName(),
- MsoLogger.ErrorCode.DataError, errorMessage);
+ logger.error("{} {} {} {} {} {}", MessageEnum.RA_GENERAL_EXCEPTION.toString(), errorMessage, "BPMN",
+ MsoLogger.getServiceName(), MsoLogger.ErrorCode.DataError.getValue(), errorMessage);
throw new BadResponseException(errorMessage);
}
}
public String validateNameGenDeleteResponse(ResponseEntity<NameGenDeleteResponse> response) throws BadResponseException {
if (response == null) {
- msoLogger.error(MessageEnum.RA_GENERAL_EXCEPTION, NO_RESPONSE_FROM_NAMING_SERVICE, "BPMN",
- MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, NO_RESPONSE_FROM_NAMING_SERVICE);
+ logger.error("{} {} {} {} {} {}", MessageEnum.RA_GENERAL_EXCEPTION.toString(), NO_RESPONSE_FROM_NAMING_SERVICE,
+ "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError.getValue(),
+ NO_RESPONSE_FROM_NAMING_SERVICE);
throw new BadResponseException(NO_RESPONSE_FROM_NAMING_SERVICE);
}
@@ -102,20 +109,21 @@ public class NamingClientResponseValidator {
String responseMessage = "";
NameGenDeleteResponse responseBody = response.getBody();
if (responseBody == null) {
- msoLogger.error(MessageEnum.RA_GENERAL_EXCEPTION, NULL_RESPONSE_FROM_NAMING_SERVICE, "BPMN",
- MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, NULL_RESPONSE_FROM_NAMING_SERVICE);
+ logger.error("{} {} {} {} {} {}", MessageEnum.RA_GENERAL_EXCEPTION.toString(), NULL_RESPONSE_FROM_NAMING_SERVICE,
+ "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError.getValue(),
+ NULL_RESPONSE_FROM_NAMING_SERVICE);
throw new BadResponseException(NULL_RESPONSE_FROM_NAMING_SERVICE);
}
if (isHttpCodeSuccess(responseCode)) {
- msoLogger.info("Successful Response from Naming Service");
+ logger.info("Successful Response from Naming Service");
return responseMessage;
} else {
String errorMessageString = NAMING_SERVICE_ERROR;
String errorMessage = String.format(NAMING_SERVICE_ERROR, errorMessageString);
- msoLogger.error(MessageEnum.RA_GENERAL_EXCEPTION, errorMessage, "BPMN", MsoLogger.getServiceName(),
- MsoLogger.ErrorCode.DataError, errorMessage);
+ logger.error("{} {} {} {} {} {}", MessageEnum.RA_GENERAL_EXCEPTION.toString(), errorMessage, "BPMN", MsoLogger.getServiceName(),
+ MsoLogger.ErrorCode.DataError.getValue(), errorMessage);
throw new BadResponseException(errorMessage);
}
}
@@ -134,8 +142,8 @@ public class NamingClientResponseValidator {
errorMessageString = error.getMessage();
}
String errorMessage = String.format(NAMING_SERVICE_ERROR, errorMessageString);
- msoLogger.error(MessageEnum.RA_GENERAL_EXCEPTION, errorMessage, "BPMN", MsoLogger.getServiceName(),
- MsoLogger.ErrorCode.DataError, errorMessage);
+ logger.error("{} {} {} {} {} {}", MessageEnum.RA_GENERAL_EXCEPTION.toString(), errorMessage, "BPMN", MsoLogger.getServiceName(),
+ MsoLogger.ErrorCode.DataError.getValue(), errorMessage);
return errorMessage;
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIServiceInstanceResources.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIServiceInstanceResources.java
index 86dd22b65c..3032b66e6d 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIServiceInstanceResources.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIServiceInstanceResources.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -34,13 +36,15 @@ import org.onap.so.client.aai.entities.uri.AAIResourceUri;
import org.onap.so.client.aai.entities.uri.AAIUriFactory;
import org.onap.so.client.aai.mapper.AAIObjectMapper;
import org.onap.so.db.catalog.beans.OrchestrationStatus;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class AAIServiceInstanceResources {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, AAIServiceInstanceResources.class);
+ private static final Logger logger = LoggerFactory.getLogger(AAIServiceInstanceResources
+ .class);
@Autowired
private InjectionHelper injectionHelper;
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVfModuleResources.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVfModuleResources.java
index ef61319eee..5fa73c85ff 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVfModuleResources.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVfModuleResources.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -32,13 +34,14 @@ import org.onap.so.client.aai.entities.uri.AAIResourceUri;
import org.onap.so.client.aai.entities.uri.AAIUriFactory;
import org.onap.so.client.aai.mapper.AAIObjectMapper;
import org.onap.so.db.catalog.beans.OrchestrationStatus;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class AAIVfModuleResources {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, AAIVfModuleResources.class);
+ private static final Logger logger = LoggerFactory.getLogger(AAIVfModuleResources.class);
@Autowired
private InjectionHelper injectionHelper;
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVnfResources.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVnfResources.java
index a9a52bd115..0c65abfe0c 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVnfResources.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVnfResources.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -27,21 +29,20 @@ import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
import org.onap.so.bpmn.servicedecomposition.bbobjects.LineOfBusiness;
import org.onap.so.bpmn.servicedecomposition.bbobjects.Platform;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.Project;
import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.VolumeGroup;
import org.onap.so.client.aai.AAIObjectType;
import org.onap.so.client.aai.entities.uri.AAIResourceUri;
import org.onap.so.client.aai.entities.uri.AAIUriFactory;
import org.onap.so.client.aai.mapper.AAIObjectMapper;
import org.onap.so.db.catalog.beans.OrchestrationStatus;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class AAIVnfResources {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, AAIVnfResources.class);
+ private static final Logger logger = LoggerFactory.getLogger(AAIVnfResources.class);
@Autowired
private InjectionHelper injectionHelper;
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVolumeGroupResources.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVolumeGroupResources.java
index af97e55c14..7bb96ec2ed 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVolumeGroupResources.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVolumeGroupResources.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -29,13 +31,14 @@ import org.onap.so.client.aai.entities.uri.AAIResourceUri;
import org.onap.so.client.aai.entities.uri.AAIUriFactory;
import org.onap.so.client.aai.mapper.AAIObjectMapper;
import org.onap.so.db.catalog.beans.OrchestrationStatus;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class AAIVolumeGroupResources {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, AAIVolumeGroupResources.class);
+ private static final Logger logger = LoggerFactory.getLogger(AAIVolumeGroupResources.class);
@Autowired
private InjectionHelper injectionHelper;
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/NamingServiceResources.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/NamingServiceResources.java
index d0bf6da6c9..2a25ec5ba1 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/NamingServiceResources.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/NamingServiceResources.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -30,13 +32,14 @@ import org.onap.so.bpmn.servicedecomposition.bbobjects.InstanceGroup;
import org.onap.so.client.exception.BadResponseException;
import org.onap.so.client.namingservice.NamingClient;
import org.onap.so.client.namingservice.NamingRequestObjectBuilder;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class NamingServiceResources {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, NamingServiceResources.class);
+ private static final Logger logger = LoggerFactory.getLogger(NamingServiceResources.class);
private static final String NAMING_TYPE = "instanceGroup";
@Autowired
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/SDNCNetworkResources.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/SDNCNetworkResources.java
index 8b53c28547..fb828c1981 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/SDNCNetworkResources.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/SDNCNetworkResources.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -30,14 +32,14 @@ import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext;
import org.onap.so.client.sdnc.beans.SDNCSvcAction;
import org.onap.so.client.sdnc.beans.SDNCSvcOperation;
import org.onap.so.client.sdnc.mapper.NetworkTopologyOperationRequestMapper;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class SDNCNetworkResources {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,
- SDNCNetworkResources.class);
+ private static final Logger logger = LoggerFactory.getLogger(SDNCNetworkResources.class);
@Autowired
private NetworkTopologyOperationRequestMapper sdncRM;
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/SDNCVfModuleResources.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/SDNCVfModuleResources.java
index e7f0a40d2a..1e3d655298 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/SDNCVfModuleResources.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/SDNCVfModuleResources.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -34,14 +36,14 @@ import org.onap.so.client.sdnc.SDNCClient;
import org.onap.so.client.sdnc.beans.SDNCSvcAction;
import org.onap.so.client.sdnc.beans.SDNCSvcOperation;
import org.onap.so.client.sdnc.mapper.VfModuleTopologyOperationRequestMapper;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class SDNCVfModuleResources {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,
- SDNCVfModuleResources.class);
+ private static final Logger logger = LoggerFactory.getLogger(SDNCVfModuleResources.class);
@Autowired
private VfModuleTopologyOperationRequestMapper sdncRM;
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/SDNCVnfResources.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/SDNCVnfResources.java
index e5194e3e37..d8f2e47224 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/SDNCVnfResources.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/SDNCVnfResources.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -33,13 +35,14 @@ import org.onap.so.client.sdnc.SDNCClient;
import org.onap.so.client.sdnc.beans.SDNCSvcAction;
import org.onap.so.client.sdnc.beans.SDNCSvcOperation;
import org.onap.so.client.sdnc.mapper.VnfTopologyOperationRequestMapper;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class SDNCVnfResources {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, SDNCVnfResources.class);
+ private static final Logger logger = LoggerFactory.getLogger(SDNCVnfResources.class);
@Autowired
private VnfTopologyOperationRequestMapper sdncRM;
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/VnfAdapterVfModuleResources.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/VnfAdapterVfModuleResources.java
index 2d9032c7c0..de59e6835e 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/VnfAdapterVfModuleResources.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/VnfAdapterVfModuleResources.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -32,13 +34,14 @@ import org.onap.so.bpmn.servicedecomposition.bbobjects.VolumeGroup;
import org.onap.so.bpmn.servicedecomposition.generalobjects.OrchestrationContext;
import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext;
import org.onap.so.client.adapter.vnf.mapper.VnfAdapterVfModuleObjectMapper;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class VnfAdapterVfModuleResources {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, VnfAdapterVfModuleResources.class);
+ private static final Logger logger = LoggerFactory.getLogger(VnfAdapterVfModuleResources.class);
@Autowired
private VnfAdapterVfModuleObjectMapper vnfAdapterVfModuleObjectMapper;
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/VnfAdapterVolumeGroupResources.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/VnfAdapterVolumeGroupResources.java
index efbbeae737..737e9eeb37 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/VnfAdapterVolumeGroupResources.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/VnfAdapterVolumeGroupResources.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -30,13 +32,14 @@ import org.onap.so.bpmn.servicedecomposition.generalobjects.OrchestrationContext
import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext;
import org.onap.so.client.adapter.vnf.VnfVolumeAdapterClientImpl;
import org.onap.so.client.adapter.vnf.mapper.VnfAdapterObjectMapper;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class VnfAdapterVolumeGroupResources {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, VnfAdapterVolumeGroupResources.class);
+ private static final Logger logger = LoggerFactory.getLogger(VnfAdapterVolumeGroupResources.class);
@Autowired
private VnfAdapterObjectMapper vnfAdapterObjectMapper;
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SDNCClient.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SDNCClient.java
index 7ad2ef00b2..99d5fca31f 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SDNCClient.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SDNCClient.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -29,7 +31,8 @@ import org.onap.so.client.exception.BadResponseException;
import org.onap.so.client.exception.MapperException;
import org.onap.so.client.sdnc.beans.SDNCProperties;
import org.onap.so.client.sdnc.endpoint.SDNCTopology;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.http.HttpHeaders;
@@ -38,7 +41,7 @@ import org.springframework.stereotype.Component;
@Component
public class SDNCClient {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, SDNCClient.class);
+ private static final Logger logger = LoggerFactory.getLogger(SDNCClient.class);
private BaseClient<String, LinkedHashMap<String, Object>> STOClient = new BaseClient<>();
@Autowired
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SdnCommonTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SdnCommonTasks.java
index 13ba107576..2f9c8da5f0 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SdnCommonTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SdnCommonTasks.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -30,6 +32,8 @@ import org.onap.so.client.exception.BadResponseException;
import org.onap.so.client.exception.MapperException;
import org.onap.so.logger.MessageEnum;
import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Component;
@@ -42,7 +46,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
@Component
public class SdnCommonTasks {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, SDNCClient.class);
+ private static final Logger logger = LoggerFactory.getLogger(SDNCClient.class);
private static final String RESPONSE_CODE = "response-code";
private static final String RESPONSE_MESSAGE = "response-message";
private static final String NO_RESPONSE_FROM_SDNC = "Error did not receive a response from SDNC.";
@@ -63,11 +67,13 @@ public class SdnCommonTasks {
try {
jsonRequest = objMapper.writerWithDefaultPrettyPrinter().writeValueAsString(request);
} catch (JsonProcessingException e) {
- msoLogger.error(MessageEnum.JAXB_EXCEPTION, COULD_NOT_CONVERT_SDNC_POJO_TO_JSON, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.DataError, e.getMessage());
+ logger.error("{} {} {} {} {} {}", MessageEnum.JAXB_EXCEPTION.toString(),
+ COULD_NOT_CONVERT_SDNC_POJO_TO_JSON,
+ "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.DataError.getValue(), e.getMessage());
throw new MapperException(COULD_NOT_CONVERT_SDNC_POJO_TO_JSON);
}
jsonRequest = "{\"input\":" + jsonRequest + "}";
- msoLogger.info(jsonRequest);
+ logger.info(jsonRequest);
return jsonRequest;
}
@@ -94,8 +100,8 @@ public class SdnCommonTasks {
*/
public String validateSDNResponse(LinkedHashMap<String, Object> output) throws BadResponseException {
if (CollectionUtils.isEmpty(output)) {
- msoLogger.error(MessageEnum.RA_RESPONSE_FROM_SDNC, NO_RESPONSE_FROM_SDNC, "BPMN",
- MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, NO_RESPONSE_FROM_SDNC);
+ logger.error("{} {} {} {} {} {}", MessageEnum.RA_RESPONSE_FROM_SDNC.toString(), NO_RESPONSE_FROM_SDNC, "BPMN",
+ MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError.getValue(), NO_RESPONSE_FROM_SDNC);
throw new BadResponseException(NO_RESPONSE_FROM_SDNC);
}
LinkedHashMap<String, Object> embeddedResponse =(LinkedHashMap<String, Object>) output.get("output");
@@ -109,21 +115,21 @@ public class SdnCommonTasks {
String jsonResponse;
try {
jsonResponse = objMapper.writeValueAsString(output);
- msoLogger.debug(jsonResponse);
+ logger.debug(jsonResponse);
} catch (JsonProcessingException e) {
- msoLogger.warnSimple("Could not convert SDNC Response to String", e);
+ logger.warn("Could not convert SDNC Response to String", e);
jsonResponse = "";
}
- msoLogger.info("ResponseCode: " + responseCode + " ResponseMessage: " + responseMessage);
+ logger.info("ResponseCode: {} ResponseMessage: {}", responseCode, responseMessage);
int code = StringUtils.isNotEmpty(responseCode) ? Integer.parseInt(responseCode) : 0;
if (isHttpCodeSuccess(code)) {
- msoLogger.info("Successful Response from SDNC");
+ logger.info("Successful Response from SDNC");
return jsonResponse;
} else {
String errorMessage = String.format(SDNC_CODE_NOT_0_OR_IN_200_299, responseMessage);
- msoLogger.error(MessageEnum.RA_RESPONSE_FROM_SDNC, errorMessage, "BPMN", MsoLogger.getServiceName(),
- MsoLogger.ErrorCode.DataError, errorMessage);
- throw new BadResponseException(errorMessage);
+ logger.error("{} {} {} {} {} {}", MessageEnum.RA_RESPONSE_FROM_SDNC.toString(), errorMessage, "BPMN",
+ MsoLogger.getServiceName(), MsoLogger.ErrorCode.DataError.getValue(), errorMessage);
+ throw new BadResponseException(errorMessage);
}
}
@@ -135,20 +141,23 @@ public class SdnCommonTasks {
*/
public String validateSDNGetResponse(LinkedHashMap<String, Object> output) throws BadResponseException {
if (CollectionUtils.isEmpty(output)) {
- msoLogger.error(MessageEnum.RA_RESPONSE_FROM_SDNC, NO_RESPONSE_FROM_SDNC, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, NO_RESPONSE_FROM_SDNC);
+ logger.error("{} {} {} {} {} {}", MessageEnum.RA_RESPONSE_FROM_SDNC.toString(), NO_RESPONSE_FROM_SDNC, "BPMN",
+ MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError.getValue(), NO_RESPONSE_FROM_SDNC);
throw new BadResponseException(NO_RESPONSE_FROM_SDNC);
}
ObjectMapper objMapper = new ObjectMapper();
- msoLogger.debug("Using object mapper");
+ logger.debug("Using object mapper");
String stringOutput = "";
try {
stringOutput = objMapper.writeValueAsString(output);
}
catch (Exception e) {
- msoLogger.error(MessageEnum.RA_RESPONSE_FROM_SDNC, BAD_RESPONSE_FROM_SDNC, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, BAD_RESPONSE_FROM_SDNC);
+ logger.error("{} {} {} {} {} {}", MessageEnum.RA_RESPONSE_FROM_SDNC.toString(), BAD_RESPONSE_FROM_SDNC,
+ "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError.getValue(),
+ BAD_RESPONSE_FROM_SDNC);
throw new BadResponseException(BAD_RESPONSE_FROM_SDNC);
}
- msoLogger.debug("Received from GET request: " + stringOutput);
+ logger.debug("Received from GET request: {}", stringOutput);
return stringOutput;
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/GCTopologyOperationRequestMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/GCTopologyOperationRequestMapper.java
index 2cd0947fa8..e46c456f88 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/GCTopologyOperationRequestMapper.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/GCTopologyOperationRequestMapper.java
@@ -22,16 +22,27 @@ package org.onap.so.client.sdnc.mapper;
import java.net.URI;
-import org.onap.sdnc.northbound.client.model.*;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.*;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiConfigurationinformationConfigurationInformation;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiGcTopologyOperationInformation;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiGcrequestinputGcRequestInput;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiRequestActionEnumeration;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiRequestinformationRequestInformation;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiSdncrequestheaderSdncRequestHeader;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiServiceinformationServiceInformation;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.Configuration;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext;
import org.onap.so.client.sdnc.beans.SDNCSvcAction;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component(value = "sdncGCTopologyOperationRequestMapper")
public class GCTopologyOperationRequestMapper {
- private static final GeneralTopologyObjectMapper generalTopologyObjectMapper = new GeneralTopologyObjectMapper();
+ @Autowired
+ private GeneralTopologyObjectMapper generalTopologyObjectMapper;
public GenericResourceApiGcTopologyOperationInformation assignOrActivateVnrReqMapper(SDNCSvcAction svcAction,
GenericResourceApiRequestActionEnumeration reqAction,
@@ -82,5 +93,4 @@ public class GCTopologyOperationRequestMapper {
}
-
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/GeneralTopologyObjectMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/GeneralTopologyObjectMapper.java
index 7632831111..fedbde251e 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/GeneralTopologyObjectMapper.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/GeneralTopologyObjectMapper.java
@@ -20,18 +20,42 @@
package org.onap.so.client.sdnc.mapper;
-import org.onap.sdnc.northbound.client.model.*;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.*;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.onap.sdnc.northbound.client.model.GenericResourceApiConfigurationinformationConfigurationInformation;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiGcrequestinputGcRequestInput;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiNetworkinformationNetworkInformation;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiOnapmodelinformationOnapModelInformation;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiParam;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiRequestActionEnumeration;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiRequestinformationRequestInformation;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiSdncrequestheaderSdncRequestHeader;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiServiceinformationServiceInformation;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiVfmoduleinformationVfModuleInformation;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiVnfinformationVnfInformation;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.Configuration;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.L3Network;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule;
import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext;
+import org.onap.so.client.exception.MapperException;
import org.onap.so.client.sdnc.beans.SDNCSvcAction;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.core.env.Environment;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
-import org.onap.so.client.exception.MapperException;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
@Component
public class GeneralTopologyObjectMapper {
+ private static final Logger logger = LoggerFactory.getLogger(GeneralTopologyObjectMapper.class);
+ private ObjectMapper mapper = new ObjectMapper();
/*
* Build GenericResourceApiRequestinformationRequestInformation
@@ -194,4 +218,22 @@ public class GeneralTopologyObjectMapper {
}
return gcRequestInput;
}
+
+
+ public String mapUserParamValue(Object value) {
+ if (value == null) {
+ return null;
+ } else {
+ if (value instanceof Map || value instanceof Set || value instanceof List) {
+ try {
+ return mapper.writeValueAsString(value);
+ } catch (JsonProcessingException e) {
+ logger.error("could not map value to string", e);
+ throw new IllegalArgumentException(e);
+ }
+ } else {
+ return value.toString();
+ }
+ }
+ }
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/NetworkTopologyOperationRequestMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/NetworkTopologyOperationRequestMapper.java
index 2b4834af42..188a228e5d 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/NetworkTopologyOperationRequestMapper.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/NetworkTopologyOperationRequestMapper.java
@@ -23,15 +23,6 @@ package org.onap.so.client.sdnc.mapper;
import java.util.Map;
import java.util.UUID;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.L3Network;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
-import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext;
-import org.onap.so.client.sdnc.beans.SDNCSvcAction;
-import org.onap.so.client.sdnc.beans.SDNCSvcOperation;
-import org.springframework.stereotype.Component;
-
import org.onap.sdnc.northbound.client.model.GenericResourceApiNetworkOperationInformation;
import org.onap.sdnc.northbound.client.model.GenericResourceApiNetworkinformationNetworkInformation;
import org.onap.sdnc.northbound.client.model.GenericResourceApiNetworkrequestinputNetworkRequestInput;
@@ -41,6 +32,15 @@ import org.onap.sdnc.northbound.client.model.GenericResourceApiRequestActionEnum
import org.onap.sdnc.northbound.client.model.GenericResourceApiRequestinformationRequestInformation;
import org.onap.sdnc.northbound.client.model.GenericResourceApiSdncrequestheaderSdncRequestHeader;
import org.onap.sdnc.northbound.client.model.GenericResourceApiServiceinformationServiceInformation;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.L3Network;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
+import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext;
+import org.onap.so.client.sdnc.beans.SDNCSvcAction;
+import org.onap.so.client.sdnc.beans.SDNCSvcOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
/**
* Mapper creating SDNC request
@@ -49,7 +49,8 @@ import org.onap.sdnc.northbound.client.model.GenericResourceApiServiceinformatio
@Component
public class NetworkTopologyOperationRequestMapper {
- static GeneralTopologyObjectMapper generalTopologyObjectMapper = new GeneralTopologyObjectMapper();
+ @Autowired
+ private GeneralTopologyObjectMapper generalTopologyObjectMapper;
public GenericResourceApiNetworkOperationInformation reqMapper(SDNCSvcOperation svcOperation,
SDNCSvcAction svcAction, GenericResourceApiRequestActionEnumeration reqAction, L3Network network, ServiceInstance serviceInstance,
@@ -68,11 +69,11 @@ public class NetworkTopologyOperationRequestMapper {
req.setNetworkInformation(networkInformation);
if (requestContext.getUserParams() != null) {
- for (Map.Entry<String, String> entry : requestContext.getUserParams().entrySet()) {
+ for (Map.Entry<String, Object> entry : requestContext.getUserParams().entrySet()) {
GenericResourceApiParam networkInputParameters = new GenericResourceApiParam();
GenericResourceApiParamParam paramItem = new GenericResourceApiParamParam();
- paramItem.setName(entry.getKey());
- paramItem.setValue(entry.getValue());
+ paramItem.setName(entry.getKey());
+ paramItem.setValue(generalTopologyObjectMapper.mapUserParamValue(entry.getValue()));
networkInputParameters.addParamItem(paramItem);
networkRequestInput.setNetworkInputParameters(networkInputParameters);
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/ServiceTopologyOperationMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/ServiceTopologyOperationMapper.java
index 5b23707cb9..505466b22c 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/ServiceTopologyOperationMapper.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/ServiceTopologyOperationMapper.java
@@ -23,13 +23,6 @@ package org.onap.so.client.sdnc.mapper;
import java.util.Map;
import java.util.UUID;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
-import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext;
-import org.onap.so.client.sdnc.beans.SDNCSvcAction;
-import org.onap.so.client.sdnc.beans.SDNCSvcOperation;
-import org.springframework.stereotype.Component;
-
import org.onap.sdnc.northbound.client.model.GenericResourceApiParam;
import org.onap.sdnc.northbound.client.model.GenericResourceApiParamParam;
import org.onap.sdnc.northbound.client.model.GenericResourceApiRequestActionEnumeration;
@@ -38,11 +31,19 @@ import org.onap.sdnc.northbound.client.model.GenericResourceApiSdncrequestheader
import org.onap.sdnc.northbound.client.model.GenericResourceApiServiceOperationInformation;
import org.onap.sdnc.northbound.client.model.GenericResourceApiServiceinformationServiceInformation;
import org.onap.sdnc.northbound.client.model.GenericResourceApiServicerequestinputServiceRequestInput;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
+import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext;
+import org.onap.so.client.sdnc.beans.SDNCSvcAction;
+import org.onap.so.client.sdnc.beans.SDNCSvcOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
@Component
public class ServiceTopologyOperationMapper{
- static GeneralTopologyObjectMapper generalTopologyObjectMapper = new GeneralTopologyObjectMapper();
+ @Autowired
+ public GeneralTopologyObjectMapper generalTopologyObjectMapper;
public GenericResourceApiServiceOperationInformation reqMapper (SDNCSvcOperation svcOperation,
SDNCSvcAction svcAction, GenericResourceApiRequestActionEnumeration resourceAction,ServiceInstance serviceInstance, Customer customer, RequestContext requestContext) {
@@ -62,13 +63,13 @@ public class ServiceTopologyOperationMapper{
servOpInput.setServiceRequestInput(servReqInfo);
if(requestContext.getUserParams()!=null){
- for (Map.Entry<String, String> entry : requestContext.getUserParams().entrySet()) {
+ for (Map.Entry<String, Object> entry : requestContext.getUserParams().entrySet()) {
GenericResourceApiServicerequestinputServiceRequestInput serviceRequestInput = new GenericResourceApiServicerequestinputServiceRequestInput();
serviceRequestInput.setServiceInstanceName(serviceInstance.getServiceInstanceName());
GenericResourceApiParam serviceInputParameters = new GenericResourceApiParam();
GenericResourceApiParamParam paramItem = new GenericResourceApiParamParam();
paramItem.setName(entry.getKey());
- paramItem.setValue(entry.getValue());
+ paramItem.setValue(generalTopologyObjectMapper.mapUserParamValue(entry.getValue()));
serviceInputParameters.addParamItem(paramItem );
serviceRequestInput.serviceInputParameters(serviceInputParameters);
servOpInput.setServiceRequestInput(serviceRequestInput );
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapper.java
index b656579c69..f70ac8399f 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapper.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapper.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -23,39 +25,43 @@ package org.onap.so.client.sdnc.mapper;
import java.util.Map;
import java.util.UUID;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiParam;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiParamParam;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiRequestActionEnumeration;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiRequestinformationRequestInformation;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiSdncrequestheaderSdncRequestHeader;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiServiceinformationServiceInformation;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiSvcActionEnumeration;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiVfModuleOperationInformation;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiVfModuleResponseInformation;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiVfmoduleinformationVfModuleInformation;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiVfmodulerequestinputVfModuleRequestInput;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiVnfinformationVnfInformation;
import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer;
import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule;
import org.onap.so.bpmn.servicedecomposition.bbobjects.VolumeGroup;
import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
import org.onap.so.client.exception.MapperException;
import org.onap.so.client.sdnc.beans.SDNCSvcAction;
import org.onap.so.client.sdnc.beans.SDNCSvcOperation;
import org.onap.so.logger.MessageEnum;
import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
-import org.onap.sdnc.northbound.client.model.GenericResourceApiParam;
-import org.onap.sdnc.northbound.client.model.GenericResourceApiParamParam;
-import org.onap.sdnc.northbound.client.model.GenericResourceApiRequestActionEnumeration;
-import org.onap.sdnc.northbound.client.model.GenericResourceApiRequestinformationRequestInformation;
-import org.onap.sdnc.northbound.client.model.GenericResourceApiSdncrequestheaderSdncRequestHeader;
-import org.onap.sdnc.northbound.client.model.GenericResourceApiServiceinformationServiceInformation;
-import org.onap.sdnc.northbound.client.model.GenericResourceApiSvcActionEnumeration;
-import org.onap.sdnc.northbound.client.model.GenericResourceApiVfModuleOperationInformation;
-import org.onap.sdnc.northbound.client.model.GenericResourceApiVnfinformationVnfInformation;
-import org.onap.sdnc.northbound.client.model.GenericResourceApiVfmoduleinformationVfModuleInformation;
-import org.onap.sdnc.northbound.client.model.GenericResourceApiVfmodulerequestinputVfModuleRequestInput;
-import org.onap.sdnc.northbound.client.model.GenericResourceApiVfModuleResponseInformation;
-
import com.fasterxml.jackson.databind.ObjectMapper;
@Component
public class VfModuleTopologyOperationRequestMapper {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, VfModuleTopologyOperationRequestMapper.class);
- static GeneralTopologyObjectMapper generalTopologyObjectMapper = new GeneralTopologyObjectMapper();
+ private static final Logger logger = LoggerFactory.getLogger(VfModuleTopologyOperationRequestMapper.class);
+
+ @Autowired
+ private GeneralTopologyObjectMapper generalTopologyObjectMapper;
public GenericResourceApiVfModuleOperationInformation reqMapper(SDNCSvcOperation svcOperation,
SDNCSvcAction svcAction, VfModule vfModule, VolumeGroup volumeGroup, GenericVnf vnf, ServiceInstance serviceInstance,
@@ -122,10 +128,10 @@ public class VfModuleTopologyOperationRequestMapper {
GenericResourceApiParam vfModuleInputParameters = new GenericResourceApiParam();
if (requestContext != null && requestContext.getUserParams() != null) {
- for (Map.Entry<String, String> entry : requestContext.getUserParams().entrySet()) {
+ for (Map.Entry<String, Object> entry : requestContext.getUserParams().entrySet()) {
GenericResourceApiParamParam paramItem = new GenericResourceApiParamParam();
paramItem.setName(entry.getKey());
- paramItem.setValue(entry.getValue());
+ paramItem.setValue(generalTopologyObjectMapper.mapUserParamValue(entry.getValue()));
vfModuleInputParameters.addParamItem(paramItem);
}
}
@@ -166,8 +172,9 @@ public class VfModuleTopologyOperationRequestMapper {
try {
GenericResourceApiVfModuleResponseInformation assignResponseInfo = mapper.readValue(sdncAssignResponse, GenericResourceApiVfModuleResponseInformation.class);
objectPath = assignResponseInfo.getVfModuleResponseInformation().getObjectPath();
- } catch (Exception e) {
- msoLogger.error(MessageEnum.RA_RESPONSE_FROM_SDNC, e.getMessage(), "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, e.getMessage());
+ } catch (Exception e) {
+ logger.error("{} {} {} {} {} {}", MessageEnum.RA_RESPONSE_FROM_SDNC.toString(), e.getMessage(), "BPMN",
+ MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError.getValue(), e.getMessage());
}
}
return objectPath;
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VnfTopologyOperationRequestMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VnfTopologyOperationRequestMapper.java
index e860d3cc48..7de393bb2f 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VnfTopologyOperationRequestMapper.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VnfTopologyOperationRequestMapper.java
@@ -26,6 +26,16 @@ import java.util.Map;
import java.util.UUID;
import org.apache.commons.lang.StringUtils;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiParam;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiParamParam;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiRequestActionEnumeration;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiRequestinformationRequestInformation;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiSdncrequestheaderSdncRequestHeader;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiServiceinformationServiceInformation;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiVnfOperationInformation;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiVnfinformationVnfInformation;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiVnfrequestinputVnfRequestInput;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiVnfrequestinputVnfrequestinputVnfNetworkInstanceGroupIds;
import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer;
import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
@@ -36,23 +46,14 @@ import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext;
import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoInstanceGroup;
import org.onap.so.client.sdnc.beans.SDNCSvcAction;
import org.onap.so.client.sdnc.beans.SDNCSvcOperation;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
-import org.onap.sdnc.northbound.client.model.GenericResourceApiParam;
-import org.onap.sdnc.northbound.client.model.GenericResourceApiParamParam;
-import org.onap.sdnc.northbound.client.model.GenericResourceApiRequestActionEnumeration;
-import org.onap.sdnc.northbound.client.model.GenericResourceApiRequestinformationRequestInformation;
-import org.onap.sdnc.northbound.client.model.GenericResourceApiSdncrequestheaderSdncRequestHeader;
-import org.onap.sdnc.northbound.client.model.GenericResourceApiServiceinformationServiceInformation;
-import org.onap.sdnc.northbound.client.model.GenericResourceApiVnfOperationInformation;
-import org.onap.sdnc.northbound.client.model.GenericResourceApiVnfinformationVnfInformation;
-import org.onap.sdnc.northbound.client.model.GenericResourceApiVnfrequestinputVnfRequestInput;
-import org.onap.sdnc.northbound.client.model.GenericResourceApiVnfrequestinputVnfrequestinputVnfNetworkInstanceGroupIds;
-
@Component
public class VnfTopologyOperationRequestMapper {
- static GeneralTopologyObjectMapper generalTopologyObjectMapper = new GeneralTopologyObjectMapper();
+ @Autowired
+ private GeneralTopologyObjectMapper generalTopologyObjectMapper;
public GenericResourceApiVnfOperationInformation reqMapper(SDNCSvcOperation svcOperation, SDNCSvcAction svcAction,
GenericResourceApiRequestActionEnumeration requestAction, GenericVnf vnf, ServiceInstance serviceInstance,
@@ -84,10 +85,10 @@ public class VnfTopologyOperationRequestMapper {
GenericResourceApiParam vnfInputParameters = new GenericResourceApiParam();
if (requestContext.getUserParams() != null) {
- for (Map.Entry<String, String> entry : requestContext.getUserParams().entrySet()) {
+ for (Map.Entry<String, Object> entry : requestContext.getUserParams().entrySet()) {
GenericResourceApiParamParam paramItem = new GenericResourceApiParamParam();
paramItem.setName(entry.getKey());
- paramItem.setValue(entry.getValue());
+ paramItem.setValue(generalTopologyObjectMapper.mapUserParamValue(entry.getValue()));
vnfInputParameters.addParamItem(paramItem);
vnfRequestInput.setVnfInputParameters(vnfInputParameters);
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/SniroClient.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/SniroClient.java
index 7f09305d95..5a48a757bc 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/SniroClient.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/SniroClient.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -29,7 +31,8 @@ import org.onap.so.client.exception.BadResponseException;
import org.onap.so.client.sniro.beans.ManagerProperties;
import org.onap.so.client.sniro.beans.SniroConductorRequest;
import org.onap.so.client.sniro.beans.SniroManagerRequest;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.http.HttpHeaders;
@@ -42,7 +45,7 @@ import com.fasterxml.jackson.core.JsonProcessingException;
@Component
public class SniroClient {
- private static final MsoLogger log = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, SniroClient.class);
+ private static final Logger logger = LoggerFactory.getLogger(SniroClient.class);
@Autowired
private ManagerProperties managerProperties;
@@ -61,10 +64,10 @@ public class SniroClient {
* @throws BpmnError
*/
public void postDemands(SniroManagerRequest homingRequest) throws BadResponseException, JsonProcessingException{
- log.trace("Started Sniro Client Post Demands");
+ logger.trace("Started Sniro Client Post Demands");
String url = managerProperties.getHost() + managerProperties.getUri().get("v2");
- log.debug("Post demands url: " + url);
- log.debug("Post demands payload: " + homingRequest.toJsonString());
+ logger.debug("Post demands url: {}", url);
+ logger.debug("Post demands payload: {}", homingRequest.toJsonString());
HttpHeaders header = new HttpHeaders();
header.setContentType(MediaType.APPLICATION_JSON);
@@ -79,7 +82,7 @@ public class SniroClient {
LinkedHashMap<String, Object> response = baseClient.post(homingRequest.toJsonString(), new ParameterizedTypeReference<LinkedHashMap<String, Object>>() {});
validator.validateDemandsResponse(response);
- log.trace("Completed Sniro Client Post Demands");
+ logger.trace("Completed Sniro Client Post Demands");
}
/**
@@ -94,10 +97,10 @@ public class SniroClient {
* @throws BadResponseException
*/
public void postRelease(SniroConductorRequest releaseRequest) throws BadResponseException {
- log.trace("Started Sniro Client Post Release");
+ logger.trace("Started Sniro Client Post Release");
String url = UrnPropertiesReader.getVariable("sniro.conductor.host") + UrnPropertiesReader.getVariable("sniro.conductor.uri");
- log.debug("Post release url: " + url);
- log.debug("Post release payload: " + releaseRequest.toJsonString());
+ logger.debug("Post release url: {}", url);
+ logger.debug("Post release payload: {}", releaseRequest.toJsonString());
HttpHeaders header = new HttpHeaders();
header.setContentType(MediaType.APPLICATION_JSON);
@@ -110,7 +113,7 @@ public class SniroClient {
LinkedHashMap<String, Object> response = baseClient.post(releaseRequest.toJsonString(), new ParameterizedTypeReference<LinkedHashMap<String, Object>>() {});
SniroValidator v = new SniroValidator();
v.validateReleaseResponse(response);
- log.trace("Completed Sniro Client Post Release");
+ logger.trace("Completed Sniro Client Post Release");
}
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/SniroValidator.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/SniroValidator.java
index 0d0c1be5aa..dcccd319c6 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/SniroValidator.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/SniroValidator.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -28,7 +30,8 @@ import java.util.LinkedHashMap;
import org.json.JSONObject;
import org.onap.so.client.exception.BadResponseException;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
@@ -36,7 +39,7 @@ import org.springframework.stereotype.Component;
@Component
public class SniroValidator {
- private static final MsoLogger log = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, SniroValidator.class);
+ private static final Logger logger = LoggerFactory.getLogger(SniroValidator.class);
/**
* Validates the synchronous homing response from sniro manager
@@ -44,29 +47,29 @@ public class SniroValidator {
* @throws BadResponseException
*/
public void validateDemandsResponse(LinkedHashMap<String, Object> response) throws BadResponseException {
- log.debug("Validating Sniro Managers synchronous response");
+ logger.debug("Validating Sniro Managers synchronous response");
if(!response.isEmpty()){
JSONObject jsonResponse = new JSONObject(response);
if(jsonResponse.has("requestStatus")){
String status = jsonResponse.getString("requestStatus");
if(status.equals("accepted")){
- log.debug("Sniro Managers synchronous response indicates accepted");
+ logger.debug("Sniro Managers synchronous response indicates accepted");
}else{
String message = jsonResponse.getString("statusMessage");
if(isNotBlank(message)){
- log.debug("Sniro Managers response indicates failed: " + message);
+ logger.debug("Sniro Managers response indicates failed: " + message);
}else{
- log.debug("Sniro Managers response indicates failed: no status message provided");
+ logger.debug("Sniro Managers response indicates failed: no status message provided");
message = "error message not provided";
}
throw new BadResponseException("Sniro Managers synchronous response indicates failed: " + message);
}
}else{
- log.debug("Sniro Managers synchronous response does not contain: request status");
+ logger.debug("Sniro Managers synchronous response does not contain: request status");
throw new BadResponseException("Sniro Managers synchronous response does not contain: request status");
}
}else{
- log.debug("Sniro Managers synchronous response is empty");
+ logger.debug("Sniro Managers synchronous response is empty");
throw new BadResponseException("Sniro Managers synchronous response i is empty");
}
}
@@ -78,23 +81,23 @@ public class SniroValidator {
* @throws BadResponseException
*/
public static void validateSolution(String response) throws BadResponseException{
- log.debug("Validating Sniro Managers asynchronous callback response");
+ logger.debug("Validating Sniro Managers asynchronous callback response");
if(isNotBlank(response)) {
JSONObject jsonResponse = new JSONObject(response);
if(!jsonResponse.has("serviceException")){
- log.debug("Sniro Managers asynchronous response is valid");
+ logger.debug("Sniro Managers asynchronous response is valid");
}else{
String message = jsonResponse.getJSONObject("serviceException").getString("text");
if(isNotBlank(message)){
- log.debug("Sniro Managers response contains a service exception: " + message);
+ logger.debug("Sniro Managers response contains a service exception: " + message);
}else{
- log.debug("Sniro Managers response contains a service exception: no service exception text provided");
+ logger.debug("Sniro Managers response contains a service exception: no service exception text provided");
message = "error message not provided";
}
throw new BadResponseException("Sniro Managers asynchronous response contains a service exception: " + message);
}
}else{
- log.debug("Sniro Managers asynchronous response is empty");
+ logger.debug("Sniro Managers asynchronous response is empty");
throw new BadResponseException("Sniro Managers asynchronous response is empty");
}
}
@@ -106,33 +109,31 @@ public class SniroValidator {
* @throws BadResponseException
*/
public void validateReleaseResponse(LinkedHashMap<String, Object> response) throws BadResponseException {
- log.debug("Validating Sniro Conductors response");
+ logger.debug("Validating Sniro Conductors response");
if(!response.isEmpty()){
String status = (String) response.get("status");
if(isNotBlank(status)){
if(status.equals("success")){
- log.debug("Sniro Conductors synchronous response indicates success");
+ logger.debug("Sniro Conductors synchronous response indicates success");
}else{
String message = (String) response.get("message");
if(isNotBlank(message)){
- log.debug("Sniro Conductors response indicates failed: " + message);
+ logger.debug("Sniro Conductors response indicates failed: " + message);
}else{
- log.debug("Sniro Conductors response indicates failed: error message not provided");
+ logger.debug("Sniro Conductors response indicates failed: error message not provided");
message = "error message not provided";
}
throw new BadResponseException("Sniro Conductors synchronous response indicates failed: " + message);
}
}else{
- log.debug("Sniro Managers Conductors response does not contain: status");
+ logger.debug("Sniro Managers Conductors response does not contain: status");
throw new BadResponseException("Sniro Conductors synchronous response does not contain: status");
}
}else{
- log.debug("Sniro Conductors response is empty");
+ logger.debug("Sniro Conductors response is empty");
throw new BadResponseException("Sniro Conductors response is empty");
}
}
-
-
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/SniroConductorRequest.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/SniroConductorRequest.java
index bc8e27ce86..11417d646c 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/SniroConductorRequest.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/SniroConductorRequest.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -24,19 +26,19 @@ import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
-import org.onap.so.logger.MsoLogger;
-
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.ObjectWriter;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class SniroConductorRequest implements Serializable{
private static final long serialVersionUID = 1906052095861777655L;
- private static final MsoLogger log = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, SniroConductorRequest.class);
+ private static final Logger logger = LoggerFactory.getLogger(SniroConductorRequest.class);
@JsonProperty("release-locks")
private List<Resource> resources = new ArrayList<Resource>();
@@ -55,7 +57,7 @@ public class SniroConductorRequest implements Serializable{
try{
json = ow.writeValueAsString(this);
}catch (Exception e){
- log.error("Unable to convert SniroConductorRequest to string", e);
+ logger.error("Unable to convert SniroConductorRequest to string", e);
}
return json;
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/SniroManagerRequest.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/SniroManagerRequest.java
index 3c39456318..c1e376814f 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/SniroManagerRequest.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/SniroManagerRequest.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -22,20 +24,19 @@ package org.onap.so.client.sniro.beans;
import java.io.Serializable;
-import org.onap.so.logger.MsoLogger;
-
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonRawValue;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.ObjectWriter;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class SniroManagerRequest implements Serializable{
private static final long serialVersionUID = -1541132882892163132L;
- private static final MsoLogger log = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, SniroManagerRequest.class);
+ private static final Logger logger = LoggerFactory.getLogger(SniroManagerRequest.class);
@JsonProperty("requestInfo")
private RequestInfo requestInformation;
@@ -82,7 +83,7 @@ public class SniroManagerRequest implements Serializable{
try{
json = ow.writeValueAsString(this);
}catch (Exception e){
- log.error("Unable to convert SniroManagerRequest to string", e);
+ logger.error("Unable to convert SniroManagerRequest to string", e);
}
return json.replaceAll("\\\\", "");
}
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/FileUtil.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/FileUtil.java
index e35fe0db9f..366c9c11a9 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/FileUtil.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/FileUtil.java
@@ -4,6 +4,8 @@
* ================================================================================
* 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
@@ -22,7 +24,8 @@ package org.onap.so;
import java.io.IOException;
import java.io.InputStream;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
*
@@ -35,7 +38,7 @@ import org.onap.so.logger.MsoLogger;
*/
public class FileUtil {
- private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA, FileUtil.class);
+ private static final Logger logger = LoggerFactory.getLogger(FileUtil.class);
/**
* Read the specified resource file and return the contents as a String.
@@ -58,7 +61,7 @@ public class FileUtil {
return "";
}
} catch (IOException e) {
- LOGGER.debug("Exception:", e);
+ logger.debug("Exception:", e);
return "";
}
}
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java
index 73d7257632..a8a249f386 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java
@@ -43,6 +43,7 @@ import org.mockito.ArgumentMatchers;
import org.mockito.InjectMocks;
import org.mockito.Mockito;
import org.onap.so.adapters.nwrest.CreateNetworkResponse;
+import org.onap.so.adapters.nwrest.UpdateNetworkResponse;
import org.onap.so.bpmn.BaseTaskTest;
import org.onap.so.bpmn.common.BuildingBlockExecution;
import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
@@ -456,6 +457,29 @@ public class AAIUpdateTasksTest extends BaseTaskTest{
String neutronSubnetId = createNetworkResponse.getSubnetMap().entrySet().iterator().next().getValue();
assertEquals(neutronSubnetId, network.getSubnets().get(0).getNeutronSubnetId());
}
+
+ @Test
+ public void updateNetworkUpdatedTest() throws Exception {
+ UpdateNetworkResponse updateNetworkResponse = new UpdateNetworkResponse();
+ updateNetworkResponse.setNeutronNetworkId("testNeutronNetworkId");
+ HashMap<String, String> subnetMap = new HashMap<>();
+ subnetMap.put("testSubnetId", "testNeutronSubnetId");
+ updateNetworkResponse.setSubnetMap(subnetMap);
+
+ network.getSubnets().add(subnet);
+
+ execution.setVariable("updateNetworkResponse", updateNetworkResponse);
+
+ doNothing().when(aaiNetworkResources).updateNetwork(network);
+ doNothing().when(aaiNetworkResources).updateSubnet(network, subnet);
+
+ aaiUpdateTasks.updateNetworkUpdated(execution);
+ verify(aaiNetworkResources, times(1)).updateNetwork(network);
+ verify(aaiNetworkResources, times(1)).updateSubnet(network, subnet);
+
+ String neutronSubnetId = updateNetworkResponse.getSubnetMap().entrySet().iterator().next().getValue();
+ assertEquals(neutronSubnetId, network.getSubnets().get(0).getNeutronSubnetId());
+ }
@Test
public void updateOrchestrationStatusNetworkTest() {
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/network/tasks/NetworkAdapterUpdateTasksTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/network/tasks/NetworkAdapterUpdateTasksTest.java
index 9f2f2fbdcc..478c512b0a 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/network/tasks/NetworkAdapterUpdateTasksTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/network/tasks/NetworkAdapterUpdateTasksTest.java
@@ -24,6 +24,7 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.ArgumentMatchers.isA;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.times;
@@ -39,6 +40,8 @@ import org.junit.Before;
import org.junit.Test;
import org.mockito.ArgumentMatchers;
import org.mockito.InjectMocks;
+import org.onap.so.adapters.nwrest.CreateNetworkRequest;
+import org.onap.so.adapters.nwrest.UpdateNetworkRequest;
import org.onap.so.adapters.nwrest.UpdateNetworkResponse;
import org.onap.so.bpmn.BaseTaskTest;
import org.onap.so.bpmn.common.BuildingBlockExecution;
@@ -83,35 +86,15 @@ public class NetworkAdapterUpdateTasksTest extends BaseTaskTest{
@Test
public void updateNetworkTest() throws Exception {
- UpdateNetworkResponse updateNetworkResponse = new UpdateNetworkResponse();
- updateNetworkResponse.setMessageId("messageId");
- updateNetworkResponse.setNetworkId("networkId");
- Optional<UpdateNetworkResponse> oUpdateNetworkResponse = Optional.of(updateNetworkResponse);
-
- doReturn(oUpdateNetworkResponse).when(networkAdapterResources).updateNetwork(requestContext, cloudRegion, orchestrationContext, serviceInstance, network, userInput, customer);
-
- networkAdapterUpdateTasks.updateNetwork(execution);
-
- verify(networkAdapterResources, times(1)).updateNetwork(requestContext, cloudRegion, orchestrationContext, serviceInstance, network, userInput, customer);
- assertEquals(updateNetworkResponse, execution.getVariable("NetworkAdapterUpdateNetworkResponse"));
- }
-
- @Test
- public void updateNetworkNoResponseTest() throws Exception {
- doReturn(Optional.empty()).when(networkAdapterResources).updateNetwork(requestContext, cloudRegion, orchestrationContext, serviceInstance, network, userInput, customer);
-
+ String cloudRegionPo = "cloudRegionPo";
+ UpdateNetworkRequest updateNetworkRequest = new UpdateNetworkRequest();
+ execution.setVariable("cloudRegionPo", cloudRegionPo);
+
+ doReturn(updateNetworkRequest).when(networkAdapterObjectMapper).createNetworkUpdateRequestMapper(isA(RequestContext.class), isA(CloudRegion.class), isA(OrchestrationContext.class), isA(ServiceInstance.class), isA(L3Network.class), isA(Map.class), isA(Customer.class));
networkAdapterUpdateTasks.updateNetwork(execution);
-
- verify(networkAdapterResources, times(1)).updateNetwork(requestContext, cloudRegion, orchestrationContext, serviceInstance, network, userInput, customer);
- assertNull(execution.getVariable("NetworkAdapterUpdateNetworkResponse"));
+ verify(networkAdapterObjectMapper, times(1)).createNetworkUpdateRequestMapper(requestContext, cloudRegion, orchestrationContext, serviceInstance, network, userInput, customer);
+ assertEquals(updateNetworkRequest, execution.getVariable("networkAdapterRequest"));
}
- @Test
- public void updateNetworkExceptionTest() throws UnsupportedEncodingException, NetworkAdapterClientException {
- expectedException.expect(BpmnError.class);
- doThrow(new NetworkAdapterClientException("ERROR")).when(networkAdapterResources).updateNetwork(any(RequestContext.class),any(CloudRegion.class),
- any(OrchestrationContext.class),eq(serviceInstance),eq(network),any(Map.class),any(Customer.class));
- doThrow(new BpmnError("BPMN Error")).when(exceptionUtil).buildAndThrowWorkflowException(any(BuildingBlockExecution.class), eq(7000), any(Exception.class));
- networkAdapterUpdateTasks.updateNetwork(execution);
- }
+
}
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/CloudSiteCatalogUtilsTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/CloudSiteCatalogUtilsTest.java
new file mode 100644
index 0000000000..125c97109c
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/CloudSiteCatalogUtilsTest.java
@@ -0,0 +1,88 @@
+/*-
+ * ============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.infrastructure.flowspecific.tasks;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.doReturn;
+import java.util.Optional;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.onap.so.bpmn.BaseTaskTest;
+
+import org.onap.so.db.catalog.beans.CloudIdentity;
+import org.onap.so.db.catalog.beans.CloudSite;
+
+public class CloudSiteCatalogUtilsTest extends BaseTaskTest {
+
+ @InjectMocks
+ private CloudSiteCatalogUtils cloudSiteCatalogUtils = new CloudSiteCatalogUtils();
+
+ @Test
+ public void testGetCloudSiteGetVersion30Test() throws Exception {
+ CloudSite cloudSite = new CloudSite();
+ String testCloudSiteId = "testCloudSiteId";
+ cloudSite.setClli(testCloudSiteId);
+ doReturn(cloudSite).when(catalogDbClient).getCloudSite(testCloudSiteId);
+ Optional<CloudSite> actualCloudSite = cloudSiteCatalogUtils.getCloudSite(testCloudSiteId);
+ assertEquals(actualCloudSite.get().getClli(), testCloudSiteId);
+ }
+
+ @Test
+ public void testGetCloudSiteGetVersion25Test() throws Exception {
+ CloudSite cloudSite = new CloudSite();
+ String testCloudSiteId = "testCloudSiteId";
+ cloudSite.setClli(testCloudSiteId);
+ doReturn(null).when(catalogDbClient).getCloudSite(testCloudSiteId);
+ doReturn(cloudSite).when(catalogDbClient).getCloudSiteByClliAndAicVersion(testCloudSiteId, "2.5");
+ Optional<CloudSite> actualCloudSite = cloudSiteCatalogUtils.getCloudSite(testCloudSiteId);
+ assertEquals(actualCloudSite.get().getClli(), testCloudSiteId);
+ }
+
+ @Test
+ public void testGetIdentityUrlFromCloudSiteSuccessTest() throws Exception {
+ CloudSite cloudSite = new CloudSite();
+ String testCloudSiteId = "testCloudSiteId";
+ String testIdentityUrl = "testIdentityUrl";
+ delegateExecution.setVariable("lcpCloudRegionId", testCloudSiteId);
+ cloudSite.setClli(testCloudSiteId);
+ CloudIdentity cloudIdentity = new CloudIdentity();
+ cloudIdentity.setIdentityUrl(testIdentityUrl);
+ cloudSite.setIdentityService(cloudIdentity);
+ doReturn(cloudSite).when(catalogDbClient).getCloudSite(testCloudSiteId);
+ cloudSiteCatalogUtils.getIdentityUrlFromCloudSite(delegateExecution);
+ String actualIdentityUrl = (String) delegateExecution.getVariable("identityUrl");
+ assertEquals(testIdentityUrl, actualIdentityUrl);
+ }
+
+ @Test
+ public void testGetIdentityUrlFromCloudSiteNoCloudIdProvidedTest() throws Exception {
+ CloudSite cloudSite = new CloudSite();
+ String testCloudSiteId = "testCloudSiteId";
+ String testIdentityUrl = "testIdentityUrl";
+ cloudSite.setClli(testCloudSiteId);
+ CloudIdentity cloudIdentity = new CloudIdentity();
+ cloudIdentity.setIdentityUrl(testIdentityUrl);
+ cloudSite.setIdentityService(cloudIdentity);
+ doReturn(cloudSite).when(catalogDbClient).getCloudSite(testCloudSiteId);
+ cloudSiteCatalogUtils.getIdentityUrlFromCloudSite(delegateExecution);
+ String actualIdentityUrl = (String) delegateExecution.getVariable("identityUrl");
+ assertEquals(null, actualIdentityUrl);
+ }
+}
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/SniroHomingV2IT.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/SniroHomingV2IT.java
index 59fad5cdd6..c4129a3b96 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/SniroHomingV2IT.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/SniroHomingV2IT.java
@@ -39,7 +39,6 @@ import org.camunda.bpm.engine.delegate.BpmnError;
import org.json.JSONArray;
import org.json.JSONObject;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
import org.onap.so.bpmn.servicedecomposition.bbobjects.AllottedResource;
@@ -211,13 +210,13 @@ public class SniroHomingV2IT extends BaseIntegrationTest{
JSONObject asyncResponse = new JSONObject();
asyncResponse.put("transactionId", "testRequestId").put("requestId", "testRequestId").put("requestState", "completed");
JSONArray solution1 = new JSONArray();
- solution1.put(new JSONObject().put("serviceResourceId", "testProxyId1").put("inventoryType", "service").put("solution", new JSONObject()
+ solution1.put(new JSONObject().put("serviceResourceId", "testProxyId1").put("solution", new JSONObject()
.put("identifierType", "serviceInstanceId").put("identifiers", new JSONArray().put("testServiceInstanceId1")))
.put("assignmentInfo", new JSONArray().put(new JSONObject().put("key", "isRehome").put("value", "False"))
.put(new JSONObject().put("key", "cloudOwner").put("value", "aic")).put(new JSONObject().put("key", "vnfHostName").put("value", "testVnfHostName1"))
.put(new JSONObject().put("key", "aicClli").put("value", "testAicClli1")).put(new JSONObject().put("key", "aicVersion").put("value", "3"))
.put(new JSONObject().put("key", "vnfId").put("value", "testVnfId1")).put(new JSONObject().put("key", "cloudRegionId").put("value", "testSloudRegionId1"))));
- solution1.put(new JSONObject().put("serviceResourceId", "testProxyId2").put("inventoryType", "service").put("solution", new JSONObject()
+ solution1.put(new JSONObject().put("serviceResourceId", "testProxyId2").put("solution", new JSONObject()
.put("identifierType", "serviceInstanceId").put("identifiers", new JSONArray().put("testServiceInstanceId2")))
.put("assignmentInfo", new JSONArray().put(new JSONObject().put("key", "isRehome").put("value", "False"))
.put(new JSONObject().put("key", "cloudOwner").put("value", "aic")).put(new JSONObject().put("key", "primaryPnfName").put("value", "testPrimaryPnfName2"))
@@ -255,13 +254,13 @@ public class SniroHomingV2IT extends BaseIntegrationTest{
JSONObject asyncResponse = new JSONObject();
asyncResponse.put("transactionId", "testRequestId").put("requestId", "testRequestId").put("requestState", "completed");
JSONArray solution1 = new JSONArray();
- solution1.put(new JSONObject().put("serviceResourceId", "testProxyId1").put("inventoryType", "service").put("solution", new JSONObject()
+ solution1.put(new JSONObject().put("serviceResourceId", "testProxyId1").put("solution", new JSONObject()
.put("identifierType", "serviceInstanceId").put("identifiers", new JSONArray().put("testServiceInstanceId1")))
.put("assignmentInfo", new JSONArray().put(new JSONObject().put("key", "isRehome").put("value", "False"))
.put(new JSONObject().put("key", "cloudOwner").put("value", "aic")).put(new JSONObject().put("key", "vnfHostName").put("value", "testVnfHostName1"))
.put(new JSONObject().put("key", "aicClli").put("value", "testAicClli1")).put(new JSONObject().put("key", "aicVersion").put("value", "3"))
.put(new JSONObject().put("key", "vnfId").put("value", "testVnfId1")).put(new JSONObject().put("key", "cloudRegionId").put("value", "testSloudRegionId1"))));
- solution1.put(new JSONObject().put("serviceResourceId", "testProxyId2").put("inventoryType", "service").put("solution", new JSONObject()
+ solution1.put(new JSONObject().put("serviceResourceId", "testProxyId2").put("solution", new JSONObject()
.put("identifierType", "serviceInstanceId").put("identifiers", new JSONArray().put("testServiceInstanceId2")))
.put("assignmentInfo", new JSONArray().put(new JSONObject().put("key", "isRehome").put("value", "False"))
.put(new JSONObject().put("key", "cloudOwner").put("value", "aic")).put(new JSONObject().put("key", "primaryPnfName").put("value", "testPrimaryPnfName2"))
@@ -269,13 +268,13 @@ public class SniroHomingV2IT extends BaseIntegrationTest{
.put(new JSONObject().put("key", "secondaryPnfName").put("value", "testSecondaryPnfName2")).put(new JSONObject().put("key", "cloudRegionId").put("value", "testSloudRegionId2"))));
JSONArray solution2 = new JSONArray();
- solution2.put(new JSONObject().put("serviceResourceId", "testProxyId1").put("inventoryType", "service").put("solution", new JSONObject()
+ solution2.put(new JSONObject().put("serviceResourceId", "testProxyId1").put("solution", new JSONObject()
.put("identifierType", "serviceInstanceId").put("identifiers", new JSONArray().put("testServiceInstanceId3")))
.put("assignmentInfo", new JSONArray().put(new JSONObject().put("key", "isRehome").put("value", "False"))
.put(new JSONObject().put("key", "cloudOwner").put("value", "aic")).put(new JSONObject().put("key", "vnfHostName").put("value", "testVnfHostName3"))
.put(new JSONObject().put("key", "aicClli").put("value", "testAicClli3")).put(new JSONObject().put("key", "aicVersion").put("value", "3"))
.put(new JSONObject().put("key", "vnfId").put("value", "testVnfId3")).put(new JSONObject().put("key", "cloudRegionId").put("value", "testSloudRegionId3"))));
- solution2.put(new JSONObject().put("serviceResourceId", "testProxyId2").put("inventoryType", "service").put("solution", new JSONObject()
+ solution2.put(new JSONObject().put("serviceResourceId", "testProxyId2").put("solution", new JSONObject()
.put("identifierType", "serviceInstanceId").put("identifiers", new JSONArray().put("testServiceInstanceId4")))
.put("assignmentInfo", new JSONArray().put(new JSONObject().put("key", "isRehome").put("value", "False"))
.put(new JSONObject().put("key", "cloudOwner").put("value", "aic")).put(new JSONObject().put("key", "primaryPnfName").put("value", "testPrimaryPnfName4"))
@@ -335,19 +334,19 @@ public class SniroHomingV2IT extends BaseIntegrationTest{
JSONObject asyncResponse = new JSONObject();
asyncResponse.put("transactionId", "testRequestId").put("requestId", "testRequestId").put("requestState", "completed");
JSONArray solution1 = new JSONArray();
- solution1.put(new JSONObject().put("serviceResourceId", "testAllottedResourceId1").put("inventoryType", "service").put("solution", new JSONObject()
+ solution1.put(new JSONObject().put("serviceResourceId", "testAllottedResourceId1").put("solution", new JSONObject()
.put("identifierType", "serviceInstanceId").put("identifiers", new JSONArray().put("testServiceInstanceId1")))
.put("assignmentInfo", new JSONArray().put(new JSONObject().put("key", "isRehome").put("value", "True"))
.put(new JSONObject().put("key", "cloudOwner").put("value", "aic")).put(new JSONObject().put("key", "vnfHostName").put("value", "testVnfHostName1"))
.put(new JSONObject().put("key", "aicClli").put("value", "testAicClli1")).put(new JSONObject().put("key", "aicVersion").put("value", "3"))
.put(new JSONObject().put("key", "vnfId").put("value", "testVnfId1")).put(new JSONObject().put("key", "cloudRegionId").put("value", "testCloudRegionId1"))));
- solution1.put(new JSONObject().put("serviceResourceId", "testAllottedResourceId2").put("inventoryType", "service").put("solution", new JSONObject()
+ solution1.put(new JSONObject().put("serviceResourceId", "testAllottedResourceId2").put("solution", new JSONObject()
.put("identifierType", "serviceInstanceId").put("identifiers", new JSONArray().put("testServiceInstanceId2")))
.put("assignmentInfo", new JSONArray().put(new JSONObject().put("key", "isRehome").put("value", "True"))
.put(new JSONObject().put("key", "cloudOwner").put("value", "aic")).put(new JSONObject().put("key", "vnfHostName").put("value", "testVnfHostName2"))
.put(new JSONObject().put("key", "aicClli").put("value", "testAicClli2")).put(new JSONObject().put("key", "aicVersion").put("value", "3"))
.put(new JSONObject().put("key", "vnfId").put("value", "testVnfId1")).put(new JSONObject().put("key", "cloudRegionId").put("value", "testCloudRegionId2"))));
- solution1.put(new JSONObject().put("serviceResourceId", "testAllottedResourceId3").put("inventoryType", "cloud").put("solution", new JSONObject()
+ solution1.put(new JSONObject().put("serviceResourceId", "testAllottedResourceId3").put("solution", new JSONObject()
.put("identifierType", "cloudRegionId").put("identifiers", new JSONArray().put("testCloudRegionId3")))
.put("assignmentInfo", new JSONArray().put(new JSONObject().put("key", "isRehome").put("value", "True"))
.put(new JSONObject().put("key", "cloudOwner").put("value", "aic"))
@@ -387,19 +386,19 @@ public class SniroHomingV2IT extends BaseIntegrationTest{
asyncResponse.put("transactionId", "testRequestId").put("requestId", "testRequestId").put("requestState", "completed");
JSONArray solution1 = new JSONArray();
JSONArray licenseSolution = new JSONArray();
- solution1.put(new JSONObject().put("serviceResourceId", "testAllottedResourceId1").put("inventoryType", "service").put("solution", new JSONObject()
+ solution1.put(new JSONObject().put("serviceResourceId", "testAllottedResourceId1").put("solution", new JSONObject()
.put("identifierType", "serviceInstanceId").put("identifiers", new JSONArray().put("testServiceInstanceId1")))
.put("assignmentInfo", new JSONArray().put(new JSONObject().put("key", "isRehome").put("value", "True"))
.put(new JSONObject().put("key", "cloudOwner").put("value", "aic")).put(new JSONObject().put("key", "vnfHostName").put("value", "testVnfHostName1"))
.put(new JSONObject().put("key", "aicClli").put("value", "testAicClli1")).put(new JSONObject().put("key", "aicVersion").put("value", "3"))
.put(new JSONObject().put("key", "vnfId").put("value", "testVnfId1")).put(new JSONObject().put("key", "cloudRegionId").put("value", "testCloudRegionId1"))));
- solution1.put(new JSONObject().put("serviceResourceId", "testAllottedResourceId2").put("inventoryType", "service").put("solution", new JSONObject()
+ solution1.put(new JSONObject().put("serviceResourceId", "testAllottedResourceId2").put("solution", new JSONObject()
.put("identifierType", "serviceInstanceId").put("identifiers", new JSONArray().put("testServiceInstanceId2")))
.put("assignmentInfo", new JSONArray().put(new JSONObject().put("key", "isRehome").put("value", "True"))
.put(new JSONObject().put("key", "cloudOwner").put("value", "aic")).put(new JSONObject().put("key", "vnfHostName").put("value", "testVnfHostName2"))
.put(new JSONObject().put("key", "aicClli").put("value", "testAicClli2")).put(new JSONObject().put("key", "aicVersion").put("value", "3"))
.put(new JSONObject().put("key", "vnfId").put("value", "testVnfId1")).put(new JSONObject().put("key", "cloudRegionId").put("value", "testCloudRegionId2"))));
- solution1.put(new JSONObject().put("serviceResourceId", "testAllottedResourceId3").put("inventoryType", "cloud").put("solution", new JSONObject()
+ solution1.put(new JSONObject().put("serviceResourceId", "testAllottedResourceId3").put("solution", new JSONObject()
.put("identifierType", "cloudRegionId").put("identifiers", new JSONArray().put("testCloudRegionId3")))
.put("assignmentInfo", new JSONArray().put(new JSONObject().put("key", "isRehome").put("value", "True"))
.put(new JSONObject().put("key", "cloudOwner").put("value", "aic")).put(new JSONObject().put("key", "aicClli").put("value", "testAicClli2"))
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 339e9cbf17..5169663add 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
@@ -72,7 +72,6 @@ public class VnfAdapterObjectMapperTest {
}
@Test
- @Ignore
public void test_createVolumeGroupRequestMapper() throws Exception {
RequestContext requestContext = new RequestContext();
requestContext.setMsoRequestId("msoRequestId");
@@ -123,7 +122,7 @@ public class VnfAdapterObjectMapperTest {
expectedCreateVolumeGroupRequest.setVfModuleType(volumeGroup.getModelInfoVfModule().getModelName());
expectedCreateVolumeGroupRequest.setModelCustomizationUuid(volumeGroup.getModelInfoVfModule().getModelCustomizationUUID());
- Map<String, String> volumeGroupParams = new HashMap<>();
+ Map<String, Object> volumeGroupParams = new HashMap<>();
volumeGroupParams.put("vnf_id", genericVnf.getVnfId());
volumeGroupParams.put("vnf_name", genericVnf.getVnfName());
volumeGroupParams.put("vf_module_id", volumeGroup.getVolumeGroupId());
@@ -201,7 +200,7 @@ public class VnfAdapterObjectMapperTest {
expectedCreateVolumeGroupRequest.setVfModuleType(volumeGroup.getModelInfoVfModule().getModelName());
expectedCreateVolumeGroupRequest.setModelCustomizationUuid(volumeGroup.getModelInfoVfModule().getModelCustomizationUUID());
- Map<String, String> volumeGroupParams = new HashMap<>();
+ Map<String, Object> volumeGroupParams = new HashMap<>();
volumeGroupParams.put("vnf_id", genericVnf.getVnfId());
volumeGroupParams.put("vnf_name", genericVnf.getVnfName());
volumeGroupParams.put("vf_module_id", volumeGroup.getVolumeGroupId());
@@ -285,7 +284,6 @@ public class VnfAdapterObjectMapperTest {
}
@Test
- @Ignore
public void test_createVolumeGroupParams() throws Exception {
GenericVnf genericVnf = new GenericVnf();
genericVnf.setVnfId("vnfId");
@@ -308,7 +306,7 @@ public class VnfAdapterObjectMapperTest {
expectedVolumeGroupParams.put("paramTwo", "paramTwoValue");
expectedVolumeGroupParams.put("paramThree", "paramThreeValue");
- Map<String, String> actualVolumeGroupParams = vnfAdapterObjectMapper.createVolumeGroupParams(requestContext,genericVnf, volumeGroup, sdncVfModuleQueryResponse);
+ Map<String, Object> actualVolumeGroupParams = vnfAdapterObjectMapper.createVolumeGroupParams(requestContext,genericVnf, volumeGroup, sdncVfModuleQueryResponse);
assertEquals(expectedVolumeGroupParams, actualVolumeGroupParams);
}
@@ -329,13 +327,12 @@ public class VnfAdapterObjectMapperTest {
expectedVolumeGroupParams.put("vf_module_id", volumeGroup.getVolumeGroupId());
expectedVolumeGroupParams.put("vf_module_name", volumeGroup.getVolumeGroupName());
RequestContext requestContext = new RequestContext();
- Map<String, String> actualVolumeGroupParams = vnfAdapterObjectMapper.createVolumeGroupParams(requestContext,genericVnf, volumeGroup, null);
+ Map<String, Object> actualVolumeGroupParams = vnfAdapterObjectMapper.createVolumeGroupParams(requestContext,genericVnf, volumeGroup, null);
assertEquals(expectedVolumeGroupParams, actualVolumeGroupParams);
}
@Test
- @Ignore
public void test_createVolumeGroupParams_with_user_params() throws Exception {
GenericVnf genericVnf = new GenericVnf();
genericVnf.setVnfId("vnfId");
@@ -366,7 +363,7 @@ public class VnfAdapterObjectMapperTest {
expectedVolumeGroupParams.put("paramThree", "paramThreeValue");
expectedVolumeGroupParams.put("userParamKey", "userParamValue");
- Map<String, String> actualVolumeGroupParams = vnfAdapterObjectMapper.createVolumeGroupParams(requestContext,genericVnf, volumeGroup, sdncVfModuleQueryResponse);
+ Map<String, Object> actualVolumeGroupParams = vnfAdapterObjectMapper.createVolumeGroupParams(requestContext,genericVnf, volumeGroup, sdncVfModuleQueryResponse);
assertEquals(expectedVolumeGroupParams, actualVolumeGroupParams);
}
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 a156c382d1..00e5c10f73 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
@@ -76,7 +76,7 @@ public class VnfAdapterVfModuleObjectMapperPayloadTest {
serviceInstance.setModelInfoServiceInstance(modelInfoServiceInstance);
RequestContext requestContext = new RequestContext();
- HashMap<String, String> userParams = new HashMap<String, String>();
+ Map<String, Object> userParams = new HashMap<>();
userParams.put("key1", "value2");
requestContext.setMsoRequestId("requestId");
requestContext.setUserParams(userParams);
@@ -150,7 +150,7 @@ public class VnfAdapterVfModuleObjectMapperPayloadTest {
serviceInstance.setModelInfoServiceInstance(modelInfoServiceInstance);
RequestContext requestContext = new RequestContext();
- HashMap<String, String> userParams = new HashMap<String, String>();
+ Map<String, Object> userParams = new HashMap<>();
userParams.put("key1", "value2");
requestContext.setMsoRequestId("requestId");
requestContext.setUserParams(userParams);
@@ -223,7 +223,7 @@ public class VnfAdapterVfModuleObjectMapperPayloadTest {
serviceInstance.setModelInfoServiceInstance(modelInfoServiceInstance);
RequestContext requestContext = new RequestContext();
- HashMap<String, String> userParams = new HashMap<String, String>();
+ Map<String, Object> userParams = new HashMap<>();
userParams.put("key1", "value2");
requestContext.setMsoRequestId("requestId");
requestContext.setUserParams(userParams);
@@ -295,7 +295,7 @@ public class VnfAdapterVfModuleObjectMapperPayloadTest {
//
RequestContext requestContext = new RequestContext();
- HashMap<String, String> userParams = new HashMap<String, String>();
+ Map<String, Object> userParams = new HashMap<>();
userParams.put("key1", "value2");
requestContext.setMsoRequestId("requestId");
requestContext.setUserParams(userParams);
@@ -375,7 +375,7 @@ public class VnfAdapterVfModuleObjectMapperPayloadTest {
//
RequestContext requestContext = new RequestContext();
- HashMap<String, String> userParams = new HashMap<String, String>();
+ Map<String, Object> userParams = new HashMap<>();
userParams.put("key1", "value2");
requestContext.setMsoRequestId("requestId");
requestContext.setUserParams(userParams);
@@ -450,7 +450,7 @@ public class VnfAdapterVfModuleObjectMapperPayloadTest {
serviceInstance.setModelInfoServiceInstance(modelInfoServiceInstance);
RequestContext requestContext = new RequestContext();
- HashMap<String, String> userParams = new HashMap<String, String>();
+ Map<String, Object> userParams = new HashMap<>();
userParams.put("key1", "value2");
requestContext.setMsoRequestId("requestId");
requestContext.setUserParams(userParams);
@@ -521,7 +521,7 @@ public class VnfAdapterVfModuleObjectMapperPayloadTest {
serviceInstance.setModelInfoServiceInstance(modelInfoServiceInstance);
RequestContext requestContext = new RequestContext();
- HashMap<String, String> userParams = new HashMap<String, String>();
+ Map<String, Object> userParams = new HashMap<>();
userParams.put("key1", "value1");
requestContext.setMsoRequestId("requestId");
requestContext.setUserParams(userParams);
@@ -591,7 +591,7 @@ public class VnfAdapterVfModuleObjectMapperPayloadTest {
serviceInstance.setModelInfoServiceInstance(modelInfoServiceInstance);
RequestContext requestContext = new RequestContext();
- HashMap<String, String> userParams = new HashMap<String, String>();
+ Map<String, Object> userParams = new HashMap<>();
userParams.put("key1", "value1");
requestContext.setMsoRequestId("requestId");
requestContext.setUserParams(userParams);
@@ -661,7 +661,7 @@ public class VnfAdapterVfModuleObjectMapperPayloadTest {
serviceInstance.setModelInfoServiceInstance(modelInfoServiceInstance);
RequestContext requestContext = new RequestContext();
- HashMap<String, String> userParams = new HashMap<String, String>();
+ Map<String, Object> userParams = new HashMap<>();
userParams.put("key1", "value1");
requestContext.setMsoRequestId("requestId");
requestContext.setUserParams(userParams);
@@ -798,7 +798,7 @@ public class VnfAdapterVfModuleObjectMapperPayloadTest {
serviceInstance.setModelInfoServiceInstance(modelInfoServiceInstance);
RequestContext requestContext = new RequestContext();
- HashMap<String, String> userParams = new HashMap<String, String>();
+ Map<String, Object> userParams = new HashMap<>();
userParams.put("key1", "value1");
requestContext.setMsoRequestId("requestId");
requestContext.setUserParams(userParams);
@@ -853,7 +853,7 @@ public class VnfAdapterVfModuleObjectMapperPayloadTest {
String json = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "grApiVmNetworkSubSectionWith5GParams.json")));
GenericResourceApiVmNetworkData network = omapper.readValue(json, GenericResourceApiVmNetworkData.class);
- Map<String, String> paramsMap = new HashMap<>();
+ Map<String, Object> paramsMap = new HashMap<>();
vfModuleObjectMapper.buildVlanInformation(paramsMap, network, "testKey", "testType");
assertEquals("1,3", paramsMap.get("testKey_testType_private_vlans"));
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapperTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapperTest.java
index 160feed426..81d30e33c5 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapperTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapperTest.java
@@ -67,7 +67,7 @@ public class VnfAdapterVfModuleObjectMapperTest {
@Test
public void addPairToMapTest() {
- Map<String, String> map = new HashMap<>();
+ Map<String, Object> map = new HashMap<>();
mapper.addPairToMap(map, "test", "_key", Arrays.asList("a", "b"));
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/SDNCConfigurationResourcesTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/SDNCConfigurationResourcesTest.java
index 4d90a3fcc9..0023066949 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/SDNCConfigurationResourcesTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/SDNCConfigurationResourcesTest.java
@@ -22,9 +22,7 @@ package org.onap.so.client.orchestration;
import static org.junit.Assert.assertNotNull;
import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.isA;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.times;
+import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.verify;
import java.net.URI;
@@ -35,10 +33,11 @@ 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.sdnc.northbound.client.model.GenericResourceApiGcTopologyOperationInformation;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiRequestActionEnumeration;
import org.onap.so.bpmn.common.data.TestDataSetup;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.Configuration;
import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer;
import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
@@ -47,19 +46,17 @@ import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext;
import org.onap.so.client.exception.BadResponseException;
import org.onap.so.client.exception.MapperException;
import org.onap.so.client.sdnc.SDNCClient;
-import org.onap.so.client.sdnc.endpoint.SDNCTopology;
+import org.onap.so.client.sdnc.beans.SDNCSvcAction;
import org.onap.so.client.sdnc.mapper.GCTopologyOperationRequestMapper;
-import org.onap.sdnc.northbound.client.model.GenericResourceApiGcTopologyOperationInformation;
-
@RunWith(MockitoJUnitRunner.Silent.class)
public class SDNCConfigurationResourcesTest extends TestDataSetup{
@InjectMocks
private SDNCConfigurationResources sdncConfigurationResources = new SDNCConfigurationResources();
- @Spy
- GCTopologyOperationRequestMapper MOCK_gcTopologyMapper ;
+ @Mock
+ private GCTopologyOperationRequestMapper MOCK_gcTopologyMapper ;
@Mock
protected SDNCClient MOCK_sdncClient;
@@ -82,24 +79,34 @@ public class SDNCConfigurationResourcesTest extends TestDataSetup{
@Test
public void activateVnrConfigurationTest() throws BadResponseException, MapperException, URISyntaxException {
GenericResourceApiGcTopologyOperationInformation response = sdncConfigurationResources.activateVnrConfiguration(serviceInstance,requestContext,customer,vpnBondingLink.getVnrConfiguration(),vnf,"uuid",new URI("http://localhost"));
- assertNotNull(response);
+ verify(MOCK_gcTopologyMapper).assignOrActivateVnrReqMapper(
+ eq(SDNCSvcAction.ACTIVATE), eq(GenericResourceApiRequestActionEnumeration.CREATEGENERICCONFIGURATIONINSTANCE),
+ eq(serviceInstance), eq(requestContext), eq(customer), any(Configuration.class), any(GenericVnf.class), any(String.class), any(URI.class));
+
}
@Test
public void assignVnrConfigurationTest() throws BadResponseException, MapperException, URISyntaxException {
GenericResourceApiGcTopologyOperationInformation response = sdncConfigurationResources.assignVnrConfiguration(serviceInstance,requestContext,customer,vpnBondingLink.getVnrConfiguration(),vnf,"uuid",new URI("http://localhost"));
- assertNotNull(response);
+ verify(MOCK_gcTopologyMapper).assignOrActivateVnrReqMapper(
+ eq(SDNCSvcAction.ASSIGN), eq(GenericResourceApiRequestActionEnumeration.CREATEGENERICCONFIGURATIONINSTANCE),
+ eq(serviceInstance), eq(requestContext), eq(customer), any(Configuration.class), any(GenericVnf.class), any(String.class), any(URI.class));
+
}
@Test
public void unAssignVnrConfigurationTest() throws BadResponseException, MapperException , URISyntaxException{
GenericResourceApiGcTopologyOperationInformation response = sdncConfigurationResources.unAssignVnrConfiguration(serviceInstance,requestContext,vpnBondingLink.getVnrConfiguration(),"uuid",new URI("http://localhost"));
- assertNotNull(response);
+ verify(MOCK_gcTopologyMapper).deactivateOrUnassignVnrReqMapper(
+ eq(SDNCSvcAction.UNASSIGN), eq(serviceInstance), eq(requestContext), any(Configuration.class), any(String.class), any(URI.class));
+
}
@Test
public void deactivateVnrConfigurationTest() throws BadResponseException, MapperException , URISyntaxException{
GenericResourceApiGcTopologyOperationInformation response = sdncConfigurationResources.deactivateVnrConfiguration(serviceInstance,requestContext,vpnBondingLink.getVnrConfiguration(),"uuid",new URI("http://localhost"));
- assertNotNull(response);
+ verify(MOCK_gcTopologyMapper).deactivateOrUnassignVnrReqMapper(
+ eq(SDNCSvcAction.DEACTIVATE), eq(serviceInstance), eq(requestContext), any(Configuration.class), any(String.class), any(URI.class));
+
}
}
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/GCTopologyOperationRequestMapperTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/GCTopologyOperationRequestMapperTest.java
index f01eeaeae8..f4d442bbc3 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/GCTopologyOperationRequestMapperTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/GCTopologyOperationRequestMapperTest.java
@@ -24,9 +24,15 @@ import java.net.URI;
import java.net.URISyntaxException;
import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import org.junit.Assert;
import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Spy;
+import org.mockito.junit.MockitoJUnitRunner;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiGcTopologyOperationInformation;
import org.onap.so.bpmn.common.data.TestDataSetup;
import org.onap.so.bpmn.servicedecomposition.bbobjects.Configuration;
import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
@@ -38,11 +44,14 @@ import org.onap.so.bpmn.servicedecomposition.bbobjects.VpnBondingLink;
import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext;
import org.onap.so.client.sdnc.beans.SDNCSvcAction;
-import org.onap.sdnc.northbound.client.model.GenericResourceApiGcTopologyOperationInformation;
-
-
-public class GCTopologyOperationRequestMapperTest extends TestDataSetup{
+@RunWith(MockitoJUnitRunner.Silent.class)
+public class GCTopologyOperationRequestMapperTest extends TestDataSetup {
+
+ @Spy
+ private GeneralTopologyObjectMapper generalTopologyObjectMapper;
+
+ @InjectMocks
private GCTopologyOperationRequestMapper genObjMapper = new GCTopologyOperationRequestMapper();
@Test
@@ -80,13 +89,13 @@ public class GCTopologyOperationRequestMapperTest extends TestDataSetup{
private RequestContext getRequestContext() {
RequestContext requestContext = new RequestContext();
requestContext.setMsoRequestId("MsoRequestId");
- HashMap<String, String> userParams = getUserParams();
+ Map<String, Object> userParams = getUserParams();
requestContext.setUserParams(userParams);
return requestContext;
}
- private HashMap<String, String> getUserParams() {
- HashMap<String,String> userParams = new HashMap<>();
+ private Map<String, Object> getUserParams() {
+ Map<String,Object> userParams = new HashMap<>();
userParams.put("lppCustomerId","lppCustomerId");
return userParams;
}
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/GeneralTopologyObjectMapperTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/GeneralTopologyObjectMapperTest.java
index bf2cd347c0..3bb54278b6 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/GeneralTopologyObjectMapperTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/GeneralTopologyObjectMapperTest.java
@@ -29,6 +29,7 @@ import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import java.util.HashMap;
+import java.util.Map;
import org.junit.After;
import org.junit.Before;
@@ -104,7 +105,7 @@ public class GeneralTopologyObjectMapperTest extends TestDataSetup {
customer.getServiceSubscription().getServiceInstances().add(serviceInstance);
//
RequestContext requestContext = new RequestContext();
- HashMap<String, String> userParams = new HashMap<String, String>();
+ Map<String, Object> userParams = new HashMap<>();
userParams.put("key1", "value1");
requestContext.setUserParams(userParams);
requestContext.setProductFamilyId("productFamilyId");
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/NetworkTopologyOperationRequestMapperTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/NetworkTopologyOperationRequestMapperTest.java
index 307fe289a1..6a14f8b567 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/NetworkTopologyOperationRequestMapperTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/NetworkTopologyOperationRequestMapperTest.java
@@ -29,9 +29,16 @@ import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.HashMap;
+import java.util.Map;
import org.junit.Before;
import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Spy;
+import org.mockito.junit.MockitoJUnitRunner;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiNetworkOperationInformation;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiRequestActionEnumeration;
import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
import org.onap.so.bpmn.servicedecomposition.bbobjects.Collection;
import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer;
@@ -45,10 +52,9 @@ import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoServiceInstance;
import org.onap.so.client.sdnc.beans.SDNCSvcAction;
import org.onap.so.client.sdnc.beans.SDNCSvcOperation;
-import org.onap.sdnc.northbound.client.model.GenericResourceApiNetworkOperationInformation;
-import org.onap.sdnc.northbound.client.model.GenericResourceApiRequestActionEnumeration;
import com.fasterxml.jackson.databind.ObjectMapper;
+@RunWith(MockitoJUnitRunner.class)
public class NetworkTopologyOperationRequestMapperTest {
private final static String JSON_FILE_LOCATION = "src/test/resources/__files/BuildingBlocks/";
@@ -59,6 +65,12 @@ public class NetworkTopologyOperationRequestMapperTest {
private RequestContext requestContext;
private L3Network network;
private CloudRegion cloudRegion;
+
+ @Spy
+ private GeneralTopologyObjectMapper generalTopologyObjectMapper;
+
+ @InjectMocks
+ private NetworkTopologyOperationRequestMapper mapper = new NetworkTopologyOperationRequestMapper();
@Before
public void before() {
@@ -93,7 +105,7 @@ public class NetworkTopologyOperationRequestMapperTest {
serviceInstance.setCollection(networkCollection);
//
requestContext = new RequestContext();
- HashMap<String, String> userParams = new HashMap<String, String>();
+ Map<String, Object> userParams = new HashMap<>();
userParams.put("key1", "value1");
requestContext.setUserParams(userParams);
requestContext.setProductFamilyId("productFamilyId");
@@ -115,7 +127,6 @@ public class NetworkTopologyOperationRequestMapperTest {
@Test
public void createGenericResourceApiNetworkOperationInformationTest() throws Exception {
- NetworkTopologyOperationRequestMapper mapper = new NetworkTopologyOperationRequestMapper();
GenericResourceApiNetworkOperationInformation networkSDNCrequest = mapper.reqMapper(
SDNCSvcOperation.NETWORK_TOPOLOGY_OPERATION, SDNCSvcAction.ASSIGN, GenericResourceApiRequestActionEnumeration.CREATENETWORKINSTANCE, network, serviceInstance, customer,
requestContext, cloudRegion);
@@ -132,7 +143,6 @@ public class NetworkTopologyOperationRequestMapperTest {
@Test
public void reqMapperTest() throws Exception {
- NetworkTopologyOperationRequestMapper mapper = new NetworkTopologyOperationRequestMapper();
GenericResourceApiNetworkOperationInformation networkSDNCrequest = mapper.reqMapper(
SDNCSvcOperation.NETWORK_TOPOLOGY_OPERATION, SDNCSvcAction.ASSIGN, GenericResourceApiRequestActionEnumeration.CREATENETWORKINSTANCE, network, serviceInstance, customer,
requestContext, cloudRegion);
@@ -143,7 +153,6 @@ public class NetworkTopologyOperationRequestMapperTest {
@Test
public void reqMapperNoCollectionTest() throws Exception {
- NetworkTopologyOperationRequestMapper mapper = new NetworkTopologyOperationRequestMapper();
GenericResourceApiNetworkOperationInformation networkSDNCrequest = mapper.reqMapper(
SDNCSvcOperation.NETWORK_TOPOLOGY_OPERATION, SDNCSvcAction.ASSIGN, GenericResourceApiRequestActionEnumeration.CREATENETWORKINSTANCE, network, serviceInstanceNoCollection, customer,
requestContext, cloudRegion);
@@ -154,7 +163,7 @@ public class NetworkTopologyOperationRequestMapperTest {
@Test
public void createGenericResourceApiNetworkOperationInformation_UnassignTest() throws Exception {
- NetworkTopologyOperationRequestMapper mapperUnassign = new NetworkTopologyOperationRequestMapper();
+ NetworkTopologyOperationRequestMapper mapperUnassign = mapper;
GenericResourceApiNetworkOperationInformation networkSDNCrequestUnassign = mapperUnassign.reqMapper(
SDNCSvcOperation.NETWORK_TOPOLOGY_OPERATION, SDNCSvcAction.UNASSIGN, GenericResourceApiRequestActionEnumeration.DELETENETWORKINSTANCE, network, serviceInstance, customer,
requestContext, cloudRegion);
@@ -172,7 +181,6 @@ public class NetworkTopologyOperationRequestMapperTest {
@Test
public void createGenericResourceApiNetworkOperationInformationNoNetworkNameTest() throws Exception {
- NetworkTopologyOperationRequestMapper mapper = new NetworkTopologyOperationRequestMapper();
//set network name NULL
network.setNetworkName(null);
GenericResourceApiNetworkOperationInformation networkSDNCrequest = mapper.reqMapper(
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/ServiceTopologyOperationMapperTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/ServiceTopologyOperationMapperTest.java
index 5d8b31b3bf..0bf06a0bb0 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/ServiceTopologyOperationMapperTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/ServiceTopologyOperationMapperTest.java
@@ -26,8 +26,13 @@ import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.HashMap;
+import java.util.Map;
import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Spy;
+import org.mockito.junit.MockitoJUnitRunner;
import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer;
import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceSubscription;
@@ -41,8 +46,15 @@ import org.onap.sdnc.northbound.client.model.GenericResourceApiRequestActionEnum
import org.onap.sdnc.northbound.client.model.GenericResourceApiServiceOperationInformation;
import com.fasterxml.jackson.databind.ObjectMapper;
+@RunWith(MockitoJUnitRunner.class)
public class ServiceTopologyOperationMapperTest {
+ @Spy
+ private GeneralTopologyObjectMapper generalTopologyObjectMapper;
+
+ @InjectMocks
+ private ServiceTopologyOperationMapper mapper = new ServiceTopologyOperationMapper();
+
@Test
public void reqMapperTest() throws Exception {
// prepare and set service instance
@@ -64,12 +76,11 @@ public class ServiceTopologyOperationMapperTest {
//prepare RequestContext
RequestContext requestContext = new RequestContext();
- HashMap<String, String> userParams = new HashMap<String, String>();
+ Map<String, Object> userParams = new HashMap<>();
userParams.put("key1", "value1");
requestContext.setUserParams(userParams);
requestContext.setProductFamilyId("productFamilyId");
- ServiceTopologyOperationMapper mapper = new ServiceTopologyOperationMapper();
GenericResourceApiServiceOperationInformation serviceOpInformation = mapper.reqMapper(
SDNCSvcOperation.SERVICE_TOPOLOGY_OPERATION, SDNCSvcAction.ASSIGN, GenericResourceApiRequestActionEnumeration.CREATESERVICEINSTANCE, serviceInstance, customer,
requestContext);
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapperTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapperTest.java
index 7d5aa9d1d9..282f23caa7 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapperTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapperTest.java
@@ -35,6 +35,10 @@ import java.util.Map;
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.Spy;
+import org.mockito.junit.MockitoJUnitRunner;
import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer;
import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
@@ -54,11 +58,18 @@ import org.onap.so.client.sdnc.beans.SDNCSvcOperation;
import org.onap.sdnc.northbound.client.model.GenericResourceApiVfModuleOperationInformation;
import com.fasterxml.jackson.databind.ObjectMapper;
+@RunWith(MockitoJUnitRunner.class)
public class VfModuleTopologyOperationRequestMapperTest {
private final static String JSON_FILE_LOCATION = "src/test/resources/__files/BuildingBlocks/";
private final static String ERRORMESSAGE = "VF Module model info is null for testVfModuleId";
+ @Spy
+ private GeneralTopologyObjectMapper generalTopologyObjectMapper;
+
+ @InjectMocks
+ private VfModuleTopologyOperationRequestMapper mapper = new VfModuleTopologyOperationRequestMapper();
+
@Rule
public ExpectedException expectedException = ExpectedException.none();
@@ -84,7 +95,7 @@ public class VfModuleTopologyOperationRequestMapperTest {
customer.getServiceSubscription().getServiceInstances().add(serviceInstance);
//
RequestContext requestContext = new RequestContext();
- HashMap<String,String> userParams = new HashMap<String,String>();
+ Map<String,Object> userParams = new HashMap<>();
userParams.put("key1", "value1");
requestContext.setUserParams(userParams);
requestContext.setProductFamilyId("productFamilyId");
@@ -124,7 +135,6 @@ public class VfModuleTopologyOperationRequestMapperTest {
CloudRegion cloudRegion = new CloudRegion();
- VfModuleTopologyOperationRequestMapper mapper = new VfModuleTopologyOperationRequestMapper();
GenericResourceApiVfModuleOperationInformation vfModuleSDNCrequest = mapper.reqMapper(
SDNCSvcOperation.VF_MODULE_TOPOLOGY_OPERATION, SDNCSvcAction.ASSIGN, vfModule, volumeGroup, vnf, serviceInstance, customer,
cloudRegion, requestContext, null);
@@ -159,7 +169,6 @@ public class VfModuleTopologyOperationRequestMapperTest {
vfModule.setVfModuleId("testVfModuleId");
vfModule.setVfModuleName("testVfModuleName");
- VfModuleTopologyOperationRequestMapper mapper = new VfModuleTopologyOperationRequestMapper();
GenericResourceApiVfModuleOperationInformation vfModuleSDNCrequest = mapper.reqMapper(
SDNCSvcOperation.VF_MODULE_TOPOLOGY_OPERATION, SDNCSvcAction.UNASSIGN, vfModule, null, vnf, serviceInstance, null,
null, null, null);
@@ -197,9 +206,9 @@ public class VfModuleTopologyOperationRequestMapperTest {
//
RequestContext requestContext = new RequestContext();
RequestParameters requestParameters = new RequestParameters();
- HashMap<String,Object> userParams1 = new HashMap<String,Object>();
+ HashMap<String,Object> userParams1 = new HashMap<>();
userParams1.put("key1", "value1");
- List<Map<String,Object>> userParams = new ArrayList<Map<String,Object>>();
+ List<Map<String,Object>> userParams = new ArrayList<>();
userParams.add(userParams1);
requestParameters.setUserParams(userParams);
@@ -230,7 +239,6 @@ public class VfModuleTopologyOperationRequestMapperTest {
CloudRegion cloudRegion = new CloudRegion();
- VfModuleTopologyOperationRequestMapper mapper = new VfModuleTopologyOperationRequestMapper();
GenericResourceApiVfModuleOperationInformation vfModuleSDNCrequest = mapper.reqMapper(
SDNCSvcOperation.VF_MODULE_TOPOLOGY_OPERATION, SDNCSvcAction.ASSIGN, vfModule, null, vnf, serviceInstance, customer,
cloudRegion, requestContext, null);
@@ -261,7 +269,7 @@ public class VfModuleTopologyOperationRequestMapperTest {
customer.getServiceSubscription().getServiceInstances().add(serviceInstance);
//
RequestContext requestContext = new RequestContext();
- HashMap<String, String> userParams = new HashMap<String, String>();
+ Map<String, Object> userParams = new HashMap<String, Object>();
userParams.put("key1", "value1");
requestContext.setUserParams(userParams);
requestContext.setProductFamilyId("productFamilyId");
@@ -284,7 +292,6 @@ public class VfModuleTopologyOperationRequestMapperTest {
CloudRegion cloudRegion = new CloudRegion();
- VfModuleTopologyOperationRequestMapper mapper = new VfModuleTopologyOperationRequestMapper();
expectedException.expect(MapperException.class);
expectedException.expectMessage(ERRORMESSAGE);
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/VnfTopologyOperationRequestMapperTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/VnfTopologyOperationRequestMapperTest.java
index 63c3680e8c..229a8cf601 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/VnfTopologyOperationRequestMapperTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/VnfTopologyOperationRequestMapperTest.java
@@ -25,9 +25,14 @@ import static org.junit.Assert.assertNull;
import java.util.ArrayList;
import java.util.HashMap;
+import java.util.Map;
import java.util.List;
import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Spy;
+import org.mockito.junit.MockitoJUnitRunner;
import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer;
import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
@@ -45,8 +50,15 @@ import org.onap.so.client.sdnc.beans.SDNCSvcOperation;
import org.onap.sdnc.northbound.client.model.GenericResourceApiRequestActionEnumeration;
import org.onap.sdnc.northbound.client.model.GenericResourceApiVnfOperationInformation;
+@RunWith(MockitoJUnitRunner.class)
public class VnfTopologyOperationRequestMapperTest {
+ @Spy
+ private GeneralTopologyObjectMapper generalTopologyObjectMapper;
+
+ @InjectMocks
+ private VnfTopologyOperationRequestMapper mapper = new VnfTopologyOperationRequestMapper();
+
@Test
public void reqMapperTest() throws Exception {
// prepare and set service instance
@@ -106,14 +118,13 @@ public class VnfTopologyOperationRequestMapperTest {
//prepare RequestContext
RequestContext requestContext = new RequestContext();
- HashMap<String, String> userParams = new HashMap<String, String>();
+ Map<String, Object> userParams = new HashMap<>();
userParams.put("key1", "value1");
requestContext.setUserParams(userParams);
requestContext.setProductFamilyId("productFamilyId");
CloudRegion cloudRegion = new CloudRegion();
- VnfTopologyOperationRequestMapper mapper = new VnfTopologyOperationRequestMapper();
GenericResourceApiVnfOperationInformation vnfOpInformation = mapper.reqMapper(
SDNCSvcOperation.VNF_TOPOLOGY_OPERATION, SDNCSvcAction.ASSIGN,GenericResourceApiRequestActionEnumeration.CREATEVNFINSTANCE, vnf, serviceInstance, customer,
cloudRegion, requestContext,true);