6180adf58a11a5010ea901b63b46c7781ccb712a
[dcaegen2/collectors/hv-ves.git] /
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             .hasArg()
36             .desc("URL of ves configuration on consul")
37             .build()
38     ),
39     CONSUL_FIRST_REQUEST_DELAY(Option.builder("d")
40             .longOpt("first-request-delay")
41             .hasArg()
42             .desc("Delay of first request to consul in seconds")
43             .build()
44     ),
45     CONSUL_REQUEST_INTERVAL(Option.builder("I")
46             .longOpt("request-interval")
47             .hasArg()
48             .desc("Interval of consul configuration requests in seconds")
49             .build()
50     ),
51     VES_HV_PORT(Option.builder("v")
52             .longOpt("ves-port")
53             .required()
54             .hasArg()
55             .desc("VesHvCollector port")
56             .build()
57     ),
58     VES_HV_HOST(Option.builder("h")
59             .longOpt("ves-host")
60             .required()
61             .hasArg()
62             .desc("VesHvCollector host")
63             .build()
64     ),
65     KAFKA_SERVERS(Option.builder("s")
66             .longOpt("kafka-bootstrap-servers")
67             .required()
68             .hasArg()
69             .desc("Comma-separated Kafka bootstrap servers in <host>:<port> format")
70             .build()
71     ),
72     KAFKA_TOPICS(Option.builder("f")
73             .longOpt("kafka-topics")
74             .required()
75             .hasArg()
76             .desc("Comma-separated Kafka topics")
77             .build()
78     ),
79     SSL_DISABLE(Option.builder("l")
80             .longOpt("ssl-disable")
81             .desc("Disable SSL encryption")
82             .build()
83     ),
84     PRIVATE_KEY_FILE(Option.builder("k")
85             .longOpt("private-key-file")
86             .hasArg()
87             .desc("File with private key in PEM format")
88             .build()
89     ),
90     CERT_FILE(Option.builder("e")
91             .longOpt("cert-file")
92             .hasArg()
93             .desc("File with certificate bundle")
94             .build()
95     ),
96     TRUST_CERT_FILE(Option.builder("t")
97             .longOpt("trust-cert-file")
98             .hasArg()
99             .desc("File with trusted certificate bundle for trusting connections")
100             .build()
101     ),
102     IDLE_TIMEOUT_SEC(Option.builder("i")
103             .longOpt("idle-timeout-sec")
104             .hasArg()
105             .desc("""Idle timeout for remote hosts. After given time without any data exchange the
106                 |connection might be closed.""".trimMargin())
107             .build()
108     ),
109     DUMMY_MODE(Option.builder("u")
110             .longOpt("dummy")
111             .desc("If present will start in dummy mode (dummy external services)")
112             .build()
113     ),
114 }