From 8cc4efaac0e325b3ac8b0ad5689c7f80eef1a5a6 Mon Sep 17 00:00:00 2001 From: "m.lettere" Date: Wed, 30 Jun 2021 19:03:38 +0200 Subject: [PATCH] retrieve vre and system_services from KC --- templates/add_all_system_services_to_vre.json.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/add_all_system_services_to_vre.json.j2 b/templates/add_all_system_services_to_vre.json.j2 index 0abf139..4eef621 100644 --- a/templates/add_all_system_services_to_vre.json.j2 +++ b/templates/add_all_system_services_to_vre.json.j2 @@ -111,7 +111,7 @@ "inputParameters": { "url" : "${init.input.keycloak_admin}/clients/search=true&clientId=", "services" : "${extract_system_service_names.output.result}", - "scriptExpression": "inputs={},tasks=[];for(var i=0;i<$.services.length;i++)s=$.services[i],tasks.push({name:'pyrest',type:'SIMPLE',taskReferenceName:'get_system_service'+i,inputs['get_system_service'+i]={url: $.url + s, method : 'GET', headers : {Authorization : 'Bearer ${authorize.output.body.access_token}', Accept : 'application/json'}};return {tasks:Java.to(tasks,'java.util.Map[]'),inputs:inputs};" + "scriptExpression": "inputs = {}, tasks = [];for (var i = 0; i < $.services.length; i++){s = $.services[i];tasks.push({name: 'pyrest',type: 'SIMPLE',taskReferenceName: 'get_system_service' + i});inputs['get_system_service' + i] = {url: $.url + s,method: 'GET',headers: {Authorization: 'Bearer ${authorize.output.body.access_token}', Accept: 'application/json'}}};return {tasks: Java.to(tasks, 'java.util.Map[]'),inputs: inputs};" } }, {