From a9efc16e26cd57d69bb2dc691cec01ec842930cc Mon Sep 17 00:00:00 2001 From: "Thomas Nelson Jr (arthurdent3) tn1381@att.com" Date: Mon, 17 Sep 2018 22:35:25 -0400 Subject: Update distribution files to support helm charts Helm Charts require new Docker images. Refined Cassandra and Cassandra cql loader. Change-Id: Ie7726025afd63e256a43aef9f39d53c32c90c77b Issue-ID: MUSIC-99 Signed-off-by: Thomas Nelson Jr (arthurdent3) tn1381@att.com --- src/main/java/org/onap/music/main/CachingUtil.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/main/java/org/onap/music/main/CachingUtil.java') diff --git a/src/main/java/org/onap/music/main/CachingUtil.java b/src/main/java/org/onap/music/main/CachingUtil.java index 34bc52d3..a81887a0 100755 --- a/src/main/java/org/onap/music/main/CachingUtil.java +++ b/src/main/java/org/onap/music/main/CachingUtil.java @@ -147,7 +147,7 @@ public class CachingUtil implements Runnable { public static boolean authenticateAAFUser(String nameSpace, String userId, String password, String keySpace) throws Exception { - if (aafCache.get(nameSpace) != null) { + if (aafCache.get(nameSpace) != null && musicCache.get(keySpace)!=null) { if (keySpace != null && !musicCache.get(keySpace).equals(nameSpace)) { logger.info(EELFLoggerDelegate.applicationLogger,"Create new application for the same namespace."); } else if (aafCache.get(nameSpace).get(userId).equals(password)) { @@ -181,9 +181,10 @@ public class CachingUtil implements Runnable { boolean responseObj = triggerAAF(nameSpace, userId, password); if (responseObj) { //if (responseObj.getNs().get(0).getAdmin().contains(userId)) { - //Map map = new HashMap<>(); - //map.put(userId, password); - //aafCache.put(nameSpace, map); + Map map = new HashMap<>(); + map.put(userId, password); + aafCache.put(nameSpace, map); + CachingUtil.updateMusicCache(keySpace, nameSpace); return true; //} } -- cgit 1.2.3-korg