Templates for SDNR DMAAP payload OOFPCIPOC
[sdnc/oam.git] / platform-logic / restapi-templates / src / main / velocity / oofpcipoc-dmaap-publish-modifyconfiganr-resp-payload-template.vtl
1 ## Velocity template for modifyconfigANR response payload
2 #set($begCntr=0)
3 #set($endCntr=0)
4 #set($entries=$ctx.getAttribute("generic-neighbor-configuration-input.lte-cell-number-of-entries"))
5 #set($endCntr=$endCntr.parseInt($entries))
6 #set( $endCntr = $endCntr - 1)
7 {
8         "Configurations": [{
9                 "Status": {
10                         "Code": "$ctx.getAttribute("prop.oofpcipoc-dmaap-config-resp.status-code")",
11                         "Value": "$ctx.getAttribute("prop.oofpcipoc-dmaap-config-resp.status-value")"
12                 },
13                 "data": {
14                         "FAPService": {
15                                 "alias": "$ctx.getAttribute("generic-neighbor-configuration-input.alias")",
16                                 "CellConfig": {
17                                         "LTE": {
18                                                 "RAN": {
19                                                         "Common": {
20                                                                 "CellIdentity": "$ctx.getAttribute("generic-neighbor-configuration-input.alias")"
21                                                         },
22                                                         "NeighborListInUse": {
23                                                                 "LTECellNumberOfEntries": "$ctx.getAttribute("generic-neighbor-configuration-input.lte-cell-number-of-entries")",
24                                                                 "LTECell": [ #foreach($no in [$begCntr..$endCntr]) {
25                                                                         "PLMNID": "$ctx.getAttribute("generic-neighbor-configuration-input.neighbor-list-in-use[$no].plmnid")",
26                                                                         "CID": "$ctx.getAttribute("generic-neighbor-configuration-input.neighbor-list-in-use[$no].cid")",
27                                                                         "PhyCellID": "$ctx.getAttribute("generic-neighbor-configuration-input.neighbor-list-in-use[$no].phy-cell-id")",
28                                                                         "PNFName": "$ctx.getAttribute("generic-neighbor-configuration-input.neighbor-list-in-use[$no].pnf-name")",
29                                                                         "Blacklisted": "$ctx.getAttribute("generic-neighbor-configuration-input.neighbor-list-in-use[$no].blacklisted")"
30                                                                 } #if( $foreach.count == $endCntr), #end #end ]
31                                                         }
32                                                 }
33                                         }
34                                 }
35                         }
36                 }
37         }   ]
38 }