From: Sandeep Shah Date: Tue, 20 Aug 2019 16:03:56 +0000 (-0500) Subject: Templates for SDNR DMAAP payload OOFPCIPOC X-Git-Url: https://gerrit.onap.org/r/gitweb?p=sdnc%2Foam.git;a=commitdiff_plain;h=2aa24d0accbf63d528d68aad69d72030a7062084 Templates for SDNR DMAAP payload OOFPCIPOC Velocity templates used to create DMAAP payload string that is sent with DMAAP message from SDNR to policy confirming successful configuration of PCI value of a cell or ho flag of neighbors Issue-ID: SDNC-725 Signed-off-by: SandeepLinux Change-Id: Ic07b567ebf5c79727c5a0a236ffcd54d89a3c3ed --- diff --git a/platform-logic/restapi-templates/pom.xml b/platform-logic/restapi-templates/pom.xml index cd147d06..9d88ce7b 100644 --- a/platform-logic/restapi-templates/pom.xml +++ b/platform-logic/restapi-templates/pom.xml @@ -46,6 +46,13 @@ true + + src/main/velocity + + **/*.vtl + + true + src/main/multipartfile 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 ] + } + } + } + } + } + } + } ] +}