diff options
author | Thomas Nelson Jr (arthurdent3) tn1381@att.com <tn1381@att.com> | 2018-09-17 22:35:25 -0400 |
---|---|---|
committer | Thomas Nelson Jr (arthurdent3) tn1381@att.com <tn1381@att.com> | 2018-09-17 22:35:25 -0400 |
commit | a9efc16e26cd57d69bb2dc691cec01ec842930cc (patch) | |
tree | 8ed97ecbfdb7c3e94d5e3aad5dff8d812dbefbc7 /src/main/java/org/onap/music/main/CachingUtil.java | |
parent | bdeb60322c8a4477f19c616f5f1a6a1058c72204 (diff) |
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 <tn1381@att.com>
Diffstat (limited to 'src/main/java/org/onap/music/main/CachingUtil.java')
-rwxr-xr-x | src/main/java/org/onap/music/main/CachingUtil.java | 9 |
1 files changed, 5 insertions, 4 deletions
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<String, String> map = new HashMap<>(); - //map.put(userId, password); - //aafCache.put(nameSpace, map); + Map<String, String> map = new HashMap<>(); + map.put(userId, password); + aafCache.put(nameSpace, map); + CachingUtil.updateMusicCache(keySpace, nameSpace); return true; //} } |