aboutsummaryrefslogtreecommitdiffstats
path: root/adapters
diff options
context:
space:
mode:
authorwaqas.ikram <waqas.ikram@est.tech>2020-10-12 10:49:42 +0100
committerwaqas.ikram <waqas.ikram@est.tech>2020-10-12 10:49:45 +0100
commit3c5d3e2894fb81d3897efb8164c64b3987a7a7c2 (patch)
treee971aa6e98650dd343cfba0db7513c958fcdad34 /adapters
parentc79cb8e773ab59442dcc1df537c4b807e98c626a (diff)
Updating code to read aai version from override
Change-Id: Id813516286829a114a61d729cd584f88e8cec6ef Issue-ID: SO-3297 Signed-off-by: waqas.ikram <waqas.ikram@est.tech>
Diffstat (limited to 'adapters')
-rw-r--r--adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/aai/AaiPropertiesImpl.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/aai/AaiPropertiesImpl.java b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/aai/AaiPropertiesImpl.java
index b3b22e239d..9e08cda354 100644
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/aai/AaiPropertiesImpl.java
+++ b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/aai/AaiPropertiesImpl.java
@@ -32,13 +32,15 @@ public class AaiPropertiesImpl implements AAIProperties {
private final String endpoint;
private final String encryptedBasicAuth;
private final String encrytptionKey;
+ private final String aaiVersion;
public AaiPropertiesImpl() {
-
final ApplicationContext context = SpringContextHelper.getAppContext();
this.endpoint = context.getEnvironment().getProperty("aai.endpoint");
this.encryptedBasicAuth = context.getEnvironment().getProperty("aai.auth");
this.encrytptionKey = context.getEnvironment().getProperty("mso.key");
+ this.aaiVersion = context.getEnvironment().getProperty("aai.version");
+
}
@Override
@@ -53,6 +55,11 @@ public class AaiPropertiesImpl implements AAIProperties {
@Override
public AAIVersion getDefaultVersion() {
+ for (final AAIVersion version : AAIVersion.values()) {
+ if (version.toString().equalsIgnoreCase(this.aaiVersion)) {
+ return version;
+ }
+ }
return AAIVersion.LATEST;
}