blob: 174a895c81658d802ea00ca8525f8c906c18b445 [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"),
41]
42
43
Matthew Treinish39e48ef2012-12-21 13:36:15 -050044identity_group = cfg.OptGroup(name='identity',
45 title="Keystone Configuration Options")
Daryl Walleck1465d612011-11-02 02:22:15 -050046
Matthew Treinish39e48ef2012-12-21 13:36:15 -050047IdentityGroup = [
48 cfg.StrOpt('catalog_type',
49 default='identity',
50 help="Catalog type of the Identity service."),
Jay Pipescd8eaec2013-01-16 21:03:48 -050051 cfg.BoolOpt('disable_ssl_certificate_validation',
52 default=False,
53 help="Set to True if using self-signed SSL certificates."),
Jay Pipes7c88eb22013-01-16 21:32:43 -050054 cfg.StrOpt('uri',
Brant Knudsonc7ca3342013-03-28 21:08:50 -050055 help="Full URI of the OpenStack Identity API (Keystone), v2"),
56 cfg.StrOpt('uri_v3',
57 help='Full URI of the OpenStack Identity API (Keystone), v3'),
Andrea Frittoli8bbdb162014-01-06 11:06:13 +000058 cfg.StrOpt('auth_version',
59 default='v2',
60 help="Identity API version to be used for authentication "
Andrea Frittoli77f9da42014-02-06 11:18:19 +000061 "for API tests."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -050062 cfg.StrOpt('region',
Attila Fazekascadcb1f2013-01-21 23:10:53 +010063 default='RegionOne',
Arata Notsu8f440392013-09-13 16:14:20 +090064 help="The identity region name to use. Also used as the other "
65 "services' region name unless they are set explicitly. "
66 "If no such region is found in the service catalog, the "
67 "first found one is used."),
JordanP5d29b2c2013-12-18 13:56:03 +000068 cfg.StrOpt('endpoint_type',
69 default='publicURL',
70 choices=['public', 'admin', 'internal',
71 'publicURL', 'adminURL', 'internalURL'],
72 help="The endpoint type to use for the identity service."),
Attila Fazekascadcb1f2013-01-21 23:10:53 +010073 cfg.StrOpt('username',
Attila Fazekascadcb1f2013-01-21 23:10:53 +010074 help="Username to use for Nova API requests."),
75 cfg.StrOpt('tenant_name',
Attila Fazekascadcb1f2013-01-21 23:10:53 +010076 help="Tenant name to use for Nova API requests."),
Russell Sim7f894a52013-09-13 10:35:21 +100077 cfg.StrOpt('admin_role',
78 default='admin',
79 help="Role required to administrate keystone."),
Attila Fazekascadcb1f2013-01-21 23:10:53 +010080 cfg.StrOpt('password',
Attila Fazekascadcb1f2013-01-21 23:10:53 +010081 help="API key to use when authenticating.",
82 secret=True),
Andrea Frittolib1b04bb2014-04-06 11:57:07 +010083 cfg.StrOpt('domain_name',
Andrea Frittolib1b04bb2014-04-06 11:57:07 +010084 help="Domain name for authentication (Keystone V3)."
85 "The same domain applies to user and project"),
Attila Fazekascadcb1f2013-01-21 23:10:53 +010086 cfg.StrOpt('alt_username',
Attila Fazekascadcb1f2013-01-21 23:10:53 +010087 help="Username of alternate user to use for Nova API "
88 "requests."),
89 cfg.StrOpt('alt_tenant_name',
Attila Fazekascadcb1f2013-01-21 23:10:53 +010090 help="Alternate user's Tenant name to use for Nova API "
91 "requests."),
92 cfg.StrOpt('alt_password',
Attila Fazekascadcb1f2013-01-21 23:10:53 +010093 help="API key to use when authenticating as alternate user.",
94 secret=True),
Andrea Frittolib1b04bb2014-04-06 11:57:07 +010095 cfg.StrOpt('alt_domain_name',
Andrea Frittolib1b04bb2014-04-06 11:57:07 +010096 help="Alternate domain name for authentication (Keystone V3)."
97 "The same domain applies to user and project"),
Attila Fazekascadcb1f2013-01-21 23:10:53 +010098 cfg.StrOpt('admin_username',
Dirk Mueller14bd5622014-01-14 19:33:05 +010099 help="Administrative Username to use for "
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100100 "Keystone API requests."),
101 cfg.StrOpt('admin_tenant_name',
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100102 help="Administrative Tenant name to use for Keystone API "
103 "requests."),
104 cfg.StrOpt('admin_password',
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100105 help="API key to use when authenticating as admin.",
106 secret=True),
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100107 cfg.StrOpt('admin_domain_name',
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100108 help="Admin domain name for authentication (Keystone V3)."
109 "The same domain applies to user and project"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500110]
Jay Pipes3f981df2012-03-27 18:59:44 -0400111
Matthew Treinishd5021a72014-01-09 18:42:51 +0000112identity_feature_group = cfg.OptGroup(name='identity-feature-enabled',
113 title='Enabled Identity Features')
114
115IdentityFeatureGroup = [
116 cfg.BoolOpt('trust',
117 default=True,
118 help='Does the identity service have delegation and '
Matthew Treinishdb2c5972014-01-31 22:18:59 +0000119 'impersonation enabled'),
120 cfg.BoolOpt('api_v2',
121 default=True,
122 help='Is the v2 identity API enabled'),
123 cfg.BoolOpt('api_v3',
124 default=True,
125 help='Is the v3 identity API enabled'),
Matthew Treinishd5021a72014-01-09 18:42:51 +0000126]
127
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500128compute_group = cfg.OptGroup(name='compute',
129 title='Compute Service Options')
Rohit Karajgie1b050d2011-12-02 16:13:18 -0800130
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500131ComputeGroup = [
132 cfg.BoolOpt('allow_tenant_isolation',
133 default=False,
134 help="Allows test cases to create/destroy tenants and "
135 "users. This option enables isolated test cases and "
136 "better parallel execution, but also requires that "
137 "OpenStack Identity API admin credentials are known."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500138 cfg.StrOpt('image_ref',
Matthew Treinishafcb6b42014-05-27 13:50:02 -0400139 help="Valid primary image reference to be used in tests. "
140 "This is a required option"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500141 cfg.StrOpt('image_ref_alt',
Matthew Treinishafcb6b42014-05-27 13:50:02 -0400142 help="Valid secondary image reference to be used in tests. "
143 "This is a required option, but if only one image is "
144 "available duplicate the value of image_ref above"),
Ken'ichi Ohmichi35772602013-11-14 15:03:27 +0900145 cfg.StrOpt('flavor_ref',
146 default="1",
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500147 help="Valid primary flavor to use in tests."),
Ken'ichi Ohmichi35772602013-11-14 15:03:27 +0900148 cfg.StrOpt('flavor_ref_alt',
149 default="2",
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500150 help='Valid secondary flavor to be used in tests.'),
Maru Newbyaf292e82013-05-20 21:32:28 +0000151 cfg.StrOpt('image_ssh_user',
152 default="root",
153 help="User name used to authenticate to an instance."),
Ryan Hsucb2e1252013-09-03 21:44:49 -0700154 cfg.StrOpt('image_ssh_password',
155 default="password",
156 help="Password used to authenticate to an instance."),
Maru Newbyaf292e82013-05-20 21:32:28 +0000157 cfg.StrOpt('image_alt_ssh_user',
158 default="root",
159 help="User name used to authenticate to an instance using "
160 "the alternate image."),
Ryan Hsucb2e1252013-09-03 21:44:49 -0700161 cfg.StrOpt('image_alt_ssh_password',
162 default="password",
163 help="Password used to authenticate to an instance using "
164 "the alternate image."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500165 cfg.IntOpt('build_interval',
Sean Dague82190852014-05-24 07:42:59 -0400166 default=1,
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500167 help="Time in seconds between build status checks."),
168 cfg.IntOpt('build_timeout',
169 default=300,
170 help="Timeout in seconds to wait for an instance to build."),
171 cfg.BoolOpt('run_ssh',
172 default=False,
Derek Higgins85cd5142013-12-17 17:10:11 +0000173 help="Should the tests ssh to instances?"),
Attila Fazekas423834d2014-03-14 17:33:13 +0100174 cfg.StrOpt('ssh_auth_method',
175 default='keypair',
176 help="Auth method used for authenticate to the instance. "
177 "Valid choices are: keypair, configured, adminpass. "
178 "keypair: start the servers with an ssh keypair. "
179 "configured: use the configured user and password. "
180 "adminpass: use the injected adminPass. "
181 "disabled: avoid using ssh when it is an option."),
182 cfg.StrOpt('ssh_connect_method',
183 default='fixed',
184 help="How to connect to the instance? "
185 "fixed: using the first ip belongs the fixed network "
186 "floating: creating and using a floating ip"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500187 cfg.StrOpt('ssh_user',
188 default='root',
189 help="User name used to authenticate to an instance."),
Nachi Ueno6d580be2013-07-24 10:58:11 -0700190 cfg.IntOpt('ping_timeout',
Darragh O'Reilly6b636672014-01-24 12:17:40 +0000191 default=120,
Nachi Ueno6d580be2013-07-24 10:58:11 -0700192 help="Timeout in seconds to wait for ping to "
193 "succeed."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500194 cfg.IntOpt('ssh_timeout',
195 default=300,
Chris Yeoh76916042013-02-27 16:25:25 +1030196 help="Timeout in seconds to wait for authentication to "
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500197 "succeed."),
Attila Fazekas0abbc952013-07-01 19:19:42 +0200198 cfg.IntOpt('ready_wait',
199 default=0,
DennyZhang8912d012013-09-25 18:08:34 -0500200 help="Additional wait time for clean state, when there is "
201 "no OS-EXT-STS extension available"),
Chris Yeoh76916042013-02-27 16:25:25 +1030202 cfg.IntOpt('ssh_channel_timeout',
203 default=60,
204 help="Timeout in seconds to wait for output from ssh "
205 "channel."),
Attila Fazekasb0661652013-05-08 13:01:36 +0200206 cfg.StrOpt('fixed_network_name',
207 default='private',
208 help="Visible fixed network name "),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500209 cfg.StrOpt('network_for_ssh',
210 default='public',
211 help="Network used for SSH connections."),
212 cfg.IntOpt('ip_version_for_ssh',
213 default=4,
214 help="IP version used for SSH connections."),
fujioka yuuichia11994e2013-07-09 11:19:51 +0900215 cfg.BoolOpt('use_floatingip_for_ssh',
216 default=True,
Tushar Kalra95a482d2014-03-25 14:24:43 -0700217 help="Does SSH use Floating IPs?"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500218 cfg.StrOpt('catalog_type',
219 default='compute',
220 help="Catalog type of the Compute service."),
Arata Notsu8f440392013-09-13 16:14:20 +0900221 cfg.StrOpt('region',
222 default='',
223 help="The compute region name to use. If empty, the value "
224 "of identity.region is used instead. If no such region "
225 "is found in the service catalog, the first found one is "
226 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000227 cfg.StrOpt('endpoint_type',
228 default='publicURL',
229 choices=['public', 'admin', 'internal',
230 'publicURL', 'adminURL', 'internalURL'],
231 help="The endpoint type to use for the compute service."),
ivan-zhu8f992be2013-07-31 14:56:58 +0800232 cfg.StrOpt('catalog_v3_type',
233 default='computev3',
234 help="Catalog type of the Compute v3 service."),
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100235 cfg.StrOpt('path_to_private_key',
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100236 help="Path to a private key file for SSH access to remote "
237 "hosts"),
Ryan Hsucb2e1252013-09-03 21:44:49 -0700238 cfg.StrOpt('volume_device_name',
239 default='vdb',
240 help="Expected device name when a volume is attached to "
Ken'ichi Ohmichi39437e22013-10-06 00:21:38 +0900241 "an instance"),
242 cfg.IntOpt('shelved_offload_time',
243 default=0,
244 help='Time in seconds before a shelved instance is eligible '
245 'for removing from a host. -1 never offload, 0 offload '
246 'when shelved. This time should be the same as the time '
247 'of nova.conf, and some tests will run for as long as the '
Ghanshyam06a5b4a2014-04-11 17:32:45 +0900248 'time.'),
249 cfg.StrOpt('floating_ip_range',
250 default='10.0.0.0/29',
251 help='Unallocated floating IP range, which will be used to '
252 'test the floating IP bulk feature for CRUD operation.')
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500253]
Rohit Karajgie1b050d2011-12-02 16:13:18 -0800254
Matthew Treinishd5c96022013-10-17 21:51:23 +0000255compute_features_group = cfg.OptGroup(name='compute-feature-enabled',
256 title="Enabled Compute Service Features")
257
258ComputeFeaturesGroup = [
ivan-zhu8f992be2013-07-31 14:56:58 +0800259 cfg.BoolOpt('api_v3',
Matthew Treinish836e56b2014-06-12 13:55:19 -0400260 default=False,
ivan-zhu8f992be2013-07-31 14:56:58 +0800261 help="If false, skip all nova v3 tests."),
Matthew Treinish20866a22014-06-12 14:58:36 -0400262 cfg.BoolOpt('xml_api_v2',
263 default=True,
264 help="If false skip all v2 api tests with xml"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000265 cfg.BoolOpt('disk_config',
266 default=True,
267 help="If false, skip disk config tests"),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000268 cfg.ListOpt('api_extensions',
269 default=['all'],
Zhi Kun Liude25c022014-02-14 13:25:19 +0800270 help='A list of enabled compute extensions with a special '
Ken'ichi Ohmichia7e68712014-05-06 10:47:26 +0900271 'entry all which indicates every extension is enabled. '
Simeon Monov5d7effe2014-07-16 07:32:38 +0300272 'Each extension should be specified with alias name. '
273 'Empty list indicates all extensions are disabled'),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000274 cfg.ListOpt('api_v3_extensions',
275 default=['all'],
276 help='A list of enabled v3 extensions with a special entry all'
Ken'ichi Ohmichia7e68712014-05-06 10:47:26 +0900277 ' which indicates every extension is enabled. '
Simeon Monov5d7effe2014-07-16 07:32:38 +0300278 'Each extension should be specified with alias name. '
279 'Empty list indicates all extensions are disabled'),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000280 cfg.BoolOpt('change_password',
281 default=False,
282 help="Does the test environment support changing the admin "
283 "password?"),
Adam Gandelmanc6eefb42014-07-15 16:44:08 -0700284 cfg.BoolOpt('console_output',
285 default=True,
286 help="Does the test environment support obtaining instance "
287 "serial console output?"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000288 cfg.BoolOpt('resize',
289 default=False,
290 help="Does the test environment support resizing?"),
Eric Windischb5538072014-03-09 23:47:35 -0400291 cfg.BoolOpt('pause',
292 default=True,
293 help="Does the test environment support pausing?"),
David Shrewsbury25f666f2014-07-22 12:17:59 -0400294 cfg.BoolOpt('shelve',
295 default=True,
296 help="Does the test environment support shelving/unshelving?"),
Eric Windischaeb7e842014-03-10 01:10:50 -0400297 cfg.BoolOpt('suspend',
298 default=True,
299 help="Does the test environment support suspend/resume?"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000300 cfg.BoolOpt('live_migration',
301 default=False,
302 help="Does the test environment support live migration "
303 "available?"),
304 cfg.BoolOpt('block_migration_for_live_migration',
305 default=False,
306 help="Does the test environment use block devices for live "
307 "migration"),
308 cfg.BoolOpt('block_migrate_cinder_iscsi',
309 default=False,
310 help="Does the test environment block migration support "
Ghanshyam Mann41c17572014-02-27 18:52:56 +0900311 "cinder iSCSI volumes"),
312 cfg.BoolOpt('vnc_console',
313 default=False,
314 help='Enable VNC console. This configuration value should '
Ghanshyam70876d02014-03-11 11:40:18 +0900315 'be same as [nova.vnc]->vnc_enabled in nova.conf'),
316 cfg.BoolOpt('spice_console',
317 default=False,
318 help='Enable Spice console. This configuration value should '
319 'be same as [nova.spice]->enabled in nova.conf'),
320 cfg.BoolOpt('rdp_console',
321 default=False,
322 help='Enable RDP console. This configuration value should '
Adam Gandelman2e37b4f2014-06-18 17:34:21 -0700323 'be same as [nova.rdp]->enabled in nova.conf'),
324 cfg.BoolOpt('rescue',
325 default=True,
326 help='Does the test environment support instance rescue '
Ghanshyam9c2e50d2014-07-22 21:32:05 +0900327 'mode?'),
328 cfg.BoolOpt('enable_instance_password',
329 default=True,
330 help='Enables returning of the instance password by the '
331 'relevant server API calls such as create, rebuild '
Adam Gandelman7186f7a2014-07-23 09:28:56 -0400332 'or rescue.'),
333 cfg.BoolOpt('interface_attach',
334 default=True,
335 help='Does the test environment support dynamic network '
Adam Gandelmanfbc95ac2014-06-19 17:33:43 -0700336 'interface attachment?'),
337 cfg.BoolOpt('snapshot',
338 default=True,
339 help='Does the test environment support creating snapshot '
340 'images of running instances?')
Matthew Treinishd5c96022013-10-17 21:51:23 +0000341]
342
343
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500344compute_admin_group = cfg.OptGroup(name='compute-admin',
345 title="Compute Admin Options")
donald-ngo7fb1efa2011-12-13 17:17:36 -0800346
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500347ComputeAdminGroup = [
348 cfg.StrOpt('username',
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500349 help="Administrative Username to use for Nova API requests."),
350 cfg.StrOpt('tenant_name',
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500351 help="Administrative Tenant name to use for Nova API "
352 "requests."),
353 cfg.StrOpt('password',
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500354 help="API key to use when authenticating as admin.",
355 secret=True),
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100356 cfg.StrOpt('domain_name',
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100357 help="Domain name for authentication as admin (Keystone V3)."
358 "The same domain applies to user and project"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500359]
Daryl Walleck587385b2012-03-03 13:00:26 -0600360
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500361image_group = cfg.OptGroup(name='image',
362 title="Image Service Options")
Jay Pipesf38eaac2012-06-21 13:37:35 -0400363
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500364ImageGroup = [
Matthew Treinish72ea4422013-02-07 14:42:49 -0500365 cfg.StrOpt('catalog_type',
366 default='image',
Sean Dague83401992013-05-06 17:46:36 -0400367 help='Catalog type of the Image service.'),
Arata Notsu8f440392013-09-13 16:14:20 +0900368 cfg.StrOpt('region',
369 default='',
370 help="The image region name to use. If empty, the value "
371 "of identity.region is used instead. If no such region "
372 "is found in the service catalog, the first found one is "
373 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000374 cfg.StrOpt('endpoint_type',
375 default='publicURL',
376 choices=['public', 'admin', 'internal',
377 'publicURL', 'adminURL', 'internalURL'],
378 help="The endpoint type to use for the image service."),
Sean Dague83401992013-05-06 17:46:36 -0400379 cfg.StrOpt('http_image',
380 default='http://download.cirros-cloud.net/0.3.1/'
381 'cirros-0.3.1-x86_64-uec.tar.gz',
DennyZhang8912d012013-09-25 18:08:34 -0500382 help='http accessible image')
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500383]
Jay Pipesf38eaac2012-06-21 13:37:35 -0400384
Matthew Treinish2b5287d2013-10-22 17:40:34 +0000385image_feature_group = cfg.OptGroup(name='image-feature-enabled',
386 title='Enabled image service features')
387
388ImageFeaturesGroup = [
389 cfg.BoolOpt('api_v2',
390 default=True,
391 help="Is the v2 image API enabled"),
392 cfg.BoolOpt('api_v1',
393 default=True,
394 help="Is the v1 image API enabled"),
395]
Jay Pipesf38eaac2012-06-21 13:37:35 -0400396
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500397network_group = cfg.OptGroup(name='network',
398 title='Network Service Options')
Daryl Walleck587385b2012-03-03 13:00:26 -0600399
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500400NetworkGroup = [
401 cfg.StrOpt('catalog_type',
402 default='network',
Mark McClainf2982e82013-07-06 17:48:03 -0400403 help='Catalog type of the Neutron service.'),
Arata Notsu8f440392013-09-13 16:14:20 +0900404 cfg.StrOpt('region',
405 default='',
406 help="The network region name to use. If empty, the value "
407 "of identity.region is used instead. If no such region "
408 "is found in the service catalog, the first found one is "
409 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000410 cfg.StrOpt('endpoint_type',
411 default='publicURL',
412 choices=['public', 'admin', 'internal',
413 'publicURL', 'adminURL', 'internalURL'],
414 help="The endpoint type to use for the network service."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500415 cfg.StrOpt('tenant_network_cidr',
416 default="10.100.0.0/16",
Henry Gessauffda37a2014-01-16 11:17:55 -0500417 help="The cidr block to allocate tenant ipv4 subnets from"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500418 cfg.IntOpt('tenant_network_mask_bits',
Attila Fazekas8ea181b2013-07-13 16:26:14 +0200419 default=28,
Henry Gessauffda37a2014-01-16 11:17:55 -0500420 help="The mask bits for tenant ipv4 subnets"),
421 cfg.StrOpt('tenant_network_v6_cidr',
Sergey Shnaidman1f3659a2014-08-27 18:26:42 +0400422 default="2003::/48",
Henry Gessauffda37a2014-01-16 11:17:55 -0500423 help="The cidr block to allocate tenant ipv6 subnets from"),
424 cfg.IntOpt('tenant_network_v6_mask_bits',
Sergey Shnaidman1f3659a2014-08-27 18:26:42 +0400425 default=64,
Henry Gessauffda37a2014-01-16 11:17:55 -0500426 help="The mask bits for tenant ipv6 subnets"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500427 cfg.BoolOpt('tenant_networks_reachable',
428 default=False,
429 help="Whether tenant network connectivity should be "
430 "evaluated directly"),
431 cfg.StrOpt('public_network_id',
432 default="",
433 help="Id of the public network that provides external "
434 "connectivity"),
435 cfg.StrOpt('public_router_id',
436 default="",
437 help="Id of the public router that provides external "
438 "connectivity"),
izikpensod9a01a62014-02-17 20:02:32 +0200439 cfg.IntOpt('build_timeout',
440 default=300,
441 help="Timeout in seconds to wait for network operation to "
442 "complete."),
443 cfg.IntOpt('build_interval',
Sean Dague82190852014-05-24 07:42:59 -0400444 default=1,
izikpensod9a01a62014-02-17 20:02:32 +0200445 help="Time in seconds between network operation status "
446 "checks."),
Attila Fazekas640392b2014-06-12 15:58:10 +0200447 cfg.ListOpt('dns_servers',
448 default=["8.8.8.8", "8.8.4.4"],
449 help="List of dns servers whichs hould be used"
450 " for subnet creation")
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500451]
Jay Pipes3f981df2012-03-27 18:59:44 -0400452
Matthew Treinishe3d26142013-11-26 19:14:58 +0000453network_feature_group = cfg.OptGroup(name='network-feature-enabled',
454 title='Enabled network service features')
455
456NetworkFeaturesGroup = [
Matthew Treinishe2e33cf2014-03-03 19:28:41 +0000457 cfg.BoolOpt('ipv6',
458 default=True,
459 help="Allow the execution of IPv6 tests"),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000460 cfg.ListOpt('api_extensions',
461 default=['all'],
Zhi Kun Liude25c022014-02-14 13:25:19 +0800462 help='A list of enabled network extensions with a special '
Simeon Monov5d7effe2014-07-16 07:32:38 +0300463 'entry all which indicates every extension is enabled. '
464 'Empty list indicates all extensions are disabled'),
Sean M. Collinsdd27a4d2014-05-13 10:33:15 -0400465 cfg.BoolOpt('ipv6_subnet_attributes',
466 default=False,
467 help="Allow the execution of IPv6 subnet tests that use "
468 "the extended IPv6 attributes ipv6_ra_mode "
469 "and ipv6_address_mode"
470 )
Matthew Treinishe3d26142013-11-26 19:14:58 +0000471]
472
Victoria Martínez de la Cruz1173b6e2014-09-22 18:32:13 -0300473messaging_group = cfg.OptGroup(name='messaging',
474 title='Messaging Service')
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500475
Victoria Martínez de la Cruz1173b6e2014-09-22 18:32:13 -0300476MessagingGroup = [
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500477 cfg.StrOpt('catalog_type',
Victoria Martínez de la Cruz1173b6e2014-09-22 18:32:13 -0300478 default='messaging',
479 help='Catalog type of the Messaging service.'),
Jorge Chai83ba4ee2014-04-15 18:58:08 +0000480 cfg.IntOpt('max_queues_per_page',
481 default=20,
482 help='The maximum number of queue records per page when '
483 'listing queues'),
Malini Kamalambal7458b4b2014-05-29 11:47:28 -0400484 cfg.IntOpt('max_queue_metadata',
485 default=65536,
486 help='The maximum metadata size for a queue'),
487 cfg.IntOpt('max_messages_per_page',
488 default=20,
489 help='The maximum number of queue message per page when '
490 'listing (or) posting messages'),
491 cfg.IntOpt('max_message_size',
492 default=262144,
493 help='The maximum size of a message body'),
494 cfg.IntOpt('max_messages_per_claim',
495 default=20,
496 help='The maximum number of messages per claim'),
497 cfg.IntOpt('max_message_ttl',
498 default=1209600,
499 help='The maximum ttl for a message'),
500 cfg.IntOpt('max_claim_ttl',
501 default=43200,
502 help='The maximum ttl for a claim'),
503 cfg.IntOpt('max_claim_grace',
504 default=43200,
505 help='The maximum grace period for a claim'),
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500506]
507
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500508volume_group = cfg.OptGroup(name='volume',
509 title='Block Storage Options')
Daryl Walleck587385b2012-03-03 13:00:26 -0600510
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500511VolumeGroup = [
512 cfg.IntOpt('build_interval',
Sean Dague82190852014-05-24 07:42:59 -0400513 default=1,
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500514 help='Time in seconds between volume availability checks.'),
515 cfg.IntOpt('build_timeout',
516 default=300,
517 help='Timeout in seconds to wait for a volume to become'
518 'available.'),
519 cfg.StrOpt('catalog_type',
Matthew Treinisheb724512013-10-25 15:12:59 +0000520 default='volume',
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500521 help="Catalog type of the Volume Service"),
Arata Notsu8f440392013-09-13 16:14:20 +0900522 cfg.StrOpt('region',
523 default='',
524 help="The volume region name to use. If empty, the value "
525 "of identity.region is used instead. If no such region "
526 "is found in the service catalog, the first found one is "
527 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000528 cfg.StrOpt('endpoint_type',
529 default='publicURL',
530 choices=['public', 'admin', 'internal',
531 'publicURL', 'adminURL', 'internalURL'],
532 help="The endpoint type to use for the volume service."),
Jérôme Gallard86551ce2013-03-08 11:41:26 +0100533 cfg.StrOpt('backend1_name',
Giulio Fidentef4fa8942013-05-28 18:48:03 +0200534 default='BACKEND_1',
Jérôme Gallard86551ce2013-03-08 11:41:26 +0100535 help="Name of the backend1 (must be declared in cinder.conf)"),
536 cfg.StrOpt('backend2_name',
Giulio Fidentef4fa8942013-05-28 18:48:03 +0200537 default='BACKEND_2',
Jérôme Gallard86551ce2013-03-08 11:41:26 +0100538 help="Name of the backend2 (must be declared in cinder.conf)"),
Adam Gandelman827ad332013-06-24 17:04:09 -0700539 cfg.StrOpt('storage_protocol',
540 default='iSCSI',
541 help='Backend protocol to target when creating volume types'),
542 cfg.StrOpt('vendor_name',
543 default='Open Source',
544 help='Backend vendor to target when creating volume types'),
Ryan Hsua67f4632013-08-29 16:03:06 -0700545 cfg.StrOpt('disk_format',
546 default='raw',
547 help='Disk format to use when copying a volume to image'),
Jerry Cai9733d0e2014-03-19 15:50:49 +0800548 cfg.IntOpt('volume_size',
549 default=1,
550 help='Default size in GB for volumes created by volumes tests'),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500551]
K Jonathan Harkerd6ba4b42012-12-18 13:50:47 -0800552
Matthew Treinishd5c96022013-10-17 21:51:23 +0000553volume_feature_group = cfg.OptGroup(name='volume-feature-enabled',
554 title='Enabled Cinder Features')
555
556VolumeFeaturesGroup = [
557 cfg.BoolOpt('multi_backend',
558 default=False,
Matthew Treinishe3d26142013-11-26 19:14:58 +0000559 help="Runs Cinder multi-backend test (requires 2 backends)"),
Giulio Fidente74b08ad2014-01-18 04:02:51 +0100560 cfg.BoolOpt('backup',
561 default=True,
562 help='Runs Cinder volumes backup test'),
JordanPbce55532014-03-19 12:10:32 +0100563 cfg.BoolOpt('snapshot',
564 default=True,
565 help='Runs Cinder volume snapshot test'),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000566 cfg.ListOpt('api_extensions',
567 default=['all'],
Zhi Kun Liude25c022014-02-14 13:25:19 +0800568 help='A list of enabled volume extensions with a special '
Simeon Monov5d7effe2014-07-16 07:32:38 +0300569 'entry all which indicates every extension is enabled. '
570 'Empty list indicates all extensions are disabled'),
Zhi Kun Liubb363a22013-11-28 18:47:39 +0800571 cfg.BoolOpt('api_v1',
572 default=True,
573 help="Is the v1 volume API enabled"),
Zhi Kun Liu8cc3c842014-01-07 10:44:34 +0800574 cfg.BoolOpt('api_v2',
575 default=True,
576 help="Is the v2 volume API enabled"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000577]
578
Daryl Walleck587385b2012-03-03 13:00:26 -0600579
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500580object_storage_group = cfg.OptGroup(name='object-storage',
581 title='Object Storage Service Options')
Attila Fazekasa23f5002012-10-23 19:32:45 +0200582
DennyZhang1e71b612013-09-26 12:35:40 -0500583ObjectStoreGroup = [
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500584 cfg.StrOpt('catalog_type',
585 default='object-store',
586 help="Catalog type of the Object-Storage service."),
Arata Notsu8f440392013-09-13 16:14:20 +0900587 cfg.StrOpt('region',
588 default='',
589 help="The object-storage region name to use. If empty, the "
590 "value of identity.region is used instead. If no such "
591 "region is found in the service catalog, the first found "
592 "one is used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000593 cfg.StrOpt('endpoint_type',
594 default='publicURL',
595 choices=['public', 'admin', 'internal',
596 'publicURL', 'adminURL', 'internalURL'],
597 help="The endpoint type to use for the object-store service."),
Matthew Treinishf319a732013-10-24 21:39:24 +0000598 cfg.IntOpt('container_sync_timeout',
nayna-patelb4989b32013-01-09 06:25:13 +0000599 default=120,
Fabien Boucher2178d312013-12-31 15:38:57 +0100600 help="Number of seconds to time on waiting for a container "
nayna-patelb4989b32013-01-09 06:25:13 +0000601 "to container synchronization complete."),
Matthew Treinishf319a732013-10-24 21:39:24 +0000602 cfg.IntOpt('container_sync_interval',
nayna-patelb4989b32013-01-09 06:25:13 +0000603 default=5,
Fabien Boucher2178d312013-12-31 15:38:57 +0100604 help="Number of seconds to wait while looping to check the "
nayna-patelb4989b32013-01-09 06:25:13 +0000605 "status of a container to container synchronization"),
Matthew Treinish3fdb80c2013-08-15 11:13:19 -0400606 cfg.StrOpt('operator_role',
607 default='Member',
608 help="Role to add to users created for swift tests to "
609 "enable creating containers"),
Matthew Treinish998c91d2014-03-01 12:39:49 -0500610 cfg.StrOpt('reseller_admin_role',
611 default='ResellerAdmin',
612 help="User role that has reseller admin"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500613]
Attila Fazekasa23f5002012-10-23 19:32:45 +0200614
Matthew Treinishd5c96022013-10-17 21:51:23 +0000615object_storage_feature_group = cfg.OptGroup(
616 name='object-storage-feature-enabled',
617 title='Enabled object-storage features')
618
619ObjectStoreFeaturesGroup = [
Matthew Treinish20345382013-12-13 17:04:23 +0000620 cfg.ListOpt('discoverable_apis',
621 default=['all'],
622 help="A list of the enabled optional discoverable apis. "
623 "A single entry, all, indicates that all of these "
624 "features are expected to be enabled"),
Daisuke Morita20a183f2014-08-25 14:43:36 +0900625 cfg.BoolOpt('container_sync',
626 default=True,
627 help="Execute (old style) container-sync tests"),
628 cfg.BoolOpt('object_versioning',
629 default=True,
630 help="Execute object-versioning tests"),
631 cfg.BoolOpt('discoverability',
632 default=True,
633 help="Execute discoverability tests"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000634]
635
Nikhil Manchandadd6886f2014-03-03 01:58:45 -0800636database_group = cfg.OptGroup(name='database',
637 title='Database Service Options')
638
639DatabaseGroup = [
640 cfg.StrOpt('catalog_type',
641 default='database',
642 help="Catalog type of the Database service."),
643 cfg.StrOpt('db_flavor_ref',
644 default="1",
645 help="Valid primary flavor to use in database tests."),
Peter Stachowski320f9c72014-04-21 16:13:23 -0400646 cfg.StrOpt('db_current_version',
647 default="v1.0",
648 help="Current database version to use in database tests."),
Nikhil Manchandadd6886f2014-03-03 01:58:45 -0800649]
Attila Fazekasa23f5002012-10-23 19:32:45 +0200650
Steve Bakerc60e4e32013-05-06 15:22:41 +1200651orchestration_group = cfg.OptGroup(name='orchestration',
652 title='Orchestration Service Options')
653
654OrchestrationGroup = [
655 cfg.StrOpt('catalog_type',
656 default='orchestration',
657 help="Catalog type of the Orchestration service."),
Arata Notsu8f440392013-09-13 16:14:20 +0900658 cfg.StrOpt('region',
659 default='',
660 help="The orchestration region name to use. If empty, the "
661 "value of identity.region is used instead. If no such "
662 "region is found in the service catalog, the first found "
663 "one is used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000664 cfg.StrOpt('endpoint_type',
665 default='publicURL',
666 choices=['public', 'admin', 'internal',
667 'publicURL', 'adminURL', 'internalURL'],
668 help="The endpoint type to use for the orchestration service."),
Steve Bakerc60e4e32013-05-06 15:22:41 +1200669 cfg.BoolOpt('allow_tenant_isolation',
670 default=False,
671 help="Allows test cases to create/destroy tenants and "
672 "users. This option enables isolated test cases and "
673 "better parallel execution, but also requires that "
674 "OpenStack Identity API admin credentials are known."),
675 cfg.IntOpt('build_interval',
676 default=1,
677 help="Time in seconds between build status checks."),
678 cfg.IntOpt('build_timeout',
Matthew Treinisha2dfd492014-04-15 11:15:34 -0400679 default=1200,
Steve Bakerc60e4e32013-05-06 15:22:41 +1200680 help="Timeout in seconds to wait for a stack to build."),
Steve Bakerc60e4e32013-05-06 15:22:41 +1200681 cfg.StrOpt('instance_type',
Steve Baker9e86b832013-05-22 15:40:28 +1200682 default='m1.micro',
Steve Bakerc60e4e32013-05-06 15:22:41 +1200683 help="Instance type for tests. Needs to be big enough for a "
684 "full OS plus the test workload"),
685 cfg.StrOpt('image_ref',
Steve Bakerc60e4e32013-05-06 15:22:41 +1200686 help="Name of heat-cfntools enabled image to use when "
687 "launching test instances."),
688 cfg.StrOpt('keypair_name',
Steve Bakerc60e4e32013-05-06 15:22:41 +1200689 help="Name of existing keypair to launch servers with."),
Clint Byrum71f27632013-09-09 11:41:32 -0700690 cfg.IntOpt('max_template_size',
Joe Gordon0e51b222013-10-24 14:11:10 +0100691 default=524288,
Clint Byrum71f27632013-09-09 11:41:32 -0700692 help="Value must match heat configuration of the same name."),
Steven Hardyfdc6bd72014-03-21 16:56:04 +0000693 cfg.IntOpt('max_resources_per_stack',
694 default=1000,
695 help="Value must match heat configuration of the same name."),
Steve Bakerc60e4e32013-05-06 15:22:41 +1200696]
697
698
Yassine Lamgarchalb158d412013-12-27 19:29:42 +0100699telemetry_group = cfg.OptGroup(name='telemetry',
700 title='Telemetry Service Options')
701
702TelemetryGroup = [
703 cfg.StrOpt('catalog_type',
704 default='metering',
705 help="Catalog type of the Telemetry service."),
JordanPfc62c902014-02-26 14:47:28 +0000706 cfg.StrOpt('endpoint_type',
707 default='publicURL',
708 choices=['public', 'admin', 'internal',
709 'publicURL', 'adminURL', 'internalURL'],
710 help="The endpoint type to use for the telemetry service."),
Vadim Rovachev7bcea352013-12-26 15:56:17 +0400711 cfg.BoolOpt('too_slow_to_test',
712 default=True,
713 help="This variable is used as flag to enable "
714 "notification tests")
Yassine Lamgarchalb158d412013-12-27 19:29:42 +0100715]
716
717
Julie Pichond1017642013-07-24 16:37:23 +0100718dashboard_group = cfg.OptGroup(name="dashboard",
719 title="Dashboard options")
720
721DashboardGroup = [
722 cfg.StrOpt('dashboard_url',
723 default='http://localhost/',
724 help="Where the dashboard can be found"),
725 cfg.StrOpt('login_url',
726 default='http://localhost/auth/login/',
727 help="Login page for the dashboard"),
728]
729
730
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +0400731data_processing_group = cfg.OptGroup(name="data_processing",
732 title="Data Processing options")
733
734DataProcessingGroup = [
735 cfg.StrOpt('catalog_type',
736 default='data_processing',
JordanPfc62c902014-02-26 14:47:28 +0000737 help="Catalog type of the data processing service."),
738 cfg.StrOpt('endpoint_type',
739 default='publicURL',
740 choices=['public', 'admin', 'internal',
741 'publicURL', 'adminURL', 'internalURL'],
742 help="The endpoint type to use for the data processing "
743 "service."),
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +0400744]
745
746
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500747boto_group = cfg.OptGroup(name='boto',
748 title='EC2/S3 options')
DennyZhang1e71b612013-09-26 12:35:40 -0500749BotoGroup = [
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500750 cfg.StrOpt('ec2_url',
751 default="http://localhost:8773/services/Cloud",
752 help="EC2 URL"),
753 cfg.StrOpt('s3_url',
754 default="http://localhost:8080",
755 help="S3 URL"),
756 cfg.StrOpt('aws_secret',
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500757 help="AWS Secret Key",
758 secret=True),
759 cfg.StrOpt('aws_access',
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500760 help="AWS Access Key"),
Attila Fazekas27dd92e2014-02-21 14:49:40 +0100761 cfg.StrOpt('aws_zone',
762 default="nova",
763 help="AWS Zone for EC2 tests"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500764 cfg.StrOpt('s3_materials_path',
765 default="/opt/stack/devstack/files/images/"
766 "s3-materials/cirros-0.3.0",
767 help="S3 Materials Path"),
768 cfg.StrOpt('ari_manifest',
769 default="cirros-0.3.0-x86_64-initrd.manifest.xml",
770 help="ARI Ramdisk Image manifest"),
771 cfg.StrOpt('ami_manifest',
772 default="cirros-0.3.0-x86_64-blank.img.manifest.xml",
773 help="AMI Machine Image manifest"),
774 cfg.StrOpt('aki_manifest',
775 default="cirros-0.3.0-x86_64-vmlinuz.manifest.xml",
776 help="AKI Kernel Image manifest"),
777 cfg.StrOpt('instance_type',
778 default="m1.tiny",
779 help="Instance type"),
780 cfg.IntOpt('http_socket_timeout',
781 default=3,
782 help="boto Http socket timeout"),
783 cfg.IntOpt('num_retries',
784 default=1,
785 help="boto num_retries on error"),
786 cfg.IntOpt('build_timeout',
787 default=60,
788 help="Status Change Timeout"),
789 cfg.IntOpt('build_interval',
790 default=1,
791 help="Status Change Test Interval"),
792]
Attila Fazekasf7f2d932012-12-13 09:14:38 +0100793
Matthew Treinish615ea6a2013-02-25 17:26:59 -0500794stress_group = cfg.OptGroup(name='stress', title='Stress Test Options')
795
796StressGroup = [
797 cfg.StrOpt('nova_logdir',
Matthew Treinish615ea6a2013-02-25 17:26:59 -0500798 help='Directory containing log files on the compute nodes'),
799 cfg.IntOpt('max_instances',
800 default=16,
801 help='Maximum number of instances to create during test.'),
802 cfg.StrOpt('controller',
David Kranzb9d97502013-05-01 15:55:04 -0400803 help='Controller host.'),
804 # new stress options
805 cfg.StrOpt('target_controller',
David Kranzb9d97502013-05-01 15:55:04 -0400806 help='Controller host.'),
807 cfg.StrOpt('target_ssh_user',
David Kranzb9d97502013-05-01 15:55:04 -0400808 help='ssh user.'),
809 cfg.StrOpt('target_private_key_path',
David Kranzb9d97502013-05-01 15:55:04 -0400810 help='Path to private key.'),
811 cfg.StrOpt('target_logfiles',
David Kranzb9d97502013-05-01 15:55:04 -0400812 help='regexp for list of log files.'),
Matthew Treinishf319a732013-10-24 21:39:24 +0000813 cfg.IntOpt('log_check_interval',
David Kranzb9d97502013-05-01 15:55:04 -0400814 default=60,
Marc Koderer32221b8e2013-08-23 13:57:50 +0200815 help='time (in seconds) between log file error checks.'),
Matthew Treinishf319a732013-10-24 21:39:24 +0000816 cfg.IntOpt('default_thread_number_per_action',
Marc Koderer32221b8e2013-08-23 13:57:50 +0200817 default=4,
Julien Leloup04d40f72014-01-28 11:17:18 +0100818 help='The number of threads created while stress test.'),
819 cfg.BoolOpt('leave_dirty_stack',
820 default=False,
821 help='Prevent the cleaning (tearDownClass()) between'
822 ' each stress test run if an exception occurs'
Julien Leloupa5ee5422014-02-13 14:29:02 +0100823 ' during this run.'),
824 cfg.BoolOpt('full_clean_stack',
825 default=False,
826 help='Allows a full cleaning process after a stress test.'
827 ' Caution : this cleanup will remove every objects of'
828 ' every tenant.')
Matthew Treinish615ea6a2013-02-25 17:26:59 -0500829]
830
831
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +0900832scenario_group = cfg.OptGroup(name='scenario', title='Scenario Test Options')
833
834ScenarioGroup = [
835 cfg.StrOpt('img_dir',
836 default='/opt/stack/new/devstack/files/images/'
837 'cirros-0.3.1-x86_64-uec',
838 help='Directory containing image files'),
Alessandro Pilottib7c1daa2014-08-16 14:24:13 +0300839 cfg.StrOpt('img_file', deprecated_name='qcow2_img_file',
Masayuki Igawa4f71bf02014-02-21 14:02:29 +0900840 default='cirros-0.3.1-x86_64-disk.img',
Alessandro Pilottib7c1daa2014-08-16 14:24:13 +0300841 help='Image file name'),
842 cfg.StrOpt('img_disk_format',
843 default='qcow2',
844 help='Image disk format'),
845 cfg.StrOpt('img_container_format',
846 default='bare',
847 help='Image container format'),
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +0900848 cfg.StrOpt('ami_img_file',
849 default='cirros-0.3.1-x86_64-blank.img',
850 help='AMI image file name'),
851 cfg.StrOpt('ari_img_file',
852 default='cirros-0.3.1-x86_64-initrd',
853 help='ARI image file name'),
854 cfg.StrOpt('aki_img_file',
855 default='cirros-0.3.1-x86_64-vmlinuz',
856 help='AKI image file name'),
857 cfg.StrOpt('ssh_user',
858 default='cirros',
Joe Gordonb5e10cd2013-07-10 15:51:12 +0000859 help='ssh username for the image file'),
860 cfg.IntOpt(
861 'large_ops_number',
862 default=0,
863 help="specifies how many resources to request at once. Used "
864 "for large operations testing.")
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +0900865]
866
867
Matthew Treinish4c412922013-07-16 15:27:42 -0400868service_available_group = cfg.OptGroup(name="service_available",
869 title="Available OpenStack Services")
870
871ServiceAvailableGroup = [
872 cfg.BoolOpt('cinder',
873 default=True,
874 help="Whether or not cinder is expected to be available"),
Matthew Treinishfaa340d2013-07-19 16:26:21 -0400875 cfg.BoolOpt('neutron',
876 default=False,
877 help="Whether or not neutron is expected to be available"),
Matthew Treinish853ae442013-07-19 16:36:07 -0400878 cfg.BoolOpt('glance',
879 default=True,
880 help="Whether or not glance is expected to be available"),
Matthew Treinish61e332b2013-07-19 16:42:31 -0400881 cfg.BoolOpt('swift',
882 default=True,
883 help="Whether or not swift is expected to be available"),
Matthew Treinish6b41e242013-07-19 16:49:28 -0400884 cfg.BoolOpt('nova',
885 default=True,
886 help="Whether or not nova is expected to be available"),
Matthew Treinisha9d43882013-07-19 16:54:52 -0400887 cfg.BoolOpt('heat',
888 default=False,
889 help="Whether or not Heat is expected to be available"),
Mehdi Abaakouk8581c0b2013-10-04 10:45:42 +0200890 cfg.BoolOpt('ceilometer',
891 default=True,
892 help="Whether or not Ceilometer is expected to be available"),
Julie Pichond1017642013-07-24 16:37:23 +0100893 cfg.BoolOpt('horizon',
894 default=True,
895 help="Whether or not Horizon is expected to be available"),
Sergey Lukjanov9c95a252014-03-13 23:59:22 +0400896 cfg.BoolOpt('sahara',
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +0400897 default=False,
Sergey Lukjanov9c95a252014-03-13 23:59:22 +0400898 help="Whether or not Sahara is expected to be available"),
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +0300899 cfg.BoolOpt('ironic',
900 default=False,
901 help="Whether or not Ironic is expected to be available"),
Nikhil Manchandadd6886f2014-03-03 01:58:45 -0800902 cfg.BoolOpt('trove',
903 default=False,
904 help="Whether or not Trove is expected to be available"),
Malini Kamalambal8681e922014-08-18 10:10:45 -0400905 cfg.BoolOpt('zaqar',
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500906 default=False,
Malini Kamalambal8681e922014-08-18 10:10:45 -0400907 help="Whether or not Zaqar is expected to be available"),
Matthew Treinish4c412922013-07-16 15:27:42 -0400908]
909
Attila Fazekasaeeeefd2013-08-06 17:01:56 +0200910debug_group = cfg.OptGroup(name="debug",
911 title="Debug System")
912
913DebugGroup = [
914 cfg.BoolOpt('enable',
915 default=True,
916 help="Enable diagnostic commands"),
Sean Daguec522c092014-03-24 10:43:22 -0400917 cfg.StrOpt('trace_requests',
918 default='',
919 help="""A regex to determine which requests should be traced.
920
921This is a regex to match the caller for rest client requests to be able to
922selectively trace calls out of specific classes and methods. It largely
923exists for test development, and is not expected to be used in a real deploy
924of tempest. This will be matched against the discovered ClassName:method
925in the test environment.
926
927Expected values for this field are:
928
929 * ClassName:test_method_name - traces one test_method
930 * ClassName:setUp(Class) - traces specific setup functions
931 * ClassName:tearDown(Class) - traces specific teardown functions
932 * ClassName:_run_cleanups - traces the cleanup functions
933
934If nothing is specified, this feature is not enabled. To trace everything
935specify .* as the regex.
936""")
Attila Fazekasaeeeefd2013-08-06 17:01:56 +0200937]
938
Andrea Frittolif5da28b2013-12-06 07:08:07 +0000939input_scenario_group = cfg.OptGroup(name="input-scenario",
940 title="Filters and values for"
941 " input scenarios")
942
943InputScenarioGroup = [
944 cfg.StrOpt('image_regex',
945 default='^cirros-0.3.1-x86_64-uec$',
946 help="Matching images become parameters for scenario tests"),
947 cfg.StrOpt('flavor_regex',
Andrea Frittoli99901c02014-01-30 18:06:49 +0000948 default='^m1.nano$',
Andrea Frittolif5da28b2013-12-06 07:08:07 +0000949 help="Matching flavors become parameters for scenario tests"),
950 cfg.StrOpt('non_ssh_image_regex',
951 default='^.*[Ww]in.*$',
952 help="SSH verification in tests is skipped"
953 "for matching images"),
954 cfg.StrOpt('ssh_user_regex',
955 default="[[\"^.*[Cc]irros.*$\", \"root\"]]",
956 help="List of user mapped to regex "
957 "to matching image names."),
958]
959
Attila Fazekasaeeeefd2013-08-06 17:01:56 +0200960
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +0300961baremetal_group = cfg.OptGroup(name='baremetal',
962 title='Baremetal provisioning service options')
963
964BaremetalGroup = [
965 cfg.StrOpt('catalog_type',
966 default='baremetal',
Adam Gandelman4a48a602014-03-20 18:23:18 -0700967 help="Catalog type of the baremetal provisioning service"),
968 cfg.BoolOpt('driver_enabled',
969 default=False,
970 help="Whether the Ironic nova-compute driver is enabled"),
Yuiko Takada1ee1b322014-07-04 09:55:30 +0900971 cfg.StrOpt('driver',
972 default='fake',
973 help="Driver name which Ironic uses"),
JordanPfc62c902014-02-26 14:47:28 +0000974 cfg.StrOpt('endpoint_type',
975 default='publicURL',
976 choices=['public', 'admin', 'internal',
977 'publicURL', 'adminURL', 'internalURL'],
978 help="The endpoint type to use for the baremetal provisioning "
Adam Gandelman4a48a602014-03-20 18:23:18 -0700979 "service"),
980 cfg.IntOpt('active_timeout',
981 default=300,
982 help="Timeout for Ironic node to completely provision"),
983 cfg.IntOpt('association_timeout',
Adam Gandelmane42f0922014-06-10 15:26:37 -0700984 default=30,
Adam Gandelman4a48a602014-03-20 18:23:18 -0700985 help="Timeout for association of Nova instance and Ironic "
986 "node"),
987 cfg.IntOpt('power_timeout',
Adam Gandelmane42f0922014-06-10 15:26:37 -0700988 default=60,
Adam Gandelman4a48a602014-03-20 18:23:18 -0700989 help="Timeout for Ironic power transitions."),
990 cfg.IntOpt('unprovision_timeout',
Adam Gandelmane42f0922014-06-10 15:26:37 -0700991 default=60,
Adam Gandelman4a48a602014-03-20 18:23:18 -0700992 help="Timeout for unprovisioning an Ironic node.")
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +0300993]
994
Matthew Treinishe2b56b52014-01-29 19:25:50 +0000995cli_group = cfg.OptGroup(name='cli', title="cli Configuration Options")
996
997CLIGroup = [
998 cfg.BoolOpt('enabled',
999 default=True,
1000 help="enable cli tests"),
1001 cfg.StrOpt('cli_dir',
1002 default='/usr/local/bin',
1003 help="directory where python client binaries are located"),
Sean Dague44b24682014-02-20 19:08:24 -05001004 cfg.BoolOpt('has_manage',
1005 default=True,
1006 help=("Whether the tempest run location has access to the "
1007 "*-manage commands. In a pure blackbox environment "
1008 "it will not.")),
Matthew Treinishe2b56b52014-01-29 19:25:50 +00001009 cfg.IntOpt('timeout',
1010 default=15,
1011 help="Number of seconds to wait on a CLI timeout"),
1012]
1013
Marc Koderer6ee82dc2014-02-17 10:26:29 +01001014negative_group = cfg.OptGroup(name='negative', title="Negative Test Options")
1015
1016NegativeGroup = [
1017 cfg.StrOpt('test_generator',
1018 default='tempest.common.' +
1019 'generator.negative_generator.NegativeTestGenerator',
1020 help="Test generator class for all negative tests"),
1021]
1022
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +03001023
Matthew Treinish43b296a2014-02-28 15:23:00 -05001024def register_opts():
Matthew Treinishc791ac42014-07-16 09:15:23 -04001025 register_opt_group(cfg.CONF, auth_group, AuthGroup)
Matthew Treinish43b296a2014-02-28 15:23:00 -05001026 register_opt_group(cfg.CONF, compute_group, ComputeGroup)
1027 register_opt_group(cfg.CONF, compute_features_group,
1028 ComputeFeaturesGroup)
1029 register_opt_group(cfg.CONF, identity_group, IdentityGroup)
1030 register_opt_group(cfg.CONF, identity_feature_group,
1031 IdentityFeatureGroup)
1032 register_opt_group(cfg.CONF, image_group, ImageGroup)
1033 register_opt_group(cfg.CONF, image_feature_group, ImageFeaturesGroup)
1034 register_opt_group(cfg.CONF, network_group, NetworkGroup)
1035 register_opt_group(cfg.CONF, network_feature_group,
1036 NetworkFeaturesGroup)
Victoria Martínez de la Cruz1173b6e2014-09-22 18:32:13 -03001037 register_opt_group(cfg.CONF, messaging_group, MessagingGroup)
Matthew Treinish43b296a2014-02-28 15:23:00 -05001038 register_opt_group(cfg.CONF, volume_group, VolumeGroup)
1039 register_opt_group(cfg.CONF, volume_feature_group,
1040 VolumeFeaturesGroup)
1041 register_opt_group(cfg.CONF, object_storage_group, ObjectStoreGroup)
1042 register_opt_group(cfg.CONF, object_storage_feature_group,
1043 ObjectStoreFeaturesGroup)
Nikhil Manchandadd6886f2014-03-03 01:58:45 -08001044 register_opt_group(cfg.CONF, database_group, DatabaseGroup)
Matthew Treinish43b296a2014-02-28 15:23:00 -05001045 register_opt_group(cfg.CONF, orchestration_group, OrchestrationGroup)
1046 register_opt_group(cfg.CONF, telemetry_group, TelemetryGroup)
1047 register_opt_group(cfg.CONF, dashboard_group, DashboardGroup)
1048 register_opt_group(cfg.CONF, data_processing_group,
1049 DataProcessingGroup)
1050 register_opt_group(cfg.CONF, boto_group, BotoGroup)
1051 register_opt_group(cfg.CONF, compute_admin_group, ComputeAdminGroup)
1052 register_opt_group(cfg.CONF, stress_group, StressGroup)
1053 register_opt_group(cfg.CONF, scenario_group, ScenarioGroup)
1054 register_opt_group(cfg.CONF, service_available_group,
1055 ServiceAvailableGroup)
1056 register_opt_group(cfg.CONF, debug_group, DebugGroup)
1057 register_opt_group(cfg.CONF, baremetal_group, BaremetalGroup)
1058 register_opt_group(cfg.CONF, input_scenario_group, InputScenarioGroup)
1059 register_opt_group(cfg.CONF, cli_group, CLIGroup)
Marc Koderer6ee82dc2014-02-17 10:26:29 +01001060 register_opt_group(cfg.CONF, negative_group, NegativeGroup)
Matthew Treinish43b296a2014-02-28 15:23:00 -05001061
1062
Sean Dague3b9b1f32013-12-20 17:04:54 -05001063# this should never be called outside of this class
1064class TempestConfigPrivate(object):
Daryl Walleck1465d612011-11-02 02:22:15 -05001065 """Provides OpenStack configuration information."""
1066
Brian Waldon738cd632011-12-12 18:45:09 -05001067 DEFAULT_CONFIG_DIR = os.path.join(
Zhongyue Luoa1343de2013-01-04 16:21:35 +08001068 os.path.abspath(os.path.dirname(os.path.dirname(__file__))),
Brian Waldon738cd632011-12-12 18:45:09 -05001069 "etc")
Daryl Walleck1465d612011-11-02 02:22:15 -05001070
Brian Waldon738cd632011-12-12 18:45:09 -05001071 DEFAULT_CONFIG_FILE = "tempest.conf"
1072
Andrea Frittolia96ee212014-08-15 18:34:20 +01001073 def __getattr__(self, attr):
1074 # Handles config options from the default group
1075 return getattr(cfg.CONF, attr)
1076
Matthew Treinish43b296a2014-02-28 15:23:00 -05001077 def _set_attrs(self):
Matthew Treinishc791ac42014-07-16 09:15:23 -04001078 self.auth = cfg.CONF.auth
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001079 self.compute = cfg.CONF.compute
Matthew Treinishd5c96022013-10-17 21:51:23 +00001080 self.compute_feature_enabled = cfg.CONF['compute-feature-enabled']
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001081 self.identity = cfg.CONF.identity
Matthew Treinishd5021a72014-01-09 18:42:51 +00001082 self.identity_feature_enabled = cfg.CONF['identity-feature-enabled']
Matt Riedemannd3efe902014-02-10 06:46:38 -08001083 self.image = cfg.CONF.image
Matthew Treinish2b5287d2013-10-22 17:40:34 +00001084 self.image_feature_enabled = cfg.CONF['image-feature-enabled']
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001085 self.network = cfg.CONF.network
Matthew Treinishe3d26142013-11-26 19:14:58 +00001086 self.network_feature_enabled = cfg.CONF['network-feature-enabled']
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001087 self.volume = cfg.CONF.volume
Matthew Treinishd5c96022013-10-17 21:51:23 +00001088 self.volume_feature_enabled = cfg.CONF['volume-feature-enabled']
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001089 self.object_storage = cfg.CONF['object-storage']
Matthew Treinishd5c96022013-10-17 21:51:23 +00001090 self.object_storage_feature_enabled = cfg.CONF[
1091 'object-storage-feature-enabled']
Nikhil Manchandadd6886f2014-03-03 01:58:45 -08001092 self.database = cfg.CONF.database
Steve Bakerc60e4e32013-05-06 15:22:41 +12001093 self.orchestration = cfg.CONF.orchestration
Victoria Martínez de la Cruz1173b6e2014-09-22 18:32:13 -03001094 self.messaging = cfg.CONF.messaging
Yassine Lamgarchalb158d412013-12-27 19:29:42 +01001095 self.telemetry = cfg.CONF.telemetry
Julie Pichond1017642013-07-24 16:37:23 +01001096 self.dashboard = cfg.CONF.dashboard
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +04001097 self.data_processing = cfg.CONF.data_processing
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001098 self.boto = cfg.CONF.boto
Attila Fazekascadcb1f2013-01-21 23:10:53 +01001099 self.compute_admin = cfg.CONF['compute-admin']
Matthew Treinish615ea6a2013-02-25 17:26:59 -05001100 self.stress = cfg.CONF.stress
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +09001101 self.scenario = cfg.CONF.scenario
Matthew Treinish4c412922013-07-16 15:27:42 -04001102 self.service_available = cfg.CONF.service_available
Attila Fazekas5fae7a32013-09-25 16:52:44 +02001103 self.debug = cfg.CONF.debug
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +03001104 self.baremetal = cfg.CONF.baremetal
Andrea Frittolif5da28b2013-12-06 07:08:07 +00001105 self.input_scenario = cfg.CONF['input-scenario']
Matthew Treinishe2b56b52014-01-29 19:25:50 +00001106 self.cli = cfg.CONF.cli
Marc Koderer6ee82dc2014-02-17 10:26:29 +01001107 self.negative = cfg.CONF.negative
Attila Fazekascadcb1f2013-01-21 23:10:53 +01001108 if not self.compute_admin.username:
1109 self.compute_admin.username = self.identity.admin_username
1110 self.compute_admin.password = self.identity.admin_password
1111 self.compute_admin.tenant_name = self.identity.admin_tenant_name
Andrea Frittolib1b04bb2014-04-06 11:57:07 +01001112 cfg.CONF.set_default('domain_name', self.identity.admin_domain_name,
1113 group='identity')
1114 cfg.CONF.set_default('alt_domain_name',
1115 self.identity.admin_domain_name,
1116 group='identity')
1117 cfg.CONF.set_default('domain_name', self.identity.admin_domain_name,
1118 group='compute-admin')
Sean Dague86bd8422013-12-20 09:56:44 -05001119
Joe Gordon28a84ae2014-07-17 15:38:28 +00001120 def __init__(self, parse_conf=True, config_path=None):
Matthew Treinish43b296a2014-02-28 15:23:00 -05001121 """Initialize a configuration from a conf directory and conf file."""
1122 super(TempestConfigPrivate, self).__init__()
1123 config_files = []
1124 failsafe_path = "/etc/tempest/" + self.DEFAULT_CONFIG_FILE
1125
Joe Gordon28a84ae2014-07-17 15:38:28 +00001126 if config_path:
1127 path = config_path
1128 else:
1129 # Environment variables override defaults...
1130 conf_dir = os.environ.get('TEMPEST_CONFIG_DIR',
1131 self.DEFAULT_CONFIG_DIR)
1132 conf_file = os.environ.get('TEMPEST_CONFIG',
1133 self.DEFAULT_CONFIG_FILE)
Matthew Treinish43b296a2014-02-28 15:23:00 -05001134
Joe Gordon28a84ae2014-07-17 15:38:28 +00001135 path = os.path.join(conf_dir, conf_file)
Matthew Treinish43b296a2014-02-28 15:23:00 -05001136
1137 if not os.path.isfile(path):
1138 path = failsafe_path
1139
1140 # only parse the config file if we expect one to exist. This is needed
1141 # to remove an issue with the config file up to date checker.
1142 if parse_conf:
1143 config_files.append(path)
Matthew Treinish5440a402014-10-02 14:36:16 -04001144 if os.path.isfile(path):
1145 cfg.CONF([], project='tempest', default_config_files=config_files)
1146 else:
1147 cfg.CONF([], project='tempest')
Matthew Treinish43b296a2014-02-28 15:23:00 -05001148 logging.setup('tempest')
1149 LOG = logging.getLogger('tempest')
1150 LOG.info("Using tempest config file %s" % path)
1151 register_opts()
1152 self._set_attrs()
Masayuki Igawa9ec4cd82014-02-05 15:04:16 +09001153 if parse_conf:
1154 cfg.CONF.log_opt_values(LOG, std_logging.DEBUG)
1155
Sean Dague86bd8422013-12-20 09:56:44 -05001156
1157class TempestConfigProxy(object):
1158 _config = None
Joe Gordon28a84ae2014-07-17 15:38:28 +00001159 _path = None
Sean Dague86bd8422013-12-20 09:56:44 -05001160
Sean Daguedb6ac6c2014-06-06 16:52:44 -04001161 _extra_log_defaults = [
1162 'keystoneclient.session=INFO',
1163 'paramiko.transport=INFO',
1164 'requests.packages.urllib3.connectionpool=WARN'
1165 ]
1166
1167 def _fix_log_levels(self):
1168 """Tweak the oslo log defaults."""
1169 for opt in logging.log_opts:
1170 if opt.dest == 'default_log_levels':
1171 opt.default.extend(self._extra_log_defaults)
1172
Sean Dague86bd8422013-12-20 09:56:44 -05001173 def __getattr__(self, attr):
1174 if not self._config:
Sean Daguedb6ac6c2014-06-06 16:52:44 -04001175 self._fix_log_levels()
Joe Gordon28a84ae2014-07-17 15:38:28 +00001176 self._config = TempestConfigPrivate(config_path=self._path)
Sean Dague86bd8422013-12-20 09:56:44 -05001177
1178 return getattr(self._config, attr)
1179
Joe Gordon28a84ae2014-07-17 15:38:28 +00001180 def set_config_path(self, path):
1181 self._path = path
1182
Sean Dague86bd8422013-12-20 09:56:44 -05001183
1184CONF = TempestConfigProxy()