Add stndDefined domain to HV-VES 63/120063/2 1.8.0
authorMichal Banka <michal.banka@nokia.com>
Wed, 31 Mar 2021 11:43:34 +0000 (13:43 +0200)
committerMichal Banka <michal.banka@nokia.com>
Thu, 1 Apr 2021 08:51:50 +0000 (10:51 +0200)
- Updated SDK dependency to 1.8.2 so HV-VES recognizes
  stndDefinedNamespace field during events deserialization
- Added new domain stndDefined
- Added routings specific for stndDefined events which is controled
  by stndDefinedNamespace field, not domain
- Bumped HV-VES to 1.8.0

Signed-off-by: Michal Banka <michal.banka@nokia.com>
Change-Id: Ia27f2de7a4b64df5e8a182888006f7e8a941ca63
Issue-ID: DCAEGEN2-2702

30 files changed:
Changelog.md
build/hv-collector-analysis/pom.xml
build/hv-collector-coverage/pom.xml
build/pom.xml
dpo/spec/hv-ves-collector.componentspec.json
pom.xml
sources/hv-collector-commandline/pom.xml
sources/hv-collector-configuration/pom.xml
sources/hv-collector-core/pom.xml
sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/Router.kt
sources/hv-collector-core/src/test/kotlin/org/onap/dcae/collectors/veshv/impl/RouterTest.kt
sources/hv-collector-ct/pom.xml
sources/hv-collector-dcae-app-simulator/pom.xml
sources/hv-collector-domain/pom.xml
sources/hv-collector-domain/src/main/kotlin/org/onap/dcae/collectors/veshv/domain/VesEventDomain.kt
sources/hv-collector-domain/src/main/kotlin/org/onap/dcae/collectors/veshv/domain/VesEventStndDefinedNamespace.kt [new file with mode: 0644]
sources/hv-collector-health-check/pom.xml
sources/hv-collector-kafka-consumer/pom.xml
sources/hv-collector-kafka/pom.xml
sources/hv-collector-main/pom.xml
sources/hv-collector-server/pom.xml
sources/hv-collector-ssl/pom.xml
sources/hv-collector-test-utils/pom.xml
sources/hv-collector-test-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/tests/utils/vesEvents.kt
sources/hv-collector-utils/pom.xml
sources/hv-collector-ves-message-generator/pom.xml
sources/hv-collector-xnf-simulator/pom.xml
sources/pom.xml
tools/development/docker-compose.yml
tools/development/routing.json [new file with mode: 0644]

