diff options
author | 2018-09-25 06:47:53 -0400 | |
---|---|---|
committer | 2018-09-25 12:35:58 +0000 | |
commit | 4c9ff34878cdc955f30e337cc8c0a2d54aaca364 (patch) | |
tree | e4a686471a29ec9e952cbff1f650b548ff928296 /controlloop/common/eventmanager/src/main/java/org | |
parent | a24a985d328b97f50a41d3448d235866af625ca9 (diff) |
Fix sonar critical
Sonar complains that the password is an actual password when
in fact we are doing exactly the fix they suggest.
I seem to not have access to resolve it as a false positive.
So it seems the better way to do this is rename this to
reflect that it is actually a property value.
Had to also address 120> due to new variable name size.
Issue-ID: POLICY-1135
Change-Id: I2e2a36ed8d7f5c95e912df4f6ed74983cee8a3dd
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'controlloop/common/eventmanager/src/main/java/org')
-rw-r--r-- | controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java index 5241bd2fc..4ab7b494f 100644 --- a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java +++ b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java @@ -76,8 +76,8 @@ public class ControlLoopEventManager implements LockCallback, Serializable { public static final String VSERVER_PROV_STATUS = "vserver.prov-status"; private static final String AAI_URL = "aai.url"; - private static final String AAI_USERNAME = "aai.username"; - private static final String AAI_PASSWD = "aai.password"; + private static final String AAI_USERNAME_PROPERTY = "aai.username"; + private static final String AAI_PASS_PROPERTY = "aai.password"; private static final String QUERY_AAI_ERROR_MSG = "Exception from queryAai: "; @@ -882,8 +882,8 @@ public class ControlLoopEventManager implements LockCallback, Serializable { try { if (vserverName != null) { String aaiHostUrl = PolicyEngine.manager.getEnvironmentProperty(AAI_URL); - String aaiUser = PolicyEngine.manager.getEnvironmentProperty(AAI_USERNAME); - String aaiPassword = PolicyEngine.manager.getEnvironmentProperty(AAI_PASSWD); + String aaiUser = PolicyEngine.manager.getEnvironmentProperty(AAI_USERNAME_PROPERTY); + String aaiPassword = PolicyEngine.manager.getEnvironmentProperty(AAI_PASS_PROPERTY); String aaiGetQueryByVserver = "/aai/v11/nodes/vservers?vserver-name="; String url = aaiHostUrl + aaiGetQueryByVserver; logger.info("AAI Host URL by VServer: {}", url); @@ -912,8 +912,8 @@ public class ControlLoopEventManager implements LockCallback, Serializable { String vnfId = event.getAai().get(GENERIC_VNF_VNF_ID); String aaiHostUrl = PolicyEngine.manager.getEnvironmentProperty(AAI_URL); - String aaiUser = PolicyEngine.manager.getEnvironmentProperty(AAI_USERNAME); - String aaiPassword = PolicyEngine.manager.getEnvironmentProperty(AAI_PASSWD); + String aaiUser = PolicyEngine.manager.getEnvironmentProperty(AAI_USERNAME_PROPERTY); + String aaiPassword = PolicyEngine.manager.getEnvironmentProperty(AAI_PASS_PROPERTY); try { if (vnfName != null) { @@ -978,8 +978,8 @@ public class ControlLoopEventManager implements LockCallback, Serializable { } AaiNqResponse aaiNqResponse = new AaiManager(new RESTManager()).postQuery(getPeManagerEnvProperty(AAI_URL), - getPeManagerEnvProperty(AAI_USERNAME), getPeManagerEnvProperty(AAI_PASSWD), aaiNqRequest, - onset.getRequestId()); + getPeManagerEnvProperty(AAI_USERNAME_PROPERTY), getPeManagerEnvProperty(AAI_PASS_PROPERTY), + aaiNqRequest, onset.getRequestId()); // Check AAI response if (aaiNqResponse == null) { |