From 3a0535f344dcc291f0e50ef508b5dd0a6d09e3de Mon Sep 17 00:00:00 2001 From: Kanagaraj Manickam k00365106 Date: Fri, 9 Mar 2018 03:05:50 +0530 Subject: Improve array and map to read from file as well Issue-ID: CLI-99 Change-Id: If41a8b75d1516991e759dfa73de478da47936eb4 Signed-off-by: Kanagaraj Manickam k00365106 --- main/src/main/java/org/onap/cli/main/utils/OnapCliArgsParser.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main/src/main/java/org/onap/cli/main/utils/OnapCliArgsParser.java b/main/src/main/java/org/onap/cli/main/utils/OnapCliArgsParser.java index 906d8d11..d5807d79 100644 --- a/main/src/main/java/org/onap/cli/main/utils/OnapCliArgsParser.java +++ b/main/src/main/java/org/onap/cli/main/utils/OnapCliArgsParser.java @@ -128,7 +128,7 @@ public class OnapCliArgsParser { Object value = paramMap.get(paramName).getValue(); List list = (List) value; - list.add(args.get(i + 1)); + list.add(readTextStringFromUrl(args.get(i + 1), paramMap.get(paramName).getName())); paramMap.get(paramName).setValue(list); i++; continue; @@ -148,7 +148,8 @@ public class OnapCliArgsParser { "it should be in the form of ="); } - map.put(argArr[0], argArr[1]); + //Make sure to read values from file, in case file path is given. + map.put(argArr[0], readTextStringFromUrl(argArr[1], paramMap.get(paramName).getName())); paramMap.get(paramName).setValue(map); i++; continue; -- cgit 1.2.3-korg