From 70dac125e796d52b874f4e7f3839f9cf042e0f98 Mon Sep 17 00:00:00 2001 From: Kanagaraj Manickam Date: Thu, 29 Aug 2019 15:41:53 +0530 Subject: Minor issues fix Issue-ID: CLI-166 Change-Id: I97bd303b4e636bfc53e24732c7c6e4062037909b Signed-off-by: Kanagaraj Manickam k00365106 --- .../org/open/infc/grpc/server/OpenInterfaceGrpcServer.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'grpc/grpc-server') 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()); //fill from profile + Map cache= OnapCommandRegistrar.getRegistrar().getParamCache(product); for (OnapCommandParameter param: cmd.getParameters()) { - Map 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); -- cgit 1.2.3-korg