942ca31fa099711185ac307f9a642612db00c29b
[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             .hasArg()
29             .desc("Listen port")
30             .build()
31     ),
32     CONSUL_CONFIG_URL(Option.builder("c")
33             .longOpt("config-url")
34             .hasArg()
35             .desc("URL of ves configuration on consul")
36             .build()
37     ),
38     VES_HV_PORT(Option.builder("p")
39             .longOpt("ves-port")
40             .required()
41             .hasArg()
42             .desc("VesHvCollector port")
43             .build()
44     ),
45     VES_HV_HOST(Option.builder("h")
46             .longOpt("ves-host")
47             .required()
48             .hasArg()
49             .desc("VesHvCollector host")
50             .build()
51     ),
52     MESSAGES_TO_SEND_AMOUNT(Option.builder("m")
53             .longOpt("messages")
54             .hasArg()
55             .desc("Amount of messages to send")
56             .build()
57     ),
58     KAFKA_SERVERS(Option.builder("s")
59             .longOpt("kafka-bootstrap-servers")
60             .required()
61             .hasArg()
62             .desc("Comma-separated Kafka bootstrap servers in <host>:<port> format")
63             .build()
64     ),
65     KAFKA_TOPICS(Option.builder("f")
66             .longOpt("kafka-topics")
67             .required()
68             .hasArg()
69             .desc("Comma-separated Kafka topics")
70             .build()
71     ),
72     PRIVATE_KEY_FILE(Option.builder("k")
73             .longOpt("private-key-file")
74             .hasArg()
75             .desc("File with private key in PEM format")
76             .build()
77     ),
78     CERT_FILE(Option.builder("e")
79             .longOpt("cert-file")
80             .hasArg()
81             .desc("File with certificate bundle")
82             .build()
83     ),
84     TRUST_CERT_FILE(Option.builder("t")
85             .longOpt("trust-cert-file")
86             .hasArg()
87             .desc("File with trusted certificate bundle for trusting connections")
88             .build()
89     ),
90     IDLE_TIMEOUT_SEC(Option.builder("i")
91             .longOpt("idle-timeout-sec")
92             .hasArg()
93             .desc("""Idle timeout for remote hosts. After given time without any data exchange the
94                 |connection might be closed.""".trimMargin())
95             .build()
96     ),
97     DUMMY_MODE(Option.builder("d")
98             .longOpt("dummy")
99             .desc("If present will start in dummy mode (dummy external services)")
100             .build()
101     ),
102 }