summaryrefslogtreecommitdiffstats
path: root/main/src
diff options
context:
space:
mode:
authorKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2018-03-09 03:05:50 +0530
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2018-03-09 03:05:50 +0530
commit3a0535f344dcc291f0e50ef508b5dd0a6d09e3de (patch)
tree19fecd8eb9d46570c2c04768fa13e91ddd09d1df /main/src
parentb4723e06648181934eacec04fa987811a0b6f959 (diff)
Improve array and map to read from file as well
Issue-ID: CLI-99 Change-Id: If41a8b75d1516991e759dfa73de478da47936eb4 Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Diffstat (limited to 'main/src')
-rw-r--r--main/src/main/java/org/onap/cli/main/utils/OnapCliArgsParser.java5
1 files 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<String> list = (List<String>) 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 <key>=<value>");
}
- 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;