summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncAaiDmaapConsumer.java5
-rw-r--r--dmaap-listener/src/main/resources/template-generic-vnf.vt6
-rw-r--r--dmaap-listener/src/main/resources/template-pserver.vt6
-rw-r--r--dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncPserverDmaapReceiver.java3
4 files changed, 6 insertions, 14 deletions
diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncAaiDmaapConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncAaiDmaapConsumer.java
index 4b695fcec..0e12dfa2e 100644
--- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncAaiDmaapConsumer.java
+++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/SdncAaiDmaapConsumer.java
@@ -90,6 +90,9 @@ public class SdncAaiDmaapConsumer extends SdncDmaapConsumer {
{
context.put((String)key, jsonObj.get((String)key));
}
+
+ String id = jsonObj.getJSONObject(EVENT_HEADER).get("id").toString();
+ context.put("req_id", id);
context.put("curr_time", Instant.now());
@@ -159,7 +162,7 @@ public class SdncAaiDmaapConsumer extends SdncDmaapConsumer {
String odlPassword = getProperty("sdnc.odl.password");
if ((odlUrlBase != null) && (odlUrlBase.length() > 0)) {
- SdncOdlConnection conn = SdncOdlConnection.newInstance(odlUrlBase + sdncEndpoint, odlUser, odlPassword);
+ SdncOdlConnection conn = SdncOdlConnection.newInstance(odlUrlBase + "/" + sdncEndpoint, odlUser, odlPassword);
conn.send("POST", "application/json", rpcMsgbody);
} else {
diff --git a/dmaap-listener/src/main/resources/template-generic-vnf.vt b/dmaap-listener/src/main/resources/template-generic-vnf.vt
index c8a6b78ea..d57c9a0a4 100644
--- a/dmaap-listener/src/main/resources/template-generic-vnf.vt
+++ b/dmaap-listener/src/main/resources/template-generic-vnf.vt
@@ -1,15 +1,11 @@
{
"input": {
"common-header": {
- "request-id": "$event-header.id",
+ "request-id": "$req_id",
"timestamp": "$curr_time",
"originator-id": "AAI",
"api-ver": "2.00"
},
- "action-identifiers": {
- "action-name": "dmaap-notification",
- "mode": "async"
- },
"payload": $full_message
}
} \ No newline at end of file
diff --git a/dmaap-listener/src/main/resources/template-pserver.vt b/dmaap-listener/src/main/resources/template-pserver.vt
index c8a6b78ea..d57c9a0a4 100644
--- a/dmaap-listener/src/main/resources/template-pserver.vt
+++ b/dmaap-listener/src/main/resources/template-pserver.vt
@@ -1,15 +1,11 @@
{
"input": {
"common-header": {
- "request-id": "$event-header.id",
+ "request-id": "$req_id",
"timestamp": "$curr_time",
"originator-id": "AAI",
"api-ver": "2.00"
},
- "action-identifiers": {
- "action-name": "dmaap-notification",
- "mode": "async"
- },
"payload": $full_message
}
} \ No newline at end of file
diff --git a/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncPserverDmaapReceiver.java b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncPserverDmaapReceiver.java
index ec01df534..11201265d 100644
--- a/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncPserverDmaapReceiver.java
+++ b/dmaap-listener/src/test/java/org/onap/ccsdk/sli/northbound/dmaapclient/TestSdncPserverDmaapReceiver.java
@@ -9,7 +9,6 @@
package org.onap.ccsdk.sli.northbound.dmaapclient;
import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.assertEquals;
import java.io.File;
import java.io.IOException;
@@ -98,8 +97,6 @@ public class TestSdncPserverDmaapReceiver {
assertTrue(aaiRootNode.get("input").get("payload") != null);
assertTrue(aaiRootNode.get("input").get("common-header") != null);
- assertEquals(aaiRootNode.get("input").get("action-identifiers").get("action-name").textValue(), "dmaap-notification");
- assertEquals(aaiRootNode.get("input").get("action-identifiers").get("mode").textValue(), "async");
}
@Test