index 5931e54..6db7aa2 100644 (file)
@@ -4,8 +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.8.0] - 31/03/2021
+    - [DCAEGEN2-2701](https://jira.onap.org/browse/DCAEGEN2-2701) - Add stndDefined domain and stndDefined routing
+
 ## [1.7.0] - 29/03/2021
-    - [DCAEGEN2-2696](https://jira.onap.org/browse/DCAEGEN2-2696) - Update all HV-VES dependencies to newest versions    
+    - [DCAEGEN2-2696](https://jira.onap.org/browse/DCAEGEN2-2696) - Update all HV-VES dependencies to newest versions
 
 ## [1.6.0] - 17/12/2020
-    - [DCAEGEN2-2537](https://jira.onap.org/browse/DCAEGEN2-2537) - Upgrade Reactor and SpringBoot in DFC, PM-Mapper, BBS    
\ No newline at end of file
+    - [DCAEGEN2-2537](https://jira.onap.org/browse/DCAEGEN2-2537) - Upgrade Reactor and SpringBoot in DFC, PM-Mapper, BBS
\ No newline at end of file
index 618667f..9f25f9d 100644 (file)
@@ -3,7 +3,7 @@
   ~ ============LICENSE_START=======================================================
   ~ dcaegen2-collectors-veshv
   ~ ================================================================================
-  ~ Copyright (C) 2018 NOKIA
+  ~ Copyright (C) 2018-2021 NOKIA
   ~ ================================================================================
   ~ Licensed under the Apache License, Version 2.0 (the "License");
   ~ you may not use this file except in compliance with the License.
@@ -33,7 +33,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
         <artifactId>hv-collector-build</artifactId>
-        <version>1.7.0-SNAPSHOT</version>
+        <version>1.8.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
 
index eb2c6c2..78196d6 100644 (file)
@@ -3,7 +3,7 @@
   ~ ============LICENSE_START=======================================================
   ~ dcaegen2-collectors-veshv
   ~ ================================================================================
-  ~ Copyright (C) 2018-2019 NOKIA
+  ~ Copyright (C) 2018-2021 NOKIA
   ~ ================================================================================
   ~ Licensed under the Apache License, Version 2.0 (the "License");
   ~ you may not use this file except in compliance with the License.
@@ -33,7 +33,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
         <artifactId>hv-collector-build</artifactId>
-        <version>1.7.0-SNAPSHOT</version>
+        <version>1.8.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
 
index 4b743ef..e51dbb0 100644 (file)
@@ -3,7 +3,7 @@
   ~ ============LICENSE_START=======================================================
   ~ dcaegen2-collectors-veshv
   ~ ================================================================================
-  ~ Copyright (C) 2018 NOKIA
+  ~ Copyright (C) 2018-2021 NOKIA
   ~ ================================================================================
   ~ Licensed under the Apache License, Version 2.0 (the "License");
   ~ you may not use this file except in compliance with the License.
@@ -32,7 +32,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
         <artifactId>ves-hv-collector</artifactId>
-        <version>1.7.0-SNAPSHOT</version>
+        <version>1.8.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
 
index 7937e19..af24a45 100644 (file)
   "artifacts": [
     {
       "type": "docker image",
-      "uri": "nexus.onap.org:10001/onap/org.onap.dcaegen2.collectors.hv-ves.hv-collector-main:1.6.0"
+      "uri": "nexus.onap.org:10001/onap/org.onap.dcaegen2.collectors.hv-ves.hv-collector-main:1.8.0"
     }
   ]
 }
diff --git a/pom.xml b/pom.xml
index 6f47cca..cc172af 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
   ~ ============LICENSE_START=======================================================
   ~ dcaegen2-collectors-veshv
   ~ ================================================================================
-  ~ Copyright (C) 2018-2019 NOKIA
+  ~ Copyright (C) 2018-2021 NOKIA
   ~ ================================================================================
   ~ Licensed under the Apache License, Version 2.0 (the "License");
   ~ you may not use this file except in compliance with the License.
@@ -39,7 +39,7 @@
 
     <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
     <artifactId>ves-hv-collector</artifactId>
-    <version>1.7.0-SNAPSHOT</version>
+    <version>1.8.0-SNAPSHOT</version>
     <name>dcaegen2-collectors-veshv</name>
     <description>VES HighVolume Collector</description>
     <packaging>pom</packaging>
@@ -77,7 +77,7 @@
         <build-helper-maven-plugin.version>3.2.0</build-helper-maven-plugin.version>
         <jacoco.version>0.8.3</jacoco.version>
         <detekt.version>1.15.0</detekt.version>
-        <sdk.version>1.8.0</sdk.version>
+        <sdk.version>1.8.2</sdk.version>
 
         <!-- Protocol buffers -->
         <protobuf.version>4.0.0-rc-2</protobuf.version>
index 0048337..5346cbf 100644 (file)
@@ -7,7 +7,7 @@
   <parent>
     <artifactId>hv-collector-sources</artifactId>
     <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
-    <version>1.7.0-SNAPSHOT</version>
+    <version>1.8.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>hv-collector-commandline</artifactId>
index 4128442..542ed4f 100644 (file)
@@ -3,7 +3,7 @@
   ~ ============LICENSE_START=======================================================
   ~ dcaegen2-collectors-veshv
   ~ ================================================================================
-  ~ Copyright (C) 2019 NOKIA
+  ~ Copyright (C) 2019-2021 NOKIA
   ~ ================================================================================
   ~ Licensed under the Apache License, Version 2.0 (the "License");
   ~ you may not use this file except in compliance with the License.
@@ -33,7 +33,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
         <artifactId>hv-collector-sources</artifactId>
-        <version>1.7.0-SNAPSHOT</version>
+        <version>1.8.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>hv-collector-configuration</artifactId>
index 0f1d2c3..95820d0 100644 (file)
@@ -3,7 +3,7 @@
   ~ ============LICENSE_START=======================================================
   ~ dcaegen2-collectors-veshv
   ~ ================================================================================
-  ~ Copyright (C) 2018-2019 NOKIA
+  ~ Copyright (C) 2018-2021 NOKIA
   ~ ================================================================================
   ~ Licensed under the Apache License, Version 2.0 (the "License");
   ~ you may not use this file except in compliance with the License.
@@ -33,7 +33,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
         <artifactId>hv-collector-sources</artifactId>
-        <version>1.7.0-SNAPSHOT</version>
+        <version>1.8.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
 
index c4e877b..dfa4000 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * dcaegen2-collectors-veshv
  * ================================================================================
- * Copyright (C) 2018-2019 NOKIA
+ * Copyright (C) 2018-2021 NOKIA
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 package org.onap.dcae.collectors.veshv.impl
 
 import arrow.core.None
+import arrow.core.Option
 import arrow.core.toOption
 import org.onap.dcae.collectors.veshv.boundary.Metrics
 import org.onap.dcae.collectors.veshv.boundary.Sink
 import org.onap.dcae.collectors.veshv.boundary.SinkFactory
 import org.onap.dcae.collectors.veshv.config.api.model.Route
 import org.onap.dcae.collectors.veshv.config.api.model.Routing
-import org.onap.dcae.collectors.veshv.domain.logging.ClientContext
 import org.onap.dcae.collectors.veshv.domain.RoutedMessage
+import org.onap.dcae.collectors.veshv.domain.VesEventDomain
 import org.onap.dcae.collectors.veshv.domain.VesMessage
+import org.onap.dcae.collectors.veshv.domain.logging.ClientContext
 import org.onap.dcae.collectors.veshv.model.ConsumedMessage
 import org.onap.dcae.collectors.veshv.model.MessageDropCause
 import org.onap.dcae.collectors.veshv.utils.logging.Logger
@@ -36,9 +38,9 @@ import org.onap.ves.VesEventOuterClass.CommonEventHeader
 import reactor.core.publisher.Flux
 
 internal class Router internal constructor(private val routing: Routing,
-                                  private val messageSinks: Map<String, Lazy<Sink>>,
-                                  private val ctx: ClientContext,
-                                  private val metrics: Metrics) {
+                                           private val messageSinks: Map<String, Lazy<Sink>>,
+                                           private val ctx: ClientContext,
+                                           private val metrics: Metrics) {
     constructor(routing: Routing,
                 sinkFactory: SinkFactory,
                 ctx: ClientContext,
@@ -70,8 +72,14 @@ internal class Router internal constructor(private val routing: Routing,
     }
 
 
-    private fun routeFor(header: CommonEventHeader) =
-            routing.find { it.domain == header.domain }.toOption()
+    private fun routeFor(header: CommonEventHeader): Option<Route> =
+            routing.find {
+                if (header.domain == VesEventDomain.STND_DEFINED.domainName)
+                    it.domain == header.stndDefinedNamespace
+                else {
+                    it.domain == header.domain
+                }
+            }.toOption()
 
     private fun messageSinkFor(sinkTopic: String) = messageSinks
             .getOrElse(sinkTopic) {
index 533581d..ad655f6 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * dcaegen2-collectors-veshv
  * ================================================================================
- * Copyright (C) 2018-2019 NOKIA
+ * Copyright (C) 2018-2021 NOKIA
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,9 +33,8 @@ import org.onap.dcae.collectors.veshv.config.api.model.Route
 import org.onap.dcae.collectors.veshv.config.api.model.Routing
 import org.onap.dcae.collectors.veshv.boundary.Sink
 import org.onap.dcae.collectors.veshv.domain.RoutedMessage
-import org.onap.dcae.collectors.veshv.domain.VesEventDomain.PERF3GPP
-import org.onap.dcae.collectors.veshv.domain.VesEventDomain.HEARTBEAT
-import org.onap.dcae.collectors.veshv.domain.VesEventDomain.SYSLOG
+import org.onap.dcae.collectors.veshv.domain.VesEventDomain
+import org.onap.dcae.collectors.veshv.domain.VesEventStndDefinedNamespace
 import org.onap.dcae.collectors.veshv.domain.logging.ClientContext
 import org.onap.dcae.collectors.veshv.domain.VesMessage
 import org.onap.dcae.collectors.veshv.model.SuccessfullyConsumedMessage
@@ -55,10 +54,12 @@ object RouterTest : Spek({
     describe("Router") {
 
         whenever(perf3gppSinkMock.topicName()).thenReturn(perf3gppTopic)
+        whenever(ves3gppHeartbeatSinkMock.topicName()).thenReturn(ves3gppHeartbeatTopic)
         whenever(syslogSinkMock.topicName()).thenReturn(syslogTopic)
 
         val messageSinkMap = mapOf(
                 Pair(perf3gppTopic, lazyOf(messageSinkMock)),
+                Pair(ves3gppHeartbeatTopic, lazyOf(messageSinkMock)),
                 Pair(syslogTopic, lazyOf(messageSinkMock))
         )
 
@@ -72,7 +73,7 @@ object RouterTest : Spek({
                 it("should be properly routed") {
                     val result = cut.route(perf3gppMessage)
 
-                    assertThat(result).isNotNull()
+                    assertThat(result).isNotNull
                     StepVerifier.create(result)
                             .expectNext(successfullyConsumedPerf3gppMessage)
                             .verifyComplete()
@@ -97,8 +98,23 @@ object RouterTest : Spek({
                 }
             }
 
+            on("message with existing stndDefined route (ves3gppHeartbeat)") {
+                whenever(messageSinkMock.send(routedVes3gppHeartbeatMessage))
+                        .thenReturn(Flux.just(successfullyConsumedVes3gppHeartbeatMessage))
+                val result = cut.route(ves3gppHeartbeatMessage)
+
+                it("should be properly routed") {
+                    StepVerifier.create(result)
+                            .expectNext(successfullyConsumedVes3gppHeartbeatMessage)
+                            .verifyComplete()
+
+                    verify(ves3gppHeartbeatSinkMock).topicName()
+                    verify(messageSinkMock).send(routedVes3gppHeartbeatMessage)
+                }
+            }
+
             on("message with unknown route") {
-                val message = VesMessage(commonHeader(HEARTBEAT), emptyWireProtocolFrame())
+                val message = VesMessage(commonHeader(VesEventDomain.HEARTBEAT), emptyWireProtocolFrame())
                 val result = cut.route(message)
 
                 it("should not have route available") {
@@ -113,23 +129,34 @@ object RouterTest : Spek({
 private fun router(routing: Routing, kafkaPublisherMap: Map<String, Lazy<Sink>>) =
         Router(routing, kafkaPublisherMap, ClientContext(), mock())
 
-private val perf3gppTopic = "PERF_PERF"
+private const val perf3gppTopic = "PERF_PERF"
 private val perf3gppSinkMock = mock<KafkaSink>()
-private val default3gppRoute = Route(PERF3GPP.domainName, perf3gppSinkMock)
+private val default3gppRoute = Route(VesEventDomain.PERF3GPP.domainName, perf3gppSinkMock)
+
+private const val ves3gppHeartbeatTopic = "SEC_3GPP_HEARTBEAT_OUTPUT"
+private val ves3gppHeartbeatSinkMock = mock<KafkaSink>()
+private val defaultVes3gppHeartbeatRoute =
+        Route(VesEventStndDefinedNamespace.VES_3GPP_HEARTBEAT.stndDefinedNamespace, ves3gppHeartbeatSinkMock)
 
-private val syslogTopic = "SYS_LOG"
+private const val syslogTopic = "SYS_LOG"
 private val syslogSinkMock = mock<KafkaSink>()
-private val defaultSyslogRoute = Route(SYSLOG.domainName, syslogSinkMock)
+private val defaultSyslogRoute = Route(VesEventDomain.SYSLOG.domainName, syslogSinkMock)
+
+private val defaultRouting = listOf(default3gppRoute, defaultVes3gppHeartbeatRoute, defaultSyslogRoute)
 
-private val defaultRouting = listOf(default3gppRoute, defaultSyslogRoute)
 
 private val messageSinkMock = mock<Sink>()
 private val default_partition = None
 
-private val perf3gppMessage = VesMessage(commonHeader(PERF3GPP), emptyWireProtocolFrame())
+private val perf3gppMessage = VesMessage(commonHeader(VesEventDomain.PERF3GPP), emptyWireProtocolFrame())
 private val routedPerf3GppMessage = RoutedMessage(perf3gppMessage, perf3gppTopic, default_partition)
 private val successfullyConsumedPerf3gppMessage = SuccessfullyConsumedMessage(routedPerf3GppMessage)
 
-private val syslogMessage = VesMessage(commonHeader(SYSLOG), emptyWireProtocolFrame())
+private val ves3gppHeartbeatMessage = VesMessage(commonHeader(domain = VesEventDomain.STND_DEFINED,
+        stndDefinedNamespace = VesEventStndDefinedNamespace.VES_3GPP_HEARTBEAT), emptyWireProtocolFrame())
+private val routedVes3gppHeartbeatMessage = RoutedMessage(ves3gppHeartbeatMessage, ves3gppHeartbeatTopic, default_partition)
+private val successfullyConsumedVes3gppHeartbeatMessage = SuccessfullyConsumedMessage(routedVes3gppHeartbeatMessage)
+
+private val syslogMessage = VesMessage(commonHeader(VesEventDomain.SYSLOG), emptyWireProtocolFrame())
 private val routedSyslogMessage = RoutedMessage(syslogMessage, syslogTopic, default_partition)
 private val successfullyConsumedSyslogMessage = SuccessfullyConsumedMessage(routedSyslogMessage)
\ No newline at end of file
index b0737f8..953f84c 100644 (file)
@@ -3,7 +3,7 @@
   ~ ============LICENSE_START=======================================================
   ~ dcaegen2-collectors-veshv
   ~ ================================================================================
-  ~ Copyright (C) 2018 NOKIA
+  ~ Copyright (C) 2018-2021 NOKIA
   ~ ================================================================================
   ~ Licensed under the Apache License, Version 2.0 (the "License");
   ~ you may not use this file except in compliance with the License.
@@ -33,7 +33,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
         <artifactId>hv-collector-sources</artifactId>
-        <version>1.7.0-SNAPSHOT</version>
+        <version>1.8.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
 
index 45771e4..797a70a 100644 (file)
@@ -3,7 +3,7 @@
   ~ ============LICENSE_START=======================================================
   ~ dcaegen2-collectors-veshv
   ~ ================================================================================
-  ~ Copyright (C) 2018 NOKIA
+  ~ Copyright (C) 2018-2021 NOKIA
   ~ ================================================================================
   ~ Licensed under the Apache License, Version 2.0 (the "License");
   ~ you may not use this file except in compliance with the License.
@@ -33,7 +33,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
         <artifactId>hv-collector-sources</artifactId>
-        <version>1.7.0-SNAPSHOT</version>
+        <version>1.8.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
 
index 635f2df..1ff2131 100644 (file)
@@ -3,7 +3,7 @@
   ~ ============LICENSE_START=======================================================
   ~ dcaegen2-collectors-veshv
   ~ ================================================================================
-  ~ Copyright (C) 2018-2019 NOKIA
+  ~ Copyright (C) 2018-2021 NOKIA
   ~ ================================================================================
   ~ Licensed under the Apache License, Version 2.0 (the "License");
   ~ you may not use this file except in compliance with the License.
@@ -33,7 +33,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
         <artifactId>hv-collector-sources</artifactId>
-        <version>1.7.0-SNAPSHOT</version>
+        <version>1.8.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>hv-collector-domain</artifactId>
index 0b18337..b5b3d0a 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * dcaegen2-collectors-veshv
  * ================================================================================
- * Copyright (C) 2018 NOKIA
+ * Copyright (C) 2018-2021 NOKIA
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -28,6 +28,7 @@ enum class VesEventDomain(val domainName: String) {
     PNF_REGISTRATION("pnfRegistration"),
     SIP_SIGNALING("sipSignaling"),
     STATE_CHANGE("stateChange"),
+    STND_DEFINED("stndDefined"),
     SYSLOG("syslog"),
     THRESHOLD_CROSSING_ALERT("thresholdCrossingAlert"),
     VOICE_QUALITY("voiceQuality"),
diff --git a/sources/hv-collector-domain/src/main/kotlin/org/onap/dcae/collectors/veshv/domain/VesEventStndDefinedNamespace.kt b/sources/hv-collector-domain/src/main/kotlin/org/onap/dcae/collectors/veshv/domain/VesEventStndDefinedNamespace.kt
new file mode 100644 (file)
index 0000000..05c7684
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * ============LICENSE_START=======================================================
+ * dcaegen2-collectors-veshv
+ * ================================================================================
+ * Copyright (C) 2018-2021 NOKIA
+ * ================================================================================
+ * 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.dcae.collectors.veshv.domain
+
+enum class VesEventStndDefinedNamespace(val stndDefinedNamespace: String) {
+    VES_3GPP_FAULT_SUPERVISION("ves-3gpp-fault-supervision"),
+    VES_3GPP_PROVISIONING("ves-3gpp-provisioning"),
+    VES_3GPP_HEARTBEAT("ves-3gpp-heartbeat"),
+    VES_3GPP_PERFORMANCE_ASSURANCE("ves-3gpp-performance-assurance")
+}
index f215d4c..ed1bd2a 100644 (file)
@@ -15,7 +15,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
         <artifactId>hv-collector-sources</artifactId>
-        <version>1.7.0-SNAPSHOT</version>
+        <version>1.8.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>hv-collector-health-check</artifactId>
index 6b6f025..8537e0e 100644 (file)
@@ -15,7 +15,7 @@
   <parent>
     <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
     <artifactId>hv-collector-sources</artifactId>
-    <version>1.7.0-SNAPSHOT</version>
+    <version>1.8.0-SNAPSHOT</version>
     <relativePath>..</relativePath>
   </parent>
 
index 67303ec..cfeeb33 100644 (file)
@@ -15,7 +15,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
         <artifactId>hv-collector-sources</artifactId>
-        <version>1.7.0-SNAPSHOT</version>
+        <version>1.8.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
 
index 75d1872..91d30c6 100644 (file)
@@ -3,7 +3,7 @@
   ~ ============LICENSE_START=======================================================
   ~ dcaegen2-collectors-veshv
   ~ ================================================================================
-  ~ Copyright (C) 2018 NOKIA
+  ~ Copyright (C) 2018-2021 NOKIA
   ~ ================================================================================
   ~ Licensed under the Apache License, Version 2.0 (the "License");
   ~ you may not use this file except in compliance with the License.
@@ -33,7 +33,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
         <artifactId>hv-collector-sources</artifactId>
-        <version>1.7.0-SNAPSHOT</version>
+        <version>1.8.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>hv-collector-main</artifactId>
index bfc5cbb..a311c13 100644 (file)
@@ -3,7 +3,7 @@
   ~ ============LICENSE_START=======================================================
   ~ dcaegen2-collectors-veshv
   ~ ================================================================================
-  ~ Copyright (C) 2019 NOKIA
+  ~ Copyright (C) 2019-2021 NOKIA
   ~ ================================================================================
   ~ Licensed under the Apache License, Version 2.0 (the "License");
   ~ you may not use this file except in compliance with the License.
@@ -33,7 +33,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
         <artifactId>hv-collector-sources</artifactId>
-        <version>1.7.0-SNAPSHOT</version>
+        <version>1.8.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
 
index 160d17d..1e7a235 100644 (file)
@@ -3,7 +3,7 @@
   ~ ============LICENSE_START=======================================================
   ~ dcaegen2-collectors-veshv
   ~ ================================================================================
-  ~ Copyright (C) 2018 NOKIA
+  ~ Copyright (C) 2018-2021 NOKIA
   ~ ================================================================================
   ~ Licensed under the Apache License, Version 2.0 (the "License");
   ~ you may not use this file except in compliance with the License.
@@ -33,7 +33,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
         <artifactId>hv-collector-sources</artifactId>
-        <version>1.7.0-SNAPSHOT</version>
+        <version>1.8.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
 
index d1e7566..67eee86 100644 (file)
@@ -14,7 +14,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
         <artifactId>hv-collector-sources</artifactId>
-        <version>1.7.0-SNAPSHOT</version>
+        <version>1.8.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
 
index 3013e90..2583d21 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * dcaegen2-collectors-veshv
  * ================================================================================
- * Copyright (C) 2018 NOKIA
+ * Copyright (C) 2018-2021 NOKIA
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -25,7 +25,7 @@ import com.google.protobuf.MessageLite
 import org.onap.dcae.collectors.veshv.domain.ByteData
 import org.onap.dcae.collectors.veshv.domain.PayloadContentType
 import org.onap.dcae.collectors.veshv.domain.VesEventDomain
-import org.onap.dcae.collectors.veshv.domain.VesEventDomain.PERF3GPP
+import org.onap.dcae.collectors.veshv.domain.VesEventStndDefinedNamespace
 import org.onap.dcae.collectors.veshv.domain.WireFrameMessage
 import org.onap.ves.VesEventOuterClass
 import org.onap.ves.VesEventOuterClass.CommonEventHeader
@@ -34,7 +34,7 @@ import java.time.Instant
 import java.time.temporal.Temporal
 import java.util.UUID.randomUUID
 
-fun vesEvent(domain: VesEventDomain = PERF3GPP,
+fun vesEvent(domain: VesEventDomain = VesEventDomain.PERF3GPP,
              id: String = randomUUID().toString(),
              eventFields: ByteString = ByteString.EMPTY,
              vesEventListenerVersion: String = "7.0.2"
@@ -50,32 +50,37 @@ fun vesEvent(commonEventHeader: CommonEventHeader,
                 .setEventFields(eventFields)
                 .build()
 
-fun commonHeader(domain: VesEventDomain = PERF3GPP,
+fun commonHeader(domain: VesEventDomain = VesEventDomain.PERF3GPP,
                  id: String = randomUUID().toString(),
                  vesEventListenerVersion: String = "7.0.2",
                  priority: Priority = Priority.NORMAL,
-                 lastEpochMicrosec: Long = 100000005
-): CommonEventHeader =
-        CommonEventHeader.newBuilder()
-                .setVersion("sample-version")
-                .setDomain(domain.domainName)
-                .setSequence(1)
-                .setPriority(priority)
-                .setEventId(id)
-                .setEventName("sample-event-name")
-                .setEventType("sample-event-type")
-                .setStartEpochMicrosec(100000000)
-                .setLastEpochMicrosec(lastEpochMicrosec)
-                .setNfNamingCode("sample-nf-naming-code")
-                .setNfcNamingCode("sample-nfc-naming-code")
-                .setNfVendorName("vendor-name")
-                .setReportingEntityId(ByteString.copyFromUtf8("sample-reporting-entity-id"))
-                .setReportingEntityName("sample-reporting-entity-name")
-                .setSourceId(ByteString.copyFromUtf8("sample-source-id"))
-                .setSourceName("sample-source-name")
-                .setTimeZoneOffset("+1")
-                .setVesEventListenerVersion(vesEventListenerVersion)
-                .build()
+                 lastEpochMicrosec: Long = 100000005,
+                 stndDefinedNamespace: VesEventStndDefinedNamespace? = null): CommonEventHeader {
+    val builder = CommonEventHeader.newBuilder().setVersion("sample-version")
+            .setDomain(domain.domainName)
+            .setSequence(1)
+            .setPriority(priority)
+            .setEventId(id)
+            .setEventName("sample-event-name")
+            .setEventType("sample-event-type")
+            .setStartEpochMicrosec(100000000)
+            .setLastEpochMicrosec(lastEpochMicrosec)
+            .setNfNamingCode("sample-nf-naming-code")
+            .setNfcNamingCode("sample-nfc-naming-code")
+            .setNfVendorName("vendor-name")
+            .setReportingEntityId(ByteString.copyFromUtf8("sample-reporting-entity-id"))
+            .setReportingEntityName("sample-reporting-entity-name")
+            .setSourceId(ByteString.copyFromUtf8("sample-source-id"))
+            .setSourceName("sample-source-name")
+            .setTimeZoneOffset("+1")
+            .setVesEventListenerVersion(vesEventListenerVersion)
+
+    stndDefinedNamespace?.let {
+        builder.setStndDefinedNamespace(stndDefinedNamespace.stndDefinedNamespace)
+    }
+    return builder.build()
+}
+
 
 fun emptyWireProtocolFrame(): WireFrameMessage = wireProtocolFrameWithPayloadSize(0)
 
index 2718705..83c41af 100644 (file)
@@ -3,7 +3,7 @@
   ~ ============LICENSE_START=======================================================
   ~ dcaegen2-collectors-veshv
   ~ ================================================================================
-  ~ Copyright (C) 2018-2019 NOKIA
+  ~ Copyright (C) 2018-2021 NOKIA
   ~ ================================================================================
   ~ Licensed under the Apache License, Version 2.0 (the "License");
   ~ you may not use this file except in compliance with the License.
@@ -33,7 +33,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
         <artifactId>hv-collector-sources</artifactId>
-        <version>1.7.0-SNAPSHOT</version>
+        <version>1.8.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
 
index 0fa7265..3fe2a95 100644 (file)
@@ -3,7 +3,7 @@
   ~ ============LICENSE_START=======================================================
   ~ dcaegen2-collectors-veshv
   ~ ================================================================================
-  ~ Copyright (C) 2018 NOKIA
+  ~ Copyright (C) 2018-2021 NOKIA
   ~ ================================================================================
   ~ Licensed under the Apache License, Version 2.0 (the "License");
   ~ you may not use this file except in compliance with the License.
@@ -33,7 +33,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
         <artifactId>hv-collector-sources</artifactId>
-        <version>1.7.0-SNAPSHOT</version>
+        <version>1.8.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
 
index 73057dc..5c32e15 100644 (file)
@@ -3,7 +3,7 @@
   ~ ============LICENSE_START=======================================================
   ~ dcaegen2-collectors-veshv
   ~ ================================================================================
-  ~ Copyright (C) 2018 NOKIA
+  ~ Copyright (C) 2018-2021 NOKIA
   ~ ================================================================================
   ~ Licensed under the Apache License, Version 2.0 (the "License");
   ~ you may not use this file except in compliance with the License.
@@ -33,7 +33,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
         <artifactId>hv-collector-sources</artifactId>
-        <version>1.7.0-SNAPSHOT</version>
+        <version>1.8.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
 
index 9b22738..964ff45 100644 (file)
@@ -3,7 +3,7 @@
   ~ ============LICENSE_START=======================================================
   ~ dcaegen2-collectors-veshv
   ~ ================================================================================
-  ~ Copyright (C) 2018 NOKIA
+  ~ Copyright (C) 2018-2021 NOKIA
   ~ ================================================================================
   ~ Licensed under the Apache License, Version 2.0 (the "License");
   ~ you may not use this file except in compliance with the License.
@@ -33,7 +33,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
         <artifactId>ves-hv-collector</artifactId>
-        <version>1.7.0-SNAPSHOT</version>
+        <version>1.8.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
 
                             <dependency>
                                 <groupId>${project.groupId}</groupId>
                                 <artifactId>hv-collector-analysis</artifactId>
-                                <version>1.7.0-SNAPSHOT</version>
+                                <version>1.8.0-SNAPSHOT</version>
                             </dependency>
                         </dependencies>
                     </plugin>
index 1f655df..df8fee0 100644 (file)
@@ -56,22 +56,12 @@ services:
   consul-config:
     image: docker.io/consul:1.0.6
     restart: on-failure
-    command: ["kv", "put", "-http-addr=http://consul-server:8500", "dcae-hv-ves-collector", '{
-                                              "streams_publishes": {
-                                                "perf3gpp": {
-                                                  "type": "kafka",
-                                                  "aaf_credentials": {
-                                                    "username": "admin",
-                                                    "password": "admin_secret"
-                                                  },
-                                                  "kafka_info": {
-                                                    "bootstrap_servers": "message-router-kafka-0:9093",
-                                                    "topic_name": "HV_VES_PERF3GPP"
-                                                  }
-                                                }
-                                              }
-                                            }'
-    ]
+    command: "kv put -http-addr=http://consul-server:8500 dcae-hv-ves-collector '@/home/consul/routing.json'"
+    volumes:
+      - type: bind
+        source: ./routing.json
+        target: /home/consul/routing.json
+        read_only: true
     depends_on:
       - consul-server
 
@@ -89,7 +79,7 @@ services:
   #
 
   ves-hv-collector:
-    image: onap/org.onap.dcaegen2.collectors.hv-ves.hv-collector-main:1.7.0-SNAPSHOT
+    image: onap/org.onap.dcaegen2.collectors.hv-ves.hv-collector-main:1.8.0-SNAPSHOT
     ports:
       - "6060:6060"
       - "6061:6061/tcp"
@@ -120,7 +110,7 @@ services:
   #
 
   xnf-simulator:
-    image: onap/org.onap.dcaegen2.collectors.hv-ves.hv-collector-xnf-simulator:1.7.0-SNAPSHOT
+    image: onap/org.onap.dcaegen2.collectors.hv-ves.hv-collector-xnf-simulator:1.8.0-SNAPSHOT
     ports:
       - "6062:6062/tcp"
       - "6063:6063"
@@ -144,12 +134,12 @@ services:
       - ../ssl/:/etc/ves-hv/
 
   dcae-app-simulator:
-    image: onap/org.onap.dcaegen2.collectors.hv-ves.hv-collector-dcae-app-simulator:1.7.0-SNAPSHOT
+    image: onap/org.onap.dcaegen2.collectors.hv-ves.hv-collector-dcae-app-simulator:1.8.0-SNAPSHOT
     ports:
       - "6064:6064/tcp"
     command: ["--listen-port", "6064",
               "--kafka-bootstrap-servers", "message-router-kafka-0:9092",
-              "--kafka-topics", "HV_VES_PERF3GPP"]
+              "--kafka-topics", "HV_VES_PERF3GPP,SEC_3GPP_FAULTSUPERVISION_OUTPUT,SEC_3GPP_PROVISIONING_OUTPUT,SEC_3GPP_HEARTBEAT_OUTPUT,SEC_3GPP_PERFORMANCEASSURANCE_OUTPUT"]
     depends_on:
       - message-router-kafka-0
 
diff --git a/tools/development/routing.json b/tools/development/routing.json
new file mode 100644 (file)
index 0000000..caeafd2
--- /dev/null
@@ -0,0 +1,59 @@
+{
+  "streams_publishes": {
+    "perf3gpp": {
+      "type": "kafka",
+      "aaf_credentials": {
+        "username": "admin",
+        "password": "admin_secret"
+      },
+      "kafka_info": {
+        "bootstrap_servers": "message-router-kafka-0:9093",
+        "topic_name": "HV_VES_PERF3GPP"
+      }
+    },
+    "ves-3gpp-fault-supervision": {
+      "type": "kafka",
+      "aaf_credentials": {
+        "username": "admin",
+        "password": "admin_secret"
+      },
+      "kafka_info": {
+        "bootstrap_servers": "message-router-kafka-0:9093",
+        "topic_name": "SEC_3GPP_FAULTSUPERVISION_OUTPUT"
+      }
+    },
+    "ves-3gpp-provisioning": {
+      "type": "kafka",
+      "aaf_credentials": {
+        "username": "admin",
+        "password": "admin_secret"
+      },
+      "kafka_info": {
+        "bootstrap_servers": "message-router-kafka-0:9093",
+        "topic_name": "SEC_3GPP_PROVISIONING_OUTPUT"
+      }
+    },
+    "ves-3gpp-heartbeat": {
+      "type": "kafka",
+      "aaf_credentials": {
+        "username": "admin",
+        "password": "admin_secret"
+      },
+      "kafka_info": {
+        "bootstrap_servers": "message-router-kafka-0:9093",
+        "topic_name": "SEC_3GPP_HEARTBEAT_OUTPUT"
+      }
+    },
+    "ves-3gpp-performance-assurance": {
+      "type": "kafka",
+      "aaf_credentials": {
+        "username": "admin",
+        "password": "admin_secret"
+      },
+      "kafka_info": {
+        "bootstrap_servers": "message-router-kafka-0:9093",
+        "topic_name": "SEC_3GPP_PERFORMANCEASSURANCE_OUTPUT"
+      }
+    }
+  }
+}
\ No newline at end of file