Update the ajsc to use 2.1.0 for all dependencies 01/4401/1
authorVenkata Harish K Kajur <vk250x@att.com>
Mon, 22 May 2017 15:53:58 +0000 (11:53 -0400)
committerVenkata Harish K Kajur <vk250x@att.com>
Mon, 22 May 2017 15:54:47 +0000 (11:54 -0400)
Add the named query jsons that was rejected due to another problem
Update the necessary files to make it compatible with ajsc 2.1.0

Change-Id: I4f26e21ef69edff1003a21ead849d10c9cbb8e3a
Signed-off-by: Venkata Harish K Kajur <vk250x@att.com>
15 files changed:
aai-traversal/ajsc-shared-config/etc/logback.xml
aai-traversal/bundleconfig-local/etc/appprops/PostProcessorInterceptors.properties
aai-traversal/bundleconfig-local/etc/appprops/PreProcessorInterceptors.properties
aai-traversal/bundleconfig-local/etc/appprops/aaiconfig.properties
aai-traversal/bundleconfig-local/etc/scriptdata/named-query-json/closed-loop-named-query-1.0.json [new file with mode: 0644]
aai-traversal/bundleconfig-local/etc/scriptdata/named-query-json/getServiceInstanceModel-1.0.json [new file with mode: 0644]
aai-traversal/bundleconfig-local/etc/scriptdata/named-query-json/getVserver-1.0.json [new file with mode: 0644]
aai-traversal/pom.xml
aai-traversal/src/main/java/org/openecomp/aai/ajsc_aai/JaxrsErrorMessageLookupService.java
aai-traversal/src/main/java/org/openecomp/aai/dbgraphgen/ModelBasedProcessing.java
aai-traversal/src/main/java/org/openecomp/aai/util/AAIAppServletContextListener.java
aai-traversal/src/main/resources/docker/Dockerfile
aai-traversal/src/main/resources/docker/docker-entrypoint.sh
aai-traversal/src/test/resources/logback.xml
pom.xml

index 3311342..8d9e5b5 100644 (file)
                        <pattern>"%d [%thread] %-5level %logger{1024} - %msg%n"</pattern>
                </encoder>
        </appender>
-       <if condition='property("JMS_BROKER").contains("WMQ")'>
-               <then>
-                       <appender name="Audit-Record-Queue" class="ajsc.JMSQueueAppender">
-                               <param name="InitialContextFactoryName" value="${JMS_WMQ_INITIAL_CONNECTION_FACTORY_NAME}" />
-                               <param name="ProviderURL" value="${JMS_WMQ_PROVIDER_URL}" />
-                               <param name="DestinationName" value="${JMS_WMQ_AUDIT_DESTINATION_NAME}" />
-                               <param name="ConnectionFactoryName" value="${JMS_WMQ_CONNECTION_FACTORY_NAME}" />
-                       </appender>
-                       <appender name="Performance-Tracker-Queue" class="ajsc.JMSQueueAppender">
-                               <param name="InitialContextFactoryName" value="${JMS_WMQ_INITIAL_CONNECTION_FACTORY_NAME}" />
-                               <param name="ProviderURL" value="${JMS_WMQ_PROVIDER_URL}" />
-                               <param name="DestinationName" value="${JMS_WMQ_PERF_DESTINATION_NAME}" />
-                               <param name="ConnectionFactoryName" value="${JMS_WMQ_CONNECTION_FACTORY_NAME}" />
-                       </appender>
-               </then>
-               <else>
-                       <!-- logback jms appenders definition starts here -->
-                       <appender name="Audit-Record-Queue" class="ajsc.JMSQueueAppender">
-                               <param name="InitialContextFactoryName"
-                                       value="com.tibco.tibjms.naming.TibjmsInitialContextFactory" />
-                               <param name="ProviderURL" value="${JMS_TIBCO_PROVIDER_URL}" />
-                               <param name="userName" value="${JMS_LOGGER_USER_NAME}" />
-                               <param name="password" value="${JMS_LOGGER_PASSWORD}" />
-                               <QueueBindingName>${JMS_LOGGER_AUDIT_QUEUE_BINDING}
-                               </QueueBindingName>
-                       </appender>
-                       <appender name="Performance-Tracker-Queue" class="ajsc.JMSQueueAppender">
-                               <param name="InitialContextFactoryName"
-                                       value="com.tibco.tibjms.naming.TibjmsInitialContextFactory" />
-                               <param name="ProviderURL" value="${JMS_TIBCO_PROVIDER_URL}" />
-                               <param name="userName" value="${JMS_LOGGER_USER_NAME}" />
-                               <param name="password" value="${JMS_LOGGER_PASSWORD}" />
-                               <QueueBindingName>${JMS_LOGGER_PERF_QUEUE_BINDING}
-                               </QueueBindingName>
-                       </appender>
-               </else>
-       </if>
        <appender name="ASYNC-audit" class="ch.qos.logback.classic.AsyncAppender">
                <queueSize>1000</queueSize>
                <includeCallerData>true</includeCallerData>
