diff options
author | Gathman, Jonathan (jg1555) <jg1555@us.att.com> | 2019-07-17 16:07:20 -0500 |
---|---|---|
committer | Instrumental <jonathan.gathman@att.com> | 2019-07-22 13:45:06 -0500 |
commit | 58c2a7132f861e269ed707eb585657b0c9ead9f5 (patch) | |
tree | 582693f6852e1d1723924561275f0ec9922ae047 /cadi | |
parent | 5b77b6489dfb644a901e2640615a32d78f533351 (diff) |
Change API Version to 2.1.15
Issue-ID: AAF-902
Change-Id: I25ea4791fcbe45612197d7206b4af1ae23b6c489
Signed-off-by: Gathman, Jonathan (jg1555) <jg1555@us.att.com>
Diffstat (limited to 'cadi')
-rw-r--r-- | cadi/aaf/pom.xml | 2 | ||||
-rw-r--r-- | cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/TestConnectivity.java | 2 | ||||
-rw-r--r-- | cadi/aaf/src/main/java/org/onap/aaf/cadi/configure/Agent.java | 31 | ||||
-rw-r--r-- | cadi/client/pom.xml | 2 | ||||
-rw-r--r-- | cadi/core/pom.xml | 2 | ||||
-rw-r--r-- | cadi/core/src/main/java/org/onap/aaf/cadi/PropAccess.java | 7 | ||||
-rw-r--r-- | cadi/core/src/main/java/org/onap/aaf/cadi/config/Config.java | 8 | ||||
-rw-r--r-- | cadi/oauth-enduser/pom.xml | 2 | ||||
-rw-r--r-- | cadi/pom.xml | 2 | ||||
-rw-r--r-- | cadi/servlet-sample/pom.xml | 2 |
10 files changed, 41 insertions, 19 deletions
diff --git a/cadi/aaf/pom.xml b/cadi/aaf/pom.xml index ea8bb1ee..b5767b26 100644 --- a/cadi/aaf/pom.xml +++ b/cadi/aaf/pom.xml @@ -24,7 +24,7 @@ <parent> <groupId>org.onap.aaf.authz</groupId> <artifactId>cadiparent</artifactId> - <version>2.1.14-SNAPSHOT</version> + <version>2.1.15-SNAPSHOT</version> <relativePath>..</relativePath> </parent> diff --git a/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/TestConnectivity.java b/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/TestConnectivity.java index f02c17f8..efcaa7ef 100644 --- a/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/TestConnectivity.java +++ b/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/TestConnectivity.java @@ -76,7 +76,7 @@ public class TestConnectivity { List<SecuritySetter<HttpURLConnection>> lss = loadSetters(access,si); ///////// String directAAFURL = aaf_urls.get(Config.AAF_URL); - if(directAAFURL!=null && !directAAFURL.contains("/locate/") || !directAAFURL.contains("AAF_LOCATE_URL")) { + if(directAAFURL!=null && !(directAAFURL.contains("/locate/") || directAAFURL.contains("AAF_LOCATE_URL"))) { print(true,"Test Connections by non-located aaf_url"); Locator<URI> locator = new SingleEndpointLocator(directAAFURL); connectTest(locator,new URI(directAAFURL)); diff --git a/cadi/aaf/src/main/java/org/onap/aaf/cadi/configure/Agent.java b/cadi/aaf/src/main/java/org/onap/aaf/cadi/configure/Agent.java index aa9bf138..fda591e3 100644 --- a/cadi/aaf/src/main/java/org/onap/aaf/cadi/configure/Agent.java +++ b/cadi/aaf/src/main/java/org/onap/aaf/cadi/configure/Agent.java @@ -52,6 +52,7 @@ import org.onap.aaf.cadi.CmdLine; import org.onap.aaf.cadi.LocatorException; import org.onap.aaf.cadi.PropAccess; import org.onap.aaf.cadi.Symm; +import org.onap.aaf.cadi.aaf.TestConnectivity; import org.onap.aaf.cadi.aaf.client.ErrMessage; import org.onap.aaf.cadi.aaf.v2_0.AAFCon; import org.onap.aaf.cadi.aaf.v2_0.AAFConHttp; @@ -137,6 +138,13 @@ public class Agent { System.out.println(HASHES); } CmdLine.main(newArgs); + } else if(args.length>0 && "connectivity".equals(args[0])) { + String[] newArgs = new String[args.length-1]; + System.arraycopy(args, 1, newArgs, 0, newArgs.length); + if(newArgs.length>0 && newArgs[0].indexOf('@')>=0) { + newArgs[0]=FQI.reverseDomain(newArgs[0])+".props"; + } + TestConnectivity.main(newArgs); } else { try { AAFSSO aafsso=null; @@ -235,17 +243,18 @@ public class Agent { } // NOTE: CHANGE IN CMDS should be reflected in AAFSSO constructor, to get FQI->aaf-id or not System.out.println("Usage: java -jar <cadi-aaf-*-full.jar> cmd [<tag=value>]*"); - System.out.println(" create <FQI> [<machine>]"); - System.out.println(" read <FQI> [<machine>]"); - System.out.println(" update <FQI> [<machine>]"); - System.out.println(" delete <FQI> [<machine>]"); - System.out.println(" copy <FQI> <machine> <newmachine>[,<newmachine>]*"); - System.out.println(" place <FQI> [<machine>]"); - System.out.println(" showpass <FQI> [<machine>]"); - System.out.println(" check <FQI> [<machine>]"); - System.out.println(" keypairgen <FQI>"); - System.out.println(" config <FQI>"); - System.out.println(" validate <NS>.props>"); + System.out.println(" create <FQI> [<machine>]"); + System.out.println(" read <FQI> [<machine>]"); + System.out.println(" update <FQI> [<machine>]"); + System.out.println(" delete <FQI> [<machine>]"); + System.out.println(" copy <FQI> <machine> <newmachine>[,<newmachine>]*"); + System.out.println(" place <FQI> [<machine>]"); + System.out.println(" showpass <FQI> [<machine>]"); + System.out.println(" check <FQI> [<machine>]"); + System.out.println(" keypairgen <FQI>"); + System.out.println(" config <FQI>"); + System.out.println(" validate <NS>.props>"); + System.out.println(" connectivity <NS>.props>"); System.out.println(" --- Additional Tool Access ---"); System.out.println(" ** Type with no params for Tool Help"); System.out.println(" ** If using with Agent, preface with \"cadi\""); diff --git a/cadi/client/pom.xml b/cadi/client/pom.xml index b2ae7052..38bee291 100644 --- a/cadi/client/pom.xml +++ b/cadi/client/pom.xml @@ -22,7 +22,7 @@ <parent> <groupId>org.onap.aaf.authz</groupId> <artifactId>cadiparent</artifactId> - <version>2.1.14-SNAPSHOT</version> + <version>2.1.15-SNAPSHOT</version> <relativePath>..</relativePath> </parent> diff --git a/cadi/core/pom.xml b/cadi/core/pom.xml index 9f1d8aeb..337262da 100644 --- a/cadi/core/pom.xml +++ b/cadi/core/pom.xml @@ -16,7 +16,7 @@ <groupId>org.onap.aaf.authz</groupId> <artifactId>cadiparent</artifactId> <relativePath>..</relativePath> - <version>2.1.14-SNAPSHOT</version> + <version>2.1.15-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion> 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 994e3250..26aa98cb 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 @@ -21,12 +21,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; @@ -303,6 +305,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..b53b54da 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 @@ -976,6 +976,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 +1005,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); diff --git a/cadi/oauth-enduser/pom.xml b/cadi/oauth-enduser/pom.xml index f4253bd6..14d3f77e 100644 --- a/cadi/oauth-enduser/pom.xml +++ b/cadi/oauth-enduser/pom.xml @@ -25,7 +25,7 @@ <parent> <groupId>org.onap.aaf.authz</groupId> <artifactId>cadiparent</artifactId> - <version>2.1.14-SNAPSHOT</version> + <version>2.1.15-SNAPSHOT</version> <relativePath>..</relativePath> </parent> diff --git a/cadi/pom.xml b/cadi/pom.xml index 87d1ca75..fa1dd0f1 100644 --- a/cadi/pom.xml +++ b/cadi/pom.xml @@ -24,7 +24,7 @@ <parent> <groupId>org.onap.aaf.authz</groupId> <artifactId>parent</artifactId> - <version>2.1.14-SNAPSHOT</version> + <version>2.1.15-SNAPSHOT</version> </parent> <artifactId>cadiparent</artifactId> <name>AAF CADI Parent (Code, Access, Data, Identity)</name> diff --git a/cadi/servlet-sample/pom.xml b/cadi/servlet-sample/pom.xml index f46d197f..1533ad91 100644 --- a/cadi/servlet-sample/pom.xml +++ b/cadi/servlet-sample/pom.xml @@ -4,7 +4,7 @@ <groupId>org.onap.aaf.authz</groupId> <artifactId>cadiparent</artifactId> <relativePath>..</relativePath> - <version>2.1.14-SNAPSHOT</version> + <version>2.1.15-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion> <name>CADI Servlet Sample (Test Only)</name> |