blob: 7d871cb96bc754614d9066427ed88181862fab66 [file] [log] [blame]
ZhiQiang Fan39f97222013-09-20 04:49:44 +08001# Copyright 2012 OpenStack Foundation
Jay Pipes3f981df2012-03-27 18:59:44 -04002# 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 Muellere746fc22013-06-29 16:29:29 +020016from __future__ import print_function
17
Masayuki Igawa9ec4cd82014-02-05 15:04:16 +090018import logging as std_logging
Jay Pipes7f757632011-12-02 15:53:32 -050019import os
Jay Pipes3f981df2012-03-27 18:59:44 -040020
Matthew Treinish90aedd12013-02-25 17:56:49 -050021from oslo.config import cfg
22
Matthew Treinishf4a9b0f2013-07-26 16:58:26 -040023from tempest.openstack.common import log as logging
Jay Pipes7f757632011-12-02 15:53:32 -050024
Daryl Walleck1465d612011-11-02 02:22:15 -050025
DennyZhang88a2dd82013-10-07 12:55:35 -050026def register_opt_group(conf, opt_group, options):
27 conf.register_group(opt_group)
28 for opt in options:
29 conf.register_opt(opt, group=opt_group.name)
30
31
Matthew Treinish39e48ef2012-12-21 13:36:15 -050032identity_group = cfg.OptGroup(name='identity',
33 title="Keystone Configuration Options")
Daryl Walleck1465d612011-11-02 02:22:15 -050034
Matthew Treinish39e48ef2012-12-21 13:36:15 -050035IdentityGroup = [
36 cfg.StrOpt('catalog_type',
37 default='identity',
38 help="Catalog type of the Identity service."),
Jay Pipescd8eaec2013-01-16 21:03:48 -050039 cfg.BoolOpt('disable_ssl_certificate_validation',
40 default=False,
41 help="Set to True if using self-signed SSL certificates."),
Jay Pipes7c88eb22013-01-16 21:32:43 -050042 cfg.StrOpt('uri',
43 default=None,
Brant Knudsonc7ca3342013-03-28 21:08:50 -050044 help="Full URI of the OpenStack Identity API (Keystone), v2"),
45 cfg.StrOpt('uri_v3',
46 help='Full URI of the OpenStack Identity API (Keystone), v3'),
Andrea Frittoli8bbdb162014-01-06 11:06:13 +000047 cfg.StrOpt('auth_version',
48 default='v2',
49 help="Identity API version to be used for authentication "
Andrea Frittoli77f9da42014-02-06 11:18:19 +000050 "for API tests."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -050051 cfg.StrOpt('region',
Attila Fazekascadcb1f2013-01-21 23:10:53 +010052 default='RegionOne',
Arata Notsu8f440392013-09-13 16:14:20 +090053 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."),
JordanP5d29b2c2013-12-18 13:56:03 +000057 cfg.StrOpt('endpoint_type',
58 default='publicURL',
59 choices=['public', 'admin', 'internal',
60 'publicURL', 'adminURL', 'internalURL'],
61 help="The endpoint type to use for the identity service."),
Attila Fazekascadcb1f2013-01-21 23:10:53 +010062 cfg.StrOpt('username',
Andrea Frittolia9463672014-03-03 14:39:02 +000063 default=None,
Attila Fazekascadcb1f2013-01-21 23:10:53 +010064 help="Username to use for Nova API requests."),
65 cfg.StrOpt('tenant_name',
Andrea Frittolia9463672014-03-03 14:39:02 +000066 default=None,
Attila Fazekascadcb1f2013-01-21 23:10:53 +010067 help="Tenant name to use for Nova API requests."),
Russell Sim7f894a52013-09-13 10:35:21 +100068 cfg.StrOpt('admin_role',
69 default='admin',
70 help="Role required to administrate keystone."),
Attila Fazekascadcb1f2013-01-21 23:10:53 +010071 cfg.StrOpt('password',
Andrea Frittolia9463672014-03-03 14:39:02 +000072 default=None,
Attila Fazekascadcb1f2013-01-21 23:10:53 +010073 help="API key to use when authenticating.",
74 secret=True),
Andrea Frittolib1b04bb2014-04-06 11:57:07 +010075 cfg.StrOpt('domain_name',
76 default=None,
77 help="Domain name for authentication (Keystone V3)."
78 "The same domain applies to user and project"),
Attila Fazekascadcb1f2013-01-21 23:10:53 +010079 cfg.StrOpt('alt_username',
80 default=None,
81 help="Username of alternate user to use for Nova API "
82 "requests."),
83 cfg.StrOpt('alt_tenant_name',
84 default=None,
85 help="Alternate user's Tenant name to use for Nova API "
86 "requests."),
87 cfg.StrOpt('alt_password',
88 default=None,
89 help="API key to use when authenticating as alternate user.",
90 secret=True),
Andrea Frittolib1b04bb2014-04-06 11:57:07 +010091 cfg.StrOpt('alt_domain_name',
92 default=None,
93 help="Alternate domain name for authentication (Keystone V3)."
94 "The same domain applies to user and project"),
Attila Fazekascadcb1f2013-01-21 23:10:53 +010095 cfg.StrOpt('admin_username',
Andrea Frittolia9463672014-03-03 14:39:02 +000096 default=None,
Dirk Mueller14bd5622014-01-14 19:33:05 +010097 help="Administrative Username to use for "
Attila Fazekascadcb1f2013-01-21 23:10:53 +010098 "Keystone API requests."),
99 cfg.StrOpt('admin_tenant_name',
Andrea Frittolia9463672014-03-03 14:39:02 +0000100 default=None,
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100101 help="Administrative Tenant name to use for Keystone API "
102 "requests."),
103 cfg.StrOpt('admin_password',
Andrea Frittolia9463672014-03-03 14:39:02 +0000104 default=None,
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100105 help="API key to use when authenticating as admin.",
106 secret=True),
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100107 cfg.StrOpt('admin_domain_name',
108 default=None,
109 help="Admin domain name for authentication (Keystone V3)."
110 "The same domain applies to user and project"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500111]
Jay Pipes3f981df2012-03-27 18:59:44 -0400112
Matthew Treinishd5021a72014-01-09 18:42:51 +0000113identity_feature_group = cfg.OptGroup(name='identity-feature-enabled',
114 title='Enabled Identity Features')
115
116IdentityFeatureGroup = [
117 cfg.BoolOpt('trust',
118 default=True,
119 help='Does the identity service have delegation and '
Matthew Treinishdb2c5972014-01-31 22:18:59 +0000120 'impersonation enabled'),
121 cfg.BoolOpt('api_v2',
122 default=True,
123 help='Is the v2 identity API enabled'),
124 cfg.BoolOpt('api_v3',
125 default=True,
126 help='Is the v3 identity API enabled'),
Matthew Treinishd5021a72014-01-09 18:42:51 +0000127]
128
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500129compute_group = cfg.OptGroup(name='compute',
130 title='Compute Service Options')
Rohit Karajgie1b050d2011-12-02 16:13:18 -0800131
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500132ComputeGroup = [
133 cfg.BoolOpt('allow_tenant_isolation',
134 default=False,
135 help="Allows test cases to create/destroy tenants and "
136 "users. This option enables isolated test cases and "
137 "better parallel execution, but also requires that "
138 "OpenStack Identity API admin credentials are known."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500139 cfg.StrOpt('image_ref',
Matthew Treinishafcb6b42014-05-27 13:50:02 -0400140 help="Valid primary image reference to be used in tests. "
141 "This is a required option"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500142 cfg.StrOpt('image_ref_alt',
Matthew Treinishafcb6b42014-05-27 13:50:02 -0400143 help="Valid secondary image reference to be used in tests. "
144 "This is a required option, but if only one image is "
145 "available duplicate the value of image_ref above"),
Ken'ichi Ohmichi35772602013-11-14 15:03:27 +0900146 cfg.StrOpt('flavor_ref',
147 default="1",
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500148 help="Valid primary flavor to use in tests."),
Ken'ichi Ohmichi35772602013-11-14 15:03:27 +0900149 cfg.StrOpt('flavor_ref_alt',
150 default="2",
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500151 help='Valid secondary flavor to be used in tests.'),
Maru Newbyaf292e82013-05-20 21:32:28 +0000152 cfg.StrOpt('image_ssh_user',
153 default="root",
154 help="User name used to authenticate to an instance."),
Ryan Hsucb2e1252013-09-03 21:44:49 -0700155 cfg.StrOpt('image_ssh_password',
156 default="password",
157 help="Password used to authenticate to an instance."),
Maru Newbyaf292e82013-05-20 21:32:28 +0000158 cfg.StrOpt('image_alt_ssh_user',
159 default="root",
160 help="User name used to authenticate to an instance using "
161 "the alternate image."),
Ryan Hsucb2e1252013-09-03 21:44:49 -0700162 cfg.StrOpt('image_alt_ssh_password',
163 default="password",
164 help="Password used to authenticate to an instance using "
165 "the alternate image."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500166 cfg.IntOpt('build_interval',
Sean Dague82190852014-05-24 07:42:59 -0400167 default=1,
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500168 help="Time in seconds between build status checks."),
169 cfg.IntOpt('build_timeout',
170 default=300,
171 help="Timeout in seconds to wait for an instance to build."),
172 cfg.BoolOpt('run_ssh',
173 default=False,
Derek Higgins85cd5142013-12-17 17:10:11 +0000174 help="Should the tests ssh to instances?"),
Attila Fazekas423834d2014-03-14 17:33:13 +0100175 cfg.StrOpt('ssh_auth_method',
176 default='keypair',
177 help="Auth method used for authenticate to the instance. "
178 "Valid choices are: keypair, configured, adminpass. "
179 "keypair: start the servers with an ssh keypair. "
180 "configured: use the configured user and password. "
181 "adminpass: use the injected adminPass. "
182 "disabled: avoid using ssh when it is an option."),
183 cfg.StrOpt('ssh_connect_method',
184 default='fixed',
185 help="How to connect to the instance? "
186 "fixed: using the first ip belongs the fixed network "
187 "floating: creating and using a floating ip"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500188 cfg.StrOpt('ssh_user',
189 default='root',
190 help="User name used to authenticate to an instance."),
Nachi Ueno6d580be2013-07-24 10:58:11 -0700191 cfg.IntOpt('ping_timeout',
Darragh O'Reilly6b636672014-01-24 12:17:40 +0000192 default=120,
Nachi Ueno6d580be2013-07-24 10:58:11 -0700193 help="Timeout in seconds to wait for ping to "
194 "succeed."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500195 cfg.IntOpt('ssh_timeout',
196 default=300,
Chris Yeoh76916042013-02-27 16:25:25 +1030197 help="Timeout in seconds to wait for authentication to "
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500198 "succeed."),
Attila Fazekas0abbc952013-07-01 19:19:42 +0200199 cfg.IntOpt('ready_wait',
200 default=0,
DennyZhang8912d012013-09-25 18:08:34 -0500201 help="Additional wait time for clean state, when there is "
202 "no OS-EXT-STS extension available"),
Chris Yeoh76916042013-02-27 16:25:25 +1030203 cfg.IntOpt('ssh_channel_timeout',
204 default=60,
205 help="Timeout in seconds to wait for output from ssh "
206 "channel."),
Attila Fazekasb0661652013-05-08 13:01:36 +0200207 cfg.StrOpt('fixed_network_name',
208 default='private',
209 help="Visible fixed network name "),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500210 cfg.StrOpt('network_for_ssh',
211 default='public',
212 help="Network used for SSH connections."),
213 cfg.IntOpt('ip_version_for_ssh',
214 default=4,
215 help="IP version used for SSH connections."),
fujioka yuuichia11994e2013-07-09 11:19:51 +0900216 cfg.BoolOpt('use_floatingip_for_ssh',
217 default=True,
Tushar Kalra95a482d2014-03-25 14:24:43 -0700218 help="Does SSH use Floating IPs?"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500219 cfg.StrOpt('catalog_type',
220 default='compute',
221 help="Catalog type of the Compute service."),
Arata Notsu8f440392013-09-13 16:14:20 +0900222 cfg.StrOpt('region',
223 default='',
224 help="The compute region name to use. If empty, the value "
225 "of identity.region is used instead. If no such region "
226 "is found in the service catalog, the first found one is "
227 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000228 cfg.StrOpt('endpoint_type',
229 default='publicURL',
230 choices=['public', 'admin', 'internal',
231 'publicURL', 'adminURL', 'internalURL'],
232 help="The endpoint type to use for the compute service."),
ivan-zhu8f992be2013-07-31 14:56:58 +0800233 cfg.StrOpt('catalog_v3_type',
234 default='computev3',
235 help="Catalog type of the Compute v3 service."),
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100236 cfg.StrOpt('path_to_private_key',
237 default=None,
238 help="Path to a private key file for SSH access to remote "
239 "hosts"),
Ryan Hsucb2e1252013-09-03 21:44:49 -0700240 cfg.StrOpt('volume_device_name',
241 default='vdb',
242 help="Expected device name when a volume is attached to "
Ken'ichi Ohmichi39437e22013-10-06 00:21:38 +0900243 "an instance"),
244 cfg.IntOpt('shelved_offload_time',
245 default=0,
246 help='Time in seconds before a shelved instance is eligible '
247 'for removing from a host. -1 never offload, 0 offload '
248 'when shelved. This time should be the same as the time '
249 'of nova.conf, and some tests will run for as long as the '
Ghanshyam06a5b4a2014-04-11 17:32:45 +0900250 'time.'),
251 cfg.StrOpt('floating_ip_range',
252 default='10.0.0.0/29',
253 help='Unallocated floating IP range, which will be used to '
254 'test the floating IP bulk feature for CRUD operation.')
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500255]
Rohit Karajgie1b050d2011-12-02 16:13:18 -0800256
Matthew Treinishd5c96022013-10-17 21:51:23 +0000257compute_features_group = cfg.OptGroup(name='compute-feature-enabled',
258 title="Enabled Compute Service Features")
259
260ComputeFeaturesGroup = [
ivan-zhu8f992be2013-07-31 14:56:58 +0800261 cfg.BoolOpt('api_v3',
Matthew Treinish836e56b2014-06-12 13:55:19 -0400262 default=False,
ivan-zhu8f992be2013-07-31 14:56:58 +0800263 help="If false, skip all nova v3 tests."),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000264 cfg.BoolOpt('disk_config',
265 default=True,
266 help="If false, skip disk config tests"),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000267 cfg.ListOpt('api_extensions',
268 default=['all'],
Zhi Kun Liude25c022014-02-14 13:25:19 +0800269 help='A list of enabled compute extensions with a special '
Ken'ichi Ohmichia7e68712014-05-06 10:47:26 +0900270 'entry all which indicates every extension is enabled. '
271 'Each extension should be specified with alias name'),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000272 cfg.ListOpt('api_v3_extensions',
273 default=['all'],
274 help='A list of enabled v3 extensions with a special entry all'
Ken'ichi Ohmichia7e68712014-05-06 10:47:26 +0900275 ' which indicates every extension is enabled. '
276 'Each extension should be specified with alias name'),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000277 cfg.BoolOpt('change_password',
278 default=False,
279 help="Does the test environment support changing the admin "
280 "password?"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000281 cfg.BoolOpt('resize',
282 default=False,
283 help="Does the test environment support resizing?"),
Eric Windischb5538072014-03-09 23:47:35 -0400284 cfg.BoolOpt('pause',
285 default=True,
286 help="Does the test environment support pausing?"),
Eric Windischaeb7e842014-03-10 01:10:50 -0400287 cfg.BoolOpt('suspend',
288 default=True,
289 help="Does the test environment support suspend/resume?"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000290 cfg.BoolOpt('live_migration',
291 default=False,
292 help="Does the test environment support live migration "
293 "available?"),
294 cfg.BoolOpt('block_migration_for_live_migration',
295 default=False,
296 help="Does the test environment use block devices for live "
297 "migration"),
298 cfg.BoolOpt('block_migrate_cinder_iscsi',
299 default=False,
300 help="Does the test environment block migration support "
Ghanshyam Mann41c17572014-02-27 18:52:56 +0900301 "cinder iSCSI volumes"),
302 cfg.BoolOpt('vnc_console',
303 default=False,
304 help='Enable VNC console. This configuration value should '
Ghanshyam70876d02014-03-11 11:40:18 +0900305 'be same as [nova.vnc]->vnc_enabled in nova.conf'),
306 cfg.BoolOpt('spice_console',
307 default=False,
308 help='Enable Spice console. This configuration value should '
309 'be same as [nova.spice]->enabled in nova.conf'),
310 cfg.BoolOpt('rdp_console',
311 default=False,
312 help='Enable RDP console. This configuration value should '
Adam Gandelman2e37b4f2014-06-18 17:34:21 -0700313 'be same as [nova.rdp]->enabled in nova.conf'),
314 cfg.BoolOpt('rescue',
315 default=True,
316 help='Does the test environment support instance rescue '
317 'mode?')
Matthew Treinishd5c96022013-10-17 21:51:23 +0000318]
319
320
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500321compute_admin_group = cfg.OptGroup(name='compute-admin',
322 title="Compute Admin Options")
donald-ngo7fb1efa2011-12-13 17:17:36 -0800323
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500324ComputeAdminGroup = [
325 cfg.StrOpt('username',
Andrea Frittolia9463672014-03-03 14:39:02 +0000326 default=None,
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500327 help="Administrative Username to use for Nova API requests."),
328 cfg.StrOpt('tenant_name',
Andrea Frittolia9463672014-03-03 14:39:02 +0000329 default=None,
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500330 help="Administrative Tenant name to use for Nova API "
331 "requests."),
332 cfg.StrOpt('password',
Andrea Frittolia9463672014-03-03 14:39:02 +0000333 default=None,
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500334 help="API key to use when authenticating as admin.",
335 secret=True),
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100336 cfg.StrOpt('domain_name',
337 default=None,
338 help="Domain name for authentication as admin (Keystone V3)."
339 "The same domain applies to user and project"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500340]
Daryl Walleck587385b2012-03-03 13:00:26 -0600341
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500342image_group = cfg.OptGroup(name='image',
343 title="Image Service Options")
Jay Pipesf38eaac2012-06-21 13:37:35 -0400344
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500345ImageGroup = [
Matthew Treinish72ea4422013-02-07 14:42:49 -0500346 cfg.StrOpt('catalog_type',
347 default='image',
Sean Dague83401992013-05-06 17:46:36 -0400348 help='Catalog type of the Image service.'),
Arata Notsu8f440392013-09-13 16:14:20 +0900349 cfg.StrOpt('region',
350 default='',
351 help="The image region name to use. If empty, the value "
352 "of identity.region is used instead. If no such region "
353 "is found in the service catalog, the first found one is "
354 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000355 cfg.StrOpt('endpoint_type',
356 default='publicURL',
357 choices=['public', 'admin', 'internal',
358 'publicURL', 'adminURL', 'internalURL'],
359 help="The endpoint type to use for the image service."),
Sean Dague83401992013-05-06 17:46:36 -0400360 cfg.StrOpt('http_image',
361 default='http://download.cirros-cloud.net/0.3.1/'
362 'cirros-0.3.1-x86_64-uec.tar.gz',
DennyZhang8912d012013-09-25 18:08:34 -0500363 help='http accessible image')
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500364]
Jay Pipesf38eaac2012-06-21 13:37:35 -0400365
Matthew Treinish2b5287d2013-10-22 17:40:34 +0000366image_feature_group = cfg.OptGroup(name='image-feature-enabled',
367 title='Enabled image service features')
368
369ImageFeaturesGroup = [
370 cfg.BoolOpt('api_v2',
371 default=True,
372 help="Is the v2 image API enabled"),
373 cfg.BoolOpt('api_v1',
374 default=True,
375 help="Is the v1 image API enabled"),
376]
Jay Pipesf38eaac2012-06-21 13:37:35 -0400377
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500378network_group = cfg.OptGroup(name='network',
379 title='Network Service Options')
Daryl Walleck587385b2012-03-03 13:00:26 -0600380
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500381NetworkGroup = [
382 cfg.StrOpt('catalog_type',
383 default='network',
Mark McClainf2982e82013-07-06 17:48:03 -0400384 help='Catalog type of the Neutron service.'),
Arata Notsu8f440392013-09-13 16:14:20 +0900385 cfg.StrOpt('region',
386 default='',
387 help="The network region name to use. If empty, the value "
388 "of identity.region is used instead. If no such region "
389 "is found in the service catalog, the first found one is "
390 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000391 cfg.StrOpt('endpoint_type',
392 default='publicURL',
393 choices=['public', 'admin', 'internal',
394 'publicURL', 'adminURL', 'internalURL'],
395 help="The endpoint type to use for the network service."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500396 cfg.StrOpt('tenant_network_cidr',
397 default="10.100.0.0/16",
Henry Gessauffda37a2014-01-16 11:17:55 -0500398 help="The cidr block to allocate tenant ipv4 subnets from"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500399 cfg.IntOpt('tenant_network_mask_bits',
Attila Fazekas8ea181b2013-07-13 16:26:14 +0200400 default=28,
Henry Gessauffda37a2014-01-16 11:17:55 -0500401 help="The mask bits for tenant ipv4 subnets"),
402 cfg.StrOpt('tenant_network_v6_cidr',
403 default="2003::/64",
404 help="The cidr block to allocate tenant ipv6 subnets from"),
405 cfg.IntOpt('tenant_network_v6_mask_bits',
406 default=96,
407 help="The mask bits for tenant ipv6 subnets"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500408 cfg.BoolOpt('tenant_networks_reachable',
409 default=False,
410 help="Whether tenant network connectivity should be "
411 "evaluated directly"),
412 cfg.StrOpt('public_network_id',
413 default="",
414 help="Id of the public network that provides external "
415 "connectivity"),
416 cfg.StrOpt('public_router_id',
417 default="",
418 help="Id of the public router that provides external "
419 "connectivity"),
izikpensod9a01a62014-02-17 20:02:32 +0200420 cfg.IntOpt('build_timeout',
421 default=300,
422 help="Timeout in seconds to wait for network operation to "
423 "complete."),
424 cfg.IntOpt('build_interval',
Sean Dague82190852014-05-24 07:42:59 -0400425 default=1,
izikpensod9a01a62014-02-17 20:02:32 +0200426 help="Time in seconds between network operation status "
427 "checks."),
Attila Fazekas640392b2014-06-12 15:58:10 +0200428 cfg.ListOpt('dns_servers',
429 default=["8.8.8.8", "8.8.4.4"],
430 help="List of dns servers whichs hould be used"
431 " for subnet creation")
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500432]
Jay Pipes3f981df2012-03-27 18:59:44 -0400433
Matthew Treinishe3d26142013-11-26 19:14:58 +0000434network_feature_group = cfg.OptGroup(name='network-feature-enabled',
435 title='Enabled network service features')
436
437NetworkFeaturesGroup = [
Matthew Treinishe2e33cf2014-03-03 19:28:41 +0000438 cfg.BoolOpt('ipv6',
439 default=True,
440 help="Allow the execution of IPv6 tests"),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000441 cfg.ListOpt('api_extensions',
442 default=['all'],
Zhi Kun Liude25c022014-02-14 13:25:19 +0800443 help='A list of enabled network extensions with a special '
444 'entry all which indicates every extension is enabled'),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000445]
446
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500447queuing_group = cfg.OptGroup(name='queuing',
448 title='Queuing Service')
449
450QueuingGroup = [
451 cfg.StrOpt('catalog_type',
452 default='queuing',
453 help='Catalog type of the Queuing service.'),
Jorge Chai83ba4ee2014-04-15 18:58:08 +0000454 cfg.IntOpt('max_queues_per_page',
455 default=20,
456 help='The maximum number of queue records per page when '
457 'listing queues'),
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500458]
459
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500460volume_group = cfg.OptGroup(name='volume',
461 title='Block Storage Options')
Daryl Walleck587385b2012-03-03 13:00:26 -0600462
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500463VolumeGroup = [
464 cfg.IntOpt('build_interval',
Sean Dague82190852014-05-24 07:42:59 -0400465 default=1,
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500466 help='Time in seconds between volume availability checks.'),
467 cfg.IntOpt('build_timeout',
468 default=300,
469 help='Timeout in seconds to wait for a volume to become'
470 'available.'),
471 cfg.StrOpt('catalog_type',
Matthew Treinisheb724512013-10-25 15:12:59 +0000472 default='volume',
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500473 help="Catalog type of the Volume Service"),
Arata Notsu8f440392013-09-13 16:14:20 +0900474 cfg.StrOpt('region',
475 default='',
476 help="The volume region name to use. If empty, the value "
477 "of identity.region is used instead. If no such region "
478 "is found in the service catalog, the first found one is "
479 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000480 cfg.StrOpt('endpoint_type',
481 default='publicURL',
482 choices=['public', 'admin', 'internal',
483 'publicURL', 'adminURL', 'internalURL'],
484 help="The endpoint type to use for the volume service."),
Jérôme Gallard86551ce2013-03-08 11:41:26 +0100485 cfg.StrOpt('backend1_name',
Giulio Fidentef4fa8942013-05-28 18:48:03 +0200486 default='BACKEND_1',
Jérôme Gallard86551ce2013-03-08 11:41:26 +0100487 help="Name of the backend1 (must be declared in cinder.conf)"),
488 cfg.StrOpt('backend2_name',
Giulio Fidentef4fa8942013-05-28 18:48:03 +0200489 default='BACKEND_2',
Jérôme Gallard86551ce2013-03-08 11:41:26 +0100490 help="Name of the backend2 (must be declared in cinder.conf)"),
Adam Gandelman827ad332013-06-24 17:04:09 -0700491 cfg.StrOpt('storage_protocol',
492 default='iSCSI',
493 help='Backend protocol to target when creating volume types'),
494 cfg.StrOpt('vendor_name',
495 default='Open Source',
496 help='Backend vendor to target when creating volume types'),
Ryan Hsua67f4632013-08-29 16:03:06 -0700497 cfg.StrOpt('disk_format',
498 default='raw',
499 help='Disk format to use when copying a volume to image'),
Jerry Cai9733d0e2014-03-19 15:50:49 +0800500 cfg.IntOpt('volume_size',
501 default=1,
502 help='Default size in GB for volumes created by volumes tests'),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500503]
K Jonathan Harkerd6ba4b42012-12-18 13:50:47 -0800504
Matthew Treinishd5c96022013-10-17 21:51:23 +0000505volume_feature_group = cfg.OptGroup(name='volume-feature-enabled',
506 title='Enabled Cinder Features')
507
508VolumeFeaturesGroup = [
509 cfg.BoolOpt('multi_backend',
510 default=False,
Matthew Treinishe3d26142013-11-26 19:14:58 +0000511 help="Runs Cinder multi-backend test (requires 2 backends)"),
Giulio Fidente74b08ad2014-01-18 04:02:51 +0100512 cfg.BoolOpt('backup',
513 default=True,
514 help='Runs Cinder volumes backup test'),
JordanPbce55532014-03-19 12:10:32 +0100515 cfg.BoolOpt('snapshot',
516 default=True,
517 help='Runs Cinder volume snapshot test'),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000518 cfg.ListOpt('api_extensions',
519 default=['all'],
Zhi Kun Liude25c022014-02-14 13:25:19 +0800520 help='A list of enabled volume extensions with a special '
521 'entry all which indicates every extension is enabled'),
Zhi Kun Liubb363a22013-11-28 18:47:39 +0800522 cfg.BoolOpt('api_v1',
523 default=True,
524 help="Is the v1 volume API enabled"),
Zhi Kun Liu8cc3c842014-01-07 10:44:34 +0800525 cfg.BoolOpt('api_v2',
526 default=True,
527 help="Is the v2 volume API enabled"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000528]
529
Daryl Walleck587385b2012-03-03 13:00:26 -0600530
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500531object_storage_group = cfg.OptGroup(name='object-storage',
532 title='Object Storage Service Options')
Attila Fazekasa23f5002012-10-23 19:32:45 +0200533
DennyZhang1e71b612013-09-26 12:35:40 -0500534ObjectStoreGroup = [
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500535 cfg.StrOpt('catalog_type',
536 default='object-store',
537 help="Catalog type of the Object-Storage service."),
Arata Notsu8f440392013-09-13 16:14:20 +0900538 cfg.StrOpt('region',
539 default='',
540 help="The object-storage region name to use. If empty, the "
541 "value of identity.region is used instead. If no such "
542 "region is found in the service catalog, the first found "
543 "one is used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000544 cfg.StrOpt('endpoint_type',
545 default='publicURL',
546 choices=['public', 'admin', 'internal',
547 'publicURL', 'adminURL', 'internalURL'],
548 help="The endpoint type to use for the object-store service."),
Matthew Treinishf319a732013-10-24 21:39:24 +0000549 cfg.IntOpt('container_sync_timeout',
nayna-patelb4989b32013-01-09 06:25:13 +0000550 default=120,
Fabien Boucher2178d312013-12-31 15:38:57 +0100551 help="Number of seconds to time on waiting for a container "
nayna-patelb4989b32013-01-09 06:25:13 +0000552 "to container synchronization complete."),
Matthew Treinishf319a732013-10-24 21:39:24 +0000553 cfg.IntOpt('container_sync_interval',
nayna-patelb4989b32013-01-09 06:25:13 +0000554 default=5,
Fabien Boucher2178d312013-12-31 15:38:57 +0100555 help="Number of seconds to wait while looping to check the "
nayna-patelb4989b32013-01-09 06:25:13 +0000556 "status of a container to container synchronization"),
Matthew Treinish3fdb80c2013-08-15 11:13:19 -0400557 cfg.StrOpt('operator_role',
558 default='Member',
559 help="Role to add to users created for swift tests to "
560 "enable creating containers"),
Matthew Treinish998c91d2014-03-01 12:39:49 -0500561 cfg.StrOpt('reseller_admin_role',
562 default='ResellerAdmin',
563 help="User role that has reseller admin"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500564]
Attila Fazekasa23f5002012-10-23 19:32:45 +0200565
Matthew Treinishd5c96022013-10-17 21:51:23 +0000566object_storage_feature_group = cfg.OptGroup(
567 name='object-storage-feature-enabled',
568 title='Enabled object-storage features')
569
570ObjectStoreFeaturesGroup = [
Matthew Treinish20345382013-12-13 17:04:23 +0000571 cfg.ListOpt('discoverable_apis',
572 default=['all'],
573 help="A list of the enabled optional discoverable apis. "
574 "A single entry, all, indicates that all of these "
575 "features are expected to be enabled"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000576]
577
Nikhil Manchandadd6886f2014-03-03 01:58:45 -0800578database_group = cfg.OptGroup(name='database',
579 title='Database Service Options')
580
581DatabaseGroup = [
582 cfg.StrOpt('catalog_type',
583 default='database',
584 help="Catalog type of the Database service."),
585 cfg.StrOpt('db_flavor_ref',
586 default="1",
587 help="Valid primary flavor to use in database tests."),
Peter Stachowski320f9c72014-04-21 16:13:23 -0400588 cfg.StrOpt('db_current_version',
589 default="v1.0",
590 help="Current database version to use in database tests."),
Nikhil Manchandadd6886f2014-03-03 01:58:45 -0800591]
Attila Fazekasa23f5002012-10-23 19:32:45 +0200592
Steve Bakerc60e4e32013-05-06 15:22:41 +1200593orchestration_group = cfg.OptGroup(name='orchestration',
594 title='Orchestration Service Options')
595
596OrchestrationGroup = [
597 cfg.StrOpt('catalog_type',
598 default='orchestration',
599 help="Catalog type of the Orchestration service."),
Arata Notsu8f440392013-09-13 16:14:20 +0900600 cfg.StrOpt('region',
601 default='',
602 help="The orchestration region name to use. If empty, the "
603 "value of identity.region is used instead. If no such "
604 "region is found in the service catalog, the first found "
605 "one is used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000606 cfg.StrOpt('endpoint_type',
607 default='publicURL',
608 choices=['public', 'admin', 'internal',
609 'publicURL', 'adminURL', 'internalURL'],
610 help="The endpoint type to use for the orchestration service."),
Steve Bakerc60e4e32013-05-06 15:22:41 +1200611 cfg.BoolOpt('allow_tenant_isolation',
612 default=False,
613 help="Allows test cases to create/destroy tenants and "
614 "users. This option enables isolated test cases and "
615 "better parallel execution, but also requires that "
616 "OpenStack Identity API admin credentials are known."),
617 cfg.IntOpt('build_interval',
618 default=1,
619 help="Time in seconds between build status checks."),
620 cfg.IntOpt('build_timeout',
Matthew Treinisha2dfd492014-04-15 11:15:34 -0400621 default=1200,
Steve Bakerc60e4e32013-05-06 15:22:41 +1200622 help="Timeout in seconds to wait for a stack to build."),
Steve Bakerc60e4e32013-05-06 15:22:41 +1200623 cfg.StrOpt('instance_type',
Steve Baker9e86b832013-05-22 15:40:28 +1200624 default='m1.micro',
Steve Bakerc60e4e32013-05-06 15:22:41 +1200625 help="Instance type for tests. Needs to be big enough for a "
626 "full OS plus the test workload"),
627 cfg.StrOpt('image_ref',
628 default=None,
629 help="Name of heat-cfntools enabled image to use when "
630 "launching test instances."),
631 cfg.StrOpt('keypair_name',
632 default=None,
633 help="Name of existing keypair to launch servers with."),
Clint Byrum71f27632013-09-09 11:41:32 -0700634 cfg.IntOpt('max_template_size',
Joe Gordon0e51b222013-10-24 14:11:10 +0100635 default=524288,
Clint Byrum71f27632013-09-09 11:41:32 -0700636 help="Value must match heat configuration of the same name."),
Steven Hardyfdc6bd72014-03-21 16:56:04 +0000637 cfg.IntOpt('max_resources_per_stack',
638 default=1000,
639 help="Value must match heat configuration of the same name."),
Steve Bakerc60e4e32013-05-06 15:22:41 +1200640]
641
642
Yassine Lamgarchalb158d412013-12-27 19:29:42 +0100643telemetry_group = cfg.OptGroup(name='telemetry',
644 title='Telemetry Service Options')
645
646TelemetryGroup = [
647 cfg.StrOpt('catalog_type',
648 default='metering',
649 help="Catalog type of the Telemetry service."),
JordanPfc62c902014-02-26 14:47:28 +0000650 cfg.StrOpt('endpoint_type',
651 default='publicURL',
652 choices=['public', 'admin', 'internal',
653 'publicURL', 'adminURL', 'internalURL'],
654 help="The endpoint type to use for the telemetry service."),
Vadim Rovachev7bcea352013-12-26 15:56:17 +0400655 cfg.BoolOpt('too_slow_to_test',
656 default=True,
657 help="This variable is used as flag to enable "
658 "notification tests")
Yassine Lamgarchalb158d412013-12-27 19:29:42 +0100659]
660
661
Julie Pichond1017642013-07-24 16:37:23 +0100662dashboard_group = cfg.OptGroup(name="dashboard",
663 title="Dashboard options")
664
665DashboardGroup = [
666 cfg.StrOpt('dashboard_url',
667 default='http://localhost/',
668 help="Where the dashboard can be found"),
669 cfg.StrOpt('login_url',
670 default='http://localhost/auth/login/',
671 help="Login page for the dashboard"),
672]
673
674
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +0400675data_processing_group = cfg.OptGroup(name="data_processing",
676 title="Data Processing options")
677
678DataProcessingGroup = [
679 cfg.StrOpt('catalog_type',
680 default='data_processing',
JordanPfc62c902014-02-26 14:47:28 +0000681 help="Catalog type of the data processing service."),
682 cfg.StrOpt('endpoint_type',
683 default='publicURL',
684 choices=['public', 'admin', 'internal',
685 'publicURL', 'adminURL', 'internalURL'],
686 help="The endpoint type to use for the data processing "
687 "service."),
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +0400688]
689
690
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500691boto_group = cfg.OptGroup(name='boto',
692 title='EC2/S3 options')
DennyZhang1e71b612013-09-26 12:35:40 -0500693BotoGroup = [
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500694 cfg.StrOpt('ec2_url',
695 default="http://localhost:8773/services/Cloud",
696 help="EC2 URL"),
697 cfg.StrOpt('s3_url',
698 default="http://localhost:8080",
699 help="S3 URL"),
700 cfg.StrOpt('aws_secret',
701 default=None,
702 help="AWS Secret Key",
703 secret=True),
704 cfg.StrOpt('aws_access',
705 default=None,
706 help="AWS Access Key"),
Attila Fazekas27dd92e2014-02-21 14:49:40 +0100707 cfg.StrOpt('aws_zone',
708 default="nova",
709 help="AWS Zone for EC2 tests"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500710 cfg.StrOpt('s3_materials_path',
711 default="/opt/stack/devstack/files/images/"
712 "s3-materials/cirros-0.3.0",
713 help="S3 Materials Path"),
714 cfg.StrOpt('ari_manifest',
715 default="cirros-0.3.0-x86_64-initrd.manifest.xml",
716 help="ARI Ramdisk Image manifest"),
717 cfg.StrOpt('ami_manifest',
718 default="cirros-0.3.0-x86_64-blank.img.manifest.xml",
719 help="AMI Machine Image manifest"),
720 cfg.StrOpt('aki_manifest',
721 default="cirros-0.3.0-x86_64-vmlinuz.manifest.xml",
722 help="AKI Kernel Image manifest"),
723 cfg.StrOpt('instance_type',
724 default="m1.tiny",
725 help="Instance type"),
726 cfg.IntOpt('http_socket_timeout',
727 default=3,
728 help="boto Http socket timeout"),
729 cfg.IntOpt('num_retries',
730 default=1,
731 help="boto num_retries on error"),
732 cfg.IntOpt('build_timeout',
733 default=60,
734 help="Status Change Timeout"),
735 cfg.IntOpt('build_interval',
736 default=1,
737 help="Status Change Test Interval"),
738]
Attila Fazekasf7f2d932012-12-13 09:14:38 +0100739
Matthew Treinish615ea6a2013-02-25 17:26:59 -0500740stress_group = cfg.OptGroup(name='stress', title='Stress Test Options')
741
742StressGroup = [
743 cfg.StrOpt('nova_logdir',
744 default=None,
745 help='Directory containing log files on the compute nodes'),
746 cfg.IntOpt('max_instances',
747 default=16,
748 help='Maximum number of instances to create during test.'),
749 cfg.StrOpt('controller',
750 default=None,
David Kranzb9d97502013-05-01 15:55:04 -0400751 help='Controller host.'),
752 # new stress options
753 cfg.StrOpt('target_controller',
754 default=None,
755 help='Controller host.'),
756 cfg.StrOpt('target_ssh_user',
757 default=None,
758 help='ssh user.'),
759 cfg.StrOpt('target_private_key_path',
760 default=None,
761 help='Path to private key.'),
762 cfg.StrOpt('target_logfiles',
763 default=None,
764 help='regexp for list of log files.'),
Matthew Treinishf319a732013-10-24 21:39:24 +0000765 cfg.IntOpt('log_check_interval',
David Kranzb9d97502013-05-01 15:55:04 -0400766 default=60,
Marc Koderer32221b8e2013-08-23 13:57:50 +0200767 help='time (in seconds) between log file error checks.'),
Matthew Treinishf319a732013-10-24 21:39:24 +0000768 cfg.IntOpt('default_thread_number_per_action',
Marc Koderer32221b8e2013-08-23 13:57:50 +0200769 default=4,
Julien Leloup04d40f72014-01-28 11:17:18 +0100770 help='The number of threads created while stress test.'),
771 cfg.BoolOpt('leave_dirty_stack',
772 default=False,
773 help='Prevent the cleaning (tearDownClass()) between'
774 ' each stress test run if an exception occurs'
Julien Leloupa5ee5422014-02-13 14:29:02 +0100775 ' during this run.'),
776 cfg.BoolOpt('full_clean_stack',
777 default=False,
778 help='Allows a full cleaning process after a stress test.'
779 ' Caution : this cleanup will remove every objects of'
780 ' every tenant.')
Matthew Treinish615ea6a2013-02-25 17:26:59 -0500781]
782
783
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +0900784scenario_group = cfg.OptGroup(name='scenario', title='Scenario Test Options')
785
786ScenarioGroup = [
787 cfg.StrOpt('img_dir',
788 default='/opt/stack/new/devstack/files/images/'
789 'cirros-0.3.1-x86_64-uec',
790 help='Directory containing image files'),
Masayuki Igawa4f71bf02014-02-21 14:02:29 +0900791 cfg.StrOpt('qcow2_img_file',
792 default='cirros-0.3.1-x86_64-disk.img',
793 help='QCOW2 image file name'),
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +0900794 cfg.StrOpt('ami_img_file',
795 default='cirros-0.3.1-x86_64-blank.img',
796 help='AMI image file name'),
797 cfg.StrOpt('ari_img_file',
798 default='cirros-0.3.1-x86_64-initrd',
799 help='ARI image file name'),
800 cfg.StrOpt('aki_img_file',
801 default='cirros-0.3.1-x86_64-vmlinuz',
802 help='AKI image file name'),
803 cfg.StrOpt('ssh_user',
804 default='cirros',
Joe Gordonb5e10cd2013-07-10 15:51:12 +0000805 help='ssh username for the image file'),
806 cfg.IntOpt(
807 'large_ops_number',
808 default=0,
809 help="specifies how many resources to request at once. Used "
810 "for large operations testing.")
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +0900811]
812
813
Matthew Treinish4c412922013-07-16 15:27:42 -0400814service_available_group = cfg.OptGroup(name="service_available",
815 title="Available OpenStack Services")
816
817ServiceAvailableGroup = [
818 cfg.BoolOpt('cinder',
819 default=True,
820 help="Whether or not cinder is expected to be available"),
Matthew Treinishfaa340d2013-07-19 16:26:21 -0400821 cfg.BoolOpt('neutron',
822 default=False,
823 help="Whether or not neutron is expected to be available"),
Matthew Treinish853ae442013-07-19 16:36:07 -0400824 cfg.BoolOpt('glance',
825 default=True,
826 help="Whether or not glance is expected to be available"),
Matthew Treinish61e332b2013-07-19 16:42:31 -0400827 cfg.BoolOpt('swift',
828 default=True,
829 help="Whether or not swift is expected to be available"),
Matthew Treinish6b41e242013-07-19 16:49:28 -0400830 cfg.BoolOpt('nova',
831 default=True,
832 help="Whether or not nova is expected to be available"),
Matthew Treinisha9d43882013-07-19 16:54:52 -0400833 cfg.BoolOpt('heat',
834 default=False,
835 help="Whether or not Heat is expected to be available"),
Mehdi Abaakouk8581c0b2013-10-04 10:45:42 +0200836 cfg.BoolOpt('ceilometer',
837 default=True,
838 help="Whether or not Ceilometer is expected to be available"),
Julie Pichond1017642013-07-24 16:37:23 +0100839 cfg.BoolOpt('horizon',
840 default=True,
841 help="Whether or not Horizon is expected to be available"),
Sergey Lukjanov9c95a252014-03-13 23:59:22 +0400842 cfg.BoolOpt('sahara',
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +0400843 default=False,
Sergey Lukjanov9c95a252014-03-13 23:59:22 +0400844 help="Whether or not Sahara is expected to be available"),
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +0300845 cfg.BoolOpt('ironic',
846 default=False,
847 help="Whether or not Ironic is expected to be available"),
Nikhil Manchandadd6886f2014-03-03 01:58:45 -0800848 cfg.BoolOpt('trove',
849 default=False,
850 help="Whether or not Trove is expected to be available"),
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500851 cfg.BoolOpt('marconi',
852 default=False,
853 help="Whether or not Marconi is expected to be available"),
Matthew Treinish4c412922013-07-16 15:27:42 -0400854]
855
Attila Fazekasaeeeefd2013-08-06 17:01:56 +0200856debug_group = cfg.OptGroup(name="debug",
857 title="Debug System")
858
859DebugGroup = [
860 cfg.BoolOpt('enable',
861 default=True,
862 help="Enable diagnostic commands"),
Sean Daguec522c092014-03-24 10:43:22 -0400863 cfg.StrOpt('trace_requests',
864 default='',
865 help="""A regex to determine which requests should be traced.
866
867This is a regex to match the caller for rest client requests to be able to
868selectively trace calls out of specific classes and methods. It largely
869exists for test development, and is not expected to be used in a real deploy
870of tempest. This will be matched against the discovered ClassName:method
871in the test environment.
872
873Expected values for this field are:
874
875 * ClassName:test_method_name - traces one test_method
876 * ClassName:setUp(Class) - traces specific setup functions
877 * ClassName:tearDown(Class) - traces specific teardown functions
878 * ClassName:_run_cleanups - traces the cleanup functions
879
880If nothing is specified, this feature is not enabled. To trace everything
881specify .* as the regex.
882""")
Attila Fazekasaeeeefd2013-08-06 17:01:56 +0200883]
884
Andrea Frittolif5da28b2013-12-06 07:08:07 +0000885input_scenario_group = cfg.OptGroup(name="input-scenario",
886 title="Filters and values for"
887 " input scenarios")
888
889InputScenarioGroup = [
890 cfg.StrOpt('image_regex',
891 default='^cirros-0.3.1-x86_64-uec$',
892 help="Matching images become parameters for scenario tests"),
893 cfg.StrOpt('flavor_regex',
Andrea Frittoli99901c02014-01-30 18:06:49 +0000894 default='^m1.nano$',
Andrea Frittolif5da28b2013-12-06 07:08:07 +0000895 help="Matching flavors become parameters for scenario tests"),
896 cfg.StrOpt('non_ssh_image_regex',
897 default='^.*[Ww]in.*$',
898 help="SSH verification in tests is skipped"
899 "for matching images"),
900 cfg.StrOpt('ssh_user_regex',
901 default="[[\"^.*[Cc]irros.*$\", \"root\"]]",
902 help="List of user mapped to regex "
903 "to matching image names."),
904]
905
Attila Fazekasaeeeefd2013-08-06 17:01:56 +0200906
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +0300907baremetal_group = cfg.OptGroup(name='baremetal',
908 title='Baremetal provisioning service options')
909
910BaremetalGroup = [
911 cfg.StrOpt('catalog_type',
912 default='baremetal',
Adam Gandelman4a48a602014-03-20 18:23:18 -0700913 help="Catalog type of the baremetal provisioning service"),
914 cfg.BoolOpt('driver_enabled',
915 default=False,
916 help="Whether the Ironic nova-compute driver is enabled"),
JordanPfc62c902014-02-26 14:47:28 +0000917 cfg.StrOpt('endpoint_type',
918 default='publicURL',
919 choices=['public', 'admin', 'internal',
920 'publicURL', 'adminURL', 'internalURL'],
921 help="The endpoint type to use for the baremetal provisioning "
Adam Gandelman4a48a602014-03-20 18:23:18 -0700922 "service"),
923 cfg.IntOpt('active_timeout',
924 default=300,
925 help="Timeout for Ironic node to completely provision"),
926 cfg.IntOpt('association_timeout',
Adam Gandelmane42f0922014-06-10 15:26:37 -0700927 default=30,
Adam Gandelman4a48a602014-03-20 18:23:18 -0700928 help="Timeout for association of Nova instance and Ironic "
929 "node"),
930 cfg.IntOpt('power_timeout',
Adam Gandelmane42f0922014-06-10 15:26:37 -0700931 default=60,
Adam Gandelman4a48a602014-03-20 18:23:18 -0700932 help="Timeout for Ironic power transitions."),
933 cfg.IntOpt('unprovision_timeout',
Adam Gandelmane42f0922014-06-10 15:26:37 -0700934 default=60,
Adam Gandelman4a48a602014-03-20 18:23:18 -0700935 help="Timeout for unprovisioning an Ironic node.")
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +0300936]
937
Matthew Treinishe2b56b52014-01-29 19:25:50 +0000938cli_group = cfg.OptGroup(name='cli', title="cli Configuration Options")
939
940CLIGroup = [
941 cfg.BoolOpt('enabled',
942 default=True,
943 help="enable cli tests"),
944 cfg.StrOpt('cli_dir',
945 default='/usr/local/bin',
946 help="directory where python client binaries are located"),
Sean Dague44b24682014-02-20 19:08:24 -0500947 cfg.BoolOpt('has_manage',
948 default=True,
949 help=("Whether the tempest run location has access to the "
950 "*-manage commands. In a pure blackbox environment "
951 "it will not.")),
Matthew Treinishe2b56b52014-01-29 19:25:50 +0000952 cfg.IntOpt('timeout',
953 default=15,
954 help="Number of seconds to wait on a CLI timeout"),
955]
956
Marc Koderer6ee82dc2014-02-17 10:26:29 +0100957negative_group = cfg.OptGroup(name='negative', title="Negative Test Options")
958
959NegativeGroup = [
960 cfg.StrOpt('test_generator',
961 default='tempest.common.' +
962 'generator.negative_generator.NegativeTestGenerator',
963 help="Test generator class for all negative tests"),
964]
965
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +0300966
Matthew Treinish43b296a2014-02-28 15:23:00 -0500967def register_opts():
968 register_opt_group(cfg.CONF, compute_group, ComputeGroup)
969 register_opt_group(cfg.CONF, compute_features_group,
970 ComputeFeaturesGroup)
971 register_opt_group(cfg.CONF, identity_group, IdentityGroup)
972 register_opt_group(cfg.CONF, identity_feature_group,
973 IdentityFeatureGroup)
974 register_opt_group(cfg.CONF, image_group, ImageGroup)
975 register_opt_group(cfg.CONF, image_feature_group, ImageFeaturesGroup)
976 register_opt_group(cfg.CONF, network_group, NetworkGroup)
977 register_opt_group(cfg.CONF, network_feature_group,
978 NetworkFeaturesGroup)
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500979 register_opt_group(cfg.CONF, queuing_group, QueuingGroup)
Matthew Treinish43b296a2014-02-28 15:23:00 -0500980 register_opt_group(cfg.CONF, volume_group, VolumeGroup)
981 register_opt_group(cfg.CONF, volume_feature_group,
982 VolumeFeaturesGroup)
983 register_opt_group(cfg.CONF, object_storage_group, ObjectStoreGroup)
984 register_opt_group(cfg.CONF, object_storage_feature_group,
985 ObjectStoreFeaturesGroup)
Nikhil Manchandadd6886f2014-03-03 01:58:45 -0800986 register_opt_group(cfg.CONF, database_group, DatabaseGroup)
Matthew Treinish43b296a2014-02-28 15:23:00 -0500987 register_opt_group(cfg.CONF, orchestration_group, OrchestrationGroup)
988 register_opt_group(cfg.CONF, telemetry_group, TelemetryGroup)
989 register_opt_group(cfg.CONF, dashboard_group, DashboardGroup)
990 register_opt_group(cfg.CONF, data_processing_group,
991 DataProcessingGroup)
992 register_opt_group(cfg.CONF, boto_group, BotoGroup)
993 register_opt_group(cfg.CONF, compute_admin_group, ComputeAdminGroup)
994 register_opt_group(cfg.CONF, stress_group, StressGroup)
995 register_opt_group(cfg.CONF, scenario_group, ScenarioGroup)
996 register_opt_group(cfg.CONF, service_available_group,
997 ServiceAvailableGroup)
998 register_opt_group(cfg.CONF, debug_group, DebugGroup)
999 register_opt_group(cfg.CONF, baremetal_group, BaremetalGroup)
1000 register_opt_group(cfg.CONF, input_scenario_group, InputScenarioGroup)
1001 register_opt_group(cfg.CONF, cli_group, CLIGroup)
Marc Koderer6ee82dc2014-02-17 10:26:29 +01001002 register_opt_group(cfg.CONF, negative_group, NegativeGroup)
Matthew Treinish43b296a2014-02-28 15:23:00 -05001003
1004
Sean Dague3b9b1f32013-12-20 17:04:54 -05001005# this should never be called outside of this class
1006class TempestConfigPrivate(object):
Daryl Walleck1465d612011-11-02 02:22:15 -05001007 """Provides OpenStack configuration information."""
1008
Brian Waldon738cd632011-12-12 18:45:09 -05001009 DEFAULT_CONFIG_DIR = os.path.join(
Zhongyue Luoa1343de2013-01-04 16:21:35 +08001010 os.path.abspath(os.path.dirname(os.path.dirname(__file__))),
Brian Waldon738cd632011-12-12 18:45:09 -05001011 "etc")
Daryl Walleck1465d612011-11-02 02:22:15 -05001012
Brian Waldon738cd632011-12-12 18:45:09 -05001013 DEFAULT_CONFIG_FILE = "tempest.conf"
1014
Matthew Treinish43b296a2014-02-28 15:23:00 -05001015 def _set_attrs(self):
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001016 self.compute = cfg.CONF.compute
Matthew Treinishd5c96022013-10-17 21:51:23 +00001017 self.compute_feature_enabled = cfg.CONF['compute-feature-enabled']
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001018 self.identity = cfg.CONF.identity
Matthew Treinishd5021a72014-01-09 18:42:51 +00001019 self.identity_feature_enabled = cfg.CONF['identity-feature-enabled']
Matt Riedemannd3efe902014-02-10 06:46:38 -08001020 self.image = cfg.CONF.image
Matthew Treinish2b5287d2013-10-22 17:40:34 +00001021 self.image_feature_enabled = cfg.CONF['image-feature-enabled']
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001022 self.network = cfg.CONF.network
Matthew Treinishe3d26142013-11-26 19:14:58 +00001023 self.network_feature_enabled = cfg.CONF['network-feature-enabled']
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001024 self.volume = cfg.CONF.volume
Matthew Treinishd5c96022013-10-17 21:51:23 +00001025 self.volume_feature_enabled = cfg.CONF['volume-feature-enabled']
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001026 self.object_storage = cfg.CONF['object-storage']
Matthew Treinishd5c96022013-10-17 21:51:23 +00001027 self.object_storage_feature_enabled = cfg.CONF[
1028 'object-storage-feature-enabled']
Nikhil Manchandadd6886f2014-03-03 01:58:45 -08001029 self.database = cfg.CONF.database
Steve Bakerc60e4e32013-05-06 15:22:41 +12001030 self.orchestration = cfg.CONF.orchestration
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -05001031 self.queuing = cfg.CONF.queuing
Yassine Lamgarchalb158d412013-12-27 19:29:42 +01001032 self.telemetry = cfg.CONF.telemetry
Julie Pichond1017642013-07-24 16:37:23 +01001033 self.dashboard = cfg.CONF.dashboard
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +04001034 self.data_processing = cfg.CONF.data_processing
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001035 self.boto = cfg.CONF.boto
Attila Fazekascadcb1f2013-01-21 23:10:53 +01001036 self.compute_admin = cfg.CONF['compute-admin']
Matthew Treinish615ea6a2013-02-25 17:26:59 -05001037 self.stress = cfg.CONF.stress
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +09001038 self.scenario = cfg.CONF.scenario
Matthew Treinish4c412922013-07-16 15:27:42 -04001039 self.service_available = cfg.CONF.service_available
Attila Fazekas5fae7a32013-09-25 16:52:44 +02001040 self.debug = cfg.CONF.debug
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +03001041 self.baremetal = cfg.CONF.baremetal
Andrea Frittolif5da28b2013-12-06 07:08:07 +00001042 self.input_scenario = cfg.CONF['input-scenario']
Matthew Treinishe2b56b52014-01-29 19:25:50 +00001043 self.cli = cfg.CONF.cli
Marc Koderer6ee82dc2014-02-17 10:26:29 +01001044 self.negative = cfg.CONF.negative
Attila Fazekascadcb1f2013-01-21 23:10:53 +01001045 if not self.compute_admin.username:
1046 self.compute_admin.username = self.identity.admin_username
1047 self.compute_admin.password = self.identity.admin_password
1048 self.compute_admin.tenant_name = self.identity.admin_tenant_name
Andrea Frittolib1b04bb2014-04-06 11:57:07 +01001049 cfg.CONF.set_default('domain_name', self.identity.admin_domain_name,
1050 group='identity')
1051 cfg.CONF.set_default('alt_domain_name',
1052 self.identity.admin_domain_name,
1053 group='identity')
1054 cfg.CONF.set_default('domain_name', self.identity.admin_domain_name,
1055 group='compute-admin')
Sean Dague86bd8422013-12-20 09:56:44 -05001056
Matthew Treinish43b296a2014-02-28 15:23:00 -05001057 def __init__(self, parse_conf=True):
1058 """Initialize a configuration from a conf directory and conf file."""
1059 super(TempestConfigPrivate, self).__init__()
1060 config_files = []
1061 failsafe_path = "/etc/tempest/" + self.DEFAULT_CONFIG_FILE
1062
1063 # Environment variables override defaults...
1064 conf_dir = os.environ.get('TEMPEST_CONFIG_DIR',
1065 self.DEFAULT_CONFIG_DIR)
1066 conf_file = os.environ.get('TEMPEST_CONFIG', self.DEFAULT_CONFIG_FILE)
1067
1068 path = os.path.join(conf_dir, conf_file)
1069
1070 if not os.path.isfile(path):
1071 path = failsafe_path
1072
1073 # only parse the config file if we expect one to exist. This is needed
1074 # to remove an issue with the config file up to date checker.
1075 if parse_conf:
1076 config_files.append(path)
1077
1078 cfg.CONF([], project='tempest', default_config_files=config_files)
1079 logging.setup('tempest')
1080 LOG = logging.getLogger('tempest')
1081 LOG.info("Using tempest config file %s" % path)
1082 register_opts()
1083 self._set_attrs()
Masayuki Igawa9ec4cd82014-02-05 15:04:16 +09001084 if parse_conf:
1085 cfg.CONF.log_opt_values(LOG, std_logging.DEBUG)
1086
Sean Dague86bd8422013-12-20 09:56:44 -05001087
1088class TempestConfigProxy(object):
1089 _config = None
1090
Sean Daguedb6ac6c2014-06-06 16:52:44 -04001091 _extra_log_defaults = [
1092 'keystoneclient.session=INFO',
1093 'paramiko.transport=INFO',
1094 'requests.packages.urllib3.connectionpool=WARN'
1095 ]
1096
1097 def _fix_log_levels(self):
1098 """Tweak the oslo log defaults."""
1099 for opt in logging.log_opts:
1100 if opt.dest == 'default_log_levels':
1101 opt.default.extend(self._extra_log_defaults)
1102
Sean Dague86bd8422013-12-20 09:56:44 -05001103 def __getattr__(self, attr):
1104 if not self._config:
Sean Daguedb6ac6c2014-06-06 16:52:44 -04001105 self._fix_log_levels()
Sean Dague3b9b1f32013-12-20 17:04:54 -05001106 self._config = TempestConfigPrivate()
Sean Dague86bd8422013-12-20 09:56:44 -05001107
1108 return getattr(self._config, attr)
1109
1110
1111CONF = TempestConfigProxy()