summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVijay Venkatesh Kumar <vv770d@att.com>2022-10-10 14:31:26 -0400
committerVijay Venkatesh Kumar <vv770d@att.com>2022-10-27 15:27:22 +0000
commita4507ff06bdf9d667ce3c91ef984c841d77351b8 (patch)
tree06d99816067764fa6051465d9813c32c5745e3fd
parent2a642a5a8f5a236b0afa29108a4409ce39465012 (diff)
Revise SDK version for CBSClient updates
SDK 1.9.x removes CBS/Consul parameters Change-Id: I527cafdbe5a9b2aca1a15df8edd19f9e03dff5de Signed-off-by: Vijay Venkatesh Kumar <vv770d@att.com> Issue-ID: DCAEGEN2-3295 Signed-off-by: Vijay Venkatesh Kumar <vv770d@att.com>
-rw-r--r--Changelog.md4
-rw-r--r--etc/ves_application_config.yaml62
-rw-r--r--pom.xml4
-rw-r--r--src/main/java/org/onap/dcae/configuration/cbs/CbsClientConfigurationProvider.java22
-rw-r--r--src/test/java/org/onap/dcae/configuration/cbs/CbsClientConfigurationProviderTest.java7
-rw-r--r--version.properties4
6 files changed, 79 insertions, 24 deletions
diff --git a/Changelog.md b/Changelog.md
index 660da1fa..1a390d2d 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -4,6 +4,10 @@ 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.12.0] - 2022/10/10
+ - [DCAEGEN2-3295] - SDK upgrade to 1.9.0 (CBSclient changed to remove CBS/Consul parameters)
+
## [1.11.1] - 2022/01/28
- [DCAEGEN2-3214] - Dcaegen2-collectors-ves vulnerability updates
diff --git a/etc/ves_application_config.yaml b/etc/ves_application_config.yaml
new file mode 100644
index 00000000..71b9b338
--- /dev/null
+++ b/etc/ves_application_config.yaml
@@ -0,0 +1,62 @@
+auth.method: noAuth
+collector.dmaap.streamid: fault=ves-fault|syslog=ves-syslog|heartbeat=ves-heartbeat|measurement=ves-measurement|measurementsForVfScaling=ves-measurement|mobileFlow=ves-mobileflow|other=ves-other|stateChange=ves-statechange|thresholdCrossingAlert=ves-thresholdCrossingAlert|voiceQuality=ves-voicequality|sipSignaling=ves-sipsignaling|notification=ves-notification|pnfRegistration=ves-pnfRegistration|3GPP-FaultSupervision=ves-3gpp-fault-supervision|3GPP-Heartbeat=ves-3gpp-heartbeat|3GPP-Provisioning=ves-3gpp-provisioning|3GPP-PerformanceAssurance=ves-3gpp-performance-assurance
+collector.dynamic.config.update.frequency: "5"
+collector.externalSchema.checkflag: 1
+collector.externalSchema.mappingFileLocation: ./etc/externalRepo/schema-map.json
+collector.externalSchema.schemasLocation: ./etc/externalRepo/
+collector.inputQueue.maxPending: "8096"
+collector.keystore.file.location: ./etc/keystore
+collector.keystore.passwordfile: ./etc/passwordfile
+collector.schema.checkflag: "1"
+collector.schema.file: '{"v1":"./etc/CommonEventFormat_27.2.json","v2":"./etc/CommonEventFormat_27.2.json","v3":"./etc/CommonEventFormat_27.2.json","v4":"./etc/CommonEventFormat_27.2.json","v5":"./etc/CommonEventFormat_28.4.1.json","v7":"./etc/CommonEventFormat_30.2.1_ONAP.json"}'
+collector.service.port: "8080"
+collector.service.secure.port: "8443"
+collector.truststore.file.location: ./etc/truststore
+collector.truststore.passwordfile: ./etc/trustpasswordfile
+event.externalSchema.schemaRefPath: $.event.stndDefinedFields.schemaReference
+event.externalSchema.stndDefinedDataPath: $.event.stndDefinedFields.data
+event.transform.flag: "0"
+header.authlist: sample1,$2a$10$0buh.2WeYwN868YMwnNNEuNEAMNYVU9.FSMJGyIKV3dGET/7oGOi6|demouser,$2a$10$1cc.COcqV/d3iT2N7BjPG.S6ZKv2jpb9a5MV.o7lMih/GpjJRX.Ce
+services_calls: []
+streams_publishes:
+ ves-3gpp-fault-supervision:
+ dmaap_info:
+ topic_url: http://message-router:3904/events/unauthenticated.SEC_3GPP_FAULTSUPERVISION_OUTPUT
+ type: message_router
+ ves-3gpp-heartbeat:
+ dmaap_info:
+ topic_url: http://message-router:3904/events/unauthenticated.SEC_3GPP_HEARTBEAT_OUTPUT
+ type: message_router
+ ves-3gpp-performance-assurance:
+ dmaap_info:
+ topic_url: http://message-router:3904/events/unauthenticated.SEC_3GPP_PERFORMANCEASSURANCE_OUTPUT
+ type: message_router
+ ves-3gpp-provisioning:
+ dmaap_info:
+ topic_url: http://message-router:3904/events/unauthenticated.SEC_3GPP_PROVISIONING_OUTPUT
+ type: message_router
+ ves-fault:
+ dmaap_info:
+ topic_url: http://message-router:3904/events/unauthenticated.SEC_FAULT_OUTPUT
+ type: message_router
+ ves-heartbeat:
+ dmaap_info:
+ topic_url: http://message-router:3904/events/unauthenticated.SEC_HEARTBEAT_OUTPUT
+ type: message_router
+ ves-measurement:
+ dmaap_info:
+ topic_url: http://message-router:3904/events/unauthenticated.VES_MEASUREMENT_OUTPUT
+ type: message_router
+ ves-notification:
+ dmaap_info:
+ topic_url: http://message-router:3904/events/unauthenticated.VES_NOTIFICATION_OUTPUT
+ type: message_router
+ ves-other:
+ dmaap_info:
+ topic_url: http://message-router:3904/events/unauthenticated.SEC_OTHER_OUTPUT
+ type: message_router
+ ves-pnfRegistration:
+ dmaap_info:
+ topic_url: http://message-router:3904/events/unauthenticated.VES_PNFREG_OUTPUT
+ type: message_router
+
diff --git a/pom.xml b/pom.xml
index ae3941bd..0133ee44 100644
--- a/pom.xml
+++ b/pom.xml
@@ -26,7 +26,7 @@
</parent>
<groupId>org.onap.dcaegen2.collectors.ves</groupId>
<artifactId>VESCollector</artifactId>
- <version>1.11.1-SNAPSHOT</version>
+ <version>1.12.0-SNAPSHOT</version>
<name>dcaegen2-collectors-ves</name>
<description>VESCollector</description>
<properties>
@@ -72,7 +72,7 @@
<springfox-swagger2.version>3.0.0</springfox-swagger2.version>
<assertj-core.version>3.23.1</assertj-core.version>
<spring-boot-starter-test.version>2.2.13.RELEASE</spring-boot-starter-test.version>
- <sdk.version>1.8.10</sdk.version>
+ <sdk.version>1.9.0</sdk.version>
<guava.version>31.1-jre</guava.version>
<mock-server.version>5.13.2</mock-server.version>
<reactor-test.version>3.4.0</reactor-test.version>
diff --git a/src/main/java/org/onap/dcae/configuration/cbs/CbsClientConfigurationProvider.java b/src/main/java/org/onap/dcae/configuration/cbs/CbsClientConfigurationProvider.java
index fc88197c..2322f251 100644
--- a/src/main/java/org/onap/dcae/configuration/cbs/CbsClientConfigurationProvider.java
+++ b/src/main/java/org/onap/dcae/configuration/cbs/CbsClientConfigurationProvider.java
@@ -3,6 +3,7 @@
* org.onap.dcaegen2.collectors.ves
* ================================================================================
* Copyright (C) 2020 Nokia. All rights reserved.
+ * Copyright (C) 2022 AT&T 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.
@@ -32,13 +33,12 @@ public class CbsClientConfigurationProvider {
private static final Logger LOGGER = LoggerFactory.getLogger(CbsClientConfigurationProvider.class);
- private static final String DEFAULT_PROTOCOL = "http";
- private static final String DEFAULT_HOSTNAME = "config-binding-service";
- private static final int DEFAULT_PORT = 10000;
+
private static final String DEFAULT_APP_NAME = "dcae-ves-collector";
private static final String DEV_MODE_PROPERTY = "devMode";
private static final String CBS_PORT_PROPERTY = "cbsPort";
-
+ private static String CBS_CLIENT_CONFIG_PATH = "/app-config/application_config.yaml";
+
/**
* Returns configuration for CBS client.
* @return Production or dev configuration for CBS client, depends on application run arguments.
@@ -58,10 +58,8 @@ public class CbsClientConfigurationProvider {
@NotNull
private ImmutableCbsClientConfiguration getDevConfiguration() {
- return createCbsClientConfiguration(
- DEFAULT_PROTOCOL, DEFAULT_HOSTNAME, DEFAULT_APP_NAME,
- Integer.parseInt(System.getProperty(CBS_PORT_PROPERTY, String.valueOf(DEFAULT_PORT)))
- );
+ System.setProperty(CBS_CLIENT_CONFIG_PATH,"./etc/ves-application_config.yaml");
+ return createCbsClientConfiguration(DEFAULT_APP_NAME);
}
private boolean isDevModeEnabled() {
@@ -70,15 +68,11 @@ public class CbsClientConfigurationProvider {
private ImmutableCbsClientConfiguration getFallbackConfiguration() {
LOGGER.info("Falling back to use default CBS client configuration");
- return createCbsClientConfiguration(DEFAULT_PROTOCOL, DEFAULT_HOSTNAME, DEFAULT_APP_NAME, DEFAULT_PORT);
+ return createCbsClientConfiguration(DEFAULT_APP_NAME);
}
- private ImmutableCbsClientConfiguration createCbsClientConfiguration(String protocol, String hostname,
- String appName, Integer port) {
+ private ImmutableCbsClientConfiguration createCbsClientConfiguration(String appName) {
return ImmutableCbsClientConfiguration.builder()
- .protocol(protocol)
- .hostname(hostname)
- .port(port)
.appName(appName)
.build();
}
diff --git a/src/test/java/org/onap/dcae/configuration/cbs/CbsClientConfigurationProviderTest.java b/src/test/java/org/onap/dcae/configuration/cbs/CbsClientConfigurationProviderTest.java
index b3c06d9c..9cdd9973 100644
--- a/src/test/java/org/onap/dcae/configuration/cbs/CbsClientConfigurationProviderTest.java
+++ b/src/test/java/org/onap/dcae/configuration/cbs/CbsClientConfigurationProviderTest.java
@@ -3,6 +3,7 @@
* org.onap.dcaegen2.collectors.ves
* ================================================================================
* Copyright (C) 2020 Nokia. All rights reserved.
+ * Copyright (C) 2022 AT&T 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.
@@ -27,9 +28,6 @@ import org.onap.dcaegen2.services.sdk.rest.services.cbs.client.model.CbsClientCo
public class CbsClientConfigurationProviderTest {
- private static final String DEFAULT_PROTOCOL = "http";
- private static final String DEFAULT_HOSTNAME = "config-binding-service";
- private static final int DEFAULT_PORT = 10000;
private static final String DEFAULT_APP_NAME = "dcae-ves-collector";
@Test
@@ -39,9 +37,6 @@ public class CbsClientConfigurationProviderTest {
CbsClientConfiguration configuration = new CbsClientConfigurationProvider().get();
// then
- assertThat(configuration.protocol()).isEqualTo(DEFAULT_PROTOCOL);
- assertThat(configuration.hostname()).isEqualTo(DEFAULT_HOSTNAME);
- assertThat(configuration.port()).isEqualTo(DEFAULT_PORT);
assertThat(configuration.appName()).isEqualTo(DEFAULT_APP_NAME);
}
}
diff --git a/version.properties b/version.properties
index 6ed5b7a0..ad7c01ec 100644
--- a/version.properties
+++ b/version.properties
@@ -1,6 +1,6 @@
major=1
-minor=11
-patch=1
+minor=12
+patch=0
base_version=${major}.${minor}.${patch}
release_version=${base_version}
snapshot_version=${base_version}-SNAPSHOT