blob: 7d195bfd0e93eae86483d6109067965a45d5316e [file] [log] [blame]
ZhiQiang Fan39f97222013-09-20 04:49:44 +08001# Copyright 2012 OpenStack Foundation
Jay Pipes3f981df2012-03-27 18:59:44 -04002# All Rights Reserved.
3#
4# Licensed under the Apache License, Version 2.0 (the "License"); you may
5# not use this file except in compliance with the License. You may obtain
6# a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13# License for the specific language governing permissions and limitations
14# under the License.
15
Dirk Muellere746fc22013-06-29 16:29:29 +020016from __future__ import print_function
17
Masayuki Igawa9ec4cd82014-02-05 15:04:16 +090018import logging as std_logging
Jay Pipes7f757632011-12-02 15:53:32 -050019import os
Jay Pipes3f981df2012-03-27 18:59:44 -040020
Matthew Treinish90aedd12013-02-25 17:56:49 -050021from oslo.config import cfg
22
Matthew Treinishf4a9b0f2013-07-26 16:58:26 -040023from tempest.openstack.common import log as logging
Jay Pipes7f757632011-12-02 15:53:32 -050024
Daryl Walleck1465d612011-11-02 02:22:15 -050025
DennyZhang88a2dd82013-10-07 12:55:35 -050026def register_opt_group(conf, opt_group, options):
27 conf.register_group(opt_group)
28 for opt in options:
29 conf.register_opt(opt, group=opt_group.name)
30
31
Matthew Treinish39e48ef2012-12-21 13:36:15 -050032identity_group = cfg.OptGroup(name='identity',
33 title="Keystone Configuration Options")
Daryl Walleck1465d612011-11-02 02:22:15 -050034
Matthew Treinish39e48ef2012-12-21 13:36:15 -050035IdentityGroup = [
36 cfg.StrOpt('catalog_type',
37 default='identity',
38 help="Catalog type of the Identity service."),
Jay Pipescd8eaec2013-01-16 21:03:48 -050039 cfg.BoolOpt('disable_ssl_certificate_validation',
40 default=False,
41 help="Set to True if using self-signed SSL certificates."),
Jay Pipes7c88eb22013-01-16 21:32:43 -050042 cfg.StrOpt('uri',
43 default=None,
Brant Knudsonc7ca3342013-03-28 21:08:50 -050044 help="Full URI of the OpenStack Identity API (Keystone), v2"),
45 cfg.StrOpt('uri_v3',
46 help='Full URI of the OpenStack Identity API (Keystone), v3'),
Andrea Frittoli8bbdb162014-01-06 11:06:13 +000047 cfg.StrOpt('auth_version',
48 default='v2',
49 help="Identity API version to be used for authentication "
Andrea Frittoli77f9da42014-02-06 11:18:19 +000050 "for API tests."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -050051 cfg.StrOpt('region',
Attila Fazekascadcb1f2013-01-21 23:10:53 +010052 default='RegionOne',
Arata Notsu8f440392013-09-13 16:14:20 +090053 help="The identity region name to use. Also used as the other "
54 "services' region name unless they are set explicitly. "
55 "If no such region is found in the service catalog, the "
56 "first found one is used."),
JordanP5d29b2c2013-12-18 13:56:03 +000057 cfg.StrOpt('endpoint_type',
58 default='publicURL',
59 choices=['public', 'admin', 'internal',
60 'publicURL', 'adminURL', 'internalURL'],
61 help="The endpoint type to use for the identity service."),
Attila Fazekascadcb1f2013-01-21 23:10:53 +010062 cfg.StrOpt('username',
Andrea Frittolia9463672014-03-03 14:39:02 +000063 default=None,
Attila Fazekascadcb1f2013-01-21 23:10:53 +010064 help="Username to use for Nova API requests."),
65 cfg.StrOpt('tenant_name',
Andrea Frittolia9463672014-03-03 14:39:02 +000066 default=None,
Attila Fazekascadcb1f2013-01-21 23:10:53 +010067 help="Tenant name to use for Nova API requests."),
Russell Sim7f894a52013-09-13 10:35:21 +100068 cfg.StrOpt('admin_role',
69 default='admin',
70 help="Role required to administrate keystone."),
Attila Fazekascadcb1f2013-01-21 23:10:53 +010071 cfg.StrOpt('password',
Andrea Frittolia9463672014-03-03 14:39:02 +000072 default=None,
Attila Fazekascadcb1f2013-01-21 23:10:53 +010073 help="API key to use when authenticating.",
74 secret=True),
Andrea Frittolib1b04bb2014-04-06 11:57:07 +010075 cfg.StrOpt('domain_name',
76 default=None,
77 help="Domain name for authentication (Keystone V3)."
78 "The same domain applies to user and project"),
Attila Fazekascadcb1f2013-01-21 23:10:53 +010079 cfg.StrOpt('alt_username',
80 default=None,
81 help="Username of alternate user to use for Nova API "
82 "requests."),
83 cfg.StrOpt('alt_tenant_name',
84 default=None,
85 help="Alternate user's Tenant name to use for Nova API "
86 "requests."),
87 cfg.StrOpt('alt_password',
88 default=None,
89 help="API key to use when authenticating as alternate user.",
90 secret=True),
Andrea Frittolib1b04bb2014-04-06 11:57:07 +010091 cfg.StrOpt('alt_domain_name',
92 default=None,
93 help="Alternate domain name for authentication (Keystone V3)."
94 "The same domain applies to user and project"),
Attila Fazekascadcb1f2013-01-21 23:10:53 +010095 cfg.StrOpt('admin_username',
Andrea Frittolia9463672014-03-03 14:39:02 +000096 default=None,
Dirk Mueller14bd5622014-01-14 19:33:05 +010097 help="Administrative Username to use for "
Attila Fazekascadcb1f2013-01-21 23:10:53 +010098 "Keystone API requests."),
99 cfg.StrOpt('admin_tenant_name',
Andrea Frittolia9463672014-03-03 14:39:02 +0000100 default=None,
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100101 help="Administrative Tenant name to use for Keystone API "
102 "requests."),
103 cfg.StrOpt('admin_password',
Andrea Frittolia9463672014-03-03 14:39:02 +0000104 default=None,
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100105 help="API key to use when authenticating as admin.",
106 secret=True),
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100107 cfg.StrOpt('admin_domain_name',
108 default=None,
109 help="Admin domain name for authentication (Keystone V3)."
110 "The same domain applies to user and project"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500111]
Jay Pipes3f981df2012-03-27 18:59:44 -0400112
Matthew Treinishd5021a72014-01-09 18:42:51 +0000113identity_feature_group = cfg.OptGroup(name='identity-feature-enabled',
114 title='Enabled Identity Features')
115
116IdentityFeatureGroup = [
117 cfg.BoolOpt('trust',
118 default=True,
119 help='Does the identity service have delegation and '
Matthew Treinishdb2c5972014-01-31 22:18:59 +0000120 'impersonation enabled'),
121 cfg.BoolOpt('api_v2',
122 default=True,
123 help='Is the v2 identity API enabled'),
124 cfg.BoolOpt('api_v3',
125 default=True,
126 help='Is the v3 identity API enabled'),
Matthew Treinishd5021a72014-01-09 18:42:51 +0000127]
128
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500129compute_group = cfg.OptGroup(name='compute',
130 title='Compute Service Options')
Rohit Karajgie1b050d2011-12-02 16:13:18 -0800131
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500132ComputeGroup = [
133 cfg.BoolOpt('allow_tenant_isolation',
134 default=False,
135 help="Allows test cases to create/destroy tenants and "
136 "users. This option enables isolated test cases and "
137 "better parallel execution, but also requires that "
138 "OpenStack Identity API admin credentials are known."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500139 cfg.StrOpt('image_ref',
Matthew Treinishafcb6b42014-05-27 13:50:02 -0400140 help="Valid primary image reference to be used in tests. "
141 "This is a required option"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500142 cfg.StrOpt('image_ref_alt',
Matthew Treinishafcb6b42014-05-27 13:50:02 -0400143 help="Valid secondary image reference to be used in tests. "
144 "This is a required option, but if only one image is "
145 "available duplicate the value of image_ref above"),
Ken'ichi Ohmichi35772602013-11-14 15:03:27 +0900146 cfg.StrOpt('flavor_ref',
147 default="1",
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500148 help="Valid primary flavor to use in tests."),
Ken'ichi Ohmichi35772602013-11-14 15:03:27 +0900149 cfg.StrOpt('flavor_ref_alt',
150 default="2",
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500151 help='Valid secondary flavor to be used in tests.'),
Maru Newbyaf292e82013-05-20 21:32:28 +0000152 cfg.StrOpt('image_ssh_user',
153 default="root",
154 help="User name used to authenticate to an instance."),
Ryan Hsucb2e1252013-09-03 21:44:49 -0700155 cfg.StrOpt('image_ssh_password',
156 default="password",
157 help="Password used to authenticate to an instance."),
Maru Newbyaf292e82013-05-20 21:32:28 +0000158 cfg.StrOpt('image_alt_ssh_user',
159 default="root",
160 help="User name used to authenticate to an instance using "
161 "the alternate image."),
Ryan Hsucb2e1252013-09-03 21:44:49 -0700162 cfg.StrOpt('image_alt_ssh_password',
163 default="password",
164 help="Password used to authenticate to an instance using "
165 "the alternate image."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500166 cfg.IntOpt('build_interval',
Sean Dague82190852014-05-24 07:42:59 -0400167 default=1,
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500168 help="Time in seconds between build status checks."),
169 cfg.IntOpt('build_timeout',
170 default=300,
171 help="Timeout in seconds to wait for an instance to build."),
172 cfg.BoolOpt('run_ssh',
173 default=False,
Derek Higgins85cd5142013-12-17 17:10:11 +0000174 help="Should the tests ssh to instances?"),
Attila Fazekas423834d2014-03-14 17:33:13 +0100175 cfg.StrOpt('ssh_auth_method',
176 default='keypair',
177 help="Auth method used for authenticate to the instance. "
178 "Valid choices are: keypair, configured, adminpass. "
179 "keypair: start the servers with an ssh keypair. "
180 "configured: use the configured user and password. "
181 "adminpass: use the injected adminPass. "
182 "disabled: avoid using ssh when it is an option."),
183 cfg.StrOpt('ssh_connect_method',
184 default='fixed',
185 help="How to connect to the instance? "
186 "fixed: using the first ip belongs the fixed network "
187 "floating: creating and using a floating ip"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500188 cfg.StrOpt('ssh_user',
189 default='root',
190 help="User name used to authenticate to an instance."),
Nachi Ueno6d580be2013-07-24 10:58:11 -0700191 cfg.IntOpt('ping_timeout',
Darragh O'Reilly6b636672014-01-24 12:17:40 +0000192 default=120,
Nachi Ueno6d580be2013-07-24 10:58:11 -0700193 help="Timeout in seconds to wait for ping to "
194 "succeed."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500195 cfg.IntOpt('ssh_timeout',
196 default=300,
Chris Yeoh76916042013-02-27 16:25:25 +1030197 help="Timeout in seconds to wait for authentication to "
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500198 "succeed."),
Attila Fazekas0abbc952013-07-01 19:19:42 +0200199 cfg.IntOpt('ready_wait',
200 default=0,
DennyZhang8912d012013-09-25 18:08:34 -0500201 help="Additional wait time for clean state, when there is "
202 "no OS-EXT-STS extension available"),
Chris Yeoh76916042013-02-27 16:25:25 +1030203 cfg.IntOpt('ssh_channel_timeout',
204 default=60,
205 help="Timeout in seconds to wait for output from ssh "
206 "channel."),
Attila Fazekasb0661652013-05-08 13:01:36 +0200207 cfg.StrOpt('fixed_network_name',
208 default='private',
209 help="Visible fixed network name "),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500210 cfg.StrOpt('network_for_ssh',
211 default='public',
212 help="Network used for SSH connections."),
213 cfg.IntOpt('ip_version_for_ssh',
214 default=4,
215 help="IP version used for SSH connections."),
fujioka yuuichia11994e2013-07-09 11:19:51 +0900216 cfg.BoolOpt('use_floatingip_for_ssh',
217 default=True,
Tushar Kalra95a482d2014-03-25 14:24:43 -0700218 help="Does SSH use Floating IPs?"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500219 cfg.StrOpt('catalog_type',
220 default='compute',
221 help="Catalog type of the Compute service."),
Arata Notsu8f440392013-09-13 16:14:20 +0900222 cfg.StrOpt('region',
223 default='',
224 help="The compute region name to use. If empty, the value "
225 "of identity.region is used instead. If no such region "
226 "is found in the service catalog, the first found one is "
227 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000228 cfg.StrOpt('endpoint_type',
229 default='publicURL',
230 choices=['public', 'admin', 'internal',
231 'publicURL', 'adminURL', 'internalURL'],
232 help="The endpoint type to use for the compute service."),
ivan-zhu8f992be2013-07-31 14:56:58 +0800233 cfg.StrOpt('catalog_v3_type',
234 default='computev3',
235 help="Catalog type of the Compute v3 service."),
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100236 cfg.StrOpt('path_to_private_key',
237 default=None,
238 help="Path to a private key file for SSH access to remote "
239 "hosts"),
Ryan Hsucb2e1252013-09-03 21:44:49 -0700240 cfg.StrOpt('volume_device_name',
241 default='vdb',
242 help="Expected device name when a volume is attached to "
Ken'ichi Ohmichi39437e22013-10-06 00:21:38 +0900243 "an instance"),
244 cfg.IntOpt('shelved_offload_time',
245 default=0,
246 help='Time in seconds before a shelved instance is eligible '
247 'for removing from a host. -1 never offload, 0 offload '
248 'when shelved. This time should be the same as the time '
249 'of nova.conf, and some tests will run for as long as the '
Ghanshyam06a5b4a2014-04-11 17:32:45 +0900250 'time.'),
251 cfg.StrOpt('floating_ip_range',
252 default='10.0.0.0/29',
253 help='Unallocated floating IP range, which will be used to '
254 'test the floating IP bulk feature for CRUD operation.')
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500255]
Rohit Karajgie1b050d2011-12-02 16:13:18 -0800256
Matthew Treinishd5c96022013-10-17 21:51:23 +0000257compute_features_group = cfg.OptGroup(name='compute-feature-enabled',
258 title="Enabled Compute Service Features")
259
260ComputeFeaturesGroup = [
ivan-zhu8f992be2013-07-31 14:56:58 +0800261 cfg.BoolOpt('api_v3',
Matthew Treinish836e56b2014-06-12 13:55:19 -0400262 default=False,
ivan-zhu8f992be2013-07-31 14:56:58 +0800263 help="If false, skip all nova v3 tests."),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000264 cfg.BoolOpt('disk_config',
265 default=True,
266 help="If false, skip disk config tests"),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000267 cfg.ListOpt('api_extensions',
268 default=['all'],
Zhi Kun Liude25c022014-02-14 13:25:19 +0800269 help='A list of enabled compute extensions with a special '
Ken'ichi Ohmichia7e68712014-05-06 10:47:26 +0900270 'entry all which indicates every extension is enabled. '
Simeon Monov5d7effe2014-07-16 07:32:38 +0300271 'Each extension should be specified with alias name. '
272 'Empty list indicates all extensions are disabled'),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000273 cfg.ListOpt('api_v3_extensions',
274 default=['all'],
275 help='A list of enabled v3 extensions with a special entry all'
Ken'ichi Ohmichia7e68712014-05-06 10:47:26 +0900276 ' which indicates every extension is enabled. '
Simeon Monov5d7effe2014-07-16 07:32:38 +0300277 'Each extension should be specified with alias name. '
278 'Empty list indicates all extensions are disabled'),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000279 cfg.BoolOpt('change_password',
280 default=False,
281 help="Does the test environment support changing the admin "
282 "password?"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000283 cfg.BoolOpt('resize',
284 default=False,
285 help="Does the test environment support resizing?"),
Eric Windischb5538072014-03-09 23:47:35 -0400286 cfg.BoolOpt('pause',
287 default=True,
288 help="Does the test environment support pausing?"),
David Shrewsbury25f666f2014-07-22 12:17:59 -0400289 cfg.BoolOpt('shelve',
290 default=True,
291 help="Does the test environment support shelving/unshelving?"),
Eric Windischaeb7e842014-03-10 01:10:50 -0400292 cfg.BoolOpt('suspend',
293 default=True,
294 help="Does the test environment support suspend/resume?"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000295 cfg.BoolOpt('live_migration',
296 default=False,
297 help="Does the test environment support live migration "
298 "available?"),
299 cfg.BoolOpt('block_migration_for_live_migration',
300 default=False,
301 help="Does the test environment use block devices for live "
302 "migration"),
303 cfg.BoolOpt('block_migrate_cinder_iscsi',
304 default=False,
305 help="Does the test environment block migration support "
Ghanshyam Mann41c17572014-02-27 18:52:56 +0900306 "cinder iSCSI volumes"),
307 cfg.BoolOpt('vnc_console',
308 default=False,
309 help='Enable VNC console. This configuration value should '
Ghanshyam70876d02014-03-11 11:40:18 +0900310 'be same as [nova.vnc]->vnc_enabled in nova.conf'),
311 cfg.BoolOpt('spice_console',
312 default=False,
313 help='Enable Spice console. This configuration value should '
314 'be same as [nova.spice]->enabled in nova.conf'),
315 cfg.BoolOpt('rdp_console',
316 default=False,
317 help='Enable RDP console. This configuration value should '
Adam Gandelman2e37b4f2014-06-18 17:34:21 -0700318 'be same as [nova.rdp]->enabled in nova.conf'),
319 cfg.BoolOpt('rescue',
320 default=True,
321 help='Does the test environment support instance rescue '
Ghanshyam9c2e50d2014-07-22 21:32:05 +0900322 'mode?'),
323 cfg.BoolOpt('enable_instance_password',
324 default=True,
325 help='Enables returning of the instance password by the '
326 'relevant server API calls such as create, rebuild '
Adam Gandelman7186f7a2014-07-23 09:28:56 -0400327 'or rescue.'),
328 cfg.BoolOpt('interface_attach',
329 default=True,
330 help='Does the test environment support dynamic network '
331 'interface attachment?')
Matthew Treinishd5c96022013-10-17 21:51:23 +0000332]
333
334
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500335compute_admin_group = cfg.OptGroup(name='compute-admin',
336 title="Compute Admin Options")
donald-ngo7fb1efa2011-12-13 17:17:36 -0800337
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500338ComputeAdminGroup = [
339 cfg.StrOpt('username',
Andrea Frittolia9463672014-03-03 14:39:02 +0000340 default=None,
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500341 help="Administrative Username to use for Nova API requests."),
342 cfg.StrOpt('tenant_name',
Andrea Frittolia9463672014-03-03 14:39:02 +0000343 default=None,
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500344 help="Administrative Tenant name to use for Nova API "
345 "requests."),
346 cfg.StrOpt('password',
Andrea Frittolia9463672014-03-03 14:39:02 +0000347 default=None,
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500348 help="API key to use when authenticating as admin.",
349 secret=True),
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100350 cfg.StrOpt('domain_name',
351 default=None,
352 help="Domain name for authentication as admin (Keystone V3)."
353 "The same domain applies to user and project"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500354]
Daryl Walleck587385b2012-03-03 13:00:26 -0600355
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500356image_group = cfg.OptGroup(name='image',
357 title="Image Service Options")
Jay Pipesf38eaac2012-06-21 13:37:35 -0400358
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500359ImageGroup = [
Matthew Treinish72ea4422013-02-07 14:42:49 -0500360 cfg.StrOpt('catalog_type',
361 default='image',
Sean Dague83401992013-05-06 17:46:36 -0400362 help='Catalog type of the Image service.'),
Arata Notsu8f440392013-09-13 16:14:20 +0900363 cfg.StrOpt('region',
364 default='',
365 help="The image region name to use. If empty, the value "
366 "of identity.region is used instead. If no such region "
367 "is found in the service catalog, the first found one is "
368 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000369 cfg.StrOpt('endpoint_type',
370 default='publicURL',
371 choices=['public', 'admin', 'internal',
372 'publicURL', 'adminURL', 'internalURL'],
373 help="The endpoint type to use for the image service."),
Sean Dague83401992013-05-06 17:46:36 -0400374 cfg.StrOpt('http_image',
375 default='http://download.cirros-cloud.net/0.3.1/'
376 'cirros-0.3.1-x86_64-uec.tar.gz',
DennyZhang8912d012013-09-25 18:08:34 -0500377 help='http accessible image')
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500378]
Jay Pipesf38eaac2012-06-21 13:37:35 -0400379
Matthew Treinish2b5287d2013-10-22 17:40:34 +0000380image_feature_group = cfg.OptGroup(name='image-feature-enabled',
381 title='Enabled image service features')
382
383ImageFeaturesGroup = [
384 cfg.BoolOpt('api_v2',
385 default=True,
386 help="Is the v2 image API enabled"),
387 cfg.BoolOpt('api_v1',
388 default=True,
389 help="Is the v1 image API enabled"),
390]
Jay Pipesf38eaac2012-06-21 13:37:35 -0400391
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500392network_group = cfg.OptGroup(name='network',
393 title='Network Service Options')
Daryl Walleck587385b2012-03-03 13:00:26 -0600394
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500395NetworkGroup = [
396 cfg.StrOpt('catalog_type',
397 default='network',
Mark McClainf2982e82013-07-06 17:48:03 -0400398 help='Catalog type of the Neutron service.'),
Arata Notsu8f440392013-09-13 16:14:20 +0900399 cfg.StrOpt('region',
400 default='',
401 help="The network region name to use. If empty, the value "
402 "of identity.region is used instead. If no such region "
403 "is found in the service catalog, the first found one is "
404 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000405 cfg.StrOpt('endpoint_type',
406 default='publicURL',
407 choices=['public', 'admin', 'internal',
408 'publicURL', 'adminURL', 'internalURL'],
409 help="The endpoint type to use for the network service."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500410 cfg.StrOpt('tenant_network_cidr',
411 default="10.100.0.0/16",
Henry Gessauffda37a2014-01-16 11:17:55 -0500412 help="The cidr block to allocate tenant ipv4 subnets from"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500413 cfg.IntOpt('tenant_network_mask_bits',
Attila Fazekas8ea181b2013-07-13 16:26:14 +0200414 default=28,
Henry Gessauffda37a2014-01-16 11:17:55 -0500415 help="The mask bits for tenant ipv4 subnets"),
416 cfg.StrOpt('tenant_network_v6_cidr',
417 default="2003::/64",
418 help="The cidr block to allocate tenant ipv6 subnets from"),
419 cfg.IntOpt('tenant_network_v6_mask_bits',
420 default=96,
421 help="The mask bits for tenant ipv6 subnets"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500422 cfg.BoolOpt('tenant_networks_reachable',
423 default=False,
424 help="Whether tenant network connectivity should be "
425 "evaluated directly"),
426 cfg.StrOpt('public_network_id',
427 default="",
428 help="Id of the public network that provides external "
429 "connectivity"),
430 cfg.StrOpt('public_router_id',
431 default="",
432 help="Id of the public router that provides external "
433 "connectivity"),
izikpensod9a01a62014-02-17 20:02:32 +0200434 cfg.IntOpt('build_timeout',
435 default=300,
436 help="Timeout in seconds to wait for network operation to "
437 "complete."),
438 cfg.IntOpt('build_interval',
Sean Dague82190852014-05-24 07:42:59 -0400439 default=1,
izikpensod9a01a62014-02-17 20:02:32 +0200440 help="Time in seconds between network operation status "
441 "checks."),
Attila Fazekas640392b2014-06-12 15:58:10 +0200442 cfg.ListOpt('dns_servers',
443 default=["8.8.8.8", "8.8.4.4"],
444 help="List of dns servers whichs hould be used"
445 " for subnet creation")
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500446]
Jay Pipes3f981df2012-03-27 18:59:44 -0400447
Matthew Treinishe3d26142013-11-26 19:14:58 +0000448network_feature_group = cfg.OptGroup(name='network-feature-enabled',
449 title='Enabled network service features')
450
451NetworkFeaturesGroup = [
Matthew Treinishe2e33cf2014-03-03 19:28:41 +0000452 cfg.BoolOpt('ipv6',
453 default=True,
454 help="Allow the execution of IPv6 tests"),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000455 cfg.ListOpt('api_extensions',
456 default=['all'],
Zhi Kun Liude25c022014-02-14 13:25:19 +0800457 help='A list of enabled network extensions with a special '
Simeon Monov5d7effe2014-07-16 07:32:38 +0300458 'entry all which indicates every extension is enabled. '
459 'Empty list indicates all extensions are disabled'),
Sean M. Collinsdd27a4d2014-05-13 10:33:15 -0400460 cfg.BoolOpt('ipv6_subnet_attributes',
461 default=False,
462 help="Allow the execution of IPv6 subnet tests that use "
463 "the extended IPv6 attributes ipv6_ra_mode "
464 "and ipv6_address_mode"
465 )
Matthew Treinishe3d26142013-11-26 19:14:58 +0000466]
467
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500468queuing_group = cfg.OptGroup(name='queuing',
469 title='Queuing Service')
470
471QueuingGroup = [
472 cfg.StrOpt('catalog_type',
473 default='queuing',
474 help='Catalog type of the Queuing service.'),
Jorge Chai83ba4ee2014-04-15 18:58:08 +0000475 cfg.IntOpt('max_queues_per_page',
476 default=20,
477 help='The maximum number of queue records per page when '
478 'listing queues'),
Malini Kamalambal7458b4b2014-05-29 11:47:28 -0400479 cfg.IntOpt('max_queue_metadata',
480 default=65536,
481 help='The maximum metadata size for a queue'),
482 cfg.IntOpt('max_messages_per_page',
483 default=20,
484 help='The maximum number of queue message per page when '
485 'listing (or) posting messages'),
486 cfg.IntOpt('max_message_size',
487 default=262144,
488 help='The maximum size of a message body'),
489 cfg.IntOpt('max_messages_per_claim',
490 default=20,
491 help='The maximum number of messages per claim'),
492 cfg.IntOpt('max_message_ttl',
493 default=1209600,
494 help='The maximum ttl for a message'),
495 cfg.IntOpt('max_claim_ttl',
496 default=43200,
497 help='The maximum ttl for a claim'),
498 cfg.IntOpt('max_claim_grace',
499 default=43200,
500 help='The maximum grace period for a claim'),
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500501]
502
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500503volume_group = cfg.OptGroup(name='volume',
504 title='Block Storage Options')
Daryl Walleck587385b2012-03-03 13:00:26 -0600505
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500506VolumeGroup = [
507 cfg.IntOpt('build_interval',
Sean Dague82190852014-05-24 07:42:59 -0400508 default=1,
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500509 help='Time in seconds between volume availability checks.'),
510 cfg.IntOpt('build_timeout',
511 default=300,
512 help='Timeout in seconds to wait for a volume to become'
513 'available.'),
514 cfg.StrOpt('catalog_type',
Matthew Treinisheb724512013-10-25 15:12:59 +0000515 default='volume',
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500516 help="Catalog type of the Volume Service"),
Arata Notsu8f440392013-09-13 16:14:20 +0900517 cfg.StrOpt('region',
518 default='',
519 help="The volume region name to use. If empty, the value "
520 "of identity.region is used instead. If no such region "
521 "is found in the service catalog, the first found one is "
522 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000523 cfg.StrOpt('endpoint_type',
524 default='publicURL',
525 choices=['public', 'admin', 'internal',
526 'publicURL', 'adminURL', 'internalURL'],
527 help="The endpoint type to use for the volume service."),
Jérôme Gallard86551ce2013-03-08 11:41:26 +0100528 cfg.StrOpt('backend1_name',
Giulio Fidentef4fa8942013-05-28 18:48:03 +0200529 default='BACKEND_1',
Jérôme Gallard86551ce2013-03-08 11:41:26 +0100530 help="Name of the backend1 (must be declared in cinder.conf)"),
531 cfg.StrOpt('backend2_name',
Giulio Fidentef4fa8942013-05-28 18:48:03 +0200532 default='BACKEND_2',
Jérôme Gallard86551ce2013-03-08 11:41:26 +0100533 help="Name of the backend2 (must be declared in cinder.conf)"),
Adam Gandelman827ad332013-06-24 17:04:09 -0700534 cfg.StrOpt('storage_protocol',
535 default='iSCSI',
536 help='Backend protocol to target when creating volume types'),
537 cfg.StrOpt('vendor_name',
538 default='Open Source',
539 help='Backend vendor to target when creating volume types'),
Ryan Hsua67f4632013-08-29 16:03:06 -0700540 cfg.StrOpt('disk_format',
541 default='raw',
542 help='Disk format to use when copying a volume to image'),
Jerry Cai9733d0e2014-03-19 15:50:49 +0800543 cfg.IntOpt('volume_size',
544 default=1,
545 help='Default size in GB for volumes created by volumes tests'),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500546]
K Jonathan Harkerd6ba4b42012-12-18 13:50:47 -0800547
Matthew Treinishd5c96022013-10-17 21:51:23 +0000548volume_feature_group = cfg.OptGroup(name='volume-feature-enabled',
549 title='Enabled Cinder Features')
550
551VolumeFeaturesGroup = [
552 cfg.BoolOpt('multi_backend',
553 default=False,
Matthew Treinishe3d26142013-11-26 19:14:58 +0000554 help="Runs Cinder multi-backend test (requires 2 backends)"),
Giulio Fidente74b08ad2014-01-18 04:02:51 +0100555 cfg.BoolOpt('backup',
556 default=True,
557 help='Runs Cinder volumes backup test'),
JordanPbce55532014-03-19 12:10:32 +0100558 cfg.BoolOpt('snapshot',
559 default=True,
560 help='Runs Cinder volume snapshot test'),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000561 cfg.ListOpt('api_extensions',
562 default=['all'],
Zhi Kun Liude25c022014-02-14 13:25:19 +0800563 help='A list of enabled volume extensions with a special '
Simeon Monov5d7effe2014-07-16 07:32:38 +0300564 'entry all which indicates every extension is enabled. '
565 'Empty list indicates all extensions are disabled'),
Zhi Kun Liubb363a22013-11-28 18:47:39 +0800566 cfg.BoolOpt('api_v1',
567 default=True,
568 help="Is the v1 volume API enabled"),
Zhi Kun Liu8cc3c842014-01-07 10:44:34 +0800569 cfg.BoolOpt('api_v2',
570 default=True,
571 help="Is the v2 volume API enabled"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000572]
573
Daryl Walleck587385b2012-03-03 13:00:26 -0600574
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500575object_storage_group = cfg.OptGroup(name='object-storage',
576 title='Object Storage Service Options')
Attila Fazekasa23f5002012-10-23 19:32:45 +0200577
DennyZhang1e71b612013-09-26 12:35:40 -0500578ObjectStoreGroup = [
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500579 cfg.StrOpt('catalog_type',
580 default='object-store',
581 help="Catalog type of the Object-Storage service."),
Arata Notsu8f440392013-09-13 16:14:20 +0900582 cfg.StrOpt('region',
583 default='',
584 help="The object-storage region name to use. If empty, the "
585 "value of identity.region is used instead. If no such "
586 "region is found in the service catalog, the first found "
587 "one is used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000588 cfg.StrOpt('endpoint_type',
589 default='publicURL',
590 choices=['public', 'admin', 'internal',
591 'publicURL', 'adminURL', 'internalURL'],
592 help="The endpoint type to use for the object-store service."),
Matthew Treinishf319a732013-10-24 21:39:24 +0000593 cfg.IntOpt('container_sync_timeout',
nayna-patelb4989b32013-01-09 06:25:13 +0000594 default=120,
Fabien Boucher2178d312013-12-31 15:38:57 +0100595 help="Number of seconds to time on waiting for a container "
nayna-patelb4989b32013-01-09 06:25:13 +0000596 "to container synchronization complete."),
Matthew Treinishf319a732013-10-24 21:39:24 +0000597 cfg.IntOpt('container_sync_interval',
nayna-patelb4989b32013-01-09 06:25:13 +0000598 default=5,
Fabien Boucher2178d312013-12-31 15:38:57 +0100599 help="Number of seconds to wait while looping to check the "
nayna-patelb4989b32013-01-09 06:25:13 +0000600 "status of a container to container synchronization"),
Matthew Treinish3fdb80c2013-08-15 11:13:19 -0400601 cfg.StrOpt('operator_role',
602 default='Member',
603 help="Role to add to users created for swift tests to "
604 "enable creating containers"),
Matthew Treinish998c91d2014-03-01 12:39:49 -0500605 cfg.StrOpt('reseller_admin_role',
606 default='ResellerAdmin',
607 help="User role that has reseller admin"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500608]
Attila Fazekasa23f5002012-10-23 19:32:45 +0200609
Matthew Treinishd5c96022013-10-17 21:51:23 +0000610object_storage_feature_group = cfg.OptGroup(
611 name='object-storage-feature-enabled',
612 title='Enabled object-storage features')
613
614ObjectStoreFeaturesGroup = [
Matthew Treinish20345382013-12-13 17:04:23 +0000615 cfg.ListOpt('discoverable_apis',
616 default=['all'],
617 help="A list of the enabled optional discoverable apis. "
618 "A single entry, all, indicates that all of these "
619 "features are expected to be enabled"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000620]
621
Nikhil Manchandadd6886f2014-03-03 01:58:45 -0800622database_group = cfg.OptGroup(name='database',
623 title='Database Service Options')
624
625DatabaseGroup = [
626 cfg.StrOpt('catalog_type',
627 default='database',
628 help="Catalog type of the Database service."),
629 cfg.StrOpt('db_flavor_ref',
630 default="1",
631 help="Valid primary flavor to use in database tests."),
Peter Stachowski320f9c72014-04-21 16:13:23 -0400632 cfg.StrOpt('db_current_version',
633 default="v1.0",
634 help="Current database version to use in database tests."),
Nikhil Manchandadd6886f2014-03-03 01:58:45 -0800635]
Attila Fazekasa23f5002012-10-23 19:32:45 +0200636
Steve Bakerc60e4e32013-05-06 15:22:41 +1200637orchestration_group = cfg.OptGroup(name='orchestration',
638 title='Orchestration Service Options')
639
640OrchestrationGroup = [
641 cfg.StrOpt('catalog_type',
642 default='orchestration',
643 help="Catalog type of the Orchestration service."),
Arata Notsu8f440392013-09-13 16:14:20 +0900644 cfg.StrOpt('region',
645 default='',
646 help="The orchestration region name to use. If empty, the "
647 "value of identity.region is used instead. If no such "
648 "region is found in the service catalog, the first found "
649 "one is used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000650 cfg.StrOpt('endpoint_type',
651 default='publicURL',
652 choices=['public', 'admin', 'internal',
653 'publicURL', 'adminURL', 'internalURL'],
654 help="The endpoint type to use for the orchestration service."),
Steve Bakerc60e4e32013-05-06 15:22:41 +1200655 cfg.BoolOpt('allow_tenant_isolation',
656 default=False,
657 help="Allows test cases to create/destroy tenants and "
658 "users. This option enables isolated test cases and "
659 "better parallel execution, but also requires that "
660 "OpenStack Identity API admin credentials are known."),
661 cfg.IntOpt('build_interval',
662 default=1,
663 help="Time in seconds between build status checks."),
664 cfg.IntOpt('build_timeout',
Matthew Treinisha2dfd492014-04-15 11:15:34 -0400665 default=1200,
Steve Bakerc60e4e32013-05-06 15:22:41 +1200666 help="Timeout in seconds to wait for a stack to build."),
Steve Bakerc60e4e32013-05-06 15:22:41 +1200667 cfg.StrOpt('instance_type',
Steve Baker9e86b832013-05-22 15:40:28 +1200668 default='m1.micro',
Steve Bakerc60e4e32013-05-06 15:22:41 +1200669 help="Instance type for tests. Needs to be big enough for a "
670 "full OS plus the test workload"),
671 cfg.StrOpt('image_ref',
672 default=None,
673 help="Name of heat-cfntools enabled image to use when "
674 "launching test instances."),
675 cfg.StrOpt('keypair_name',
676 default=None,
677 help="Name of existing keypair to launch servers with."),
Clint Byrum71f27632013-09-09 11:41:32 -0700678 cfg.IntOpt('max_template_size',
Joe Gordon0e51b222013-10-24 14:11:10 +0100679 default=524288,
Clint Byrum71f27632013-09-09 11:41:32 -0700680 help="Value must match heat configuration of the same name."),
Steven Hardyfdc6bd72014-03-21 16:56:04 +0000681 cfg.IntOpt('max_resources_per_stack',
682 default=1000,
683 help="Value must match heat configuration of the same name."),
Steve Bakerc60e4e32013-05-06 15:22:41 +1200684]
685
686
Yassine Lamgarchalb158d412013-12-27 19:29:42 +0100687telemetry_group = cfg.OptGroup(name='telemetry',
688 title='Telemetry Service Options')
689
690TelemetryGroup = [
691 cfg.StrOpt('catalog_type',
692 default='metering',
693 help="Catalog type of the Telemetry service."),
JordanPfc62c902014-02-26 14:47:28 +0000694 cfg.StrOpt('endpoint_type',
695 default='publicURL',
696 choices=['public', 'admin', 'internal',
697 'publicURL', 'adminURL', 'internalURL'],
698 help="The endpoint type to use for the telemetry service."),
Vadim Rovachev7bcea352013-12-26 15:56:17 +0400699 cfg.BoolOpt('too_slow_to_test',
700 default=True,
701 help="This variable is used as flag to enable "
702 "notification tests")
Yassine Lamgarchalb158d412013-12-27 19:29:42 +0100703]
704
705
Julie Pichond1017642013-07-24 16:37:23 +0100706dashboard_group = cfg.OptGroup(name="dashboard",
707 title="Dashboard options")
708
709DashboardGroup = [
710 cfg.StrOpt('dashboard_url',
711 default='http://localhost/',
712 help="Where the dashboard can be found"),
713 cfg.StrOpt('login_url',
714 default='http://localhost/auth/login/',
715 help="Login page for the dashboard"),
716]
717
718
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +0400719data_processing_group = cfg.OptGroup(name="data_processing",
720 title="Data Processing options")
721
722DataProcessingGroup = [
723 cfg.StrOpt('catalog_type',
724 default='data_processing',
JordanPfc62c902014-02-26 14:47:28 +0000725 help="Catalog type of the data processing service."),
726 cfg.StrOpt('endpoint_type',
727 default='publicURL',
728 choices=['public', 'admin', 'internal',
729 'publicURL', 'adminURL', 'internalURL'],
730 help="The endpoint type to use for the data processing "
731 "service."),
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +0400732]
733
734
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500735boto_group = cfg.OptGroup(name='boto',
736 title='EC2/S3 options')
DennyZhang1e71b612013-09-26 12:35:40 -0500737BotoGroup = [
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500738 cfg.StrOpt('ec2_url',
739 default="http://localhost:8773/services/Cloud",
740 help="EC2 URL"),
741 cfg.StrOpt('s3_url',
742 default="http://localhost:8080",
743 help="S3 URL"),
744 cfg.StrOpt('aws_secret',
745 default=None,
746 help="AWS Secret Key",
747 secret=True),
748 cfg.StrOpt('aws_access',
749 default=None,
750 help="AWS Access Key"),
Attila Fazekas27dd92e2014-02-21 14:49:40 +0100751 cfg.StrOpt('aws_zone',
752 default="nova",
753 help="AWS Zone for EC2 tests"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500754 cfg.StrOpt('s3_materials_path',
755 default="/opt/stack/devstack/files/images/"
756 "s3-materials/cirros-0.3.0",
757 help="S3 Materials Path"),
758 cfg.StrOpt('ari_manifest',
759 default="cirros-0.3.0-x86_64-initrd.manifest.xml",
760 help="ARI Ramdisk Image manifest"),
761 cfg.StrOpt('ami_manifest',
762 default="cirros-0.3.0-x86_64-blank.img.manifest.xml",
763 help="AMI Machine Image manifest"),
764 cfg.StrOpt('aki_manifest',
765 default="cirros-0.3.0-x86_64-vmlinuz.manifest.xml",
766 help="AKI Kernel Image manifest"),
767 cfg.StrOpt('instance_type',
768 default="m1.tiny",
769 help="Instance type"),
770 cfg.IntOpt('http_socket_timeout',
771 default=3,
772 help="boto Http socket timeout"),
773 cfg.IntOpt('num_retries',
774 default=1,
775 help="boto num_retries on error"),
776 cfg.IntOpt('build_timeout',
777 default=60,
778 help="Status Change Timeout"),
779 cfg.IntOpt('build_interval',
780 default=1,
781 help="Status Change Test Interval"),
782]
Attila Fazekasf7f2d932012-12-13 09:14:38 +0100783
Matthew Treinish615ea6a2013-02-25 17:26:59 -0500784stress_group = cfg.OptGroup(name='stress', title='Stress Test Options')
785
786StressGroup = [
787 cfg.StrOpt('nova_logdir',
788 default=None,
789 help='Directory containing log files on the compute nodes'),
790 cfg.IntOpt('max_instances',
791 default=16,
792 help='Maximum number of instances to create during test.'),
793 cfg.StrOpt('controller',
794 default=None,
David Kranzb9d97502013-05-01 15:55:04 -0400795 help='Controller host.'),
796 # new stress options
797 cfg.StrOpt('target_controller',
798 default=None,
799 help='Controller host.'),
800 cfg.StrOpt('target_ssh_user',
801 default=None,
802 help='ssh user.'),
803 cfg.StrOpt('target_private_key_path',
804 default=None,
805 help='Path to private key.'),
806 cfg.StrOpt('target_logfiles',
807 default=None,
808 help='regexp for list of log files.'),
Matthew Treinishf319a732013-10-24 21:39:24 +0000809 cfg.IntOpt('log_check_interval',
David Kranzb9d97502013-05-01 15:55:04 -0400810 default=60,
Marc Koderer32221b8e2013-08-23 13:57:50 +0200811 help='time (in seconds) between log file error checks.'),
Matthew Treinishf319a732013-10-24 21:39:24 +0000812 cfg.IntOpt('default_thread_number_per_action',
Marc Koderer32221b8e2013-08-23 13:57:50 +0200813 default=4,
Julien Leloup04d40f72014-01-28 11:17:18 +0100814 help='The number of threads created while stress test.'),
815 cfg.BoolOpt('leave_dirty_stack',
816 default=False,
817 help='Prevent the cleaning (tearDownClass()) between'
818 ' each stress test run if an exception occurs'
Julien Leloupa5ee5422014-02-13 14:29:02 +0100819 ' during this run.'),
820 cfg.BoolOpt('full_clean_stack',
821 default=False,
822 help='Allows a full cleaning process after a stress test.'
823 ' Caution : this cleanup will remove every objects of'
824 ' every tenant.')
Matthew Treinish615ea6a2013-02-25 17:26:59 -0500825]
826
827
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +0900828scenario_group = cfg.OptGroup(name='scenario', title='Scenario Test Options')
829
830ScenarioGroup = [
831 cfg.StrOpt('img_dir',
832 default='/opt/stack/new/devstack/files/images/'
833 'cirros-0.3.1-x86_64-uec',
834 help='Directory containing image files'),
Masayuki Igawa4f71bf02014-02-21 14:02:29 +0900835 cfg.StrOpt('qcow2_img_file',
836 default='cirros-0.3.1-x86_64-disk.img',
837 help='QCOW2 image file name'),
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +0900838 cfg.StrOpt('ami_img_file',
839 default='cirros-0.3.1-x86_64-blank.img',
840 help='AMI image file name'),
841 cfg.StrOpt('ari_img_file',
842 default='cirros-0.3.1-x86_64-initrd',
843 help='ARI image file name'),
844 cfg.StrOpt('aki_img_file',
845 default='cirros-0.3.1-x86_64-vmlinuz',
846 help='AKI image file name'),
847 cfg.StrOpt('ssh_user',
848 default='cirros',
Joe Gordonb5e10cd2013-07-10 15:51:12 +0000849 help='ssh username for the image file'),
850 cfg.IntOpt(
851 'large_ops_number',
852 default=0,
853 help="specifies how many resources to request at once. Used "
854 "for large operations testing.")
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +0900855]
856
857
Matthew Treinish4c412922013-07-16 15:27:42 -0400858service_available_group = cfg.OptGroup(name="service_available",
859 title="Available OpenStack Services")
860
861ServiceAvailableGroup = [
862 cfg.BoolOpt('cinder',
863 default=True,
864 help="Whether or not cinder is expected to be available"),
Matthew Treinishfaa340d2013-07-19 16:26:21 -0400865 cfg.BoolOpt('neutron',
866 default=False,
867 help="Whether or not neutron is expected to be available"),
Matthew Treinish853ae442013-07-19 16:36:07 -0400868 cfg.BoolOpt('glance',
869 default=True,
870 help="Whether or not glance is expected to be available"),
Matthew Treinish61e332b2013-07-19 16:42:31 -0400871 cfg.BoolOpt('swift',
872 default=True,
873 help="Whether or not swift is expected to be available"),
Matthew Treinish6b41e242013-07-19 16:49:28 -0400874 cfg.BoolOpt('nova',
875 default=True,
876 help="Whether or not nova is expected to be available"),
Matthew Treinisha9d43882013-07-19 16:54:52 -0400877 cfg.BoolOpt('heat',
878 default=False,
879 help="Whether or not Heat is expected to be available"),
Mehdi Abaakouk8581c0b2013-10-04 10:45:42 +0200880 cfg.BoolOpt('ceilometer',
881 default=True,
882 help="Whether or not Ceilometer is expected to be available"),
Julie Pichond1017642013-07-24 16:37:23 +0100883 cfg.BoolOpt('horizon',
884 default=True,
885 help="Whether or not Horizon is expected to be available"),
Sergey Lukjanov9c95a252014-03-13 23:59:22 +0400886 cfg.BoolOpt('sahara',
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +0400887 default=False,
Sergey Lukjanov9c95a252014-03-13 23:59:22 +0400888 help="Whether or not Sahara is expected to be available"),
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +0300889 cfg.BoolOpt('ironic',
890 default=False,
891 help="Whether or not Ironic is expected to be available"),
Nikhil Manchandadd6886f2014-03-03 01:58:45 -0800892 cfg.BoolOpt('trove',
893 default=False,
894 help="Whether or not Trove is expected to be available"),
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500895 cfg.BoolOpt('marconi',
896 default=False,
897 help="Whether or not Marconi is expected to be available"),
Matthew Treinish4c412922013-07-16 15:27:42 -0400898]
899
Attila Fazekasaeeeefd2013-08-06 17:01:56 +0200900debug_group = cfg.OptGroup(name="debug",
901 title="Debug System")
902
903DebugGroup = [
904 cfg.BoolOpt('enable',
905 default=True,
906 help="Enable diagnostic commands"),
Sean Daguec522c092014-03-24 10:43:22 -0400907 cfg.StrOpt('trace_requests',
908 default='',
909 help="""A regex to determine which requests should be traced.
910
911This is a regex to match the caller for rest client requests to be able to
912selectively trace calls out of specific classes and methods. It largely
913exists for test development, and is not expected to be used in a real deploy
914of tempest. This will be matched against the discovered ClassName:method
915in the test environment.
916
917Expected values for this field are:
918
919 * ClassName:test_method_name - traces one test_method
920 * ClassName:setUp(Class) - traces specific setup functions
921 * ClassName:tearDown(Class) - traces specific teardown functions
922 * ClassName:_run_cleanups - traces the cleanup functions
923
924If nothing is specified, this feature is not enabled. To trace everything
925specify .* as the regex.
926""")
Attila Fazekasaeeeefd2013-08-06 17:01:56 +0200927]
928
Andrea Frittolif5da28b2013-12-06 07:08:07 +0000929input_scenario_group = cfg.OptGroup(name="input-scenario",
930 title="Filters and values for"
931 " input scenarios")
932
933InputScenarioGroup = [
934 cfg.StrOpt('image_regex',
935 default='^cirros-0.3.1-x86_64-uec$',
936 help="Matching images become parameters for scenario tests"),
937 cfg.StrOpt('flavor_regex',
Andrea Frittoli99901c02014-01-30 18:06:49 +0000938 default='^m1.nano$',
Andrea Frittolif5da28b2013-12-06 07:08:07 +0000939 help="Matching flavors become parameters for scenario tests"),
940 cfg.StrOpt('non_ssh_image_regex',
941 default='^.*[Ww]in.*$',
942 help="SSH verification in tests is skipped"
943 "for matching images"),
944 cfg.StrOpt('ssh_user_regex',
945 default="[[\"^.*[Cc]irros.*$\", \"root\"]]",
946 help="List of user mapped to regex "
947 "to matching image names."),
948]
949
Attila Fazekasaeeeefd2013-08-06 17:01:56 +0200950
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +0300951baremetal_group = cfg.OptGroup(name='baremetal',
952 title='Baremetal provisioning service options')
953
954BaremetalGroup = [
955 cfg.StrOpt('catalog_type',
956 default='baremetal',
Adam Gandelman4a48a602014-03-20 18:23:18 -0700957 help="Catalog type of the baremetal provisioning service"),
958 cfg.BoolOpt('driver_enabled',
959 default=False,
960 help="Whether the Ironic nova-compute driver is enabled"),
Yuiko Takada1ee1b322014-07-04 09:55:30 +0900961 cfg.StrOpt('driver',
962 default='fake',
963 help="Driver name which Ironic uses"),
JordanPfc62c902014-02-26 14:47:28 +0000964 cfg.StrOpt('endpoint_type',
965 default='publicURL',
966 choices=['public', 'admin', 'internal',
967 'publicURL', 'adminURL', 'internalURL'],
968 help="The endpoint type to use for the baremetal provisioning "
Adam Gandelman4a48a602014-03-20 18:23:18 -0700969 "service"),
970 cfg.IntOpt('active_timeout',
971 default=300,
972 help="Timeout for Ironic node to completely provision"),
973 cfg.IntOpt('association_timeout',
Adam Gandelmane42f0922014-06-10 15:26:37 -0700974 default=30,
Adam Gandelman4a48a602014-03-20 18:23:18 -0700975 help="Timeout for association of Nova instance and Ironic "
976 "node"),
977 cfg.IntOpt('power_timeout',
Adam Gandelmane42f0922014-06-10 15:26:37 -0700978 default=60,
Adam Gandelman4a48a602014-03-20 18:23:18 -0700979 help="Timeout for Ironic power transitions."),
980 cfg.IntOpt('unprovision_timeout',
Adam Gandelmane42f0922014-06-10 15:26:37 -0700981 default=60,
Adam Gandelman4a48a602014-03-20 18:23:18 -0700982 help="Timeout for unprovisioning an Ironic node.")
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +0300983]
984
Matthew Treinishe2b56b52014-01-29 19:25:50 +0000985cli_group = cfg.OptGroup(name='cli', title="cli Configuration Options")
986
987CLIGroup = [
988 cfg.BoolOpt('enabled',
989 default=True,
990 help="enable cli tests"),
991 cfg.StrOpt('cli_dir',
992 default='/usr/local/bin',
993 help="directory where python client binaries are located"),
Sean Dague44b24682014-02-20 19:08:24 -0500994 cfg.BoolOpt('has_manage',
995 default=True,
996 help=("Whether the tempest run location has access to the "
997 "*-manage commands. In a pure blackbox environment "
998 "it will not.")),
Matthew Treinishe2b56b52014-01-29 19:25:50 +0000999 cfg.IntOpt('timeout',
1000 default=15,
1001 help="Number of seconds to wait on a CLI timeout"),
1002]
1003
Marc Koderer6ee82dc2014-02-17 10:26:29 +01001004negative_group = cfg.OptGroup(name='negative', title="Negative Test Options")
1005
1006NegativeGroup = [
1007 cfg.StrOpt('test_generator',
1008 default='tempest.common.' +
1009 'generator.negative_generator.NegativeTestGenerator',
1010 help="Test generator class for all negative tests"),
1011]
1012
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +03001013
Matthew Treinish43b296a2014-02-28 15:23:00 -05001014def register_opts():
1015 register_opt_group(cfg.CONF, compute_group, ComputeGroup)
1016 register_opt_group(cfg.CONF, compute_features_group,
1017 ComputeFeaturesGroup)
1018 register_opt_group(cfg.CONF, identity_group, IdentityGroup)
1019 register_opt_group(cfg.CONF, identity_feature_group,
1020 IdentityFeatureGroup)
1021 register_opt_group(cfg.CONF, image_group, ImageGroup)
1022 register_opt_group(cfg.CONF, image_feature_group, ImageFeaturesGroup)
1023 register_opt_group(cfg.CONF, network_group, NetworkGroup)
1024 register_opt_group(cfg.CONF, network_feature_group,
1025 NetworkFeaturesGroup)
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -05001026 register_opt_group(cfg.CONF, queuing_group, QueuingGroup)
Matthew Treinish43b296a2014-02-28 15:23:00 -05001027 register_opt_group(cfg.CONF, volume_group, VolumeGroup)
1028 register_opt_group(cfg.CONF, volume_feature_group,
1029 VolumeFeaturesGroup)
1030 register_opt_group(cfg.CONF, object_storage_group, ObjectStoreGroup)
1031 register_opt_group(cfg.CONF, object_storage_feature_group,
1032 ObjectStoreFeaturesGroup)
Nikhil Manchandadd6886f2014-03-03 01:58:45 -08001033 register_opt_group(cfg.CONF, database_group, DatabaseGroup)
Matthew Treinish43b296a2014-02-28 15:23:00 -05001034 register_opt_group(cfg.CONF, orchestration_group, OrchestrationGroup)
1035 register_opt_group(cfg.CONF, telemetry_group, TelemetryGroup)
1036 register_opt_group(cfg.CONF, dashboard_group, DashboardGroup)
1037 register_opt_group(cfg.CONF, data_processing_group,
1038 DataProcessingGroup)
1039 register_opt_group(cfg.CONF, boto_group, BotoGroup)
1040 register_opt_group(cfg.CONF, compute_admin_group, ComputeAdminGroup)
1041 register_opt_group(cfg.CONF, stress_group, StressGroup)
1042 register_opt_group(cfg.CONF, scenario_group, ScenarioGroup)
1043 register_opt_group(cfg.CONF, service_available_group,
1044 ServiceAvailableGroup)
1045 register_opt_group(cfg.CONF, debug_group, DebugGroup)
1046 register_opt_group(cfg.CONF, baremetal_group, BaremetalGroup)
1047 register_opt_group(cfg.CONF, input_scenario_group, InputScenarioGroup)
1048 register_opt_group(cfg.CONF, cli_group, CLIGroup)
Marc Koderer6ee82dc2014-02-17 10:26:29 +01001049 register_opt_group(cfg.CONF, negative_group, NegativeGroup)
Matthew Treinish43b296a2014-02-28 15:23:00 -05001050
1051
Sean Dague3b9b1f32013-12-20 17:04:54 -05001052# this should never be called outside of this class
1053class TempestConfigPrivate(object):
Daryl Walleck1465d612011-11-02 02:22:15 -05001054 """Provides OpenStack configuration information."""
1055
Brian Waldon738cd632011-12-12 18:45:09 -05001056 DEFAULT_CONFIG_DIR = os.path.join(
Zhongyue Luoa1343de2013-01-04 16:21:35 +08001057 os.path.abspath(os.path.dirname(os.path.dirname(__file__))),
Brian Waldon738cd632011-12-12 18:45:09 -05001058 "etc")
Daryl Walleck1465d612011-11-02 02:22:15 -05001059
Brian Waldon738cd632011-12-12 18:45:09 -05001060 DEFAULT_CONFIG_FILE = "tempest.conf"
1061
Matthew Treinish43b296a2014-02-28 15:23:00 -05001062 def _set_attrs(self):
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001063 self.compute = cfg.CONF.compute
Matthew Treinishd5c96022013-10-17 21:51:23 +00001064 self.compute_feature_enabled = cfg.CONF['compute-feature-enabled']
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001065 self.identity = cfg.CONF.identity
Matthew Treinishd5021a72014-01-09 18:42:51 +00001066 self.identity_feature_enabled = cfg.CONF['identity-feature-enabled']
Matt Riedemannd3efe902014-02-10 06:46:38 -08001067 self.image = cfg.CONF.image
Matthew Treinish2b5287d2013-10-22 17:40:34 +00001068 self.image_feature_enabled = cfg.CONF['image-feature-enabled']
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001069 self.network = cfg.CONF.network
Matthew Treinishe3d26142013-11-26 19:14:58 +00001070 self.network_feature_enabled = cfg.CONF['network-feature-enabled']
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001071 self.volume = cfg.CONF.volume
Matthew Treinishd5c96022013-10-17 21:51:23 +00001072 self.volume_feature_enabled = cfg.CONF['volume-feature-enabled']
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001073 self.object_storage = cfg.CONF['object-storage']
Matthew Treinishd5c96022013-10-17 21:51:23 +00001074 self.object_storage_feature_enabled = cfg.CONF[
1075 'object-storage-feature-enabled']
Nikhil Manchandadd6886f2014-03-03 01:58:45 -08001076 self.database = cfg.CONF.database
Steve Bakerc60e4e32013-05-06 15:22:41 +12001077 self.orchestration = cfg.CONF.orchestration
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -05001078 self.queuing = cfg.CONF.queuing
Yassine Lamgarchalb158d412013-12-27 19:29:42 +01001079 self.telemetry = cfg.CONF.telemetry
Julie Pichond1017642013-07-24 16:37:23 +01001080 self.dashboard = cfg.CONF.dashboard
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +04001081 self.data_processing = cfg.CONF.data_processing
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001082 self.boto = cfg.CONF.boto
Attila Fazekascadcb1f2013-01-21 23:10:53 +01001083 self.compute_admin = cfg.CONF['compute-admin']
Matthew Treinish615ea6a2013-02-25 17:26:59 -05001084 self.stress = cfg.CONF.stress
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +09001085 self.scenario = cfg.CONF.scenario
Matthew Treinish4c412922013-07-16 15:27:42 -04001086 self.service_available = cfg.CONF.service_available
Attila Fazekas5fae7a32013-09-25 16:52:44 +02001087 self.debug = cfg.CONF.debug
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +03001088 self.baremetal = cfg.CONF.baremetal
Andrea Frittolif5da28b2013-12-06 07:08:07 +00001089 self.input_scenario = cfg.CONF['input-scenario']
Matthew Treinishe2b56b52014-01-29 19:25:50 +00001090 self.cli = cfg.CONF.cli
Marc Koderer6ee82dc2014-02-17 10:26:29 +01001091 self.negative = cfg.CONF.negative
Attila Fazekascadcb1f2013-01-21 23:10:53 +01001092 if not self.compute_admin.username:
1093 self.compute_admin.username = self.identity.admin_username
1094 self.compute_admin.password = self.identity.admin_password
1095 self.compute_admin.tenant_name = self.identity.admin_tenant_name
Andrea Frittolib1b04bb2014-04-06 11:57:07 +01001096 cfg.CONF.set_default('domain_name', self.identity.admin_domain_name,
1097 group='identity')
1098 cfg.CONF.set_default('alt_domain_name',
1099 self.identity.admin_domain_name,
1100 group='identity')
1101 cfg.CONF.set_default('domain_name', self.identity.admin_domain_name,
1102 group='compute-admin')
Sean Dague86bd8422013-12-20 09:56:44 -05001103
Joe Gordon28a84ae2014-07-17 15:38:28 +00001104 def __init__(self, parse_conf=True, config_path=None):
Matthew Treinish43b296a2014-02-28 15:23:00 -05001105 """Initialize a configuration from a conf directory and conf file."""
1106 super(TempestConfigPrivate, self).__init__()
1107 config_files = []
1108 failsafe_path = "/etc/tempest/" + self.DEFAULT_CONFIG_FILE
1109
Joe Gordon28a84ae2014-07-17 15:38:28 +00001110 if config_path:
1111 path = config_path
1112 else:
1113 # Environment variables override defaults...
1114 conf_dir = os.environ.get('TEMPEST_CONFIG_DIR',
1115 self.DEFAULT_CONFIG_DIR)
1116 conf_file = os.environ.get('TEMPEST_CONFIG',
1117 self.DEFAULT_CONFIG_FILE)
Matthew Treinish43b296a2014-02-28 15:23:00 -05001118
Joe Gordon28a84ae2014-07-17 15:38:28 +00001119 path = os.path.join(conf_dir, conf_file)
Matthew Treinish43b296a2014-02-28 15:23:00 -05001120
1121 if not os.path.isfile(path):
1122 path = failsafe_path
1123
1124 # only parse the config file if we expect one to exist. This is needed
1125 # to remove an issue with the config file up to date checker.
1126 if parse_conf:
1127 config_files.append(path)
1128
1129 cfg.CONF([], project='tempest', default_config_files=config_files)
1130 logging.setup('tempest')
1131 LOG = logging.getLogger('tempest')
1132 LOG.info("Using tempest config file %s" % path)
1133 register_opts()
1134 self._set_attrs()
Masayuki Igawa9ec4cd82014-02-05 15:04:16 +09001135 if parse_conf:
1136 cfg.CONF.log_opt_values(LOG, std_logging.DEBUG)
1137
Sean Dague86bd8422013-12-20 09:56:44 -05001138
1139class TempestConfigProxy(object):
1140 _config = None
Joe Gordon28a84ae2014-07-17 15:38:28 +00001141 _path = None
Sean Dague86bd8422013-12-20 09:56:44 -05001142
Sean Daguedb6ac6c2014-06-06 16:52:44 -04001143 _extra_log_defaults = [
1144 'keystoneclient.session=INFO',
1145 'paramiko.transport=INFO',
1146 'requests.packages.urllib3.connectionpool=WARN'
1147 ]
1148
1149 def _fix_log_levels(self):
1150 """Tweak the oslo log defaults."""
1151 for opt in logging.log_opts:
1152 if opt.dest == 'default_log_levels':
1153 opt.default.extend(self._extra_log_defaults)
1154
Sean Dague86bd8422013-12-20 09:56:44 -05001155 def __getattr__(self, attr):
1156 if not self._config:
Sean Daguedb6ac6c2014-06-06 16:52:44 -04001157 self._fix_log_levels()
Joe Gordon28a84ae2014-07-17 15:38:28 +00001158 self._config = TempestConfigPrivate(config_path=self._path)
Sean Dague86bd8422013-12-20 09:56:44 -05001159
1160 return getattr(self._config, attr)
1161
Joe Gordon28a84ae2014-07-17 15:38:28 +00001162 def set_config_path(self, path):
1163 self._path = path
1164
Sean Dague86bd8422013-12-20 09:56:44 -05001165
1166CONF = TempestConfigProxy()