Steve Baker | 450aa7f | 2014-08-25 10:37:27 +1200 | [diff] [blame] | 1 | # Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 2 | # not use this file except in compliance with the License. You may obtain |
| 3 | # a copy of the License at |
| 4 | # |
| 5 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 6 | # |
| 7 | # Unless required by applicable law or agreed to in writing, software |
| 8 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 9 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 10 | # License for the specific language governing permissions and limitations |
| 11 | # under the License. |
| 12 | |
Jens Rosenboom | 4f069fb | 2015-02-18 14:19:07 +0100 | [diff] [blame] | 13 | from oslo_config import cfg |
Steve Baker | 450aa7f | 2014-08-25 10:37:27 +1200 | [diff] [blame] | 14 | |
Rocky | 5d966f9 | 2019-06-25 12:13:25 +1000 | [diff] [blame] | 15 | import os |
| 16 | |
| 17 | default_template = os.path.join( |
| 18 | os.path.dirname(os.path.realpath(__file__)), |
| 19 | 'tests/scenario/templates/boot_config_none_env.yaml') |
| 20 | |
Steve Baker | 39ed19e | 2016-08-01 00:55:34 +0000 | [diff] [blame] | 21 | service_available_group = cfg.OptGroup(name="service_available", |
| 22 | title="Available OpenStack Services") |
| 23 | |
| 24 | ServiceAvailableGroup = [ |
ghanshyam | a8b5911 | 2018-11-26 09:24:38 +0000 | [diff] [blame] | 25 | cfg.BoolOpt("heat", |
Steve Baker | 39ed19e | 2016-08-01 00:55:34 +0000 | [diff] [blame] | 26 | default=True, |
ghanshyam | a8b5911 | 2018-11-26 09:24:38 +0000 | [diff] [blame] | 27 | help="Whether or not heat is expected to be available", |
| 28 | deprecated_opts=[cfg.DeprecatedOpt( |
| 29 | 'heat_plugin', |
| 30 | group='service_available')]), |
Steve Baker | 39ed19e | 2016-08-01 00:55:34 +0000 | [diff] [blame] | 31 | ] |
Steve Baker | 450aa7f | 2014-08-25 10:37:27 +1200 | [diff] [blame] | 32 | |
rabi | f89752b | 2017-11-18 22:14:30 +0530 | [diff] [blame] | 33 | heat_group = cfg.OptGroup(name="heat_plugin", |
Steve Baker | dc769c3 | 2016-07-27 23:31:50 +0000 | [diff] [blame] | 34 | title="Heat Service Options") |
Steve Baker | 450aa7f | 2014-08-25 10:37:27 +1200 | [diff] [blame] | 35 | |
Steve Baker | dc769c3 | 2016-07-27 23:31:50 +0000 | [diff] [blame] | 36 | HeatGroup = [ |
| 37 | cfg.StrOpt("catalog_type", |
| 38 | default="orchestration", |
| 39 | help="Catalog type of the orchestration service."), |
Steve Baker | 450aa7f | 2014-08-25 10:37:27 +1200 | [diff] [blame] | 40 | cfg.StrOpt('username', |
Rakesh H S | a286a13 | 2016-02-18 18:54:00 +0530 | [diff] [blame] | 41 | help="Username to use for non admin API requests."), |
Steve Baker | 450aa7f | 2014-08-25 10:37:27 +1200 | [diff] [blame] | 42 | cfg.StrOpt('password', |
Rakesh H S | a286a13 | 2016-02-18 18:54:00 +0530 | [diff] [blame] | 43 | help="Non admin API key to use when authenticating.", |
| 44 | secret=True), |
| 45 | cfg.StrOpt('admin_username', |
| 46 | help="Username to use for admin API requests."), |
| 47 | cfg.StrOpt('admin_password', |
| 48 | help="Admin API key to use when authentication.", |
Steve Baker | 450aa7f | 2014-08-25 10:37:27 +1200 | [diff] [blame] | 49 | secret=True), |
rabi | be38c30 | 2017-04-11 09:54:07 +0530 | [diff] [blame] | 50 | cfg.StrOpt('project_name', |
| 51 | help="Project name to use for API requests.", |
rabi | d2916d0 | 2017-09-22 18:19:24 +0530 | [diff] [blame] | 52 | deprecated_opts=[cfg.DeprecatedOpt( |
rabi | f89752b | 2017-11-18 22:14:30 +0530 | [diff] [blame] | 53 | 'tenant_name', group='heat_plugin')]), |
rabi | be38c30 | 2017-04-11 09:54:07 +0530 | [diff] [blame] | 54 | cfg.StrOpt('admin_project_name', |
rabi | fd98a47 | 2016-05-24 10:18:33 +0530 | [diff] [blame] | 55 | default='admin', |
rabi | be38c30 | 2017-04-11 09:54:07 +0530 | [diff] [blame] | 56 | help="Admin project name to use for admin API requests.", |
rabi | d2916d0 | 2017-09-22 18:19:24 +0530 | [diff] [blame] | 57 | deprecated_opts=[cfg.DeprecatedOpt( |
rabi | f89752b | 2017-11-18 22:14:30 +0530 | [diff] [blame] | 58 | 'admin_tenant_name', group='heat_plugin')]), |
Steve Baker | 450aa7f | 2014-08-25 10:37:27 +1200 | [diff] [blame] | 59 | cfg.StrOpt('auth_url', |
rabi | 8fcf192 | 2017-04-19 09:21:54 +0530 | [diff] [blame] | 60 | help="Full URI of the OpenStack Identity API (Keystone)."), |
| 61 | cfg.StrOpt('auth_version', |
Takashi Kajinami | 7ecadfb | 2024-07-12 11:31:21 +0900 | [diff] [blame] | 62 | deprecated_for_removal=True, |
| 63 | deprecated_reason='Identity v2 API was removed and v3 is ' |
| 64 | 'the only available identity API version now', |
rabi | 8fcf192 | 2017-04-19 09:21:54 +0530 | [diff] [blame] | 65 | help="OpenStack Identity API version."), |
Rabi Mishra | 1d53874 | 2016-03-21 21:09:20 +0530 | [diff] [blame] | 66 | cfg.StrOpt('user_domain_name', |
Zane Bitter | 5ea4aa4 | 2017-03-01 15:50:19 -0500 | [diff] [blame] | 67 | help="User domain name, if keystone v3 auth_url " |
Rabi Mishra | 1d53874 | 2016-03-21 21:09:20 +0530 | [diff] [blame] | 68 | "is used"), |
| 69 | cfg.StrOpt('project_domain_name', |
Zane Bitter | 5ea4aa4 | 2017-03-01 15:50:19 -0500 | [diff] [blame] | 70 | help="Project domain name, if keystone v3 auth_url " |
Rabi Mishra | 65493fb | 2016-01-29 22:23:21 +0530 | [diff] [blame] | 71 | "is used"), |
rabi | 133ee5f | 2016-12-01 09:54:37 +0530 | [diff] [blame] | 72 | cfg.StrOpt('user_domain_id', |
Zane Bitter | 5ea4aa4 | 2017-03-01 15:50:19 -0500 | [diff] [blame] | 73 | help="User domain id, if keystone v3 auth_url " |
rabi | 133ee5f | 2016-12-01 09:54:37 +0530 | [diff] [blame] | 74 | "is used"), |
| 75 | cfg.StrOpt('project_domain_id', |
Zane Bitter | 5ea4aa4 | 2017-03-01 15:50:19 -0500 | [diff] [blame] | 76 | help="Project domain id, if keystone v3 auth_url " |
rabi | 133ee5f | 2016-12-01 09:54:37 +0530 | [diff] [blame] | 77 | "is used"), |
Steve Baker | 450aa7f | 2014-08-25 10:37:27 +1200 | [diff] [blame] | 78 | cfg.StrOpt('region', |
Rabi Mishra | 65493fb | 2016-01-29 22:23:21 +0530 | [diff] [blame] | 79 | help="The region name to use"), |
Colleen Murphy | 30b1fd6 | 2017-12-29 12:43:53 +0100 | [diff] [blame] | 80 | cfg.StrOpt('endpoint_type', |
| 81 | default='public', |
| 82 | choices=['public', 'admin', 'internal'], |
| 83 | help="The endpoint type to use for the orchestration service."), |
Steve Baker | 450aa7f | 2014-08-25 10:37:27 +1200 | [diff] [blame] | 84 | cfg.StrOpt('instance_type', |
Steve Baker | 450aa7f | 2014-08-25 10:37:27 +1200 | [diff] [blame] | 85 | help="Instance type for tests. Needs to be big enough for a " |
| 86 | "full OS plus the test workload"), |
Pavlo Shchelokovskyy | 46e5cb2 | 2015-03-23 12:01:25 +0000 | [diff] [blame] | 87 | cfg.StrOpt('minimal_instance_type', |
| 88 | help="Instance type enough for simplest cases."), |
Steve Baker | 450aa7f | 2014-08-25 10:37:27 +1200 | [diff] [blame] | 89 | cfg.StrOpt('image_ref', |
Steve Baker | 450aa7f | 2014-08-25 10:37:27 +1200 | [diff] [blame] | 90 | help="Name of image to use for tests which boot servers."), |
| 91 | cfg.StrOpt('keypair_name', |
Steve Baker | 450aa7f | 2014-08-25 10:37:27 +1200 | [diff] [blame] | 92 | help="Name of existing keypair to launch servers with."), |
| 93 | cfg.StrOpt('minimal_image_ref', |
Steve Baker | 450aa7f | 2014-08-25 10:37:27 +1200 | [diff] [blame] | 94 | help="Name of minimal (e.g cirros) image to use when " |
| 95 | "launching test instances."), |
Steve Baker | 450aa7f | 2014-08-25 10:37:27 +1200 | [diff] [blame] | 96 | cfg.BoolOpt('disable_ssl_certificate_validation', |
| 97 | default=False, |
| 98 | help="Set to True if using self-signed SSL certificates."), |
tyagi | 39aa11a | 2016-03-07 04:47:00 -0800 | [diff] [blame] | 99 | cfg.StrOpt('ca_file', |
tyagi | 39aa11a | 2016-03-07 04:47:00 -0800 | [diff] [blame] | 100 | help="CA certificate to pass for servers that have " |
| 101 | "https endpoint."), |
Steve Baker | 450aa7f | 2014-08-25 10:37:27 +1200 | [diff] [blame] | 102 | cfg.IntOpt('build_interval', |
| 103 | default=4, |
| 104 | help="Time in seconds between build status checks."), |
| 105 | cfg.IntOpt('build_timeout', |
| 106 | default=1200, |
| 107 | help="Timeout in seconds to wait for a stack to build."), |
| 108 | cfg.StrOpt('network_for_ssh', |
Rabi Mishra | ec4b03b | 2015-05-23 02:20:47 +0530 | [diff] [blame] | 109 | default='heat-net', |
Steve Baker | 450aa7f | 2014-08-25 10:37:27 +1200 | [diff] [blame] | 110 | help="Network used for SSH connections."), |
| 111 | cfg.StrOpt('fixed_network_name', |
Rabi Mishra | ec4b03b | 2015-05-23 02:20:47 +0530 | [diff] [blame] | 112 | default='heat-net', |
Steve Baker | 450aa7f | 2014-08-25 10:37:27 +1200 | [diff] [blame] | 113 | help="Visible fixed network name "), |
Pavlo Shchelokovskyy | 6fa2380 | 2015-03-23 11:22:35 +0000 | [diff] [blame] | 114 | cfg.StrOpt('floating_network_name', |
| 115 | default='public', |
| 116 | help="Visible floating network name "), |
Steve Baker | 0b679bb | 2015-03-11 13:46:42 +1300 | [diff] [blame] | 117 | cfg.StrOpt('boot_config_env', |
Rocky | 5d966f9 | 2019-06-25 12:13:25 +1000 | [diff] [blame] | 118 | default=default_template, |
Steve Baker | 0b679bb | 2015-03-11 13:46:42 +1300 | [diff] [blame] | 119 | help="Path to environment file which defines the " |
| 120 | "resource type Heat::InstallConfigAgent. Needs to " |
| 121 | "be appropriate for the image_ref."), |
kairat_kushaev | 0ab3d7c | 2015-01-27 21:48:46 +0300 | [diff] [blame] | 122 | cfg.StrOpt('fixed_subnet_name', |
Rabi Mishra | ec4b03b | 2015-05-23 02:20:47 +0530 | [diff] [blame] | 123 | default='heat-subnet', |
kairat_kushaev | 0ab3d7c | 2015-01-27 21:48:46 +0300 | [diff] [blame] | 124 | help="Visible fixed sub-network name "), |
Steve Baker | 450aa7f | 2014-08-25 10:37:27 +1200 | [diff] [blame] | 125 | cfg.IntOpt('ssh_timeout', |
| 126 | default=300, |
| 127 | help="Timeout in seconds to wait for authentication to " |
| 128 | "succeed."), |
| 129 | cfg.IntOpt('ip_version_for_ssh', |
| 130 | default=4, |
| 131 | help="IP version used for SSH connections."), |
| 132 | cfg.IntOpt('ssh_channel_timeout', |
| 133 | default=60, |
| 134 | help="Timeout in seconds to wait for output from ssh " |
| 135 | "channel."), |
Rabi Mishra | 477efc9 | 2015-07-31 13:01:45 +0530 | [diff] [blame] | 136 | cfg.BoolOpt('skip_scenario_tests', |
| 137 | default=False, |
| 138 | help="Skip all scenario tests"), |
| 139 | cfg.BoolOpt('skip_functional_tests', |
| 140 | default=False, |
| 141 | help="Skip all functional tests"), |
| 142 | cfg.ListOpt('skip_functional_test_list', |
Rabi Mishra | 94c4372 | 2015-08-12 18:39:38 +0530 | [diff] [blame] | 143 | help="List of functional test class or class.method " |
Zane Bitter | 5ea4aa4 | 2017-03-01 15:50:19 -0500 | [diff] [blame] | 144 | "names to skip ex. AutoscalingGroupTest, " |
Rabi Mishra | 94c4372 | 2015-08-12 18:39:38 +0530 | [diff] [blame] | 145 | "InstanceGroupBasicTest.test_size_updates_work"), |
Rabi Mishra | 477efc9 | 2015-07-31 13:01:45 +0530 | [diff] [blame] | 146 | cfg.ListOpt('skip_scenario_test_list', |
Rabi Mishra | 94c4372 | 2015-08-12 18:39:38 +0530 | [diff] [blame] | 147 | help="List of scenario test class or class.method " |
| 148 | "names to skip ex. NeutronLoadBalancerTest, " |
huangtianhua | 422c1ba | 2016-06-08 15:50:39 +0800 | [diff] [blame] | 149 | "AodhAlarmTest.test_alarm"), |
Rabi Mishra | 477efc9 | 2015-07-31 13:01:45 +0530 | [diff] [blame] | 150 | cfg.ListOpt('skip_test_stack_action_list', |
| 151 | help="List of stack actions in tests to skip " |
| 152 | "ex. ABANDON, ADOPT, SUSPEND, RESUME"), |
Zane Bitter | f407e10 | 2017-10-05 14:19:32 -0400 | [diff] [blame] | 153 | cfg.BoolOpt('convergence_engine_enabled', |
| 154 | default=True, |
| 155 | help="Test features that are only present for stacks with " |
| 156 | "convergence enabled."), |
Steve Baker | 450aa7f | 2014-08-25 10:37:27 +1200 | [diff] [blame] | 157 | cfg.IntOpt('volume_size', |
| 158 | default=1, |
| 159 | help='Default size in GB for volumes created by volumes tests'), |
Anastasia Kuznetsova | 3e0ab4d | 2015-03-06 18:10:13 +0400 | [diff] [blame] | 160 | cfg.IntOpt('connectivity_timeout', |
| 161 | default=120, |
| 162 | help="Timeout in seconds to wait for connectivity to " |
| 163 | "server."), |
huangtianhua | 2026ac1 | 2017-01-10 14:18:43 +0800 | [diff] [blame] | 164 | cfg.StrOpt('heat_config_notify_script', |
Thomas Herve | 2ce4bda | 2016-01-22 17:55:55 +0100 | [diff] [blame] | 165 | default=('heat-config-notify'), |
| 166 | help="Path to the script heat-config-notify"), |
Pavlo Shchelokovskyy | 44fe49d | 2018-03-20 13:54:05 +0200 | [diff] [blame] | 167 | cfg.StrOpt('hidden_stack_tag', |
| 168 | default='data-processing-cluster', |
| 169 | help="Tag to be considered as hidden for stack tags tests"), |
ricolin | d7ca602 | 2018-07-02 13:02:56 +0800 | [diff] [blame] | 170 | cfg.StrOpt('credential_secret_id', |
| 171 | help="Barbican secret id which storing cloud credential in " |
| 172 | "remote site."), |
Brendan Shephard | f9f9d82 | 2024-06-19 10:53:48 +1000 | [diff] [blame] | 173 | cfg.ListOpt('dns_servers', |
| 174 | default=(['8.8.8.8', '8.8.4.4']), |
| 175 | help='Configure custom DNS servers'), |
Pavlo Shchelokovskyy | ab1725e | 2018-08-13 20:59:18 +0300 | [diff] [blame] | 176 | cfg.BoolOpt('vm_to_heat_api_insecure', |
| 177 | default=False, |
| 178 | help="Set this to True if VM images used for tests " |
| 179 | "can not verify a (self-signed) SSL certificate " |
| 180 | "of public Heat endpoint."), |
Steve Baker | 450aa7f | 2014-08-25 10:37:27 +1200 | [diff] [blame] | 181 | ] |
| 182 | |
rabi | 876449a | 2018-03-15 21:56:49 +0530 | [diff] [blame] | 183 | heat_features_group = cfg.OptGroup( |
| 184 | name='heat_features_enabled', |
| 185 | title="Enabled Orchestration Service Features") |
| 186 | |
| 187 | HeatFeaturesGroup = [ |
| 188 | cfg.BoolOpt('stack_cancel', |
| 189 | default=False, |
ricolin | d7ca602 | 2018-07-02 13:02:56 +0800 | [diff] [blame] | 190 | help="If false, skip stack cancel tests"), |
| 191 | cfg.BoolOpt('multi_cloud', |
| 192 | default=False, |
| 193 | help="If false, skip multi-cloud tests for remote stack") |
rabi | 876449a | 2018-03-15 21:56:49 +0530 | [diff] [blame] | 194 | ] |
| 195 | |
Steve Baker | 450aa7f | 2014-08-25 10:37:27 +1200 | [diff] [blame] | 196 | |
Thomas Herve | cd3622e | 2014-12-17 10:36:51 +0100 | [diff] [blame] | 197 | def list_opts(): |
Steve Baker | dc769c3 | 2016-07-27 23:31:50 +0000 | [diff] [blame] | 198 | yield heat_group.name, HeatGroup |
rabi | 876449a | 2018-03-15 21:56:49 +0530 | [diff] [blame] | 199 | yield heat_features_group.name, HeatFeaturesGroup |
Steve Baker | 39ed19e | 2016-08-01 00:55:34 +0000 | [diff] [blame] | 200 | yield service_available_group.name, ServiceAvailableGroup |