Ryota MIBU | cb33414 | 2015-12-10 15:41:39 +0900 | [diff] [blame] | 1 | # Copyright 2012 OpenStack Foundation |
| 2 | # All Rights Reserved. |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 5 | # not use this file except in compliance with the License. You may obtain |
| 6 | # 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, WITHOUT |
| 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 13 | # License for the specific language governing permissions and limitations |
| 14 | # under the License. |
| 15 | |
| 16 | from oslo_config import cfg |
| 17 | |
| 18 | |
Chandan Kumar | 696751e | 2017-12-04 16:04:15 +0530 | [diff] [blame] | 19 | service_option = [cfg.BoolOpt('ceilometer', |
| 20 | default=True, |
| 21 | help="Whether or not Ceilometer is expected to" |
| 22 | "be available"), |
ghanshyam | 8bccc06 | 2018-01-23 12:35:06 +0300 | [diff] [blame] | 23 | cfg.BoolOpt("aodh", |
Chandan Kumar | 6f97ca0 | 2017-12-07 12:50:34 +0530 | [diff] [blame] | 24 | default=True, |
| 25 | help="Whether or not Aodh is expected to be" |
ghanshyam | 8bccc06 | 2018-01-23 12:35:06 +0300 | [diff] [blame] | 26 | "available", |
| 27 | deprecated_opts=[cfg.DeprecatedOpt( |
| 28 | 'aodh_plugin', |
| 29 | group='service_available')]), |
Chandan Kumar | d9a10fe | 2018-01-11 14:34:45 +0530 | [diff] [blame] | 30 | cfg.BoolOpt('gnocchi', |
| 31 | default=True, |
| 32 | help="Whether or not Gnocchi is expected to be" |
Erno Kuvaja | b0e0912 | 2023-11-30 13:09:46 +0000 | [diff] [blame] | 33 | "available", |
| 34 | deprecated_for_removal=True), |
Jaromir Wysoglad | 3dd1d0d | 2023-11-22 05:17:28 -0500 | [diff] [blame] | 35 | cfg.BoolOpt('sg_core', |
Takashi Kajinami | 7640066 | 2023-11-29 19:41:19 +0900 | [diff] [blame] | 36 | default=False, |
Jaromir Wysoglad | 3dd1d0d | 2023-11-22 05:17:28 -0500 | [diff] [blame] | 37 | help="Whether or not sg-core is expected to be" |
Erno Kuvaja | b0e0912 | 2023-11-30 13:09:46 +0000 | [diff] [blame] | 38 | "available", |
| 39 | deprecated_for_removal=True)] |
Ryota MIBU | cb33414 | 2015-12-10 15:41:39 +0900 | [diff] [blame] | 40 | |
ghanshyam | 905e081 | 2016-04-14 11:45:56 +0900 | [diff] [blame] | 41 | telemetry_group = cfg.OptGroup(name='telemetry', |
Ryota MIBU | cb33414 | 2015-12-10 15:41:39 +0900 | [diff] [blame] | 42 | title='Telemetry Service Options') |
| 43 | |
Erno Kuvaja | b0e0912 | 2023-11-30 13:09:46 +0000 | [diff] [blame] | 44 | telemetry_services_group = cfg.OptGroup(name='telemetry_services', |
| 45 | title='Telemetry Services') |
| 46 | |
Chandan Kumar | 696751e | 2017-12-04 16:04:15 +0530 | [diff] [blame] | 47 | event_group = cfg.OptGroup(name='event', |
| 48 | title='Event Service Options') |
| 49 | |
Chandan Kumar | 6f97ca0 | 2017-12-07 12:50:34 +0530 | [diff] [blame] | 50 | alarming_group = cfg.OptGroup(name='alarming_plugin', |
| 51 | title='Alarming Service Options') |
| 52 | |
Chandan Kumar | d9a10fe | 2018-01-11 14:34:45 +0530 | [diff] [blame] | 53 | metric_group = cfg.OptGroup(name='metric', |
| 54 | title='Metric Service Options') |
| 55 | |
Ryota MIBU | cb33414 | 2015-12-10 15:41:39 +0900 | [diff] [blame] | 56 | TelemetryGroup = [ |
Hanxi Liu | 17b4d5b | 2017-02-07 01:31:49 +0800 | [diff] [blame] | 57 | cfg.IntOpt('notification_wait', |
| 58 | default=120, |
| 59 | help="The seconds to wait for notifications which " |
| 60 | "containers and objects sent to swift."), |
| 61 | cfg.IntOpt('notification_sleep', |
| 62 | default=1, |
| 63 | help="The seconds to sleep after an unsuccessful " |
| 64 | "notification received."), |
Mehdi Abaakouk | 717324c | 2017-04-25 14:31:00 +0200 | [diff] [blame] | 65 | cfg.IntOpt('alarm_granularity', |
| 66 | default=300, |
| 67 | help="Granularity to use for aodh alarms. This must match the " |
Julien Danjou | 3b79e46 | 2018-07-19 09:31:40 +0200 | [diff] [blame] | 68 | "configured Gnocchi archive policy"), |
| 69 | cfg.StrOpt('alarm_metric_name', |
Mehdi Abaakouk | b98eb81 | 2018-09-20 15:47:09 +0200 | [diff] [blame] | 70 | default="cpu", |
Julien Danjou | 3b79e46 | 2018-07-19 09:31:40 +0200 | [diff] [blame] | 71 | help="Name of the metric to create an alarm on."), |
| 72 | cfg.StrOpt('alarm_aggregation_method', |
Mehdi Abaakouk | b98eb81 | 2018-09-20 15:47:09 +0200 | [diff] [blame] | 73 | default="rate:mean", |
Julien Danjou | 3b79e46 | 2018-07-19 09:31:40 +0200 | [diff] [blame] | 74 | help="Aggregation method to use for alarm."), |
| 75 | cfg.IntOpt('alarm_threshold', |
| 76 | default=10, |
| 77 | help="Threshold to cross for the alarm to trigger."), |
Pavlo Shchelokovskyy | 959fc69 | 2020-10-05 12:05:15 +0300 | [diff] [blame] | 78 | cfg.BoolOpt("disable_ssl_certificate_validation", |
| 79 | default=False, |
| 80 | help="Disable SSL certificate validation when running " |
| 81 | "scenario tests"), |
JaromÃr Wysoglad | d6c4972 | 2023-10-13 09:08:38 +0200 | [diff] [blame] | 82 | cfg.StrOpt('sg_core_service_url', |
| 83 | default="127.0.0.1:3000", |
| 84 | help="URL to sg-core prometheus endpoint"), |
| 85 | |
Ryota MIBU | cb33414 | 2015-12-10 15:41:39 +0900 | [diff] [blame] | 86 | ] |
Chandan Kumar | 696751e | 2017-12-04 16:04:15 +0530 | [diff] [blame] | 87 | |
Erno Kuvaja | b0e0912 | 2023-11-30 13:09:46 +0000 | [diff] [blame] | 88 | telemetry_services_opts = [ |
| 89 | cfg.BoolOpt('aodh_gnocchi', |
| 90 | default=False, |
| 91 | help="Can telemetry plugin expect gnocchi backend"), |
| 92 | cfg.BoolOpt('aodh_mysql', |
| 93 | default=False, |
| 94 | help="Can telemetry plugin expect mysql backend"), |
| 95 | cfg.BoolOpt('aodh_postgre', |
| 96 | default=False, |
| 97 | help="Can telemetry plugin expect postgre backend"), |
| 98 | cfg.BoolOpt('aodh_prometheus', |
| 99 | default=False, |
| 100 | help="Can telemetry plugin expect prometheus backend"), |
| 101 | ] |
| 102 | |
Chandan Kumar | 696751e | 2017-12-04 16:04:15 +0530 | [diff] [blame] | 103 | event_opts = [ |
| 104 | cfg.StrOpt('catalog_type', |
| 105 | default='event', |
| 106 | help="Catalog type of the Event service."), |
| 107 | cfg.StrOpt('endpoint_type', |
| 108 | default='publicURL', |
| 109 | choices=['public', 'admin', 'internal', |
| 110 | 'publicURL', 'adminURL', 'internalURL'], |
| 111 | help="The endpoint type to use for the event service."), |
| 112 | ] |
Chandan Kumar | 6f97ca0 | 2017-12-07 12:50:34 +0530 | [diff] [blame] | 113 | |
| 114 | AlarmingGroup = [ |
| 115 | cfg.StrOpt('catalog_type', |
| 116 | default='alarming', |
| 117 | help="Catalog type of the Alarming service."), |
| 118 | cfg.StrOpt('endpoint_type', |
| 119 | default='publicURL', |
| 120 | choices=['public', 'admin', 'internal', |
| 121 | 'publicURL', 'adminURL', 'internalURL'], |
| 122 | help="The endpoint type to use for the alarming service."), |
Lingxian Kong | 6a7d798 | 2019-08-21 15:51:09 +1200 | [diff] [blame] | 123 | cfg.BoolOpt('create_alarms', |
| 124 | default=True, |
| 125 | help="If create alarms dynamically before testing."), |
Chandan Kumar | 6f97ca0 | 2017-12-07 12:50:34 +0530 | [diff] [blame] | 126 | ] |
Chandan Kumar | d9a10fe | 2018-01-11 14:34:45 +0530 | [diff] [blame] | 127 | |
| 128 | metric_opts = [ |
| 129 | cfg.StrOpt('catalog_type', |
| 130 | default='metric', |
| 131 | help="Catalog type of the Metric service."), |
| 132 | cfg.StrOpt('endpoint_type', |
| 133 | default='publicURL', |
| 134 | choices=['public', 'admin', 'internal', |
| 135 | 'publicURL', 'adminURL', 'internalURL'], |
| 136 | help="The endpoint type to use for the metric service."), |
| 137 | ] |