Remove default consul configuration
[dcaegen2/collectors/hv-ves.git] / hv-collector-utils / src / main / kotlin / org / onap / dcae / collectors / veshv / utils / commandline / CommandLineOption.kt
1 /*
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
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
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=========================================================
19  */
20 package org.onap.dcae.collectors.veshv.utils.commandline
21
22 import org.apache.commons.cli.Option
23
24
25 enum class CommandLineOption(val option: Option) {
26     LISTEN_PORT(Option.builder("p")
27             .longOpt("listen-port")
28             .required()
29             .hasArg()
30             .desc("Listen port")
31             .build()
32     ),
33     CONSUL_CONFIG_URL(Option.builder("c")
34             .longOpt("config-url")
35             .required()
36             .hasArg()
37             .desc("URL of ves configuration on consul")
38             .build()
39     ),
40     CONSUL_FIRST_REQUEST_DELAY(Option.builder("d")
41             .longOpt("first-request-delay")
42             .hasArg()
43             .desc("Delay of first request to consul in seconds")
44             .build()
45     ),
46     CONSUL_REQUEST_INTERVAL(Option.builder("I")
47             .longOpt("request-interval")
48             .hasArg()
49             .desc("Interval of consul configuration requests in seconds")
50             .build()
51     ),
52     VES_HV_PORT(Option.builder("v")
53             .longOpt("ves-port")
54             .required()
55             .hasArg()
56             .desc("VesHvCollector port")
57             .build()
58     ),
59     VES_HV_HOST(Option.builder("h")
60             .longOpt("ves-host")
61             .required()
62             .hasArg()
63             .desc("VesHvCollector host")
64             .build()
65     ),
66     KAFKA_SERVERS(Option.builder("s")
67             .longOpt("kafka-bootstrap-servers")
68             .required()
69             .hasArg()
70             .desc("Comma-separated Kafka bootstrap servers in <host>:<port> format")
71             .build()
72     ),
73     KAFKA_TOPICS(Option.builder("f")
74             .longOpt("kafka-topics")
75             .required()
76             .hasArg()
77             .desc("Comma-separated Kafka topics")
78             .build()
79     ),
80     SSL_DISABLE(Option.builder("l")
81             .longOpt("ssl-disable")
82             .desc("Disable SSL encryption")
83             .build()
84     ),
85     PRIVATE_KEY_FILE(Option.builder("k")
86             .longOpt("private-key-file")
87             .hasArg()
88             .desc("File with private key in PEM format")
89             .build()
90     ),
91     CERT_FILE(Option.builder("e")
92             .longOpt("cert-file")
93             .hasArg()
94             .desc("File with certificate bundle")
95             .build()
96     ),
97     TRUST_CERT_FILE(Option.builder("t")
98             .longOpt("trust-cert-file")
99             .hasArg()
100             .desc("File with trusted certificate bundle for trusting connections")
101             .build()
102     ),
103     IDLE_TIMEOUT_SEC(Option.builder("i")
104             .longOpt("idle-timeout-sec")
105             .hasArg()
106             .desc("""Idle timeout for remote hosts. After given time without any data exchange the
107                 |connection might be closed.""".trimMargin())
108             .build()
109     ),
110     DUMMY_MODE(Option.builder("u")
111             .longOpt("dummy")
112             .desc("If present will start in dummy mode (dummy external services)")
113             .build()
114     ),
115 }