diff options
author | 2020-02-17 09:41:23 -0600 | |
---|---|---|
committer | 2020-02-18 15:48:14 -0500 | |
commit | 68e4f8344bc9e197f8574d589fdad7c64cdb5fb8 (patch) | |
tree | a51343b91a33368831de6b7f059299a743c255b3 /platform-logic/restapi-templates/src/main/velocity/a1Mediator-get-policy-instances.vtl | |
parent | 1762ca3b89c703d86925d2f68486594916d804b0 (diff) |
velocity templates for A1 Adapter DG's
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>
Former-commit-id: 09e4e9963d0214b795fab5bfe0d704945cab553d
Diffstat (limited to 'platform-logic/restapi-templates/src/main/velocity/a1Mediator-get-policy-instances.vtl')
-rw-r--r-- | platform-logic/restapi-templates/src/main/velocity/a1Mediator-get-policy-instances.vtl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/platform-logic/restapi-templates/src/main/velocity/a1Mediator-get-policy-instances.vtl b/platform-logic/restapi-templates/src/main/velocity/a1Mediator-get-policy-instances.vtl new file mode 100644 index 00000000..89bc370c --- /dev/null +++ b/platform-logic/restapi-templates/src/main/velocity/a1Mediator-get-policy-instances.vtl @@ -0,0 +1,7 @@ +## 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] |