blob: 11b277401412dc92e4df5e0499b0266ba809ac09 [file] [log] [blame]
Jian Liff8b9f92018-06-05 17:36:37 +09001/*
2 * Copyright 2018-present Open Networking Foundation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package org.onosproject.openstacktelemetry.api;
17
Jian Liff8b9f92018-06-05 17:36:37 +090018/**
19 * Provides constants used in OpenstackTelemetry.
20 */
21public final class Constants {
22
23 private Constants() {
24 }
25
26 public static final String OPENSTACK_TELEMETRY_APP_ID = "org.onosproject.openstacktelemetry";
27
28 private static final String DEFAULT_SERVER_IP = "localhost";
29
Jian Li4df75b12018-06-07 22:11:04 +090030 // default configuration variables for gRPC
31 public static final String DEFAULT_GRPC_SERVER_IP = DEFAULT_SERVER_IP;
32 public static final int DEFAULT_GRPC_SERVER_PORT = 50051;
33 public static final boolean DEFAULT_GRPC_USE_PLAINTEXT = true;
34 public static final int DEFAULT_GRPC_MAX_INBOUND_MSG_SIZE = 4 * 1024 * 1024;
35
36 // default configuration variables for InfluxDB
37 public static final String DEFAULT_INFLUXDB_SERVER_IP = DEFAULT_SERVER_IP;
38 public static final int DEFAULT_INFLUXDB_SERVER_PORT = 8086;
39 public static final String DEFAULT_INFLUXDB_USERNAME = "onos";
40 public static final String DEFAULT_INFLUXDB_PASSWORD = "onos";
41 public static final String DEFAULT_INFLUXDB_DATABASE = "onos";
Boyoung Jeong4d1c9d12018-07-20 17:09:20 +090042 public static final String DEFAULT_INFLUXDB_MEASUREMENT = "sonaflow";
Jian Li4df75b12018-06-07 22:11:04 +090043 public static final boolean DEFAULT_INFLUXDB_ENABLE_BATCH = true;
44
boyoung21c5f5f42018-09-27 20:29:41 +090045 // default configuration variables for Promethetus exporter
46 public static final String DEFAULT_PROMETHEUS_EXPORTER_IP = "0.0.0.0";
47 public static final int DEFAULT_PROMETHEUS_EXPORTER_PORT = 9501;
48
Jian Li4df75b12018-06-07 22:11:04 +090049 // default configuration variables for Kafka
Jian Liff8b9f92018-06-05 17:36:37 +090050 public static final String DEFAULT_KAFKA_SERVER_IP = DEFAULT_SERVER_IP;
51 public static final int DEFAULT_KAFKA_SERVER_PORT = 9092;
52 public static final int DEFAULT_KAFKA_RETRIES = 0;
53 public static final String DEFAULT_KAFKA_REQUIRED_ACKS = "all";
54 public static final int DEFAULT_KAFKA_BATCH_SIZE = 16384;
55 public static final int DEFAULT_KAFKA_LINGER_MS = 1;
56 public static final int DEFAULT_KAFKA_MEMORY_BUFFER = 33554432;
Jian Lib9fe3492018-06-07 17:19:07 +090057 public static final String DEFAULT_KAFKA_KEY_SERIALIZER =
58 "org.apache.kafka.common.serialization.StringSerializer";
59 public static final String DEFAULT_KAFKA_VALUE_SERIALIZER =
60 "org.apache.kafka.common.serialization.ByteArraySerializer";
Jian Liff8b9f92018-06-05 17:36:37 +090061
Jian Li4df75b12018-06-07 22:11:04 +090062 // default configuration variables for REST API
Jian Liff8b9f92018-06-05 17:36:37 +090063 public static final String DEFAULT_REST_SERVER_IP = DEFAULT_SERVER_IP;
64 public static final int DEFAULT_REST_SERVER_PORT = 80;
Jian Li4df75b12018-06-07 22:11:04 +090065 public static final String DEFAULT_REST_ENDPOINT = "telemetry";
66 public static final String DEFAULT_REST_METHOD = "POST";
67 public static final String DEFAULT_REST_REQUEST_MEDIA_TYPE = "application/json";
68 public static final String DEFAULT_REST_RESPONSE_MEDIA_TYPE = "application/json";
69
Jian Lid1ce10a2018-06-12 13:47:23 +090070 public static final boolean DEFAULT_DISABLE = false;
71 public static final boolean DEFAULT_ENABLE = true;
72
Jian Lie6110b72018-07-06 19:06:36 +090073 public static final String VXLAN = "VXLAN";
74 public static final String VLAN = "VLAN";
75 public static final String FLAT = "FLAT";
Boyoung Jeong1cca5e82018-08-01 21:00:08 +090076
77 // default configuration variables for ONOS GUI
78 public static final int DEFAULT_DATA_POINT_SIZE = 17280;
Jian Liff8b9f92018-06-05 17:36:37 +090079}