blob: 163817c273db6b31b4e85d88601517d48fcf9965 [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
Jon Grimm270bd7f2014-08-05 18:11:29 +000023from tempest.openstack.common import lockutils
Matthew Treinishf4a9b0f2013-07-26 16:58:26 -040024from tempest.openstack.common import log as logging
Jay Pipes7f757632011-12-02 15:53:32 -050025
Daryl Walleck1465d612011-11-02 02:22:15 -050026
DennyZhang88a2dd82013-10-07 12:55:35 -050027def register_opt_group(conf, opt_group, options):
28 conf.register_group(opt_group)
29 for opt in options:
30 conf.register_opt(opt, group=opt_group.name)
31
32
Matthew Treinishc791ac42014-07-16 09:15:23 -040033auth_group = cfg.OptGroup(name='auth',
34 title="Options for authentication and credentials")
35
36
37AuthGroup = [
38 cfg.StrOpt('test_accounts_file',
39 default='etc/accounts.yaml',
40 help="Path to the yaml file that contains the list of "
41 "credentials to use for running tests"),
Andrea Frittoli8283b4e2014-07-17 13:28:58 +010042 cfg.BoolOpt('allow_tenant_isolation',
43 default=False,
44 help="Allows test cases to create/destroy tenants and "
45 "users. This option requires that OpenStack Identity "
46 "API admin credentials are known. If false, isolated "
47 "test cases and parallel execution, can still be "
48 "achieved configuring a list of test accounts",
49 deprecated_opts=[cfg.DeprecatedOpt('allow_tenant_isolation',
50 group='compute'),
51 cfg.DeprecatedOpt('allow_tenant_isolation',
52 group='orchestration')]),
53 cfg.BoolOpt('locking_credentials_provider',
54 default=False,
55 help="If set to True it enables the Accounts provider, "
56 "which locks credentials to allow for parallel execution "
57 "with pre-provisioned accounts. It can only be used to "
58 "run tests that ensure credentials cleanup happens. "
59 "It requires at least `2 * CONC` distinct accounts "
60 "configured in `test_accounts_file`, with CONC == the "
61 "number of concurrent test processes."),
Matthew Treinishc791ac42014-07-16 09:15:23 -040062]
63
Matthew Treinish39e48ef2012-12-21 13:36:15 -050064identity_group = cfg.OptGroup(name='identity',
65 title="Keystone Configuration Options")
Daryl Walleck1465d612011-11-02 02:22:15 -050066
Matthew Treinish39e48ef2012-12-21 13:36:15 -050067IdentityGroup = [
68 cfg.StrOpt('catalog_type',
69 default='identity',
70 help="Catalog type of the Identity service."),
Jay Pipescd8eaec2013-01-16 21:03:48 -050071 cfg.BoolOpt('disable_ssl_certificate_validation',
72 default=False,
73 help="Set to True if using self-signed SSL certificates."),
Jay Pipes7c88eb22013-01-16 21:32:43 -050074 cfg.StrOpt('uri',
Brant Knudsonc7ca3342013-03-28 21:08:50 -050075 help="Full URI of the OpenStack Identity API (Keystone), v2"),
76 cfg.StrOpt('uri_v3',
77 help='Full URI of the OpenStack Identity API (Keystone), v3'),
Andrea Frittoli8bbdb162014-01-06 11:06:13 +000078 cfg.StrOpt('auth_version',
79 default='v2',
80 help="Identity API version to be used for authentication "
Andrea Frittoli77f9da42014-02-06 11:18:19 +000081 "for API tests."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -050082 cfg.StrOpt('region',
Attila Fazekascadcb1f2013-01-21 23:10:53 +010083 default='RegionOne',
Arata Notsu8f440392013-09-13 16:14:20 +090084 help="The identity region name to use. Also used as the other "
85 "services' region name unless they are set explicitly. "
86 "If no such region is found in the service catalog, the "
87 "first found one is used."),
JordanP5d29b2c2013-12-18 13:56:03 +000088 cfg.StrOpt('endpoint_type',
89 default='publicURL',
90 choices=['public', 'admin', 'internal',
91 'publicURL', 'adminURL', 'internalURL'],
92 help="The endpoint type to use for the identity service."),
Attila Fazekascadcb1f2013-01-21 23:10:53 +010093 cfg.StrOpt('username',
Attila Fazekascadcb1f2013-01-21 23:10:53 +010094 help="Username to use for Nova API requests."),
95 cfg.StrOpt('tenant_name',
Attila Fazekascadcb1f2013-01-21 23:10:53 +010096 help="Tenant name to use for Nova API requests."),
Russell Sim7f894a52013-09-13 10:35:21 +100097 cfg.StrOpt('admin_role',
98 default='admin',
99 help="Role required to administrate keystone."),
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100100 cfg.StrOpt('password',
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100101 help="API key to use when authenticating.",
102 secret=True),
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100103 cfg.StrOpt('domain_name',
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100104 help="Domain name for authentication (Keystone V3)."
105 "The same domain applies to user and project"),
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100106 cfg.StrOpt('alt_username',
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100107 help="Username of alternate user to use for Nova API "
108 "requests."),
109 cfg.StrOpt('alt_tenant_name',
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100110 help="Alternate user's Tenant name to use for Nova API "
111 "requests."),
112 cfg.StrOpt('alt_password',
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100113 help="API key to use when authenticating as alternate user.",
114 secret=True),
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100115 cfg.StrOpt('alt_domain_name',
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100116 help="Alternate domain name for authentication (Keystone V3)."
117 "The same domain applies to user and project"),
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100118 cfg.StrOpt('admin_username',
Dirk Mueller14bd5622014-01-14 19:33:05 +0100119 help="Administrative Username to use for "
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100120 "Keystone API requests."),
121 cfg.StrOpt('admin_tenant_name',
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100122 help="Administrative Tenant name to use for Keystone API "
123 "requests."),
124 cfg.StrOpt('admin_password',
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100125 help="API key to use when authenticating as admin.",
126 secret=True),
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100127 cfg.StrOpt('admin_domain_name',
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100128 help="Admin domain name for authentication (Keystone V3)."
129 "The same domain applies to user and project"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500130]
Jay Pipes3f981df2012-03-27 18:59:44 -0400131
Matthew Treinishd5021a72014-01-09 18:42:51 +0000132identity_feature_group = cfg.OptGroup(name='identity-feature-enabled',
133 title='Enabled Identity Features')
134
135IdentityFeatureGroup = [
136 cfg.BoolOpt('trust',
137 default=True,
138 help='Does the identity service have delegation and '
Matthew Treinishdb2c5972014-01-31 22:18:59 +0000139 'impersonation enabled'),
140 cfg.BoolOpt('api_v2',
141 default=True,
142 help='Is the v2 identity API enabled'),
143 cfg.BoolOpt('api_v3',
144 default=True,
145 help='Is the v3 identity API enabled'),
Matthew Treinishd5021a72014-01-09 18:42:51 +0000146]
147
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500148compute_group = cfg.OptGroup(name='compute',
149 title='Compute Service Options')
Rohit Karajgie1b050d2011-12-02 16:13:18 -0800150
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500151ComputeGroup = [
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500152 cfg.StrOpt('image_ref',
Matthew Treinishafcb6b42014-05-27 13:50:02 -0400153 help="Valid primary image reference to be used in tests. "
154 "This is a required option"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500155 cfg.StrOpt('image_ref_alt',
Matthew Treinishafcb6b42014-05-27 13:50:02 -0400156 help="Valid secondary image reference to be used in tests. "
157 "This is a required option, but if only one image is "
158 "available duplicate the value of image_ref above"),
Ken'ichi Ohmichi35772602013-11-14 15:03:27 +0900159 cfg.StrOpt('flavor_ref',
160 default="1",
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500161 help="Valid primary flavor to use in tests."),
Ken'ichi Ohmichi35772602013-11-14 15:03:27 +0900162 cfg.StrOpt('flavor_ref_alt',
163 default="2",
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500164 help='Valid secondary flavor to be used in tests.'),
Maru Newbyaf292e82013-05-20 21:32:28 +0000165 cfg.StrOpt('image_ssh_user',
166 default="root",
167 help="User name used to authenticate to an instance."),
Ryan Hsucb2e1252013-09-03 21:44:49 -0700168 cfg.StrOpt('image_ssh_password',
169 default="password",
170 help="Password used to authenticate to an instance."),
Maru Newbyaf292e82013-05-20 21:32:28 +0000171 cfg.StrOpt('image_alt_ssh_user',
172 default="root",
173 help="User name used to authenticate to an instance using "
174 "the alternate image."),
Ryan Hsucb2e1252013-09-03 21:44:49 -0700175 cfg.StrOpt('image_alt_ssh_password',
176 default="password",
177 help="Password used to authenticate to an instance using "
178 "the alternate image."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500179 cfg.IntOpt('build_interval',
Sean Dague82190852014-05-24 07:42:59 -0400180 default=1,
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500181 help="Time in seconds between build status checks."),
182 cfg.IntOpt('build_timeout',
183 default=300,
184 help="Timeout in seconds to wait for an instance to build."),
185 cfg.BoolOpt('run_ssh',
186 default=False,
Derek Higgins85cd5142013-12-17 17:10:11 +0000187 help="Should the tests ssh to instances?"),
Attila Fazekas423834d2014-03-14 17:33:13 +0100188 cfg.StrOpt('ssh_auth_method',
189 default='keypair',
190 help="Auth method used for authenticate to the instance. "
191 "Valid choices are: keypair, configured, adminpass. "
192 "keypair: start the servers with an ssh keypair. "
193 "configured: use the configured user and password. "
194 "adminpass: use the injected adminPass. "
195 "disabled: avoid using ssh when it is an option."),
196 cfg.StrOpt('ssh_connect_method',
197 default='fixed',
198 help="How to connect to the instance? "
199 "fixed: using the first ip belongs the fixed network "
200 "floating: creating and using a floating ip"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500201 cfg.StrOpt('ssh_user',
202 default='root',
203 help="User name used to authenticate to an instance."),
Nachi Ueno6d580be2013-07-24 10:58:11 -0700204 cfg.IntOpt('ping_timeout',
Darragh O'Reilly6b636672014-01-24 12:17:40 +0000205 default=120,
Nachi Ueno6d580be2013-07-24 10:58:11 -0700206 help="Timeout in seconds to wait for ping to "
207 "succeed."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500208 cfg.IntOpt('ssh_timeout',
209 default=300,
Chris Yeoh76916042013-02-27 16:25:25 +1030210 help="Timeout in seconds to wait for authentication to "
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500211 "succeed."),
Attila Fazekas0abbc952013-07-01 19:19:42 +0200212 cfg.IntOpt('ready_wait',
213 default=0,
DennyZhang8912d012013-09-25 18:08:34 -0500214 help="Additional wait time for clean state, when there is "
215 "no OS-EXT-STS extension available"),
Chris Yeoh76916042013-02-27 16:25:25 +1030216 cfg.IntOpt('ssh_channel_timeout',
217 default=60,
218 help="Timeout in seconds to wait for output from ssh "
219 "channel."),
Attila Fazekasb0661652013-05-08 13:01:36 +0200220 cfg.StrOpt('fixed_network_name',
221 default='private',
222 help="Visible fixed network name "),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500223 cfg.StrOpt('network_for_ssh',
224 default='public',
225 help="Network used for SSH connections."),
226 cfg.IntOpt('ip_version_for_ssh',
227 default=4,
228 help="IP version used for SSH connections."),
fujioka yuuichia11994e2013-07-09 11:19:51 +0900229 cfg.BoolOpt('use_floatingip_for_ssh',
230 default=True,
Tushar Kalra95a482d2014-03-25 14:24:43 -0700231 help="Does SSH use Floating IPs?"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500232 cfg.StrOpt('catalog_type',
233 default='compute',
234 help="Catalog type of the Compute service."),
Arata Notsu8f440392013-09-13 16:14:20 +0900235 cfg.StrOpt('region',
236 default='',
237 help="The compute region name to use. If empty, the value "
238 "of identity.region is used instead. If no such region "
239 "is found in the service catalog, the first found one is "
240 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000241 cfg.StrOpt('endpoint_type',
242 default='publicURL',
243 choices=['public', 'admin', 'internal',
244 'publicURL', 'adminURL', 'internalURL'],
245 help="The endpoint type to use for the compute service."),
ivan-zhu8f992be2013-07-31 14:56:58 +0800246 cfg.StrOpt('catalog_v3_type',
247 default='computev3',
248 help="Catalog type of the Compute v3 service."),
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100249 cfg.StrOpt('path_to_private_key',
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100250 help="Path to a private key file for SSH access to remote "
251 "hosts"),
Ryan Hsucb2e1252013-09-03 21:44:49 -0700252 cfg.StrOpt('volume_device_name',
253 default='vdb',
254 help="Expected device name when a volume is attached to "
Ken'ichi Ohmichi39437e22013-10-06 00:21:38 +0900255 "an instance"),
256 cfg.IntOpt('shelved_offload_time',
257 default=0,
258 help='Time in seconds before a shelved instance is eligible '
259 'for removing from a host. -1 never offload, 0 offload '
260 'when shelved. This time should be the same as the time '
261 'of nova.conf, and some tests will run for as long as the '
Ghanshyam06a5b4a2014-04-11 17:32:45 +0900262 'time.'),
263 cfg.StrOpt('floating_ip_range',
264 default='10.0.0.0/29',
265 help='Unallocated floating IP range, which will be used to '
266 'test the floating IP bulk feature for CRUD operation.')
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500267]
Rohit Karajgie1b050d2011-12-02 16:13:18 -0800268
Matthew Treinishd5c96022013-10-17 21:51:23 +0000269compute_features_group = cfg.OptGroup(name='compute-feature-enabled',
270 title="Enabled Compute Service Features")
271
272ComputeFeaturesGroup = [
ivan-zhu8f992be2013-07-31 14:56:58 +0800273 cfg.BoolOpt('api_v3',
Matthew Treinish836e56b2014-06-12 13:55:19 -0400274 default=False,
ivan-zhu8f992be2013-07-31 14:56:58 +0800275 help="If false, skip all nova v3 tests."),
Matthew Treinish20866a22014-06-12 14:58:36 -0400276 cfg.BoolOpt('xml_api_v2',
277 default=True,
278 help="If false skip all v2 api tests with xml"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000279 cfg.BoolOpt('disk_config',
280 default=True,
281 help="If false, skip disk config tests"),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000282 cfg.ListOpt('api_extensions',
283 default=['all'],
Zhi Kun Liude25c022014-02-14 13:25:19 +0800284 help='A list of enabled compute extensions with a special '
Ken'ichi Ohmichia7e68712014-05-06 10:47:26 +0900285 'entry all which indicates every extension is enabled. '
Simeon Monov5d7effe2014-07-16 07:32:38 +0300286 'Each extension should be specified with alias name. '
287 'Empty list indicates all extensions are disabled'),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000288 cfg.ListOpt('api_v3_extensions',
289 default=['all'],
290 help='A list of enabled v3 extensions with a special entry all'
Ken'ichi Ohmichia7e68712014-05-06 10:47:26 +0900291 ' which indicates every extension is enabled. '
Simeon Monov5d7effe2014-07-16 07:32:38 +0300292 'Each extension should be specified with alias name. '
293 'Empty list indicates all extensions are disabled'),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000294 cfg.BoolOpt('change_password',
295 default=False,
296 help="Does the test environment support changing the admin "
297 "password?"),
Adam Gandelmanc6eefb42014-07-15 16:44:08 -0700298 cfg.BoolOpt('console_output',
299 default=True,
300 help="Does the test environment support obtaining instance "
301 "serial console output?"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000302 cfg.BoolOpt('resize',
303 default=False,
304 help="Does the test environment support resizing?"),
Eric Windischb5538072014-03-09 23:47:35 -0400305 cfg.BoolOpt('pause',
306 default=True,
307 help="Does the test environment support pausing?"),
David Shrewsbury25f666f2014-07-22 12:17:59 -0400308 cfg.BoolOpt('shelve',
309 default=True,
310 help="Does the test environment support shelving/unshelving?"),
Eric Windischaeb7e842014-03-10 01:10:50 -0400311 cfg.BoolOpt('suspend',
312 default=True,
313 help="Does the test environment support suspend/resume?"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000314 cfg.BoolOpt('live_migration',
315 default=False,
316 help="Does the test environment support live migration "
317 "available?"),
318 cfg.BoolOpt('block_migration_for_live_migration',
319 default=False,
320 help="Does the test environment use block devices for live "
321 "migration"),
322 cfg.BoolOpt('block_migrate_cinder_iscsi',
323 default=False,
324 help="Does the test environment block migration support "
Ghanshyam Mann41c17572014-02-27 18:52:56 +0900325 "cinder iSCSI volumes"),
326 cfg.BoolOpt('vnc_console',
327 default=False,
328 help='Enable VNC console. This configuration value should '
Ghanshyam70876d02014-03-11 11:40:18 +0900329 'be same as [nova.vnc]->vnc_enabled in nova.conf'),
330 cfg.BoolOpt('spice_console',
331 default=False,
332 help='Enable Spice console. This configuration value should '
333 'be same as [nova.spice]->enabled in nova.conf'),
334 cfg.BoolOpt('rdp_console',
335 default=False,
336 help='Enable RDP console. This configuration value should '
Adam Gandelman2e37b4f2014-06-18 17:34:21 -0700337 'be same as [nova.rdp]->enabled in nova.conf'),
338 cfg.BoolOpt('rescue',
339 default=True,
340 help='Does the test environment support instance rescue '
Ghanshyam9c2e50d2014-07-22 21:32:05 +0900341 'mode?'),
342 cfg.BoolOpt('enable_instance_password',
343 default=True,
344 help='Enables returning of the instance password by the '
345 'relevant server API calls such as create, rebuild '
Adam Gandelman7186f7a2014-07-23 09:28:56 -0400346 'or rescue.'),
347 cfg.BoolOpt('interface_attach',
348 default=True,
349 help='Does the test environment support dynamic network '
Adam Gandelmanfbc95ac2014-06-19 17:33:43 -0700350 'interface attachment?'),
351 cfg.BoolOpt('snapshot',
352 default=True,
353 help='Does the test environment support creating snapshot '
354 'images of running instances?')
Matthew Treinishd5c96022013-10-17 21:51:23 +0000355]
356
357
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500358compute_admin_group = cfg.OptGroup(name='compute-admin',
359 title="Compute Admin Options")
donald-ngo7fb1efa2011-12-13 17:17:36 -0800360
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500361ComputeAdminGroup = [
362 cfg.StrOpt('username',
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500363 help="Administrative Username to use for Nova API requests."),
364 cfg.StrOpt('tenant_name',
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500365 help="Administrative Tenant name to use for Nova API "
366 "requests."),
367 cfg.StrOpt('password',
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500368 help="API key to use when authenticating as admin.",
369 secret=True),
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100370 cfg.StrOpt('domain_name',
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100371 help="Domain name for authentication as admin (Keystone V3)."
372 "The same domain applies to user and project"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500373]
Daryl Walleck587385b2012-03-03 13:00:26 -0600374
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500375image_group = cfg.OptGroup(name='image',
376 title="Image Service Options")
Jay Pipesf38eaac2012-06-21 13:37:35 -0400377
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500378ImageGroup = [
Matthew Treinish72ea4422013-02-07 14:42:49 -0500379 cfg.StrOpt('catalog_type',
380 default='image',
Sean Dague83401992013-05-06 17:46:36 -0400381 help='Catalog type of the Image service.'),
Arata Notsu8f440392013-09-13 16:14:20 +0900382 cfg.StrOpt('region',
383 default='',
384 help="The image region name to use. If empty, the value "
385 "of identity.region is used instead. If no such region "
386 "is found in the service catalog, the first found one is "
387 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000388 cfg.StrOpt('endpoint_type',
389 default='publicURL',
390 choices=['public', 'admin', 'internal',
391 'publicURL', 'adminURL', 'internalURL'],
392 help="The endpoint type to use for the image service."),
Sean Dague83401992013-05-06 17:46:36 -0400393 cfg.StrOpt('http_image',
394 default='http://download.cirros-cloud.net/0.3.1/'
395 'cirros-0.3.1-x86_64-uec.tar.gz',
DennyZhang8912d012013-09-25 18:08:34 -0500396 help='http accessible image')
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500397]
Jay Pipesf38eaac2012-06-21 13:37:35 -0400398
Matthew Treinish2b5287d2013-10-22 17:40:34 +0000399image_feature_group = cfg.OptGroup(name='image-feature-enabled',
400 title='Enabled image service features')
401
402ImageFeaturesGroup = [
403 cfg.BoolOpt('api_v2',
404 default=True,
405 help="Is the v2 image API enabled"),
406 cfg.BoolOpt('api_v1',
407 default=True,
408 help="Is the v1 image API enabled"),
409]
Jay Pipesf38eaac2012-06-21 13:37:35 -0400410
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500411network_group = cfg.OptGroup(name='network',
412 title='Network Service Options')
Daryl Walleck587385b2012-03-03 13:00:26 -0600413
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500414NetworkGroup = [
415 cfg.StrOpt('catalog_type',
416 default='network',
Mark McClainf2982e82013-07-06 17:48:03 -0400417 help='Catalog type of the Neutron service.'),
Arata Notsu8f440392013-09-13 16:14:20 +0900418 cfg.StrOpt('region',
419 default='',
420 help="The network region name to use. If empty, the value "
421 "of identity.region is used instead. If no such region "
422 "is found in the service catalog, the first found one is "
423 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000424 cfg.StrOpt('endpoint_type',
425 default='publicURL',
426 choices=['public', 'admin', 'internal',
427 'publicURL', 'adminURL', 'internalURL'],
428 help="The endpoint type to use for the network service."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500429 cfg.StrOpt('tenant_network_cidr',
430 default="10.100.0.0/16",
Henry Gessauffda37a2014-01-16 11:17:55 -0500431 help="The cidr block to allocate tenant ipv4 subnets from"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500432 cfg.IntOpt('tenant_network_mask_bits',
Attila Fazekas8ea181b2013-07-13 16:26:14 +0200433 default=28,
Henry Gessauffda37a2014-01-16 11:17:55 -0500434 help="The mask bits for tenant ipv4 subnets"),
435 cfg.StrOpt('tenant_network_v6_cidr',
Sergey Shnaidman1f3659a2014-08-27 18:26:42 +0400436 default="2003::/48",
Henry Gessauffda37a2014-01-16 11:17:55 -0500437 help="The cidr block to allocate tenant ipv6 subnets from"),
438 cfg.IntOpt('tenant_network_v6_mask_bits',
Sergey Shnaidman1f3659a2014-08-27 18:26:42 +0400439 default=64,
Henry Gessauffda37a2014-01-16 11:17:55 -0500440 help="The mask bits for tenant ipv6 subnets"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500441 cfg.BoolOpt('tenant_networks_reachable',
442 default=False,
443 help="Whether tenant network connectivity should be "
444 "evaluated directly"),
445 cfg.StrOpt('public_network_id',
446 default="",
447 help="Id of the public network that provides external "
448 "connectivity"),
449 cfg.StrOpt('public_router_id',
450 default="",
451 help="Id of the public router that provides external "
Yair Fried1eb27f52014-11-10 15:24:19 +0200452 "connectivity. This should only be used when Neutron's "
453 "'allow_overlapping_ips' is set to 'False' in "
454 "neutron.conf. usually not needed past 'Grizzly' release"),
izikpensod9a01a62014-02-17 20:02:32 +0200455 cfg.IntOpt('build_timeout',
456 default=300,
457 help="Timeout in seconds to wait for network operation to "
458 "complete."),
459 cfg.IntOpt('build_interval',
Sean Dague82190852014-05-24 07:42:59 -0400460 default=1,
izikpensod9a01a62014-02-17 20:02:32 +0200461 help="Time in seconds between network operation status "
462 "checks."),
Attila Fazekas640392b2014-06-12 15:58:10 +0200463 cfg.ListOpt('dns_servers',
464 default=["8.8.8.8", "8.8.4.4"],
465 help="List of dns servers whichs hould be used"
466 " for subnet creation")
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500467]
Jay Pipes3f981df2012-03-27 18:59:44 -0400468
Matthew Treinishe3d26142013-11-26 19:14:58 +0000469network_feature_group = cfg.OptGroup(name='network-feature-enabled',
470 title='Enabled network service features')
471
472NetworkFeaturesGroup = [
Matthew Treinishe2e33cf2014-03-03 19:28:41 +0000473 cfg.BoolOpt('ipv6',
474 default=True,
475 help="Allow the execution of IPv6 tests"),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000476 cfg.ListOpt('api_extensions',
477 default=['all'],
Zhi Kun Liude25c022014-02-14 13:25:19 +0800478 help='A list of enabled network extensions with a special '
Simeon Monov5d7effe2014-07-16 07:32:38 +0300479 'entry all which indicates every extension is enabled. '
480 'Empty list indicates all extensions are disabled'),
Sean M. Collinsdd27a4d2014-05-13 10:33:15 -0400481 cfg.BoolOpt('ipv6_subnet_attributes',
482 default=False,
483 help="Allow the execution of IPv6 subnet tests that use "
484 "the extended IPv6 attributes ipv6_ra_mode "
485 "and ipv6_address_mode"
Mark McClain6e07c0d2014-10-10 11:25:03 -0400486 ),
487 cfg.BoolOpt('xml_api',
488 default=False,
489 help='If false, skip all network api tests with xml')
Matthew Treinishe3d26142013-11-26 19:14:58 +0000490]
491
Victoria Martínez de la Cruz1173b6e2014-09-22 18:32:13 -0300492messaging_group = cfg.OptGroup(name='messaging',
493 title='Messaging Service')
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500494
Victoria Martínez de la Cruz1173b6e2014-09-22 18:32:13 -0300495MessagingGroup = [
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500496 cfg.StrOpt('catalog_type',
Victoria Martínez de la Cruz1173b6e2014-09-22 18:32:13 -0300497 default='messaging',
498 help='Catalog type of the Messaging service.'),
Jorge Chai83ba4ee2014-04-15 18:58:08 +0000499 cfg.IntOpt('max_queues_per_page',
500 default=20,
501 help='The maximum number of queue records per page when '
502 'listing queues'),
Malini Kamalambal7458b4b2014-05-29 11:47:28 -0400503 cfg.IntOpt('max_queue_metadata',
504 default=65536,
505 help='The maximum metadata size for a queue'),
506 cfg.IntOpt('max_messages_per_page',
507 default=20,
508 help='The maximum number of queue message per page when '
509 'listing (or) posting messages'),
510 cfg.IntOpt('max_message_size',
511 default=262144,
512 help='The maximum size of a message body'),
513 cfg.IntOpt('max_messages_per_claim',
514 default=20,
515 help='The maximum number of messages per claim'),
516 cfg.IntOpt('max_message_ttl',
517 default=1209600,
518 help='The maximum ttl for a message'),
519 cfg.IntOpt('max_claim_ttl',
520 default=43200,
521 help='The maximum ttl for a claim'),
522 cfg.IntOpt('max_claim_grace',
523 default=43200,
524 help='The maximum grace period for a claim'),
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500525]
526
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500527volume_group = cfg.OptGroup(name='volume',
528 title='Block Storage Options')
Daryl Walleck587385b2012-03-03 13:00:26 -0600529
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500530VolumeGroup = [
531 cfg.IntOpt('build_interval',
Sean Dague82190852014-05-24 07:42:59 -0400532 default=1,
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500533 help='Time in seconds between volume availability checks.'),
534 cfg.IntOpt('build_timeout',
535 default=300,
Eric Harney9b1f89c2014-10-14 14:40:19 -0400536 help='Timeout in seconds to wait for a volume to become '
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500537 'available.'),
538 cfg.StrOpt('catalog_type',
Matthew Treinisheb724512013-10-25 15:12:59 +0000539 default='volume',
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500540 help="Catalog type of the Volume Service"),
Arata Notsu8f440392013-09-13 16:14:20 +0900541 cfg.StrOpt('region',
542 default='',
543 help="The volume region name to use. If empty, the value "
544 "of identity.region is used instead. If no such region "
545 "is found in the service catalog, the first found one is "
546 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000547 cfg.StrOpt('endpoint_type',
548 default='publicURL',
549 choices=['public', 'admin', 'internal',
550 'publicURL', 'adminURL', 'internalURL'],
551 help="The endpoint type to use for the volume service."),
Jérôme Gallard86551ce2013-03-08 11:41:26 +0100552 cfg.StrOpt('backend1_name',
Giulio Fidentef4fa8942013-05-28 18:48:03 +0200553 default='BACKEND_1',
Jérôme Gallard86551ce2013-03-08 11:41:26 +0100554 help="Name of the backend1 (must be declared in cinder.conf)"),
555 cfg.StrOpt('backend2_name',
Giulio Fidentef4fa8942013-05-28 18:48:03 +0200556 default='BACKEND_2',
Jérôme Gallard86551ce2013-03-08 11:41:26 +0100557 help="Name of the backend2 (must be declared in cinder.conf)"),
Adam Gandelman827ad332013-06-24 17:04:09 -0700558 cfg.StrOpt('storage_protocol',
559 default='iSCSI',
560 help='Backend protocol to target when creating volume types'),
561 cfg.StrOpt('vendor_name',
562 default='Open Source',
563 help='Backend vendor to target when creating volume types'),
Ryan Hsua67f4632013-08-29 16:03:06 -0700564 cfg.StrOpt('disk_format',
565 default='raw',
566 help='Disk format to use when copying a volume to image'),
Jerry Cai9733d0e2014-03-19 15:50:49 +0800567 cfg.IntOpt('volume_size',
568 default=1,
569 help='Default size in GB for volumes created by volumes tests'),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500570]
K Jonathan Harkerd6ba4b42012-12-18 13:50:47 -0800571
Matthew Treinishd5c96022013-10-17 21:51:23 +0000572volume_feature_group = cfg.OptGroup(name='volume-feature-enabled',
573 title='Enabled Cinder Features')
574
575VolumeFeaturesGroup = [
576 cfg.BoolOpt('multi_backend',
577 default=False,
Matthew Treinishe3d26142013-11-26 19:14:58 +0000578 help="Runs Cinder multi-backend test (requires 2 backends)"),
Giulio Fidente74b08ad2014-01-18 04:02:51 +0100579 cfg.BoolOpt('backup',
580 default=True,
581 help='Runs Cinder volumes backup test'),
JordanPbce55532014-03-19 12:10:32 +0100582 cfg.BoolOpt('snapshot',
583 default=True,
584 help='Runs Cinder volume snapshot test'),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000585 cfg.ListOpt('api_extensions',
586 default=['all'],
Zhi Kun Liude25c022014-02-14 13:25:19 +0800587 help='A list of enabled volume extensions with a special '
Simeon Monov5d7effe2014-07-16 07:32:38 +0300588 'entry all which indicates every extension is enabled. '
589 'Empty list indicates all extensions are disabled'),
Zhi Kun Liubb363a22013-11-28 18:47:39 +0800590 cfg.BoolOpt('api_v1',
591 default=True,
592 help="Is the v1 volume API enabled"),
Zhi Kun Liu8cc3c842014-01-07 10:44:34 +0800593 cfg.BoolOpt('api_v2',
594 default=True,
595 help="Is the v2 volume API enabled"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000596]
597
Daryl Walleck587385b2012-03-03 13:00:26 -0600598
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500599object_storage_group = cfg.OptGroup(name='object-storage',
600 title='Object Storage Service Options')
Attila Fazekasa23f5002012-10-23 19:32:45 +0200601
DennyZhang1e71b612013-09-26 12:35:40 -0500602ObjectStoreGroup = [
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500603 cfg.StrOpt('catalog_type',
604 default='object-store',
605 help="Catalog type of the Object-Storage service."),
Arata Notsu8f440392013-09-13 16:14:20 +0900606 cfg.StrOpt('region',
607 default='',
608 help="The object-storage region name to use. If empty, the "
609 "value of identity.region is used instead. If no such "
610 "region is found in the service catalog, the first found "
611 "one is used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000612 cfg.StrOpt('endpoint_type',
613 default='publicURL',
614 choices=['public', 'admin', 'internal',
615 'publicURL', 'adminURL', 'internalURL'],
616 help="The endpoint type to use for the object-store service."),
Matthew Treinishf319a732013-10-24 21:39:24 +0000617 cfg.IntOpt('container_sync_timeout',
nayna-patelb4989b32013-01-09 06:25:13 +0000618 default=120,
Fabien Boucher2178d312013-12-31 15:38:57 +0100619 help="Number of seconds to time on waiting for a container "
nayna-patelb4989b32013-01-09 06:25:13 +0000620 "to container synchronization complete."),
Matthew Treinishf319a732013-10-24 21:39:24 +0000621 cfg.IntOpt('container_sync_interval',
nayna-patelb4989b32013-01-09 06:25:13 +0000622 default=5,
Fabien Boucher2178d312013-12-31 15:38:57 +0100623 help="Number of seconds to wait while looping to check the "
nayna-patelb4989b32013-01-09 06:25:13 +0000624 "status of a container to container synchronization"),
Matthew Treinish3fdb80c2013-08-15 11:13:19 -0400625 cfg.StrOpt('operator_role',
626 default='Member',
627 help="Role to add to users created for swift tests to "
628 "enable creating containers"),
Matthew Treinish998c91d2014-03-01 12:39:49 -0500629 cfg.StrOpt('reseller_admin_role',
630 default='ResellerAdmin',
631 help="User role that has reseller admin"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500632]
Attila Fazekasa23f5002012-10-23 19:32:45 +0200633
Matthew Treinishd5c96022013-10-17 21:51:23 +0000634object_storage_feature_group = cfg.OptGroup(
635 name='object-storage-feature-enabled',
636 title='Enabled object-storage features')
637
638ObjectStoreFeaturesGroup = [
Matthew Treinish20345382013-12-13 17:04:23 +0000639 cfg.ListOpt('discoverable_apis',
640 default=['all'],
641 help="A list of the enabled optional discoverable apis. "
642 "A single entry, all, indicates that all of these "
643 "features are expected to be enabled"),
Daisuke Morita20a183f2014-08-25 14:43:36 +0900644 cfg.BoolOpt('container_sync',
645 default=True,
646 help="Execute (old style) container-sync tests"),
647 cfg.BoolOpt('object_versioning',
648 default=True,
649 help="Execute object-versioning tests"),
650 cfg.BoolOpt('discoverability',
651 default=True,
652 help="Execute discoverability tests"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000653]
654
Nikhil Manchandadd6886f2014-03-03 01:58:45 -0800655database_group = cfg.OptGroup(name='database',
656 title='Database Service Options')
657
658DatabaseGroup = [
659 cfg.StrOpt('catalog_type',
660 default='database',
661 help="Catalog type of the Database service."),
662 cfg.StrOpt('db_flavor_ref',
663 default="1",
664 help="Valid primary flavor to use in database tests."),
Peter Stachowski320f9c72014-04-21 16:13:23 -0400665 cfg.StrOpt('db_current_version',
666 default="v1.0",
667 help="Current database version to use in database tests."),
Nikhil Manchandadd6886f2014-03-03 01:58:45 -0800668]
Attila Fazekasa23f5002012-10-23 19:32:45 +0200669
Steve Bakerc60e4e32013-05-06 15:22:41 +1200670orchestration_group = cfg.OptGroup(name='orchestration',
671 title='Orchestration Service Options')
672
673OrchestrationGroup = [
674 cfg.StrOpt('catalog_type',
675 default='orchestration',
676 help="Catalog type of the Orchestration service."),
Arata Notsu8f440392013-09-13 16:14:20 +0900677 cfg.StrOpt('region',
678 default='',
679 help="The orchestration region name to use. If empty, the "
680 "value of identity.region is used instead. If no such "
681 "region is found in the service catalog, the first found "
682 "one is used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000683 cfg.StrOpt('endpoint_type',
684 default='publicURL',
685 choices=['public', 'admin', 'internal',
686 'publicURL', 'adminURL', 'internalURL'],
687 help="The endpoint type to use for the orchestration service."),
Steve Bakerc60e4e32013-05-06 15:22:41 +1200688 cfg.IntOpt('build_interval',
689 default=1,
690 help="Time in seconds between build status checks."),
691 cfg.IntOpt('build_timeout',
Matthew Treinisha2dfd492014-04-15 11:15:34 -0400692 default=1200,
Steve Bakerc60e4e32013-05-06 15:22:41 +1200693 help="Timeout in seconds to wait for a stack to build."),
Steve Bakerc60e4e32013-05-06 15:22:41 +1200694 cfg.StrOpt('instance_type',
Steve Baker9e86b832013-05-22 15:40:28 +1200695 default='m1.micro',
Steve Bakerc60e4e32013-05-06 15:22:41 +1200696 help="Instance type for tests. Needs to be big enough for a "
697 "full OS plus the test workload"),
698 cfg.StrOpt('image_ref',
Steve Bakerc60e4e32013-05-06 15:22:41 +1200699 help="Name of heat-cfntools enabled image to use when "
700 "launching test instances."),
701 cfg.StrOpt('keypair_name',
Steve Bakerc60e4e32013-05-06 15:22:41 +1200702 help="Name of existing keypair to launch servers with."),
Clint Byrum71f27632013-09-09 11:41:32 -0700703 cfg.IntOpt('max_template_size',
Joe Gordon0e51b222013-10-24 14:11:10 +0100704 default=524288,
Clint Byrum71f27632013-09-09 11:41:32 -0700705 help="Value must match heat configuration of the same name."),
Steven Hardyfdc6bd72014-03-21 16:56:04 +0000706 cfg.IntOpt('max_resources_per_stack',
707 default=1000,
708 help="Value must match heat configuration of the same name."),
Steve Bakerc60e4e32013-05-06 15:22:41 +1200709]
710
711
Yassine Lamgarchalb158d412013-12-27 19:29:42 +0100712telemetry_group = cfg.OptGroup(name='telemetry',
713 title='Telemetry Service Options')
714
715TelemetryGroup = [
716 cfg.StrOpt('catalog_type',
717 default='metering',
718 help="Catalog type of the Telemetry service."),
JordanPfc62c902014-02-26 14:47:28 +0000719 cfg.StrOpt('endpoint_type',
720 default='publicURL',
721 choices=['public', 'admin', 'internal',
722 'publicURL', 'adminURL', 'internalURL'],
723 help="The endpoint type to use for the telemetry service."),
Vadim Rovachev7bcea352013-12-26 15:56:17 +0400724 cfg.BoolOpt('too_slow_to_test',
725 default=True,
726 help="This variable is used as flag to enable "
727 "notification tests")
Yassine Lamgarchalb158d412013-12-27 19:29:42 +0100728]
729
730
Julie Pichond1017642013-07-24 16:37:23 +0100731dashboard_group = cfg.OptGroup(name="dashboard",
732 title="Dashboard options")
733
734DashboardGroup = [
735 cfg.StrOpt('dashboard_url',
736 default='http://localhost/',
737 help="Where the dashboard can be found"),
738 cfg.StrOpt('login_url',
739 default='http://localhost/auth/login/',
740 help="Login page for the dashboard"),
741]
742
743
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +0400744data_processing_group = cfg.OptGroup(name="data_processing",
745 title="Data Processing options")
746
747DataProcessingGroup = [
748 cfg.StrOpt('catalog_type',
749 default='data_processing',
JordanPfc62c902014-02-26 14:47:28 +0000750 help="Catalog type of the data processing service."),
751 cfg.StrOpt('endpoint_type',
752 default='publicURL',
753 choices=['public', 'admin', 'internal',
754 'publicURL', 'adminURL', 'internalURL'],
755 help="The endpoint type to use for the data processing "
756 "service."),
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +0400757]
758
759
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500760boto_group = cfg.OptGroup(name='boto',
761 title='EC2/S3 options')
DennyZhang1e71b612013-09-26 12:35:40 -0500762BotoGroup = [
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500763 cfg.StrOpt('ec2_url',
764 default="http://localhost:8773/services/Cloud",
765 help="EC2 URL"),
766 cfg.StrOpt('s3_url',
767 default="http://localhost:8080",
768 help="S3 URL"),
769 cfg.StrOpt('aws_secret',
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500770 help="AWS Secret Key",
771 secret=True),
772 cfg.StrOpt('aws_access',
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500773 help="AWS Access Key"),
Attila Fazekas27dd92e2014-02-21 14:49:40 +0100774 cfg.StrOpt('aws_zone',
775 default="nova",
776 help="AWS Zone for EC2 tests"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500777 cfg.StrOpt('s3_materials_path',
778 default="/opt/stack/devstack/files/images/"
779 "s3-materials/cirros-0.3.0",
780 help="S3 Materials Path"),
781 cfg.StrOpt('ari_manifest',
782 default="cirros-0.3.0-x86_64-initrd.manifest.xml",
783 help="ARI Ramdisk Image manifest"),
784 cfg.StrOpt('ami_manifest',
785 default="cirros-0.3.0-x86_64-blank.img.manifest.xml",
786 help="AMI Machine Image manifest"),
787 cfg.StrOpt('aki_manifest',
788 default="cirros-0.3.0-x86_64-vmlinuz.manifest.xml",
789 help="AKI Kernel Image manifest"),
790 cfg.StrOpt('instance_type',
791 default="m1.tiny",
792 help="Instance type"),
793 cfg.IntOpt('http_socket_timeout',
794 default=3,
795 help="boto Http socket timeout"),
796 cfg.IntOpt('num_retries',
797 default=1,
798 help="boto num_retries on error"),
799 cfg.IntOpt('build_timeout',
800 default=60,
801 help="Status Change Timeout"),
802 cfg.IntOpt('build_interval',
803 default=1,
804 help="Status Change Test Interval"),
805]
Attila Fazekasf7f2d932012-12-13 09:14:38 +0100806
Matthew Treinish615ea6a2013-02-25 17:26:59 -0500807stress_group = cfg.OptGroup(name='stress', title='Stress Test Options')
808
809StressGroup = [
810 cfg.StrOpt('nova_logdir',
Matthew Treinish615ea6a2013-02-25 17:26:59 -0500811 help='Directory containing log files on the compute nodes'),
812 cfg.IntOpt('max_instances',
813 default=16,
814 help='Maximum number of instances to create during test.'),
815 cfg.StrOpt('controller',
David Kranzb9d97502013-05-01 15:55:04 -0400816 help='Controller host.'),
817 # new stress options
818 cfg.StrOpt('target_controller',
David Kranzb9d97502013-05-01 15:55:04 -0400819 help='Controller host.'),
820 cfg.StrOpt('target_ssh_user',
David Kranzb9d97502013-05-01 15:55:04 -0400821 help='ssh user.'),
822 cfg.StrOpt('target_private_key_path',
David Kranzb9d97502013-05-01 15:55:04 -0400823 help='Path to private key.'),
824 cfg.StrOpt('target_logfiles',
David Kranzb9d97502013-05-01 15:55:04 -0400825 help='regexp for list of log files.'),
Matthew Treinishf319a732013-10-24 21:39:24 +0000826 cfg.IntOpt('log_check_interval',
David Kranzb9d97502013-05-01 15:55:04 -0400827 default=60,
Marc Koderer32221b8e2013-08-23 13:57:50 +0200828 help='time (in seconds) between log file error checks.'),
Matthew Treinishf319a732013-10-24 21:39:24 +0000829 cfg.IntOpt('default_thread_number_per_action',
Marc Koderer32221b8e2013-08-23 13:57:50 +0200830 default=4,
Julien Leloup04d40f72014-01-28 11:17:18 +0100831 help='The number of threads created while stress test.'),
832 cfg.BoolOpt('leave_dirty_stack',
833 default=False,
834 help='Prevent the cleaning (tearDownClass()) between'
835 ' each stress test run if an exception occurs'
Julien Leloupa5ee5422014-02-13 14:29:02 +0100836 ' during this run.'),
837 cfg.BoolOpt('full_clean_stack',
838 default=False,
839 help='Allows a full cleaning process after a stress test.'
840 ' Caution : this cleanup will remove every objects of'
841 ' every tenant.')
Matthew Treinish615ea6a2013-02-25 17:26:59 -0500842]
843
844
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +0900845scenario_group = cfg.OptGroup(name='scenario', title='Scenario Test Options')
846
847ScenarioGroup = [
848 cfg.StrOpt('img_dir',
849 default='/opt/stack/new/devstack/files/images/'
850 'cirros-0.3.1-x86_64-uec',
851 help='Directory containing image files'),
Alessandro Pilottib7c1daa2014-08-16 14:24:13 +0300852 cfg.StrOpt('img_file', deprecated_name='qcow2_img_file',
Masayuki Igawa4f71bf02014-02-21 14:02:29 +0900853 default='cirros-0.3.1-x86_64-disk.img',
Alessandro Pilottib7c1daa2014-08-16 14:24:13 +0300854 help='Image file name'),
855 cfg.StrOpt('img_disk_format',
856 default='qcow2',
857 help='Image disk format'),
858 cfg.StrOpt('img_container_format',
859 default='bare',
860 help='Image container format'),
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +0900861 cfg.StrOpt('ami_img_file',
862 default='cirros-0.3.1-x86_64-blank.img',
863 help='AMI image file name'),
864 cfg.StrOpt('ari_img_file',
865 default='cirros-0.3.1-x86_64-initrd',
866 help='ARI image file name'),
867 cfg.StrOpt('aki_img_file',
868 default='cirros-0.3.1-x86_64-vmlinuz',
869 help='AKI image file name'),
870 cfg.StrOpt('ssh_user',
871 default='cirros',
Joe Gordonb5e10cd2013-07-10 15:51:12 +0000872 help='ssh username for the image file'),
873 cfg.IntOpt(
874 'large_ops_number',
875 default=0,
876 help="specifies how many resources to request at once. Used "
877 "for large operations testing.")
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +0900878]
879
880
Matthew Treinish4c412922013-07-16 15:27:42 -0400881service_available_group = cfg.OptGroup(name="service_available",
882 title="Available OpenStack Services")
883
884ServiceAvailableGroup = [
885 cfg.BoolOpt('cinder',
886 default=True,
887 help="Whether or not cinder is expected to be available"),
Matthew Treinishfaa340d2013-07-19 16:26:21 -0400888 cfg.BoolOpt('neutron',
889 default=False,
890 help="Whether or not neutron is expected to be available"),
Matthew Treinish853ae442013-07-19 16:36:07 -0400891 cfg.BoolOpt('glance',
892 default=True,
893 help="Whether or not glance is expected to be available"),
Matthew Treinish61e332b2013-07-19 16:42:31 -0400894 cfg.BoolOpt('swift',
895 default=True,
896 help="Whether or not swift is expected to be available"),
Matthew Treinish6b41e242013-07-19 16:49:28 -0400897 cfg.BoolOpt('nova',
898 default=True,
899 help="Whether or not nova is expected to be available"),
Matthew Treinisha9d43882013-07-19 16:54:52 -0400900 cfg.BoolOpt('heat',
901 default=False,
902 help="Whether or not Heat is expected to be available"),
Mehdi Abaakouk8581c0b2013-10-04 10:45:42 +0200903 cfg.BoolOpt('ceilometer',
904 default=True,
905 help="Whether or not Ceilometer is expected to be available"),
Julie Pichond1017642013-07-24 16:37:23 +0100906 cfg.BoolOpt('horizon',
907 default=True,
908 help="Whether or not Horizon is expected to be available"),
Sergey Lukjanov9c95a252014-03-13 23:59:22 +0400909 cfg.BoolOpt('sahara',
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +0400910 default=False,
Sergey Lukjanov9c95a252014-03-13 23:59:22 +0400911 help="Whether or not Sahara is expected to be available"),
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +0300912 cfg.BoolOpt('ironic',
913 default=False,
914 help="Whether or not Ironic is expected to be available"),
Nikhil Manchandadd6886f2014-03-03 01:58:45 -0800915 cfg.BoolOpt('trove',
916 default=False,
917 help="Whether or not Trove is expected to be available"),
Malini Kamalambal8681e922014-08-18 10:10:45 -0400918 cfg.BoolOpt('zaqar',
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500919 default=False,
Malini Kamalambal8681e922014-08-18 10:10:45 -0400920 help="Whether or not Zaqar is expected to be available"),
Matthew Treinish4c412922013-07-16 15:27:42 -0400921]
922
Attila Fazekasaeeeefd2013-08-06 17:01:56 +0200923debug_group = cfg.OptGroup(name="debug",
924 title="Debug System")
925
926DebugGroup = [
927 cfg.BoolOpt('enable',
928 default=True,
929 help="Enable diagnostic commands"),
Sean Daguec522c092014-03-24 10:43:22 -0400930 cfg.StrOpt('trace_requests',
931 default='',
932 help="""A regex to determine which requests should be traced.
933
934This is a regex to match the caller for rest client requests to be able to
935selectively trace calls out of specific classes and methods. It largely
936exists for test development, and is not expected to be used in a real deploy
937of tempest. This will be matched against the discovered ClassName:method
938in the test environment.
939
940Expected values for this field are:
941
942 * ClassName:test_method_name - traces one test_method
943 * ClassName:setUp(Class) - traces specific setup functions
944 * ClassName:tearDown(Class) - traces specific teardown functions
945 * ClassName:_run_cleanups - traces the cleanup functions
946
947If nothing is specified, this feature is not enabled. To trace everything
948specify .* as the regex.
949""")
Attila Fazekasaeeeefd2013-08-06 17:01:56 +0200950]
951
Andrea Frittolif5da28b2013-12-06 07:08:07 +0000952input_scenario_group = cfg.OptGroup(name="input-scenario",
953 title="Filters and values for"
954 " input scenarios")
955
956InputScenarioGroup = [
957 cfg.StrOpt('image_regex',
958 default='^cirros-0.3.1-x86_64-uec$',
959 help="Matching images become parameters for scenario tests"),
960 cfg.StrOpt('flavor_regex',
Andrea Frittoli99901c02014-01-30 18:06:49 +0000961 default='^m1.nano$',
Andrea Frittolif5da28b2013-12-06 07:08:07 +0000962 help="Matching flavors become parameters for scenario tests"),
963 cfg.StrOpt('non_ssh_image_regex',
964 default='^.*[Ww]in.*$',
965 help="SSH verification in tests is skipped"
966 "for matching images"),
967 cfg.StrOpt('ssh_user_regex',
968 default="[[\"^.*[Cc]irros.*$\", \"root\"]]",
969 help="List of user mapped to regex "
970 "to matching image names."),
971]
972
Attila Fazekasaeeeefd2013-08-06 17:01:56 +0200973
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +0300974baremetal_group = cfg.OptGroup(name='baremetal',
975 title='Baremetal provisioning service options')
976
977BaremetalGroup = [
978 cfg.StrOpt('catalog_type',
979 default='baremetal',
Adam Gandelman4a48a602014-03-20 18:23:18 -0700980 help="Catalog type of the baremetal provisioning service"),
981 cfg.BoolOpt('driver_enabled',
982 default=False,
983 help="Whether the Ironic nova-compute driver is enabled"),
Yuiko Takada1ee1b322014-07-04 09:55:30 +0900984 cfg.StrOpt('driver',
985 default='fake',
986 help="Driver name which Ironic uses"),
JordanPfc62c902014-02-26 14:47:28 +0000987 cfg.StrOpt('endpoint_type',
988 default='publicURL',
989 choices=['public', 'admin', 'internal',
990 'publicURL', 'adminURL', 'internalURL'],
991 help="The endpoint type to use for the baremetal provisioning "
Adam Gandelman4a48a602014-03-20 18:23:18 -0700992 "service"),
993 cfg.IntOpt('active_timeout',
994 default=300,
995 help="Timeout for Ironic node to completely provision"),
996 cfg.IntOpt('association_timeout',
Adam Gandelmane42f0922014-06-10 15:26:37 -0700997 default=30,
Adam Gandelman4a48a602014-03-20 18:23:18 -0700998 help="Timeout for association of Nova instance and Ironic "
999 "node"),
1000 cfg.IntOpt('power_timeout',
Adam Gandelmane42f0922014-06-10 15:26:37 -07001001 default=60,
Adam Gandelman4a48a602014-03-20 18:23:18 -07001002 help="Timeout for Ironic power transitions."),
1003 cfg.IntOpt('unprovision_timeout',
Adam Gandelmane42f0922014-06-10 15:26:37 -07001004 default=60,
Adam Gandelman4a48a602014-03-20 18:23:18 -07001005 help="Timeout for unprovisioning an Ironic node.")
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +03001006]
1007
Matthew Treinishe2b56b52014-01-29 19:25:50 +00001008cli_group = cfg.OptGroup(name='cli', title="cli Configuration Options")
1009
1010CLIGroup = [
1011 cfg.BoolOpt('enabled',
1012 default=True,
1013 help="enable cli tests"),
1014 cfg.StrOpt('cli_dir',
1015 default='/usr/local/bin',
1016 help="directory where python client binaries are located"),
Sean Dague44b24682014-02-20 19:08:24 -05001017 cfg.BoolOpt('has_manage',
1018 default=True,
1019 help=("Whether the tempest run location has access to the "
1020 "*-manage commands. In a pure blackbox environment "
1021 "it will not.")),
Matthew Treinishe2b56b52014-01-29 19:25:50 +00001022 cfg.IntOpt('timeout',
1023 default=15,
1024 help="Number of seconds to wait on a CLI timeout"),
1025]
1026
Marc Koderer6ee82dc2014-02-17 10:26:29 +01001027negative_group = cfg.OptGroup(name='negative', title="Negative Test Options")
1028
1029NegativeGroup = [
1030 cfg.StrOpt('test_generator',
1031 default='tempest.common.' +
1032 'generator.negative_generator.NegativeTestGenerator',
1033 help="Test generator class for all negative tests"),
1034]
1035
Jon Grimm270bd7f2014-08-05 18:11:29 +00001036_opts = [
1037 (auth_group, AuthGroup),
1038 (compute_group, ComputeGroup),
1039 (compute_features_group, ComputeFeaturesGroup),
1040 (identity_group, IdentityGroup),
1041 (identity_feature_group, IdentityFeatureGroup),
1042 (image_group, ImageGroup),
1043 (image_feature_group, ImageFeaturesGroup),
1044 (network_group, NetworkGroup),
1045 (network_feature_group, NetworkFeaturesGroup),
1046 (messaging_group, MessagingGroup),
1047 (volume_group, VolumeGroup),
1048 (volume_feature_group, VolumeFeaturesGroup),
1049 (object_storage_group, ObjectStoreGroup),
1050 (object_storage_feature_group, ObjectStoreFeaturesGroup),
1051 (database_group, DatabaseGroup),
1052 (orchestration_group, OrchestrationGroup),
1053 (telemetry_group, TelemetryGroup),
1054 (dashboard_group, DashboardGroup),
1055 (data_processing_group, DataProcessingGroup),
1056 (boto_group, BotoGroup),
1057 (compute_admin_group, ComputeAdminGroup),
1058 (stress_group, StressGroup),
1059 (scenario_group, ScenarioGroup),
1060 (service_available_group, ServiceAvailableGroup),
1061 (debug_group, DebugGroup),
1062 (baremetal_group, BaremetalGroup),
1063 (input_scenario_group, InputScenarioGroup),
1064 (cli_group, CLIGroup),
1065 (negative_group, NegativeGroup)
1066]
1067
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +03001068
Matthew Treinish43b296a2014-02-28 15:23:00 -05001069def register_opts():
Jon Grimm270bd7f2014-08-05 18:11:29 +00001070 for g, o in _opts:
1071 register_opt_group(cfg.CONF, g, o)
1072
1073
1074def list_opts():
1075 """Return a list of oslo.config options available.
1076
1077 The purpose of this is to allow tools like the Oslo sample config file
1078 generator to discover the options exposed to users.
1079 """
1080 optlist = [(g.name, o) for g, o in _opts]
1081
1082 # NOTE(jgrimm): Can be removed once oslo-incubator/oslo changes happen.
1083 optlist.append((None, lockutils.util_opts))
1084 optlist.append((None, logging.common_cli_opts))
1085 optlist.append((None, logging.logging_cli_opts))
1086 optlist.append((None, logging.generic_log_opts))
1087 optlist.append((None, logging.log_opts))
1088
1089 return optlist
Matthew Treinish43b296a2014-02-28 15:23:00 -05001090
1091
Sean Dague3b9b1f32013-12-20 17:04:54 -05001092# this should never be called outside of this class
1093class TempestConfigPrivate(object):
Daryl Walleck1465d612011-11-02 02:22:15 -05001094 """Provides OpenStack configuration information."""
1095
Brian Waldon738cd632011-12-12 18:45:09 -05001096 DEFAULT_CONFIG_DIR = os.path.join(
Zhongyue Luoa1343de2013-01-04 16:21:35 +08001097 os.path.abspath(os.path.dirname(os.path.dirname(__file__))),
Brian Waldon738cd632011-12-12 18:45:09 -05001098 "etc")
Daryl Walleck1465d612011-11-02 02:22:15 -05001099
Brian Waldon738cd632011-12-12 18:45:09 -05001100 DEFAULT_CONFIG_FILE = "tempest.conf"
1101
Andrea Frittolia96ee212014-08-15 18:34:20 +01001102 def __getattr__(self, attr):
1103 # Handles config options from the default group
1104 return getattr(cfg.CONF, attr)
1105
Matthew Treinish43b296a2014-02-28 15:23:00 -05001106 def _set_attrs(self):
Matthew Treinishc791ac42014-07-16 09:15:23 -04001107 self.auth = cfg.CONF.auth
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001108 self.compute = cfg.CONF.compute
Matthew Treinishd5c96022013-10-17 21:51:23 +00001109 self.compute_feature_enabled = cfg.CONF['compute-feature-enabled']
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001110 self.identity = cfg.CONF.identity
Matthew Treinishd5021a72014-01-09 18:42:51 +00001111 self.identity_feature_enabled = cfg.CONF['identity-feature-enabled']
Matt Riedemannd3efe902014-02-10 06:46:38 -08001112 self.image = cfg.CONF.image
Matthew Treinish2b5287d2013-10-22 17:40:34 +00001113 self.image_feature_enabled = cfg.CONF['image-feature-enabled']
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001114 self.network = cfg.CONF.network
Matthew Treinishe3d26142013-11-26 19:14:58 +00001115 self.network_feature_enabled = cfg.CONF['network-feature-enabled']
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001116 self.volume = cfg.CONF.volume
Matthew Treinishd5c96022013-10-17 21:51:23 +00001117 self.volume_feature_enabled = cfg.CONF['volume-feature-enabled']
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001118 self.object_storage = cfg.CONF['object-storage']
Matthew Treinishd5c96022013-10-17 21:51:23 +00001119 self.object_storage_feature_enabled = cfg.CONF[
1120 'object-storage-feature-enabled']
Nikhil Manchandadd6886f2014-03-03 01:58:45 -08001121 self.database = cfg.CONF.database
Steve Bakerc60e4e32013-05-06 15:22:41 +12001122 self.orchestration = cfg.CONF.orchestration
Victoria Martínez de la Cruz1173b6e2014-09-22 18:32:13 -03001123 self.messaging = cfg.CONF.messaging
Yassine Lamgarchalb158d412013-12-27 19:29:42 +01001124 self.telemetry = cfg.CONF.telemetry
Julie Pichond1017642013-07-24 16:37:23 +01001125 self.dashboard = cfg.CONF.dashboard
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +04001126 self.data_processing = cfg.CONF.data_processing
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001127 self.boto = cfg.CONF.boto
Attila Fazekascadcb1f2013-01-21 23:10:53 +01001128 self.compute_admin = cfg.CONF['compute-admin']
Matthew Treinish615ea6a2013-02-25 17:26:59 -05001129 self.stress = cfg.CONF.stress
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +09001130 self.scenario = cfg.CONF.scenario
Matthew Treinish4c412922013-07-16 15:27:42 -04001131 self.service_available = cfg.CONF.service_available
Attila Fazekas5fae7a32013-09-25 16:52:44 +02001132 self.debug = cfg.CONF.debug
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +03001133 self.baremetal = cfg.CONF.baremetal
Andrea Frittolif5da28b2013-12-06 07:08:07 +00001134 self.input_scenario = cfg.CONF['input-scenario']
Matthew Treinishe2b56b52014-01-29 19:25:50 +00001135 self.cli = cfg.CONF.cli
Marc Koderer6ee82dc2014-02-17 10:26:29 +01001136 self.negative = cfg.CONF.negative
Attila Fazekascadcb1f2013-01-21 23:10:53 +01001137 if not self.compute_admin.username:
1138 self.compute_admin.username = self.identity.admin_username
1139 self.compute_admin.password = self.identity.admin_password
1140 self.compute_admin.tenant_name = self.identity.admin_tenant_name
Andrea Frittolib1b04bb2014-04-06 11:57:07 +01001141 cfg.CONF.set_default('domain_name', self.identity.admin_domain_name,
1142 group='identity')
1143 cfg.CONF.set_default('alt_domain_name',
1144 self.identity.admin_domain_name,
1145 group='identity')
1146 cfg.CONF.set_default('domain_name', self.identity.admin_domain_name,
1147 group='compute-admin')
Sean Dague86bd8422013-12-20 09:56:44 -05001148
Joe Gordon28a84ae2014-07-17 15:38:28 +00001149 def __init__(self, parse_conf=True, config_path=None):
Matthew Treinish43b296a2014-02-28 15:23:00 -05001150 """Initialize a configuration from a conf directory and conf file."""
1151 super(TempestConfigPrivate, self).__init__()
1152 config_files = []
1153 failsafe_path = "/etc/tempest/" + self.DEFAULT_CONFIG_FILE
1154
Joe Gordon28a84ae2014-07-17 15:38:28 +00001155 if config_path:
1156 path = config_path
1157 else:
1158 # Environment variables override defaults...
1159 conf_dir = os.environ.get('TEMPEST_CONFIG_DIR',
1160 self.DEFAULT_CONFIG_DIR)
1161 conf_file = os.environ.get('TEMPEST_CONFIG',
1162 self.DEFAULT_CONFIG_FILE)
Matthew Treinish43b296a2014-02-28 15:23:00 -05001163
Joe Gordon28a84ae2014-07-17 15:38:28 +00001164 path = os.path.join(conf_dir, conf_file)
Matthew Treinish43b296a2014-02-28 15:23:00 -05001165
1166 if not os.path.isfile(path):
1167 path = failsafe_path
1168
1169 # only parse the config file if we expect one to exist. This is needed
1170 # to remove an issue with the config file up to date checker.
1171 if parse_conf:
1172 config_files.append(path)
Matthew Treinish5440a402014-10-02 14:36:16 -04001173 if os.path.isfile(path):
1174 cfg.CONF([], project='tempest', default_config_files=config_files)
1175 else:
1176 cfg.CONF([], project='tempest')
Matthew Treinish43b296a2014-02-28 15:23:00 -05001177 logging.setup('tempest')
1178 LOG = logging.getLogger('tempest')
1179 LOG.info("Using tempest config file %s" % path)
1180 register_opts()
1181 self._set_attrs()
Masayuki Igawa9ec4cd82014-02-05 15:04:16 +09001182 if parse_conf:
1183 cfg.CONF.log_opt_values(LOG, std_logging.DEBUG)
1184
Sean Dague86bd8422013-12-20 09:56:44 -05001185
1186class TempestConfigProxy(object):
1187 _config = None
Joe Gordon28a84ae2014-07-17 15:38:28 +00001188 _path = None
Sean Dague86bd8422013-12-20 09:56:44 -05001189
Sean Daguedb6ac6c2014-06-06 16:52:44 -04001190 _extra_log_defaults = [
1191 'keystoneclient.session=INFO',
1192 'paramiko.transport=INFO',
1193 'requests.packages.urllib3.connectionpool=WARN'
1194 ]
1195
1196 def _fix_log_levels(self):
1197 """Tweak the oslo log defaults."""
1198 for opt in logging.log_opts:
1199 if opt.dest == 'default_log_levels':
1200 opt.default.extend(self._extra_log_defaults)
1201
Sean Dague86bd8422013-12-20 09:56:44 -05001202 def __getattr__(self, attr):
1203 if not self._config:
Sean Daguedb6ac6c2014-06-06 16:52:44 -04001204 self._fix_log_levels()
Joe Gordon28a84ae2014-07-17 15:38:28 +00001205 self._config = TempestConfigPrivate(config_path=self._path)
Sean Dague86bd8422013-12-20 09:56:44 -05001206
1207 return getattr(self._config, attr)
1208
Joe Gordon28a84ae2014-07-17 15:38:28 +00001209 def set_config_path(self, path):
1210 self._path = path
1211
Sean Dague86bd8422013-12-20 09:56:44 -05001212
1213CONF = TempestConfigProxy()