diff options
author | Kanagaraj Manickam <mkr1481@gmail.com> | 2019-08-29 15:41:53 +0530 |
---|---|---|
committer | Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com> | 2019-08-29 15:41:53 +0530 |
commit | 70dac125e796d52b874f4e7f3839f9cf042e0f98 (patch) | |
tree | 9382129179acf1a0b0e82c5051a0f287f000c0e1 /grpc | |
parent | 02b61c5a78448d2c01ce15adecb6df99f1b6b8c8 (diff) |
Minor issues fix
Issue-ID: CLI-166
Change-Id: I97bd303b4e636bfc53e24732c7c6e4062037909b
Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Diffstat (limited to 'grpc')
-rw-r--r-- | grpc/grpc-server/src/main/java/org/open/infc/grpc/server/OpenInterfaceGrpcServer.java | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/grpc/grpc-server/src/main/java/org/open/infc/grpc/server/OpenInterfaceGrpcServer.java b/grpc/grpc-server/src/main/java/org/open/infc/grpc/server/OpenInterfaceGrpcServer.java index f34df89f..9f325067 100644 --- a/grpc/grpc-server/src/main/java/org/open/infc/grpc/server/OpenInterfaceGrpcServer.java +++ b/grpc/grpc-server/src/main/java/org/open/infc/grpc/server/OpenInterfaceGrpcServer.java @@ -162,18 +162,18 @@ public class OpenInterfaceGrpcServer { new ArrayList<String>()); //fill from profile + Map<String, String> cache= OnapCommandRegistrar.getRegistrar().getParamCache(product); for (OnapCommandParameter param: cmd.getParameters()) { - Map<String, String> cache= OnapCommandRegistrar.getRegistrar().getParamCache(product); if (cache.containsKey( cmd.getInfo().getService() + ":" + cmd.getName() + ":" + param.getLongOption())) { - param.setValue(OnapCommandRegistrar.getRegistrar().getParamCache().get( + param.setValue(cache.get( cmd.getInfo().getService() + ":" + cmd.getName() + ":" + param.getLongOption())); } else if (cache.containsKey( cmd.getInfo().getService() + ":" + param.getLongOption())) { - param.setValue(OnapCommandRegistrar.getRegistrar().getParamCache().get( + param.setValue(cache.get( cmd.getInfo().getService() + ":" + param.getLongOption())); - } else if (OnapCommandRegistrar.getRegistrar().getParamCache().containsKey(param.getLongOption())) { - param.setValue(OnapCommandRegistrar.getRegistrar().getParamCache().get(param.getLongOption())); + } else if (cache.containsKey(param.getLongOption())) { + param.setValue(cache.get(param.getLongOption())); } } } @@ -261,7 +261,6 @@ public class OpenInterfaceGrpcServer { } catch (OnapCommandException e) { logger.info(e.getMessage()); - Builder reply = Output.newBuilder(); reply.putAttrs(OnapCommandConstants.RESULTS, "{}"); reply.setSuccess(false); |