summaryrefslogtreecommitdiffstats
path: root/bpmn
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn')
-rw-r--r--bpmn/pom.xml3
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCQueryTasks.java15
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCRequestTasks.java3
3 files changed, 13 insertions, 8 deletions
diff --git a/bpmn/pom.xml b/bpmn/pom.xml
index 776b52e3e7..9c7f514239 100644
--- a/bpmn/pom.xml
+++ b/bpmn/pom.xml
@@ -19,7 +19,8 @@
<xmlunit.version>2.4.0</xmlunit.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
- <sdnc.northbound.version>1.5.2</sdnc.northbound.version>
+ <sdnc.northbound.version>3.0.2</sdnc.northbound.version>
+ <!-- SDNC northbound API latest version -->
<logback-core.version>1.2.10</logback-core.version>
</properties>
<modules>
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 89d62e0752..b8586ef2d6 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
@@ -70,9 +70,10 @@ public class SDNCQueryTasks {
ServiceInstance serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID);
GenericVnf genericVnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID);
- String selfLink =
- "restconf/config/GENERIC-RESOURCE-API:services/service/" + serviceInstance.getServiceInstanceId()
- + "/service-data/vnfs/vnf/" + genericVnf.getVnfId() + "/vnf-data/vnf-topology/";
+ // RFC-8040 URI to query SDNC resource, ?content=config or nonconfig is Optional
+ String selfLink = "rests/data/GENERIC-RESOURCE-API:services/service=" + serviceInstance.getServiceInstanceId()
+ + "/service-data/vnfs/vnf=" + genericVnf.getVnfId() + "/vnf-data/vnf-topology";
+
try {
if (genericVnf.getSelflink() == null) {
genericVnf.setSelflink(selfLink);
@@ -105,9 +106,11 @@ public class SDNCQueryTasks {
ServiceInstance serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID);
GenericVnf genericVnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID);
VfModule vfModule = extractPojosForBB.extractByKey(execution, ResourceKey.VF_MODULE_ID);
- String selfLink = "restconf/config/GENERIC-RESOURCE-API:services/service/"
- + serviceInstance.getServiceInstanceId() + "/service-data/vnfs/vnf/" + genericVnf.getVnfId()
- + "/vnf-data/vf-modules/vf-module/" + vfModule.getVfModuleId() + "/vf-module-data/vf-module-topology/";
+
+ // RFC-8040 URI to query SDNC resource, ?content=config or nonconfig is Optional
+ String selfLink = "rests/data/GENERIC-RESOURCE-API:services/service=" + serviceInstance.getServiceInstanceId()
+ + "/service-data/vnfs/vnf=" + genericVnf.getVnfId() + "/vnf-data/vf-modules/vf-module="
+ + vfModule.getVfModuleId() + "/vf-module-data/vf-module-topology";
try {
if (vfModule.getSelflink() == null
|| (vfModule.getSelflink() != null && vfModule.getSelflink().isEmpty())) {
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 7ed8447fa6..e52866e1af 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
@@ -84,7 +84,8 @@ public class SDNCRequestTasks {
SDNCRequest request = (SDNCRequest) execution.getVariable(SDNC_REQUEST);
try {
String response = sdncClient.post(request.getSDNCPayload(), request.getTopology());
- String finalMessageIndicator = JsonPath.read(response, "$.output.ack-final-indicator");
+ // SDNC Response with RFC-8040 prefixes GENERIC-RESOURCE-API
+ String finalMessageIndicator = JsonPath.read(response, "$.GENERIC-RESOURCE-API:output.ack-final-indicator");
execution.setVariable("isSDNCCompleted", convertIndicatorToBoolean(finalMessageIndicator));
} catch (PathNotFoundException e) {
logger.error("Error Parsing SDNC Response. Could not find read final ack indicator from JSON.", e);