diff options
author | Sai Gandham <sai.gandham@att.com> | 2019-02-06 14:56:44 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-02-06 14:56:44 +0000 |
commit | e43bc462af00e9c05384313514b279e11372fd79 (patch) | |
tree | 2f7a84cd025dbed53e34cb5f65a42ce8689539fb | |
parent | 846340d4371c9a136c801d74e2d903b95eefa26f (diff) | |
parent | f83c15c4a04a26c3d57423f3c67058ea38d5302f (diff) |
Merge "Refine Props, Batch Extend"
4 files changed, 12 insertions, 17 deletions
diff --git a/auth/auth-batch/src/test/java/org/onap/aaf/auth/batch/helpers/test/JU_Future.java b/auth/auth-batch/src/test/java/org/onap/aaf/auth/batch/helpers/test/JU_Future.java index 91950c66..0db682ad 100644 --- a/auth/auth-batch/src/test/java/org/onap/aaf/auth/batch/helpers/test/JU_Future.java +++ b/auth/auth-batch/src/test/java/org/onap/aaf/auth/batch/helpers/test/JU_Future.java @@ -105,15 +105,7 @@ public class JU_Future { @Test public void testResetLocalData() { Future.resetLocalData(); - } - - @Test - public void testSizeForDeletion() { Assert.assertEquals(0, Future.sizeForDeletion()); - } - - @Test - public void testPendingDelete() { Assert.assertEquals(false, Future.pendingDelete(future)); } diff --git a/auth/docker/aaf.sh b/auth/docker/aaf.sh index 14166a3e..3ed7eafb 100644 --- a/auth/docker/aaf.sh +++ b/auth/docker/aaf.sh @@ -29,6 +29,7 @@ function run_it() { --env aaf_locator_container=docker \ --env aaf_locator_fqdn=${HOSTNAME} \ --env aaf_locate_url=https://aaf-locate:8095 \ + --env aaf_locator_public_hostname=$HOSTNAME \ --env AAF_ENV=${AAF_ENV} \ --env LATITUDE=${LATITUDE} \ --env LONGITUDE=${LONGITUDE} \ diff --git a/cadi/core/src/main/java/org/onap/aaf/cadi/config/Config.java b/cadi/core/src/main/java/org/onap/aaf/cadi/config/Config.java index f265947a..fc972c8c 100644 --- a/cadi/core/src/main/java/org/onap/aaf/cadi/config/Config.java +++ b/cadi/core/src/main/java/org/onap/aaf/cadi/config/Config.java @@ -36,8 +36,6 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; -import javax.servlet.Registration; - import org.onap.aaf.cadi.AbsUserCache; import org.onap.aaf.cadi.Access; import org.onap.aaf.cadi.Access.Level; diff --git a/cadi/core/src/main/java/org/onap/aaf/cadi/config/RegistrationPropHolder.java b/cadi/core/src/main/java/org/onap/aaf/cadi/config/RegistrationPropHolder.java index c8139646..b6cd533c 100644 --- a/cadi/core/src/main/java/org/onap/aaf/cadi/config/RegistrationPropHolder.java +++ b/cadi/core/src/main/java/org/onap/aaf/cadi/config/RegistrationPropHolder.java @@ -28,7 +28,7 @@ import org.onap.aaf.cadi.CadiException; import org.onap.aaf.cadi.util.Split; public class RegistrationPropHolder { - + private final String PUBLIC_NAME="%NS.%N"; private final Access access; public String hostname; private int port; @@ -38,6 +38,7 @@ public class RegistrationPropHolder { public Float longitude; public final String default_fqdn; public final String default_container_ns; + public final String default_name; public final String lentries; public final String lcontainer; @@ -74,6 +75,8 @@ public class RegistrationPropHolder { public_hostname = access.getProperty(Config.AAF_LOCATOR_PUBLIC_HOSTNAME, hostname); + default_name = access.getProperty(Config.AAF_LOCATOR_NAME, "%CNS.%NS.%N"); + latitude=null; String slatitude = access.getProperty(Config.CADI_LATITUDE, null); if(slatitude == null) { @@ -100,7 +103,7 @@ public class RegistrationPropHolder { } } - default_fqdn = access.getProperty(Config.AAF_LOCATOR_FQDN, public_hostname); + default_fqdn = access.getProperty(Config.AAF_LOCATOR_FQDN, hostname); default_container_ns = access.getProperty(Config.AAF_LOCATOR_CONTAINER_NS,""); if(errs.length()>0) { @@ -120,17 +123,18 @@ public class RegistrationPropHolder { if(public_hostname!=null && dot_le.isEmpty()) { str = public_hostname; } else { - str = access.getProperty(Config.AAF_LOCATOR_FQDN+dot_le, null); - if(str==null) { - str = access.getProperty(Config.AAF_LOCATOR_FQDN, hostname); - } + str = access.getProperty(Config.AAF_LOCATOR_FQDN+dot_le, default_fqdn); } return replacements(str,entry,dot_le); } public String getEntryName(final String entry, final String dot_le) { String str; - str = access.getProperty(Config.AAF_LOCATOR_NAME+dot_le, "%NS.%N"); + if(dot_le.isEmpty()) { + str = PUBLIC_NAME; + } else { + str = access.getProperty(Config.AAF_LOCATOR_NAME+dot_le, default_name); + } return replacements(str,entry,dot_le); } |