summaryrefslogtreecommitdiffstats
path: root/aai-resources
diff options
context:
space:
mode:
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>2024-02-05 17:29:33 +0100
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>2024-02-06 09:05:05 +0100
commit2ee4fd4b1c4436f2f295bc6f2eb566cdf0200464 (patch)
treeeea856e09ea81eac60c2c87d4cbed7c0a9d75701 /aai-resources
parent8157f311a60aff0889f32d060312b24ec816d061 (diff)
Update aai-common to 1.13.3 in resources
- update to 1.13.3 that contains fix for TraversalURIOptimizedQuery building - disable tracing in tests - disable log lines for schema generation in tests Issue-ID: AAI-3761 Change-Id: Ifbe1a4ca716e73c1722c1368dc55719b23fe101a Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
Diffstat (limited to 'aai-resources')
-rw-r--r--aai-resources/pom.xml2
-rw-r--r--aai-resources/src/main/java/org/onap/aai/rest/LegacyMoxyConsumer.java11
-rw-r--r--aai-resources/src/main/resources/application.properties2
-rw-r--r--aai-resources/src/test/resources/application-test.properties2
-rw-r--r--aai-resources/src/test/resources/logback.xml5
5 files changed, 16 insertions, 6 deletions
diff --git a/aai-resources/pom.xml b/aai-resources/pom.xml
index 8bc71c7..33828e4 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.13.1-SNAPSHOT</version>
+ <version>1.13.3</version>
</parent>
<properties>
<java.version>1.8</java.version>
diff --git a/aai-resources/src/main/java/org/onap/aai/rest/LegacyMoxyConsumer.java b/aai-resources/src/main/java/org/onap/aai/rest/LegacyMoxyConsumer.java
index c685071..4912a00 100644
--- a/aai-resources/src/main/java/org/onap/aai/rest/LegacyMoxyConsumer.java
+++ b/aai-resources/src/main/java/org/onap/aai/rest/LegacyMoxyConsumer.java
@@ -290,9 +290,8 @@ public class LegacyMoxyConsumer extends RESTAPI {
Introspector obj = loader.introspectorFromName(objType);
DBRequest request =
new DBRequest.Builder(HttpMethod.GET, uriObject, uriQuery, obj, headers, info, transId).build();
- List<DBRequest> requests = new ArrayList<>();
- requests.add(request);
- if (resultIndex != null && !"-1".equals(resultIndex) && resultSize != null && !"-1".equals(resultSize)) {
+ List<DBRequest> requests = Collections.singletonList(request);
+ if (hasValidPaginationParams(resultIndex, resultSize)) {
traversalUriHttpEntry.setPaginationIndex(Integer.parseInt(resultIndex));
traversalUriHttpEntry.setPaginationBucket(Integer.parseInt(resultSize));
}
@@ -320,6 +319,10 @@ public class LegacyMoxyConsumer extends RESTAPI {
return response;
}
+ private boolean hasValidPaginationParams(String resultIndex, String resultSize) {
+ return resultIndex != null && !"-1".equals(resultIndex) && resultSize != null && !"-1".equals(resultSize);
+ }
+
private MultivaluedMap<String, String> removeNonFilterableParams(MultivaluedMap<String, String> params) {
String[] toRemove =
@@ -554,7 +557,7 @@ public class LegacyMoxyConsumer extends RESTAPI {
.build();
List<DBRequest> requests = new ArrayList<>();
requests.add(request);
- if (resultIndex != null && !"-1".equals(resultIndex) && resultSize != null && !"-1".equals(resultSize)) {
+ if (hasValidPaginationParams(resultIndex, resultSize)) {
traversalUriHttpEntry.setPaginationIndex(Integer.parseInt(resultIndex));
traversalUriHttpEntry.setPaginationBucket(Integer.parseInt(resultSize));
}
diff --git a/aai-resources/src/main/resources/application.properties b/aai-resources/src/main/resources/application.properties
index 094c81c..0389406 100644
--- a/aai-resources/src/main/resources/application.properties
+++ b/aai-resources/src/main/resources/application.properties
@@ -7,6 +7,8 @@ info.build.version=1.1.0
spring.application.name=aai-resources
spring.jersey.type=filter
spring.main.allow-bean-definition-overriding=true
+
+spring.sleuth.enabled=true
spring.zipkin.baseUrl=http://jaeger-collector.istio-system:9411
spring.sleuth.messaging.jms.enabled = false
spring.sleuth.trace-id128=true
diff --git a/aai-resources/src/test/resources/application-test.properties b/aai-resources/src/test/resources/application-test.properties
index cdc528f..596bd23 100644
--- a/aai-resources/src/test/resources/application-test.properties
+++ b/aai-resources/src/test/resources/application-test.properties
@@ -11,6 +11,8 @@ server.servlet.context-path=/
spring.jersey.application-path=${schema.uri.base.path}
+spring.sleuth.enabled=false
+
spring.autoconfigure.exclude=\
org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,\
org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration,\
diff --git a/aai-resources/src/test/resources/logback.xml b/aai-resources/src/test/resources/logback.xml
index 4504bce..8bb9e7c 100644
--- a/aai-resources/src/test/resources/logback.xml
+++ b/aai-resources/src/test/resources/logback.xml
@@ -223,11 +223,14 @@
<logger name="org.zookeeper" level="OFF" />
- <logger name="org.onap.aai" level="DEBUG" additivity="false">
+ <logger name="org.onap.aai" level="INFO" additivity="false">
<appender-ref ref="asyncDEBUG" />
<appender-ref ref="asyncSANE" />
<appender-ref ref="STDOUT" />
</logger>
+ <logger name="org.onap.aai.dbgen" level="WARN" additivity="false">
+ <appender-ref ref="STDOUT" />
+ </logger>
<logger name="org.onap.aai.aailog.logs.AaiScheduledTaskAuditLog" level="INFO">
<appender-ref ref="asyncAUDIT"/>
</logger>