blob: 6bd4755e67a3029bb1a63c1031d87eb9d808ece8 [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 Treinishc791ac42014-07-16 09:15:23 -040032auth_group = cfg.OptGroup(name='auth',
33 title="Options for authentication and credentials")
34
35
36AuthGroup = [
37 cfg.StrOpt('test_accounts_file',
38 default='etc/accounts.yaml',
39 help="Path to the yaml file that contains the list of "
40 "credentials to use for running tests"),
Andrea Frittoli8283b4e2014-07-17 13:28:58 +010041 cfg.BoolOpt('allow_tenant_isolation',
42 default=False,
43 help="Allows test cases to create/destroy tenants and "
44 "users. This option requires that OpenStack Identity "
45 "API admin credentials are known. If false, isolated "
46 "test cases and parallel execution, can still be "
47 "achieved configuring a list of test accounts",
48 deprecated_opts=[cfg.DeprecatedOpt('allow_tenant_isolation',
49 group='compute'),
50 cfg.DeprecatedOpt('allow_tenant_isolation',
51 group='orchestration')]),
52 cfg.BoolOpt('locking_credentials_provider',
53 default=False,
54 help="If set to True it enables the Accounts provider, "
55 "which locks credentials to allow for parallel execution "
56 "with pre-provisioned accounts. It can only be used to "
57 "run tests that ensure credentials cleanup happens. "
58 "It requires at least `2 * CONC` distinct accounts "
59 "configured in `test_accounts_file`, with CONC == the "
60 "number of concurrent test processes."),
Matthew Treinishc791ac42014-07-16 09:15:23 -040061]
62
Matthew Treinish39e48ef2012-12-21 13:36:15 -050063identity_group = cfg.OptGroup(name='identity',
64 title="Keystone Configuration Options")
Daryl Walleck1465d612011-11-02 02:22:15 -050065
Matthew Treinish39e48ef2012-12-21 13:36:15 -050066IdentityGroup = [
67 cfg.StrOpt('catalog_type',
68 default='identity',
69 help="Catalog type of the Identity service."),
Jay Pipescd8eaec2013-01-16 21:03:48 -050070 cfg.BoolOpt('disable_ssl_certificate_validation',
71 default=False,
72 help="Set to True if using self-signed SSL certificates."),
Jay Pipes7c88eb22013-01-16 21:32:43 -050073 cfg.StrOpt('uri',
Brant Knudsonc7ca3342013-03-28 21:08:50 -050074 help="Full URI of the OpenStack Identity API (Keystone), v2"),
75 cfg.StrOpt('uri_v3',
76 help='Full URI of the OpenStack Identity API (Keystone), v3'),
Andrea Frittoli8bbdb162014-01-06 11:06:13 +000077 cfg.StrOpt('auth_version',
78 default='v2',
79 help="Identity API version to be used for authentication "
Andrea Frittoli77f9da42014-02-06 11:18:19 +000080 "for API tests."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -050081 cfg.StrOpt('region',
Attila Fazekascadcb1f2013-01-21 23:10:53 +010082 default='RegionOne',
Arata Notsu8f440392013-09-13 16:14:20 +090083 help="The identity region name to use. Also used as the other "
84 "services' region name unless they are set explicitly. "
85 "If no such region is found in the service catalog, the "
86 "first found one is used."),
JordanP5d29b2c2013-12-18 13:56:03 +000087 cfg.StrOpt('endpoint_type',
88 default='publicURL',
89 choices=['public', 'admin', 'internal',
90 'publicURL', 'adminURL', 'internalURL'],
91 help="The endpoint type to use for the identity service."),
Attila Fazekascadcb1f2013-01-21 23:10:53 +010092 cfg.StrOpt('username',
Attila Fazekascadcb1f2013-01-21 23:10:53 +010093 help="Username to use for Nova API requests."),
94 cfg.StrOpt('tenant_name',
Attila Fazekascadcb1f2013-01-21 23:10:53 +010095 help="Tenant name to use for Nova API requests."),
Russell Sim7f894a52013-09-13 10:35:21 +100096 cfg.StrOpt('admin_role',
97 default='admin',
98 help="Role required to administrate keystone."),
Attila Fazekascadcb1f2013-01-21 23:10:53 +010099 cfg.StrOpt('password',
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100100 help="API key to use when authenticating.",
101 secret=True),
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100102 cfg.StrOpt('domain_name',
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100103 help="Domain name for authentication (Keystone V3)."
104 "The same domain applies to user and project"),
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100105 cfg.StrOpt('alt_username',
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100106 help="Username of alternate user to use for Nova API "
107 "requests."),
108 cfg.StrOpt('alt_tenant_name',
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100109 help="Alternate user's Tenant name to use for Nova API "
110 "requests."),
111 cfg.StrOpt('alt_password',
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100112 help="API key to use when authenticating as alternate user.",
113 secret=True),
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100114 cfg.StrOpt('alt_domain_name',
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100115 help="Alternate domain name for authentication (Keystone V3)."
116 "The same domain applies to user and project"),
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100117 cfg.StrOpt('admin_username',
Dirk Mueller14bd5622014-01-14 19:33:05 +0100118 help="Administrative Username to use for "
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100119 "Keystone API requests."),
120 cfg.StrOpt('admin_tenant_name',
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100121 help="Administrative Tenant name to use for Keystone API "
122 "requests."),
123 cfg.StrOpt('admin_password',
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100124 help="API key to use when authenticating as admin.",
125 secret=True),
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100126 cfg.StrOpt('admin_domain_name',
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100127 help="Admin domain name for authentication (Keystone V3)."
128 "The same domain applies to user and project"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500129]
Jay Pipes3f981df2012-03-27 18:59:44 -0400130
Matthew Treinishd5021a72014-01-09 18:42:51 +0000131identity_feature_group = cfg.OptGroup(name='identity-feature-enabled',
132 title='Enabled Identity Features')
133
134IdentityFeatureGroup = [
135 cfg.BoolOpt('trust',
136 default=True,
137 help='Does the identity service have delegation and '
Matthew Treinishdb2c5972014-01-31 22:18:59 +0000138 'impersonation enabled'),
139 cfg.BoolOpt('api_v2',
140 default=True,
141 help='Is the v2 identity API enabled'),
142 cfg.BoolOpt('api_v3',
143 default=True,
144 help='Is the v3 identity API enabled'),
Matthew Treinishd5021a72014-01-09 18:42:51 +0000145]
146
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500147compute_group = cfg.OptGroup(name='compute',
148 title='Compute Service Options')
Rohit Karajgie1b050d2011-12-02 16:13:18 -0800149
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500150ComputeGroup = [
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500151 cfg.StrOpt('image_ref',
Matthew Treinishafcb6b42014-05-27 13:50:02 -0400152 help="Valid primary image reference to be used in tests. "
153 "This is a required option"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500154 cfg.StrOpt('image_ref_alt',
Matthew Treinishafcb6b42014-05-27 13:50:02 -0400155 help="Valid secondary image reference to be used in tests. "
156 "This is a required option, but if only one image is "
157 "available duplicate the value of image_ref above"),
Ken'ichi Ohmichi35772602013-11-14 15:03:27 +0900158 cfg.StrOpt('flavor_ref',
159 default="1",
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500160 help="Valid primary flavor to use in tests."),
Ken'ichi Ohmichi35772602013-11-14 15:03:27 +0900161 cfg.StrOpt('flavor_ref_alt',
162 default="2",
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500163 help='Valid secondary flavor to be used in tests.'),
Maru Newbyaf292e82013-05-20 21:32:28 +0000164 cfg.StrOpt('image_ssh_user',
165 default="root",
166 help="User name used to authenticate to an instance."),
Ryan Hsucb2e1252013-09-03 21:44:49 -0700167 cfg.StrOpt('image_ssh_password',
168 default="password",
169 help="Password used to authenticate to an instance."),
Maru Newbyaf292e82013-05-20 21:32:28 +0000170 cfg.StrOpt('image_alt_ssh_user',
171 default="root",
172 help="User name used to authenticate to an instance using "
173 "the alternate image."),
Ryan Hsucb2e1252013-09-03 21:44:49 -0700174 cfg.StrOpt('image_alt_ssh_password',
175 default="password",
176 help="Password used to authenticate to an instance using "
177 "the alternate image."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500178 cfg.IntOpt('build_interval',
Sean Dague82190852014-05-24 07:42:59 -0400179 default=1,
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500180 help="Time in seconds between build status checks."),
181 cfg.IntOpt('build_timeout',
182 default=300,
183 help="Timeout in seconds to wait for an instance to build."),
184 cfg.BoolOpt('run_ssh',
185 default=False,
Derek Higgins85cd5142013-12-17 17:10:11 +0000186 help="Should the tests ssh to instances?"),
Attila Fazekas423834d2014-03-14 17:33:13 +0100187 cfg.StrOpt('ssh_auth_method',
188 default='keypair',
189 help="Auth method used for authenticate to the instance. "
190 "Valid choices are: keypair, configured, adminpass. "
191 "keypair: start the servers with an ssh keypair. "
192 "configured: use the configured user and password. "
193 "adminpass: use the injected adminPass. "
194 "disabled: avoid using ssh when it is an option."),
195 cfg.StrOpt('ssh_connect_method',
196 default='fixed',
197 help="How to connect to the instance? "
198 "fixed: using the first ip belongs the fixed network "
199 "floating: creating and using a floating ip"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500200 cfg.StrOpt('ssh_user',
201 default='root',
202 help="User name used to authenticate to an instance."),
Nachi Ueno6d580be2013-07-24 10:58:11 -0700203 cfg.IntOpt('ping_timeout',
Darragh O'Reilly6b636672014-01-24 12:17:40 +0000204 default=120,
Nachi Ueno6d580be2013-07-24 10:58:11 -0700205 help="Timeout in seconds to wait for ping to "
206 "succeed."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500207 cfg.IntOpt('ssh_timeout',
208 default=300,
Chris Yeoh76916042013-02-27 16:25:25 +1030209 help="Timeout in seconds to wait for authentication to "
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500210 "succeed."),
Attila Fazekas0abbc952013-07-01 19:19:42 +0200211 cfg.IntOpt('ready_wait',
212 default=0,
DennyZhang8912d012013-09-25 18:08:34 -0500213 help="Additional wait time for clean state, when there is "
214 "no OS-EXT-STS extension available"),
Chris Yeoh76916042013-02-27 16:25:25 +1030215 cfg.IntOpt('ssh_channel_timeout',
216 default=60,
217 help="Timeout in seconds to wait for output from ssh "
218 "channel."),
Attila Fazekasb0661652013-05-08 13:01:36 +0200219 cfg.StrOpt('fixed_network_name',
220 default='private',
221 help="Visible fixed network name "),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500222 cfg.StrOpt('network_for_ssh',
223 default='public',
224 help="Network used for SSH connections."),
225 cfg.IntOpt('ip_version_for_ssh',
226 default=4,
227 help="IP version used for SSH connections."),
fujioka yuuichia11994e2013-07-09 11:19:51 +0900228 cfg.BoolOpt('use_floatingip_for_ssh',
229 default=True,
Tushar Kalra95a482d2014-03-25 14:24:43 -0700230 help="Does SSH use Floating IPs?"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500231 cfg.StrOpt('catalog_type',
232 default='compute',
233 help="Catalog type of the Compute service."),
Arata Notsu8f440392013-09-13 16:14:20 +0900234 cfg.StrOpt('region',
235 default='',
236 help="The compute region name to use. If empty, the value "
237 "of identity.region is used instead. If no such region "
238 "is found in the service catalog, the first found one is "
239 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000240 cfg.StrOpt('endpoint_type',
241 default='publicURL',
242 choices=['public', 'admin', 'internal',
243 'publicURL', 'adminURL', 'internalURL'],
244 help="The endpoint type to use for the compute service."),
ivan-zhu8f992be2013-07-31 14:56:58 +0800245 cfg.StrOpt('catalog_v3_type',
246 default='computev3',
247 help="Catalog type of the Compute v3 service."),
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100248 cfg.StrOpt('path_to_private_key',
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100249 help="Path to a private key file for SSH access to remote "
250 "hosts"),
Ryan Hsucb2e1252013-09-03 21:44:49 -0700251 cfg.StrOpt('volume_device_name',
252 default='vdb',
253 help="Expected device name when a volume is attached to "
Ken'ichi Ohmichi39437e22013-10-06 00:21:38 +0900254 "an instance"),
255 cfg.IntOpt('shelved_offload_time',
256 default=0,
257 help='Time in seconds before a shelved instance is eligible '
258 'for removing from a host. -1 never offload, 0 offload '
259 'when shelved. This time should be the same as the time '
260 'of nova.conf, and some tests will run for as long as the '
Ghanshyam06a5b4a2014-04-11 17:32:45 +0900261 'time.'),
262 cfg.StrOpt('floating_ip_range',
263 default='10.0.0.0/29',
264 help='Unallocated floating IP range, which will be used to '
265 'test the floating IP bulk feature for CRUD operation.')
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500266]
Rohit Karajgie1b050d2011-12-02 16:13:18 -0800267
Matthew Treinishd5c96022013-10-17 21:51:23 +0000268compute_features_group = cfg.OptGroup(name='compute-feature-enabled',
269 title="Enabled Compute Service Features")
270
271ComputeFeaturesGroup = [
ivan-zhu8f992be2013-07-31 14:56:58 +0800272 cfg.BoolOpt('api_v3',
Matthew Treinish836e56b2014-06-12 13:55:19 -0400273 default=False,
ivan-zhu8f992be2013-07-31 14:56:58 +0800274 help="If false, skip all nova v3 tests."),
Matthew Treinish20866a22014-06-12 14:58:36 -0400275 cfg.BoolOpt('xml_api_v2',
276 default=True,
277 help="If false skip all v2 api tests with xml"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000278 cfg.BoolOpt('disk_config',
279 default=True,
280 help="If false, skip disk config tests"),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000281 cfg.ListOpt('api_extensions',
282 default=['all'],
Zhi Kun Liude25c022014-02-14 13:25:19 +0800283 help='A list of enabled compute extensions with a special '
Ken'ichi Ohmichia7e68712014-05-06 10:47:26 +0900284 'entry all which indicates every extension is enabled. '
Simeon Monov5d7effe2014-07-16 07:32:38 +0300285 'Each extension should be specified with alias name. '
286 'Empty list indicates all extensions are disabled'),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000287 cfg.ListOpt('api_v3_extensions',
288 default=['all'],
289 help='A list of enabled v3 extensions with a special entry all'
Ken'ichi Ohmichia7e68712014-05-06 10:47:26 +0900290 ' which indicates every extension is enabled. '
Simeon Monov5d7effe2014-07-16 07:32:38 +0300291 'Each extension should be specified with alias name. '
292 'Empty list indicates all extensions are disabled'),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000293 cfg.BoolOpt('change_password',
294 default=False,
295 help="Does the test environment support changing the admin "
296 "password?"),
Adam Gandelmanc6eefb42014-07-15 16:44:08 -0700297 cfg.BoolOpt('console_output',
298 default=True,
299 help="Does the test environment support obtaining instance "
300 "serial console output?"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000301 cfg.BoolOpt('resize',
302 default=False,
303 help="Does the test environment support resizing?"),
Eric Windischb5538072014-03-09 23:47:35 -0400304 cfg.BoolOpt('pause',
305 default=True,
306 help="Does the test environment support pausing?"),
David Shrewsbury25f666f2014-07-22 12:17:59 -0400307 cfg.BoolOpt('shelve',
308 default=True,
309 help="Does the test environment support shelving/unshelving?"),
Eric Windischaeb7e842014-03-10 01:10:50 -0400310 cfg.BoolOpt('suspend',
311 default=True,
312 help="Does the test environment support suspend/resume?"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000313 cfg.BoolOpt('live_migration',
314 default=False,
315 help="Does the test environment support live migration "
316 "available?"),
317 cfg.BoolOpt('block_migration_for_live_migration',
318 default=False,
319 help="Does the test environment use block devices for live "
320 "migration"),
321 cfg.BoolOpt('block_migrate_cinder_iscsi',
322 default=False,
323 help="Does the test environment block migration support "
Ghanshyam Mann41c17572014-02-27 18:52:56 +0900324 "cinder iSCSI volumes"),
325 cfg.BoolOpt('vnc_console',
326 default=False,
327 help='Enable VNC console. This configuration value should '
Ghanshyam70876d02014-03-11 11:40:18 +0900328 'be same as [nova.vnc]->vnc_enabled in nova.conf'),
329 cfg.BoolOpt('spice_console',
330 default=False,
331 help='Enable Spice console. This configuration value should '
332 'be same as [nova.spice]->enabled in nova.conf'),
333 cfg.BoolOpt('rdp_console',
334 default=False,
335 help='Enable RDP console. This configuration value should '
Adam Gandelman2e37b4f2014-06-18 17:34:21 -0700336 'be same as [nova.rdp]->enabled in nova.conf'),
337 cfg.BoolOpt('rescue',
338 default=True,
339 help='Does the test environment support instance rescue '
Ghanshyam9c2e50d2014-07-22 21:32:05 +0900340 'mode?'),
341 cfg.BoolOpt('enable_instance_password',
342 default=True,
343 help='Enables returning of the instance password by the '
344 'relevant server API calls such as create, rebuild '
Adam Gandelman7186f7a2014-07-23 09:28:56 -0400345 'or rescue.'),
346 cfg.BoolOpt('interface_attach',
347 default=True,
348 help='Does the test environment support dynamic network '
Adam Gandelmanfbc95ac2014-06-19 17:33:43 -0700349 'interface attachment?'),
350 cfg.BoolOpt('snapshot',
351 default=True,
352 help='Does the test environment support creating snapshot '
353 'images of running instances?')
Matthew Treinishd5c96022013-10-17 21:51:23 +0000354]
355
356
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500357compute_admin_group = cfg.OptGroup(name='compute-admin',
358 title="Compute Admin Options")
donald-ngo7fb1efa2011-12-13 17:17:36 -0800359
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500360ComputeAdminGroup = [
361 cfg.StrOpt('username',
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500362 help="Administrative Username to use for Nova API requests."),
363 cfg.StrOpt('tenant_name',
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500364 help="Administrative Tenant name to use for Nova API "
365 "requests."),
366 cfg.StrOpt('password',
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500367 help="API key to use when authenticating as admin.",
368 secret=True),
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100369 cfg.StrOpt('domain_name',
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100370 help="Domain name for authentication as admin (Keystone V3)."
371 "The same domain applies to user and project"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500372]
Daryl Walleck587385b2012-03-03 13:00:26 -0600373
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500374image_group = cfg.OptGroup(name='image',
375 title="Image Service Options")
Jay Pipesf38eaac2012-06-21 13:37:35 -0400376
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500377ImageGroup = [
Matthew Treinish72ea4422013-02-07 14:42:49 -0500378 cfg.StrOpt('catalog_type',
379 default='image',
Sean Dague83401992013-05-06 17:46:36 -0400380 help='Catalog type of the Image service.'),
Arata Notsu8f440392013-09-13 16:14:20 +0900381 cfg.StrOpt('region',
382 default='',
383 help="The image region name to use. If empty, the value "
384 "of identity.region is used instead. If no such region "
385 "is found in the service catalog, the first found one is "
386 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000387 cfg.StrOpt('endpoint_type',
388 default='publicURL',
389 choices=['public', 'admin', 'internal',
390 'publicURL', 'adminURL', 'internalURL'],
391 help="The endpoint type to use for the image service."),
Sean Dague83401992013-05-06 17:46:36 -0400392 cfg.StrOpt('http_image',
393 default='http://download.cirros-cloud.net/0.3.1/'
394 'cirros-0.3.1-x86_64-uec.tar.gz',
DennyZhang8912d012013-09-25 18:08:34 -0500395 help='http accessible image')
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500396]
Jay Pipesf38eaac2012-06-21 13:37:35 -0400397
Matthew Treinish2b5287d2013-10-22 17:40:34 +0000398image_feature_group = cfg.OptGroup(name='image-feature-enabled',
399 title='Enabled image service features')
400
401ImageFeaturesGroup = [
402 cfg.BoolOpt('api_v2',
403 default=True,
404 help="Is the v2 image API enabled"),
405 cfg.BoolOpt('api_v1',
406 default=True,
407 help="Is the v1 image API enabled"),
408]
Jay Pipesf38eaac2012-06-21 13:37:35 -0400409
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500410network_group = cfg.OptGroup(name='network',
411 title='Network Service Options')
Daryl Walleck587385b2012-03-03 13:00:26 -0600412
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500413NetworkGroup = [
414 cfg.StrOpt('catalog_type',
415 default='network',
Mark McClainf2982e82013-07-06 17:48:03 -0400416 help='Catalog type of the Neutron service.'),
Arata Notsu8f440392013-09-13 16:14:20 +0900417 cfg.StrOpt('region',
418 default='',
419 help="The network region name to use. If empty, the value "
420 "of identity.region is used instead. If no such region "
421 "is found in the service catalog, the first found one is "
422 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000423 cfg.StrOpt('endpoint_type',
424 default='publicURL',
425 choices=['public', 'admin', 'internal',
426 'publicURL', 'adminURL', 'internalURL'],
427 help="The endpoint type to use for the network service."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500428 cfg.StrOpt('tenant_network_cidr',
429 default="10.100.0.0/16",
Henry Gessauffda37a2014-01-16 11:17:55 -0500430 help="The cidr block to allocate tenant ipv4 subnets from"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500431 cfg.IntOpt('tenant_network_mask_bits',
Attila Fazekas8ea181b2013-07-13 16:26:14 +0200432 default=28,
Henry Gessauffda37a2014-01-16 11:17:55 -0500433 help="The mask bits for tenant ipv4 subnets"),
434 cfg.StrOpt('tenant_network_v6_cidr',
Sergey Shnaidman1f3659a2014-08-27 18:26:42 +0400435 default="2003::/48",
Henry Gessauffda37a2014-01-16 11:17:55 -0500436 help="The cidr block to allocate tenant ipv6 subnets from"),
437 cfg.IntOpt('tenant_network_v6_mask_bits',
Sergey Shnaidman1f3659a2014-08-27 18:26:42 +0400438 default=64,
Henry Gessauffda37a2014-01-16 11:17:55 -0500439 help="The mask bits for tenant ipv6 subnets"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500440 cfg.BoolOpt('tenant_networks_reachable',
441 default=False,
442 help="Whether tenant network connectivity should be "
443 "evaluated directly"),
444 cfg.StrOpt('public_network_id',
445 default="",
446 help="Id of the public network that provides external "
447 "connectivity"),
448 cfg.StrOpt('public_router_id',
449 default="",
450 help="Id of the public router that provides external "
451 "connectivity"),
izikpensod9a01a62014-02-17 20:02:32 +0200452 cfg.IntOpt('build_timeout',
453 default=300,
454 help="Timeout in seconds to wait for network operation to "
455 "complete."),
456 cfg.IntOpt('build_interval',
Sean Dague82190852014-05-24 07:42:59 -0400457 default=1,
izikpensod9a01a62014-02-17 20:02:32 +0200458 help="Time in seconds between network operation status "
459 "checks."),
Attila Fazekas640392b2014-06-12 15:58:10 +0200460 cfg.ListOpt('dns_servers',
461 default=["8.8.8.8", "8.8.4.4"],
462 help="List of dns servers whichs hould be used"
463 " for subnet creation")
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500464]
Jay Pipes3f981df2012-03-27 18:59:44 -0400465
Matthew Treinishe3d26142013-11-26 19:14:58 +0000466network_feature_group = cfg.OptGroup(name='network-feature-enabled',
467 title='Enabled network service features')
468
469NetworkFeaturesGroup = [
Matthew Treinishe2e33cf2014-03-03 19:28:41 +0000470 cfg.BoolOpt('ipv6',
471 default=True,
472 help="Allow the execution of IPv6 tests"),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000473 cfg.ListOpt('api_extensions',
474 default=['all'],
Zhi Kun Liude25c022014-02-14 13:25:19 +0800475 help='A list of enabled network extensions with a special '
Simeon Monov5d7effe2014-07-16 07:32:38 +0300476 'entry all which indicates every extension is enabled. '
477 'Empty list indicates all extensions are disabled'),
Sean M. Collinsdd27a4d2014-05-13 10:33:15 -0400478 cfg.BoolOpt('ipv6_subnet_attributes',
479 default=False,
480 help="Allow the execution of IPv6 subnet tests that use "
481 "the extended IPv6 attributes ipv6_ra_mode "
482 "and ipv6_address_mode"
483 )
Matthew Treinishe3d26142013-11-26 19:14:58 +0000484]
485
Victoria Martínez de la Cruz1173b6e2014-09-22 18:32:13 -0300486messaging_group = cfg.OptGroup(name='messaging',
487 title='Messaging Service')
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500488
Victoria Martínez de la Cruz1173b6e2014-09-22 18:32:13 -0300489MessagingGroup = [
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500490 cfg.StrOpt('catalog_type',
Victoria Martínez de la Cruz1173b6e2014-09-22 18:32:13 -0300491 default='messaging',
492 help='Catalog type of the Messaging service.'),
Jorge Chai83ba4ee2014-04-15 18:58:08 +0000493 cfg.IntOpt('max_queues_per_page',
494 default=20,
495 help='The maximum number of queue records per page when '
496 'listing queues'),
Malini Kamalambal7458b4b2014-05-29 11:47:28 -0400497 cfg.IntOpt('max_queue_metadata',
498 default=65536,
499 help='The maximum metadata size for a queue'),
500 cfg.IntOpt('max_messages_per_page',
501 default=20,
502 help='The maximum number of queue message per page when '
503 'listing (or) posting messages'),
504 cfg.IntOpt('max_message_size',
505 default=262144,
506 help='The maximum size of a message body'),
507 cfg.IntOpt('max_messages_per_claim',
508 default=20,
509 help='The maximum number of messages per claim'),
510 cfg.IntOpt('max_message_ttl',
511 default=1209600,
512 help='The maximum ttl for a message'),
513 cfg.IntOpt('max_claim_ttl',
514 default=43200,
515 help='The maximum ttl for a claim'),
516 cfg.IntOpt('max_claim_grace',
517 default=43200,
518 help='The maximum grace period for a claim'),
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500519]
520
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500521volume_group = cfg.OptGroup(name='volume',
522 title='Block Storage Options')
Daryl Walleck587385b2012-03-03 13:00:26 -0600523
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500524VolumeGroup = [
525 cfg.IntOpt('build_interval',
Sean Dague82190852014-05-24 07:42:59 -0400526 default=1,
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500527 help='Time in seconds between volume availability checks.'),
528 cfg.IntOpt('build_timeout',
529 default=300,
530 help='Timeout in seconds to wait for a volume to become'
531 'available.'),
532 cfg.StrOpt('catalog_type',
Matthew Treinisheb724512013-10-25 15:12:59 +0000533 default='volume',
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500534 help="Catalog type of the Volume Service"),
Arata Notsu8f440392013-09-13 16:14:20 +0900535 cfg.StrOpt('region',
536 default='',
537 help="The volume region name to use. If empty, the value "
538 "of identity.region is used instead. If no such region "
539 "is found in the service catalog, the first found one is "
540 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000541 cfg.StrOpt('endpoint_type',
542 default='publicURL',
543 choices=['public', 'admin', 'internal',
544 'publicURL', 'adminURL', 'internalURL'],
545 help="The endpoint type to use for the volume service."),
Jérôme Gallard86551ce2013-03-08 11:41:26 +0100546 cfg.StrOpt('backend1_name',
Giulio Fidentef4fa8942013-05-28 18:48:03 +0200547 default='BACKEND_1',
Jérôme Gallard86551ce2013-03-08 11:41:26 +0100548 help="Name of the backend1 (must be declared in cinder.conf)"),
549 cfg.StrOpt('backend2_name',
Giulio Fidentef4fa8942013-05-28 18:48:03 +0200550 default='BACKEND_2',
Jérôme Gallard86551ce2013-03-08 11:41:26 +0100551 help="Name of the backend2 (must be declared in cinder.conf)"),
Adam Gandelman827ad332013-06-24 17:04:09 -0700552 cfg.StrOpt('storage_protocol',
553 default='iSCSI',
554 help='Backend protocol to target when creating volume types'),
555 cfg.StrOpt('vendor_name',
556 default='Open Source',
557 help='Backend vendor to target when creating volume types'),
Ryan Hsua67f4632013-08-29 16:03:06 -0700558 cfg.StrOpt('disk_format',
559 default='raw',
560 help='Disk format to use when copying a volume to image'),
Jerry Cai9733d0e2014-03-19 15:50:49 +0800561 cfg.IntOpt('volume_size',
562 default=1,
563 help='Default size in GB for volumes created by volumes tests'),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500564]
K Jonathan Harkerd6ba4b42012-12-18 13:50:47 -0800565
Matthew Treinishd5c96022013-10-17 21:51:23 +0000566volume_feature_group = cfg.OptGroup(name='volume-feature-enabled',
567 title='Enabled Cinder Features')
568
569VolumeFeaturesGroup = [
570 cfg.BoolOpt('multi_backend',
571 default=False,
Matthew Treinishe3d26142013-11-26 19:14:58 +0000572 help="Runs Cinder multi-backend test (requires 2 backends)"),
Giulio Fidente74b08ad2014-01-18 04:02:51 +0100573 cfg.BoolOpt('backup',
574 default=True,
575 help='Runs Cinder volumes backup test'),
JordanPbce55532014-03-19 12:10:32 +0100576 cfg.BoolOpt('snapshot',
577 default=True,
578 help='Runs Cinder volume snapshot test'),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000579 cfg.ListOpt('api_extensions',
580 default=['all'],
Zhi Kun Liude25c022014-02-14 13:25:19 +0800581 help='A list of enabled volume extensions with a special '
Simeon Monov5d7effe2014-07-16 07:32:38 +0300582 'entry all which indicates every extension is enabled. '
583 'Empty list indicates all extensions are disabled'),
Zhi Kun Liubb363a22013-11-28 18:47:39 +0800584 cfg.BoolOpt('api_v1',
585 default=True,
586 help="Is the v1 volume API enabled"),
Zhi Kun Liu8cc3c842014-01-07 10:44:34 +0800587 cfg.BoolOpt('api_v2',
588 default=True,
589 help="Is the v2 volume API enabled"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000590]
591
Daryl Walleck587385b2012-03-03 13:00:26 -0600592
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500593object_storage_group = cfg.OptGroup(name='object-storage',
594 title='Object Storage Service Options')
Attila Fazekasa23f5002012-10-23 19:32:45 +0200595
DennyZhang1e71b612013-09-26 12:35:40 -0500596ObjectStoreGroup = [
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500597 cfg.StrOpt('catalog_type',
598 default='object-store',
599 help="Catalog type of the Object-Storage service."),
Arata Notsu8f440392013-09-13 16:14:20 +0900600 cfg.StrOpt('region',
601 default='',
602 help="The object-storage region name to use. If empty, the "
603 "value of identity.region is used instead. If no such "
604 "region is found in the service catalog, the first found "
605 "one is used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000606 cfg.StrOpt('endpoint_type',
607 default='publicURL',
608 choices=['public', 'admin', 'internal',
609 'publicURL', 'adminURL', 'internalURL'],
610 help="The endpoint type to use for the object-store service."),
Matthew Treinishf319a732013-10-24 21:39:24 +0000611 cfg.IntOpt('container_sync_timeout',
nayna-patelb4989b32013-01-09 06:25:13 +0000612 default=120,
Fabien Boucher2178d312013-12-31 15:38:57 +0100613 help="Number of seconds to time on waiting for a container "
nayna-patelb4989b32013-01-09 06:25:13 +0000614 "to container synchronization complete."),
Matthew Treinishf319a732013-10-24 21:39:24 +0000615 cfg.IntOpt('container_sync_interval',
nayna-patelb4989b32013-01-09 06:25:13 +0000616 default=5,
Fabien Boucher2178d312013-12-31 15:38:57 +0100617 help="Number of seconds to wait while looping to check the "
nayna-patelb4989b32013-01-09 06:25:13 +0000618 "status of a container to container synchronization"),
Matthew Treinish3fdb80c2013-08-15 11:13:19 -0400619 cfg.StrOpt('operator_role',
620 default='Member',
621 help="Role to add to users created for swift tests to "
622 "enable creating containers"),
Matthew Treinish998c91d2014-03-01 12:39:49 -0500623 cfg.StrOpt('reseller_admin_role',
624 default='ResellerAdmin',
625 help="User role that has reseller admin"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500626]
Attila Fazekasa23f5002012-10-23 19:32:45 +0200627
Matthew Treinishd5c96022013-10-17 21:51:23 +0000628object_storage_feature_group = cfg.OptGroup(
629 name='object-storage-feature-enabled',
630 title='Enabled object-storage features')
631
632ObjectStoreFeaturesGroup = [
Matthew Treinish20345382013-12-13 17:04:23 +0000633 cfg.ListOpt('discoverable_apis',
634 default=['all'],
635 help="A list of the enabled optional discoverable apis. "
636 "A single entry, all, indicates that all of these "
637 "features are expected to be enabled"),
Daisuke Morita20a183f2014-08-25 14:43:36 +0900638 cfg.BoolOpt('container_sync',
639 default=True,
640 help="Execute (old style) container-sync tests"),
641 cfg.BoolOpt('object_versioning',
642 default=True,
643 help="Execute object-versioning tests"),
644 cfg.BoolOpt('discoverability',
645 default=True,
646 help="Execute discoverability tests"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000647]
648
Nikhil Manchandadd6886f2014-03-03 01:58:45 -0800649database_group = cfg.OptGroup(name='database',
650 title='Database Service Options')
651
652DatabaseGroup = [
653 cfg.StrOpt('catalog_type',
654 default='database',
655 help="Catalog type of the Database service."),
656 cfg.StrOpt('db_flavor_ref',
657 default="1",
658 help="Valid primary flavor to use in database tests."),
Peter Stachowski320f9c72014-04-21 16:13:23 -0400659 cfg.StrOpt('db_current_version',
660 default="v1.0",
661 help="Current database version to use in database tests."),
Nikhil Manchandadd6886f2014-03-03 01:58:45 -0800662]
Attila Fazekasa23f5002012-10-23 19:32:45 +0200663
Steve Bakerc60e4e32013-05-06 15:22:41 +1200664orchestration_group = cfg.OptGroup(name='orchestration',
665 title='Orchestration Service Options')
666
667OrchestrationGroup = [
668 cfg.StrOpt('catalog_type',
669 default='orchestration',
670 help="Catalog type of the Orchestration service."),
Arata Notsu8f440392013-09-13 16:14:20 +0900671 cfg.StrOpt('region',
672 default='',
673 help="The orchestration region name to use. If empty, the "
674 "value of identity.region is used instead. If no such "
675 "region is found in the service catalog, the first found "
676 "one is used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000677 cfg.StrOpt('endpoint_type',
678 default='publicURL',
679 choices=['public', 'admin', 'internal',
680 'publicURL', 'adminURL', 'internalURL'],
681 help="The endpoint type to use for the orchestration service."),
Steve Bakerc60e4e32013-05-06 15:22:41 +1200682 cfg.IntOpt('build_interval',
683 default=1,
684 help="Time in seconds between build status checks."),
685 cfg.IntOpt('build_timeout',
Matthew Treinisha2dfd492014-04-15 11:15:34 -0400686 default=1200,
Steve Bakerc60e4e32013-05-06 15:22:41 +1200687 help="Timeout in seconds to wait for a stack to build."),
Steve Bakerc60e4e32013-05-06 15:22:41 +1200688 cfg.StrOpt('instance_type',
Steve Baker9e86b832013-05-22 15:40:28 +1200689 default='m1.micro',
Steve Bakerc60e4e32013-05-06 15:22:41 +1200690 help="Instance type for tests. Needs to be big enough for a "
691 "full OS plus the test workload"),
692 cfg.StrOpt('image_ref',
Steve Bakerc60e4e32013-05-06 15:22:41 +1200693 help="Name of heat-cfntools enabled image to use when "
694 "launching test instances."),
695 cfg.StrOpt('keypair_name',
Steve Bakerc60e4e32013-05-06 15:22:41 +1200696 help="Name of existing keypair to launch servers with."),
Clint Byrum71f27632013-09-09 11:41:32 -0700697 cfg.IntOpt('max_template_size',
Joe Gordon0e51b222013-10-24 14:11:10 +0100698 default=524288,
Clint Byrum71f27632013-09-09 11:41:32 -0700699 help="Value must match heat configuration of the same name."),
Steven Hardyfdc6bd72014-03-21 16:56:04 +0000700 cfg.IntOpt('max_resources_per_stack',
701 default=1000,
702 help="Value must match heat configuration of the same name."),
Steve Bakerc60e4e32013-05-06 15:22:41 +1200703]
704
705
Yassine Lamgarchalb158d412013-12-27 19:29:42 +0100706telemetry_group = cfg.OptGroup(name='telemetry',
707 title='Telemetry Service Options')
708
709TelemetryGroup = [
710 cfg.StrOpt('catalog_type',
711 default='metering',
712 help="Catalog type of the Telemetry service."),
JordanPfc62c902014-02-26 14:47:28 +0000713 cfg.StrOpt('endpoint_type',
714 default='publicURL',
715 choices=['public', 'admin', 'internal',
716 'publicURL', 'adminURL', 'internalURL'],
717 help="The endpoint type to use for the telemetry service."),
Vadim Rovachev7bcea352013-12-26 15:56:17 +0400718 cfg.BoolOpt('too_slow_to_test',
719 default=True,
720 help="This variable is used as flag to enable "
721 "notification tests")
Yassine Lamgarchalb158d412013-12-27 19:29:42 +0100722]
723
724
Julie Pichond1017642013-07-24 16:37:23 +0100725dashboard_group = cfg.OptGroup(name="dashboard",
726 title="Dashboard options")
727
728DashboardGroup = [
729 cfg.StrOpt('dashboard_url',
730 default='http://localhost/',
731 help="Where the dashboard can be found"),
732 cfg.StrOpt('login_url',
733 default='http://localhost/auth/login/',
734 help="Login page for the dashboard"),
735]
736
737
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +0400738data_processing_group = cfg.OptGroup(name="data_processing",
739 title="Data Processing options")
740
741DataProcessingGroup = [
742 cfg.StrOpt('catalog_type',
743 default='data_processing',
JordanPfc62c902014-02-26 14:47:28 +0000744 help="Catalog type of the data processing service."),
745 cfg.StrOpt('endpoint_type',
746 default='publicURL',
747 choices=['public', 'admin', 'internal',
748 'publicURL', 'adminURL', 'internalURL'],
749 help="The endpoint type to use for the data processing "
750 "service."),
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +0400751]
752
753
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500754boto_group = cfg.OptGroup(name='boto',
755 title='EC2/S3 options')
DennyZhang1e71b612013-09-26 12:35:40 -0500756BotoGroup = [
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500757 cfg.StrOpt('ec2_url',
758 default="http://localhost:8773/services/Cloud",
759 help="EC2 URL"),
760 cfg.StrOpt('s3_url',
761 default="http://localhost:8080",
762 help="S3 URL"),
763 cfg.StrOpt('aws_secret',
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500764 help="AWS Secret Key",
765 secret=True),
766 cfg.StrOpt('aws_access',
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500767 help="AWS Access Key"),
Attila Fazekas27dd92e2014-02-21 14:49:40 +0100768 cfg.StrOpt('aws_zone',
769 default="nova",
770 help="AWS Zone for EC2 tests"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500771 cfg.StrOpt('s3_materials_path',
772 default="/opt/stack/devstack/files/images/"
773 "s3-materials/cirros-0.3.0",
774 help="S3 Materials Path"),
775 cfg.StrOpt('ari_manifest',
776 default="cirros-0.3.0-x86_64-initrd.manifest.xml",
777 help="ARI Ramdisk Image manifest"),
778 cfg.StrOpt('ami_manifest',
779 default="cirros-0.3.0-x86_64-blank.img.manifest.xml",
780 help="AMI Machine Image manifest"),
781 cfg.StrOpt('aki_manifest',
782 default="cirros-0.3.0-x86_64-vmlinuz.manifest.xml",
783 help="AKI Kernel Image manifest"),
784 cfg.StrOpt('instance_type',
785 default="m1.tiny",
786 help="Instance type"),
787 cfg.IntOpt('http_socket_timeout',
788 default=3,
789 help="boto Http socket timeout"),
790 cfg.IntOpt('num_retries',
791 default=1,
792 help="boto num_retries on error"),
793 cfg.IntOpt('build_timeout',
794 default=60,
795 help="Status Change Timeout"),
796 cfg.IntOpt('build_interval',
797 default=1,
798 help="Status Change Test Interval"),
799]
Attila Fazekasf7f2d932012-12-13 09:14:38 +0100800
Matthew Treinish615ea6a2013-02-25 17:26:59 -0500801stress_group = cfg.OptGroup(name='stress', title='Stress Test Options')
802
803StressGroup = [
804 cfg.StrOpt('nova_logdir',
Matthew Treinish615ea6a2013-02-25 17:26:59 -0500805 help='Directory containing log files on the compute nodes'),
806 cfg.IntOpt('max_instances',
807 default=16,
808 help='Maximum number of instances to create during test.'),
809 cfg.StrOpt('controller',
David Kranzb9d97502013-05-01 15:55:04 -0400810 help='Controller host.'),
811 # new stress options
812 cfg.StrOpt('target_controller',
David Kranzb9d97502013-05-01 15:55:04 -0400813 help='Controller host.'),
814 cfg.StrOpt('target_ssh_user',
David Kranzb9d97502013-05-01 15:55:04 -0400815 help='ssh user.'),
816 cfg.StrOpt('target_private_key_path',
David Kranzb9d97502013-05-01 15:55:04 -0400817 help='Path to private key.'),
818 cfg.StrOpt('target_logfiles',
David Kranzb9d97502013-05-01 15:55:04 -0400819 help='regexp for list of log files.'),
Matthew Treinishf319a732013-10-24 21:39:24 +0000820 cfg.IntOpt('log_check_interval',
David Kranzb9d97502013-05-01 15:55:04 -0400821 default=60,
Marc Koderer32221b8e2013-08-23 13:57:50 +0200822 help='time (in seconds) between log file error checks.'),
Matthew Treinishf319a732013-10-24 21:39:24 +0000823 cfg.IntOpt('default_thread_number_per_action',
Marc Koderer32221b8e2013-08-23 13:57:50 +0200824 default=4,
Julien Leloup04d40f72014-01-28 11:17:18 +0100825 help='The number of threads created while stress test.'),
826 cfg.BoolOpt('leave_dirty_stack',
827 default=False,
828 help='Prevent the cleaning (tearDownClass()) between'
829 ' each stress test run if an exception occurs'
Julien Leloupa5ee5422014-02-13 14:29:02 +0100830 ' during this run.'),
831 cfg.BoolOpt('full_clean_stack',
832 default=False,
833 help='Allows a full cleaning process after a stress test.'
834 ' Caution : this cleanup will remove every objects of'
835 ' every tenant.')
Matthew Treinish615ea6a2013-02-25 17:26:59 -0500836]
837
838
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +0900839scenario_group = cfg.OptGroup(name='scenario', title='Scenario Test Options')
840
841ScenarioGroup = [
842 cfg.StrOpt('img_dir',
843 default='/opt/stack/new/devstack/files/images/'
844 'cirros-0.3.1-x86_64-uec',
845 help='Directory containing image files'),
Alessandro Pilottib7c1daa2014-08-16 14:24:13 +0300846 cfg.StrOpt('img_file', deprecated_name='qcow2_img_file',
Masayuki Igawa4f71bf02014-02-21 14:02:29 +0900847 default='cirros-0.3.1-x86_64-disk.img',
Alessandro Pilottib7c1daa2014-08-16 14:24:13 +0300848 help='Image file name'),
849 cfg.StrOpt('img_disk_format',
850 default='qcow2',
851 help='Image disk format'),
852 cfg.StrOpt('img_container_format',
853 default='bare',
854 help='Image container format'),
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +0900855 cfg.StrOpt('ami_img_file',
856 default='cirros-0.3.1-x86_64-blank.img',
857 help='AMI image file name'),
858 cfg.StrOpt('ari_img_file',
859 default='cirros-0.3.1-x86_64-initrd',
860 help='ARI image file name'),
861 cfg.StrOpt('aki_img_file',
862 default='cirros-0.3.1-x86_64-vmlinuz',
863 help='AKI image file name'),
864 cfg.StrOpt('ssh_user',
865 default='cirros',
Joe Gordonb5e10cd2013-07-10 15:51:12 +0000866 help='ssh username for the image file'),
867 cfg.IntOpt(
868 'large_ops_number',
869 default=0,
870 help="specifies how many resources to request at once. Used "
871 "for large operations testing.")
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +0900872]
873
874
Matthew Treinish4c412922013-07-16 15:27:42 -0400875service_available_group = cfg.OptGroup(name="service_available",
876 title="Available OpenStack Services")
877
878ServiceAvailableGroup = [
879 cfg.BoolOpt('cinder',
880 default=True,
881 help="Whether or not cinder is expected to be available"),
Matthew Treinishfaa340d2013-07-19 16:26:21 -0400882 cfg.BoolOpt('neutron',
883 default=False,
884 help="Whether or not neutron is expected to be available"),
Matthew Treinish853ae442013-07-19 16:36:07 -0400885 cfg.BoolOpt('glance',
886 default=True,
887 help="Whether or not glance is expected to be available"),
Matthew Treinish61e332b2013-07-19 16:42:31 -0400888 cfg.BoolOpt('swift',
889 default=True,
890 help="Whether or not swift is expected to be available"),
Matthew Treinish6b41e242013-07-19 16:49:28 -0400891 cfg.BoolOpt('nova',
892 default=True,
893 help="Whether or not nova is expected to be available"),
Matthew Treinisha9d43882013-07-19 16:54:52 -0400894 cfg.BoolOpt('heat',
895 default=False,
896 help="Whether or not Heat is expected to be available"),
Mehdi Abaakouk8581c0b2013-10-04 10:45:42 +0200897 cfg.BoolOpt('ceilometer',
898 default=True,
899 help="Whether or not Ceilometer is expected to be available"),
Julie Pichond1017642013-07-24 16:37:23 +0100900 cfg.BoolOpt('horizon',
901 default=True,
902 help="Whether or not Horizon is expected to be available"),
Sergey Lukjanov9c95a252014-03-13 23:59:22 +0400903 cfg.BoolOpt('sahara',
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +0400904 default=False,
Sergey Lukjanov9c95a252014-03-13 23:59:22 +0400905 help="Whether or not Sahara is expected to be available"),
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +0300906 cfg.BoolOpt('ironic',
907 default=False,
908 help="Whether or not Ironic is expected to be available"),
Nikhil Manchandadd6886f2014-03-03 01:58:45 -0800909 cfg.BoolOpt('trove',
910 default=False,
911 help="Whether or not Trove is expected to be available"),
Malini Kamalambal8681e922014-08-18 10:10:45 -0400912 cfg.BoolOpt('zaqar',
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500913 default=False,
Malini Kamalambal8681e922014-08-18 10:10:45 -0400914 help="Whether or not Zaqar is expected to be available"),
Matthew Treinish4c412922013-07-16 15:27:42 -0400915]
916
Attila Fazekasaeeeefd2013-08-06 17:01:56 +0200917debug_group = cfg.OptGroup(name="debug",
918 title="Debug System")
919
920DebugGroup = [
921 cfg.BoolOpt('enable',
922 default=True,
923 help="Enable diagnostic commands"),
Sean Daguec522c092014-03-24 10:43:22 -0400924 cfg.StrOpt('trace_requests',
925 default='',
926 help="""A regex to determine which requests should be traced.
927
928This is a regex to match the caller for rest client requests to be able to
929selectively trace calls out of specific classes and methods. It largely
930exists for test development, and is not expected to be used in a real deploy
931of tempest. This will be matched against the discovered ClassName:method
932in the test environment.
933
934Expected values for this field are:
935
936 * ClassName:test_method_name - traces one test_method
937 * ClassName:setUp(Class) - traces specific setup functions
938 * ClassName:tearDown(Class) - traces specific teardown functions
939 * ClassName:_run_cleanups - traces the cleanup functions
940
941If nothing is specified, this feature is not enabled. To trace everything
942specify .* as the regex.
943""")
Attila Fazekasaeeeefd2013-08-06 17:01:56 +0200944]
945
Andrea Frittolif5da28b2013-12-06 07:08:07 +0000946input_scenario_group = cfg.OptGroup(name="input-scenario",
947 title="Filters and values for"
948 " input scenarios")
949
950InputScenarioGroup = [
951 cfg.StrOpt('image_regex',
952 default='^cirros-0.3.1-x86_64-uec$',
953 help="Matching images become parameters for scenario tests"),
954 cfg.StrOpt('flavor_regex',
Andrea Frittoli99901c02014-01-30 18:06:49 +0000955 default='^m1.nano$',
Andrea Frittolif5da28b2013-12-06 07:08:07 +0000956 help="Matching flavors become parameters for scenario tests"),
957 cfg.StrOpt('non_ssh_image_regex',
958 default='^.*[Ww]in.*$',
959 help="SSH verification in tests is skipped"
960 "for matching images"),
961 cfg.StrOpt('ssh_user_regex',
962 default="[[\"^.*[Cc]irros.*$\", \"root\"]]",
963 help="List of user mapped to regex "
964 "to matching image names."),
965]
966
Attila Fazekasaeeeefd2013-08-06 17:01:56 +0200967
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +0300968baremetal_group = cfg.OptGroup(name='baremetal',
969 title='Baremetal provisioning service options')
970
971BaremetalGroup = [
972 cfg.StrOpt('catalog_type',
973 default='baremetal',
Adam Gandelman4a48a602014-03-20 18:23:18 -0700974 help="Catalog type of the baremetal provisioning service"),
975 cfg.BoolOpt('driver_enabled',
976 default=False,
977 help="Whether the Ironic nova-compute driver is enabled"),
Yuiko Takada1ee1b322014-07-04 09:55:30 +0900978 cfg.StrOpt('driver',
979 default='fake',
980 help="Driver name which Ironic uses"),
JordanPfc62c902014-02-26 14:47:28 +0000981 cfg.StrOpt('endpoint_type',
982 default='publicURL',
983 choices=['public', 'admin', 'internal',
984 'publicURL', 'adminURL', 'internalURL'],
985 help="The endpoint type to use for the baremetal provisioning "
Adam Gandelman4a48a602014-03-20 18:23:18 -0700986 "service"),
987 cfg.IntOpt('active_timeout',
988 default=300,
989 help="Timeout for Ironic node to completely provision"),
990 cfg.IntOpt('association_timeout',
Adam Gandelmane42f0922014-06-10 15:26:37 -0700991 default=30,
Adam Gandelman4a48a602014-03-20 18:23:18 -0700992 help="Timeout for association of Nova instance and Ironic "
993 "node"),
994 cfg.IntOpt('power_timeout',
Adam Gandelmane42f0922014-06-10 15:26:37 -0700995 default=60,
Adam Gandelman4a48a602014-03-20 18:23:18 -0700996 help="Timeout for Ironic power transitions."),
997 cfg.IntOpt('unprovision_timeout',
Adam Gandelmane42f0922014-06-10 15:26:37 -0700998 default=60,
Adam Gandelman4a48a602014-03-20 18:23:18 -0700999 help="Timeout for unprovisioning an Ironic node.")
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +03001000]
1001
Matthew Treinishe2b56b52014-01-29 19:25:50 +00001002cli_group = cfg.OptGroup(name='cli', title="cli Configuration Options")
1003
1004CLIGroup = [
1005 cfg.BoolOpt('enabled',
1006 default=True,
1007 help="enable cli tests"),
1008 cfg.StrOpt('cli_dir',
1009 default='/usr/local/bin',
1010 help="directory where python client binaries are located"),
Sean Dague44b24682014-02-20 19:08:24 -05001011 cfg.BoolOpt('has_manage',
1012 default=True,
1013 help=("Whether the tempest run location has access to the "
1014 "*-manage commands. In a pure blackbox environment "
1015 "it will not.")),
Matthew Treinishe2b56b52014-01-29 19:25:50 +00001016 cfg.IntOpt('timeout',
1017 default=15,
1018 help="Number of seconds to wait on a CLI timeout"),
1019]
1020
Marc Koderer6ee82dc2014-02-17 10:26:29 +01001021negative_group = cfg.OptGroup(name='negative', title="Negative Test Options")
1022
1023NegativeGroup = [
1024 cfg.StrOpt('test_generator',
1025 default='tempest.common.' +
1026 'generator.negative_generator.NegativeTestGenerator',
1027 help="Test generator class for all negative tests"),
1028]
1029
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +03001030
Matthew Treinish43b296a2014-02-28 15:23:00 -05001031def register_opts():
Matthew Treinishc791ac42014-07-16 09:15:23 -04001032 register_opt_group(cfg.CONF, auth_group, AuthGroup)
Matthew Treinish43b296a2014-02-28 15:23:00 -05001033 register_opt_group(cfg.CONF, compute_group, ComputeGroup)
1034 register_opt_group(cfg.CONF, compute_features_group,
1035 ComputeFeaturesGroup)
1036 register_opt_group(cfg.CONF, identity_group, IdentityGroup)
1037 register_opt_group(cfg.CONF, identity_feature_group,
1038 IdentityFeatureGroup)
1039 register_opt_group(cfg.CONF, image_group, ImageGroup)
1040 register_opt_group(cfg.CONF, image_feature_group, ImageFeaturesGroup)
1041 register_opt_group(cfg.CONF, network_group, NetworkGroup)
1042 register_opt_group(cfg.CONF, network_feature_group,
1043 NetworkFeaturesGroup)
Victoria Martínez de la Cruz1173b6e2014-09-22 18:32:13 -03001044 register_opt_group(cfg.CONF, messaging_group, MessagingGroup)
Matthew Treinish43b296a2014-02-28 15:23:00 -05001045 register_opt_group(cfg.CONF, volume_group, VolumeGroup)
1046 register_opt_group(cfg.CONF, volume_feature_group,
1047 VolumeFeaturesGroup)
1048 register_opt_group(cfg.CONF, object_storage_group, ObjectStoreGroup)
1049 register_opt_group(cfg.CONF, object_storage_feature_group,
1050 ObjectStoreFeaturesGroup)
Nikhil Manchandadd6886f2014-03-03 01:58:45 -08001051 register_opt_group(cfg.CONF, database_group, DatabaseGroup)
Matthew Treinish43b296a2014-02-28 15:23:00 -05001052 register_opt_group(cfg.CONF, orchestration_group, OrchestrationGroup)
1053 register_opt_group(cfg.CONF, telemetry_group, TelemetryGroup)
1054 register_opt_group(cfg.CONF, dashboard_group, DashboardGroup)
1055 register_opt_group(cfg.CONF, data_processing_group,
1056 DataProcessingGroup)
1057 register_opt_group(cfg.CONF, boto_group, BotoGroup)
1058 register_opt_group(cfg.CONF, compute_admin_group, ComputeAdminGroup)
1059 register_opt_group(cfg.CONF, stress_group, StressGroup)
1060 register_opt_group(cfg.CONF, scenario_group, ScenarioGroup)
1061 register_opt_group(cfg.CONF, service_available_group,
1062 ServiceAvailableGroup)
1063 register_opt_group(cfg.CONF, debug_group, DebugGroup)
1064 register_opt_group(cfg.CONF, baremetal_group, BaremetalGroup)
1065 register_opt_group(cfg.CONF, input_scenario_group, InputScenarioGroup)
1066 register_opt_group(cfg.CONF, cli_group, CLIGroup)
Marc Koderer6ee82dc2014-02-17 10:26:29 +01001067 register_opt_group(cfg.CONF, negative_group, NegativeGroup)
Matthew Treinish43b296a2014-02-28 15:23:00 -05001068
1069
Sean Dague3b9b1f32013-12-20 17:04:54 -05001070# this should never be called outside of this class
1071class TempestConfigPrivate(object):
Daryl Walleck1465d612011-11-02 02:22:15 -05001072 """Provides OpenStack configuration information."""
1073
Brian Waldon738cd632011-12-12 18:45:09 -05001074 DEFAULT_CONFIG_DIR = os.path.join(
Zhongyue Luoa1343de2013-01-04 16:21:35 +08001075 os.path.abspath(os.path.dirname(os.path.dirname(__file__))),
Brian Waldon738cd632011-12-12 18:45:09 -05001076 "etc")
Daryl Walleck1465d612011-11-02 02:22:15 -05001077
Brian Waldon738cd632011-12-12 18:45:09 -05001078 DEFAULT_CONFIG_FILE = "tempest.conf"
1079
Andrea Frittolia96ee212014-08-15 18:34:20 +01001080 def __getattr__(self, attr):
1081 # Handles config options from the default group
1082 return getattr(cfg.CONF, attr)
1083
Matthew Treinish43b296a2014-02-28 15:23:00 -05001084 def _set_attrs(self):
Matthew Treinishc791ac42014-07-16 09:15:23 -04001085 self.auth = cfg.CONF.auth
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001086 self.compute = cfg.CONF.compute
Matthew Treinishd5c96022013-10-17 21:51:23 +00001087 self.compute_feature_enabled = cfg.CONF['compute-feature-enabled']
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001088 self.identity = cfg.CONF.identity
Matthew Treinishd5021a72014-01-09 18:42:51 +00001089 self.identity_feature_enabled = cfg.CONF['identity-feature-enabled']
Matt Riedemannd3efe902014-02-10 06:46:38 -08001090 self.image = cfg.CONF.image
Matthew Treinish2b5287d2013-10-22 17:40:34 +00001091 self.image_feature_enabled = cfg.CONF['image-feature-enabled']
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001092 self.network = cfg.CONF.network
Matthew Treinishe3d26142013-11-26 19:14:58 +00001093 self.network_feature_enabled = cfg.CONF['network-feature-enabled']
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001094 self.volume = cfg.CONF.volume
Matthew Treinishd5c96022013-10-17 21:51:23 +00001095 self.volume_feature_enabled = cfg.CONF['volume-feature-enabled']
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001096 self.object_storage = cfg.CONF['object-storage']
Matthew Treinishd5c96022013-10-17 21:51:23 +00001097 self.object_storage_feature_enabled = cfg.CONF[
1098 'object-storage-feature-enabled']
Nikhil Manchandadd6886f2014-03-03 01:58:45 -08001099 self.database = cfg.CONF.database
Steve Bakerc60e4e32013-05-06 15:22:41 +12001100 self.orchestration = cfg.CONF.orchestration
Victoria Martínez de la Cruz1173b6e2014-09-22 18:32:13 -03001101 self.messaging = cfg.CONF.messaging
Yassine Lamgarchalb158d412013-12-27 19:29:42 +01001102 self.telemetry = cfg.CONF.telemetry
Julie Pichond1017642013-07-24 16:37:23 +01001103 self.dashboard = cfg.CONF.dashboard
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +04001104 self.data_processing = cfg.CONF.data_processing
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001105 self.boto = cfg.CONF.boto
Attila Fazekascadcb1f2013-01-21 23:10:53 +01001106 self.compute_admin = cfg.CONF['compute-admin']
Matthew Treinish615ea6a2013-02-25 17:26:59 -05001107 self.stress = cfg.CONF.stress
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +09001108 self.scenario = cfg.CONF.scenario
Matthew Treinish4c412922013-07-16 15:27:42 -04001109 self.service_available = cfg.CONF.service_available
Attila Fazekas5fae7a32013-09-25 16:52:44 +02001110 self.debug = cfg.CONF.debug
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +03001111 self.baremetal = cfg.CONF.baremetal
Andrea Frittolif5da28b2013-12-06 07:08:07 +00001112 self.input_scenario = cfg.CONF['input-scenario']
Matthew Treinishe2b56b52014-01-29 19:25:50 +00001113 self.cli = cfg.CONF.cli
Marc Koderer6ee82dc2014-02-17 10:26:29 +01001114 self.negative = cfg.CONF.negative
Attila Fazekascadcb1f2013-01-21 23:10:53 +01001115 if not self.compute_admin.username:
1116 self.compute_admin.username = self.identity.admin_username
1117 self.compute_admin.password = self.identity.admin_password
1118 self.compute_admin.tenant_name = self.identity.admin_tenant_name
Andrea Frittolib1b04bb2014-04-06 11:57:07 +01001119 cfg.CONF.set_default('domain_name', self.identity.admin_domain_name,
1120 group='identity')
1121 cfg.CONF.set_default('alt_domain_name',
1122 self.identity.admin_domain_name,
1123 group='identity')
1124 cfg.CONF.set_default('domain_name', self.identity.admin_domain_name,
1125 group='compute-admin')
Sean Dague86bd8422013-12-20 09:56:44 -05001126
Joe Gordon28a84ae2014-07-17 15:38:28 +00001127 def __init__(self, parse_conf=True, config_path=None):
Matthew Treinish43b296a2014-02-28 15:23:00 -05001128 """Initialize a configuration from a conf directory and conf file."""
1129 super(TempestConfigPrivate, self).__init__()
1130 config_files = []
1131 failsafe_path = "/etc/tempest/" + self.DEFAULT_CONFIG_FILE
1132
Joe Gordon28a84ae2014-07-17 15:38:28 +00001133 if config_path:
1134 path = config_path
1135 else:
1136 # Environment variables override defaults...
1137 conf_dir = os.environ.get('TEMPEST_CONFIG_DIR',
1138 self.DEFAULT_CONFIG_DIR)
1139 conf_file = os.environ.get('TEMPEST_CONFIG',
1140 self.DEFAULT_CONFIG_FILE)
Matthew Treinish43b296a2014-02-28 15:23:00 -05001141
Joe Gordon28a84ae2014-07-17 15:38:28 +00001142 path = os.path.join(conf_dir, conf_file)
Matthew Treinish43b296a2014-02-28 15:23:00 -05001143
1144 if not os.path.isfile(path):
1145 path = failsafe_path
1146
1147 # only parse the config file if we expect one to exist. This is needed
1148 # to remove an issue with the config file up to date checker.
1149 if parse_conf:
1150 config_files.append(path)
Matthew Treinish5440a402014-10-02 14:36:16 -04001151 if os.path.isfile(path):
1152 cfg.CONF([], project='tempest', default_config_files=config_files)
1153 else:
1154 cfg.CONF([], project='tempest')
Matthew Treinish43b296a2014-02-28 15:23:00 -05001155 logging.setup('tempest')
1156 LOG = logging.getLogger('tempest')
1157 LOG.info("Using tempest config file %s" % path)
1158 register_opts()
1159 self._set_attrs()
Masayuki Igawa9ec4cd82014-02-05 15:04:16 +09001160 if parse_conf:
1161 cfg.CONF.log_opt_values(LOG, std_logging.DEBUG)
1162
Sean Dague86bd8422013-12-20 09:56:44 -05001163
1164class TempestConfigProxy(object):
1165 _config = None
Joe Gordon28a84ae2014-07-17 15:38:28 +00001166 _path = None
Sean Dague86bd8422013-12-20 09:56:44 -05001167
Sean Daguedb6ac6c2014-06-06 16:52:44 -04001168 _extra_log_defaults = [
1169 'keystoneclient.session=INFO',
1170 'paramiko.transport=INFO',
1171 'requests.packages.urllib3.connectionpool=WARN'
1172 ]
1173
1174 def _fix_log_levels(self):
1175 """Tweak the oslo log defaults."""
1176 for opt in logging.log_opts:
1177 if opt.dest == 'default_log_levels':
1178 opt.default.extend(self._extra_log_defaults)
1179
Sean Dague86bd8422013-12-20 09:56:44 -05001180 def __getattr__(self, attr):
1181 if not self._config:
Sean Daguedb6ac6c2014-06-06 16:52:44 -04001182 self._fix_log_levels()
Joe Gordon28a84ae2014-07-17 15:38:28 +00001183 self._config = TempestConfigPrivate(config_path=self._path)
Sean Dague86bd8422013-12-20 09:56:44 -05001184
1185 return getattr(self._config, attr)
1186
Joe Gordon28a84ae2014-07-17 15:38:28 +00001187 def set_config_path(self, path):
1188 self._path = path
1189
Sean Dague86bd8422013-12-20 09:56:44 -05001190
1191CONF = TempestConfigProxy()