Provide enhanced component description 07/84307/9
authorPiotr Jaszczyk <piotr.jaszczyk@nokia.com>
Fri, 5 Apr 2019 06:45:26 +0000 (08:45 +0200)
committerPiotr Jaszczyk <piotr.jaszczyk@nokia.com>
Tue, 9 Apr 2019 06:44:25 +0000 (08:44 +0200)
Change-Id: Iaed53f9acc9cdc830b2069de6d96d5f2965d9466
Issue-ID: DCAEGEN2-1394
Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
dpo/data-formats/hv-ves-7.1.0.dataformatspec.json
dpo/spec/hv-ves-collector.componentspec.json
sources/hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/server_handle.kt

index cc25e58..5aea73a 100644 (file)
@@ -8,8 +8,8 @@
     "dataformatversion": "1.0.0",
     "reference": {
         "name": "VES (NF Event Streaming) Specification",
-        "version": "7.1",
-        "format": "proto",
+        "version": "7.1.0",
+        "format": "Protocol Buffer",
         "url": "https://gerrit.onap.org/r/gitweb?p=dcaegen2.git;a=blob_plain;f=docs/sections/apis/ves-hv/VesEvent.proto;hb=HEAD"
     }
 }
\ No newline at end of file
index 0a020ae..13dd64a 100644 (file)
     "calls": [],
     "provides": []
   },
-  "parameters": [],
+  "parameters": [
+    {
+      "name": "logLevel",
+      "value": "DEBUG",
+      "description": "The logging level used for collector classes",
+      "sourced_at_deployment": false,
+      "policy_editable": false,
+      "designer_editable": false
+    },
+    {
+      "name": "server.listenPort",
+      "value": 6061,
+      "description": "The container listen port",
+      "sourced_at_deployment": false,
+      "policy_editable": false,
+      "designer_editable": false
+    },
+    {
+      "name": "server.idleTimeoutSec",
+      "value": 60,
+      "description": "Maximum inactive time in seconds for client connections after which client can be disconnected",
+      "sourced_at_deployment": false,
+      "policy_editable": false,
+      "designer_editable": false
+    },
+    {
+      "name": "cbs.firstRequestDelaySec",
+      "value": 10,
+      "description": "Delay in seconds after which the first CBS request will be made",
+      "sourced_at_deployment": false,
+      "policy_editable": false,
+      "designer_editable": false
+    },
+    {
+      "name": "cbs.requestIntervalSec",
+      "value": 5,
+      "description": "Interval in seconds of re-checking the CBS configuration",
+      "sourced_at_deployment": false,
+      "policy_editable": false,
+      "designer_editable": false
+    },
+    {
+      "name": "security.sslDisable",
+      "value": true,
+      "description": "Should be set to true in order to disable client authentication and tunnel encryption",
+      "sourced_at_deployment": false,
+      "policy_editable": false,
+      "designer_editable": false
+    },
+    {
+      "name": "security.keys.keyStoreFile",
+      "value": "/etc/ves-hv/ssl/keystore.p12",
+      "description": "Points to private key store file",
+      "sourced_at_deployment": false,
+      "policy_editable": false,
+      "designer_editable": false
+    },
+    {
+      "name": "security.keys.keyStorePassword",
+      "value": "onaponap",
+      "description": "Password for the key store",
+      "sourced_at_deployment": false,
+      "policy_editable": false,
+      "designer_editable": false
+    },
+    {
+      "name": "security.keys.trustStoreFile",
+      "value": "/etc/ves-hv/ssl/truststore.p12",
+      "description": "Points to trust store file which contains trusted client certificates and/or CAs",
+      "sourced_at_deployment": false,
+      "policy_editable": false,
+      "designer_editable": false
+    },
+    {
+      "name": "security.keys.trustStorePassword",
+      "value": "onaponap",
+      "description": "Password for the trust store",
+      "sourced_at_deployment": false,
+      "policy_editable": false,
+      "designer_editable": false
+    }
+  ],
   "auxilary": {
     "healthcheck": {
       "type": "script",
index 728d62b..9c0a6e1 100644 (file)
@@ -22,6 +22,7 @@ package org.onap.dcae.collectors.veshv.utils
 import org.onap.dcae.collectors.veshv.utils.logging.Logger
 import reactor.core.publisher.Mono
 import reactor.netty.DisposableServer
+import java.time.Duration
 
 /**
  * @author Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
@@ -48,14 +49,16 @@ class NettyServerHandle(private val ctx: DisposableServer,
                     .then(dispose())
 
     private fun dispose(): Mono<Void> =
-            Mono.create { callback ->
+            Mono.create<Int> { callback ->
                 logger.debug { "About to dispose NettyServer" }
                 ctx.dispose()
                 ctx.onDispose {
                     logger.debug { "Netty server disposed" }
-                    callback.success()
+                    callback.success(1)
                 }
             }
+                    .delayElement(boundPortReleaseLatency)
+                    .then()
 
     override fun await(): Mono<Void> = Mono.create { callback ->
         ctx.channel().closeFuture().addListener {
@@ -65,5 +68,6 @@ class NettyServerHandle(private val ctx: DisposableServer,
 
     companion object {
         private val logger = Logger(NettyServerHandle::class)
+        private val boundPortReleaseLatency = Duration.ofSeconds(1)
     }
 }