New velocity templates to address JSON array
response from A1 mediator
Issue-ID: SDNC-1074
Signed-off-by: SandeepLinux <Sandeep.Shah@ibm.com>
Change-Id: I697b43e90762c5a1c5c7b51a2ae410763a6c61cf
Signed-off-by: Dan Timoney <dtimoney@att.com>
--- /dev/null
+## Velocity template for creating payload getPolicyTypes response
+#set($begCntr=0)
+#set($endCntr=0)
+#set($entries=$ctx.getAttribute("a1MediatorRsp._length"))
+#set($endCntr=$endCntr.parseInt($entries))
+#set( $endCntr = $endCntr - 1)
+[#foreach($no in [$begCntr..$endCntr])$ctx.getAttribute("a1MediatorList.[$no]")#if( $foreach.count < $endCntr+1), #end #end]
--- /dev/null
+## Velocity template for creating payload getPolicyInstances response
+#set($begCntr=0)
+#set($endCntr=0)
+#set($entries=$ctx.getAttribute("a1MediatorRsp._length"))
+#set($endCntr=$endCntr.parseInt($entries))
+#set( $endCntr = $endCntr - 1)
+[#foreach($no in [$begCntr..$endCntr])$ctx.getAttribute("a1MediatorPolicyInstancesList.[$no]")#if( $foreach.count < $endCntr+1), #end #end]
--- /dev/null
+## Velocity template for creating payload getPolicyType response
+$ctx.getAttribute("a1MediatorgetPolicyType")