aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2017-09-11 15:54:38 +0530
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2017-09-11 15:55:44 +0530
commit15e0b7592ea8114f6cc9e23b8776d51c986f7d68 (patch)
treee1a3b3d6dc60f441e251edef8179679f83806612 /main
parentbbe95e5f5b93965c53a1c1976345ddec6d2fca9f (diff)
Add service context in set and unset
To set service specific parameters, use set <service>:param-name=value CLI-5 Change-Id: Ife8e618ba50cbbd4357ac36f03d22dacd5c46de8 Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Diffstat (limited to 'main')
-rw-r--r--main/src/main/java/org/onap/cli/main/OnapCli.java6
1 files changed, 5 insertions, 1 deletions
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 0920f84b..f689830a 100644
--- a/main/src/main/java/org/onap/cli/main/OnapCli.java
+++ b/main/src/main/java/org/onap/cli/main/OnapCli.java
@@ -308,7 +308,11 @@ public class OnapCli {
}
for (OnapCommandParameter param: cmd.getParameters()) {
- if (OnapCommandRegistrar.getRegistrar().getParamCache().containsKey(param.getLongOption())) {
+ if (OnapCommandRegistrar.getRegistrar().getParamCache().containsKey(
+ cmd.getService().getName() + ":" + param.getLongOption())) {
+ param.setValue(OnapCommandRegistrar.getRegistrar().getParamCache().get(
+ cmd.getService().getName() + ":" + param.getLongOption()));
+ } else if (OnapCommandRegistrar.getRegistrar().getParamCache().containsKey(param.getLongOption())) {
param.setValue(OnapCommandRegistrar.getRegistrar().getParamCache().get(param.getLongOption()));
}
}