Use 1.15.3-SNAPSHOT of aai-common 31/139531/2
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>
Fri, 22 Nov 2024 12:32:19 +0000 (13:32 +0100)
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>
Mon, 25 Nov 2024 09:38:07 +0000 (10:38 +0100)
- upgrade spring-boot (2.6.15 -> 2.7.18)
- upgrade tinkerpop (3.7.1 -> 3.7.3)
- upgrade janusgraph (1.0.0 -> 1.0.1)
- remove eelf-core dependency
- remove aai logging-service dependency

Issue-ID: AAI-4068
Change-Id: I0e0abe69fdee064c5edd57d8098e8c16fc34a776
Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
21 files changed:
pom.xml
src/main/java/org/onap/aai/dataexport/DataExportTasks.java
src/main/java/org/onap/aai/datagrooming/DataGrooming.java
src/main/java/org/onap/aai/datasnapshot/DataSnapshot.java
src/main/java/org/onap/aai/datasnapshot/DataSnapshot4HistInit.java
src/main/java/org/onap/aai/dbgen/DupeTool.java
src/main/java/org/onap/aai/dbgen/ForceDeleteTool.java
src/main/java/org/onap/aai/dbgen/UpdatePropertyTool.java
src/main/java/org/onap/aai/dbgen/schemamod/SchemaMod.java
src/main/java/org/onap/aai/dbgen/schemamod/SchemaMod4Hist.java
src/main/java/org/onap/aai/historytruncate/HistoryTruncate.java
src/main/java/org/onap/aai/migration/MigrationControllerInternal.java
src/main/java/org/onap/aai/rest/client/ApertureServiceNoAuthClient.java
src/main/java/org/onap/aai/schema/GenTester.java
src/main/java/org/onap/aai/schema/GenTester4Hist.java
src/main/java/org/onap/aai/util/SendDeleteMigrationNotifications.java
src/main/java/org/onap/aai/util/SendMigrationNotifications.java
src/main/java/org/onap/aai/util/UniquePropertyCheck.java
src/main/resources/application.properties
src/test/java/org/onap/aai/migration/v13/MigrateInMaintDefaultToFalseTest.java
src/test/java/org/onap/aai/migration/v15/MigrateInMaintDefaultToFalseTest.java

diff --git a/pom.xml b/pom.xml
index 020d16f..6c25b3b 100755 (executable)
--- a/pom.xml
+++ b/pom.xml
     <parent>
         <groupId>org.onap.aai.aai-common</groupId>
         <artifactId>aai-parent</artifactId>
-        <version>1.15.2</version>
+        <version>1.15.3-SNAPSHOT</version>
     </parent>
     <groupId>org.onap.aai.graphadmin</groupId>
     <artifactId>aai-graphadmin</artifactId>
-    <version>1.15.2-SNAPSHOT</version>
+    <version>1.15.3-SNAPSHOT</version>
 
     <properties>
 
@@ -54,8 +54,8 @@
         <!-- This value should be overwritten at runtime to wherever need to be pushed to -->
         <docker.push.registry>localhost:5000</docker.push.registry>
         <aai.docker.version>1.0.0</aai.docker.version>
-        <aai.schema.service.version>1.12.5</aai.schema.service.version>
-        <aai.common.version>1.15.2</aai.common.version>
+        <aai.schema.service.version>1.12.6</aai.schema.service.version>
+        <aai.common.version>1.15.3-SNAPSHOT</aai.common.version>
         <aai.build.directory>${project.build.directory}/${project.artifactId}-${project.version}-build/
         </aai.build.directory>
         <aai.docker.namespace>onap</aai.docker.namespace>
@@ -97,7 +97,7 @@
         <schema.uri.base.path>/aai</schema.uri.base.path>
         <!-- End of Default ONAP Schema Properties -->
 
-        <micrometer.version>1.8.1</micrometer.version>
+        <!-- <micrometer.version>1.8.1</micrometer.version> -->
         <antlr.version>4.9.3</antlr.version>
         <jcommander.version>1.78</jcommander.version>
         <gremlin.version>3.7.1</gremlin.version>
             <version>1.18.30</version>
             <scope>provided</scope>
         </dependency>
-        <dependency>
-            <groupId>io.micrometer</groupId>
-            <artifactId>micrometer-core</artifactId>
-            <version>${micrometer.version}</version>
-        </dependency>
         <dependency>
             <groupId>io.micrometer</groupId>
             <artifactId>micrometer-registry-prometheus</artifactId>
-            <version>${micrometer.version}</version>
         </dependency>
         <dependency>
             <groupId>io.micrometer</groupId>
             <artifactId>micrometer-jersey2</artifactId>
-            <version>${micrometer.version}</version>
+            <version>1.8.13</version>
         </dependency>
         <!-- End of graphadmin metric collection dependencies -->
 
         </dependency>
 
         <!-- Start of Logback Dependencies -->
-        <dependency>
-            <groupId>com.att.eelf</groupId>
-            <artifactId>eelf-core</artifactId>
-        </dependency>
         <dependency>
             <groupId>ch.qos.logback</groupId>
             <artifactId>logback-core</artifactId>
         <dependency>
             <groupId>io.netty</groupId>
             <artifactId>netty-all</artifactId>
-            <version>${netty.version}</version>
         </dependency>
         <dependency>
             <groupId>io.netty</groupId>
             <artifactId>netty-handler</artifactId>
-            <version>${netty.handler.version}</version>
         </dependency>
         <!-- End of Netty Dependencies -->
         <!-- Only used for the WebTestClient -->