index f4fed40..29f5f7c 100644 (file)
@@ -1,3 +1,3 @@
 #This properties file is for defining any PostProcessorInterceptors that have been created for your AJSC service.
 
-/**=ajsc.beans.interceptors.CsiPostInterceptor,org.openecomp.aai.interceptors.PostAaiAjscInterceptor
+/**=org.openecomp.aai.interceptors.PostAaiAjscInterceptor
index a6dfe01..e803374 100644 (file)
@@ -1,3 +1,3 @@
 #This properties file is for defining any PreProcessorInterceptors that have been created for your AJSC service.
 
-/**=com.att.ajsc.csi.restmethodmap.RestMethodMapInterceptor,ajsc.beans.interceptors.CsiPreInterceptor,org.openecomp.aai.interceptors.PreAaiAjscInterceptor
+/**=com.att.ajsc.csi.restmethodmap.RestMethodMapInterceptor,org.openecomp.aai.interceptors.PreAaiAjscInterceptor
index a24c341..4cbbd38 100644 (file)
@@ -21,9 +21,13 @@ aai.transaction.logging=true
 aai.transaction.logging.get=true
 aai.transaction.logging.post=true
 
-aai.server.url.base=https://localhost:8446/aai/
-aai.server.url=https://localhost:8446/aai/v10/
-aai.global.callback.url=https://localhost:8446/aai/
+aai.tools.enableBasicAuth=true
+aai.tools.username=AAI
+aai.tools.password=AAI
+
+aai.server.url.base=https://localhost:8443/aai/
+aai.server.url=https://localhost:8443/aai/v10/
+aai.global.callback.url=https://localhost:8443/aai/
 
 aai.auth.cspcookies_on=false
 aai.dbmodel.filename=ex5.json
diff --git a/aai-traversal/bundleconfig-local/etc/scriptdata/named-query-json/closed-loop-named-query-1.0.json b/aai-traversal/bundleconfig-local/etc/scriptdata/named-query-json/closed-loop-named-query-1.0.json
new file mode 100644 (file)
index 0000000..c9b463e
--- /dev/null
@@ -0,0 +1,78 @@
+{
+   "named-query-uuid" : "4ff56a54-9e3f-46b7-a337-07a1d3c6b469",
+   "named-query-name" : "closed-loop-named-query",
+   "named-query-version" : "1.0",
+   "description" : "Named Query - For closed loop flow",
+   "named-query-elements" : {
+      "named-query-element" : [ {
+         "named-query-elements" : {
+            "named-query-element" : [ {
+               "named-query-elements" : {
+                  "named-query-element" : [ {
+                     "relationship-list" : {
+                        "relationship" : [ {
+                           "related-to" : "model",
+                           "relationship-data" : [ {
+                              "relationship-key" : "model.model-name-version-id",
+                              "relationship-value" : "2a160989-b202-47dd-874b-4a0f275998f7"
+                           } ]
+                        } ]
+                     }
+                  } ]
+               },
+               "relationship-list" : {
+                  "relationship" : [ {
+                     "related-to" : "model",
+                     "relationship-data" : [ {
+                        "relationship-key" : "model.model-name-version-id",
+                        "relationship-value" : "abcc54bc-bb74-49dc-9043-7f7171707545"
+                     } ]
+                  } ]
+               }
+            }, {
+               "named-query-elements" : {
+                  "named-query-element" : [ {
+                     "relationship-list" : {
+                        "relationship" : [ {
+                           "related-to" : "model",
+                           "relationship-data" : [ {
+                              "relationship-key" : "model.model-name-version-id",
+                              "relationship-value" : "c00563ae-812b-4e62-8330-7c4d0f47088a"
+                           } ]
+                        } ]
+                     }
+                  }, {
+                     "relationship-list" : {
+                        "relationship" : [ {
+                           "related-to" : "model",
+                           "relationship-data" : [ {
+                              "relationship-key" : "model.model-name-version-id",
+                              "relationship-value" : "46b92144-923a-4d20-b85a-3cbd847668a9"
+                           } ]
+                        } ]
+                     }
+                  } ]
+               },
+               "relationship-list" : {
+                  "relationship" : [ {
+                     "related-to" : "model",
+                     "relationship-data" : [ {
+                        "relationship-key" : "model.model-name-version-id",
+                        "relationship-value" : "93a6166f-b3d5-4f06-b4ba-aed48d009ad9"
+                     } ]
+                  } ]
+               }
+            } ]
+         },
+         "relationship-list" : {
+            "relationship" : [ {
+               "related-to" : "model",
+               "relationship-data" : [ {
+                  "relationship-key" : "model.model-name-version-id",
+                  "relationship-value" : "8ecb2c5d-7176-4317-a255-26274edfdd53"
+               } ]
+            } ]
+         }
+      } ]
+   }
+}
\ No newline at end of file
diff --git a/aai-traversal/bundleconfig-local/etc/scriptdata/named-query-json/getServiceInstanceModel-1.0.json b/aai-traversal/bundleconfig-local/etc/scriptdata/named-query-json/getServiceInstanceModel-1.0.json
new file mode 100644 (file)
index 0000000..aaee8d9
--- /dev/null
@@ -0,0 +1,72 @@
+{
+   "named-query-uuid" : "3fb4d3d3-36c1-4162-9fe9-3e2c68a9da81",
+   "named-query-name" : "getServiceInstanceModel-1.0",
+   "named-query-version" : "1.0",
+   "description" : "Named query - Get service instance model",
+   "named-query-elements" : {
+      "named-query-element" : [ {
+         "named-query-elements" : {
+            "named-query-element" : [ {
+               "named-query-elements" : {
+                  "named-query-element" : [ {
+                     "related-lookups" : {
+                        "related-lookup" : [ {
+                           "source-node-type" : "vf-module",
+                           "source-node-property" : "persona-model-id",
+                           "target-node-type" : "model",
+                           "target-node-property" : "model-id",
+                           "property-collect-list" : [ "model-name-version-id", "model-type", "model-name", "model-id", "model-version" ]
+                        } ]
+                     },
+                     "relationship-list" : {
+                        "relationship" : [ {
+                           "related-to" : "model",
+                           "relationship-data" : [ {
+                              "relationship-key" : "model.model-name-version-id",
+                              "relationship-value" : "c00563ae-812b-4e62-8330-7c4d0f47088a"
+                           } ]
+                        } ]
+                     }
+                  } ]
+               },
+               "related-lookups" : {
+                  "related-lookup" : [ {
+                     "source-node-type" : "generic-vnf",
+                     "source-node-property" : "persona-model-id",
+                     "target-node-type" : "model",
+                     "target-node-property" : "model-id",
+                     "property-collect-list" : [ "model-name-version-id", "model-type", "model-name", "model-id", "model-version" ]
+                  } ]
+               },
+               "relationship-list" : {
+                  "relationship" : [ {
+                     "related-to" : "model",
+                     "relationship-data" : [ {
+                        "relationship-key" : "model.model-name-version-id",
+                        "relationship-value" : "93a6166f-b3d5-4f06-b4ba-aed48d009ad9"
+                     } ]
+                  } ]
+               }
+            } ]
+         },
+         "related-lookups" : {
+            "related-lookup" : [ {
+               "source-node-type" : "service-instance",
+               "source-node-property" : "persona-model-id",
+               "target-node-type" : "model",
+               "target-node-property" : "model-id",
+               "property-collect-list" : [ "model-name-version-id", "model-type", "model-name", "model-id", "model-version" ]
+            } ]
+         },
+         "relationship-list" : {
+            "relationship" : [ {
+               "related-to" : "model",
+               "relationship-data" : [ {
+                  "relationship-key" : "model.model-name-version-id",
+                  "relationship-value" : "46b92144-923a-4d20-b85a-3cbd847668a9"
+               } ]
+            } ]
+         }
+      } ]
+   }
+}
\ No newline at end of file
diff --git a/aai-traversal/bundleconfig-local/etc/scriptdata/named-query-json/getVserver-1.0.json b/aai-traversal/bundleconfig-local/etc/scriptdata/named-query-json/getVserver-1.0.json
new file mode 100644 (file)
index 0000000..624a4ec
--- /dev/null
@@ -0,0 +1,105 @@
+{
+   "named-query-uuid" : "f199cb88-5e69-4b1f-93e0-6f257877d066",
+   "named-query-name" : "getVserver-1.0",
+   "named-query-version" : "1.0",
+   "description" : "Named query - Get vserver",
+   "named-query-elements" : {
+      "named-query-element" : [ {
+         "named-query-elements" : {
+            "named-query-element" : [ {
+               "named-query-elements" : {
+                  "named-query-element" : [ {
+                     "relationship-list" : {
+                        "relationship" : [ {
+                           "related-to" : "model",
+                           "relationship-data" : [ {
+                              "relationship-key" : "model.model-name-version-id",
+                              "relationship-value" : "2a160989-b202-47dd-874b-4a0f275998f7"
+                           } ]
+                        } ]
+                     }
+                  } ]
+               },
+               "relationship-list" : {
+                  "relationship" : [ {
+                     "related-to" : "model",
+                     "relationship-data" : [ {
+                        "relationship-key" : "model.model-name-version-id",
+                        "relationship-value" : "abcc54bc-bb74-49dc-9043-7f7171707545"
+                     } ]
+                  } ]
+               }
+            }, {
+               "named-query-elements" : {
+                  "named-query-element" : [ {
+                     "related-lookups" : {
+                        "related-lookup" : [ {
+                           "source-node-type" : "vf-module",
+                           "source-node-property" : "persona-model-id",
+                           "target-node-type" : "model",
+                           "target-node-property" : "model-id",
+                           "property-collect-list" : [ "model-name-version-id", "model-type", "model-name", "model-id", "model-version" ]
+                        } ]
+                     },
+                     "relationship-list" : {
+                        "relationship" : [ {
+                           "related-to" : "model",
+                           "relationship-data" : [ {
+                              "relationship-key" : "model.model-name-version-id",
+                              "relationship-value" : "c00563ae-812b-4e62-8330-7c4d0f47088a"
+                           } ]
+                        } ]
+                     }
+                  }, {
+                     "related-lookups" : {
+                        "related-lookup" : [ {
+                           "source-node-type" : "service-instance",
+                           "source-node-property" : "persona-model-id",
+                           "target-node-type" : "model",
+                           "target-node-property" : "model-id",
+                           "property-collect-list" : [ "model-name-version-id", "model-type", "model-name", "model-id", "model-version" ]
+                        } ]
+                     },
+                     "relationship-list" : {
+                        "relationship" : [ {
+                           "related-to" : "model",
+                           "relationship-data" : [ {
+                              "relationship-key" : "model.model-name-version-id",
+                              "relationship-value" : "46b92144-923a-4d20-b85a-3cbd847668a9"
+                           } ]
+                        } ]
+                     }
+                  } ]
+               },
+               "related-lookups" : {
+                  "related-lookup" : [ {
+                     "source-node-type" : "generic-vnf",
+                     "source-node-property" : "persona-model-id",
+                     "target-node-type" : "model",
+                     "target-node-property" : "model-id",
+                     "property-collect-list" : [ "model-name-version-id", "model-type", "model-name", "model-id", "model-version" ]
+                  } ]
+               },
+               "relationship-list" : {
+                  "relationship" : [ {
+                     "related-to" : "model",
+                     "relationship-data" : [ {
+                        "relationship-key" : "model.model-name-version-id",
+                        "relationship-value" : "93a6166f-b3d5-4f06-b4ba-aed48d009ad9"
+                     } ]
+                  } ]
+               }
+            } ]
+         },
+         "relationship-list" : {
+            "relationship" : [ {
+               "related-to" : "model",
+               "relationship-data" : [ {
+                  "relationship-key" : "model.model-name-version-id",
+                  "relationship-value" : "8ecb2c5d-7176-4317-a255-26274edfdd53"
+               } ]
+            } ]
+         }
+      } ]
+   }
+}
\ No newline at end of file
index 1a8654b..68936cf 100644 (file)
        </distributionManagement>
        <dependencies>
                <dependency>
-                       <groupId>org.openecomp.aai</groupId>
+                       <groupId>org.onap.aai.aai-common</groupId>
                        <artifactId>aai-schema</artifactId>
                        <version>${aai-schema.version}</version>
                </dependency>
                <dependency>
-                       <groupId>org.openecomp.aai</groupId>
+                       <groupId>org.onap.aai.aai-common</groupId>
                        <artifactId>aai-core</artifactId>
                        <version>${aai-core.version}</version>
                </dependency>
                                        <configuration>
                                                <artifactItems>
                                                        <artifactItem>
-                                                               <groupId>org.openecomp.aai</groupId>
+                                                               <groupId>org.onap.aai.aai-common</groupId>
                                                                <artifactId>aai-schema</artifactId>
                                                                <version>${aai-schema.version}</version>
                                                                <outputDirectory>bundleconfig-local/etc</outputDirectory>
index ca78bac..04a7a09 100644 (file)
 
 package org.openecomp.aai.ajsc_aai;
 
-import java.util.HashMap;
-import java.util.Map;
+//import java.util.HashMap;
+//import java.util.Map;
 
-import javax.ws.rs.GET;
-import javax.ws.rs.HeaderParam;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
+//import javax.ws.rs.GET;
+//import javax.ws.rs.HeaderParam;
+//import javax.ws.rs.Path;
+//import javax.ws.rs.PathParam;
+//import javax.ws.rs.Produces;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.web.context.ContextLoader;
-import org.springframework.web.context.WebApplicationContext;
+//import org.slf4j.Logger;
+//import org.slf4j.LoggerFactory;
+//import org.springframework.web.context.ContextLoader;
+//import org.springframework.web.context.WebApplicationContext;
 
-import ajsc.ErrorMessageLookupService;
+//import ajsc.ErrorMessageLookupService;
 
-@Path("/errormessage")
-public class JaxrsErrorMessageLookupService {
+//@Path("/errormessage")
+//public class JaxrsErrorMessageLookupService {
 
-       private final static Logger logger = LoggerFactory
-                       .getLogger(ErrorMessageLookupService.class);
+       //private final static Logger logger = LoggerFactory
+                       //.getLogger(ErrorMessageLookupService.class);
 
-       /**
-        * Gets the message.
-        *
-        * @param input the input
-        * @param errorCode the error code
-        * @param appId the app id
-        * @param operation the operation
-        * @param messageText the message text
-        * @param isRESTService the is REST service
-        * @param faultEntity the fault entity
-        * @param ConvID the conv ID
-        * @return the message
-        */
-       @GET
-       @Path("/emls")
-       @Produces("text/plain")
-       public String getMessage(@PathParam("input") String input,
-                       @HeaderParam("errorCode") String errorCode,
-                       @HeaderParam("appId") String appId,
-                       @HeaderParam("operation") String operation,
-                       @HeaderParam("messageText") String messageText,
-                       @HeaderParam("isRESTService") String isRESTService,
-                       @HeaderParam("faultEntity") String faultEntity,
-                       @HeaderParam("ConvID") String ConvID) {
+       //*
+        //Gets the message.
+       
+        //@param input the input
+        //@param errorCode the error code
+        //@param appId the app id
+        //@param operation the operation
+        //@param messageText the message text
+        //@param isRESTService the is REST service
+        //@param faultEntity the fault entity
+        //@param ConvID the conv ID
+        //@return the message
+       //@GET
+       //@Path("/emls")
+       //@Produces("text/plain")
+       //public String getMessage(@PathParam("input") String input,
+                       //@HeaderParam("errorCode") String errorCode,
+                       //@HeaderParam("appId") String appId,
+                       //@HeaderParam("operation") String operation,
+                       //@HeaderParam("messageText") String messageText,
+                       //@HeaderParam("isRESTService") String isRESTService,
+                       //@HeaderParam("faultEntity") String faultEntity,
+                       //@HeaderParam("ConvID") String ConvID) {
 
-               Map<String, String> headers = new HashMap<String, String>();
-               headers.put(errorCode, errorCode);
-               headers.put(appId, appId);
-               headers.put(operation, operation);
-               headers.put(messageText, messageText);
-               headers.put(isRESTService, isRESTService);
-               headers.put(faultEntity, faultEntity);
-               headers.put(ConvID, ConvID);
+               //Map<String, String> headers = new HashMap<String, String>();
+               //headers.put(errorCode, errorCode);
+               //headers.put(appId, appId);
+               //headers.put(operation, operation);
+               //headers.put(messageText, messageText);
+               //headers.put(isRESTService, isRESTService);
+               //headers.put(faultEntity, faultEntity);
+               //headers.put(ConvID, ConvID);
                
-               WebApplicationContext applicationContext = ContextLoader
-                               .getCurrentWebApplicationContext();
+               //WebApplicationContext applicationContext = ContextLoader
+                               //.getCurrentWebApplicationContext();
 
-               ErrorMessageLookupService e = (ErrorMessageLookupService) applicationContext
-                               .getBean("errorMessageLookupService");
+               //ErrorMessageLookupService e = (ErrorMessageLookupService) applicationContext
+                               //.getBean("errorMessageLookupService");
 
-               String message = e.getExceptionDetails(appId, operation, errorCode,
-                               messageText,isRESTService, faultEntity, ConvID);
+               //String message = e.getExceptionDetails(appId, operation, errorCode,
+                               //messageText,isRESTService, faultEntity, ConvID);
 
-               System.out.println("Error code = " + errorCode);
-               System.out.println("appId = " + appId);
-               System.out.println("operation = " + operation);
-               System.out.println("messageText = " + messageText);
-               System.out.println("isRESTService = " + isRESTService);
-               System.out.println("faultEntity = " + faultEntity);
-               System.out.println("ConvID = " + ConvID);
-               return "The exception message is:\n " + message;
-       }
+               //System.out.println("Error code = " + errorCode);
+               //System.out.println("appId = " + appId);
+               //System.out.println("operation = " + operation);
+               //System.out.println("messageText = " + messageText);
+               //System.out.println("isRESTService = " + isRESTService);
+               //System.out.println("faultEntity = " + faultEntity);
+               //System.out.println("ConvID = " + ConvID);
+               //return "The exception message is:\n " + message;
+       //}
+
+//}
 
