blob: 634634dc1eec8e067afb1576fb8d92692d21f197 [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',
140 default="{$IMAGE_ID}",
Jerry Cai9733d0e2014-03-19 15:50:49 +0800141 help="Valid primary image reference to be used in tests."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500142 cfg.StrOpt('image_ref_alt',
143 default="{$IMAGE_ID_ALT}",
144 help="Valid secondary image reference to be used in tests."),
Ken'ichi Ohmichi35772602013-11-14 15:03:27 +0900145 cfg.StrOpt('flavor_ref',
146 default="1",
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500147 help="Valid primary flavor to use in tests."),
Ken'ichi Ohmichi35772602013-11-14 15:03:27 +0900148 cfg.StrOpt('flavor_ref_alt',
149 default="2",
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500150 help='Valid secondary flavor to be used in tests.'),
Maru Newbyaf292e82013-05-20 21:32:28 +0000151 cfg.StrOpt('image_ssh_user',
152 default="root",
153 help="User name used to authenticate to an instance."),
Ryan Hsucb2e1252013-09-03 21:44:49 -0700154 cfg.StrOpt('image_ssh_password',
155 default="password",
156 help="Password used to authenticate to an instance."),
Maru Newbyaf292e82013-05-20 21:32:28 +0000157 cfg.StrOpt('image_alt_ssh_user',
158 default="root",
159 help="User name used to authenticate to an instance using "
160 "the alternate image."),
Ryan Hsucb2e1252013-09-03 21:44:49 -0700161 cfg.StrOpt('image_alt_ssh_password',
162 default="password",
163 help="Password used to authenticate to an instance using "
164 "the alternate image."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500165 cfg.IntOpt('build_interval',
166 default=10,
167 help="Time in seconds between build status checks."),
168 cfg.IntOpt('build_timeout',
169 default=300,
170 help="Timeout in seconds to wait for an instance to build."),
171 cfg.BoolOpt('run_ssh',
172 default=False,
Derek Higgins85cd5142013-12-17 17:10:11 +0000173 help="Should the tests ssh to instances?"),
Attila Fazekas423834d2014-03-14 17:33:13 +0100174 cfg.StrOpt('ssh_auth_method',
175 default='keypair',
176 help="Auth method used for authenticate to the instance. "
177 "Valid choices are: keypair, configured, adminpass. "
178 "keypair: start the servers with an ssh keypair. "
179 "configured: use the configured user and password. "
180 "adminpass: use the injected adminPass. "
181 "disabled: avoid using ssh when it is an option."),
182 cfg.StrOpt('ssh_connect_method',
183 default='fixed',
184 help="How to connect to the instance? "
185 "fixed: using the first ip belongs the fixed network "
186 "floating: creating and using a floating ip"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500187 cfg.StrOpt('ssh_user',
188 default='root',
189 help="User name used to authenticate to an instance."),
Nachi Ueno6d580be2013-07-24 10:58:11 -0700190 cfg.IntOpt('ping_timeout',
Darragh O'Reilly6b636672014-01-24 12:17:40 +0000191 default=120,
Nachi Ueno6d580be2013-07-24 10:58:11 -0700192 help="Timeout in seconds to wait for ping to "
193 "succeed."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500194 cfg.IntOpt('ssh_timeout',
195 default=300,
Chris Yeoh76916042013-02-27 16:25:25 +1030196 help="Timeout in seconds to wait for authentication to "
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500197 "succeed."),
Attila Fazekas0abbc952013-07-01 19:19:42 +0200198 cfg.IntOpt('ready_wait',
199 default=0,
DennyZhang8912d012013-09-25 18:08:34 -0500200 help="Additional wait time for clean state, when there is "
201 "no OS-EXT-STS extension available"),
Chris Yeoh76916042013-02-27 16:25:25 +1030202 cfg.IntOpt('ssh_channel_timeout',
203 default=60,
204 help="Timeout in seconds to wait for output from ssh "
205 "channel."),
Attila Fazekasb0661652013-05-08 13:01:36 +0200206 cfg.StrOpt('fixed_network_name',
207 default='private',
208 help="Visible fixed network name "),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500209 cfg.StrOpt('network_for_ssh',
210 default='public',
211 help="Network used for SSH connections."),
212 cfg.IntOpt('ip_version_for_ssh',
213 default=4,
214 help="IP version used for SSH connections."),
fujioka yuuichia11994e2013-07-09 11:19:51 +0900215 cfg.BoolOpt('use_floatingip_for_ssh',
216 default=True,
Tushar Kalra95a482d2014-03-25 14:24:43 -0700217 help="Does SSH use Floating IPs?"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500218 cfg.StrOpt('catalog_type',
219 default='compute',
220 help="Catalog type of the Compute service."),
Arata Notsu8f440392013-09-13 16:14:20 +0900221 cfg.StrOpt('region',
222 default='',
223 help="The compute region name to use. If empty, the value "
224 "of identity.region is used instead. If no such region "
225 "is found in the service catalog, the first found one is "
226 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000227 cfg.StrOpt('endpoint_type',
228 default='publicURL',
229 choices=['public', 'admin', 'internal',
230 'publicURL', 'adminURL', 'internalURL'],
231 help="The endpoint type to use for the compute service."),
ivan-zhu8f992be2013-07-31 14:56:58 +0800232 cfg.StrOpt('catalog_v3_type',
233 default='computev3',
234 help="Catalog type of the Compute v3 service."),
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100235 cfg.StrOpt('path_to_private_key',
236 default=None,
237 help="Path to a private key file for SSH access to remote "
238 "hosts"),
Ryan Hsucb2e1252013-09-03 21:44:49 -0700239 cfg.StrOpt('volume_device_name',
240 default='vdb',
241 help="Expected device name when a volume is attached to "
Ken'ichi Ohmichi39437e22013-10-06 00:21:38 +0900242 "an instance"),
243 cfg.IntOpt('shelved_offload_time',
244 default=0,
245 help='Time in seconds before a shelved instance is eligible '
246 'for removing from a host. -1 never offload, 0 offload '
247 'when shelved. This time should be the same as the time '
248 'of nova.conf, and some tests will run for as long as the '
249 'time.')
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500250]
Rohit Karajgie1b050d2011-12-02 16:13:18 -0800251
Matthew Treinishd5c96022013-10-17 21:51:23 +0000252compute_features_group = cfg.OptGroup(name='compute-feature-enabled',
253 title="Enabled Compute Service Features")
254
255ComputeFeaturesGroup = [
ivan-zhu8f992be2013-07-31 14:56:58 +0800256 cfg.BoolOpt('api_v3',
Chris Yeohfbc15de2013-11-26 10:20:08 +1030257 default=True,
ivan-zhu8f992be2013-07-31 14:56:58 +0800258 help="If false, skip all nova v3 tests."),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000259 cfg.BoolOpt('disk_config',
260 default=True,
261 help="If false, skip disk config tests"),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000262 cfg.ListOpt('api_extensions',
263 default=['all'],
Zhi Kun Liude25c022014-02-14 13:25:19 +0800264 help='A list of enabled compute extensions with a special '
265 'entry all which indicates every extension is enabled'),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000266 cfg.ListOpt('api_v3_extensions',
267 default=['all'],
268 help='A list of enabled v3 extensions with a special entry all'
269 ' which indicates every extension is enabled'),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000270 cfg.BoolOpt('change_password',
271 default=False,
272 help="Does the test environment support changing the admin "
273 "password?"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000274 cfg.BoolOpt('resize',
275 default=False,
276 help="Does the test environment support resizing?"),
Eric Windischb5538072014-03-09 23:47:35 -0400277 cfg.BoolOpt('pause',
278 default=True,
279 help="Does the test environment support pausing?"),
Eric Windischaeb7e842014-03-10 01:10:50 -0400280 cfg.BoolOpt('suspend',
281 default=True,
282 help="Does the test environment support suspend/resume?"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000283 cfg.BoolOpt('live_migration',
284 default=False,
285 help="Does the test environment support live migration "
286 "available?"),
287 cfg.BoolOpt('block_migration_for_live_migration',
288 default=False,
289 help="Does the test environment use block devices for live "
290 "migration"),
291 cfg.BoolOpt('block_migrate_cinder_iscsi',
292 default=False,
293 help="Does the test environment block migration support "
Ghanshyam Mann41c17572014-02-27 18:52:56 +0900294 "cinder iSCSI volumes"),
295 cfg.BoolOpt('vnc_console',
296 default=False,
297 help='Enable VNC console. This configuration value should '
298 'be same as [nova.vnc]->vnc_enabled in nova.conf')
Matthew Treinishd5c96022013-10-17 21:51:23 +0000299]
300
301
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500302compute_admin_group = cfg.OptGroup(name='compute-admin',
303 title="Compute Admin Options")
donald-ngo7fb1efa2011-12-13 17:17:36 -0800304
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500305ComputeAdminGroup = [
306 cfg.StrOpt('username',
Andrea Frittolia9463672014-03-03 14:39:02 +0000307 default=None,
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500308 help="Administrative Username to use for Nova API requests."),
309 cfg.StrOpt('tenant_name',
Andrea Frittolia9463672014-03-03 14:39:02 +0000310 default=None,
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500311 help="Administrative Tenant name to use for Nova API "
312 "requests."),
313 cfg.StrOpt('password',
Andrea Frittolia9463672014-03-03 14:39:02 +0000314 default=None,
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500315 help="API key to use when authenticating as admin.",
316 secret=True),
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100317 cfg.StrOpt('domain_name',
318 default=None,
319 help="Domain name for authentication as admin (Keystone V3)."
320 "The same domain applies to user and project"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500321]
Daryl Walleck587385b2012-03-03 13:00:26 -0600322
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500323image_group = cfg.OptGroup(name='image',
324 title="Image Service Options")
Jay Pipesf38eaac2012-06-21 13:37:35 -0400325
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500326ImageGroup = [
Matthew Treinish72ea4422013-02-07 14:42:49 -0500327 cfg.StrOpt('catalog_type',
328 default='image',
Sean Dague83401992013-05-06 17:46:36 -0400329 help='Catalog type of the Image service.'),
Arata Notsu8f440392013-09-13 16:14:20 +0900330 cfg.StrOpt('region',
331 default='',
332 help="The image region name to use. If empty, the value "
333 "of identity.region is used instead. If no such region "
334 "is found in the service catalog, the first found one is "
335 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000336 cfg.StrOpt('endpoint_type',
337 default='publicURL',
338 choices=['public', 'admin', 'internal',
339 'publicURL', 'adminURL', 'internalURL'],
340 help="The endpoint type to use for the image service."),
Sean Dague83401992013-05-06 17:46:36 -0400341 cfg.StrOpt('http_image',
342 default='http://download.cirros-cloud.net/0.3.1/'
343 'cirros-0.3.1-x86_64-uec.tar.gz',
DennyZhang8912d012013-09-25 18:08:34 -0500344 help='http accessible image')
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500345]
Jay Pipesf38eaac2012-06-21 13:37:35 -0400346
Matthew Treinish2b5287d2013-10-22 17:40:34 +0000347image_feature_group = cfg.OptGroup(name='image-feature-enabled',
348 title='Enabled image service features')
349
350ImageFeaturesGroup = [
351 cfg.BoolOpt('api_v2',
352 default=True,
353 help="Is the v2 image API enabled"),
354 cfg.BoolOpt('api_v1',
355 default=True,
356 help="Is the v1 image API enabled"),
357]
Jay Pipesf38eaac2012-06-21 13:37:35 -0400358
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500359network_group = cfg.OptGroup(name='network',
360 title='Network Service Options')
Daryl Walleck587385b2012-03-03 13:00:26 -0600361
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500362NetworkGroup = [
363 cfg.StrOpt('catalog_type',
364 default='network',
Mark McClainf2982e82013-07-06 17:48:03 -0400365 help='Catalog type of the Neutron service.'),
Arata Notsu8f440392013-09-13 16:14:20 +0900366 cfg.StrOpt('region',
367 default='',
368 help="The network region name to use. If empty, the value "
369 "of identity.region is used instead. If no such region "
370 "is found in the service catalog, the first found one is "
371 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000372 cfg.StrOpt('endpoint_type',
373 default='publicURL',
374 choices=['public', 'admin', 'internal',
375 'publicURL', 'adminURL', 'internalURL'],
376 help="The endpoint type to use for the network service."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500377 cfg.StrOpt('tenant_network_cidr',
378 default="10.100.0.0/16",
Henry Gessauffda37a2014-01-16 11:17:55 -0500379 help="The cidr block to allocate tenant ipv4 subnets from"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500380 cfg.IntOpt('tenant_network_mask_bits',
Attila Fazekas8ea181b2013-07-13 16:26:14 +0200381 default=28,
Henry Gessauffda37a2014-01-16 11:17:55 -0500382 help="The mask bits for tenant ipv4 subnets"),
383 cfg.StrOpt('tenant_network_v6_cidr',
384 default="2003::/64",
385 help="The cidr block to allocate tenant ipv6 subnets from"),
386 cfg.IntOpt('tenant_network_v6_mask_bits',
387 default=96,
388 help="The mask bits for tenant ipv6 subnets"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500389 cfg.BoolOpt('tenant_networks_reachable',
390 default=False,
391 help="Whether tenant network connectivity should be "
392 "evaluated directly"),
393 cfg.StrOpt('public_network_id',
394 default="",
395 help="Id of the public network that provides external "
396 "connectivity"),
397 cfg.StrOpt('public_router_id',
398 default="",
399 help="Id of the public router that provides external "
400 "connectivity"),
izikpensod9a01a62014-02-17 20:02:32 +0200401 cfg.IntOpt('build_timeout',
402 default=300,
403 help="Timeout in seconds to wait for network operation to "
404 "complete."),
405 cfg.IntOpt('build_interval',
406 default=10,
407 help="Time in seconds between network operation status "
408 "checks."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500409]
Jay Pipes3f981df2012-03-27 18:59:44 -0400410
Matthew Treinishe3d26142013-11-26 19:14:58 +0000411network_feature_group = cfg.OptGroup(name='network-feature-enabled',
412 title='Enabled network service features')
413
414NetworkFeaturesGroup = [
Matthew Treinishe2e33cf2014-03-03 19:28:41 +0000415 cfg.BoolOpt('ipv6',
416 default=True,
417 help="Allow the execution of IPv6 tests"),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000418 cfg.ListOpt('api_extensions',
419 default=['all'],
Zhi Kun Liude25c022014-02-14 13:25:19 +0800420 help='A list of enabled network extensions with a special '
421 'entry all which indicates every extension is enabled'),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000422]
423
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500424queuing_group = cfg.OptGroup(name='queuing',
425 title='Queuing Service')
426
427QueuingGroup = [
428 cfg.StrOpt('catalog_type',
429 default='queuing',
430 help='Catalog type of the Queuing service.'),
431]
432
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500433volume_group = cfg.OptGroup(name='volume',
434 title='Block Storage Options')
Daryl Walleck587385b2012-03-03 13:00:26 -0600435
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500436VolumeGroup = [
437 cfg.IntOpt('build_interval',
438 default=10,
439 help='Time in seconds between volume availability checks.'),
440 cfg.IntOpt('build_timeout',
441 default=300,
442 help='Timeout in seconds to wait for a volume to become'
443 'available.'),
444 cfg.StrOpt('catalog_type',
Matthew Treinisheb724512013-10-25 15:12:59 +0000445 default='volume',
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500446 help="Catalog type of the Volume Service"),
Arata Notsu8f440392013-09-13 16:14:20 +0900447 cfg.StrOpt('region',
448 default='',
449 help="The volume region name to use. If empty, the value "
450 "of identity.region is used instead. If no such region "
451 "is found in the service catalog, the first found one is "
452 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000453 cfg.StrOpt('endpoint_type',
454 default='publicURL',
455 choices=['public', 'admin', 'internal',
456 'publicURL', 'adminURL', 'internalURL'],
457 help="The endpoint type to use for the volume service."),
Jérôme Gallard86551ce2013-03-08 11:41:26 +0100458 cfg.StrOpt('backend1_name',
Giulio Fidentef4fa8942013-05-28 18:48:03 +0200459 default='BACKEND_1',
Jérôme Gallard86551ce2013-03-08 11:41:26 +0100460 help="Name of the backend1 (must be declared in cinder.conf)"),
461 cfg.StrOpt('backend2_name',
Giulio Fidentef4fa8942013-05-28 18:48:03 +0200462 default='BACKEND_2',
Jérôme Gallard86551ce2013-03-08 11:41:26 +0100463 help="Name of the backend2 (must be declared in cinder.conf)"),
Adam Gandelman827ad332013-06-24 17:04:09 -0700464 cfg.StrOpt('storage_protocol',
465 default='iSCSI',
466 help='Backend protocol to target when creating volume types'),
467 cfg.StrOpt('vendor_name',
468 default='Open Source',
469 help='Backend vendor to target when creating volume types'),
Ryan Hsua67f4632013-08-29 16:03:06 -0700470 cfg.StrOpt('disk_format',
471 default='raw',
472 help='Disk format to use when copying a volume to image'),
Jerry Cai9733d0e2014-03-19 15:50:49 +0800473 cfg.IntOpt('volume_size',
474 default=1,
475 help='Default size in GB for volumes created by volumes tests'),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500476]
K Jonathan Harkerd6ba4b42012-12-18 13:50:47 -0800477
Matthew Treinishd5c96022013-10-17 21:51:23 +0000478volume_feature_group = cfg.OptGroup(name='volume-feature-enabled',
479 title='Enabled Cinder Features')
480
481VolumeFeaturesGroup = [
482 cfg.BoolOpt('multi_backend',
483 default=False,
Matthew Treinishe3d26142013-11-26 19:14:58 +0000484 help="Runs Cinder multi-backend test (requires 2 backends)"),
Giulio Fidente74b08ad2014-01-18 04:02:51 +0100485 cfg.BoolOpt('backup',
486 default=True,
487 help='Runs Cinder volumes backup test'),
JordanPbce55532014-03-19 12:10:32 +0100488 cfg.BoolOpt('snapshot',
489 default=True,
490 help='Runs Cinder volume snapshot test'),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000491 cfg.ListOpt('api_extensions',
492 default=['all'],
Zhi Kun Liude25c022014-02-14 13:25:19 +0800493 help='A list of enabled volume extensions with a special '
494 'entry all which indicates every extension is enabled'),
Zhi Kun Liubb363a22013-11-28 18:47:39 +0800495 cfg.BoolOpt('api_v1',
496 default=True,
497 help="Is the v1 volume API enabled"),
Zhi Kun Liu8cc3c842014-01-07 10:44:34 +0800498 cfg.BoolOpt('api_v2',
499 default=True,
500 help="Is the v2 volume API enabled"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000501]
502
Daryl Walleck587385b2012-03-03 13:00:26 -0600503
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500504object_storage_group = cfg.OptGroup(name='object-storage',
505 title='Object Storage Service Options')
Attila Fazekasa23f5002012-10-23 19:32:45 +0200506
DennyZhang1e71b612013-09-26 12:35:40 -0500507ObjectStoreGroup = [
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500508 cfg.StrOpt('catalog_type',
509 default='object-store',
510 help="Catalog type of the Object-Storage service."),
Arata Notsu8f440392013-09-13 16:14:20 +0900511 cfg.StrOpt('region',
512 default='',
513 help="The object-storage region name to use. If empty, the "
514 "value of identity.region is used instead. If no such "
515 "region is found in the service catalog, the first found "
516 "one is used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000517 cfg.StrOpt('endpoint_type',
518 default='publicURL',
519 choices=['public', 'admin', 'internal',
520 'publicURL', 'adminURL', 'internalURL'],
521 help="The endpoint type to use for the object-store service."),
Matthew Treinishf319a732013-10-24 21:39:24 +0000522 cfg.IntOpt('container_sync_timeout',
nayna-patelb4989b32013-01-09 06:25:13 +0000523 default=120,
Fabien Boucher2178d312013-12-31 15:38:57 +0100524 help="Number of seconds to time on waiting for a container "
nayna-patelb4989b32013-01-09 06:25:13 +0000525 "to container synchronization complete."),
Matthew Treinishf319a732013-10-24 21:39:24 +0000526 cfg.IntOpt('container_sync_interval',
nayna-patelb4989b32013-01-09 06:25:13 +0000527 default=5,
Fabien Boucher2178d312013-12-31 15:38:57 +0100528 help="Number of seconds to wait while looping to check the "
nayna-patelb4989b32013-01-09 06:25:13 +0000529 "status of a container to container synchronization"),
Matthew Treinish3fdb80c2013-08-15 11:13:19 -0400530 cfg.StrOpt('operator_role',
531 default='Member',
532 help="Role to add to users created for swift tests to "
533 "enable creating containers"),
Matthew Treinish998c91d2014-03-01 12:39:49 -0500534 cfg.StrOpt('reseller_admin_role',
535 default='ResellerAdmin',
536 help="User role that has reseller admin"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500537]
Attila Fazekasa23f5002012-10-23 19:32:45 +0200538
Matthew Treinishd5c96022013-10-17 21:51:23 +0000539object_storage_feature_group = cfg.OptGroup(
540 name='object-storage-feature-enabled',
541 title='Enabled object-storage features')
542
543ObjectStoreFeaturesGroup = [
Matthew Treinish20345382013-12-13 17:04:23 +0000544 cfg.ListOpt('discoverable_apis',
545 default=['all'],
546 help="A list of the enabled optional discoverable apis. "
547 "A single entry, all, indicates that all of these "
548 "features are expected to be enabled"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000549]
550
Nikhil Manchandadd6886f2014-03-03 01:58:45 -0800551database_group = cfg.OptGroup(name='database',
552 title='Database Service Options')
553
554DatabaseGroup = [
555 cfg.StrOpt('catalog_type',
556 default='database',
557 help="Catalog type of the Database service."),
558 cfg.StrOpt('db_flavor_ref',
559 default="1",
560 help="Valid primary flavor to use in database tests."),
561]
Attila Fazekasa23f5002012-10-23 19:32:45 +0200562
Steve Bakerc60e4e32013-05-06 15:22:41 +1200563orchestration_group = cfg.OptGroup(name='orchestration',
564 title='Orchestration Service Options')
565
566OrchestrationGroup = [
567 cfg.StrOpt('catalog_type',
568 default='orchestration',
569 help="Catalog type of the Orchestration service."),
Arata Notsu8f440392013-09-13 16:14:20 +0900570 cfg.StrOpt('region',
571 default='',
572 help="The orchestration region name to use. If empty, the "
573 "value of identity.region is used instead. If no such "
574 "region is found in the service catalog, the first found "
575 "one is used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000576 cfg.StrOpt('endpoint_type',
577 default='publicURL',
578 choices=['public', 'admin', 'internal',
579 'publicURL', 'adminURL', 'internalURL'],
580 help="The endpoint type to use for the orchestration service."),
Steve Bakerc60e4e32013-05-06 15:22:41 +1200581 cfg.BoolOpt('allow_tenant_isolation',
582 default=False,
583 help="Allows test cases to create/destroy tenants and "
584 "users. This option enables isolated test cases and "
585 "better parallel execution, but also requires that "
586 "OpenStack Identity API admin credentials are known."),
587 cfg.IntOpt('build_interval',
588 default=1,
589 help="Time in seconds between build status checks."),
590 cfg.IntOpt('build_timeout',
Matthew Treinisha2dfd492014-04-15 11:15:34 -0400591 default=1200,
Steve Bakerc60e4e32013-05-06 15:22:41 +1200592 help="Timeout in seconds to wait for a stack to build."),
Steve Bakerc60e4e32013-05-06 15:22:41 +1200593 cfg.StrOpt('instance_type',
Steve Baker9e86b832013-05-22 15:40:28 +1200594 default='m1.micro',
Steve Bakerc60e4e32013-05-06 15:22:41 +1200595 help="Instance type for tests. Needs to be big enough for a "
596 "full OS plus the test workload"),
597 cfg.StrOpt('image_ref',
598 default=None,
599 help="Name of heat-cfntools enabled image to use when "
600 "launching test instances."),
601 cfg.StrOpt('keypair_name',
602 default=None,
603 help="Name of existing keypair to launch servers with."),
Clint Byrum71f27632013-09-09 11:41:32 -0700604 cfg.IntOpt('max_template_size',
Joe Gordon0e51b222013-10-24 14:11:10 +0100605 default=524288,
Clint Byrum71f27632013-09-09 11:41:32 -0700606 help="Value must match heat configuration of the same name."),
Steven Hardyfdc6bd72014-03-21 16:56:04 +0000607 cfg.IntOpt('max_resources_per_stack',
608 default=1000,
609 help="Value must match heat configuration of the same name."),
Steve Bakerc60e4e32013-05-06 15:22:41 +1200610]
611
612
Yassine Lamgarchalb158d412013-12-27 19:29:42 +0100613telemetry_group = cfg.OptGroup(name='telemetry',
614 title='Telemetry Service Options')
615
616TelemetryGroup = [
617 cfg.StrOpt('catalog_type',
618 default='metering',
619 help="Catalog type of the Telemetry service."),
JordanPfc62c902014-02-26 14:47:28 +0000620 cfg.StrOpt('endpoint_type',
621 default='publicURL',
622 choices=['public', 'admin', 'internal',
623 'publicURL', 'adminURL', 'internalURL'],
624 help="The endpoint type to use for the telemetry service."),
Yassine Lamgarchalb158d412013-12-27 19:29:42 +0100625]
626
627
Julie Pichond1017642013-07-24 16:37:23 +0100628dashboard_group = cfg.OptGroup(name="dashboard",
629 title="Dashboard options")
630
631DashboardGroup = [
632 cfg.StrOpt('dashboard_url',
633 default='http://localhost/',
634 help="Where the dashboard can be found"),
635 cfg.StrOpt('login_url',
636 default='http://localhost/auth/login/',
637 help="Login page for the dashboard"),
638]
639
640
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +0400641data_processing_group = cfg.OptGroup(name="data_processing",
642 title="Data Processing options")
643
644DataProcessingGroup = [
645 cfg.StrOpt('catalog_type',
646 default='data_processing',
JordanPfc62c902014-02-26 14:47:28 +0000647 help="Catalog type of the data processing service."),
648 cfg.StrOpt('endpoint_type',
649 default='publicURL',
650 choices=['public', 'admin', 'internal',
651 'publicURL', 'adminURL', 'internalURL'],
652 help="The endpoint type to use for the data processing "
653 "service."),
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +0400654]
655
656
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500657boto_group = cfg.OptGroup(name='boto',
658 title='EC2/S3 options')
DennyZhang1e71b612013-09-26 12:35:40 -0500659BotoGroup = [
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500660 cfg.StrOpt('ec2_url',
661 default="http://localhost:8773/services/Cloud",
662 help="EC2 URL"),
663 cfg.StrOpt('s3_url',
664 default="http://localhost:8080",
665 help="S3 URL"),
666 cfg.StrOpt('aws_secret',
667 default=None,
668 help="AWS Secret Key",
669 secret=True),
670 cfg.StrOpt('aws_access',
671 default=None,
672 help="AWS Access Key"),
Attila Fazekas27dd92e2014-02-21 14:49:40 +0100673 cfg.StrOpt('aws_zone',
674 default="nova",
675 help="AWS Zone for EC2 tests"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500676 cfg.StrOpt('s3_materials_path',
677 default="/opt/stack/devstack/files/images/"
678 "s3-materials/cirros-0.3.0",
679 help="S3 Materials Path"),
680 cfg.StrOpt('ari_manifest',
681 default="cirros-0.3.0-x86_64-initrd.manifest.xml",
682 help="ARI Ramdisk Image manifest"),
683 cfg.StrOpt('ami_manifest',
684 default="cirros-0.3.0-x86_64-blank.img.manifest.xml",
685 help="AMI Machine Image manifest"),
686 cfg.StrOpt('aki_manifest',
687 default="cirros-0.3.0-x86_64-vmlinuz.manifest.xml",
688 help="AKI Kernel Image manifest"),
689 cfg.StrOpt('instance_type',
690 default="m1.tiny",
691 help="Instance type"),
692 cfg.IntOpt('http_socket_timeout',
693 default=3,
694 help="boto Http socket timeout"),
695 cfg.IntOpt('num_retries',
696 default=1,
697 help="boto num_retries on error"),
698 cfg.IntOpt('build_timeout',
699 default=60,
700 help="Status Change Timeout"),
701 cfg.IntOpt('build_interval',
702 default=1,
703 help="Status Change Test Interval"),
704]
Attila Fazekasf7f2d932012-12-13 09:14:38 +0100705
Matthew Treinish615ea6a2013-02-25 17:26:59 -0500706stress_group = cfg.OptGroup(name='stress', title='Stress Test Options')
707
708StressGroup = [
709 cfg.StrOpt('nova_logdir',
710 default=None,
711 help='Directory containing log files on the compute nodes'),
712 cfg.IntOpt('max_instances',
713 default=16,
714 help='Maximum number of instances to create during test.'),
715 cfg.StrOpt('controller',
716 default=None,
David Kranzb9d97502013-05-01 15:55:04 -0400717 help='Controller host.'),
718 # new stress options
719 cfg.StrOpt('target_controller',
720 default=None,
721 help='Controller host.'),
722 cfg.StrOpt('target_ssh_user',
723 default=None,
724 help='ssh user.'),
725 cfg.StrOpt('target_private_key_path',
726 default=None,
727 help='Path to private key.'),
728 cfg.StrOpt('target_logfiles',
729 default=None,
730 help='regexp for list of log files.'),
Matthew Treinishf319a732013-10-24 21:39:24 +0000731 cfg.IntOpt('log_check_interval',
David Kranzb9d97502013-05-01 15:55:04 -0400732 default=60,
Marc Koderer32221b8e2013-08-23 13:57:50 +0200733 help='time (in seconds) between log file error checks.'),
Matthew Treinishf319a732013-10-24 21:39:24 +0000734 cfg.IntOpt('default_thread_number_per_action',
Marc Koderer32221b8e2013-08-23 13:57:50 +0200735 default=4,
Julien Leloup04d40f72014-01-28 11:17:18 +0100736 help='The number of threads created while stress test.'),
737 cfg.BoolOpt('leave_dirty_stack',
738 default=False,
739 help='Prevent the cleaning (tearDownClass()) between'
740 ' each stress test run if an exception occurs'
Julien Leloupa5ee5422014-02-13 14:29:02 +0100741 ' during this run.'),
742 cfg.BoolOpt('full_clean_stack',
743 default=False,
744 help='Allows a full cleaning process after a stress test.'
745 ' Caution : this cleanup will remove every objects of'
746 ' every tenant.')
Matthew Treinish615ea6a2013-02-25 17:26:59 -0500747]
748
749
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +0900750scenario_group = cfg.OptGroup(name='scenario', title='Scenario Test Options')
751
752ScenarioGroup = [
753 cfg.StrOpt('img_dir',
754 default='/opt/stack/new/devstack/files/images/'
755 'cirros-0.3.1-x86_64-uec',
756 help='Directory containing image files'),
Masayuki Igawa4f71bf02014-02-21 14:02:29 +0900757 cfg.StrOpt('qcow2_img_file',
758 default='cirros-0.3.1-x86_64-disk.img',
759 help='QCOW2 image file name'),
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +0900760 cfg.StrOpt('ami_img_file',
761 default='cirros-0.3.1-x86_64-blank.img',
762 help='AMI image file name'),
763 cfg.StrOpt('ari_img_file',
764 default='cirros-0.3.1-x86_64-initrd',
765 help='ARI image file name'),
766 cfg.StrOpt('aki_img_file',
767 default='cirros-0.3.1-x86_64-vmlinuz',
768 help='AKI image file name'),
769 cfg.StrOpt('ssh_user',
770 default='cirros',
Joe Gordonb5e10cd2013-07-10 15:51:12 +0000771 help='ssh username for the image file'),
772 cfg.IntOpt(
773 'large_ops_number',
774 default=0,
775 help="specifies how many resources to request at once. Used "
776 "for large operations testing.")
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +0900777]
778
779
Matthew Treinish4c412922013-07-16 15:27:42 -0400780service_available_group = cfg.OptGroup(name="service_available",
781 title="Available OpenStack Services")
782
783ServiceAvailableGroup = [
784 cfg.BoolOpt('cinder',
785 default=True,
786 help="Whether or not cinder is expected to be available"),
Matthew Treinishfaa340d2013-07-19 16:26:21 -0400787 cfg.BoolOpt('neutron',
788 default=False,
789 help="Whether or not neutron is expected to be available"),
Matthew Treinish853ae442013-07-19 16:36:07 -0400790 cfg.BoolOpt('glance',
791 default=True,
792 help="Whether or not glance is expected to be available"),
Matthew Treinish61e332b2013-07-19 16:42:31 -0400793 cfg.BoolOpt('swift',
794 default=True,
795 help="Whether or not swift is expected to be available"),
Matthew Treinish6b41e242013-07-19 16:49:28 -0400796 cfg.BoolOpt('nova',
797 default=True,
798 help="Whether or not nova is expected to be available"),
Matthew Treinisha9d43882013-07-19 16:54:52 -0400799 cfg.BoolOpt('heat',
800 default=False,
801 help="Whether or not Heat is expected to be available"),
Mehdi Abaakouk8581c0b2013-10-04 10:45:42 +0200802 cfg.BoolOpt('ceilometer',
803 default=True,
804 help="Whether or not Ceilometer is expected to be available"),
Julie Pichond1017642013-07-24 16:37:23 +0100805 cfg.BoolOpt('horizon',
806 default=True,
807 help="Whether or not Horizon is expected to be available"),
Sergey Lukjanov9c95a252014-03-13 23:59:22 +0400808 cfg.BoolOpt('sahara',
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +0400809 default=False,
Sergey Lukjanov9c95a252014-03-13 23:59:22 +0400810 help="Whether or not Sahara is expected to be available"),
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +0300811 cfg.BoolOpt('ironic',
812 default=False,
813 help="Whether or not Ironic is expected to be available"),
Nikhil Manchandadd6886f2014-03-03 01:58:45 -0800814 cfg.BoolOpt('trove',
815 default=False,
816 help="Whether or not Trove is expected to be available"),
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500817 cfg.BoolOpt('marconi',
818 default=False,
819 help="Whether or not Marconi is expected to be available"),
Matthew Treinish4c412922013-07-16 15:27:42 -0400820]
821
Attila Fazekasaeeeefd2013-08-06 17:01:56 +0200822debug_group = cfg.OptGroup(name="debug",
823 title="Debug System")
824
825DebugGroup = [
826 cfg.BoolOpt('enable',
827 default=True,
828 help="Enable diagnostic commands"),
Sean Daguec522c092014-03-24 10:43:22 -0400829 cfg.StrOpt('trace_requests',
830 default='',
831 help="""A regex to determine which requests should be traced.
832
833This is a regex to match the caller for rest client requests to be able to
834selectively trace calls out of specific classes and methods. It largely
835exists for test development, and is not expected to be used in a real deploy
836of tempest. This will be matched against the discovered ClassName:method
837in the test environment.
838
839Expected values for this field are:
840
841 * ClassName:test_method_name - traces one test_method
842 * ClassName:setUp(Class) - traces specific setup functions
843 * ClassName:tearDown(Class) - traces specific teardown functions
844 * ClassName:_run_cleanups - traces the cleanup functions
845
846If nothing is specified, this feature is not enabled. To trace everything
847specify .* as the regex.
848""")
Attila Fazekasaeeeefd2013-08-06 17:01:56 +0200849]
850
Andrea Frittolif5da28b2013-12-06 07:08:07 +0000851input_scenario_group = cfg.OptGroup(name="input-scenario",
852 title="Filters and values for"
853 " input scenarios")
854
855InputScenarioGroup = [
856 cfg.StrOpt('image_regex',
857 default='^cirros-0.3.1-x86_64-uec$',
858 help="Matching images become parameters for scenario tests"),
859 cfg.StrOpt('flavor_regex',
Andrea Frittoli99901c02014-01-30 18:06:49 +0000860 default='^m1.nano$',
Andrea Frittolif5da28b2013-12-06 07:08:07 +0000861 help="Matching flavors become parameters for scenario tests"),
862 cfg.StrOpt('non_ssh_image_regex',
863 default='^.*[Ww]in.*$',
864 help="SSH verification in tests is skipped"
865 "for matching images"),
866 cfg.StrOpt('ssh_user_regex',
867 default="[[\"^.*[Cc]irros.*$\", \"root\"]]",
868 help="List of user mapped to regex "
869 "to matching image names."),
870]
871
Attila Fazekasaeeeefd2013-08-06 17:01:56 +0200872
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +0300873baremetal_group = cfg.OptGroup(name='baremetal',
874 title='Baremetal provisioning service options')
875
876BaremetalGroup = [
877 cfg.StrOpt('catalog_type',
878 default='baremetal',
Adam Gandelman4a48a602014-03-20 18:23:18 -0700879 help="Catalog type of the baremetal provisioning service"),
880 cfg.BoolOpt('driver_enabled',
881 default=False,
882 help="Whether the Ironic nova-compute driver is enabled"),
JordanPfc62c902014-02-26 14:47:28 +0000883 cfg.StrOpt('endpoint_type',
884 default='publicURL',
885 choices=['public', 'admin', 'internal',
886 'publicURL', 'adminURL', 'internalURL'],
887 help="The endpoint type to use for the baremetal provisioning "
Adam Gandelman4a48a602014-03-20 18:23:18 -0700888 "service"),
889 cfg.IntOpt('active_timeout',
890 default=300,
891 help="Timeout for Ironic node to completely provision"),
892 cfg.IntOpt('association_timeout',
893 default=10,
894 help="Timeout for association of Nova instance and Ironic "
895 "node"),
896 cfg.IntOpt('power_timeout',
897 default=20,
898 help="Timeout for Ironic power transitions."),
899 cfg.IntOpt('unprovision_timeout',
900 default=20,
901 help="Timeout for unprovisioning an Ironic node.")
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +0300902]
903
Matthew Treinishe2b56b52014-01-29 19:25:50 +0000904cli_group = cfg.OptGroup(name='cli', title="cli Configuration Options")
905
906CLIGroup = [
907 cfg.BoolOpt('enabled',
908 default=True,
909 help="enable cli tests"),
910 cfg.StrOpt('cli_dir',
911 default='/usr/local/bin',
912 help="directory where python client binaries are located"),
Sean Dague44b24682014-02-20 19:08:24 -0500913 cfg.BoolOpt('has_manage',
914 default=True,
915 help=("Whether the tempest run location has access to the "
916 "*-manage commands. In a pure blackbox environment "
917 "it will not.")),
Matthew Treinishe2b56b52014-01-29 19:25:50 +0000918 cfg.IntOpt('timeout',
919 default=15,
920 help="Number of seconds to wait on a CLI timeout"),
921]
922
Marc Koderer6ee82dc2014-02-17 10:26:29 +0100923negative_group = cfg.OptGroup(name='negative', title="Negative Test Options")
924
925NegativeGroup = [
926 cfg.StrOpt('test_generator',
927 default='tempest.common.' +
928 'generator.negative_generator.NegativeTestGenerator',
929 help="Test generator class for all negative tests"),
930]
931
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +0300932
Matthew Treinish43b296a2014-02-28 15:23:00 -0500933def register_opts():
934 register_opt_group(cfg.CONF, compute_group, ComputeGroup)
935 register_opt_group(cfg.CONF, compute_features_group,
936 ComputeFeaturesGroup)
937 register_opt_group(cfg.CONF, identity_group, IdentityGroup)
938 register_opt_group(cfg.CONF, identity_feature_group,
939 IdentityFeatureGroup)
940 register_opt_group(cfg.CONF, image_group, ImageGroup)
941 register_opt_group(cfg.CONF, image_feature_group, ImageFeaturesGroup)
942 register_opt_group(cfg.CONF, network_group, NetworkGroup)
943 register_opt_group(cfg.CONF, network_feature_group,
944 NetworkFeaturesGroup)
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500945 register_opt_group(cfg.CONF, queuing_group, QueuingGroup)
Matthew Treinish43b296a2014-02-28 15:23:00 -0500946 register_opt_group(cfg.CONF, volume_group, VolumeGroup)
947 register_opt_group(cfg.CONF, volume_feature_group,
948 VolumeFeaturesGroup)
949 register_opt_group(cfg.CONF, object_storage_group, ObjectStoreGroup)
950 register_opt_group(cfg.CONF, object_storage_feature_group,
951 ObjectStoreFeaturesGroup)
Nikhil Manchandadd6886f2014-03-03 01:58:45 -0800952 register_opt_group(cfg.CONF, database_group, DatabaseGroup)
Matthew Treinish43b296a2014-02-28 15:23:00 -0500953 register_opt_group(cfg.CONF, orchestration_group, OrchestrationGroup)
954 register_opt_group(cfg.CONF, telemetry_group, TelemetryGroup)
955 register_opt_group(cfg.CONF, dashboard_group, DashboardGroup)
956 register_opt_group(cfg.CONF, data_processing_group,
957 DataProcessingGroup)
958 register_opt_group(cfg.CONF, boto_group, BotoGroup)
959 register_opt_group(cfg.CONF, compute_admin_group, ComputeAdminGroup)
960 register_opt_group(cfg.CONF, stress_group, StressGroup)
961 register_opt_group(cfg.CONF, scenario_group, ScenarioGroup)
962 register_opt_group(cfg.CONF, service_available_group,
963 ServiceAvailableGroup)
964 register_opt_group(cfg.CONF, debug_group, DebugGroup)
965 register_opt_group(cfg.CONF, baremetal_group, BaremetalGroup)
966 register_opt_group(cfg.CONF, input_scenario_group, InputScenarioGroup)
967 register_opt_group(cfg.CONF, cli_group, CLIGroup)
Marc Koderer6ee82dc2014-02-17 10:26:29 +0100968 register_opt_group(cfg.CONF, negative_group, NegativeGroup)
Matthew Treinish43b296a2014-02-28 15:23:00 -0500969
970
Sean Dague3b9b1f32013-12-20 17:04:54 -0500971# this should never be called outside of this class
972class TempestConfigPrivate(object):
Daryl Walleck1465d612011-11-02 02:22:15 -0500973 """Provides OpenStack configuration information."""
974
Brian Waldon738cd632011-12-12 18:45:09 -0500975 DEFAULT_CONFIG_DIR = os.path.join(
Zhongyue Luoa1343de2013-01-04 16:21:35 +0800976 os.path.abspath(os.path.dirname(os.path.dirname(__file__))),
Brian Waldon738cd632011-12-12 18:45:09 -0500977 "etc")
Daryl Walleck1465d612011-11-02 02:22:15 -0500978
Brian Waldon738cd632011-12-12 18:45:09 -0500979 DEFAULT_CONFIG_FILE = "tempest.conf"
980
Matthew Treinish43b296a2014-02-28 15:23:00 -0500981 def _set_attrs(self):
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500982 self.compute = cfg.CONF.compute
Matthew Treinishd5c96022013-10-17 21:51:23 +0000983 self.compute_feature_enabled = cfg.CONF['compute-feature-enabled']
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500984 self.identity = cfg.CONF.identity
Matthew Treinishd5021a72014-01-09 18:42:51 +0000985 self.identity_feature_enabled = cfg.CONF['identity-feature-enabled']
Matt Riedemannd3efe902014-02-10 06:46:38 -0800986 self.image = cfg.CONF.image
Matthew Treinish2b5287d2013-10-22 17:40:34 +0000987 self.image_feature_enabled = cfg.CONF['image-feature-enabled']
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500988 self.network = cfg.CONF.network
Matthew Treinishe3d26142013-11-26 19:14:58 +0000989 self.network_feature_enabled = cfg.CONF['network-feature-enabled']
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500990 self.volume = cfg.CONF.volume
Matthew Treinishd5c96022013-10-17 21:51:23 +0000991 self.volume_feature_enabled = cfg.CONF['volume-feature-enabled']
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500992 self.object_storage = cfg.CONF['object-storage']
Matthew Treinishd5c96022013-10-17 21:51:23 +0000993 self.object_storage_feature_enabled = cfg.CONF[
994 'object-storage-feature-enabled']
Nikhil Manchandadd6886f2014-03-03 01:58:45 -0800995 self.database = cfg.CONF.database
Steve Bakerc60e4e32013-05-06 15:22:41 +1200996 self.orchestration = cfg.CONF.orchestration
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500997 self.queuing = cfg.CONF.queuing
Yassine Lamgarchalb158d412013-12-27 19:29:42 +0100998 self.telemetry = cfg.CONF.telemetry
Julie Pichond1017642013-07-24 16:37:23 +0100999 self.dashboard = cfg.CONF.dashboard
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +04001000 self.data_processing = cfg.CONF.data_processing
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001001 self.boto = cfg.CONF.boto
Attila Fazekascadcb1f2013-01-21 23:10:53 +01001002 self.compute_admin = cfg.CONF['compute-admin']
Matthew Treinish615ea6a2013-02-25 17:26:59 -05001003 self.stress = cfg.CONF.stress
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +09001004 self.scenario = cfg.CONF.scenario
Matthew Treinish4c412922013-07-16 15:27:42 -04001005 self.service_available = cfg.CONF.service_available
Attila Fazekas5fae7a32013-09-25 16:52:44 +02001006 self.debug = cfg.CONF.debug
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +03001007 self.baremetal = cfg.CONF.baremetal
Andrea Frittolif5da28b2013-12-06 07:08:07 +00001008 self.input_scenario = cfg.CONF['input-scenario']
Matthew Treinishe2b56b52014-01-29 19:25:50 +00001009 self.cli = cfg.CONF.cli
Marc Koderer6ee82dc2014-02-17 10:26:29 +01001010 self.negative = cfg.CONF.negative
Attila Fazekascadcb1f2013-01-21 23:10:53 +01001011 if not self.compute_admin.username:
1012 self.compute_admin.username = self.identity.admin_username
1013 self.compute_admin.password = self.identity.admin_password
1014 self.compute_admin.tenant_name = self.identity.admin_tenant_name
Andrea Frittolib1b04bb2014-04-06 11:57:07 +01001015 cfg.CONF.set_default('domain_name', self.identity.admin_domain_name,
1016 group='identity')
1017 cfg.CONF.set_default('alt_domain_name',
1018 self.identity.admin_domain_name,
1019 group='identity')
1020 cfg.CONF.set_default('domain_name', self.identity.admin_domain_name,
1021 group='compute-admin')
Sean Dague86bd8422013-12-20 09:56:44 -05001022
Matthew Treinish43b296a2014-02-28 15:23:00 -05001023 def __init__(self, parse_conf=True):
1024 """Initialize a configuration from a conf directory and conf file."""
1025 super(TempestConfigPrivate, self).__init__()
1026 config_files = []
1027 failsafe_path = "/etc/tempest/" + self.DEFAULT_CONFIG_FILE
1028
1029 # Environment variables override defaults...
1030 conf_dir = os.environ.get('TEMPEST_CONFIG_DIR',
1031 self.DEFAULT_CONFIG_DIR)
1032 conf_file = os.environ.get('TEMPEST_CONFIG', self.DEFAULT_CONFIG_FILE)
1033
1034 path = os.path.join(conf_dir, conf_file)
1035
1036 if not os.path.isfile(path):
1037 path = failsafe_path
1038
1039 # only parse the config file if we expect one to exist. This is needed
1040 # to remove an issue with the config file up to date checker.
1041 if parse_conf:
1042 config_files.append(path)
1043
1044 cfg.CONF([], project='tempest', default_config_files=config_files)
1045 logging.setup('tempest')
1046 LOG = logging.getLogger('tempest')
1047 LOG.info("Using tempest config file %s" % path)
1048 register_opts()
1049 self._set_attrs()
Masayuki Igawa9ec4cd82014-02-05 15:04:16 +09001050 if parse_conf:
1051 cfg.CONF.log_opt_values(LOG, std_logging.DEBUG)
1052
Sean Dague86bd8422013-12-20 09:56:44 -05001053
1054class TempestConfigProxy(object):
1055 _config = None
1056
1057 def __getattr__(self, attr):
1058 if not self._config:
Sean Dague3b9b1f32013-12-20 17:04:54 -05001059 self._config = TempestConfigPrivate()
Sean Dague86bd8422013-12-20 09:56:44 -05001060
1061 return getattr(self._config, attr)
1062
1063
1064CONF = TempestConfigProxy()