aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bpmn/so-bpmn-building-blocks/pom.xml8
-rw-r--r--bpmn/so-bpmn-building-blocks/src/test/resources/SDNCClientPut200Response.json2
-rw-r--r--bpmn/so-bpmn-building-blocks/src/test/resources/application-test.yaml19
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCRequestTasks.java12
4 files changed, 22 insertions, 19 deletions
diff --git a/bpmn/so-bpmn-building-blocks/pom.xml b/bpmn/so-bpmn-building-blocks/pom.xml
index fdb86e2d29..97fb26af8e 100644
--- a/bpmn/so-bpmn-building-blocks/pom.xml
+++ b/bpmn/so-bpmn-building-blocks/pom.xml
@@ -44,7 +44,7 @@
<pluginManagement>
<plugins>
- <!--This plugin's configuration is used to store Eclipse m2e settings
+ <!--This plugin's configuration is used to store Eclipse m2e settings
only. It has no influence on the Maven build itself. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
@@ -147,6 +147,12 @@
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-contract-wiremock</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.vintage</groupId>
+ <artifactId>junit-vintage-engine</artifactId>
+ <scope>test</scope>
</dependency>
</dependencies>
</project>
diff --git a/bpmn/so-bpmn-building-blocks/src/test/resources/SDNCClientPut200Response.json b/bpmn/so-bpmn-building-blocks/src/test/resources/SDNCClientPut200Response.json
index 286ce4c844..2d98067480 100644
--- a/bpmn/so-bpmn-building-blocks/src/test/resources/SDNCClientPut200Response.json
+++ b/bpmn/so-bpmn-building-blocks/src/test/resources/SDNCClientPut200Response.json
@@ -1,5 +1,5 @@
{
- "output": {
+ "GENERIC-RESOURCE-API:output": {
"svc-request-id": "5d24d40e-4c77-4c06-94a3-6d168c47a57c",
"network-response-information": {
"instance-id": "4063e0aa-af13-4872-8473-b40c94f9316b",
diff --git a/bpmn/so-bpmn-building-blocks/src/test/resources/application-test.yaml b/bpmn/so-bpmn-building-blocks/src/test/resources/application-test.yaml
index 14640f4eec..71adc0d963 100644
--- a/bpmn/so-bpmn-building-blocks/src/test/resources/application-test.yaml
+++ b/bpmn/so-bpmn-building-blocks/src/test/resources/application-test.yaml
@@ -109,7 +109,7 @@ mso:
request:
db:
endpoint: http://localhost:28090/
- rollback: 'true'
+ rollback: 'true'
service:
agnostic:
sniro:
@@ -123,7 +123,7 @@ mso:
2vvig: SNIRO.DistanceToLocationPolicy_vhngw,SNIRO.VNFPolicy_vhngatewayprimary1_v1,SNIRO.ResourceInstancePolicy_hngateway,SNIRO.ResourceRegionPolicy_hngateway_v1,SNIRO.VNFPolicy_vhngatewaysecondary1_v1,SNIRO.ZonePolicy_vhngw,SNIRO.PlacementOptimizationPolicy_dhv_v3,SNIRO.VNFPolicy_vhnportal_primary1_v1,SNIRO.ResourceInstancePolicy_vhnportal_v3,SNIRO.ResourceRegionPolicy_vhnportal_v1,SNIRO.VNFPolicy_vhnportalsecondary1_v1,SNIRO.ZonePolicy_vhnportal,SNIRO.DistanceToLocationPolicy_vvig,SNIRO.InventoryGroupPolicy_vvig,SNIRO.VNFPolicy_vvigprimary1_v1,SNIRO.ResourceInstancePolicy_vvig,SNIRO.VNFPolicy_vvigsecondary1_v1
4vvig: SNIRO.DistanceToLocationPolicy_vhngw,SNIRO.VNFPolicy_vhngatewayprimary1_v1,SNIRO.ResourceInstancePolicy_hngateway,SNIRO.ResourceRegionPolicy_hngateway_v1,SNIRO.VNFPolicy_vhngatewaysecondary1_v1,SNIRO.ZonePolicy_vhngw,SNIRO.PlacementOptimizationPolicy_dhv_v3,SNIRO.VNFPolicy_vhnportal_primary1_v1,SNIRO.ResourceInstancePolicy_vhnportal_v3,SNIRO.ResourceRegionPolicy_vhnportal_v1,SNIRO.VNFPolicy_vhnportalsecondary1_v1,SNIRO.ZonePolicy_vhnportal,SNIRO.VNFPolicy_vvigprimary2_v1,SNIRO.VNFPolicy_vvigsecondary2_v1,SNIRO.DistanceToLocationPolicy_vvig,SNIRO.InventoryGroupPolicy_vvig,SNIRO.VNFPolicy_vvigprimary1_v1,SNIRO.ResourceInstancePolicy_vvig,SNIRO.VNFPolicy_vvigsecondary1_v1
timeout: PT30M
- workflow:
+ workflow:
default:
aai:
cloud-region:
@@ -210,12 +210,11 @@ camunda:
job-execution:
deployment-aware: true
pnf:
- dmaap:
- host: hostTest
- port: 1234
- protocol: http
- uriPathPrefix: events
- topicName: pnfReady
- consumerGroup: consumerGroup
- consumerId: consumerId
+ kafka:
+ pnfReadyTopicName: unauthenticated.PNF_READY
+ pnfUpdateTopicName: unauthenticated.PNF_UPDATE
+ consumerGroup: so-consumer
+ consumerId: so-bpmn-infra-pnfready
+ consumerIdUpdate: so-bpmn-infra-pnfupdate
+ kafkaBootstrapServers: localhost:9092
topicListenerDelayInSeconds: 5
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCRequestTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCRequestTasks.java
index e52866e1af..4dee6f12ba 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCRequestTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCRequestTasks.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -55,13 +55,11 @@ import net.sf.saxon.xpath.XPathFactoryImpl;
@Component
public class SDNCRequestTasks {
+ private static final Logger logger = LoggerFactory.getLogger(SDNCRequestTasks.class);
private static final String NET_SF_SAXON_XPATH_IMPL = "net.sf.saxon.xpath.XPathFactoryImpl";
-
private static final String XPATH_FACTORY_PROPERTY_NAME =
"javax.xml.xpath.XPathFactory:" + NamespaceConstant.OBJECT_MODEL_SAXON;
-
- private static final Logger logger = LoggerFactory.getLogger(SDNCRequestTasks.class);
-
+ private static final JsonPath path = JsonPath.compile("$.GENERIC-RESOURCE-API:output.ack-final-indicator");
private static final String SDNC_REQUEST = "SDNCRequest";
private static final String MESSAGE = "_MESSAGE";
private static final String CORRELATOR = "_CORRELATOR";
@@ -85,7 +83,7 @@ public class SDNCRequestTasks {
try {
String response = sdncClient.post(request.getSDNCPayload(), request.getTopology());
// SDNC Response with RFC-8040 prefixes GENERIC-RESOURCE-API
- String finalMessageIndicator = JsonPath.read(response, "$.GENERIC-RESOURCE-API:output.ack-final-indicator");
+ String finalMessageIndicator = path.read(response);
execution.setVariable("isSDNCCompleted", convertIndicatorToBoolean(finalMessageIndicator));
} catch (PathNotFoundException e) {
logger.error("Error Parsing SDNC Response. Could not find read final ack indicator from JSON.", e);