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")
 
  36             .desc("URL of ves configuration on consul")
 
  39     CONSUL_FIRST_REQUEST_DELAY(Option.builder("d")
 
  40             .longOpt("first-request-delay")
 
  42             .desc("Delay of first request to consul in seconds")
 
  45     CONSUL_REQUEST_INTERVAL(Option.builder("I")
 
  46             .longOpt("request-interval")
 
  48             .desc("Interval of consul configuration requests in seconds")
 
  51     VES_HV_PORT(Option.builder("v")
 
  55             .desc("VesHvCollector port")
 
  58     VES_HV_HOST(Option.builder("h")
 
  62             .desc("VesHvCollector host")
 
  65     KAFKA_SERVERS(Option.builder("s")
 
  66             .longOpt("kafka-bootstrap-servers")
 
  69             .desc("Comma-separated Kafka bootstrap servers in <host>:<port> format")
 
  72     KAFKA_TOPICS(Option.builder("f")
 
  73             .longOpt("kafka-topics")
 
  76             .desc("Comma-separated Kafka topics")
 
  79     SSL_DISABLE(Option.builder("l")
 
  80             .longOpt("ssl-disable")
 
  81             .desc("Disable SSL encryption")
 
  84     PRIVATE_KEY_FILE(Option.builder("k")
 
  85             .longOpt("private-key-file")
 
  87             .desc("File with private key in PEM format")
 
  90     CERT_FILE(Option.builder("e")
 
  93             .desc("File with certificate bundle")
 
  96     TRUST_CERT_FILE(Option.builder("t")
 
  97             .longOpt("trust-cert-file")
 
  99             .desc("File with trusted certificate bundle for trusting connections")
 
 102     IDLE_TIMEOUT_SEC(Option.builder("i")
 
 103             .longOpt("idle-timeout-sec")
 
 105             .desc("""Idle timeout for remote hosts. After given time without any data exchange the
 
 106                 |connection might be closed.""".trimMargin())
 
 109     DUMMY_MODE(Option.builder("u")
 
 111             .desc("If present will start in dummy mode (dummy external services)")