summaryrefslogtreecommitdiffstats
path: root/hv-collector-main/src
diff options
context:
space:
mode:
authorJakub Dudycz <jakub.dudycz@nokia.com>2018-07-23 14:51:00 +0200
committerPiotr Jaszczyk <piotr.jaszczyk@nokia.com>2018-08-03 08:51:17 +0200
commit53dbf8e66ad83c2d5f06279a0d7446e5e8be68e8 (patch)
tree44bdf2a4845440372fe8d63c40cb3112add2727f /hv-collector-main/src
parenta2d18b375631d010432089ed18db327c9e4f26bf (diff)
Configure xnf simulator api listen port
Closes ONAP-664 Closes ONAP-647 Change-Id: I8d1e57c0c66f1968925660fe47fa96a2a634c039 Signed-off-by: Jakub Dudycz <jakub.dudycz@nokia.com> Issue-ID: DCAEGEN2-601
Diffstat (limited to 'hv-collector-main/src')
-rw-r--r--hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/ArgBasedServerConfiguration.kt22
-rw-r--r--hv-collector-main/src/test/kotlin/org/onap/dcae/collectors/veshv/main/ArgBasedServerConfigurationTest.kt1
2 files changed, 12 insertions, 11 deletions
diff --git a/hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/ArgBasedServerConfiguration.kt b/hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/ArgBasedServerConfiguration.kt
index a11fe3d4..d8ee244b 100644
--- a/hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/ArgBasedServerConfiguration.kt
+++ b/hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/ArgBasedServerConfiguration.kt
@@ -28,17 +28,6 @@ import org.onap.dcae.collectors.veshv.utils.commandline.ArgBasedConfiguration
import org.onap.dcae.collectors.veshv.utils.commandline.CommandLineOption.*
import java.time.Duration
-internal object DefaultValues {
- const val PORT = 6061
- const val CONSUL_FIRST_REQUEST_DELAY = 10L
- const val CONSUL_REQUEST_INTERVAL = 5L
- const val CONFIG_URL = ""
- const val PRIVATE_KEY_FILE = "/etc/ves-hv/server.key"
- const val CERT_FILE = "/etc/ves-hv/server.crt"
- const val TRUST_CERT_FILE = "/etc/ves-hv/trust.crt"
- const val IDLE_TIMEOUT_SEC = 60L
-}
-
internal class ArgBasedServerConfiguration : ArgBasedConfiguration<ServerConfiguration>(DefaultParser()) {
override val cmdLineOptionsList = listOf(
LISTEN_PORT,
@@ -92,4 +81,15 @@ internal class ArgBasedServerConfiguration : ArgBasedConfiguration<ServerConfigu
trustedCert = stringPathToPath(trustCertFile)
)
}
+
+ internal object DefaultValues {
+ const val PORT = 6061
+ const val CONSUL_FIRST_REQUEST_DELAY = 10L
+ const val CONSUL_REQUEST_INTERVAL = 5L
+ const val CONFIG_URL = ""
+ const val PRIVATE_KEY_FILE = "/etc/ves-hv/server.key"
+ const val CERT_FILE = "/etc/ves-hv/server.crt"
+ const val TRUST_CERT_FILE = "/etc/ves-hv/trust.crt"
+ const val IDLE_TIMEOUT_SEC = 60L
+ }
}
diff --git a/hv-collector-main/src/test/kotlin/org/onap/dcae/collectors/veshv/main/ArgBasedServerConfigurationTest.kt b/hv-collector-main/src/test/kotlin/org/onap/dcae/collectors/veshv/main/ArgBasedServerConfigurationTest.kt
index 6da605f4..fb0067ec 100644
--- a/hv-collector-main/src/test/kotlin/org/onap/dcae/collectors/veshv/main/ArgBasedServerConfigurationTest.kt
+++ b/hv-collector-main/src/test/kotlin/org/onap/dcae/collectors/veshv/main/ArgBasedServerConfigurationTest.kt
@@ -27,6 +27,7 @@ import org.jetbrains.spek.api.dsl.given
import org.jetbrains.spek.api.dsl.it
import org.jetbrains.spek.api.dsl.on
import org.onap.dcae.collectors.veshv.domain.SecurityConfiguration
+import org.onap.dcae.collectors.veshv.main.ArgBasedServerConfiguration.*
import org.onap.dcae.collectors.veshv.model.ServerConfiguration
import java.nio.file.Paths
import java.time.Duration