summaryrefslogtreecommitdiffstats
path: root/cadi
diff options
context:
space:
mode:
authorInstrumental <jonathan.gathman@att.com>2018-06-22 18:41:08 -0500
committerInstrumental <jonathan.gathman@att.com>2018-06-22 18:41:14 -0500
commit68f3e5a2875f74863b6cbe8eb6dc7138b89668a5 (patch)
treedabbd3526cc64b9a6310678346a46b36122a6efc /cadi
parentf932f1c8b0e1d29536405c27b8543f4a78e60433 (diff)
Refine aafcli for Tests
Issue-ID: AAF-361 Change-Id: Ib28ab9e4ccea7bacc165946cf7075ee1b75edd76 Signed-off-by: Instrumental <jonathan.gathman@att.com>
Diffstat (limited to 'cadi')
-rw-r--r--cadi/aaf/src/main/java/org/onap/aaf/cadi/sso/AAFSSO.java11
-rw-r--r--cadi/core/src/main/java/org/onap/aaf/cadi/config/Config.java7
2 files changed, 9 insertions, 9 deletions
diff --git a/cadi/aaf/src/main/java/org/onap/aaf/cadi/sso/AAFSSO.java b/cadi/aaf/src/main/java/org/onap/aaf/cadi/sso/AAFSSO.java
index 522568a9..7d01b70b 100644
--- a/cadi/aaf/src/main/java/org/onap/aaf/cadi/sso/AAFSSO.java
+++ b/cadi/aaf/src/main/java/org/onap/aaf/cadi/sso/AAFSSO.java
@@ -95,11 +95,6 @@ public class AAFSSO {
}
}
-// String keyfile = diskprops.getProperty(Config.CADI_KEYFILE);
-// if(keyfile==null) {
-// keyfile = dot_aaf.getCanonicalPath()+".keyfile";
-// touchDiskprops=true;
-// }
File dot_aaf_kf = new File(dot_aaf, "keyfile");
if (removeSSO) {
@@ -300,9 +295,9 @@ public class AAFSSO {
addProp(Config.AAF_LOCATE_URL, locateUrl);
}
- String aafUrl = "https://AAF_LOCATE_URL/AAF_NS.service/2.0";
+ String aafUrl = "https://AAF_LOCATE_URL/AAF_NS.service:2.0";
access.setProperty(Config.AAF_URL, aafUrl);
- access.setProperty(Config.CM_URL, "https://AAF_LOCATE_URL/AAF_NS.cm/2.0");
+ access.setProperty(Config.CM_URL, "https://AAF_LOCATE_URL/AAF_NS.cm:2.0");
String cadiLatitude = access.getProperty(Config.CADI_LATITUDE);
if(cadiLatitude==null) {
System.out.println("# If you do not know your Global Coordinates, we suggest bing.com/maps");
@@ -366,7 +361,7 @@ public class AAFSSO {
public void setStdErrDefault() {
access.setLogLevel(PropAccess.DEFAULT);
- System.setOut(stdErrOrig);
+ System.setErr(stdErrOrig);
}
public void setLogDefault(Level level) {
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 1f778ad6..7c897e37 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
@@ -720,7 +720,12 @@ public class Config {
String url = _url, replacement;
int idxAAF_LOCATE_URL;
if((idxAAF_LOCATE_URL=_url.indexOf(AAF_LOCATE_URL_TAG))>0 && ((replacement=access.getProperty(AAF_LOCATE_URL, null))!=null)) {
- url = replacement + "/locate" + _url.substring(idxAAF_LOCATE_URL+AAF_LOCATE_URL_TAG.length());
+ StringBuilder sb = new StringBuilder(replacement);
+ if(!replacement.endsWith("/locate")) {
+ sb.append("/locate");
+ }
+ sb.append(_url,idxAAF_LOCATE_URL+AAF_LOCATE_URL_TAG.length(),_url.length());
+ url = sb.toString();
}
try {