summaryrefslogtreecommitdiffstats
path: root/grpc/grpc-server
diff options
context:
space:
mode:
Diffstat (limited to 'grpc/grpc-server')
-rw-r--r--grpc/grpc-server/src/main/java/org/open/infc/grpc/server/OpenInterfaceGrpcServer.java11
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);