aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2019-08-22 22:04:25 +0000
committerGerrit Code Review <gerrit@onap.org>2019-08-22 22:04:25 +0000
commitb33ca08f0c5b42372f588b3ba6d47e05138cc30e (patch)
tree865b869f9f90b4d242e21b86bfd1b7ab9a1276a8
parent48c912df5cc69f58592d96a93e8b72900587dc89 (diff)
parent0737cf4c6f97258e3834568ce2f2ac05e66a5e73 (diff)
Merge "Templates for SDNR DMAAP payload OOFPCIPOC"
Former-commit-id: 2126ef44399069a1adbf00da09b9cb8eabaab892
-rw-r--r--platform-logic/restapi-templates/pom.xml7
-rw-r--r--platform-logic/restapi-templates/src/main/velocity/oofpcipoc-dmaap-publish-modifyconfig-resp-payload-template.vtl31
-rw-r--r--platform-logic/restapi-templates/src/main/velocity/oofpcipoc-dmaap-publish-modifyconfiganr-resp-payload-template.vtl38
3 files changed, 76 insertions, 0 deletions
diff --git a/platform-logic/restapi-templates/pom.xml b/platform-logic/restapi-templates/pom.xml
index 9684ea8b..4804ccf8 100644
--- a/platform-logic/restapi-templates/pom.xml
+++ b/platform-logic/restapi-templates/pom.xml
@@ -47,6 +47,13 @@
<filtering>true</filtering>
</resource>
<resource>
+ <directory>src/main/velocity</directory>
+ <includes>
+ <include>**/*.vtl</include>
+ </includes>
+ <filtering>true</filtering>
+ </resource>
+ <resource>
<directory>src/main/multipartfile</directory>
<includes>
<include>**/*.*</include>
diff --git a/platform-logic/restapi-templates/src/main/velocity/oofpcipoc-dmaap-publish-modifyconfig-resp-payload-template.vtl b/platform-logic/restapi-templates/src/main/velocity/oofpcipoc-dmaap-publish-modifyconfig-resp-payload-template.vtl
new file mode 100644
index 00000000..2f6957cf
--- /dev/null
+++ b/platform-logic/restapi-templates/src/main/velocity/oofpcipoc-dmaap-publish-modifyconfig-resp-payload-template.vtl
@@ -0,0 +1,31 @@
+## Velocity template for configPCI response payload
+#set($begCntr=0)
+#set($endCntr=0)
+#set($entries=$ctx.getAttribute("configuration-phy-cell-id-input.fap-service-number-of-entries"))
+#set($endCntr=$endCntr.parseInt($entries))
+#set( $endCntr = $endCntr - 1)
+{
+ "Configurations": [ #foreach($no in [$begCntr..$endCntr]) {"Status": {
+ "Code": "$ctx.getAttribute("prop.oofpcipoc-dmaap-config-resp.status-code")",
+ "Value": "$ctx.getAttribute("prop.oofpcipoc-dmaap-config-resp.status-value")"
+ },
+ "data": {
+ "FAPService": {
+ "alias": "$ctx.getAttribute("configuration-phy-cell-id-input.fap-service[$no].alias")",
+ "X0005b9Lte": {
+ "phyCellIdInUse": "$ctx.getAttribute("configuration-phy-cell-id-input.fap-service[$no].phy-cell-id-in-use")",
+ "pnfName": "$ctx.getAttribute("configuration-phy-cell-id-input.fap-service[$no].pnf-name")"
+ },
+ "CellConfig": {
+ "LTE": {
+ "RAN": {
+ "Common": {
+ "CellIdentity": "$ctx.getAttribute("configuration-phy-cell-id-input.fap-service[$no].cid")"
+ }
+ }
+ }
+ }
+ }
+ }
+ } #if( $foreach.count == $endCntr), #end #end ]
+}
diff --git a/platform-logic/restapi-templates/src/main/velocity/oofpcipoc-dmaap-publish-modifyconfiganr-resp-payload-template.vtl b/platform-logic/restapi-templates/src/main/velocity/oofpcipoc-dmaap-publish-modifyconfiganr-resp-payload-template.vtl
new file mode 100644
index 00000000..700eb739
--- /dev/null
+++ b/platform-logic/restapi-templates/src/main/velocity/oofpcipoc-dmaap-publish-modifyconfiganr-resp-payload-template.vtl
@@ -0,0 +1,38 @@
+## Velocity template for modifyconfigANR response payload
+#set($begCntr=0)
+#set($endCntr=0)
+#set($entries=$ctx.getAttribute("generic-neighbor-configuration-input.lte-cell-number-of-entries"))
+#set($endCntr=$endCntr.parseInt($entries))
+#set( $endCntr = $endCntr - 1)
+{
+ "Configurations": [{
+ "Status": {
+ "Code": "$ctx.getAttribute("prop.oofpcipoc-dmaap-config-resp.status-code")",
+ "Value": "$ctx.getAttribute("prop.oofpcipoc-dmaap-config-resp.status-value")"
+ },
+ "data": {
+ "FAPService": {
+ "alias": "$ctx.getAttribute("generic-neighbor-configuration-input.alias")",
+ "CellConfig": {
+ "LTE": {
+ "RAN": {
+ "Common": {
+ "CellIdentity": "$ctx.getAttribute("generic-neighbor-configuration-input.alias")"
+ },
+ "NeighborListInUse": {
+ "LTECellNumberOfEntries": "$ctx.getAttribute("generic-neighbor-configuration-input.lte-cell-number-of-entries")",
+ "LTECell": [ #foreach($no in [$begCntr..$endCntr]) {
+ "PLMNID": "$ctx.getAttribute("generic-neighbor-configuration-input.neighbor-list-in-use[$no].plmnid")",
+ "CID": "$ctx.getAttribute("generic-neighbor-configuration-input.neighbor-list-in-use[$no].cid")",
+ "PhyCellID": "$ctx.getAttribute("generic-neighbor-configuration-input.neighbor-list-in-use[$no].phy-cell-id")",
+ "PNFName": "$ctx.getAttribute("generic-neighbor-configuration-input.neighbor-list-in-use[$no].pnf-name")",
+ "Blacklisted": "$ctx.getAttribute("generic-neighbor-configuration-input.neighbor-list-in-use[$no].blacklisted")"
+ } #if( $foreach.count == $endCntr), #end #end ]
+ }
+ }
+ }
+ }
+ }
+ }
+ } ]
+}