summaryrefslogtreecommitdiffstats
path: root/cadi/core/src
diff options
context:
space:
mode:
Diffstat (limited to 'cadi/core/src')
-rw-r--r--cadi/core/src/main/java/org/onap/aaf/cadi/PropAccess.java7
-rw-r--r--cadi/core/src/main/java/org/onap/aaf/cadi/config/Config.java10
2 files changed, 16 insertions, 1 deletions
diff --git a/cadi/core/src/main/java/org/onap/aaf/cadi/PropAccess.java b/cadi/core/src/main/java/org/onap/aaf/cadi/PropAccess.java
index 6e11c3c7..9f4b4b9f 100644
--- a/cadi/core/src/main/java/org/onap/aaf/cadi/PropAccess.java
+++ b/cadi/core/src/main/java/org/onap/aaf/cadi/PropAccess.java
@@ -23,12 +23,14 @@
package org.onap.aaf.cadi;
+import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintStream;
import java.io.PrintWriter;
+import java.io.StringBufferInputStream;
import java.io.StringWriter;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
@@ -306,6 +308,11 @@ public class PropAccess implements Access {
if (o!=null) {
if(o.getClass().isArray()) {
first = write(first,sb,(Object[])o);
+ } else if(o instanceof Throwable) {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ PrintStream ps = new PrintStream(baos);
+ ((Throwable)o).printStackTrace(ps);
+ sb.append(baos.toString());
} else {
s=o.toString();
if (first) {
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 48f5e2d1..30508b7d 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
@@ -231,6 +231,8 @@ public class Config {
// let NS Owners choose with <ns>.certman aaf ignoreIPs" to ignoreIP Check for Configs
// Probably only want to allow in a DEV Env.
public static final String CM_ALLOW_IGNORE_IPS="cm_allow_ignore_ips";
+ // Docker doesn't have a default DNS. The property turns off IP Checking of DNSs before creating.
+ public static final String CM_ALWAYS_IGNORE_IPS="cm_always_ignore_ips";
public static final String PATHFILTER_URLPATTERN = "pathfilter_urlpattern";
public static final String PATHFILTER_STACK = "pathfilter_stack";
@@ -976,6 +978,7 @@ public class Config {
public static<T> void add(Access access, final String tag, List<Priori<T>> list) {
String plugins = access.getProperty(tag, null);
if(plugins!=null) {
+ access.log(Level.INIT, "Adding TAF Plugins: ", plugins);
for(String tafs : Split.splitTrim(';', plugins)) {
String[] pluginArray = Split.splitTrim(',', tafs);
String clssn = null;
@@ -1004,7 +1007,12 @@ public class Config {
try {
list.add(new Priori<T>(cnst.newInstance(access),priority));
} catch (InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
- access.printf(Level.ERROR, "%s cannot be constructed with Access.\n",clssn);
+ String hostname = access.getProperty(Config.HOSTNAME,null);
+ if(hostname==null) {
+ access.printf(Level.ERROR, "%s cannot be constructed on this machine. Set valid 'hostname' in your properties\n",clssn);
+ } else {
+ access.printf(Level.ERROR, "%s cannot be constructed on %s with Access.\n",clssn, hostname);
+ }
}
} catch (NoSuchMethodException | SecurityException e) {
access.printf(Level.ERROR, "%s needs a Constructor taking Access as sole param.\n",clssn);