summaryrefslogtreecommitdiffstats
path: root/appc-config
diff options
context:
space:
mode:
authorJoss Armstrong <joss.armstrong@ericsson.com>2019-03-25 11:44:38 +0000
committerJoss Armstrong <joss.armstrong@ericsson.com>2019-03-27 12:00:28 +0000
commit08ce01130eaf9fd6c090fb584f6ba9e801b1d377 (patch)
tree4621e436810dc40fc6165545f9b1cc0cee94fc8b /appc-config
parent7f9b935dca58494b68b44a26e4ac3177db179d1a (diff)
Fix incorrect passing of SvcLogicContext value
EncyrptionToolDGWrapper changes for Multiple Ansible server support not working when retrieving data from SvcLogicContext used for querying DEVICE_AUTHENTICATION table. Issue-ID: APPC-1545 Change-Id: I8f08910156d6e2b4ae6341c847bc773e4d15841e Signed-off-by: Joss Armstrong <joss.armstrong@ericsson.com>
Diffstat (limited to 'appc-config')
-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"));