summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Changelog.md5
-rw-r--r--docker-compose.yml2
-rw-r--r--pom.xml5
-rw-r--r--src/main/java/org/onap/ves/openapi/manager/Main.java8
-rw-r--r--src/main/java/org/onap/ves/openapi/manager/config/DistributionClientConfig.java37
-rw-r--r--src/main/resources/application.yml6
-rw-r--r--src/test/java/org/onap/ves/openapi/manager/config/DistributionClientConfigTest.java12
-rw-r--r--version.properties2
8 files changed, 45 insertions, 32 deletions
diff --git a/Changelog.md b/Changelog.md
index 38f651f..e572648 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
+
+## [1.3.0] - 2022/11/12
+ - [DMAAP-1809](https://jira.onap.org/browse/DMAAP-1809)
+ - Move ves-openapi-manager to use sdc-distro-client version 2.0.0
+
## [1.2.0] - 2022/08/19
- [DCAEGEN2-3215](https://jira.onap.org/browse/DCAEGEN2-3215)
- Update spring to version 2.7.2
diff --git a/docker-compose.yml b/docker-compose.yml
index ce7cb96..8987cc9 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -7,5 +7,5 @@ services:
hostname: ves-openapi-manager
environment:
- SCHEMA_MAP_PATH=/app/schema-map.json
- - ASDC_ADDRESS=sdc-be.onap:30204
+ - SDC_ADDRESS=sdc-be.onap:30204
network_mode: host
diff --git a/pom.xml b/pom.xml
index da9819a..c3e38a6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2,6 +2,7 @@
<!--
============LICENSE_START=======================================================
Copyright (C) 2021-2022 Nokia. All rights reserved.
+ Copyright © 2022 Nordix Foundation. 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.
@@ -32,12 +33,12 @@
<groupId>org.onap.dcaegen2.platform.ves-openapi-manager</groupId>
<artifactId>ves-openapi-manager</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.3.0-SNAPSHOT</version>
<name>dcaegen2-platform-ves-openapi-manager</name>
<packaging>jar</packaging>
<properties>
- <sdc-distribution-client.version>1.4.2</sdc-distribution-client.version>
+ <sdc-distribution-client.version>2.0.0</sdc-distribution-client.version>
<junit-jupiter.version>5.2.0</junit-jupiter.version>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
diff --git a/src/main/java/org/onap/ves/openapi/manager/Main.java b/src/main/java/org/onap/ves/openapi/manager/Main.java
index 209c05b..735c8e0 100644
--- a/src/main/java/org/onap/ves/openapi/manager/Main.java
+++ b/src/main/java/org/onap/ves/openapi/manager/Main.java
@@ -3,6 +3,7 @@
* VES-OPENAPI-MANAGER
* ================================================================================
* Copyright (C) 2021 Nokia. All rights reserved.
+ * Copyright © 2022 Nordix Foundation. 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.
@@ -20,11 +21,12 @@
package org.onap.ves.openapi.manager;
+import java.util.List;
import lombok.extern.log4j.Log4j2;
import org.onap.sdc.api.results.IDistributionClientResult;
-import org.onap.sdc.http.HttpAsdcClient;
import org.onap.sdc.http.HttpClientFactory;
import org.onap.sdc.http.HttpRequestFactory;
+import org.onap.sdc.http.HttpSdcClient;
import org.onap.sdc.http.SdcConnectorClient;
import org.onap.sdc.impl.DistributionClientImpl;
import org.onap.ves.openapi.manager.config.DistributionClientConfig;
@@ -39,8 +41,6 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.annotation.Bean;
-import java.util.List;
-
@Log4j2
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
public class Main {
@@ -58,7 +58,7 @@ public class Main {
public SdcConnectorClient getSdcConnectorClient(DistributionClientConfig clientConfig) {
HttpRequestFactory requestFactory = new HttpRequestFactory(clientConfig.getUser(), clientConfig.getPassword());
HttpClientFactory clientFactory = new HttpClientFactory(clientConfig);
- return new SdcConnectorClient(clientConfig, new HttpAsdcClient(clientConfig.getAsdcAddress(), clientFactory, requestFactory));
+ return new SdcConnectorClient(clientConfig, new HttpSdcClient(clientConfig.getSdcAddress(), clientFactory, requestFactory));
}
/**
diff --git a/src/main/java/org/onap/ves/openapi/manager/config/DistributionClientConfig.java b/src/main/java/org/onap/ves/openapi/manager/config/DistributionClientConfig.java
index 188cced..bc51801 100644
--- a/src/main/java/org/onap/ves/openapi/manager/config/DistributionClientConfig.java
+++ b/src/main/java/org/onap/ves/openapi/manager/config/DistributionClientConfig.java
@@ -3,6 +3,7 @@
* VES-OPENAPI-MANAGER
* ================================================================================
* Copyright (C) 2021 Nokia. All rights reserved.
+ * Copyright © 2022 Nordix Foundation. 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.
@@ -40,8 +41,7 @@ public class DistributionClientConfig implements IConfiguration {
public static final String VES_EVENTS_ARTIFACT_TYPE = "VES_EVENTS";
- private String asdcAddress;
- private String msgBusAddress;
+ private String sdcAddress;
private String user;
private String password;
private Integer pollingInterval;
@@ -51,16 +51,14 @@ public class DistributionClientConfig implements IConfiguration {
private String consumerID;
private Boolean activateServerTLSAuth;
private Boolean isFilterInEmptyResources;
- private Boolean isUseHttpsWithDmaap;
+ private String httpProxyHost;
+ private int httpProxyPort;
+ private String httpsProxyHost;
+ private int httpsProxyPort;
@Override
- public String getAsdcAddress() {
- return asdcAddress;
- }
-
- @Override
- public List<String> getMsgBusAddress() {
- return Collections.singletonList(msgBusAddress);
+ public String getSdcAddress() {
+ return sdcAddress;
}
@Override
@@ -124,7 +122,22 @@ public class DistributionClientConfig implements IConfiguration {
}
@Override
- public Boolean isUseHttpsWithDmaap() {
- return isUseHttpsWithDmaap;
+ public String getHttpProxyHost() {
+ return httpProxyHost;
+ }
+
+ @Override
+ public int getHttpProxyPort() {
+ return httpProxyPort;
+ }
+
+ @Override
+ public String getHttpsProxyHost() {
+ return httpsProxyHost;
+ }
+
+ @Override
+ public int getHttpsProxyPort() {
+ return httpsProxyPort;
}
}
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index f179544..0ff3f4e 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -4,17 +4,15 @@ vesopenapimanager:
eventDomainPath: /event/structure/commonEventHeader/structure/domain/value
eventSchemaReferencePath: /event/structure/stndDefinedFields/structure/schemaReference/value
distribution:
- asdcAddress: ${ASDC_ADDRESS:sdc-be.onap:30204}
- msgBusAddress: message-router.onap
+ sdcAddress: ${SDC_ADDRESS:sdc-be.onap:30204}
user: dcae
password: Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
pollingInterval: 20
pollingTimeout: 20
- consumerGroup: ves-openapi-manager
+ consumerGroup: dcaegen2
environmentName: AUTO
consumerID: ves-openapi-manager
activateServerTLSAuth: false
isFilterInEmptyResources: false
- isUseHttpsWithDmaap: false
diff --git a/src/test/java/org/onap/ves/openapi/manager/config/DistributionClientConfigTest.java b/src/test/java/org/onap/ves/openapi/manager/config/DistributionClientConfigTest.java
index bb2a2e5..1bb4063 100644
--- a/src/test/java/org/onap/ves/openapi/manager/config/DistributionClientConfigTest.java
+++ b/src/test/java/org/onap/ves/openapi/manager/config/DistributionClientConfigTest.java
@@ -3,6 +3,7 @@
* VES-OPENAPI-MANAGER
* ================================================================================
* Copyright (C) 2021 Nokia. All rights reserved.
+ * Copyright © 2022 Nordix Foundation. 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.
@@ -38,8 +39,7 @@ class DistributionClientConfigTest {
@Test
void shouldCreateDistributionClientConfig() {
//given
- String asdcAddress = "sdc-be.onap:8443";
- String msgBusAddress = "message-router.onap";
+ String sdcAddress = "sdc-be.onap:8443";
String user = "dcae";
String password = "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U";
Integer pollingInterval = 20;
@@ -48,8 +48,7 @@ class DistributionClientConfigTest {
String environmentName = "AUTO";
String consumerID = "ves-openapi-manager";
Map<String, Object> properties = new HashMap<>();
- properties.put("vesopenapimanager.distribution.asdcAddress", asdcAddress);
- properties.put("vesopenapimanager.distribution.msgBusAddress", msgBusAddress);
+ properties.put("vesopenapimanager.distribution.sdcAddress", sdcAddress);
properties.put("vesopenapimanager.distribution.user", user);
properties.put("vesopenapimanager.distribution.password", password);
properties.put("vesopenapimanager.distribution.pollingInterval", pollingInterval);
@@ -59,7 +58,6 @@ class DistributionClientConfigTest {
properties.put("vesopenapimanager.distribution.consumerID", consumerID);
properties.put("vesopenapimanager.distribution.activateServerTLSAuth", false);
properties.put("vesopenapimanager.distribution.isFilterInEmptyResources", false);
- properties.put("vesopenapimanager.distribution.isUseHttpsWithDmaap", false);
ConfigurationPropertySource source = new MapConfigurationPropertySource(properties);
Binder binder = new Binder(source);
@@ -69,8 +67,7 @@ class DistributionClientConfigTest {
//then
assertThat(result.isBound()).isTrue();
DistributionClientConfig config = result.get();
- assertThat(config.getAsdcAddress()).isEqualTo(asdcAddress);
- assertThat(config.getMsgBusAddress()).isEqualTo(List.of(msgBusAddress));
+ assertThat(config.getSdcAddress()).isEqualTo(sdcAddress);
assertThat(config.getUser()).isEqualTo(user);
assertThat(config.getPassword()).isEqualTo(password);
assertThat(config.getPollingInterval()).isEqualTo(pollingInterval);
@@ -84,6 +81,5 @@ class DistributionClientConfigTest {
assertThat(config.activateServerTLSAuth()).isFalse();
assertThat(config.isFilterInEmptyResources()).isFalse();
assertThat(config.activateServerTLSAuth()).isFalse();
- assertThat(config.isUseHttpsWithDmaap()).isFalse();
}
}
diff --git a/version.properties b/version.properties
index 00ef564..7d6815b 100644
--- a/version.properties
+++ b/version.properties
@@ -1,5 +1,5 @@
major=1
-minor=2
+minor=3
patch=0
base_version=${major}.${minor}.${patch}
release_version=${base_version}