ZhiQiang Fan | 39f9722 | 2013-09-20 04:49:44 +0800 | [diff] [blame] | 1 | # Copyright 2012 OpenStack Foundation |
Jay Pipes | 3f981df | 2012-03-27 18:59:44 -0400 | [diff] [blame] | 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 | |
Dirk Mueller | e746fc2 | 2013-06-29 16:29:29 +0200 | [diff] [blame] | 16 | from __future__ import print_function |
| 17 | |
Jay Pipes | 7f75763 | 2011-12-02 15:53:32 -0500 | [diff] [blame] | 18 | import os |
Jay Pipes | 3f981df | 2012-03-27 18:59:44 -0400 | [diff] [blame] | 19 | |
Matthew Treinish | 90aedd1 | 2013-02-25 17:56:49 -0500 | [diff] [blame] | 20 | from oslo.config import cfg |
| 21 | |
Matthew Treinish | f4a9b0f | 2013-07-26 16:58:26 -0400 | [diff] [blame] | 22 | from tempest.openstack.common import log as logging |
Jay Pipes | 7f75763 | 2011-12-02 15:53:32 -0500 | [diff] [blame] | 23 | |
Daryl Walleck | 1465d61 | 2011-11-02 02:22:15 -0500 | [diff] [blame] | 24 | |
DennyZhang | 88a2dd8 | 2013-10-07 12:55:35 -0500 | [diff] [blame] | 25 | def register_opt_group(conf, opt_group, options): |
| 26 | conf.register_group(opt_group) |
| 27 | for opt in options: |
| 28 | conf.register_opt(opt, group=opt_group.name) |
| 29 | |
| 30 | |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 31 | identity_group = cfg.OptGroup(name='identity', |
| 32 | title="Keystone Configuration Options") |
Daryl Walleck | 1465d61 | 2011-11-02 02:22:15 -0500 | [diff] [blame] | 33 | |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 34 | IdentityGroup = [ |
| 35 | cfg.StrOpt('catalog_type', |
| 36 | default='identity', |
| 37 | help="Catalog type of the Identity service."), |
Jay Pipes | cd8eaec | 2013-01-16 21:03:48 -0500 | [diff] [blame] | 38 | cfg.BoolOpt('disable_ssl_certificate_validation', |
| 39 | default=False, |
| 40 | help="Set to True if using self-signed SSL certificates."), |
Jay Pipes | 7c88eb2 | 2013-01-16 21:32:43 -0500 | [diff] [blame] | 41 | cfg.StrOpt('uri', |
| 42 | default=None, |
Brant Knudson | c7ca334 | 2013-03-28 21:08:50 -0500 | [diff] [blame] | 43 | help="Full URI of the OpenStack Identity API (Keystone), v2"), |
| 44 | cfg.StrOpt('uri_v3', |
| 45 | help='Full URI of the OpenStack Identity API (Keystone), v3'), |
Andrea Frittoli | 8bbdb16 | 2014-01-06 11:06:13 +0000 | [diff] [blame] | 46 | cfg.StrOpt('auth_version', |
| 47 | default='v2', |
| 48 | help="Identity API version to be used for authentication " |
| 49 | "for API tests. Planned to extend to tenant isolation, " |
| 50 | "scenario tests and CLI tests."), |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 51 | cfg.StrOpt('region', |
Attila Fazekas | cadcb1f | 2013-01-21 23:10:53 +0100 | [diff] [blame] | 52 | default='RegionOne', |
Arata Notsu | 8f44039 | 2013-09-13 16:14:20 +0900 | [diff] [blame] | 53 | help="The identity region name to use. Also used as the other " |
| 54 | "services' region name unless they are set explicitly. " |
| 55 | "If no such region is found in the service catalog, the " |
| 56 | "first found one is used."), |
Attila Fazekas | cadcb1f | 2013-01-21 23:10:53 +0100 | [diff] [blame] | 57 | cfg.StrOpt('username', |
| 58 | default='demo', |
| 59 | help="Username to use for Nova API requests."), |
| 60 | cfg.StrOpt('tenant_name', |
| 61 | default='demo', |
| 62 | help="Tenant name to use for Nova API requests."), |
Russell Sim | 7f894a5 | 2013-09-13 10:35:21 +1000 | [diff] [blame] | 63 | cfg.StrOpt('admin_role', |
| 64 | default='admin', |
| 65 | help="Role required to administrate keystone."), |
Attila Fazekas | cadcb1f | 2013-01-21 23:10:53 +0100 | [diff] [blame] | 66 | cfg.StrOpt('password', |
| 67 | default='pass', |
| 68 | help="API key to use when authenticating.", |
| 69 | secret=True), |
| 70 | cfg.StrOpt('alt_username', |
| 71 | default=None, |
| 72 | help="Username of alternate user to use for Nova API " |
| 73 | "requests."), |
| 74 | cfg.StrOpt('alt_tenant_name', |
| 75 | default=None, |
| 76 | help="Alternate user's Tenant name to use for Nova API " |
| 77 | "requests."), |
| 78 | cfg.StrOpt('alt_password', |
| 79 | default=None, |
| 80 | help="API key to use when authenticating as alternate user.", |
| 81 | secret=True), |
| 82 | cfg.StrOpt('admin_username', |
| 83 | default='admin', |
Dirk Mueller | 14bd562 | 2014-01-14 19:33:05 +0100 | [diff] [blame] | 84 | help="Administrative Username to use for " |
Attila Fazekas | cadcb1f | 2013-01-21 23:10:53 +0100 | [diff] [blame] | 85 | "Keystone API requests."), |
| 86 | cfg.StrOpt('admin_tenant_name', |
| 87 | default='admin', |
| 88 | help="Administrative Tenant name to use for Keystone API " |
| 89 | "requests."), |
| 90 | cfg.StrOpt('admin_password', |
| 91 | default='pass', |
| 92 | help="API key to use when authenticating as admin.", |
| 93 | secret=True), |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 94 | ] |
Jay Pipes | 3f981df | 2012-03-27 18:59:44 -0400 | [diff] [blame] | 95 | |
Matthew Treinish | d5021a7 | 2014-01-09 18:42:51 +0000 | [diff] [blame] | 96 | identity_feature_group = cfg.OptGroup(name='identity-feature-enabled', |
| 97 | title='Enabled Identity Features') |
| 98 | |
| 99 | IdentityFeatureGroup = [ |
| 100 | cfg.BoolOpt('trust', |
| 101 | default=True, |
| 102 | help='Does the identity service have delegation and ' |
| 103 | 'impersonation enabled') |
| 104 | ] |
| 105 | |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 106 | compute_group = cfg.OptGroup(name='compute', |
| 107 | title='Compute Service Options') |
Rohit Karajgi | e1b050d | 2011-12-02 16:13:18 -0800 | [diff] [blame] | 108 | |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 109 | ComputeGroup = [ |
| 110 | cfg.BoolOpt('allow_tenant_isolation', |
| 111 | default=False, |
| 112 | help="Allows test cases to create/destroy tenants and " |
| 113 | "users. This option enables isolated test cases and " |
| 114 | "better parallel execution, but also requires that " |
| 115 | "OpenStack Identity API admin credentials are known."), |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 116 | cfg.StrOpt('image_ref', |
| 117 | default="{$IMAGE_ID}", |
| 118 | help="Valid secondary image reference to be used in tests."), |
| 119 | cfg.StrOpt('image_ref_alt', |
| 120 | default="{$IMAGE_ID_ALT}", |
| 121 | help="Valid secondary image reference to be used in tests."), |
Ken'ichi Ohmichi | 3577260 | 2013-11-14 15:03:27 +0900 | [diff] [blame] | 122 | cfg.StrOpt('flavor_ref', |
| 123 | default="1", |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 124 | help="Valid primary flavor to use in tests."), |
Ken'ichi Ohmichi | 3577260 | 2013-11-14 15:03:27 +0900 | [diff] [blame] | 125 | cfg.StrOpt('flavor_ref_alt', |
| 126 | default="2", |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 127 | help='Valid secondary flavor to be used in tests.'), |
Maru Newby | af292e8 | 2013-05-20 21:32:28 +0000 | [diff] [blame] | 128 | cfg.StrOpt('image_ssh_user', |
| 129 | default="root", |
| 130 | help="User name used to authenticate to an instance."), |
Ryan Hsu | cb2e125 | 2013-09-03 21:44:49 -0700 | [diff] [blame] | 131 | cfg.StrOpt('image_ssh_password', |
| 132 | default="password", |
| 133 | help="Password used to authenticate to an instance."), |
Maru Newby | af292e8 | 2013-05-20 21:32:28 +0000 | [diff] [blame] | 134 | cfg.StrOpt('image_alt_ssh_user', |
| 135 | default="root", |
| 136 | help="User name used to authenticate to an instance using " |
| 137 | "the alternate image."), |
Ryan Hsu | cb2e125 | 2013-09-03 21:44:49 -0700 | [diff] [blame] | 138 | cfg.StrOpt('image_alt_ssh_password', |
| 139 | default="password", |
| 140 | help="Password used to authenticate to an instance using " |
| 141 | "the alternate image."), |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 142 | cfg.IntOpt('build_interval', |
| 143 | default=10, |
| 144 | help="Time in seconds between build status checks."), |
| 145 | cfg.IntOpt('build_timeout', |
| 146 | default=300, |
| 147 | help="Timeout in seconds to wait for an instance to build."), |
| 148 | cfg.BoolOpt('run_ssh', |
| 149 | default=False, |
Derek Higgins | 85cd514 | 2013-12-17 17:10:11 +0000 | [diff] [blame] | 150 | help="Should the tests ssh to instances?"), |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 151 | cfg.StrOpt('ssh_user', |
| 152 | default='root', |
| 153 | help="User name used to authenticate to an instance."), |
Nachi Ueno | 6d580be | 2013-07-24 10:58:11 -0700 | [diff] [blame] | 154 | cfg.IntOpt('ping_timeout', |
Darragh O'Reilly | 6b63667 | 2014-01-24 12:17:40 +0000 | [diff] [blame] | 155 | default=120, |
Nachi Ueno | 6d580be | 2013-07-24 10:58:11 -0700 | [diff] [blame] | 156 | help="Timeout in seconds to wait for ping to " |
| 157 | "succeed."), |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 158 | cfg.IntOpt('ssh_timeout', |
| 159 | default=300, |
Chris Yeoh | 7691604 | 2013-02-27 16:25:25 +1030 | [diff] [blame] | 160 | help="Timeout in seconds to wait for authentication to " |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 161 | "succeed."), |
Attila Fazekas | 0abbc95 | 2013-07-01 19:19:42 +0200 | [diff] [blame] | 162 | cfg.IntOpt('ready_wait', |
| 163 | default=0, |
DennyZhang | 8912d01 | 2013-09-25 18:08:34 -0500 | [diff] [blame] | 164 | help="Additional wait time for clean state, when there is " |
| 165 | "no OS-EXT-STS extension available"), |
Chris Yeoh | 7691604 | 2013-02-27 16:25:25 +1030 | [diff] [blame] | 166 | cfg.IntOpt('ssh_channel_timeout', |
| 167 | default=60, |
| 168 | help="Timeout in seconds to wait for output from ssh " |
| 169 | "channel."), |
Attila Fazekas | b066165 | 2013-05-08 13:01:36 +0200 | [diff] [blame] | 170 | cfg.StrOpt('fixed_network_name', |
| 171 | default='private', |
| 172 | help="Visible fixed network name "), |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 173 | cfg.StrOpt('network_for_ssh', |
| 174 | default='public', |
| 175 | help="Network used for SSH connections."), |
| 176 | cfg.IntOpt('ip_version_for_ssh', |
| 177 | default=4, |
| 178 | help="IP version used for SSH connections."), |
fujioka yuuichi | a11994e | 2013-07-09 11:19:51 +0900 | [diff] [blame] | 179 | cfg.BoolOpt('use_floatingip_for_ssh', |
| 180 | default=True, |
| 181 | help="Dose the SSH uses Floating IP?"), |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 182 | cfg.StrOpt('catalog_type', |
| 183 | default='compute', |
| 184 | help="Catalog type of the Compute service."), |
Arata Notsu | 8f44039 | 2013-09-13 16:14:20 +0900 | [diff] [blame] | 185 | cfg.StrOpt('region', |
| 186 | default='', |
| 187 | help="The compute region name to use. If empty, the value " |
| 188 | "of identity.region is used instead. If no such region " |
| 189 | "is found in the service catalog, the first found one is " |
| 190 | "used."), |
ivan-zhu | 8f992be | 2013-07-31 14:56:58 +0800 | [diff] [blame] | 191 | cfg.StrOpt('catalog_v3_type', |
| 192 | default='computev3', |
| 193 | help="Catalog type of the Compute v3 service."), |
Attila Fazekas | cadcb1f | 2013-01-21 23:10:53 +0100 | [diff] [blame] | 194 | cfg.StrOpt('path_to_private_key', |
| 195 | default=None, |
| 196 | help="Path to a private key file for SSH access to remote " |
| 197 | "hosts"), |
Ryan Hsu | cb2e125 | 2013-09-03 21:44:49 -0700 | [diff] [blame] | 198 | cfg.StrOpt('volume_device_name', |
| 199 | default='vdb', |
| 200 | help="Expected device name when a volume is attached to " |
Ken'ichi Ohmichi | 39437e2 | 2013-10-06 00:21:38 +0900 | [diff] [blame] | 201 | "an instance"), |
| 202 | cfg.IntOpt('shelved_offload_time', |
| 203 | default=0, |
| 204 | help='Time in seconds before a shelved instance is eligible ' |
| 205 | 'for removing from a host. -1 never offload, 0 offload ' |
| 206 | 'when shelved. This time should be the same as the time ' |
| 207 | 'of nova.conf, and some tests will run for as long as the ' |
| 208 | 'time.') |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 209 | ] |
Rohit Karajgi | e1b050d | 2011-12-02 16:13:18 -0800 | [diff] [blame] | 210 | |
Matthew Treinish | d5c9602 | 2013-10-17 21:51:23 +0000 | [diff] [blame] | 211 | compute_features_group = cfg.OptGroup(name='compute-feature-enabled', |
| 212 | title="Enabled Compute Service Features") |
| 213 | |
| 214 | ComputeFeaturesGroup = [ |
ivan-zhu | 8f992be | 2013-07-31 14:56:58 +0800 | [diff] [blame] | 215 | cfg.BoolOpt('api_v3', |
Chris Yeoh | fbc15de | 2013-11-26 10:20:08 +1030 | [diff] [blame] | 216 | default=True, |
ivan-zhu | 8f992be | 2013-07-31 14:56:58 +0800 | [diff] [blame] | 217 | help="If false, skip all nova v3 tests."), |
Matthew Treinish | d5c9602 | 2013-10-17 21:51:23 +0000 | [diff] [blame] | 218 | cfg.BoolOpt('disk_config', |
| 219 | default=True, |
| 220 | help="If false, skip disk config tests"), |
Matthew Treinish | e3d2614 | 2013-11-26 19:14:58 +0000 | [diff] [blame] | 221 | cfg.ListOpt('api_extensions', |
| 222 | default=['all'], |
| 223 | help='A list of enabled extensions with a special entry all ' |
| 224 | 'which indicates every extension is enabled'), |
| 225 | cfg.ListOpt('api_v3_extensions', |
| 226 | default=['all'], |
| 227 | help='A list of enabled v3 extensions with a special entry all' |
| 228 | ' which indicates every extension is enabled'), |
Matthew Treinish | d5c9602 | 2013-10-17 21:51:23 +0000 | [diff] [blame] | 229 | cfg.BoolOpt('change_password', |
| 230 | default=False, |
| 231 | help="Does the test environment support changing the admin " |
| 232 | "password?"), |
| 233 | cfg.BoolOpt('create_image', |
| 234 | default=False, |
| 235 | help="Does the test environment support snapshots?"), |
| 236 | cfg.BoolOpt('resize', |
| 237 | default=False, |
| 238 | help="Does the test environment support resizing?"), |
| 239 | cfg.BoolOpt('live_migration', |
| 240 | default=False, |
| 241 | help="Does the test environment support live migration " |
| 242 | "available?"), |
| 243 | cfg.BoolOpt('block_migration_for_live_migration', |
| 244 | default=False, |
| 245 | help="Does the test environment use block devices for live " |
| 246 | "migration"), |
| 247 | cfg.BoolOpt('block_migrate_cinder_iscsi', |
| 248 | default=False, |
| 249 | help="Does the test environment block migration support " |
| 250 | "cinder iSCSI volumes") |
| 251 | ] |
| 252 | |
| 253 | |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 254 | compute_admin_group = cfg.OptGroup(name='compute-admin', |
| 255 | title="Compute Admin Options") |
donald-ngo | 7fb1efa | 2011-12-13 17:17:36 -0800 | [diff] [blame] | 256 | |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 257 | ComputeAdminGroup = [ |
| 258 | cfg.StrOpt('username', |
| 259 | default='admin', |
| 260 | help="Administrative Username to use for Nova API requests."), |
| 261 | cfg.StrOpt('tenant_name', |
| 262 | default='admin', |
| 263 | help="Administrative Tenant name to use for Nova API " |
| 264 | "requests."), |
| 265 | cfg.StrOpt('password', |
| 266 | default='pass', |
| 267 | help="API key to use when authenticating as admin.", |
| 268 | secret=True), |
| 269 | ] |
Daryl Walleck | 587385b | 2012-03-03 13:00:26 -0600 | [diff] [blame] | 270 | |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 271 | image_group = cfg.OptGroup(name='image', |
| 272 | title="Image Service Options") |
Jay Pipes | f38eaac | 2012-06-21 13:37:35 -0400 | [diff] [blame] | 273 | |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 274 | ImageGroup = [ |
Matthew Treinish | 72ea442 | 2013-02-07 14:42:49 -0500 | [diff] [blame] | 275 | cfg.StrOpt('catalog_type', |
| 276 | default='image', |
Sean Dague | 8340199 | 2013-05-06 17:46:36 -0400 | [diff] [blame] | 277 | help='Catalog type of the Image service.'), |
Arata Notsu | 8f44039 | 2013-09-13 16:14:20 +0900 | [diff] [blame] | 278 | cfg.StrOpt('region', |
| 279 | default='', |
| 280 | help="The image region name to use. If empty, the value " |
| 281 | "of identity.region is used instead. If no such region " |
| 282 | "is found in the service catalog, the first found one is " |
| 283 | "used."), |
Sean Dague | 8340199 | 2013-05-06 17:46:36 -0400 | [diff] [blame] | 284 | cfg.StrOpt('http_image', |
| 285 | default='http://download.cirros-cloud.net/0.3.1/' |
| 286 | 'cirros-0.3.1-x86_64-uec.tar.gz', |
DennyZhang | 8912d01 | 2013-09-25 18:08:34 -0500 | [diff] [blame] | 287 | help='http accessible image') |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 288 | ] |
Jay Pipes | f38eaac | 2012-06-21 13:37:35 -0400 | [diff] [blame] | 289 | |
Matthew Treinish | 2b5287d | 2013-10-22 17:40:34 +0000 | [diff] [blame] | 290 | image_feature_group = cfg.OptGroup(name='image-feature-enabled', |
| 291 | title='Enabled image service features') |
| 292 | |
| 293 | ImageFeaturesGroup = [ |
| 294 | cfg.BoolOpt('api_v2', |
| 295 | default=True, |
| 296 | help="Is the v2 image API enabled"), |
| 297 | cfg.BoolOpt('api_v1', |
| 298 | default=True, |
| 299 | help="Is the v1 image API enabled"), |
| 300 | ] |
Jay Pipes | f38eaac | 2012-06-21 13:37:35 -0400 | [diff] [blame] | 301 | |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 302 | network_group = cfg.OptGroup(name='network', |
| 303 | title='Network Service Options') |
Daryl Walleck | 587385b | 2012-03-03 13:00:26 -0600 | [diff] [blame] | 304 | |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 305 | NetworkGroup = [ |
| 306 | cfg.StrOpt('catalog_type', |
| 307 | default='network', |
Mark McClain | f2982e8 | 2013-07-06 17:48:03 -0400 | [diff] [blame] | 308 | help='Catalog type of the Neutron service.'), |
Arata Notsu | 8f44039 | 2013-09-13 16:14:20 +0900 | [diff] [blame] | 309 | cfg.StrOpt('region', |
| 310 | default='', |
| 311 | help="The network region name to use. If empty, the value " |
| 312 | "of identity.region is used instead. If no such region " |
| 313 | "is found in the service catalog, the first found one is " |
| 314 | "used."), |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 315 | cfg.StrOpt('tenant_network_cidr', |
| 316 | default="10.100.0.0/16", |
| 317 | help="The cidr block to allocate tenant networks from"), |
| 318 | cfg.IntOpt('tenant_network_mask_bits', |
Attila Fazekas | 8ea181b | 2013-07-13 16:26:14 +0200 | [diff] [blame] | 319 | default=28, |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 320 | help="The mask bits for tenant networks"), |
| 321 | cfg.BoolOpt('tenant_networks_reachable', |
| 322 | default=False, |
| 323 | help="Whether tenant network connectivity should be " |
| 324 | "evaluated directly"), |
| 325 | cfg.StrOpt('public_network_id', |
| 326 | default="", |
| 327 | help="Id of the public network that provides external " |
| 328 | "connectivity"), |
| 329 | cfg.StrOpt('public_router_id', |
| 330 | default="", |
| 331 | help="Id of the public router that provides external " |
| 332 | "connectivity"), |
| 333 | ] |
Jay Pipes | 3f981df | 2012-03-27 18:59:44 -0400 | [diff] [blame] | 334 | |
Matthew Treinish | e3d2614 | 2013-11-26 19:14:58 +0000 | [diff] [blame] | 335 | network_feature_group = cfg.OptGroup(name='network-feature-enabled', |
| 336 | title='Enabled network service features') |
| 337 | |
| 338 | NetworkFeaturesGroup = [ |
| 339 | cfg.ListOpt('api_extensions', |
| 340 | default=['all'], |
| 341 | help='A list of enabled extensions with a special entry all ' |
| 342 | 'which indicates every extension is enabled'), |
| 343 | ] |
| 344 | |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 345 | volume_group = cfg.OptGroup(name='volume', |
| 346 | title='Block Storage Options') |
Daryl Walleck | 587385b | 2012-03-03 13:00:26 -0600 | [diff] [blame] | 347 | |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 348 | VolumeGroup = [ |
| 349 | cfg.IntOpt('build_interval', |
| 350 | default=10, |
| 351 | help='Time in seconds between volume availability checks.'), |
| 352 | cfg.IntOpt('build_timeout', |
| 353 | default=300, |
| 354 | help='Timeout in seconds to wait for a volume to become' |
| 355 | 'available.'), |
| 356 | cfg.StrOpt('catalog_type', |
Matthew Treinish | eb72451 | 2013-10-25 15:12:59 +0000 | [diff] [blame] | 357 | default='volume', |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 358 | help="Catalog type of the Volume Service"), |
Arata Notsu | 8f44039 | 2013-09-13 16:14:20 +0900 | [diff] [blame] | 359 | cfg.StrOpt('region', |
| 360 | default='', |
| 361 | help="The volume region name to use. If empty, the value " |
| 362 | "of identity.region is used instead. If no such region " |
| 363 | "is found in the service catalog, the first found one is " |
| 364 | "used."), |
Jérôme Gallard | 86551ce | 2013-03-08 11:41:26 +0100 | [diff] [blame] | 365 | cfg.StrOpt('backend1_name', |
Giulio Fidente | f4fa894 | 2013-05-28 18:48:03 +0200 | [diff] [blame] | 366 | default='BACKEND_1', |
Jérôme Gallard | 86551ce | 2013-03-08 11:41:26 +0100 | [diff] [blame] | 367 | help="Name of the backend1 (must be declared in cinder.conf)"), |
| 368 | cfg.StrOpt('backend2_name', |
Giulio Fidente | f4fa894 | 2013-05-28 18:48:03 +0200 | [diff] [blame] | 369 | default='BACKEND_2', |
Jérôme Gallard | 86551ce | 2013-03-08 11:41:26 +0100 | [diff] [blame] | 370 | help="Name of the backend2 (must be declared in cinder.conf)"), |
Adam Gandelman | 827ad33 | 2013-06-24 17:04:09 -0700 | [diff] [blame] | 371 | cfg.StrOpt('storage_protocol', |
| 372 | default='iSCSI', |
| 373 | help='Backend protocol to target when creating volume types'), |
| 374 | cfg.StrOpt('vendor_name', |
| 375 | default='Open Source', |
| 376 | help='Backend vendor to target when creating volume types'), |
Ryan Hsu | a67f463 | 2013-08-29 16:03:06 -0700 | [diff] [blame] | 377 | cfg.StrOpt('disk_format', |
| 378 | default='raw', |
| 379 | help='Disk format to use when copying a volume to image'), |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 380 | ] |
K Jonathan Harker | d6ba4b4 | 2012-12-18 13:50:47 -0800 | [diff] [blame] | 381 | |
Matthew Treinish | d5c9602 | 2013-10-17 21:51:23 +0000 | [diff] [blame] | 382 | volume_feature_group = cfg.OptGroup(name='volume-feature-enabled', |
| 383 | title='Enabled Cinder Features') |
| 384 | |
| 385 | VolumeFeaturesGroup = [ |
| 386 | cfg.BoolOpt('multi_backend', |
| 387 | default=False, |
Matthew Treinish | e3d2614 | 2013-11-26 19:14:58 +0000 | [diff] [blame] | 388 | help="Runs Cinder multi-backend test (requires 2 backends)"), |
| 389 | cfg.ListOpt('api_extensions', |
| 390 | default=['all'], |
| 391 | help='A list of enabled extensions with a special entry all ' |
| 392 | 'which indicates every extension is enabled'), |
Zhi Kun Liu | bb363a2 | 2013-11-28 18:47:39 +0800 | [diff] [blame] | 393 | cfg.BoolOpt('api_v1', |
| 394 | default=True, |
| 395 | help="Is the v1 volume API enabled"), |
Zhi Kun Liu | 8cc3c84 | 2014-01-07 10:44:34 +0800 | [diff] [blame^] | 396 | cfg.BoolOpt('api_v2', |
| 397 | default=True, |
| 398 | help="Is the v2 volume API enabled"), |
Matthew Treinish | d5c9602 | 2013-10-17 21:51:23 +0000 | [diff] [blame] | 399 | ] |
| 400 | |
Daryl Walleck | 587385b | 2012-03-03 13:00:26 -0600 | [diff] [blame] | 401 | |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 402 | object_storage_group = cfg.OptGroup(name='object-storage', |
| 403 | title='Object Storage Service Options') |
Attila Fazekas | a23f500 | 2012-10-23 19:32:45 +0200 | [diff] [blame] | 404 | |
DennyZhang | 1e71b61 | 2013-09-26 12:35:40 -0500 | [diff] [blame] | 405 | ObjectStoreGroup = [ |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 406 | cfg.StrOpt('catalog_type', |
| 407 | default='object-store', |
| 408 | help="Catalog type of the Object-Storage service."), |
Arata Notsu | 8f44039 | 2013-09-13 16:14:20 +0900 | [diff] [blame] | 409 | cfg.StrOpt('region', |
| 410 | default='', |
| 411 | help="The object-storage region name to use. If empty, the " |
| 412 | "value of identity.region is used instead. If no such " |
| 413 | "region is found in the service catalog, the first found " |
| 414 | "one is used."), |
Matthew Treinish | f319a73 | 2013-10-24 21:39:24 +0000 | [diff] [blame] | 415 | cfg.IntOpt('container_sync_timeout', |
nayna-patel | b4989b3 | 2013-01-09 06:25:13 +0000 | [diff] [blame] | 416 | default=120, |
Fabien Boucher | 2178d31 | 2013-12-31 15:38:57 +0100 | [diff] [blame] | 417 | help="Number of seconds to time on waiting for a container " |
nayna-patel | b4989b3 | 2013-01-09 06:25:13 +0000 | [diff] [blame] | 418 | "to container synchronization complete."), |
Matthew Treinish | f319a73 | 2013-10-24 21:39:24 +0000 | [diff] [blame] | 419 | cfg.IntOpt('container_sync_interval', |
nayna-patel | b4989b3 | 2013-01-09 06:25:13 +0000 | [diff] [blame] | 420 | default=5, |
Fabien Boucher | 2178d31 | 2013-12-31 15:38:57 +0100 | [diff] [blame] | 421 | help="Number of seconds to wait while looping to check the " |
nayna-patel | b4989b3 | 2013-01-09 06:25:13 +0000 | [diff] [blame] | 422 | "status of a container to container synchronization"), |
Matthew Treinish | 3fdb80c | 2013-08-15 11:13:19 -0400 | [diff] [blame] | 423 | cfg.StrOpt('operator_role', |
| 424 | default='Member', |
| 425 | help="Role to add to users created for swift tests to " |
| 426 | "enable creating containers"), |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 427 | ] |
Attila Fazekas | a23f500 | 2012-10-23 19:32:45 +0200 | [diff] [blame] | 428 | |
Matthew Treinish | d5c9602 | 2013-10-17 21:51:23 +0000 | [diff] [blame] | 429 | object_storage_feature_group = cfg.OptGroup( |
| 430 | name='object-storage-feature-enabled', |
| 431 | title='Enabled object-storage features') |
| 432 | |
| 433 | ObjectStoreFeaturesGroup = [ |
Matthew Treinish | 2034538 | 2013-12-13 17:04:23 +0000 | [diff] [blame] | 434 | cfg.ListOpt('discoverable_apis', |
| 435 | default=['all'], |
| 436 | help="A list of the enabled optional discoverable apis. " |
| 437 | "A single entry, all, indicates that all of these " |
| 438 | "features are expected to be enabled"), |
Matthew Treinish | d5c9602 | 2013-10-17 21:51:23 +0000 | [diff] [blame] | 439 | ] |
| 440 | |
Attila Fazekas | a23f500 | 2012-10-23 19:32:45 +0200 | [diff] [blame] | 441 | |
Steve Baker | c60e4e3 | 2013-05-06 15:22:41 +1200 | [diff] [blame] | 442 | orchestration_group = cfg.OptGroup(name='orchestration', |
| 443 | title='Orchestration Service Options') |
| 444 | |
| 445 | OrchestrationGroup = [ |
| 446 | cfg.StrOpt('catalog_type', |
| 447 | default='orchestration', |
| 448 | help="Catalog type of the Orchestration service."), |
Arata Notsu | 8f44039 | 2013-09-13 16:14:20 +0900 | [diff] [blame] | 449 | cfg.StrOpt('region', |
| 450 | default='', |
| 451 | help="The orchestration region name to use. If empty, the " |
| 452 | "value of identity.region is used instead. If no such " |
| 453 | "region is found in the service catalog, the first found " |
| 454 | "one is used."), |
Steve Baker | c60e4e3 | 2013-05-06 15:22:41 +1200 | [diff] [blame] | 455 | cfg.BoolOpt('allow_tenant_isolation', |
| 456 | default=False, |
| 457 | help="Allows test cases to create/destroy tenants and " |
| 458 | "users. This option enables isolated test cases and " |
| 459 | "better parallel execution, but also requires that " |
| 460 | "OpenStack Identity API admin credentials are known."), |
| 461 | cfg.IntOpt('build_interval', |
| 462 | default=1, |
| 463 | help="Time in seconds between build status checks."), |
| 464 | cfg.IntOpt('build_timeout', |
| 465 | default=300, |
| 466 | help="Timeout in seconds to wait for a stack to build."), |
Steve Baker | c60e4e3 | 2013-05-06 15:22:41 +1200 | [diff] [blame] | 467 | cfg.StrOpt('instance_type', |
Steve Baker | 9e86b83 | 2013-05-22 15:40:28 +1200 | [diff] [blame] | 468 | default='m1.micro', |
Steve Baker | c60e4e3 | 2013-05-06 15:22:41 +1200 | [diff] [blame] | 469 | help="Instance type for tests. Needs to be big enough for a " |
| 470 | "full OS plus the test workload"), |
| 471 | cfg.StrOpt('image_ref', |
| 472 | default=None, |
| 473 | help="Name of heat-cfntools enabled image to use when " |
| 474 | "launching test instances."), |
| 475 | cfg.StrOpt('keypair_name', |
| 476 | default=None, |
| 477 | help="Name of existing keypair to launch servers with."), |
Clint Byrum | 71f2763 | 2013-09-09 11:41:32 -0700 | [diff] [blame] | 478 | cfg.IntOpt('max_template_size', |
Joe Gordon | 0e51b22 | 2013-10-24 14:11:10 +0100 | [diff] [blame] | 479 | default=524288, |
Clint Byrum | 71f2763 | 2013-09-09 11:41:32 -0700 | [diff] [blame] | 480 | help="Value must match heat configuration of the same name."), |
Steve Baker | c60e4e3 | 2013-05-06 15:22:41 +1200 | [diff] [blame] | 481 | ] |
| 482 | |
| 483 | |
Yassine Lamgarchal | b158d41 | 2013-12-27 19:29:42 +0100 | [diff] [blame] | 484 | telemetry_group = cfg.OptGroup(name='telemetry', |
| 485 | title='Telemetry Service Options') |
| 486 | |
| 487 | TelemetryGroup = [ |
| 488 | cfg.StrOpt('catalog_type', |
| 489 | default='metering', |
| 490 | help="Catalog type of the Telemetry service."), |
| 491 | ] |
| 492 | |
| 493 | |
Julie Pichon | d101764 | 2013-07-24 16:37:23 +0100 | [diff] [blame] | 494 | dashboard_group = cfg.OptGroup(name="dashboard", |
| 495 | title="Dashboard options") |
| 496 | |
| 497 | DashboardGroup = [ |
| 498 | cfg.StrOpt('dashboard_url', |
| 499 | default='http://localhost/', |
| 500 | help="Where the dashboard can be found"), |
| 501 | cfg.StrOpt('login_url', |
| 502 | default='http://localhost/auth/login/', |
| 503 | help="Login page for the dashboard"), |
| 504 | ] |
| 505 | |
| 506 | |
Sergey Lukjanov | cec6c3f | 2013-12-10 12:38:21 +0400 | [diff] [blame] | 507 | data_processing_group = cfg.OptGroup(name="data_processing", |
| 508 | title="Data Processing options") |
| 509 | |
| 510 | DataProcessingGroup = [ |
| 511 | cfg.StrOpt('catalog_type', |
| 512 | default='data_processing', |
| 513 | help="Catalog type of the data processing service.") |
| 514 | ] |
| 515 | |
| 516 | |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 517 | boto_group = cfg.OptGroup(name='boto', |
| 518 | title='EC2/S3 options') |
DennyZhang | 1e71b61 | 2013-09-26 12:35:40 -0500 | [diff] [blame] | 519 | BotoGroup = [ |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 520 | cfg.StrOpt('ec2_url', |
| 521 | default="http://localhost:8773/services/Cloud", |
| 522 | help="EC2 URL"), |
| 523 | cfg.StrOpt('s3_url', |
| 524 | default="http://localhost:8080", |
| 525 | help="S3 URL"), |
| 526 | cfg.StrOpt('aws_secret', |
| 527 | default=None, |
| 528 | help="AWS Secret Key", |
| 529 | secret=True), |
| 530 | cfg.StrOpt('aws_access', |
| 531 | default=None, |
| 532 | help="AWS Access Key"), |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 533 | cfg.StrOpt('s3_materials_path', |
| 534 | default="/opt/stack/devstack/files/images/" |
| 535 | "s3-materials/cirros-0.3.0", |
| 536 | help="S3 Materials Path"), |
| 537 | cfg.StrOpt('ari_manifest', |
| 538 | default="cirros-0.3.0-x86_64-initrd.manifest.xml", |
| 539 | help="ARI Ramdisk Image manifest"), |
| 540 | cfg.StrOpt('ami_manifest', |
| 541 | default="cirros-0.3.0-x86_64-blank.img.manifest.xml", |
| 542 | help="AMI Machine Image manifest"), |
| 543 | cfg.StrOpt('aki_manifest', |
| 544 | default="cirros-0.3.0-x86_64-vmlinuz.manifest.xml", |
| 545 | help="AKI Kernel Image manifest"), |
| 546 | cfg.StrOpt('instance_type', |
| 547 | default="m1.tiny", |
| 548 | help="Instance type"), |
| 549 | cfg.IntOpt('http_socket_timeout', |
| 550 | default=3, |
| 551 | help="boto Http socket timeout"), |
| 552 | cfg.IntOpt('num_retries', |
| 553 | default=1, |
| 554 | help="boto num_retries on error"), |
| 555 | cfg.IntOpt('build_timeout', |
| 556 | default=60, |
| 557 | help="Status Change Timeout"), |
| 558 | cfg.IntOpt('build_interval', |
| 559 | default=1, |
| 560 | help="Status Change Test Interval"), |
| 561 | ] |
Attila Fazekas | f7f2d93 | 2012-12-13 09:14:38 +0100 | [diff] [blame] | 562 | |
Matthew Treinish | 615ea6a | 2013-02-25 17:26:59 -0500 | [diff] [blame] | 563 | stress_group = cfg.OptGroup(name='stress', title='Stress Test Options') |
| 564 | |
| 565 | StressGroup = [ |
| 566 | cfg.StrOpt('nova_logdir', |
| 567 | default=None, |
| 568 | help='Directory containing log files on the compute nodes'), |
| 569 | cfg.IntOpt('max_instances', |
| 570 | default=16, |
| 571 | help='Maximum number of instances to create during test.'), |
| 572 | cfg.StrOpt('controller', |
| 573 | default=None, |
David Kranz | b9d9750 | 2013-05-01 15:55:04 -0400 | [diff] [blame] | 574 | help='Controller host.'), |
| 575 | # new stress options |
| 576 | cfg.StrOpt('target_controller', |
| 577 | default=None, |
| 578 | help='Controller host.'), |
| 579 | cfg.StrOpt('target_ssh_user', |
| 580 | default=None, |
| 581 | help='ssh user.'), |
| 582 | cfg.StrOpt('target_private_key_path', |
| 583 | default=None, |
| 584 | help='Path to private key.'), |
| 585 | cfg.StrOpt('target_logfiles', |
| 586 | default=None, |
| 587 | help='regexp for list of log files.'), |
Matthew Treinish | f319a73 | 2013-10-24 21:39:24 +0000 | [diff] [blame] | 588 | cfg.IntOpt('log_check_interval', |
David Kranz | b9d9750 | 2013-05-01 15:55:04 -0400 | [diff] [blame] | 589 | default=60, |
Marc Koderer | 32221b8e | 2013-08-23 13:57:50 +0200 | [diff] [blame] | 590 | help='time (in seconds) between log file error checks.'), |
Matthew Treinish | f319a73 | 2013-10-24 21:39:24 +0000 | [diff] [blame] | 591 | cfg.IntOpt('default_thread_number_per_action', |
Marc Koderer | 32221b8e | 2013-08-23 13:57:50 +0200 | [diff] [blame] | 592 | default=4, |
Julien Leloup | 04d40f7 | 2014-01-28 11:17:18 +0100 | [diff] [blame] | 593 | help='The number of threads created while stress test.'), |
| 594 | cfg.BoolOpt('leave_dirty_stack', |
| 595 | default=False, |
| 596 | help='Prevent the cleaning (tearDownClass()) between' |
| 597 | ' each stress test run if an exception occurs' |
| 598 | ' during this run.') |
Matthew Treinish | 615ea6a | 2013-02-25 17:26:59 -0500 | [diff] [blame] | 599 | ] |
| 600 | |
| 601 | |
Masayuki Igawa | 73d9f3a | 2013-05-24 10:30:01 +0900 | [diff] [blame] | 602 | scenario_group = cfg.OptGroup(name='scenario', title='Scenario Test Options') |
| 603 | |
| 604 | ScenarioGroup = [ |
| 605 | cfg.StrOpt('img_dir', |
| 606 | default='/opt/stack/new/devstack/files/images/' |
| 607 | 'cirros-0.3.1-x86_64-uec', |
| 608 | help='Directory containing image files'), |
| 609 | cfg.StrOpt('ami_img_file', |
| 610 | default='cirros-0.3.1-x86_64-blank.img', |
| 611 | help='AMI image file name'), |
| 612 | cfg.StrOpt('ari_img_file', |
| 613 | default='cirros-0.3.1-x86_64-initrd', |
| 614 | help='ARI image file name'), |
| 615 | cfg.StrOpt('aki_img_file', |
| 616 | default='cirros-0.3.1-x86_64-vmlinuz', |
| 617 | help='AKI image file name'), |
| 618 | cfg.StrOpt('ssh_user', |
| 619 | default='cirros', |
Joe Gordon | b5e10cd | 2013-07-10 15:51:12 +0000 | [diff] [blame] | 620 | help='ssh username for the image file'), |
| 621 | cfg.IntOpt( |
| 622 | 'large_ops_number', |
| 623 | default=0, |
| 624 | help="specifies how many resources to request at once. Used " |
| 625 | "for large operations testing.") |
Masayuki Igawa | 73d9f3a | 2013-05-24 10:30:01 +0900 | [diff] [blame] | 626 | ] |
| 627 | |
| 628 | |
Matthew Treinish | 4c41292 | 2013-07-16 15:27:42 -0400 | [diff] [blame] | 629 | service_available_group = cfg.OptGroup(name="service_available", |
| 630 | title="Available OpenStack Services") |
| 631 | |
| 632 | ServiceAvailableGroup = [ |
| 633 | cfg.BoolOpt('cinder', |
| 634 | default=True, |
| 635 | help="Whether or not cinder is expected to be available"), |
Matthew Treinish | faa340d | 2013-07-19 16:26:21 -0400 | [diff] [blame] | 636 | cfg.BoolOpt('neutron', |
| 637 | default=False, |
| 638 | help="Whether or not neutron is expected to be available"), |
Matthew Treinish | 853ae44 | 2013-07-19 16:36:07 -0400 | [diff] [blame] | 639 | cfg.BoolOpt('glance', |
| 640 | default=True, |
| 641 | help="Whether or not glance is expected to be available"), |
Matthew Treinish | 61e332b | 2013-07-19 16:42:31 -0400 | [diff] [blame] | 642 | cfg.BoolOpt('swift', |
| 643 | default=True, |
| 644 | help="Whether or not swift is expected to be available"), |
Matthew Treinish | 6b41e24 | 2013-07-19 16:49:28 -0400 | [diff] [blame] | 645 | cfg.BoolOpt('nova', |
| 646 | default=True, |
| 647 | help="Whether or not nova is expected to be available"), |
Matthew Treinish | a9d4388 | 2013-07-19 16:54:52 -0400 | [diff] [blame] | 648 | cfg.BoolOpt('heat', |
| 649 | default=False, |
| 650 | help="Whether or not Heat is expected to be available"), |
Mehdi Abaakouk | 8581c0b | 2013-10-04 10:45:42 +0200 | [diff] [blame] | 651 | cfg.BoolOpt('ceilometer', |
| 652 | default=True, |
| 653 | help="Whether or not Ceilometer is expected to be available"), |
Julie Pichon | d101764 | 2013-07-24 16:37:23 +0100 | [diff] [blame] | 654 | cfg.BoolOpt('horizon', |
| 655 | default=True, |
| 656 | help="Whether or not Horizon is expected to be available"), |
Sergey Lukjanov | cec6c3f | 2013-12-10 12:38:21 +0400 | [diff] [blame] | 657 | cfg.BoolOpt('savanna', |
| 658 | default=False, |
| 659 | help="Whether or not Savanna is expected to be available"), |
Roman Prykhodchenko | 62b1ed1 | 2013-10-16 21:51:47 +0300 | [diff] [blame] | 660 | cfg.BoolOpt('ironic', |
| 661 | default=False, |
| 662 | help="Whether or not Ironic is expected to be available"), |
Matthew Treinish | 4c41292 | 2013-07-16 15:27:42 -0400 | [diff] [blame] | 663 | ] |
| 664 | |
Attila Fazekas | aeeeefd | 2013-08-06 17:01:56 +0200 | [diff] [blame] | 665 | debug_group = cfg.OptGroup(name="debug", |
| 666 | title="Debug System") |
| 667 | |
| 668 | DebugGroup = [ |
| 669 | cfg.BoolOpt('enable', |
| 670 | default=True, |
| 671 | help="Enable diagnostic commands"), |
| 672 | ] |
| 673 | |
Andrea Frittoli | f5da28b | 2013-12-06 07:08:07 +0000 | [diff] [blame] | 674 | input_scenario_group = cfg.OptGroup(name="input-scenario", |
| 675 | title="Filters and values for" |
| 676 | " input scenarios") |
| 677 | |
| 678 | InputScenarioGroup = [ |
| 679 | cfg.StrOpt('image_regex', |
| 680 | default='^cirros-0.3.1-x86_64-uec$', |
| 681 | help="Matching images become parameters for scenario tests"), |
| 682 | cfg.StrOpt('flavor_regex', |
Andrea Frittoli | 99901c0 | 2014-01-30 18:06:49 +0000 | [diff] [blame] | 683 | default='^m1.nano$', |
Andrea Frittoli | f5da28b | 2013-12-06 07:08:07 +0000 | [diff] [blame] | 684 | help="Matching flavors become parameters for scenario tests"), |
| 685 | cfg.StrOpt('non_ssh_image_regex', |
| 686 | default='^.*[Ww]in.*$', |
| 687 | help="SSH verification in tests is skipped" |
| 688 | "for matching images"), |
| 689 | cfg.StrOpt('ssh_user_regex', |
| 690 | default="[[\"^.*[Cc]irros.*$\", \"root\"]]", |
| 691 | help="List of user mapped to regex " |
| 692 | "to matching image names."), |
| 693 | ] |
| 694 | |
Attila Fazekas | aeeeefd | 2013-08-06 17:01:56 +0200 | [diff] [blame] | 695 | |
Roman Prykhodchenko | 62b1ed1 | 2013-10-16 21:51:47 +0300 | [diff] [blame] | 696 | baremetal_group = cfg.OptGroup(name='baremetal', |
| 697 | title='Baremetal provisioning service options') |
| 698 | |
| 699 | BaremetalGroup = [ |
| 700 | cfg.StrOpt('catalog_type', |
| 701 | default='baremetal', |
| 702 | help="Catalog type of the baremetal provisioning service."), |
| 703 | ] |
| 704 | |
Matthew Treinish | e2b56b5 | 2014-01-29 19:25:50 +0000 | [diff] [blame] | 705 | cli_group = cfg.OptGroup(name='cli', title="cli Configuration Options") |
| 706 | |
| 707 | CLIGroup = [ |
| 708 | cfg.BoolOpt('enabled', |
| 709 | default=True, |
| 710 | help="enable cli tests"), |
| 711 | cfg.StrOpt('cli_dir', |
| 712 | default='/usr/local/bin', |
| 713 | help="directory where python client binaries are located"), |
| 714 | cfg.IntOpt('timeout', |
| 715 | default=15, |
| 716 | help="Number of seconds to wait on a CLI timeout"), |
| 717 | ] |
| 718 | |
Roman Prykhodchenko | 62b1ed1 | 2013-10-16 21:51:47 +0300 | [diff] [blame] | 719 | |
Sean Dague | 3b9b1f3 | 2013-12-20 17:04:54 -0500 | [diff] [blame] | 720 | # this should never be called outside of this class |
| 721 | class TempestConfigPrivate(object): |
Daryl Walleck | 1465d61 | 2011-11-02 02:22:15 -0500 | [diff] [blame] | 722 | """Provides OpenStack configuration information.""" |
| 723 | |
Brian Waldon | 738cd63 | 2011-12-12 18:45:09 -0500 | [diff] [blame] | 724 | DEFAULT_CONFIG_DIR = os.path.join( |
Zhongyue Luo | a1343de | 2013-01-04 16:21:35 +0800 | [diff] [blame] | 725 | os.path.abspath(os.path.dirname(os.path.dirname(__file__))), |
Brian Waldon | 738cd63 | 2011-12-12 18:45:09 -0500 | [diff] [blame] | 726 | "etc") |
Daryl Walleck | 1465d61 | 2011-11-02 02:22:15 -0500 | [diff] [blame] | 727 | |
Brian Waldon | 738cd63 | 2011-12-12 18:45:09 -0500 | [diff] [blame] | 728 | DEFAULT_CONFIG_FILE = "tempest.conf" |
| 729 | |
Sean Dague | 2ec4c2c | 2013-12-22 11:30:06 -0500 | [diff] [blame] | 730 | def __init__(self, parse_conf=True): |
Brian Waldon | 738cd63 | 2011-12-12 18:45:09 -0500 | [diff] [blame] | 731 | """Initialize a configuration from a conf directory and conf file.""" |
Sean Dague | 3b9b1f3 | 2013-12-20 17:04:54 -0500 | [diff] [blame] | 732 | super(TempestConfigPrivate, self).__init__() |
Sean Dague | 2416cf3 | 2013-04-10 08:29:07 -0400 | [diff] [blame] | 733 | config_files = [] |
Sean Dague | 2416cf3 | 2013-04-10 08:29:07 -0400 | [diff] [blame] | 734 | failsafe_path = "/etc/tempest/" + self.DEFAULT_CONFIG_FILE |
Brian Waldon | 738cd63 | 2011-12-12 18:45:09 -0500 | [diff] [blame] | 735 | |
| 736 | # Environment variables override defaults... |
| 737 | conf_dir = os.environ.get('TEMPEST_CONFIG_DIR', |
Zhongyue Luo | 79d8d36 | 2012-09-25 13:49:27 +0800 | [diff] [blame] | 738 | self.DEFAULT_CONFIG_DIR) |
| 739 | conf_file = os.environ.get('TEMPEST_CONFIG', self.DEFAULT_CONFIG_FILE) |
Brian Waldon | 738cd63 | 2011-12-12 18:45:09 -0500 | [diff] [blame] | 740 | |
Jay Pipes | 7f75763 | 2011-12-02 15:53:32 -0500 | [diff] [blame] | 741 | path = os.path.join(conf_dir, conf_file) |
| 742 | |
Matthew Treinish | 56041db | 2014-01-21 23:30:43 +0000 | [diff] [blame] | 743 | if not os.path.isfile(path): |
Sean Dague | 2416cf3 | 2013-04-10 08:29:07 -0400 | [diff] [blame] | 744 | path = failsafe_path |
Attila Fazekas | 5abb253 | 2012-12-04 11:30:49 +0100 | [diff] [blame] | 745 | |
Sean Dague | 2ec4c2c | 2013-12-22 11:30:06 -0500 | [diff] [blame] | 746 | # only parse the config file if we expect one to exist. This is needed |
| 747 | # to remove an issue with the config file up to date checker. |
| 748 | if parse_conf: |
Sean Dague | 2416cf3 | 2013-04-10 08:29:07 -0400 | [diff] [blame] | 749 | config_files.append(path) |
Jay Pipes | 7f75763 | 2011-12-02 15:53:32 -0500 | [diff] [blame] | 750 | |
Sean Dague | 2416cf3 | 2013-04-10 08:29:07 -0400 | [diff] [blame] | 751 | cfg.CONF([], project='tempest', default_config_files=config_files) |
Matthew Treinish | f4a9b0f | 2013-07-26 16:58:26 -0400 | [diff] [blame] | 752 | logging.setup('tempest') |
| 753 | LOG = logging.getLogger('tempest') |
| 754 | LOG.info("Using tempest config file %s" % path) |
Daryl Walleck | 1465d61 | 2011-11-02 02:22:15 -0500 | [diff] [blame] | 755 | |
DennyZhang | 88a2dd8 | 2013-10-07 12:55:35 -0500 | [diff] [blame] | 756 | register_opt_group(cfg.CONF, compute_group, ComputeGroup) |
Matthew Treinish | d5c9602 | 2013-10-17 21:51:23 +0000 | [diff] [blame] | 757 | register_opt_group(cfg.CONF, compute_features_group, |
| 758 | ComputeFeaturesGroup) |
DennyZhang | 88a2dd8 | 2013-10-07 12:55:35 -0500 | [diff] [blame] | 759 | register_opt_group(cfg.CONF, identity_group, IdentityGroup) |
Matthew Treinish | d5021a7 | 2014-01-09 18:42:51 +0000 | [diff] [blame] | 760 | register_opt_group(cfg.CONF, identity_feature_group, |
| 761 | IdentityFeatureGroup) |
DennyZhang | 88a2dd8 | 2013-10-07 12:55:35 -0500 | [diff] [blame] | 762 | register_opt_group(cfg.CONF, image_group, ImageGroup) |
Matthew Treinish | 2b5287d | 2013-10-22 17:40:34 +0000 | [diff] [blame] | 763 | register_opt_group(cfg.CONF, image_feature_group, ImageFeaturesGroup) |
DennyZhang | 88a2dd8 | 2013-10-07 12:55:35 -0500 | [diff] [blame] | 764 | register_opt_group(cfg.CONF, network_group, NetworkGroup) |
Matthew Treinish | e3d2614 | 2013-11-26 19:14:58 +0000 | [diff] [blame] | 765 | register_opt_group(cfg.CONF, network_feature_group, |
| 766 | NetworkFeaturesGroup) |
DennyZhang | 88a2dd8 | 2013-10-07 12:55:35 -0500 | [diff] [blame] | 767 | register_opt_group(cfg.CONF, volume_group, VolumeGroup) |
Matthew Treinish | d5c9602 | 2013-10-17 21:51:23 +0000 | [diff] [blame] | 768 | register_opt_group(cfg.CONF, volume_feature_group, |
| 769 | VolumeFeaturesGroup) |
DennyZhang | 88a2dd8 | 2013-10-07 12:55:35 -0500 | [diff] [blame] | 770 | register_opt_group(cfg.CONF, object_storage_group, ObjectStoreGroup) |
Matthew Treinish | d5c9602 | 2013-10-17 21:51:23 +0000 | [diff] [blame] | 771 | register_opt_group(cfg.CONF, object_storage_feature_group, |
| 772 | ObjectStoreFeaturesGroup) |
DennyZhang | 88a2dd8 | 2013-10-07 12:55:35 -0500 | [diff] [blame] | 773 | register_opt_group(cfg.CONF, orchestration_group, OrchestrationGroup) |
Yassine Lamgarchal | b158d41 | 2013-12-27 19:29:42 +0100 | [diff] [blame] | 774 | register_opt_group(cfg.CONF, telemetry_group, TelemetryGroup) |
DennyZhang | 88a2dd8 | 2013-10-07 12:55:35 -0500 | [diff] [blame] | 775 | register_opt_group(cfg.CONF, dashboard_group, DashboardGroup) |
Sergey Lukjanov | cec6c3f | 2013-12-10 12:38:21 +0400 | [diff] [blame] | 776 | register_opt_group(cfg.CONF, data_processing_group, |
| 777 | DataProcessingGroup) |
DennyZhang | 88a2dd8 | 2013-10-07 12:55:35 -0500 | [diff] [blame] | 778 | register_opt_group(cfg.CONF, boto_group, BotoGroup) |
| 779 | register_opt_group(cfg.CONF, compute_admin_group, ComputeAdminGroup) |
| 780 | register_opt_group(cfg.CONF, stress_group, StressGroup) |
| 781 | register_opt_group(cfg.CONF, scenario_group, ScenarioGroup) |
| 782 | register_opt_group(cfg.CONF, service_available_group, |
| 783 | ServiceAvailableGroup) |
| 784 | register_opt_group(cfg.CONF, debug_group, DebugGroup) |
Roman Prykhodchenko | 62b1ed1 | 2013-10-16 21:51:47 +0300 | [diff] [blame] | 785 | register_opt_group(cfg.CONF, baremetal_group, BaremetalGroup) |
Andrea Frittoli | f5da28b | 2013-12-06 07:08:07 +0000 | [diff] [blame] | 786 | register_opt_group(cfg.CONF, input_scenario_group, InputScenarioGroup) |
Matthew Treinish | e2b56b5 | 2014-01-29 19:25:50 +0000 | [diff] [blame] | 787 | register_opt_group(cfg.CONF, cli_group, CLIGroup) |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 788 | self.compute = cfg.CONF.compute |
Matthew Treinish | d5c9602 | 2013-10-17 21:51:23 +0000 | [diff] [blame] | 789 | self.compute_feature_enabled = cfg.CONF['compute-feature-enabled'] |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 790 | self.identity = cfg.CONF.identity |
Matthew Treinish | d5021a7 | 2014-01-09 18:42:51 +0000 | [diff] [blame] | 791 | self.identity_feature_enabled = cfg.CONF['identity-feature-enabled'] |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 792 | self.images = cfg.CONF.image |
Matthew Treinish | 2b5287d | 2013-10-22 17:40:34 +0000 | [diff] [blame] | 793 | self.image_feature_enabled = cfg.CONF['image-feature-enabled'] |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 794 | self.network = cfg.CONF.network |
Matthew Treinish | e3d2614 | 2013-11-26 19:14:58 +0000 | [diff] [blame] | 795 | self.network_feature_enabled = cfg.CONF['network-feature-enabled'] |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 796 | self.volume = cfg.CONF.volume |
Matthew Treinish | d5c9602 | 2013-10-17 21:51:23 +0000 | [diff] [blame] | 797 | self.volume_feature_enabled = cfg.CONF['volume-feature-enabled'] |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 798 | self.object_storage = cfg.CONF['object-storage'] |
Matthew Treinish | d5c9602 | 2013-10-17 21:51:23 +0000 | [diff] [blame] | 799 | self.object_storage_feature_enabled = cfg.CONF[ |
| 800 | 'object-storage-feature-enabled'] |
Steve Baker | c60e4e3 | 2013-05-06 15:22:41 +1200 | [diff] [blame] | 801 | self.orchestration = cfg.CONF.orchestration |
Yassine Lamgarchal | b158d41 | 2013-12-27 19:29:42 +0100 | [diff] [blame] | 802 | self.telemetry = cfg.CONF.telemetry |
Julie Pichon | d101764 | 2013-07-24 16:37:23 +0100 | [diff] [blame] | 803 | self.dashboard = cfg.CONF.dashboard |
Sergey Lukjanov | cec6c3f | 2013-12-10 12:38:21 +0400 | [diff] [blame] | 804 | self.data_processing = cfg.CONF.data_processing |
Matthew Treinish | 39e48ef | 2012-12-21 13:36:15 -0500 | [diff] [blame] | 805 | self.boto = cfg.CONF.boto |
Attila Fazekas | cadcb1f | 2013-01-21 23:10:53 +0100 | [diff] [blame] | 806 | self.compute_admin = cfg.CONF['compute-admin'] |
Matthew Treinish | 615ea6a | 2013-02-25 17:26:59 -0500 | [diff] [blame] | 807 | self.stress = cfg.CONF.stress |
Masayuki Igawa | 73d9f3a | 2013-05-24 10:30:01 +0900 | [diff] [blame] | 808 | self.scenario = cfg.CONF.scenario |
Matthew Treinish | 4c41292 | 2013-07-16 15:27:42 -0400 | [diff] [blame] | 809 | self.service_available = cfg.CONF.service_available |
Attila Fazekas | 5fae7a3 | 2013-09-25 16:52:44 +0200 | [diff] [blame] | 810 | self.debug = cfg.CONF.debug |
Roman Prykhodchenko | 62b1ed1 | 2013-10-16 21:51:47 +0300 | [diff] [blame] | 811 | self.baremetal = cfg.CONF.baremetal |
Andrea Frittoli | f5da28b | 2013-12-06 07:08:07 +0000 | [diff] [blame] | 812 | self.input_scenario = cfg.CONF['input-scenario'] |
Matthew Treinish | e2b56b5 | 2014-01-29 19:25:50 +0000 | [diff] [blame] | 813 | self.cli = cfg.CONF.cli |
Attila Fazekas | cadcb1f | 2013-01-21 23:10:53 +0100 | [diff] [blame] | 814 | if not self.compute_admin.username: |
| 815 | self.compute_admin.username = self.identity.admin_username |
| 816 | self.compute_admin.password = self.identity.admin_password |
| 817 | self.compute_admin.tenant_name = self.identity.admin_tenant_name |
Sean Dague | 86bd842 | 2013-12-20 09:56:44 -0500 | [diff] [blame] | 818 | |
| 819 | |
| 820 | class TempestConfigProxy(object): |
| 821 | _config = None |
| 822 | |
| 823 | def __getattr__(self, attr): |
| 824 | if not self._config: |
Sean Dague | 3b9b1f3 | 2013-12-20 17:04:54 -0500 | [diff] [blame] | 825 | self._config = TempestConfigPrivate() |
Sean Dague | 86bd842 | 2013-12-20 09:56:44 -0500 | [diff] [blame] | 826 | |
| 827 | return getattr(self._config, attr) |
| 828 | |
| 829 | |
| 830 | CONF = TempestConfigProxy() |