aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--appc-config/appc-encryption-tool/provider/src/main/java/org/onap/appc/encryptiontool/wrapper/EncryptionToolDGWrapper.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/appc-config/appc-encryption-tool/provider/src/main/java/org/onap/appc/encryptiontool/wrapper/EncryptionToolDGWrapper.java b/appc-config/appc-encryption-tool/provider/src/main/java/org/onap/appc/encryptiontool/wrapper/EncryptionToolDGWrapper.java
index 0910a5ba0..056848f26 100644
--- a/appc-config/appc-encryption-tool/provider/src/main/java/org/onap/appc/encryptiontool/wrapper/EncryptionToolDGWrapper.java
+++ b/appc-config/appc-encryption-tool/provider/src/main/java/org/onap/appc/encryptiontool/wrapper/EncryptionToolDGWrapper.java
@@ -100,8 +100,7 @@ public class EncryptionToolDGWrapper implements SvcLogicJavaPlugin {
ctx.setAttribute("cloudRegionAai", cloudRegionAai);
responsePrefix = StringUtils.isNotBlank(responsePrefix) ? (responsePrefix + ".") : "";
String basicQuery = "SELECT USER_NAME ,PASSWORD,PORT_NUMBER ,URL FROM DEVICE_AUTHENTICATION WHERE VNF_TYPE = $"
- + Constants.VNF_TYPE + " AND PROTOCOL = $" + Constants.PROTOCOL + "" + " AND ACTION = $"
- + Constants.ACTION + "";
+ + "vnf-type AND PROTOCOL = $APPC.protocol.PROTOCOL AND ACTION = $input.action";
String urlAppend = " ";
try {
if (serviceLogic != null && ctx != null) {
@@ -112,9 +111,8 @@ public class EncryptionToolDGWrapper implements SvcLogicJavaPlugin {
urlAppend = " AND URL = $" + Constants.URL + "";
key = basicQuery + urlAppend;
} else {
- key = "SELECT COUNT(*) AS MULTIPLE FROM DEVICE_AUTHENTICATION WHERE VNF_TYPE = $"
- + Constants.VNF_TYPE + " AND PROTOCOL = $" + Constants.PROTOCOL + " AND ACTION = $"
- + Constants.ACTION + "";
+ key = "SELECT COUNT(*) AS MULTIPLE FROM DEVICE_AUTHENTICATION WHERE VNF_TYPE = $vnf-type"
+ + " AND PROTOCOL = $APPC.protocol.PROTOCOL AND ACTION = $input.action";
status = serviceLogic.query("SQL", false, null, key, null, null, ctx);
log.info("Checking number of records for ansible:" + key);
cnt = Integer.parseInt(ctx.getAttribute("MULTIPLE"));