<parent>
<groupId>org.onap.so</groupId>
<artifactId>adapters</artifactId>
- <version>1.15.0-SNAPSHOT</version>
+ <version>1.15.1-SNAPSHOT</version>
</parent>
<groupId>org.onap.so.adapters</groupId>
<artifactId>mso-adapter-utils</artifactId>
<parent>
<groupId>org.onap.so</groupId>
<artifactId>adapters</artifactId>
- <version>1.15.0-SNAPSHOT</version>
+ <version>1.15.1-SNAPSHOT</version>
</parent>
<groupId>org.onap.so.adapters</groupId>
<artifactId>mso-adapters-rest-interface</artifactId>
<parent>
<groupId>org.onap.so</groupId>
<artifactId>adapters</artifactId>
- <version>1.15.0-SNAPSHOT</version>
+ <version>1.15.1-SNAPSHOT</version>
</parent>
<groupId>org.onap.so.adapters</groupId>
<artifactId>mso-catalog-db-adapter</artifactId>
# will be used as entry in DB to say SITE OFF/ON for healthcheck
# MSO Properties go here
-
+
server:
- port: 8080
+ port: 8080
tomcat:
max-threads: 50
-
+
mso:
logPath: ./logs/openstack
site-name: localDevEnv
core-pool-size: 50
max-pool-size: 50
queue-capacity: 500
-
+
spring:
+ application:
+ name: so-catalog-db-adapter
datasource:
hikari:
jdbcUrl: jdbc:mariadb://${DB_HOST}:${DB_PORT}/catalogdb
driver-class-name: org.mariadb.jdbc.Driver
pool-name: catdb-pool
registerMbeans: true
-
+
flyway:
baseline-on-migrate: false
url: jdbc:mariadb://${DB_HOST}:${DB_PORT}/catalogdb
fail-on-empty-beans: false
main:
allow-bean-definition-overriding: true
+ sleuth:
+ enabled: ${TRACING_ENABLED:false}
+ messaging:
+ jms:
+ enabled: false
+ trace-id128: true
+ sampler:
+ probability: ${TRACING_SAMPLING_PROBABILITY:1.0}
+ supports-join: false
+ web:
+ skip-pattern: /actuator/health/*
+ zipkin:
+ base-url: ${TRACING_COLLECTOR_URL:http://jaeger-collector.istio-system:9411}
+
#Actuator
management:
prometheus:
enabled: true # Whether exporting of metrics to Prometheus is enabled.
step: 1m # Step size (i.e. reporting frequency) to use.
-
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.web.server.LocalServerPort;
import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.DynamicPropertyRegistry;
+import org.springframework.test.context.DynamicPropertySource;
import org.springframework.test.context.junit4.SpringRunner;
+import org.springframework.util.SocketUtils;
@RunWith(SpringRunner.class)
@SpringBootTest(classes = CatalogDBApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@LocalServerPort
protected int port;
-
@Test
public void testNothing() {}
+
+ @DynamicPropertySource
+ static void configureProperties(DynamicPropertyRegistry registry) {
+ int port = SocketUtils.findAvailableTcpPort();
+ registry.add("spring.datasource.url", () -> String.format("jdbc:mariadb://localhost:%s/catalogdb", port));
+ registry.add("spring.flyway.url", () -> String.format("jdbc:mariadb://localhost:%s/catalogdb", port));
+ registry.add("mariaDB4j.port", () -> port);
+ }
}
--- /dev/null
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright © 2025 Deutsche Telekom AG Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.so.adapters.catalogdb.catalogrest;
+
+import org.junit.Test;
+import org.onap.so.adapters.catalogdb.CatalogDbAdapterBaseTest;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cloud.contract.wiremock.AutoConfigureWireMock;
+import org.springframework.http.HttpStatus;
+import org.springframework.test.context.TestPropertySource;
+import org.springframework.web.client.RestClientException;
+import org.springframework.web.client.RestTemplate;
+import com.github.tomakehurst.wiremock.client.WireMock;
+
+@AutoConfigureWireMock(port = 0)
+@TestPropertySource(
+ properties = {"spring.sleuth.enabled=true", "spring.zipkin.base-url=http://localhost:${wiremock.server.port}"})
+public class TracingTest extends CatalogDbAdapterBaseTest {
+
+ @Autowired
+ RestTemplate restTemplate;
+
+ @Test
+ public void thatTracesAreExported() throws InterruptedException {
+ WireMock.stubFor(WireMock.post(WireMock.urlEqualTo("/api/v2/spans"))
+ .willReturn(WireMock.aResponse().withStatus(HttpStatus.OK.value())));
+
+ try {
+ restTemplate.getForObject("http://localhost:" + port + "/foo", String.class);
+ } catch (RestClientException e) {
+ // this provokes a 404. For the test it's not important what is returned here
+ }
+ Thread.sleep(1000);
+ WireMock.verify(WireMock.postRequestedFor(WireMock.urlEqualTo("/api/v2/spans")));
+ }
+
+}
<parent>
<groupId>org.onap.so</groupId>
<artifactId>adapters</artifactId>
- <version>1.15.0-SNAPSHOT</version>
+ <version>1.15.1-SNAPSHOT</version>
</parent>
<artifactId>mso-openstack-adapters</artifactId>
<packaging>jar</packaging>
<parent>
<groupId>org.onap.so</groupId>
<artifactId>adapters</artifactId>
- <version>1.15.0-SNAPSHOT</version>
+ <version>1.15.1-SNAPSHOT</version>
</parent>
<groupId>org.onap.so.adapters</groupId>
<artifactId>mso-requests-db-adapter</artifactId>
<parent>
<groupId>org.onap.so</groupId>
<artifactId>adapters</artifactId>
- <version>1.15.0-SNAPSHOT</version>
+ <version>1.15.1-SNAPSHOT</version>
</parent>
<artifactId>mso-sdnc-adapter</artifactId>
<properties>
<parent>
<groupId>org.onap.so</groupId>
<artifactId>so</artifactId>
- <version>1.15.0-SNAPSHOT</version>
+ <version>1.15.1-SNAPSHOT</version>
</parent>
<artifactId>adapters</artifactId>
<parent>
<groupId>org.onap.so</groupId>
<artifactId>adapters</artifactId>
- <version>1.15.0-SNAPSHOT</version>
+ <version>1.15.1-SNAPSHOT</version>
</parent>
<groupId>org.onap.so.adapters</groupId>
<artifactId>so-appc-orchestrator</artifactId>
<parent>
<groupId>org.onap.so</groupId>
<artifactId>so</artifactId>
- <version>1.15.0-SNAPSHOT</version>
+ <version>1.15.1-SNAPSHOT</version>
</parent>
<artifactId>asdc-controller</artifactId>
<name>asdc-controller</name>
<parent>
<groupId>org.onap.so</groupId>
<artifactId>bpmn</artifactId>
- <version>1.15.0-SNAPSHOT</version>
+ <version>1.15.1-SNAPSHOT</version>
</parent>
<artifactId>MSOCommonBPMN</artifactId>
<name>MSOCommonBPMN</name>
<parent>
<groupId>org.onap.so</groupId>
<artifactId>bpmn</artifactId>
- <version>1.15.0-SNAPSHOT</version>
+ <version>1.15.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>MSOCoreBPMN</artifactId>
<parent>
<groupId>org.onap.so</groupId>
<artifactId>bpmn</artifactId>
- <version>1.15.0-SNAPSHOT</version>
+ <version>1.15.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>mso-infrastructure-bpmn</artifactId>
<parent>
<groupId>org.onap.so</groupId>
<artifactId>so</artifactId>
- <version>1.15.0-SNAPSHOT</version>
+ <version>1.15.1-SNAPSHOT</version>
</parent>
<artifactId>bpmn</artifactId>
<name>BPMN Subsystem</name>
<parent>
<groupId>org.onap.so</groupId>
<artifactId>bpmn</artifactId>
- <version>1.15.0-SNAPSHOT</version>
+ <version>1.15.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>so-bpmn-building-blocks</artifactId>
<parent>
<groupId>org.onap.so</groupId>
<artifactId>bpmn</artifactId>
- <version>1.15.0-SNAPSHOT</version>
+ <version>1.15.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>so-bpmn-infrastructure-common</artifactId>
<parent>
<groupId>org.onap.so</groupId>
<artifactId>bpmn</artifactId>
- <version>1.15.0-SNAPSHOT</version>
+ <version>1.15.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>so-bpmn-infrastructure-flows</artifactId>
<parent>
<artifactId>bpmn</artifactId>
<groupId>org.onap.so</groupId>
- <version>1.15.0-SNAPSHOT</version>
+ <version>1.15.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.onap.so</groupId>
<parent>
<groupId>org.onap.so</groupId>
<artifactId>bpmn</artifactId>
- <version>1.15.0-SNAPSHOT</version>
+ <version>1.15.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>so-bpmn-tasks</artifactId>
<parent>
<groupId>org.onap.so</groupId>
<artifactId>so</artifactId>
- <version>1.15.0-SNAPSHOT</version>
+ <version>1.15.1-SNAPSHOT</version>
</parent>
<artifactId>common</artifactId>
<name>common</name>
<parent>
<groupId>org.onap.so</groupId>
<artifactId>so</artifactId>
- <version>1.15.0-SNAPSHOT</version>
+ <version>1.15.1-SNAPSHOT</version>
</parent>
<name>CXFLogging</name>
<description>Common CXF Logging Classes</description>
<parent>
<groupId>org.onap.so</groupId>
<artifactId>so</artifactId>
- <version>1.15.0-SNAPSHOT</version>
+ <version>1.15.1-SNAPSHOT</version>
</parent>
<artifactId>deployment-configs</artifactId>
<name>deployment-configs</name>
<parent>
<groupId>org.onap.so</groupId>
<artifactId>graph-inventory</artifactId>
- <version>1.15.0-SNAPSHOT</version>
+ <version>1.15.1-SNAPSHOT</version>
</parent>
<artifactId>aai-client</artifactId>
<build>
<parent>
<groupId>org.onap.so</groupId>
<artifactId>graph-inventory</artifactId>
- <version>1.15.0-SNAPSHOT</version>
+ <version>1.15.1-SNAPSHOT</version>
</parent>
<artifactId>fluent-builder-maven-plugin</artifactId>
<packaging>maven-plugin</packaging>
<parent>
<groupId>org.onap.so</groupId>
<artifactId>so</artifactId>
- <version>1.15.0-SNAPSHOT</version>
+ <version>1.15.1-SNAPSHOT</version>
</parent>
<artifactId>graph-inventory</artifactId>
<packaging>pom</packaging>
<parent>
<groupId>org.onap.so</groupId>
<artifactId>mso-api-handlers</artifactId>
- <version>1.15.0-SNAPSHOT</version>
+ <version>1.15.1-SNAPSHOT</version>
</parent>
<artifactId>mso-api-handler-common</artifactId>
<name>mso-api-handler-common</name>
<parent>
<groupId>org.onap.so</groupId>
<artifactId>mso-api-handlers</artifactId>
- <version>1.15.0-SNAPSHOT</version>
+ <version>1.15.1-SNAPSHOT</version>
</parent>
<artifactId>mso-api-handler-infra</artifactId>
<name>mso-api-handler-infra</name>
<parent>
<groupId>org.onap.so</groupId>
<artifactId>mso-api-handlers</artifactId>
- <version>1.15.0-SNAPSHOT</version>
+ <version>1.15.1-SNAPSHOT</version>
</parent>
<artifactId>mso-requests-db-repositories</artifactId>
<name>mso-requests-db-repositories</name>
<parent>
<groupId>org.onap.so</groupId>
<artifactId>mso-api-handlers</artifactId>
- <version>1.15.0-SNAPSHOT</version>
+ <version>1.15.1-SNAPSHOT</version>
</parent>
<artifactId>mso-requests-db</artifactId>
<name>mso-requests-db</name>
<parent>
<groupId>org.onap.so</groupId>
<artifactId>so</artifactId>
- <version>1.15.0-SNAPSHOT</version>
+ <version>1.15.1-SNAPSHOT</version>
</parent>
<artifactId>mso-api-handlers</artifactId>
<parent>
<groupId>org.onap.so</groupId>
<artifactId>so</artifactId>
- <version>1.15.0-SNAPSHOT</version>
+ <version>1.15.1-SNAPSHOT</version>
</parent>
<artifactId>mso-catalog-db</artifactId>
<parent>
<groupId>org.onap.so</groupId>
<artifactId>packages</artifactId>
- <version>1.15.0-SNAPSHOT</version>
+ <version>1.15.1-SNAPSHOT</version>
</parent>
<packaging>pom</packaging>
<parent>
<groupId>org.onap.so</groupId>
<artifactId>so</artifactId>
- <version>1.15.0-SNAPSHOT</version>
+ <version>1.15.1-SNAPSHOT</version>
</parent>
<artifactId>packages</artifactId>
<groupId>org.onap.so</groupId>
<artifactId>so</artifactId>
<packaging>pom</packaging>
- <version>1.15.0-SNAPSHOT</version>
+ <version>1.15.1-SNAPSHOT</version>
<name>so</name>
<description>This Maven project is responsible to build and package all child projects - contributions in the MSO project.
This build can be configured to run Functional tests and to start/stop a jboss server + Mysql DB.
<cxf.version>3.4.1</cxf.version>
<jax.ws.rs>2.1</jax.ws.rs>
<springboot.version>2.3.7.RELEASE</springboot.version>
+ <spring-cloud.version>Hoxton.SR8</spring-cloud.version>
<aaf.version>2.1.21</aaf.version>
<format.skipValidate>false</format.skipValidate>
<format.skipExecute>true</format.skipExecute>
<version>2.4</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.springframework.cloud</groupId>
+ <artifactId>spring-cloud-starter-sleuth</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.cloud</groupId>
+ <artifactId>spring-cloud-sleuth-zipkin</artifactId>
+ </dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<scope>import</scope>
<type>pom</type>
</dependency>
+ <dependency>
+ <groupId>org.springframework.cloud</groupId>
+ <artifactId>spring-cloud-dependencies</artifactId>
+ <version>${spring-cloud.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
</dependencies>
</dependencyManagement>
<profiles>
<parent>
<groupId>org.onap.so</groupId>
<artifactId>so</artifactId>
- <version>1.15.0-SNAPSHOT</version>
+ <version>1.15.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>so-optimization-clients</artifactId>
<parent>
<groupId>org.onap.so</groupId>
<artifactId>so</artifactId>
- <version>1.15.0-SNAPSHOT</version>
+ <version>1.15.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>so-sdn-clients</artifactId>
<parent>
<groupId>org.onap.so</groupId>
<artifactId>so</artifactId>
- <version>1.15.0-SNAPSHOT</version>
+ <version>1.15.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>so-simulator</artifactId>
major=1
minor=15
-patch=0
+patch=1
base_version=${major}.${minor}.${patch}