Revise SDK version for CBSClient updates 17/131417/3
authorVijay Venkatesh Kumar <vv770d@att.com>
Mon, 10 Oct 2022 18:31:26 +0000 (14:31 -0400)
committerVijay Venkatesh Kumar <vv770d@att.com>
Thu, 27 Oct 2022 15:27:22 +0000 (15:27 +0000)
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>
Changelog.md
etc/ves_application_config.yaml [new file with mode: 0644]
pom.xml
src/main/java/org/onap/dcae/configuration/cbs/CbsClientConfigurationProvider.java
src/test/java/org/onap/dcae/configuration/cbs/CbsClientConfigurationProviderTest.java
version.properties

index 660da1f..1a390d2 100644 (file)
@@ -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 (file)
index 0000000..71b9b33
--- /dev/null
@@ -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 ae3941b..0133ee4 100644 (file)
--- 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>
index fc88197..2322f25 100644 (file)
@@ -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();
     }
index b3c06d9..9cdd997 100644 (file)
@@ -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);
     }
 }
index 6ed5b7a..ad7c01e 100644 (file)
@@ -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