diff options
author | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2024-11-22 08:43:36 +0100 |
---|---|---|
committer | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2024-11-22 09:04:36 +0100 |
commit | 18ae88b2ea07ad0ddf5eab283301dcfe520450a0 (patch) | |
tree | 4e74a6e9bdada41421f22b46a5a636a4b39a4048 | |
parent | 2735cda6386c21073aed1f52f336ce622c418def (diff) |
Use 1.15.3-SNAPSHOT of aai-common
- 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: I41a9956a4f8cf92ab05c284d1bbb8fa7106945c4
Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
9 files changed, 39 insertions, 68 deletions
diff --git a/aai-resources/pom.xml b/aai-resources/pom.xml index ddfc848..07c8729 100644 --- a/aai-resources/pom.xml +++ b/aai-resources/pom.xml @@ -28,7 +28,7 @@ <parent> <groupId>org.onap.aai.resources</groupId> <artifactId>resources</artifactId> - <version>1.15.2-SNAPSHOT</version> + <version>1.15.3-SNAPSHOT</version> </parent> <properties> <java.version>11</java.version> @@ -41,8 +41,6 @@ <docker.push.registry>localhost:5000</docker.push.registry> <aai.docker.version>1.0.0</aai.docker.version> - <netty.handler.version>4.1.63.Final</netty.handler.version> - <netty.version>4.1.63.Final</netty.version> <groovy.version>2.5.15</groovy.version> <!-- @@ -319,11 +317,7 @@ <dependency> <groupId>io.micrometer</groupId> <artifactId>micrometer-jersey2</artifactId> - </dependency> - <dependency> - <groupId>javax.jms</groupId> - <artifactId>javax.jms-api</artifactId> - <version>2.0.1</version> + <version>1.8.13</version> </dependency> <dependency> <groupId>javax.ws.rs</groupId> @@ -398,11 +392,6 @@ <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> </dependency> - <!-- eelf dependency --> - <dependency> - <groupId>com.att.eelf</groupId> - <artifactId>eelf-core</artifactId> - </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-core</artifactId> @@ -584,12 +573,10 @@ <dependency> <groupId>io.netty</groupId> <artifactId>netty-handler</artifactId> - <version>${netty.handler.version}</version> </dependency> <dependency> <groupId>io.netty</groupId> <artifactId>netty-all</artifactId> - <version>${netty.version}</version> </dependency> <!-- Only used for the WebTestClient --> diff --git a/aai-resources/src/main/java/org/onap/aai/TenantIsolation/DataImportTasks.java b/aai-resources/src/main/java/org/onap/aai/TenantIsolation/DataImportTasks.java index 098b715..bcbd824 100644 --- a/aai-resources/src/main/java/org/onap/aai/TenantIsolation/DataImportTasks.java +++ b/aai-resources/src/main/java/org/onap/aai/TenantIsolation/DataImportTasks.java @@ -20,8 +20,6 @@ package org.onap.aai.TenantIsolation; -import com.att.eelf.configuration.Configuration; - import java.io.BufferedReader; import java.io.File; import java.io.FileFilter; @@ -32,7 +30,6 @@ import java.text.SimpleDateFormat; import java.util.Arrays; import java.util.Date; import java.util.List; -import java.util.Properties; import org.apache.commons.io.FileUtils; import org.apache.commons.io.comparator.LastModifiedFileComparator; @@ -42,32 +39,25 @@ import org.onap.aai.exceptions.AAIException; import org.onap.aai.logging.ErrorLogHelper; import org.onap.aai.util.AAIConfig; import org.onap.aai.util.AAIConstants; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.springframework.context.annotation.PropertySource; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; +import lombok.extern.slf4j.Slf4j; + /** * DataImportTasks * */ +@Slf4j @Component @PropertySource(value="file:${server.local.startpath}/etc/appprops/datatoolscrons.properties", ignoreResourceNotFound=true) public class DataImportTasks { - private static final Logger LOGGER; private SimpleDateFormat dateFormat = new SimpleDateFormat("HH:mm:ss"); private static final List<String> EXTS = Arrays.asList("tar.gz", "tgz"); - static { - 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(DataImportTasks.class); - } - /** * Scheduled task to invoke importTask */ @@ -87,16 +77,16 @@ public class DataImportTasks { public void importTask() throws AAIException, Exception { if (AAIConfig.get("aai.dataimport.enable").equalsIgnoreCase("false")) { - LOGGER.info("Data Import is not enabled"); + log.info("Data Import is not enabled"); return; } // Check if the process was started via command line if (isDataImportRunning()) { - LOGGER.info("There is a dataImport process already running"); + log.info("There is a dataImport process already running"); return; } - LOGGER.info("Started importTask: " + dateFormat.format(new Date())); + log.info("Started importTask: " + dateFormat.format(new Date())); String inputLocation = AAIConstants.AAI_HOME_BUNDLECONFIG + AAIConfig.get("aai.dataimport.input.location"); @@ -126,7 +116,7 @@ public class DataImportTasks { /** * The isDataImportRunning method, checks if the data import task was started separately via command line - * + * * @return true if another process is running, false if not */ private static boolean isDataImportRunning() { @@ -145,11 +135,11 @@ public class DataImportTasks { } int exitVal = process.waitFor(); - LOGGER.info("Check if dataImport is running returned: " + exitVal); + log.info("Check if dataImport is running returned: " + exitVal); } catch (Exception e) { ErrorLogHelper.logError("AAI_8002", "Exception while running the check to see if dataImport is running " + e.getMessage()); - LOGGER.info("Exception while running the check to see if dataImport is running " + e.getMessage()); + log.info("Exception while running the check to see if dataImport is running " + e.getMessage()); } if (count > 0) { @@ -171,7 +161,7 @@ public class DataImportTasks { File[] allFilesArr = targetDirFile.listFiles((FileFilter) FileFileFilter.FILE); if (allFilesArr == null || allFilesArr.length == 0) { ErrorLogHelper.logError("AAI_8001", "Unable to find payload file at " + targetDir); - LOGGER.info("Unable to find payload at " + targetDir); + log.info("Unable to find payload at " + targetDir); return null; } if (allFilesArr.length > 1) { @@ -195,7 +185,7 @@ public class DataImportTasks { /** * The deletePayload method deletes all the payload files that it finds at targetDirectory - * + * * @param targetDirFile the directory that contains payload files * @throws AAIException */ @@ -203,7 +193,7 @@ public class DataImportTasks { File[] allFilesArr = targetDirFile.listFiles((FileFilter) DirectoryFileFilter.DIRECTORY); if (allFilesArr == null || allFilesArr.length == 0) { - LOGGER.info("No payload files found at " + targetDirFile.getPath()); + log.info("No payload files found at " + targetDirFile.getPath()); return; } for (File f : allFilesArr) { @@ -211,7 +201,7 @@ public class DataImportTasks { FileUtils.deleteDirectory(f); } catch (IOException e) { - LOGGER.info("Unable to delete directory " + f.getAbsolutePath() + " " + e.getMessage()); + log.info("Unable to delete directory " + f.getAbsolutePath() + " " + e.getMessage()); } } @@ -220,7 +210,7 @@ public class DataImportTasks { /** * The isDataImportRunning method, checks if the data import task was started separately via command line - * + * * @return true if another process is running, false if not */ private static boolean unpackPayloadFile(String payLoadFileName) { @@ -231,23 +221,23 @@ public class DataImportTasks { process = new ProcessBuilder().command("bash", "-c", "gzip –d < " + payLoadFileName + " | tar xf -").start(); int exitVal = process.waitFor(); - LOGGER.info("gzip -d returned: " + exitVal); + log.info("gzip -d returned: " + exitVal); } catch (Exception e) { ErrorLogHelper.logError("AAI_8002", "Exception while running the unzip " + e.getMessage()); - LOGGER.info("Exception while running the unzip " + e.getMessage()); + log.info("Exception while running the unzip " + e.getMessage()); return false; } /* * if (payLoadFileName.indexOf(".") > 0) * payLoadFileName = payLoadFileName.substring(0, payLoadFileName.lastIndexOf(".")); - * + * * try { * process = new ProcessBuilder().command("bash", "-c", "tar xf " + payLoadFileName).start(); * int exitVal = process.waitFor(); - * LOGGER.info("tar xf returned: " + exitVal); + * log.info("tar xf returned: " + exitVal); * } catch (Exception e) { * ErrorLogHelper.logError("AAI_8002", "Exception while running the tar xf "+ e.getMessage()); - * LOGGER.info("Exception while running the tar xf "+ e.getMessage()); + * log.info("Exception while running the tar xf "+ e.getMessage()); * return false; * } */ @@ -266,7 +256,7 @@ public class DataImportTasks { /** * The runAddManualDataScript method runs a shell script/command with a variable number of arguments - * + * * @param script The script/command arguments */ private static void runAddManualDataScript(String... script) { @@ -274,10 +264,10 @@ public class DataImportTasks { try { process = new ProcessBuilder().command(script).start(); int exitVal = process.waitFor(); - LOGGER.info("addManualData.sh returned: " + exitVal); + log.info("addManualData.sh returned: " + exitVal); } catch (Exception e) { ErrorLogHelper.logError("AAI_8002", "Exception while running addManualData.sh " + e.getMessage()); - LOGGER.info("Exception while running addManualData.sh" + e.getMessage()); + log.info("Exception while running addManualData.sh" + e.getMessage()); } } diff --git a/aai-resources/src/main/java/org/onap/aai/config/PropertyPasswordConfiguration.java b/aai-resources/src/main/java/org/onap/aai/config/PropertyPasswordConfiguration.java index bc87bfa..f205804 100644 --- a/aai-resources/src/main/java/org/onap/aai/config/PropertyPasswordConfiguration.java +++ b/aai-resources/src/main/java/org/onap/aai/config/PropertyPasswordConfiguration.java @@ -20,9 +20,6 @@ package org.onap.aai.config; -import com.att.eelf.configuration.EELFLogger; -import com.att.eelf.configuration.EELFManager; - import java.io.File; import java.io.FileInputStream; import java.io.IOException; @@ -42,11 +39,13 @@ import org.springframework.core.env.EnumerablePropertySource; import org.springframework.core.env.MapPropertySource; import org.springframework.core.env.PropertySource; +import lombok.extern.slf4j.Slf4j; + +@Slf4j public class PropertyPasswordConfiguration implements ApplicationContextInitializer<ConfigurableApplicationContext> { private static final Pattern decodePasswordPattern = Pattern.compile("password\\((.*?)\\)"); private PasswordDecoder passwordDecoder = new JettyPasswordDecoder(); - private static final EELFLogger logger = EELFManager.getLogger(PropertyPasswordConfiguration.class.getName()); @Override public void initialize(ConfigurableApplicationContext applicationContext) { @@ -74,10 +73,10 @@ public class PropertyPasswordConfiguration implements ApplicationContextInitiali sslProps.put("server.ssl.key-store-password", keystorePassword); sslProps.put("schema.service.ssl.key-store-password", keystorePassword); } else { - logger.info("Not using AAF Certman password file"); + log.info("Not using AAF Certman password file"); } } catch (IOException e) { - logger.warn("Not using AAF Certman password file, e=" + e.getMessage()); + log.warn("Not using AAF Certman password file, e=" + e.getMessage()); } finally { if (passwordStream != null) { try { @@ -101,10 +100,10 @@ public class PropertyPasswordConfiguration implements ApplicationContextInitiali sslProps.put("server.ssl.trust-store-password", truststorePassword); sslProps.put("schema.service.ssl.trust-store-password", truststorePassword); } else { - logger.info("Not using AAF Certman passphrases file"); + log.info("Not using AAF Certman passphrases file"); } } catch (IOException e) { - logger.warn("Not using AAF Certman passphrases file, e=" + e.getMessage()); + log.warn("Not using AAF Certman passphrases file, e=" + e.getMessage()); } finally { if (passphrasesStream != null) { try { @@ -125,7 +124,7 @@ public class PropertyPasswordConfiguration implements ApplicationContextInitiali } if (!sslProps.isEmpty()) { - logger.info("Using AAF Certman files"); + log.info("Using AAF Certman files"); PropertySource<?> additionalProperties = new MapPropertySource("additionalProperties", sslProps); environment.getPropertySources().addFirst(additionalProperties); } diff --git a/aai-resources/src/main/resources/application.properties b/aai-resources/src/main/resources/application.properties index b79af16..ee5a0ec 100644 --- a/aai-resources/src/main/resources/application.properties +++ b/aai-resources/src/main/resources/application.properties @@ -162,3 +162,4 @@ AJSC_HOME=./ aai.actuator.echo.enabled=false aai.notifications.enabled=false +aai.graph.properties.path=${server.local.startpath}/etc/appprops/janusgraph-realtime.properties diff --git a/aai-resources/src/main/resources/etc/appprops/aaiconfig.properties b/aai-resources/src/main/resources/etc/appprops/aaiconfig.properties index 025726c..ecbbcb1 100644 --- a/aai-resources/src/main/resources/etc/appprops/aaiconfig.properties +++ b/aai-resources/src/main/resources/etc/appprops/aaiconfig.properties @@ -70,7 +70,7 @@ aai.default.api.version=v20 aai.model.delete.sleep.per.vtx.msec=500 aai.model.query.resultset.maxcount=50 aai.model.query.timeout.sec=90 - + # Used by Data Grooming aai.grooming.default.max.fix=150 aai.grooming.default.sleep.minutes=7 @@ -91,7 +91,6 @@ aai.forceDel.protected.descendant.count=10 # aai.dmaap.workload.enableEventProcessing=true aai.realtime.clients=RO,SDNC,MSO,SO -aai.jms.enable=false #timeout for crud enabled flag aai.crud.timeoutenabled=true diff --git a/aai-resources/src/test/resources/application-test.properties b/aai-resources/src/test/resources/application-test.properties index 8057117..17dc34f 100644 --- a/aai-resources/src/test/resources/application-test.properties +++ b/aai-resources/src/test/resources/application-test.properties @@ -40,9 +40,6 @@ server.ssl.enabled=false #server.ssl.client-auth=want #server.ssl.key-store-type=JKS -# JMS bind address host port -jms.bind.address=tcp://localhost:61647 - # Removed deprecated DMaaP reference # dmaap.ribbon.listOfServers=localhost:3904 # Schema related attributes for the oxm and edges diff --git a/aai-resources/src/test/resources/etc/appprops/aaiconfig.properties b/aai-resources/src/test/resources/etc/appprops/aaiconfig.properties index 76167b2..0d620ff 100644 --- a/aai-resources/src/test/resources/etc/appprops/aaiconfig.properties +++ b/aai-resources/src/test/resources/etc/appprops/aaiconfig.properties @@ -53,8 +53,6 @@ aai.realtime.clients=RO,SDNC,MSO aai.run.migrations=false -aai.jms.enable=false - property.null.validation.enabled=true # @@ -26,11 +26,11 @@ <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.resources</groupId> <artifactId>resources</artifactId> - <version>1.15.2-SNAPSHOT</version> + <version>1.15.3-SNAPSHOT</version> <name>aai-resources</name> <packaging>pom</packaging> <modules> @@ -49,8 +49,8 @@ <staging.path>/content/repositories/staging/</staging.path> <!-- GMaven plugin uses this property to figure out the name of the docker tag --> <aai.project.version>${project.version}</aai.project.version> - <aai.common.version>1.15.2</aai.common.version> - <aai.schema.service.version>1.12.5</aai.schema.service.version> + <aai.common.version>1.15.3-SNAPSHOT</aai.common.version> + <aai.schema.service.version>1.12.6</aai.schema.service.version> </properties> <build> <pluginManagement> diff --git a/version.properties b/version.properties index df31475..08fc17c 100644 --- a/version.properties +++ b/version.properties @@ -5,7 +5,7 @@ major_version=1 minor_version=15 -patch_version=2 +patch_version=3 base_version=${major_version}.${minor_version}.${patch_version} |