From f24521907506d3c7b77375d76661458bc3ad9f33 Mon Sep 17 00:00:00 2001 From: Kanagaraj Manickam k00365106 Date: Thu, 7 Sep 2017 14:23:14 +0530 Subject: Make set specific to product version CLI-2 Change-Id: If6c72255c4c84615dafe5f0074eb5532bc90bf5e Signed-off-by: Kanagaraj Manickam k00365106 --- main/src/main/java/org/onap/cli/main/OnapCli.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'main/src') diff --git a/main/src/main/java/org/onap/cli/main/OnapCli.java b/main/src/main/java/org/onap/cli/main/OnapCli.java index 52922277..c175f67b 100644 --- a/main/src/main/java/org/onap/cli/main/OnapCli.java +++ b/main/src/main/java/org/onap/cli/main/OnapCli.java @@ -50,7 +50,6 @@ import jline.console.ConsoleReader; public class OnapCli { private List args = new ArrayList<>(); - Map paramCache = new HashMap<>(); private int exitCode = -1; @@ -212,19 +211,17 @@ public class OnapCli { if (args.size() > 1) { String [] paramEntry = args.get(1).trim().split("="); if (paramEntry.length >= 2) { - this.paramCache.put(paramEntry[0].trim(), paramEntry[1].trim()); + OnapCommandRegistrar.getRegistrar().addParamCache(paramEntry[0].trim(), paramEntry[1].trim()); } else { this.print("Please use it in the form of 'set param-name=param-value'"); } } else { - this.print(this.paramCache.toString()); + this.print(OnapCommandRegistrar.getRegistrar().getParamCache().toString()); } } else if (!args.isEmpty() && this.args.get(0).equals(OnapCliConstants.PARAM_INTERACTIVE_UNSET)) { if (args.size() > 1) { for (int i = 1; i