2 * ============LICENSE_START=======================================================
3 * dcaegen2-collectors-veshv
4 * ================================================================================
5 * Copyright (C) 2018 NOKIA
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
20 package org.onap.dcae.collectors.veshv.utils.commandline
22 import org.apache.commons.cli.Option
25 enum class CommandLineOption(val option: Option) {
26 LISTEN_PORT(Option.builder("p")
27 .longOpt("listen-port")
33 CONSUL_CONFIG_URL(Option.builder("c")
34 .longOpt("config-url")
37 .desc("URL of ves configuration on consul")
40 CONSUL_FIRST_REQUEST_DELAY(Option.builder("d")
41 .longOpt("first-request-delay")
43 .desc("Delay of first request to consul in seconds")
46 CONSUL_REQUEST_INTERVAL(Option.builder("I")
47 .longOpt("request-interval")
49 .desc("Interval of consul configuration requests in seconds")
52 VES_HV_PORT(Option.builder("v")
56 .desc("VesHvCollector port")
59 VES_HV_HOST(Option.builder("h")
63 .desc("VesHvCollector host")
66 KAFKA_SERVERS(Option.builder("s")
67 .longOpt("kafka-bootstrap-servers")
70 .desc("Comma-separated Kafka bootstrap servers in <host>:<port> format")
73 KAFKA_TOPICS(Option.builder("f")
74 .longOpt("kafka-topics")
77 .desc("Comma-separated Kafka topics")
80 SSL_DISABLE(Option.builder("l")
81 .longOpt("ssl-disable")
82 .desc("Disable SSL encryption")
85 PRIVATE_KEY_FILE(Option.builder("k")
86 .longOpt("private-key-file")
88 .desc("File with private key in PEM format")
91 CERT_FILE(Option.builder("e")
94 .desc("File with certificate bundle")
97 TRUST_CERT_FILE(Option.builder("t")
98 .longOpt("trust-cert-file")
100 .desc("File with trusted certificate bundle for trusting connections")
103 IDLE_TIMEOUT_SEC(Option.builder("i")
104 .longOpt("idle-timeout-sec")
106 .desc("""Idle timeout for remote hosts. After given time without any data exchange the
107 |connection might be closed.""".trimMargin())
110 DUMMY_MODE(Option.builder("u")
112 .desc("If present will start in dummy mode (dummy external services)")