aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md (renamed from readme.md)53
-rw-r--r--aai-traversal/.classpath60
-rw-r--r--aai-traversal/src/test/resources/error.properties198
3 files changed, 229 insertions, 82 deletions
diff --git a/readme.md b/README.md
index 87c5a0a..ea453eb 100644
--- a/readme.md
+++ b/README.md
@@ -1,24 +1,34 @@
# OpenECOMP AAI Traversal
----
----
-
-# Introduction
-
+## Introduction
OpenECOMP AAI Traversal is delivered with multiple docker containers with hbase, and gremlin docker container preinstalled and also have a aai-haproxy container installed for routing requests properly between resources and graph query docker containers
For demo app use case you can install all three of the containers in one machine. Configuration and deployment of hbase for any other use cases should be evaluated and updated accordingly.
-# Compiling AAI Traversal
-
-AAI can be compiled easily with a `mvn clean install -DskipTests`. Integration tests are started by omitting the skipTests flag `mvn clean install`
-
-# Starting AAI
-
-In a developer local environment using the following: mvn -N -P runAjsc
-
-# Accessing AAI APIs
-
+## Development
+### Compile
+
+AAI can be compiled with
+``` bash
+mvn clean install -DskipTests
+```
+### Test
+``` bash
+mvn test
+```
+Run individual tests
+```
+mvn test -Dtest=EchoResponseTest#testEchoResultWhenValidHeaders
+```
+
+### Run
+Run the project with
+``` bash
+mvn -N -P runAjsc
+```
+Make sure to be in `aai-traversal` before executing it!
+
+## Accessing AAI APIs
Most of the AAI features within OpenECOMP are triggered by using **RESTful interfaces**. AAI is configured on this release with HTTPS only using Basic Authentication. Two way SSL using client certificates should be considered and used for non demo use case deployments.
The MSO APIs are configured to accept requests having a **basic auth. header** set with various **username and password** depending on which client is triggering the request. The realm.properties contains the credentials for the OpenECOMP components and these should be changed as appropriate.
@@ -26,30 +36,27 @@ The MSO APIs are configured to accept requests having a **basic auth. header** s
All API endpoints are exposed on port **8443**.
##### Example API endpoints in the first open source release
-
http://aai.api.simpledemo.openecomp.org:8443/aai/v10/query
The easy way to trigger these endpoints is to use a RESTful client or automation framework. HTTP GET/PUT/DELETE are supported for most resource endpoints. More information on the REST interface can be found in the AAI Service REST API specification.
-# Configuring AAI
-
+## Configuring AAI
The Docker containers use a Chef based configuration file (JSON) in order to provision AAI basic configuration for the demo app use case set up.
-# Logging
-
+## Logging
EELF framework is used for **specific logs** (audit, metric and error logs). They are tracking inter component logs (request and response) and allow to follow a complete flow through the AAI subsystem
EELF logs are located at the following location on the AAI Service container:
-- /opt/app/aai-traversal/logs (each module has its own folder)
+- `/opt/app/aai-traversal/logs` (each module has its own folder)
AJSC Jetty logs can be found under /opt/app/aai-traversal/logs/ajsc-jetty.
The REST interface logs can be found under /opt/app/aai-traversal/logs/rest.
-# Testing AAI Functionalities
+## Testing AAI Functionalities
Any RESTful client such as SoapUI may be configured and setup to use for testing AAI requests.
-# Integration Tests
+## Integration Tests
Integration tests are located in `it` directory, and disabled by default in the pom file:
`<skipITs>true</skipITs>`
diff --git a/aai-traversal/.classpath b/aai-traversal/.classpath
index ed528ab..31f5ed6 100644
--- a/aai-traversal/.classpath
+++ b/aai-traversal/.classpath
@@ -1,67 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" output="target/classes" path="src/main/java">
- <attributes>
- <attribute name="optional" value="true"/>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="src" output="target/test-classes" path="src/test/java">
- <attributes>
- <attribute name="optional" value="true"/>
- <attribute name="maven.pomderived" value="true"/>
- <attribute name="test" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
- <attributes>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
- <attributes>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
- <attributes>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
- <attributes>
- <attribute name="maven.pomderived" value="true"/>
- <attribute name="test" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry exported="true" kind="con" path="GROOVY_DSL_SUPPORT"/>
- <classpathentry kind="src" output="target/classes" path="target/generated-sources/antlr4">
- <attributes>
- <attribute name="optional" value="true"/>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/docker">
- <attributes>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
<classpathentry kind="src" path="target/generated-sources/annotations">
<attributes>
<attribute name="optional" value="true"/>
- <attribute name="maven.pomderived" value="true"/>
- <attribute name="ignore_optional_problems" value="true"/>
- <attribute name="m2e-apt" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="src" output="target/test-classes" path="target/generated-test-sources/test-annotations">
- <attributes>
- <attribute name="optional" value="true"/>
- <attribute name="maven.pomderived" value="true"/>
- <attribute name="ignore_optional_problems" value="true"/>
- <attribute name="m2e-apt" value="true"/>
- <attribute name="test" value="true"/>
</attributes>
</classpathentry>
- <classpathentry kind="output" path="target/classes"/>
+ <classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/aai-traversal/src/test/resources/error.properties b/aai-traversal/src/test/resources/error.properties
new file mode 100644
index 0000000..076fa32
--- /dev/null
+++ b/aai-traversal/src/test/resources/error.properties
@@ -0,0 +1,198 @@
+# Adding comment trying to trigger a build
+#------------------------------------------------------------------------------- ----------
+#Key=Disposition:Category:Severity:Error Code:HTTP ResponseCode:RESTError Code:Error Message
+#------------------------------------------------------------------------------- ----------
+# testing code, please don't change unless error utility source code changes
+AAI_TESTING=5:2:WARN:0000:400:0001:Error code for testing:0
+
+# General success
+AAI_0000=0:0:INFO:0000:200:0000:Success:0
+
+# health check success
+AAI_0001=0:0:INFO:0001:200:0001:Success X-FromAppId=%1 X-TransactionId=%2 :0
+AAI_0002=0:0:INFO:0002:200:0001:Successful health check:0
+
+# Success with additional info
+AAI_0003=0:3:INFO:0003:202:0003:Success with additional info performing %1 on %2. Added %3 with key %4:0
+AAI_0004=0:3:INFO:0004:202:0003:Added prerequisite object to db:0
+
+#--- aairest: 3000-3299
+# svc errors
+AAI_3000=5:2:INFO:3000:400:3000:Invalid input performing %1 on %2:300
+AAI_3001=5:6:INFO:3001:404:3001:Resource not found for %1 using id %2:300
+AAI_3002=5:1:WARN:3002:400:3002:Error writing output performing %1 on %2:300
+AAI_3003=5:1:WARN:3003:400:3003:Failed to make edge to missing target node of type %3 with keys %4 performing %1 on %2:400
+AAI_3005=5:6:WARN:3005:404:3001:Node cannot be directly accessed for read, must be accessed via ancestor(s):100
+AAI_3006=5:6:WARN:3006:404:3001:Node cannot be directly accessed for write, must be accessed via ancestor(s)100
+AAI_3007=5:6:INFO:3007:410:3007:This version (%1) of the API is retired, please migrate to %2:500
+AAI_3008=5:6:WARN:3008:400:3008:URI is not encoded in UTF-8:300
+AAI_3009=5:6:WARN:3009:400:3002:Malformed URL:300
+AAI_3010=5:6:WARN:3010:400:3002:Cannot write via this URL:100
+AAI_3011=5:6:WARN:3011:400:3000:Unknown XML namespace used in payload:300
+AAI_3012=5:6:WARN:3012:400:3012:Unrecognized AAI function:300
+AAI_3013=5:6:WARN:3013:400:3013:Query payload missing required parameters %1:300
+AAI_3014=5:6:WARN:3014:400:3014:Query payload is invalid %1:300
+AAI_3016=5:6:INFO:3007:400:3016:Request uri is not valid, please check the version %1:500
+AAI_3017=5:6:INFO:3007:400:3016:Request uri is not valid, please check the uri %1:500
+AAI_3018=5:6:WARN:3018:400:3018:Query URI missing required parameters:300
+AAI_3019=5:6:WARN:3019:400:3019:Query URI sending conflicting parameters:300
+AAI_3020=5:6:WARN:3020:400:3020:Query URI parameters outside bounds:300
+AAI_3021=5:6:WARN:3021:400:3021:Invalid parameters to Recents API:300
+AAI_3022=5:6:WARN:3022:400:3022:Query payload includes extra/unrecognized parameters %1:300
+AAI_3025=5:4:FATAL:3025:500:3025:Error connecting to Schema Service:400
+AAI_3026=5:4:FATAL:3026:500:3026:Error reading OXM from Schema Service:400
+AAI_3027=5:4:FATAL:3026:500:3026:Error reading EdgeRules from Schema Service:400
+AAI_3028=5:4:FATAL:3026:500:3026:Error reading stored-queries from Schema Service:400
+
+# pol errors
+AAI_3100=5:1:WARN:3100:400:3100:Unsupported operation %1:300
+AAI_3101=5:1:WARN:3101:403:3101:Attempt by client %1 to execute API %2:100
+AAI_3102=5:1:WARN:3102:400:3102:Error parsing input performing %1 on %2:300
+AAI_3300=5:1:WARN:3300:403:3300:Unauthorized:100
+AAI_3301=5:1:WARN:3301:401:3301:Stale credentials:100
+AAI_3302=5:1:WARN:3302:401:3301:Not authenticated:100
+AAI_3303=5:1:WARN:3303:403:3300:Too many objects would be returned by this request, please refine your request and retry:500
+
+#--- aaigen: 4000-4099
+AAI_4000=5:4:ERROR:4000:500:3002:Internal Error:500
+AAI_4001=5:4:FATAL:4001:500:3002:Configuration file not found:500
+AAI_4002=5:4:FATAL:4002:500:3002:Error reading Configuration file:500
+AAI_4003=5:4:ERROR:4003:500:3002:Error writing to log file:500
+AAI_4004=5:4:FATAL:4004:500:3002:Error reading/parsing the error properties file:500
+AAI_4005=5:4:FATAL:4005:500:3002:Missing or invalid configuration parameter:500
+AAI_4006=5:4:FATAL:4006:500:3002:Unexpected error in service:500
+AAI_4007=5:4:WARN:4007:500:3102:Input parsing error:500
+AAI_4008=5:4:ERROR:4008:500:3002:Output parsing error:500
+AAI_4009=4:0:WARN:4009:400:3000:Invalid X-FromAppId in header:300
+AAI_4010=4:0:WARN:4010:400:3000:Invalid X-TransactionId in header:300
+AAI_4011=5:4:ERROR:4011:500:3002:Missing data for REST error response:500
+AAI_4014=4:0:WARN:4014:400:3000:Invalid Accept header:300
+AAI_4015=4:0:WARN:4015:400:3000:You must provide at least one indexed property:400
+AAI_4016=4:0:WARN:4016:400:3000:The depth parameter must be a number or the string "all":300
+AAI_4017=5:2:INFO:4017:400:3000:Could not set property:300
+AAI_4018=5:2:WARN:4018:400:3000:Unable to convert the string to integer:300
+AAI_4019=5:4:ERROR:4018:400:3000:Invalid start time sent to history formats:300
+AAI_4020=5:4:ERROR:4020:400:3002:Unexpected data type for property key:400
+
+#--- aaidbmap: 5102-5199
+AAI_5102=5:4:FATAL:5102:500:3002:Graph database is null after open:400
+AAI_5105=5:4:ERROR:5105:500:3002:Unexpected error reading/updating database:300
+AAI_5106=5:4:WARN:5106:404:3001:Node not found:300
+AAI_5107=5:2:WARN:5107:400:3000:Required information missing:300
+AAI_5108=5:2:WARN:5108:200:0:Unexpected information in request being ignored:300
+
+#--- aaidbgen: 6101-6199
+AAI_6101=5:4:ERROR:6101:500:3002:null JanusGraph object passed:400
+AAI_6102=5:4:WARN:6102:400:3000:Passed-in property is not valid for this nodeType:400
+AAI_6103=5:4:WARN:6103:400:3000:Required Node-property not found in input data:400
+AAI_6104=5:4:WARN:6104:400:3000:Required Node-property was passed with no data:400
+AAI_6105=5:4:WARN:6105:400:3000:Node-Key-Property not defined in DbMaps:400
+AAI_6106=5:4:WARN:6106:400:3000:Passed-in property is not valid for this edgeType:400
+AAI_6107=5:4:WARN:6107:400:3000:Required Edge-property not found in input data:400
+AAI_6108=5:4:WARN:6108:400:3000:Required Edge-property was passed with no data:400
+AAI_6109=5:4:WARN:6109:400:3000:Bad dependent Node value:400
+AAI_6110=5:4:ERROR:6110:400:3100:Node cannot be deleted:500
+AAI_6111=5:4:WARN:6111:400:3000:JSON processing error:300
+AAI_6112=5:4:ERROR:6112:400:3000:More than one node found by getUniqueNode():400
+AAI_6114=5:4:WARN:6114:404:3001:Node Not Found:300
+AAI_6115=5:4:ERROR:6115:400:3000:Unrecognized NodeType:400
+AAI_6116=5:4:ERROR:6116:400:3000:Unrecognized Property:400
+AAI_6117=5:4:ERROR:6117:400:3000:Uniqueness constraint violated:400
+AAI_6118=5:4:WARN:6118:400:3000:Required Field not passed.:400
+AAI_6120=5:4:WARN:6120:400:3000:Bad Parameter Passed:300
+AAI_6121=5:4:ERROR:6121:400:3000:Problem with internal AAI reference data:400
+AAI_6122=5:4:ERROR:6122:400:3000:Data Set not complete in DB for this request:400
+AAI_6123=5:4:ERROR:6123:500:3000:Bad Data found by DataGrooming Tool - Investigate:300
+AAI_6124=5:4:ERROR:6124:500:3000:File read/write error:500
+AAI_6125=5:4:WARN:6125:500:3000:Problem Pulling Data Set:500
+AAI_6126=5:4:ERROR:6126:400:3000:Edge cannot be deleted:400
+AAI_6127=5:4:INFO:6127:404:3001:Edge Not Found:400
+AAI_6128=5:4:INFO:6128:500:3000:Unexpected error:900
+AAI_6129=5:4:INFO:6129:404:3003:Error making edge to target node:400
+AAI_6130=5:4:WARN:6130:412:3000:Precondition Required:300
+AAI_6131=5:4:WARN:6131:412:3000:Precondition Failed:300
+AAI_6132=5:4:WARN:6132:400:3000:Bad Model Definition:500
+AAI_6133=5:4:WARN:6133:400:3000:Bad Named Query Definition:500
+AAI_6134=5:4:ERROR:6134:500:6134:Could not persist transaction to storage back end. Exhausted retry amount:500
+AAI_6135=5:4:WARN:6135:412:3000:Resource version specified on create:300
+AAI_6136=5:4:ERROR:6136:400:3000:Object cannot hold multiple items:400
+AAI_6137=5:4:ERROR:6137:400:3000:Cannot perform writes on multiple vertices:400
+AAI_6138=5:4:ERROR:6138:400:3000:Cannot delete multiple vertices:400
+AAI_6139=5:4:ERROR:6139:404:3000:Attempted to add edge to vertex that does not exist:400
+AAI_6140=5:4:ERROR:6140:400:3000:Edge multiplicity violated:400
+AAI_6141=5:4:WARN:6141:400:3000:Please Refine Query:400
+AAI_6142=5:4:INFO:6142:400:3000:Retrying transaction:900
+AAI_6143=5:4:INFO:6143:400:3000:Ghost vertex found:400
+AAI_6144=5:4:WARN:6144:400:3000:Cycle found in graph:400
+AAI_6145=5:4:ERROR:6145:400:3000:Cannot create a nested/containment edge via relationship:400
+AAI_6146=5:4:ERROR:6146:400:3000:Ambiguous identity map found, use a URI instead:300
+AAI_6147=5:4:ERROR:6147:400:3000:Payload Limit Reached, reduce payload:300
+AAI_6148=5:4:INFO:6148:404:3001:Node Not Found. Start URI returned no vertexes, please check the start URI:400
+AAI_6149=5:4:INFO:6149:400:6149:DSL Query/Schema Error:400
+AAI_6150=5:4:INFO:6150:404:6150:Pagination Error:500
+AAI_6151=5:4:INFO:6151:400:6151:DSL Validation Error:500
+AAI_6152=5:4:INFO:6152:400:6152:DSL Generic Error:900
+AAI_6153=5:4:INFO:6153:400:6153:DSL Syntax Error:300
+AAI_6154=5:4:WARN:6134:500:3000:Delete Error:300
+
+#--- aaicsvp: 7101-7199
+AAI_7101=5:4:ERROR:7101:500:3002:Unexpected error in CSV file processing:900
+AAI_7102=5:4:ERROR:7102:500:3002:Error in cleanup temporary directory:500
+#AAI_7103=4:2:ERROR:7103:500:3002:Unsupported user:100
+AAI_7104=5:4:ERROR:7104:500:3002:Failed to create directory:500
+AAI_7105=5:4:ERROR:7105:500:3002:Temporary directory exists:500
+AAI_7106=5:4:ERROR:7106:500:3002:Cannot delete:500
+AAI_7107=5:4:ERROR:7107:500:3002:Input file does not exist:500
+AAI_7108=5:4:ERROR:7108:500:3002:Output file does not exist:500
+AAI_7109=5:4:ERROR:7109:500:3002:Error closing file:500
+AAI_7110=5:4:ERROR:7110:500:3002:Error loading/reading properties file:500
+AAI_7111=5:4:ERROR:7111:500:3002:Error executing shell script:900
+AAI_7112=5:4:ERROR:7112:500:3002:Error creating output file:500
+AAI_7113=5:4:ERROR:7113:500:3002:Trailer record error:300
+AAI_7114=5:4:ERROR:7114:500:3002:Input file error:300
+AAI_7115=5:4:ERROR:7115:500:3002:Unexpected error:900
+AAI_7116=5:4:ERROR:7116:500:3002:Request error:900
+AAI_7117=5:4:ERROR:7117:500:3002:Error in get http client object:500
+AAI_7118=5:4:ERROR:7118:500:3002:Script Error:900
+AAI_7119=5:4:ERROR:7119:500:3002:Unknown host:900
+
+#--- aaisdnc: 7201-7299
+AAI_7202=5:4:ERROR:7202:500:3002:Error getting connection to odl:200
+AAI_7203=5:4:ERROR:7203:500:3002:Unexpected error calling DataChangeNotification API:900
+AAI_7204=5:4:ERROR:7204:500:3002:Error returned by DataChangeNotification API:200
+#AAI_7206=5:4:ERROR:7206:500:3002:Invalid data returned from ODL:300
+
+#--- NotificationEvent, using UEB space
+AAI_7304=4:5:ERROR:7304:500:3002:Error reaching DMaaP to send event:200
+AAI_7350=5:4:ERROR:7305:500:3002:Notification event creation failed:500
+
+#--- aairestctlr: 7401-7499
+AAI_7401=5:4:ERROR:7401:500:3002:Error connecting to AAI REST API:200
+AAI_7402=5:4:ERROR:7402:500:3002:Unexpected error:900
+AAI_7403=5:4:WARN:7403:400:3001:Request error:900
+AAI_7404=5:4:INFO:7404:404:3001:Node not found:300
+AAI_7405=5:4:WARN:7405:200:0:UUID not formatted correctly, generating UUID:300
+AAI_7406=5:4:ERROR:7406:400:7406:Request Timed Out:200
+
+#--- aaicsiovals: 7501-7599
+#AAI_7501=5:4:WARN:7501:500:3002:Error getting connection to CSI-OVALS:200
+AAI_7502=5:4:WARN:7502:500:3002:Bad parameter when trying to build request for CSI-OVALS:300
+AAI_7503=5:4:WARN:7503:500:3002:Error returned by CSI-OVALS:500
+
+#--- aaiauth: 9101-9199
+AAI_9101=5:0:WARN:9101:403:3300:User is not authorized to perform function:100
+#AAI_9102=5:0:WARN:9102:401:3301:Refresh credentials from source
+#AAI_9103=5:0:WARN:9103:403:3300:User not found
+#AAI_9104=5:0:WARN:9104:401:3302:Authentication error
+#AAI_9105=5:0:WARN:9105:403:3300:Authorization error
+#AAI_9106=5:0:WARN:9106:403:3300:Invalid AppId
+#AAI_9107=5:0:WARN:9107:403:3300:No Username in Request
+AAI_9107=5:0:WARN:9107:403:3300:SSL is not provided in request, please contact admin:100
+
+#--- aaiinstar: 9201-9299
+#AAI_9201=5:4:ERROR:9201:500:3002:Unable to send notification
+AAI_9202=5:4:ERROR:9202:500:3002:Unable to start a thread:500
+#--- GRM DME2: 9501-9599
+AAI_9501=5:4:WARN:9501:500:3002:Unable to register with GRM retrying:200
+AAI_9502=5:4:ERROR:9502:500:3002:Unable to register with GRM after exhausting all retries:200
+AAI_9503=5:4:WARN:9503:500:3002:Unable to successfully unpublish with GRM, recommend manual cleanup but not necessary:200