index 8d4ebb0..8386b18 100644 (file)
@@ -56,7 +56,6 @@ import org.springframework.context.annotation.PropertySource;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
-import com.att.eelf.configuration.Configuration;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.slf4j.MDC;
@@ -81,9 +80,6 @@ public class DataExportTasks {
 
        static {
                System.setProperty("aai.service.name", DataExportTasks.class.getSimpleName());
-               Properties props = System.getProperties();
-               props.setProperty(Configuration.PROPERTY_LOGGING_FILE_NAME, AAIConstants.AAI_LOGBACK_PROPS);
-               props.setProperty(Configuration.PROPERTY_LOGGING_FILE_PATH, AAIConstants.AAI_HOME_BUNDLECONFIG);
                LOGGER = LoggerFactory.getLogger(DataExportTasks.class);
        }
 
index de14ae6..796e491 100644 (file)
@@ -19,7 +19,6 @@
  */
 package org.onap.aai.datagrooming;
 
-import com.att.eelf.configuration.Configuration;
 import com.beust.jcommander.JCommander;
 import com.beust.jcommander.Parameter;
 import java.io.BufferedReader;
@@ -287,10 +286,6 @@ public class DataGrooming {
                // Set the logging file properties to be used by EELFManager
                System.setProperty("aai.service.name", DataGrooming.class.getSimpleName());
 
-               Properties props = System.getProperties();
-               props.setProperty(Configuration.PROPERTY_LOGGING_FILE_NAME, AAIConstants.AAI_LOGBACK_PROPS);
-               props.setProperty(Configuration.PROPERTY_LOGGING_FILE_PATH, AAIConstants.AAI_HOME_BUNDLECONFIG);
-
                AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
                PropertyPasswordConfiguration initializer = new PropertyPasswordConfiguration();
                initializer.initialize(ctx);
index 9feb6d7..3b9f7d4 100644 (file)
@@ -60,7 +60,6 @@ import org.onap.aai.util.GraphAdminDBUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.att.eelf.configuration.Configuration;
 import com.beust.jcommander.JCommander;
 import com.beust.jcommander.Parameter;
 import com.beust.jcommander.ParameterException;
@@ -118,9 +117,6 @@ public class DataSnapshot {
 
                // Set the logging file properties to be used by EELFManager
                System.setProperty("aai.service.name", DataSnapshot.class.getSimpleName());
-               Properties props = System.getProperties();
-               props.setProperty(Configuration.PROPERTY_LOGGING_FILE_NAME, AAIConstants.AAI_LOGBACK_PROPS);
-               props.setProperty(Configuration.PROPERTY_LOGGING_FILE_PATH, AAIConstants.AAI_HOME_BUNDLECONFIG);
                LOGGER = LoggerFactory.getLogger(DataSnapshot.class);
                cArgs = new CommandLineArgs();
 
index fa5c6e1..b143e71 100644 (file)
@@ -67,7 +67,6 @@ import org.onap.aai.util.FormatDate;
 import org.onap.aai.util.GraphAdminDBUtils;
 import org.springframework.context.annotation.AnnotationConfigApplicationContext;
 
-import com.att.eelf.configuration.Configuration;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import com.beust.jcommander.JCommander;
@@ -112,10 +111,6 @@ public class DataSnapshot4HistInit {
 
                // Set the logging file properties to be used by EELFManager
                System.setProperty("aai.service.name", DataSnapshot4HistInit.class.getSimpleName());
-               Properties props = System.getProperties();
-               props.setProperty(Configuration.PROPERTY_LOGGING_FILE_NAME, AAIConstants.AAI_LOGBACK_PROPS);
-               props.setProperty(Configuration.PROPERTY_LOGGING_FILE_PATH, AAIConstants.AAI_HOME_BUNDLECONFIG);
-
 
                AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
                PropertyPasswordConfiguration initializer = new PropertyPasswordConfiguration();
index f442eac..8dbe1c6 100644 (file)
@@ -19,7 +19,6 @@
  */
 package org.onap.aai.dbgen;
 
-import com.att.eelf.configuration.Configuration;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
@@ -462,10 +461,6 @@ public class DupeTool {
     public static void main(String[] args) throws AAIException {
 
         System.setProperty("aai.service.name", DupeTool.class.getSimpleName());
-        // Set the logging file properties to be used by EELFManager
-        Properties props = System.getProperties();
-        props.setProperty(Configuration.PROPERTY_LOGGING_FILE_NAME, "dupeTool-logback.xml");
-        props.setProperty(Configuration.PROPERTY_LOGGING_FILE_PATH, AAIConstants.AAI_HOME_BUNDLECONFIG);
         MDC.put("logFilenameAppender", DupeTool.class.getSimpleName());
 
 
index 451e344..b1b70f0 100644 (file)
@@ -44,7 +44,6 @@ import org.onap.aai.util.AAIConfig;
 import org.onap.aai.util.AAIConstants;
 import org.slf4j.MDC;
 
-import com.att.eelf.configuration.Configuration;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.janusgraph.core.JanusGraphFactory;
@@ -78,10 +77,6 @@ public class ForceDeleteTool {
                // the Terminal.
 
                System.setProperty("aai.service.name", ForceDelete.class.getSimpleName());
-               // Set the logging file properties to be used by EELFManager
-               Properties props = System.getProperties();
-               props.setProperty(Configuration.PROPERTY_LOGGING_FILE_NAME, AAIConstants.AAI_FORCE_DELETE_LOGBACK_PROPS);
-               props.setProperty(Configuration.PROPERTY_LOGGING_FILE_PATH, AAIConstants.AAI_HOME_BUNDLECONFIG);
                Logger logger = LoggerFactory.getLogger(ForceDeleteTool.class.getSimpleName());
                MDC.put("logFilenameAppender", ForceDeleteTool.class.getSimpleName());
 
index 9a6094b..bb1908c 100644 (file)
@@ -22,7 +22,6 @@ package org.onap.aai.dbgen;
 
 import org.janusgraph.core.JanusGraph;
 import org.onap.aai.util.AAIConstants;
-import com.att.eelf.configuration.Configuration;
 import org.slf4j.MDC;
 
 import java.util.Properties;
@@ -55,10 +54,6 @@ public class UpdatePropertyTool {
     public static void main(String[] args)
     {
         System.setProperty("aai.service.name", UpdatePropertyTool.class.getSimpleName());
-               // Set the logging file properties to be used by EELFManager
-               Properties props = System.getProperties();
-               props.setProperty(Configuration.PROPERTY_LOGGING_FILE_NAME, PROPERTY_LOGGING_FILE_NAME);
-               props.setProperty(Configuration.PROPERTY_LOGGING_FILE_PATH, AAIConstants.AAI_HOME_BUNDLECONFIG);
                MDC.put("logFilenameAppender", UpdatePropertyTool.class.getSimpleName());
 
 
@@ -76,4 +71,4 @@ public class UpdatePropertyTool {
 
         exit(EXIT_VM_STATUS_CODE);
     }
-}
\ No newline at end of file
+}
index 50d195f..4a2dcb6 100644 (file)
@@ -19,7 +19,6 @@
  */
 package org.onap.aai.dbgen.schemamod;
 
-import com.att.eelf.configuration.Configuration;
 import org.onap.aai.restclient.PropertyPasswordConfiguration;
 import org.onap.aai.exceptions.AAIException;
 import org.onap.aai.introspection.Loader;
@@ -174,10 +173,6 @@ public class SchemaMod {
 
        public static void main(String[] args) throws AAIException {
 
-               Properties props = System.getProperties();
-               props.setProperty(Configuration.PROPERTY_LOGGING_FILE_NAME, AAIConstants.AAI_SCHEMA_MOD_LOGBACK_PROPS);
-               props.setProperty(Configuration.PROPERTY_LOGGING_FILE_PATH, AAIConstants.AAI_HOME_BUNDLECONFIG);
-
                MDC.put("logFilenameAppender", SchemaMod.class.getSimpleName());
 
                AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
index eacdb13..bb8e653 100644 (file)
@@ -19,7 +19,6 @@
  */
 package org.onap.aai.dbgen.schemamod;
 
-import com.att.eelf.configuration.Configuration;
 import org.onap.aai.restclient.PropertyPasswordConfiguration;
 import org.onap.aai.exceptions.AAIException;
 import org.onap.aai.introspection.Loader;
@@ -57,11 +56,6 @@ public class SchemaMod4Hist {
 
        public void execute(String[] args) {
 
-               // Set the logging file properties to be used by EELFManager
-               Properties props = System.getProperties();
-               props.setProperty(Configuration.PROPERTY_LOGGING_FILE_NAME, AAIConstants.AAI_SCHEMA_MOD_LOGBACK_PROPS);
-               props.setProperty(Configuration.PROPERTY_LOGGING_FILE_PATH, AAIConstants.AAI_HOME_BUNDLECONFIG);
-
                Logger logger = LoggerFactory.getLogger(SchemaMod4Hist.class.getSimpleName());
                MDC.put("logFilenameAppender", SchemaMod4Hist.class.getSimpleName());
 
index b2a3c91..8796ec5 100644 (file)
@@ -39,7 +39,6 @@ import org.onap.aai.util.AAIConstants;
 import org.onap.aai.util.AAISystemExitUtil;
 import org.springframework.context.annotation.AnnotationConfigApplicationContext;
 
-import com.att.eelf.configuration.Configuration;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.janusgraph.core.JanusGraph;
@@ -74,12 +73,6 @@ public class HistoryTruncate {
         */
        public static void main(String[] args) {
 
-               // Set the logging file properties to be used by EELFManager
-               System.setProperty("aai.service.name", HistoryTruncate.class.getSimpleName());
-               Properties props = System.getProperties();
-               props.setProperty(Configuration.PROPERTY_LOGGING_FILE_NAME, AAIConstants.AAI_LOGBACK_PROPS);
-               props.setProperty(Configuration.PROPERTY_LOGGING_FILE_PATH, AAIConstants.AAI_HOME_BUNDLECONFIG);
-
                try (AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext()) {
                        try {
                                ctx.refresh();
index 7a170c3..47e7544 100644 (file)
@@ -20,7 +20,6 @@
 
 package org.onap.aai.migration;
 
-import com.att.eelf.configuration.Configuration;
 import com.beust.jcommander.JCommander;
 import com.beust.jcommander.Parameter;
 import org.apache.commons.configuration2.ex.ConfigurationException;
@@ -97,10 +96,6 @@ public class MigrationControllerInternal {
        public void run(String[] args) {
                // Set the logging file properties to be used by EELFManager
                System.setProperty("aai.service.name", MigrationController.class.getSimpleName());
-               Properties props = System.getProperties();
-               props.setProperty(Configuration.PROPERTY_LOGGING_FILE_NAME, "migration-logback.xml");
-               props.setProperty(Configuration.PROPERTY_LOGGING_FILE_PATH, AAIConstants.AAI_HOME_ETC_APP_PROPERTIES);
-
                MDC.put("logFilenameAppender", MigrationController.class.getSimpleName());
         logger = LoggerFactory.getLogger(MigrationControllerInternal.class.getSimpleName());
 
index 778a821..703420e 100644 (file)
@@ -20,9 +20,9 @@
 
 package org.onap.aai.rest.client;
 
-import com.att.eelf.configuration.EELFLogger;
-import com.att.eelf.configuration.EELFManager;
 import org.onap.aai.restclient.NoAuthRestClient;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.http.HttpHeaders;
 import org.springframework.http.MediaType;
@@ -35,7 +35,7 @@ import java.util.UUID;
 
 public class ApertureServiceNoAuthClient extends NoAuthRestClient {
 
-    private static EELFLogger logger = EELFManager.getInstance().getLogger(ApertureServiceNoAuthClient.class);
+    private static Logger logger = LoggerFactory.getLogger(ApertureServiceNoAuthClient.class);
 
     @Value("${aperture.service.base.url}")
     private String baseUrl;
index 6674610..7fffd05 100644 (file)
@@ -19,7 +19,6 @@
  */
 package org.onap.aai.schema;
 
-import com.att.eelf.configuration.Configuration;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.janusgraph.core.EdgeLabel;
@@ -57,10 +56,7 @@ public class GenTester {
 
                JanusGraph graph = null;
                System.setProperty("aai.service.name", GenTester.class.getSimpleName());
-               // Set the logging file properties to be used by EELFManager
-               Properties props = System.getProperties();
-               props.setProperty(Configuration.PROPERTY_LOGGING_FILE_NAME, AAIConstants.AAI_LOGBACK_PROPS);
-               props.setProperty(Configuration.PROPERTY_LOGGING_FILE_PATH, AAIConstants.AAI_HOME_BUNDLECONFIG);
+
                LOGGER = LoggerFactory.getLogger(GenTester.class);
                boolean addDefaultCR = true;
 
index 65dc35e..adfbe90 100644 (file)
@@ -19,7 +19,6 @@
  */
 package org.onap.aai.schema;
 
-import com.att.eelf.configuration.Configuration;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.janusgraph.core.JanusGraph;
@@ -50,10 +49,7 @@ public class GenTester4Hist {
 
                JanusGraph graph = null;
                System.setProperty("aai.service.name", GenTester4Hist.class.getSimpleName());
-               // Set the logging file properties to be used by EELFManager
-               Properties props = System.getProperties();
-               props.setProperty(Configuration.PROPERTY_LOGGING_FILE_NAME, AAIConstants.AAI_LOGBACK_PROPS);
-               props.setProperty(Configuration.PROPERTY_LOGGING_FILE_PATH, AAIConstants.AAI_HOME_BUNDLECONFIG);
+
                LOGGER = LoggerFactory.getLogger(GenTester4Hist.class);
                boolean addDefaultCR = false;  // For History, we do not add the default CloudRegion
 
index 6cb6ed6..0fd75dc 100644 (file)
@@ -19,7 +19,6 @@
  */
 package org.onap.aai.util;
 
-import com.att.eelf.configuration.Configuration;
 
 import org.onap.aai.config.SpringContextAware;
 import org.onap.aai.dbmap.AAIGraph;
@@ -72,9 +71,6 @@ public class SendDeleteMigrationNotifications {
 
        public SendDeleteMigrationNotifications(LoaderFactory loaderFactory, SchemaVersions schemaVersions, String config, String path, int sleepInMilliSecs, int numToBatch, String requestId, EventAction eventAction, String eventSource) {
                System.setProperty("aai.service.name", SendDeleteMigrationNotifications.class.getSimpleName());
-               Properties props = System.getProperties();
-               props.setProperty(Configuration.PROPERTY_LOGGING_FILE_NAME, "migration-logback.xml");
-               props.setProperty(Configuration.PROPERTY_LOGGING_FILE_PATH, AAIConstants.AAI_HOME_ETC_APP_PROPERTIES);
 
                MDC.put("logFilenameAppender", SendDeleteMigrationNotifications.class.getSimpleName());
 
index a66e491..a138402 100644 (file)
@@ -19,7 +19,6 @@
  */
 package org.onap.aai.util;
 
-import com.att.eelf.configuration.Configuration;
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
 import org.onap.aai.config.SpringContextAware;
@@ -74,9 +73,6 @@ public class SendMigrationNotifications {
 
        public SendMigrationNotifications(LoaderFactory loaderFactory, SchemaVersions schemaVersions, String config, String path, Set<String> notifyOn, int sleepInMilliSecs, int numToBatch, String requestId, EventAction eventAction, String eventSource) {
                System.setProperty("aai.service.name", SendMigrationNotifications.class.getSimpleName());
-               Properties props = System.getProperties();
-               props.setProperty(Configuration.PROPERTY_LOGGING_FILE_NAME, "migration-logback.xml");
-               props.setProperty(Configuration.PROPERTY_LOGGING_FILE_PATH, AAIConstants.AAI_HOME_ETC_APP_PROPERTIES);
 
                MDC.put("logFilenameAppender", SendMigrationNotifications.class.getSimpleName());
 
index 20432e6..8dfa706 100644 (file)
@@ -39,26 +39,20 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.slf4j.MDC;
 
-import com.att.eelf.configuration.Configuration;
-
 public class UniquePropertyCheck {
 
 
        private static  final  String    FROMAPPID = "AAI-UTILS";
        private static  final  String    TRANSID   = UUID.randomUUID().toString();
        private static  final  String    COMPONENT = "UniquePropertyCheck";
-       
+
        /**
         * The main method.
         *
         * @param args the arguments
         */
        public static void main(String[] args) {
-               
-               
-               Properties props = System.getProperties();
-               props.setProperty(Configuration.PROPERTY_LOGGING_FILE_NAME, AAIConstants.AAI_LOGBACK_PROPS);
-               props.setProperty(Configuration.PROPERTY_LOGGING_FILE_PATH, AAIConstants.AAI_HOME_BUNDLECONFIG);
+
                Logger logger = LoggerFactory.getLogger(UniquePropertyCheck.class);
                MDC.put("logFilenameAppender", UniquePropertyCheck.class.getSimpleName());
                AaiScheduledTaskAuditLog auditLog = new AaiScheduledTaskAuditLog();
@@ -72,7 +66,7 @@ public class UniquePropertyCheck {
                }
                String propertyName = args[0];
                Graph graph = null;
-               
+
                try(JanusGraph tGraph = JanusGraphFactory.open(new AAIGraphConfig.Builder(AAIConstants.REALTIME_DB_CONFIG).forService(UniquePropertyCheck.class.getSimpleName()).withGraphType("realtime").buildConfiguration())) {
                AAIConfig.init();
                System.out.println("    ---- NOTE --- about to open graph (takes a little while)--------\n");
@@ -81,7 +75,7 @@ public class UniquePropertyCheck {
                        logAndPrint(logger, " Error:  Could not get JanusGraph ");
                        System.exit(1);
                }
-               
+
                graph = tGraph.newTransaction();
                if( graph == null ){
                        logAndPrint(logger, "could not get graph object in UniquePropertyCheck() \n");
@@ -98,14 +92,14 @@ public class UniquePropertyCheck {
                        logAndPrint(logger, msg);
                        System.exit(0);
         }
-               
+
                runTheCheckForUniqueness( TRANSID, FROMAPPID, graph, propertyName, logger );
                auditLog.logAfter();
                System.exit(0);
-               
+
        }// End main()
-       
-       
+
+
        /**
         * Run the check for uniqueness.
         *
@@ -116,17 +110,17 @@ public class UniquePropertyCheck {
         * @param logger the logger
         * @return the boolean
         */
-       public static Boolean runTheCheckForUniqueness( String transId, String fromAppId, Graph graph, 
+       public static Boolean runTheCheckForUniqueness( String transId, String fromAppId, Graph graph,
                        String propertyName, Logger logger ){
-               
-               // Note - property can be found in more than one nodetype 
-               //    our uniqueness constraints are always across the entire db - so this 
+
+               // Note - property can be found in more than one nodetype
+               //    our uniqueness constraints are always across the entire db - so this
                //   tool looks across all nodeTypes that the property is found in.
                Boolean foundDupesFlag = false;
-               
+
                HashMap <String,String> valuesAndVidHash = new HashMap <> ();
                HashMap <String,String> dupeHash = new HashMap <> ();
-       
+
                int propCount = 0;
                int dupeCount = 0;
                Iterator<Vertex> vertItor = graph.traversal().V().has(propertyName);
@@ -151,10 +145,10 @@ public class UniquePropertyCheck {
                }
                else {
                        valuesAndVidHash.put(val.toString(), thisVid);
-               }               
+               }
                }
-               
-       
+
+
        String info = "\n Found this property [" + propertyName + "] " + propCount + " times in our db.";
        logAndPrint(logger, info);
        info = " Found " + dupeCount + " cases of duplicate values for this property.\n\n";
@@ -169,9 +163,9 @@ public class UniquePropertyCheck {
                                String dupeValue = pair.getKey().toString();
                                                        String vidsStr = pair.getValue().toString();
                                String[] vidArr = vidsStr.split("\\|");
-                               logAndPrint(logger, "\n\n -------------- Found " + vidArr.length 
+                               logAndPrint(logger, "\n\n -------------- Found " + vidArr.length
                                                + " nodes with " + propertyName + " of this value: [" + dupeValue + "].  Node details: ");
-                               
+
                                for( int i = 0; i < vidArr.length; i++ ){
                                        String vidString = vidArr[i];
                                        Long idLong = Long.valueOf(vidString);
@@ -183,14 +177,14 @@ public class UniquePropertyCheck {
        }
        catch( Exception e2 ){
                        logAndPrint(logger, "Threw Exception: [" + e2.toString() + "]");
-       } 
-       
-       
+       }
+
+
        return foundDupesFlag;
-       
+
        }// end of runTheCheckForUniqueness()
-       
-       
+
+
        /**
         * Show properties and edges.
         *
@@ -200,7 +194,7 @@ public class UniquePropertyCheck {
         * @param logger the logger
         */
        private static void showPropertiesAndEdges( String transId, String fromAppId, Vertex tVert,
-                       Logger logger ){ 
+                       Logger logger ){
 
                if( tVert == null ){
                        logAndPrint(logger, "Null node passed to showPropertiesAndEdges.");
@@ -214,16 +208,16 @@ public class UniquePropertyCheck {
                        else{
                                nodeType = ob.toString();
                        }
-                       
+
                        logAndPrint(logger, " AAINodeType/VtxID for this Node = [" + nodeType + "/" + tVert.id() + "]");
                        logAndPrint(logger, " Property Detail: ");
                        Iterator<VertexProperty<Object>> pI = tVert.properties();
                        while( pI.hasNext() ){
                                VertexProperty<Object> tp = pI.next();
                                Object val = tp.value();
-                               logAndPrint(logger, "Prop: [" + tp.key() + "], val = [" + val + "] ");          
+                               logAndPrint(logger, "Prop: [" + tp.key() + "], val = [" + val + "] ");
                        }
-                       
+
                        Iterator <Edge> eI = tVert.edges(Direction.BOTH);
                        if( ! eI.hasNext() ){
                                logAndPrint(logger, "No edges were found for this vertex. ");
@@ -249,7 +243,7 @@ public class UniquePropertyCheck {
                }
        } // End of showPropertiesAndEdges()
 
-       
+
        /**
         * Log and print.
         *
@@ -260,5 +254,5 @@ public class UniquePropertyCheck {
                System.out.println(msg);
                logger.info(msg);
        }
-       
-}
\ No newline at end of file
+
+}
index 0fda84d..d0a7d63 100644 (file)
@@ -111,3 +111,4 @@ aai.notifications.enabled=false
 
 BOOTSTRAP_SERVERS=localhost:9092
 JAAS_CONFIG=
+aai.graph.properties.path=${server.local.startpath}/etc/appprops/janusgraph-realtime.properties
index 9dc0dc1..eca979d 100644 (file)
@@ -23,17 +23,14 @@ import org.onap.aai.edges.EdgeIngestor;
 import org.onap.aai.serialization.db.EdgeSerializer;\r
 import org.onap.aai.serialization.engines.TransactionalGraphEngine;\r
 \r
-import com.att.eelf.configuration.EELFLogger;\r
-import com.att.eelf.configuration.EELFManager;\r
-\r
 import org.janusgraph.core.JanusGraph;\r
 import org.janusgraph.core.JanusGraphFactory;\r
 import org.janusgraph.core.JanusGraphTransaction;\r
 import org.janusgraph.core.schema.JanusGraphManagement;\r
-import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;\r
+import org.junit.jupiter.api.BeforeEach;\r
+import org.junit.jupiter.api.Test;\r
+\r
 import org.onap.aai.AAISetup;\r
 import org.onap.aai.dbmap.DBConnectionType;\r
 import org.onap.aai.introspection.Loader;\r
@@ -46,16 +43,16 @@ import org.onap.aai.migration.v13.MigrateInMaintDefaultToFalse;
 import org.onap.aai.migration.v13.MigrateInMaintDefaultToFalseTest.InMaintDefaultMigrator;\r
 import org.onap.aai.serialization.engines.QueryStyle;\r
 import org.onap.aai.serialization.engines.JanusGraphDBEngine;\r
-import org.onap.aai.serialization.engines.TransactionalGraphEngine;
-
-import static org.junit.jupiter.api.Assertions.assertTrue;
+import org.onap.aai.serialization.engines.TransactionalGraphEngine;\r
+\r
+import static org.junit.jupiter.api.Assertions.assertTrue;\r
 import static org.mockito.Mockito.spy;\r
 import static org.mockito.Mockito.when;\r
 \r
 import java.util.HashMap;\r
 import java.util.Map;\r
-import java.util.Optional;
-
+import java.util.Optional;\r
+\r
 public class MigrateInMaintDefaultToFalseTest extends\r
                AAISetup {\r
        protected static final String VNF_NODE_TYPE = "generic-vnf";\r
@@ -119,7 +116,7 @@ public class MigrateInMaintDefaultToFalseTest extends
         g.addV().property("aai-node-type", "generic-vnf")\r
                        .property("vnf-id", "generic-vnf3")\r
                        .property("in-maint", false)\r
-                       .next();        \r
+                       .next();\r
       //l-interface\r
         g.addV().property("aai-node-type", "l-interface")\r
                 .property("interface-name", "l-interface0")\r
@@ -135,7 +132,7 @@ public class MigrateInMaintDefaultToFalseTest extends
         g.addV().property("aai-node-type", "l-interface")\r
                        .property("interface-name", "l-interface3")\r
                        .property("in-maint", false)\r
-                       .next();         \r
+                       .next();\r
       //lag-interface\r
         g.addV().property("aai-node-type", "lag-interface")\r
                 .property("interface-name", "lag-interface0")\r
@@ -151,7 +148,7 @@ public class MigrateInMaintDefaultToFalseTest extends
         g.addV().property("aai-node-type", "lag-interface")\r
                        .property("interface-name", "lag-interface3")\r
                        .property("in-maint", false)\r
-                       .next();        \r
+                       .next();\r
       //logical-link\r
         g.addV().property("aai-node-type", "logical-link")\r
                 .property("link-name", "logical-link0")\r
@@ -167,7 +164,7 @@ public class MigrateInMaintDefaultToFalseTest extends
         g.addV().property("aai-node-type", "logical-link")\r
                        .property("link-name", "logical-link3")\r
                        .property("in-maint", false)\r
-                       .next();      \r
+                       .next();\r
       //p-interface\r
         g.addV().property("aai-node-type", "p-interface")\r
                 .property("interface-name", "p-interface0")\r
@@ -183,7 +180,7 @@ public class MigrateInMaintDefaultToFalseTest extends
         g.addV().property("aai-node-type", "p-interface")\r
                        .property("interface-name", "p-interface3")\r
                        .property("in-maint", false)\r
-                       .next();        \r
+                       .next();\r
       //pnf\r
         g.addV().property("aai-node-type", "pnf")\r
                 .property("pnf-name", "pnf0")\r
@@ -199,7 +196,7 @@ public class MigrateInMaintDefaultToFalseTest extends
         g.addV().property("aai-node-type", "pnf")\r
                        .property("pnf-name", "pnf3")\r
                        .property("in-maint", false)\r
-                       .next();        \r
+                       .next();\r
       //pserver\r
         g.addV().property("aai-node-type", "pserver")\r
                 .property("pserver-id", "pserver0")\r
@@ -215,7 +212,7 @@ public class MigrateInMaintDefaultToFalseTest extends
         g.addV().property("aai-node-type", "pserver")\r
                        .property("pserver-id", "pserver3")\r
                        .property("in-maint", false)\r
-                       .next();       \r
+                       .next();\r
       //vlan\r
         g.addV().property("aai-node-type", "vlan")\r
                 .property("vlan-interface", "vlan0")\r
@@ -276,7 +273,7 @@ public class MigrateInMaintDefaultToFalseTest extends
                 .property("nos-server-id", "nos-server1")\r
                                .property("nos-server-name", "nos-server-name1")\r
                                .property("vendor", "vendor1")\r
-                               .property("nos-server-selflink", "nos-server-selflink1")                                \r
+                               .property("nos-server-selflink", "nos-server-selflink1")\r
                 .property("in-maint", "")\r
                 .next();\r
         g.addV().property("aai-node-type", "nos-server")\r
@@ -293,7 +290,7 @@ public class MigrateInMaintDefaultToFalseTest extends
                                .property("nos-server-selflink", "nos-server-selflink3")\r
                        .property("in-maint", false)\r
                        .next();\r
-        \r
+\r
         TransactionalGraphEngine spy = spy(dbEngine);\r
         TransactionalGraphEngine.Admin adminSpy = spy(dbEngine.asAdmin());\r
         GraphTraversalSource traversal = g;\r
@@ -324,13 +321,13 @@ public class MigrateInMaintDefaultToFalseTest extends
         assertTrue(g.V().has("aai-node-type", "vnfc").has("vnfc-name", "vnfc0").has("in-maint", false).hasNext(),\r
                 "Value of vnfc should be updated since the property in-maint doesn't exist");\r
         assertTrue(g.V().has("aai-node-type", "vserver").has("vserver-id", "vserver0").has("in-maint", false).hasNext(),\r
-                "Value of vserver should be updated since the property in-maint doesn't exist");    \r
+                "Value of vserver should be updated since the property in-maint doesn't exist");\r
         assertTrue(g.V().has("aai-node-type", "nos-server").has("nos-server-id", "nos-server0").has("in-maint", false).hasNext(),\r
-                "Value of nos-server should be updated since the property in-maint doesn't exist"); \r
+                "Value of nos-server should be updated since the property in-maint doesn't exist");\r
     }\r
 \r
     @Test\r
-    public void testEmptyValue() {                \r
+    public void testEmptyValue() {\r
         assertTrue(g.V().has("aai-node-type", "generic-vnf").has("vnf-id", "generic-vnf1").has("in-maint", false).hasNext(),\r
                 "Value of generic-vnf should be updated since the value for in-maint is an empty string");\r
         assertTrue(g.V().has("aai-node-type", "l-interface").has("interface-name", "l-interface1").has("in-maint", false).hasNext(),\r
@@ -354,7 +351,7 @@ public class MigrateInMaintDefaultToFalseTest extends
         assertTrue(g.V().has("aai-node-type", "nos-server").has("nos-server-id", "nos-server1").has("in-maint", false).hasNext(),\r
                 "Value of nos-server should be updated since the value for in-maint is an empty string");\r
     }\r
-    \r
+\r
     @Test\r
     public void testExistingTrueValues() {\r
         assertTrue(g.V().has("aai-node-type", "generic-vnf").has("vnf-id", "generic-vnf2").has("in-maint", true).hasNext(),\r
@@ -380,7 +377,7 @@ public class MigrateInMaintDefaultToFalseTest extends
         assertTrue(g.V().has("aai-node-type", "nos-server").has("nos-server-id", "nos-server2").has("in-maint", true).hasNext(),\r
                 "Value of nos-server shouldn't be updated since in-maint already exists");\r
     }\r
-    \r
+\r
     @Test\r
     public void testExistingFalseValues() {\r
         assertTrue(g.V().has("aai-node-type", "generic-vnf").has("vnf-id", "generic-vnf3").has("in-maint", false).hasNext(),\r
@@ -406,4 +403,4 @@ public class MigrateInMaintDefaultToFalseTest extends
         assertTrue(g.V().has("aai-node-type", "nos-server").has("nos-server-id", "nos-server3").has("in-maint", false).hasNext(),\r
                 "Value of nos-server shouldn't be updated since in-maint already exists");\r
     }\r
-}
\ No newline at end of file
+}\r
index 97cc8b6..3a80d75 100644 (file)
@@ -23,17 +23,14 @@ import org.onap.aai.edges.EdgeIngestor;
 import org.onap.aai.serialization.db.EdgeSerializer;\r
 import org.onap.aai.serialization.engines.TransactionalGraphEngine;\r
 \r
-import com.att.eelf.configuration.EELFLogger;\r
-import com.att.eelf.configuration.EELFManager;\r
-\r
 import org.janusgraph.core.JanusGraph;\r
 import org.janusgraph.core.JanusGraphFactory;\r
 import org.janusgraph.core.JanusGraphTransaction;\r
 import org.janusgraph.core.schema.JanusGraphManagement;\r
-import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;\r
+import org.junit.jupiter.api.BeforeEach;\r
+import org.junit.jupiter.api.Test;\r
+\r
 import org.onap.aai.AAISetup;\r
 import org.onap.aai.dbmap.DBConnectionType;\r
 import org.onap.aai.introspection.Loader;\r
@@ -46,16 +43,16 @@ import org.onap.aai.migration.v15.MigrateInMaintDefaultToFalse;
 import org.onap.aai.migration.v15.MigrateInMaintDefaultToFalseTest.InMaintDefaultMigrator;\r
 import org.onap.aai.serialization.engines.QueryStyle;\r
 import org.onap.aai.serialization.engines.JanusGraphDBEngine;\r
-import org.onap.aai.serialization.engines.TransactionalGraphEngine;
-
-import static org.junit.jupiter.api.Assertions.assertTrue;
+import org.onap.aai.serialization.engines.TransactionalGraphEngine;\r
+\r
+import static org.junit.jupiter.api.Assertions.assertTrue;\r
 import static org.mockito.Mockito.spy;\r
 import static org.mockito.Mockito.when;\r
 \r
 import java.util.HashMap;\r
 import java.util.Map;\r
-import java.util.Optional;
-
+import java.util.Optional;\r
+\r
 public class MigrateInMaintDefaultToFalseTest extends\r
                AAISetup {\r
        protected static final String VNF_NODE_TYPE = "generic-vnf";\r
@@ -118,7 +115,7 @@ public class MigrateInMaintDefaultToFalseTest extends
         g.addV().property("aai-node-type", "generic-vnf")\r
                        .property("vnf-id", "generic-vnf3")\r
                        .property("in-maint", false)\r
-                       .next();        \r
+                       .next();\r
       //l-interface\r
         g.addV().property("aai-node-type", "l-interface")\r
                 .property("interface-name", "l-interface0")\r
@@ -134,7 +131,7 @@ public class MigrateInMaintDefaultToFalseTest extends
         g.addV().property("aai-node-type", "l-interface")\r
                        .property("interface-name", "l-interface3")\r
                        .property("in-maint", false)\r
-                       .next();         \r
+                       .next();\r
       //lag-interface\r
         g.addV().property("aai-node-type", "lag-interface")\r
                 .property("interface-name", "lag-interface0")\r
@@ -150,7 +147,7 @@ public class MigrateInMaintDefaultToFalseTest extends
         g.addV().property("aai-node-type", "lag-interface")\r
                        .property("interface-name", "lag-interface3")\r
                        .property("in-maint", false)\r
-                       .next();        \r
+                       .next();\r
       //logical-link\r
         g.addV().property("aai-node-type", "logical-link")\r
                 .property("link-name", "logical-link0")\r
@@ -166,7 +163,7 @@ public class MigrateInMaintDefaultToFalseTest extends
         g.addV().property("aai-node-type", "logical-link")\r
                        .property("link-name", "logical-link3")\r
                        .property("in-maint", false)\r
-                       .next();      \r
+                       .next();\r
       //p-interface\r
         g.addV().property("aai-node-type", "p-interface")\r
                 .property("interface-name", "p-interface0")\r
@@ -182,7 +179,7 @@ public class MigrateInMaintDefaultToFalseTest extends
         g.addV().property("aai-node-type", "p-interface")\r
                        .property("interface-name", "p-interface3")\r
                        .property("in-maint", false)\r
-                       .next();        \r
+                       .next();\r
       //pnf\r
         g.addV().property("aai-node-type", "pnf")\r
                 .property("pnf-name", "pnf0")\r
@@ -198,7 +195,7 @@ public class MigrateInMaintDefaultToFalseTest extends
         g.addV().property("aai-node-type", "pnf")\r
                        .property("pnf-name", "pnf3")\r
                        .property("in-maint", false)\r
-                       .next();        \r
+                       .next();\r
       //pserver\r
         g.addV().property("aai-node-type", "pserver")\r
                 .property("pserver-id", "pserver0")\r
@@ -214,7 +211,7 @@ public class MigrateInMaintDefaultToFalseTest extends
         g.addV().property("aai-node-type", "pserver")\r
                        .property("pserver-id", "pserver3")\r
                        .property("in-maint", false)\r
-                       .next();       \r
+                       .next();\r
       //vlan\r
         g.addV().property("aai-node-type", "vlan")\r
                 .property("vlan-interface", "vlan0")\r
@@ -275,7 +272,7 @@ public class MigrateInMaintDefaultToFalseTest extends
                 .property("nos-server-id", "nos-server1")\r
                                .property("nos-server-name", "nos-server-name1")\r
                                .property("vendor", "vendor1")\r
-                               .property("nos-server-selflink", "nos-server-selflink1")                                \r
+                               .property("nos-server-selflink", "nos-server-selflink1")\r
                 .property("in-maint", "")\r
                 .next();\r
         g.addV().property("aai-node-type", "nos-server")\r
@@ -292,7 +289,7 @@ public class MigrateInMaintDefaultToFalseTest extends
                                .property("nos-server-selflink", "nos-server-selflink3")\r
                        .property("in-maint", false)\r
                        .next();\r
-        \r
+\r
         TransactionalGraphEngine spy = spy(dbEngine);\r
         TransactionalGraphEngine.Admin adminSpy = spy(dbEngine.asAdmin());\r
         GraphTraversalSource traversal = g;\r
@@ -323,13 +320,13 @@ public class MigrateInMaintDefaultToFalseTest extends
         assertTrue(g.V().has("aai-node-type", "vnfc").has("vnfc-name", "vnfc0").has("in-maint", false).hasNext(),\r
                 "Value of vnfc should be updated since the property in-maint doesn't exist");\r
         assertTrue(g.V().has("aai-node-type", "vserver").has("vserver-id", "vserver0").has("in-maint", false).hasNext(),\r
-                "Value of vserver should be updated since the property in-maint doesn't exist");    \r
+                "Value of vserver should be updated since the property in-maint doesn't exist");\r
         assertTrue(g.V().has("aai-node-type", "nos-server").has("nos-server-id", "nos-server0").has("in-maint", false).hasNext(),\r
-                "Value of nos-server should be updated since the property in-maint doesn't exist"); \r
+                "Value of nos-server should be updated since the property in-maint doesn't exist");\r
     }\r
 \r
     @Test\r
-    public void testEmptyValue() {                \r
+    public void testEmptyValue() {\r
         assertTrue(g.V().has("aai-node-type", "generic-vnf").has("vnf-id", "generic-vnf1").has("in-maint", false).hasNext(),\r
                 "Value of generic-vnf should be updated since the value for in-maint is an empty string");\r
         assertTrue(g.V().has("aai-node-type", "l-interface").has("interface-name", "l-interface1").has("in-maint", false).hasNext(),\r
@@ -353,7 +350,7 @@ public class MigrateInMaintDefaultToFalseTest extends
         assertTrue(g.V().has("aai-node-type", "nos-server").has("nos-server-id", "nos-server1").has("in-maint", false).hasNext(),\r
                 "Value of nos-server should be updated since the value for in-maint is an empty string");\r
     }\r
-    \r
+\r
     @Test\r
     public void testExistingTrueValues() {\r
         assertTrue(g.V().has("aai-node-type", "generic-vnf").has("vnf-id", "generic-vnf2").has("in-maint", true).hasNext(),\r
@@ -379,7 +376,7 @@ public class MigrateInMaintDefaultToFalseTest extends
         assertTrue(g.V().has("aai-node-type", "nos-server").has("nos-server-id", "nos-server2").has("in-maint", true).hasNext(),\r
                 "Value of nos-server shouldn't be updated since in-maint already exists");\r
     }\r
-    \r
+\r
     @Test\r
     public void testExistingFalseValues() {\r
         assertTrue(g.V().has("aai-node-type", "generic-vnf").has("vnf-id", "generic-vnf3").has("in-maint", false).hasNext(),\r
@@ -405,4 +402,4 @@ public class MigrateInMaintDefaultToFalseTest extends
         assertTrue(g.V().has("aai-node-type", "nos-server").has("nos-server-id", "nos-server3").has("in-maint", false).hasNext(),\r
                 "Value of nos-server shouldn't be updated since in-maint already exists");\r
     }\r
-}
\ No newline at end of file
+}\r