-}
index f51e67b..6d9a277 100644 (file)
@@ -2140,7 +2140,7 @@ public class ModelBasedProcessing{
          //     processing for how we join to that model and will not try to go any "deeper".
          List<String> linkagePtList = new ArrayList<>();
          Iterator <VertexProperty<Object>> vpI = thisLevelElemVtx.properties("linkage-points");
-         //DEBUG -- AAI-8002 
+
          // I am not sure why, but since "linkage-points" is an xml-element-wrapper in the OXM definition, 
          // we get back the whole array of Strings in one String - but still use the "vtx.properties()" to
          // get it - but only look at the first thing returned by the iterator.
@@ -2505,7 +2505,7 @@ public class ModelBasedProcessing{
                          
                          List<String> linkagePtList = new ArrayList <String>();
                          Iterator <VertexProperty<Object>> vpI = elVert.properties("linkage-points");
-                         //DEBUG -- AAI-8002 
                          // I am not sure why, but since "linkage-points" is an xml-element-wrapper in the OXM definition, 
                          // we get back the whole array of Strings in one String - but still use the "vtx.properties()" to
                          // get it - but only look at the first thing returned by the iterator.
@@ -2624,7 +2624,7 @@ public class ModelBasedProcessing{
          //      but that after that, we connect to a p-interface followed by a pserver.
          // It might have been more clear to define it in the other direction, but for now, that is it. (16-07)
          String linkagePointStr = linkagePointStrVal;
-         // --- DEBUG For AAI-8002 
+        
          // We are getting these with more than linkage thing in one string.  
          //   Ie. "pserver|lag-interface|l-interface, pserver|p-interface|l-interface, vlan|l-interface"
          linkagePointStr = linkagePointStr.replace("[",  "");
index 97b7edb..8c5a4aa 100644 (file)
@@ -25,7 +25,7 @@ import java.io.IOException;
 import javax.servlet.ServletContextEvent;
 import javax.servlet.ServletContextListener;
 
-import org.apache.activemq.broker.BrokerService;
+//import org.apache.activemq.broker.BrokerService;
 
 import org.openecomp.aai.dbmap.AAIGraph;
 import org.openecomp.aai.exceptions.AAIException;
@@ -38,7 +38,7 @@ public class AAIAppServletContextListener implements ServletContextListener {
 
        private static final EELFLogger LOGGER = EELFManager.getInstance().getLogger(AAIAppServletContextListener.class.getName());     
        
-       private BrokerService broker = new BrokerService();
+       //private BrokerService broker = new BrokerService();
 
        /**
         * Destroys Context
@@ -50,12 +50,12 @@ public class AAIAppServletContextListener implements ServletContextListener {
                AAIGraph.getInstance().graphShutdown();
                LOGGER.info("AAIGraph shutdown");
 
-               try {
-                       broker.stop();
-               } catch (Exception e) {
-                       // TODO Auto-generated catch block
-                       e.printStackTrace();
-               }
+               //try {
+                       ////broker.stop();
+               //} catch (Exception e) {
+                       //// TODO Auto-generated catch block
+                       //e.printStackTrace();
+               //}
        }
 
        /**
@@ -80,25 +80,25 @@ public class AAIAppServletContextListener implements ServletContextListener {
                        ModelInjestor.getInstance();
 
                        // Jsm internal broker for aai events
-                       broker = new BrokerService();
-                       broker.addConnector("tcp://localhost:61446");
-                       broker.setPersistent(false);
-                       broker.setUseJmx(false);
-                       broker.setSchedulerSupport(false);
-                       broker.start();
-
-                       LOGGER.info("A&AI Server initialization succcessful.");
+                       //broker = new BrokerService();
+                       //broker.addConnector("tcp://localhost:61446");
+                       //broker.setPersistent(false);
+                       //broker.setUseJmx(false);
+                       //broker.setSchedulerSupport(false);
+                       //broker.start();
+
+                       LOGGER.info("AAI Server initialization succcessful.");
                        System.setProperty("org.openecomp.aai.serverStarted", "true");
 
                } catch (AAIException e) {
                        ErrorLogHelper.logException(e);
-                       throw new RuntimeException("AAIException caught while initializing A&AI server", e);
+                       throw new RuntimeException("AAIException caught while initializing AAI server", e);
                } catch (IOException e) {
                        ErrorLogHelper.logError("AAI_4000", e.getMessage());
-                       throw new RuntimeException("IOException caught while initializing A&AI server", e);
+                       throw new RuntimeException("IOException caught while initializing AAI server", e);
                } catch (Exception e) {
-                       LOGGER.error("Unknown failure while initializing A&AI Server", e);
-                       throw new RuntimeException("Unknown failure while initializing A&AI server", e);
+                       LOGGER.error("Unknown failure while initializing AAI Server", e);
+                       throw new RuntimeException("Unknown failure while initializing AAI server", e);
                }
        }
 }
index 66cf412..ef0854e 100644 (file)
@@ -20,7 +20,7 @@ ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
 RUN if [ ! -z ${HTTP_PROXY} ]; then echo "Acquire::http::proxy  \"${HTTP_PROXY}\";" >> /etc/apt/apt.conf; fi && \
     if [ ! -z ${HTTP_PROXY} ]; then echo "Acquire::https::proxy \"${HTTP_PROXY}\";" >> /etc/apt/apt.conf; fi && \
     apt-get update && \
-    apt-get install -y software-properties-common && \
+    apt-get install -y software-properties-common uuid-runtime && \
     apt-get install --reinstall ca-certificates && \
     sudo -E add-apt-repository ppa:openjdk-r/ppa && \
     apt-get update && \
index d776343..0f14860 100644 (file)
 # ============LICENSE_END=========================================================
 ###
 
-cd /opt/app/aai-traversal;
+cd /var/chef;
 
-TITAN_CACHED="/opt/app/aai-traversal/bundleconfig/etc/appprops/titan-cached.properties";
-TITAN_REALTIME="/opt/app/aai-traversal/bundleconfig/etc/appprops/titan-realtime.properties";
-SERVER_HOST=${SERVER_HOST:-localhost};
-SERVER_TABLE=${SERVER_TABLE:-aaigraph-dev02};
+CHEF_CONFIG_REPO=${CHEF_CONFIG_REPO:-aai-config};
 
-sed -i 's/^storage.backend=inmemory/storage.backend=hbase/g' $TITAN_CACHED $TITAN_REALTIME;
-sed -i "s/^storage.hostname=.*$/storage.hostname=${SERVER_HOST}/g" $TITAN_CACHED $TITAN_REALTIME;
-sed -i "s/^storage.hbase.table=.*$/storage.hbase.table=${SERVER_TABLE}/g" $TITAN_CACHED $TITAN_REALTIME;
+CHEF_GIT_URL=${CHEF_GIT_URL:-http://nexus.onap.org/r/aai};
 
-/opt/app/aai-traversal/bin/createDBSchema.sh;
+CHEF_CONFIG_GIT_URL=${CHEF_CONFIG_GIT_URL:-$CHEF_GIT_URL};
+CHEF_DATA_GIT_URL=${CHEF_DATA_GIT_URL:-$CHEF_GIT_URL};
+
+if [ ! -d "aai-config" ]; then
+
+    git clone --depth 1 -b ${CHEF_BRANCH} --single-branch ${CHEF_CONFIG_GIT_URL}/${CHEF_CONFIG_REPO}.git aai-config || {
+       echo "Error: Unable to clone the aai-config repo with url: ${CHEF_GIT_URL}/${CHEF_CONFIG_REPO}.git";
+       exit;
+    }
+    
+    (cd aai-config/cookbooks/${project.artifactId}/ && \
+       for f in $(ls); do mv $f ../; done && \
+       cd ../ && rmdir ${project.artifactId});
+fi
+
+if [ ! -d "aai-data" ]; then
+
+    git clone --depth 1 -b ${CHEF_BRANCH} --single-branch ${CHEF_DATA_GIT_URL}/aai-data.git aai-data || {
+       echo "Error: Unable to clone the aai-data repo with url: ${CHEF_GIT_URL}";
+       exit;
+    }
+
+fi
+
+chef-solo \
+      -c /var/chef/aai-data/chef-config/dev/.knife/solo.rb \
+      -j /var/chef/aai-config/cookbooks/runlist-${project.artifactId}.json \
+      -E ${AAI_CHEF_ENV};
 
 java -cp ${CLASSPATH}:/opt/app/commonLibs/*:/opt/app/aai-traversal/etc:/opt/app/aai-traversal/lib/*:/opt/app/aai-traversal/extJars/logback-access-1.1.7.jar:/opt/app/aai-traversal/extJars/logback-core-1.1.7.jar:/opt/app/aai-traversal/extJars/aai-core-${AAI_CORE_VERSION}.jar -server -XX:NewSize=512m -XX:MaxNewSize=512m -XX:SurvivorRatio=8 -XX:+DisableExplicitGC -verbose:gc -XX:+UseParNewGC -XX:+CMSParallelRemarkEnabled -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:-UseBiasedLocking -XX:ParallelGCThreads=4 -XX:LargePageSizeInBytes=128m -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Dsun.net.inetaddr.ttl=180 -XX:+HeapDumpOnOutOfMemoryError -Dhttps.protocols=TLSv1.1,TLSv1.2 -DSOACLOUD_SERVICE_VERSION=1.0.1 -DAJSC_HOME=/opt/app/aai-traversal/ -DAJSC_CONF_HOME=/opt/app/aai-traversal/bundleconfig -DAJSC_SHARED_CONFIG=/opt/app/aai-traversal/bundleconfig -DAFT_HOME=/opt/app/aai-traversal -DAAI_CORE_VERSION=${AAI_CORE_VERSION} -Daai-core.version=${AAI_CORE_VERSION} -Dlogback.configurationFile=/opt/app/aai-traversal/bundleconfig/etc/logback.xml -Xloggc:/opt/app/aai-traversal/logs/ajsc-jetty/gc/graph-query_gc.log com.att.ajsc.runner.Runner context=/ port=8086 sslport=8446
index 735e70d..042f052 100644 (file)
        <logger name="ch.qos.logback.classic" level="INFO" />
        <logger name="ch.qos.logback.core" level="INFO" />
 
-       <!-- logback jms appenders & loggers definition starts here -->
-
-       <if condition='property("JMS_BROKER").contains("WMQ")'>
-               <then>
-                       <appender name="Audit-Record-Queue" class="ajsc.JMSQueueAppender">
-                               <param name="InitialContextFactoryName" value="${JMS_WMQ_INITIAL_CONNECTION_FACTORY_NAME}" />
-                               <param name="ProviderURL" value="${JMS_WMQ_PROVIDER_URL}" />
-                               <param name="DestinationName" value="${JMS_WMQ_AUDIT_DESTINATION_NAME}" />
-                               <param name="ConnectionFactoryName" value="${JMS_WMQ_CONNECTION_FACTORY_NAME}" />
-                       </appender>
-                       <appender name="Performance-Tracker-Queue" class="ajsc.JMSQueueAppender">
-                               <param name="InitialContextFactoryName" value="${JMS_WMQ_INITIAL_CONNECTION_FACTORY_NAME}" />
-                               <param name="ProviderURL" value="${JMS_WMQ_PROVIDER_URL}" />
-                               <param name="DestinationName" value="${JMS_WMQ_PERF_DESTINATION_NAME}" />
-                               <param name="ConnectionFactoryName" value="${JMS_WMQ_CONNECTION_FACTORY_NAME}" />
-                       </appender>
-               </then>
-               <else> <!-- logback jms appenders definition starts here -->
-                       <appender name="Audit-Record-Queue" class="ajsc.JMSQueueAppender">
-                               <param name="InitialContextFactoryName"
-                                       value="com.tibco.tibjms.naming.TibjmsInitialContextFactory" />
-                               <param name="ProviderURL" value="${JMS_TIBCO_PROVIDER_URL}" />
-                               <param name="userName" value="${JMS_LOGGER_USER_NAME}" />
-                               <param name="password" value="${JMS_LOGGER_PASSWORD}" />
-                               <QueueBindingName>${JMS_LOGGER_AUDIT_QUEUE_BINDING}
-                               </QueueBindingName>
-                       </appender>
-                       <appender name="Performance-Tracker-Queue" class="ajsc.JMSQueueAppender">
-                               <param name="InitialContextFactoryName"
-                                       value="com.tibco.tibjms.naming.TibjmsInitialContextFactory" />
-                               <param name="ProviderURL" value="${JMS_TIBCO_PROVIDER_URL}" />
-                               <param name="userName" value="${JMS_LOGGER_USER_NAME}" />
-                               <param name="password" value="${JMS_LOGGER_PASSWORD}" />
-                               <QueueBindingName>${JMS_LOGGER_PERF_QUEUE_BINDING}
-                               </QueueBindingName>
-                       </appender>
-               </else>
-       </if>
-       
        <appender name="ASYNC-audit" class="ch.qos.logback.classic.AsyncAppender">
                <queueSize>1000</queueSize>
                <discardingThreshold>0</discardingThreshold>
diff --git a/pom.xml b/pom.xml
index a804bfd..e83f1f5 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
                <maven.compiler.source>1.8</maven.compiler.source>
                <module.ajsc.namespace.name>ActiveAndAvailableInventory-Traversal</module.ajsc.namespace.name>
                <module.ajsc.namespace.version>v1</module.ajsc.namespace.version>
-               <ajscRuntimeVersion>5.0.0-RC16.0.5</ajscRuntimeVersion>
+               <ajscRuntimeVersion>2.1.0</ajscRuntimeVersion>
                <aai-schema.version>1.1.0-SNAPSHOT</aai-schema.version>
                <aai.project.version>${project.version}</aai.project.version>