blob: af6dd7ad150f890c429f7ea71f91b8e457af1be4 [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',
55 default=None,
Brant Knudsonc7ca3342013-03-28 21:08:50 -050056 help="Full URI of the OpenStack Identity API (Keystone), v2"),
57 cfg.StrOpt('uri_v3',
58 help='Full URI of the OpenStack Identity API (Keystone), v3'),
Andrea Frittoli8bbdb162014-01-06 11:06:13 +000059 cfg.StrOpt('auth_version',
60 default='v2',
61 help="Identity API version to be used for authentication "
Andrea Frittoli77f9da42014-02-06 11:18:19 +000062 "for API tests."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -050063 cfg.StrOpt('region',
Attila Fazekascadcb1f2013-01-21 23:10:53 +010064 default='RegionOne',
Arata Notsu8f440392013-09-13 16:14:20 +090065 help="The identity region name to use. Also used as the other "
66 "services' region name unless they are set explicitly. "
67 "If no such region is found in the service catalog, the "
68 "first found one is used."),
JordanP5d29b2c2013-12-18 13:56:03 +000069 cfg.StrOpt('endpoint_type',
70 default='publicURL',
71 choices=['public', 'admin', 'internal',
72 'publicURL', 'adminURL', 'internalURL'],
73 help="The endpoint type to use for the identity service."),
Attila Fazekascadcb1f2013-01-21 23:10:53 +010074 cfg.StrOpt('username',
Andrea Frittolia9463672014-03-03 14:39:02 +000075 default=None,
Attila Fazekascadcb1f2013-01-21 23:10:53 +010076 help="Username to use for Nova API requests."),
77 cfg.StrOpt('tenant_name',
Andrea Frittolia9463672014-03-03 14:39:02 +000078 default=None,
Attila Fazekascadcb1f2013-01-21 23:10:53 +010079 help="Tenant name to use for Nova API requests."),
Russell Sim7f894a52013-09-13 10:35:21 +100080 cfg.StrOpt('admin_role',
81 default='admin',
82 help="Role required to administrate keystone."),
Attila Fazekascadcb1f2013-01-21 23:10:53 +010083 cfg.StrOpt('password',
Andrea Frittolia9463672014-03-03 14:39:02 +000084 default=None,
Attila Fazekascadcb1f2013-01-21 23:10:53 +010085 help="API key to use when authenticating.",
86 secret=True),
Andrea Frittolib1b04bb2014-04-06 11:57:07 +010087 cfg.StrOpt('domain_name',
88 default=None,
89 help="Domain name for authentication (Keystone V3)."
90 "The same domain applies to user and project"),
Attila Fazekascadcb1f2013-01-21 23:10:53 +010091 cfg.StrOpt('alt_username',
92 default=None,
93 help="Username of alternate user to use for Nova API "
94 "requests."),
95 cfg.StrOpt('alt_tenant_name',
96 default=None,
97 help="Alternate user's Tenant name to use for Nova API "
98 "requests."),
99 cfg.StrOpt('alt_password',
100 default=None,
101 help="API key to use when authenticating as alternate user.",
102 secret=True),
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100103 cfg.StrOpt('alt_domain_name',
104 default=None,
105 help="Alternate domain name for authentication (Keystone V3)."
106 "The same domain applies to user and project"),
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100107 cfg.StrOpt('admin_username',
Andrea Frittolia9463672014-03-03 14:39:02 +0000108 default=None,
Dirk Mueller14bd5622014-01-14 19:33:05 +0100109 help="Administrative Username to use for "
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100110 "Keystone API requests."),
111 cfg.StrOpt('admin_tenant_name',
Andrea Frittolia9463672014-03-03 14:39:02 +0000112 default=None,
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100113 help="Administrative Tenant name to use for Keystone API "
114 "requests."),
115 cfg.StrOpt('admin_password',
Andrea Frittolia9463672014-03-03 14:39:02 +0000116 default=None,
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100117 help="API key to use when authenticating as admin.",
118 secret=True),
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100119 cfg.StrOpt('admin_domain_name',
120 default=None,
121 help="Admin domain name for authentication (Keystone V3)."
122 "The same domain applies to user and project"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500123]
Jay Pipes3f981df2012-03-27 18:59:44 -0400124
Matthew Treinishd5021a72014-01-09 18:42:51 +0000125identity_feature_group = cfg.OptGroup(name='identity-feature-enabled',
126 title='Enabled Identity Features')
127
128IdentityFeatureGroup = [
129 cfg.BoolOpt('trust',
130 default=True,
131 help='Does the identity service have delegation and '
Matthew Treinishdb2c5972014-01-31 22:18:59 +0000132 'impersonation enabled'),
133 cfg.BoolOpt('api_v2',
134 default=True,
135 help='Is the v2 identity API enabled'),
136 cfg.BoolOpt('api_v3',
137 default=True,
138 help='Is the v3 identity API enabled'),
Matthew Treinishd5021a72014-01-09 18:42:51 +0000139]
140
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500141compute_group = cfg.OptGroup(name='compute',
142 title='Compute Service Options')
Rohit Karajgie1b050d2011-12-02 16:13:18 -0800143
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500144ComputeGroup = [
145 cfg.BoolOpt('allow_tenant_isolation',
146 default=False,
147 help="Allows test cases to create/destroy tenants and "
148 "users. This option enables isolated test cases and "
149 "better parallel execution, but also requires that "
150 "OpenStack Identity API admin credentials are known."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500151 cfg.StrOpt('image_ref',
Matthew Treinishafcb6b42014-05-27 13:50:02 -0400152 help="Valid primary image reference to be used in tests. "
153 "This is a required option"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500154 cfg.StrOpt('image_ref_alt',
Matthew Treinishafcb6b42014-05-27 13:50:02 -0400155 help="Valid secondary image reference to be used in tests. "
156 "This is a required option, but if only one image is "
157 "available duplicate the value of image_ref above"),
Ken'ichi Ohmichi35772602013-11-14 15:03:27 +0900158 cfg.StrOpt('flavor_ref',
159 default="1",
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500160 help="Valid primary flavor to use in tests."),
Ken'ichi Ohmichi35772602013-11-14 15:03:27 +0900161 cfg.StrOpt('flavor_ref_alt',
162 default="2",
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500163 help='Valid secondary flavor to be used in tests.'),
Maru Newbyaf292e82013-05-20 21:32:28 +0000164 cfg.StrOpt('image_ssh_user',
165 default="root",
166 help="User name used to authenticate to an instance."),
Ryan Hsucb2e1252013-09-03 21:44:49 -0700167 cfg.StrOpt('image_ssh_password',
168 default="password",
169 help="Password used to authenticate to an instance."),
Maru Newbyaf292e82013-05-20 21:32:28 +0000170 cfg.StrOpt('image_alt_ssh_user',
171 default="root",
172 help="User name used to authenticate to an instance using "
173 "the alternate image."),
Ryan Hsucb2e1252013-09-03 21:44:49 -0700174 cfg.StrOpt('image_alt_ssh_password',
175 default="password",
176 help="Password used to authenticate to an instance using "
177 "the alternate image."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500178 cfg.IntOpt('build_interval',
Sean Dague82190852014-05-24 07:42:59 -0400179 default=1,
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500180 help="Time in seconds between build status checks."),
181 cfg.IntOpt('build_timeout',
182 default=300,
183 help="Timeout in seconds to wait for an instance to build."),
184 cfg.BoolOpt('run_ssh',
185 default=False,
Derek Higgins85cd5142013-12-17 17:10:11 +0000186 help="Should the tests ssh to instances?"),
Attila Fazekas423834d2014-03-14 17:33:13 +0100187 cfg.StrOpt('ssh_auth_method',
188 default='keypair',
189 help="Auth method used for authenticate to the instance. "
190 "Valid choices are: keypair, configured, adminpass. "
191 "keypair: start the servers with an ssh keypair. "
192 "configured: use the configured user and password. "
193 "adminpass: use the injected adminPass. "
194 "disabled: avoid using ssh when it is an option."),
195 cfg.StrOpt('ssh_connect_method',
196 default='fixed',
197 help="How to connect to the instance? "
198 "fixed: using the first ip belongs the fixed network "
199 "floating: creating and using a floating ip"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500200 cfg.StrOpt('ssh_user',
201 default='root',
202 help="User name used to authenticate to an instance."),
Nachi Ueno6d580be2013-07-24 10:58:11 -0700203 cfg.IntOpt('ping_timeout',
Darragh O'Reilly6b636672014-01-24 12:17:40 +0000204 default=120,
Nachi Ueno6d580be2013-07-24 10:58:11 -0700205 help="Timeout in seconds to wait for ping to "
206 "succeed."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500207 cfg.IntOpt('ssh_timeout',
208 default=300,
Chris Yeoh76916042013-02-27 16:25:25 +1030209 help="Timeout in seconds to wait for authentication to "
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500210 "succeed."),
Attila Fazekas0abbc952013-07-01 19:19:42 +0200211 cfg.IntOpt('ready_wait',
212 default=0,
DennyZhang8912d012013-09-25 18:08:34 -0500213 help="Additional wait time for clean state, when there is "
214 "no OS-EXT-STS extension available"),
Chris Yeoh76916042013-02-27 16:25:25 +1030215 cfg.IntOpt('ssh_channel_timeout',
216 default=60,
217 help="Timeout in seconds to wait for output from ssh "
218 "channel."),
Attila Fazekasb0661652013-05-08 13:01:36 +0200219 cfg.StrOpt('fixed_network_name',
220 default='private',
221 help="Visible fixed network name "),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500222 cfg.StrOpt('network_for_ssh',
223 default='public',
224 help="Network used for SSH connections."),
225 cfg.IntOpt('ip_version_for_ssh',
226 default=4,
227 help="IP version used for SSH connections."),
fujioka yuuichia11994e2013-07-09 11:19:51 +0900228 cfg.BoolOpt('use_floatingip_for_ssh',
229 default=True,
Tushar Kalra95a482d2014-03-25 14:24:43 -0700230 help="Does SSH use Floating IPs?"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500231 cfg.StrOpt('catalog_type',
232 default='compute',
233 help="Catalog type of the Compute service."),
Arata Notsu8f440392013-09-13 16:14:20 +0900234 cfg.StrOpt('region',
235 default='',
236 help="The compute region name to use. If empty, the value "
237 "of identity.region is used instead. If no such region "
238 "is found in the service catalog, the first found one is "
239 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000240 cfg.StrOpt('endpoint_type',
241 default='publicURL',
242 choices=['public', 'admin', 'internal',
243 'publicURL', 'adminURL', 'internalURL'],
244 help="The endpoint type to use for the compute service."),
ivan-zhu8f992be2013-07-31 14:56:58 +0800245 cfg.StrOpt('catalog_v3_type',
246 default='computev3',
247 help="Catalog type of the Compute v3 service."),
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100248 cfg.StrOpt('path_to_private_key',
249 default=None,
250 help="Path to a private key file for SSH access to remote "
251 "hosts"),
Ryan Hsucb2e1252013-09-03 21:44:49 -0700252 cfg.StrOpt('volume_device_name',
253 default='vdb',
254 help="Expected device name when a volume is attached to "
Ken'ichi Ohmichi39437e22013-10-06 00:21:38 +0900255 "an instance"),
256 cfg.IntOpt('shelved_offload_time',
257 default=0,
258 help='Time in seconds before a shelved instance is eligible '
259 'for removing from a host. -1 never offload, 0 offload '
260 'when shelved. This time should be the same as the time '
261 'of nova.conf, and some tests will run for as long as the '
Ghanshyam06a5b4a2014-04-11 17:32:45 +0900262 'time.'),
263 cfg.StrOpt('floating_ip_range',
264 default='10.0.0.0/29',
265 help='Unallocated floating IP range, which will be used to '
266 'test the floating IP bulk feature for CRUD operation.')
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500267]
Rohit Karajgie1b050d2011-12-02 16:13:18 -0800268
Matthew Treinishd5c96022013-10-17 21:51:23 +0000269compute_features_group = cfg.OptGroup(name='compute-feature-enabled',
270 title="Enabled Compute Service Features")
271
272ComputeFeaturesGroup = [
ivan-zhu8f992be2013-07-31 14:56:58 +0800273 cfg.BoolOpt('api_v3',
Matthew Treinish836e56b2014-06-12 13:55:19 -0400274 default=False,
ivan-zhu8f992be2013-07-31 14:56:58 +0800275 help="If false, skip all nova v3 tests."),
Matthew Treinish20866a22014-06-12 14:58:36 -0400276 cfg.BoolOpt('xml_api_v2',
277 default=True,
278 help="If false skip all v2 api tests with xml"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000279 cfg.BoolOpt('disk_config',
280 default=True,
281 help="If false, skip disk config tests"),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000282 cfg.ListOpt('api_extensions',
283 default=['all'],
Zhi Kun Liude25c022014-02-14 13:25:19 +0800284 help='A list of enabled compute extensions with a special '
Ken'ichi Ohmichia7e68712014-05-06 10:47:26 +0900285 'entry all which indicates every extension is enabled. '
Simeon Monov5d7effe2014-07-16 07:32:38 +0300286 'Each extension should be specified with alias name. '
287 'Empty list indicates all extensions are disabled'),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000288 cfg.ListOpt('api_v3_extensions',
289 default=['all'],
290 help='A list of enabled v3 extensions with a special entry all'
Ken'ichi Ohmichia7e68712014-05-06 10:47:26 +0900291 ' which indicates every extension is enabled. '
Simeon Monov5d7effe2014-07-16 07:32:38 +0300292 'Each extension should be specified with alias name. '
293 'Empty list indicates all extensions are disabled'),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000294 cfg.BoolOpt('change_password',
295 default=False,
296 help="Does the test environment support changing the admin "
297 "password?"),
Adam Gandelmanc6eefb42014-07-15 16:44:08 -0700298 cfg.BoolOpt('console_output',
299 default=True,
300 help="Does the test environment support obtaining instance "
301 "serial console output?"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000302 cfg.BoolOpt('resize',
303 default=False,
304 help="Does the test environment support resizing?"),
Eric Windischb5538072014-03-09 23:47:35 -0400305 cfg.BoolOpt('pause',
306 default=True,
307 help="Does the test environment support pausing?"),
David Shrewsbury25f666f2014-07-22 12:17:59 -0400308 cfg.BoolOpt('shelve',
309 default=True,
310 help="Does the test environment support shelving/unshelving?"),
Eric Windischaeb7e842014-03-10 01:10:50 -0400311 cfg.BoolOpt('suspend',
312 default=True,
313 help="Does the test environment support suspend/resume?"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000314 cfg.BoolOpt('live_migration',
315 default=False,
316 help="Does the test environment support live migration "
317 "available?"),
318 cfg.BoolOpt('block_migration_for_live_migration',
319 default=False,
320 help="Does the test environment use block devices for live "
321 "migration"),
322 cfg.BoolOpt('block_migrate_cinder_iscsi',
323 default=False,
324 help="Does the test environment block migration support "
Ghanshyam Mann41c17572014-02-27 18:52:56 +0900325 "cinder iSCSI volumes"),
326 cfg.BoolOpt('vnc_console',
327 default=False,
328 help='Enable VNC console. This configuration value should '
Ghanshyam70876d02014-03-11 11:40:18 +0900329 'be same as [nova.vnc]->vnc_enabled in nova.conf'),
330 cfg.BoolOpt('spice_console',
331 default=False,
332 help='Enable Spice console. This configuration value should '
333 'be same as [nova.spice]->enabled in nova.conf'),
334 cfg.BoolOpt('rdp_console',
335 default=False,
336 help='Enable RDP console. This configuration value should '
Adam Gandelman2e37b4f2014-06-18 17:34:21 -0700337 'be same as [nova.rdp]->enabled in nova.conf'),
338 cfg.BoolOpt('rescue',
339 default=True,
340 help='Does the test environment support instance rescue '
Ghanshyam9c2e50d2014-07-22 21:32:05 +0900341 'mode?'),
342 cfg.BoolOpt('enable_instance_password',
343 default=True,
344 help='Enables returning of the instance password by the '
345 'relevant server API calls such as create, rebuild '
Adam Gandelman7186f7a2014-07-23 09:28:56 -0400346 'or rescue.'),
347 cfg.BoolOpt('interface_attach',
348 default=True,
349 help='Does the test environment support dynamic network '
350 'interface attachment?')
Matthew Treinishd5c96022013-10-17 21:51:23 +0000351]
352
353
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500354compute_admin_group = cfg.OptGroup(name='compute-admin',
355 title="Compute Admin Options")
donald-ngo7fb1efa2011-12-13 17:17:36 -0800356
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500357ComputeAdminGroup = [
358 cfg.StrOpt('username',
Andrea Frittolia9463672014-03-03 14:39:02 +0000359 default=None,
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500360 help="Administrative Username to use for Nova API requests."),
361 cfg.StrOpt('tenant_name',
Andrea Frittolia9463672014-03-03 14:39:02 +0000362 default=None,
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500363 help="Administrative Tenant name to use for Nova API "
364 "requests."),
365 cfg.StrOpt('password',
Andrea Frittolia9463672014-03-03 14:39:02 +0000366 default=None,
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500367 help="API key to use when authenticating as admin.",
368 secret=True),
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100369 cfg.StrOpt('domain_name',
370 default=None,
371 help="Domain name for authentication as admin (Keystone V3)."
372 "The same domain applies to user and project"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500373]
Daryl Walleck587385b2012-03-03 13:00:26 -0600374
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500375image_group = cfg.OptGroup(name='image',
376 title="Image Service Options")
Jay Pipesf38eaac2012-06-21 13:37:35 -0400377
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500378ImageGroup = [
Matthew Treinish72ea4422013-02-07 14:42:49 -0500379 cfg.StrOpt('catalog_type',
380 default='image',
Sean Dague83401992013-05-06 17:46:36 -0400381 help='Catalog type of the Image service.'),
Arata Notsu8f440392013-09-13 16:14:20 +0900382 cfg.StrOpt('region',
383 default='',
384 help="The image region name to use. If empty, the value "
385 "of identity.region is used instead. If no such region "
386 "is found in the service catalog, the first found one is "
387 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000388 cfg.StrOpt('endpoint_type',
389 default='publicURL',
390 choices=['public', 'admin', 'internal',
391 'publicURL', 'adminURL', 'internalURL'],
392 help="The endpoint type to use for the image service."),
Sean Dague83401992013-05-06 17:46:36 -0400393 cfg.StrOpt('http_image',
394 default='http://download.cirros-cloud.net/0.3.1/'
395 'cirros-0.3.1-x86_64-uec.tar.gz',
DennyZhang8912d012013-09-25 18:08:34 -0500396 help='http accessible image')
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500397]
Jay Pipesf38eaac2012-06-21 13:37:35 -0400398
Matthew Treinish2b5287d2013-10-22 17:40:34 +0000399image_feature_group = cfg.OptGroup(name='image-feature-enabled',
400 title='Enabled image service features')
401
402ImageFeaturesGroup = [
403 cfg.BoolOpt('api_v2',
404 default=True,
405 help="Is the v2 image API enabled"),
406 cfg.BoolOpt('api_v1',
407 default=True,
408 help="Is the v1 image API enabled"),
409]
Jay Pipesf38eaac2012-06-21 13:37:35 -0400410
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500411network_group = cfg.OptGroup(name='network',
412 title='Network Service Options')
Daryl Walleck587385b2012-03-03 13:00:26 -0600413
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500414NetworkGroup = [
415 cfg.StrOpt('catalog_type',
416 default='network',
Mark McClainf2982e82013-07-06 17:48:03 -0400417 help='Catalog type of the Neutron service.'),
Arata Notsu8f440392013-09-13 16:14:20 +0900418 cfg.StrOpt('region',
419 default='',
420 help="The network region name to use. If empty, the value "
421 "of identity.region is used instead. If no such region "
422 "is found in the service catalog, the first found one is "
423 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000424 cfg.StrOpt('endpoint_type',
425 default='publicURL',
426 choices=['public', 'admin', 'internal',
427 'publicURL', 'adminURL', 'internalURL'],
428 help="The endpoint type to use for the network service."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500429 cfg.StrOpt('tenant_network_cidr',
430 default="10.100.0.0/16",
Henry Gessauffda37a2014-01-16 11:17:55 -0500431 help="The cidr block to allocate tenant ipv4 subnets from"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500432 cfg.IntOpt('tenant_network_mask_bits',
Attila Fazekas8ea181b2013-07-13 16:26:14 +0200433 default=28,
Henry Gessauffda37a2014-01-16 11:17:55 -0500434 help="The mask bits for tenant ipv4 subnets"),
435 cfg.StrOpt('tenant_network_v6_cidr',
436 default="2003::/64",
437 help="The cidr block to allocate tenant ipv6 subnets from"),
438 cfg.IntOpt('tenant_network_v6_mask_bits',
439 default=96,
440 help="The mask bits for tenant ipv6 subnets"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500441 cfg.BoolOpt('tenant_networks_reachable',
442 default=False,
443 help="Whether tenant network connectivity should be "
444 "evaluated directly"),
445 cfg.StrOpt('public_network_id',
446 default="",
447 help="Id of the public network that provides external "
448 "connectivity"),
449 cfg.StrOpt('public_router_id',
450 default="",
451 help="Id of the public router that provides external "
452 "connectivity"),
izikpensod9a01a62014-02-17 20:02:32 +0200453 cfg.IntOpt('build_timeout',
454 default=300,
455 help="Timeout in seconds to wait for network operation to "
456 "complete."),
457 cfg.IntOpt('build_interval',
Sean Dague82190852014-05-24 07:42:59 -0400458 default=1,
izikpensod9a01a62014-02-17 20:02:32 +0200459 help="Time in seconds between network operation status "
460 "checks."),
Attila Fazekas640392b2014-06-12 15:58:10 +0200461 cfg.ListOpt('dns_servers',
462 default=["8.8.8.8", "8.8.4.4"],
463 help="List of dns servers whichs hould be used"
464 " for subnet creation")
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500465]
Jay Pipes3f981df2012-03-27 18:59:44 -0400466
Matthew Treinishe3d26142013-11-26 19:14:58 +0000467network_feature_group = cfg.OptGroup(name='network-feature-enabled',
468 title='Enabled network service features')
469
470NetworkFeaturesGroup = [
Matthew Treinishe2e33cf2014-03-03 19:28:41 +0000471 cfg.BoolOpt('ipv6',
472 default=True,
473 help="Allow the execution of IPv6 tests"),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000474 cfg.ListOpt('api_extensions',
475 default=['all'],
Zhi Kun Liude25c022014-02-14 13:25:19 +0800476 help='A list of enabled network extensions with a special '
Simeon Monov5d7effe2014-07-16 07:32:38 +0300477 'entry all which indicates every extension is enabled. '
478 'Empty list indicates all extensions are disabled'),
Sean M. Collinsdd27a4d2014-05-13 10:33:15 -0400479 cfg.BoolOpt('ipv6_subnet_attributes',
480 default=False,
481 help="Allow the execution of IPv6 subnet tests that use "
482 "the extended IPv6 attributes ipv6_ra_mode "
483 "and ipv6_address_mode"
484 )
Matthew Treinishe3d26142013-11-26 19:14:58 +0000485]
486
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500487queuing_group = cfg.OptGroup(name='queuing',
488 title='Queuing Service')
489
490QueuingGroup = [
491 cfg.StrOpt('catalog_type',
492 default='queuing',
493 help='Catalog type of the Queuing service.'),
Jorge Chai83ba4ee2014-04-15 18:58:08 +0000494 cfg.IntOpt('max_queues_per_page',
495 default=20,
496 help='The maximum number of queue records per page when '
497 'listing queues'),
Malini Kamalambal7458b4b2014-05-29 11:47:28 -0400498 cfg.IntOpt('max_queue_metadata',
499 default=65536,
500 help='The maximum metadata size for a queue'),
501 cfg.IntOpt('max_messages_per_page',
502 default=20,
503 help='The maximum number of queue message per page when '
504 'listing (or) posting messages'),
505 cfg.IntOpt('max_message_size',
506 default=262144,
507 help='The maximum size of a message body'),
508 cfg.IntOpt('max_messages_per_claim',
509 default=20,
510 help='The maximum number of messages per claim'),
511 cfg.IntOpt('max_message_ttl',
512 default=1209600,
513 help='The maximum ttl for a message'),
514 cfg.IntOpt('max_claim_ttl',
515 default=43200,
516 help='The maximum ttl for a claim'),
517 cfg.IntOpt('max_claim_grace',
518 default=43200,
519 help='The maximum grace period for a claim'),
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500520]
521
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500522volume_group = cfg.OptGroup(name='volume',
523 title='Block Storage Options')
Daryl Walleck587385b2012-03-03 13:00:26 -0600524
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500525VolumeGroup = [
526 cfg.IntOpt('build_interval',
Sean Dague82190852014-05-24 07:42:59 -0400527 default=1,
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500528 help='Time in seconds between volume availability checks.'),
529 cfg.IntOpt('build_timeout',
530 default=300,
531 help='Timeout in seconds to wait for a volume to become'
532 'available.'),
533 cfg.StrOpt('catalog_type',
Matthew Treinisheb724512013-10-25 15:12:59 +0000534 default='volume',
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500535 help="Catalog type of the Volume Service"),
Arata Notsu8f440392013-09-13 16:14:20 +0900536 cfg.StrOpt('region',
537 default='',
538 help="The volume region name to use. If empty, the value "
539 "of identity.region is used instead. If no such region "
540 "is found in the service catalog, the first found one is "
541 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000542 cfg.StrOpt('endpoint_type',
543 default='publicURL',
544 choices=['public', 'admin', 'internal',
545 'publicURL', 'adminURL', 'internalURL'],
546 help="The endpoint type to use for the volume service."),
Jérôme Gallard86551ce2013-03-08 11:41:26 +0100547 cfg.StrOpt('backend1_name',
Giulio Fidentef4fa8942013-05-28 18:48:03 +0200548 default='BACKEND_1',
Jérôme Gallard86551ce2013-03-08 11:41:26 +0100549 help="Name of the backend1 (must be declared in cinder.conf)"),
550 cfg.StrOpt('backend2_name',
Giulio Fidentef4fa8942013-05-28 18:48:03 +0200551 default='BACKEND_2',
Jérôme Gallard86551ce2013-03-08 11:41:26 +0100552 help="Name of the backend2 (must be declared in cinder.conf)"),
Adam Gandelman827ad332013-06-24 17:04:09 -0700553 cfg.StrOpt('storage_protocol',
554 default='iSCSI',
555 help='Backend protocol to target when creating volume types'),
556 cfg.StrOpt('vendor_name',
557 default='Open Source',
558 help='Backend vendor to target when creating volume types'),
Ryan Hsua67f4632013-08-29 16:03:06 -0700559 cfg.StrOpt('disk_format',
560 default='raw',
561 help='Disk format to use when copying a volume to image'),
Jerry Cai9733d0e2014-03-19 15:50:49 +0800562 cfg.IntOpt('volume_size',
563 default=1,
564 help='Default size in GB for volumes created by volumes tests'),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500565]
K Jonathan Harkerd6ba4b42012-12-18 13:50:47 -0800566
Matthew Treinishd5c96022013-10-17 21:51:23 +0000567volume_feature_group = cfg.OptGroup(name='volume-feature-enabled',
568 title='Enabled Cinder Features')
569
570VolumeFeaturesGroup = [
571 cfg.BoolOpt('multi_backend',
572 default=False,
Matthew Treinishe3d26142013-11-26 19:14:58 +0000573 help="Runs Cinder multi-backend test (requires 2 backends)"),
Giulio Fidente74b08ad2014-01-18 04:02:51 +0100574 cfg.BoolOpt('backup',
575 default=True,
576 help='Runs Cinder volumes backup test'),
JordanPbce55532014-03-19 12:10:32 +0100577 cfg.BoolOpt('snapshot',
578 default=True,
579 help='Runs Cinder volume snapshot test'),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000580 cfg.ListOpt('api_extensions',
581 default=['all'],
Zhi Kun Liude25c022014-02-14 13:25:19 +0800582 help='A list of enabled volume extensions with a special '
Simeon Monov5d7effe2014-07-16 07:32:38 +0300583 'entry all which indicates every extension is enabled. '
584 'Empty list indicates all extensions are disabled'),
Zhi Kun Liubb363a22013-11-28 18:47:39 +0800585 cfg.BoolOpt('api_v1',
586 default=True,
587 help="Is the v1 volume API enabled"),
Zhi Kun Liu8cc3c842014-01-07 10:44:34 +0800588 cfg.BoolOpt('api_v2',
589 default=True,
590 help="Is the v2 volume API enabled"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000591]
592
Daryl Walleck587385b2012-03-03 13:00:26 -0600593
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500594object_storage_group = cfg.OptGroup(name='object-storage',
595 title='Object Storage Service Options')
Attila Fazekasa23f5002012-10-23 19:32:45 +0200596
DennyZhang1e71b612013-09-26 12:35:40 -0500597ObjectStoreGroup = [
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500598 cfg.StrOpt('catalog_type',
599 default='object-store',
600 help="Catalog type of the Object-Storage service."),
Arata Notsu8f440392013-09-13 16:14:20 +0900601 cfg.StrOpt('region',
602 default='',
603 help="The object-storage region name to use. If empty, the "
604 "value of identity.region is used instead. If no such "
605 "region is found in the service catalog, the first found "
606 "one is used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000607 cfg.StrOpt('endpoint_type',
608 default='publicURL',
609 choices=['public', 'admin', 'internal',
610 'publicURL', 'adminURL', 'internalURL'],
611 help="The endpoint type to use for the object-store service."),
Matthew Treinishf319a732013-10-24 21:39:24 +0000612 cfg.IntOpt('container_sync_timeout',
nayna-patelb4989b32013-01-09 06:25:13 +0000613 default=120,
Fabien Boucher2178d312013-12-31 15:38:57 +0100614 help="Number of seconds to time on waiting for a container "
nayna-patelb4989b32013-01-09 06:25:13 +0000615 "to container synchronization complete."),
Matthew Treinishf319a732013-10-24 21:39:24 +0000616 cfg.IntOpt('container_sync_interval',
nayna-patelb4989b32013-01-09 06:25:13 +0000617 default=5,
Fabien Boucher2178d312013-12-31 15:38:57 +0100618 help="Number of seconds to wait while looping to check the "
nayna-patelb4989b32013-01-09 06:25:13 +0000619 "status of a container to container synchronization"),
Matthew Treinish3fdb80c2013-08-15 11:13:19 -0400620 cfg.StrOpt('operator_role',
621 default='Member',
622 help="Role to add to users created for swift tests to "
623 "enable creating containers"),
Matthew Treinish998c91d2014-03-01 12:39:49 -0500624 cfg.StrOpt('reseller_admin_role',
625 default='ResellerAdmin',
626 help="User role that has reseller admin"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500627]
Attila Fazekasa23f5002012-10-23 19:32:45 +0200628
Matthew Treinishd5c96022013-10-17 21:51:23 +0000629object_storage_feature_group = cfg.OptGroup(
630 name='object-storage-feature-enabled',
631 title='Enabled object-storage features')
632
633ObjectStoreFeaturesGroup = [
Matthew Treinish20345382013-12-13 17:04:23 +0000634 cfg.ListOpt('discoverable_apis',
635 default=['all'],
636 help="A list of the enabled optional discoverable apis. "
637 "A single entry, all, indicates that all of these "
638 "features are expected to be enabled"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000639]
640
Nikhil Manchandadd6886f2014-03-03 01:58:45 -0800641database_group = cfg.OptGroup(name='database',
642 title='Database Service Options')
643
644DatabaseGroup = [
645 cfg.StrOpt('catalog_type',
646 default='database',
647 help="Catalog type of the Database service."),
648 cfg.StrOpt('db_flavor_ref',
649 default="1",
650 help="Valid primary flavor to use in database tests."),
Peter Stachowski320f9c72014-04-21 16:13:23 -0400651 cfg.StrOpt('db_current_version',
652 default="v1.0",
653 help="Current database version to use in database tests."),
Nikhil Manchandadd6886f2014-03-03 01:58:45 -0800654]
Attila Fazekasa23f5002012-10-23 19:32:45 +0200655
Steve Bakerc60e4e32013-05-06 15:22:41 +1200656orchestration_group = cfg.OptGroup(name='orchestration',
657 title='Orchestration Service Options')
658
659OrchestrationGroup = [
660 cfg.StrOpt('catalog_type',
661 default='orchestration',
662 help="Catalog type of the Orchestration service."),
Arata Notsu8f440392013-09-13 16:14:20 +0900663 cfg.StrOpt('region',
664 default='',
665 help="The orchestration region name to use. If empty, the "
666 "value of identity.region is used instead. If no such "
667 "region is found in the service catalog, the first found "
668 "one is used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000669 cfg.StrOpt('endpoint_type',
670 default='publicURL',
671 choices=['public', 'admin', 'internal',
672 'publicURL', 'adminURL', 'internalURL'],
673 help="The endpoint type to use for the orchestration service."),
Steve Bakerc60e4e32013-05-06 15:22:41 +1200674 cfg.BoolOpt('allow_tenant_isolation',
675 default=False,
676 help="Allows test cases to create/destroy tenants and "
677 "users. This option enables isolated test cases and "
678 "better parallel execution, but also requires that "
679 "OpenStack Identity API admin credentials are known."),
680 cfg.IntOpt('build_interval',
681 default=1,
682 help="Time in seconds between build status checks."),
683 cfg.IntOpt('build_timeout',
Matthew Treinisha2dfd492014-04-15 11:15:34 -0400684 default=1200,
Steve Bakerc60e4e32013-05-06 15:22:41 +1200685 help="Timeout in seconds to wait for a stack to build."),
Steve Bakerc60e4e32013-05-06 15:22:41 +1200686 cfg.StrOpt('instance_type',
Steve Baker9e86b832013-05-22 15:40:28 +1200687 default='m1.micro',
Steve Bakerc60e4e32013-05-06 15:22:41 +1200688 help="Instance type for tests. Needs to be big enough for a "
689 "full OS plus the test workload"),
690 cfg.StrOpt('image_ref',
691 default=None,
692 help="Name of heat-cfntools enabled image to use when "
693 "launching test instances."),
694 cfg.StrOpt('keypair_name',
695 default=None,
696 help="Name of existing keypair to launch servers with."),
Clint Byrum71f27632013-09-09 11:41:32 -0700697 cfg.IntOpt('max_template_size',
Joe Gordon0e51b222013-10-24 14:11:10 +0100698 default=524288,
Clint Byrum71f27632013-09-09 11:41:32 -0700699 help="Value must match heat configuration of the same name."),
Steven Hardyfdc6bd72014-03-21 16:56:04 +0000700 cfg.IntOpt('max_resources_per_stack',
701 default=1000,
702 help="Value must match heat configuration of the same name."),
Steve Bakerc60e4e32013-05-06 15:22:41 +1200703]
704
705
Yassine Lamgarchalb158d412013-12-27 19:29:42 +0100706telemetry_group = cfg.OptGroup(name='telemetry',
707 title='Telemetry Service Options')
708
709TelemetryGroup = [
710 cfg.StrOpt('catalog_type',
711 default='metering',
712 help="Catalog type of the Telemetry service."),
JordanPfc62c902014-02-26 14:47:28 +0000713 cfg.StrOpt('endpoint_type',
714 default='publicURL',
715 choices=['public', 'admin', 'internal',
716 'publicURL', 'adminURL', 'internalURL'],
717 help="The endpoint type to use for the telemetry service."),
Vadim Rovachev7bcea352013-12-26 15:56:17 +0400718 cfg.BoolOpt('too_slow_to_test',
719 default=True,
720 help="This variable is used as flag to enable "
721 "notification tests")
Yassine Lamgarchalb158d412013-12-27 19:29:42 +0100722]
723
724
Julie Pichond1017642013-07-24 16:37:23 +0100725dashboard_group = cfg.OptGroup(name="dashboard",
726 title="Dashboard options")
727
728DashboardGroup = [
729 cfg.StrOpt('dashboard_url',
730 default='http://localhost/',
731 help="Where the dashboard can be found"),
732 cfg.StrOpt('login_url',
733 default='http://localhost/auth/login/',
734 help="Login page for the dashboard"),
735]
736
737
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +0400738data_processing_group = cfg.OptGroup(name="data_processing",
739 title="Data Processing options")
740
741DataProcessingGroup = [
742 cfg.StrOpt('catalog_type',
743 default='data_processing',
JordanPfc62c902014-02-26 14:47:28 +0000744 help="Catalog type of the data processing service."),
745 cfg.StrOpt('endpoint_type',
746 default='publicURL',
747 choices=['public', 'admin', 'internal',
748 'publicURL', 'adminURL', 'internalURL'],
749 help="The endpoint type to use for the data processing "
750 "service."),
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +0400751]
752
753
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500754boto_group = cfg.OptGroup(name='boto',
755 title='EC2/S3 options')
DennyZhang1e71b612013-09-26 12:35:40 -0500756BotoGroup = [
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500757 cfg.StrOpt('ec2_url',
758 default="http://localhost:8773/services/Cloud",
759 help="EC2 URL"),
760 cfg.StrOpt('s3_url',
761 default="http://localhost:8080",
762 help="S3 URL"),
763 cfg.StrOpt('aws_secret',
764 default=None,
765 help="AWS Secret Key",
766 secret=True),
767 cfg.StrOpt('aws_access',
768 default=None,
769 help="AWS Access Key"),
Attila Fazekas27dd92e2014-02-21 14:49:40 +0100770 cfg.StrOpt('aws_zone',
771 default="nova",
772 help="AWS Zone for EC2 tests"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500773 cfg.StrOpt('s3_materials_path',
774 default="/opt/stack/devstack/files/images/"
775 "s3-materials/cirros-0.3.0",
776 help="S3 Materials Path"),
777 cfg.StrOpt('ari_manifest',
778 default="cirros-0.3.0-x86_64-initrd.manifest.xml",
779 help="ARI Ramdisk Image manifest"),
780 cfg.StrOpt('ami_manifest',
781 default="cirros-0.3.0-x86_64-blank.img.manifest.xml",
782 help="AMI Machine Image manifest"),
783 cfg.StrOpt('aki_manifest',
784 default="cirros-0.3.0-x86_64-vmlinuz.manifest.xml",
785 help="AKI Kernel Image manifest"),
786 cfg.StrOpt('instance_type',
787 default="m1.tiny",
788 help="Instance type"),
789 cfg.IntOpt('http_socket_timeout',
790 default=3,
791 help="boto Http socket timeout"),
792 cfg.IntOpt('num_retries',
793 default=1,
794 help="boto num_retries on error"),
795 cfg.IntOpt('build_timeout',
796 default=60,
797 help="Status Change Timeout"),
798 cfg.IntOpt('build_interval',
799 default=1,
800 help="Status Change Test Interval"),
801]
Attila Fazekasf7f2d932012-12-13 09:14:38 +0100802
Matthew Treinish615ea6a2013-02-25 17:26:59 -0500803stress_group = cfg.OptGroup(name='stress', title='Stress Test Options')
804
805StressGroup = [
806 cfg.StrOpt('nova_logdir',
807 default=None,
808 help='Directory containing log files on the compute nodes'),
809 cfg.IntOpt('max_instances',
810 default=16,
811 help='Maximum number of instances to create during test.'),
812 cfg.StrOpt('controller',
813 default=None,
David Kranzb9d97502013-05-01 15:55:04 -0400814 help='Controller host.'),
815 # new stress options
816 cfg.StrOpt('target_controller',
817 default=None,
818 help='Controller host.'),
819 cfg.StrOpt('target_ssh_user',
820 default=None,
821 help='ssh user.'),
822 cfg.StrOpt('target_private_key_path',
823 default=None,
824 help='Path to private key.'),
825 cfg.StrOpt('target_logfiles',
826 default=None,
827 help='regexp for list of log files.'),
Matthew Treinishf319a732013-10-24 21:39:24 +0000828 cfg.IntOpt('log_check_interval',
David Kranzb9d97502013-05-01 15:55:04 -0400829 default=60,
Marc Koderer32221b8e2013-08-23 13:57:50 +0200830 help='time (in seconds) between log file error checks.'),
Matthew Treinishf319a732013-10-24 21:39:24 +0000831 cfg.IntOpt('default_thread_number_per_action',
Marc Koderer32221b8e2013-08-23 13:57:50 +0200832 default=4,
Julien Leloup04d40f72014-01-28 11:17:18 +0100833 help='The number of threads created while stress test.'),
834 cfg.BoolOpt('leave_dirty_stack',
835 default=False,
836 help='Prevent the cleaning (tearDownClass()) between'
837 ' each stress test run if an exception occurs'
Julien Leloupa5ee5422014-02-13 14:29:02 +0100838 ' during this run.'),
839 cfg.BoolOpt('full_clean_stack',
840 default=False,
841 help='Allows a full cleaning process after a stress test.'
842 ' Caution : this cleanup will remove every objects of'
843 ' every tenant.')
Matthew Treinish615ea6a2013-02-25 17:26:59 -0500844]
845
846
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +0900847scenario_group = cfg.OptGroup(name='scenario', title='Scenario Test Options')
848
849ScenarioGroup = [
850 cfg.StrOpt('img_dir',
851 default='/opt/stack/new/devstack/files/images/'
852 'cirros-0.3.1-x86_64-uec',
853 help='Directory containing image files'),
Masayuki Igawa4f71bf02014-02-21 14:02:29 +0900854 cfg.StrOpt('qcow2_img_file',
855 default='cirros-0.3.1-x86_64-disk.img',
856 help='QCOW2 image file name'),
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +0900857 cfg.StrOpt('ami_img_file',
858 default='cirros-0.3.1-x86_64-blank.img',
859 help='AMI image file name'),
860 cfg.StrOpt('ari_img_file',
861 default='cirros-0.3.1-x86_64-initrd',
862 help='ARI image file name'),
863 cfg.StrOpt('aki_img_file',
864 default='cirros-0.3.1-x86_64-vmlinuz',
865 help='AKI image file name'),
866 cfg.StrOpt('ssh_user',
867 default='cirros',
Joe Gordonb5e10cd2013-07-10 15:51:12 +0000868 help='ssh username for the image file'),
869 cfg.IntOpt(
870 'large_ops_number',
871 default=0,
872 help="specifies how many resources to request at once. Used "
873 "for large operations testing.")
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +0900874]
875
876
Matthew Treinish4c412922013-07-16 15:27:42 -0400877service_available_group = cfg.OptGroup(name="service_available",
878 title="Available OpenStack Services")
879
880ServiceAvailableGroup = [
881 cfg.BoolOpt('cinder',
882 default=True,
883 help="Whether or not cinder is expected to be available"),
Matthew Treinishfaa340d2013-07-19 16:26:21 -0400884 cfg.BoolOpt('neutron',
885 default=False,
886 help="Whether or not neutron is expected to be available"),
Matthew Treinish853ae442013-07-19 16:36:07 -0400887 cfg.BoolOpt('glance',
888 default=True,
889 help="Whether or not glance is expected to be available"),
Matthew Treinish61e332b2013-07-19 16:42:31 -0400890 cfg.BoolOpt('swift',
891 default=True,
892 help="Whether or not swift is expected to be available"),
Matthew Treinish6b41e242013-07-19 16:49:28 -0400893 cfg.BoolOpt('nova',
894 default=True,
895 help="Whether or not nova is expected to be available"),
Matthew Treinisha9d43882013-07-19 16:54:52 -0400896 cfg.BoolOpt('heat',
897 default=False,
898 help="Whether or not Heat is expected to be available"),
Mehdi Abaakouk8581c0b2013-10-04 10:45:42 +0200899 cfg.BoolOpt('ceilometer',
900 default=True,
901 help="Whether or not Ceilometer is expected to be available"),
Julie Pichond1017642013-07-24 16:37:23 +0100902 cfg.BoolOpt('horizon',
903 default=True,
904 help="Whether or not Horizon is expected to be available"),
Sergey Lukjanov9c95a252014-03-13 23:59:22 +0400905 cfg.BoolOpt('sahara',
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +0400906 default=False,
Sergey Lukjanov9c95a252014-03-13 23:59:22 +0400907 help="Whether or not Sahara is expected to be available"),
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +0300908 cfg.BoolOpt('ironic',
909 default=False,
910 help="Whether or not Ironic is expected to be available"),
Nikhil Manchandadd6886f2014-03-03 01:58:45 -0800911 cfg.BoolOpt('trove',
912 default=False,
913 help="Whether or not Trove is expected to be available"),
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500914 cfg.BoolOpt('marconi',
915 default=False,
916 help="Whether or not Marconi is expected to be available"),
Matthew Treinish4c412922013-07-16 15:27:42 -0400917]
918
Attila Fazekasaeeeefd2013-08-06 17:01:56 +0200919debug_group = cfg.OptGroup(name="debug",
920 title="Debug System")
921
922DebugGroup = [
923 cfg.BoolOpt('enable',
924 default=True,
925 help="Enable diagnostic commands"),
Sean Daguec522c092014-03-24 10:43:22 -0400926 cfg.StrOpt('trace_requests',
927 default='',
928 help="""A regex to determine which requests should be traced.
929
930This is a regex to match the caller for rest client requests to be able to
931selectively trace calls out of specific classes and methods. It largely
932exists for test development, and is not expected to be used in a real deploy
933of tempest. This will be matched against the discovered ClassName:method
934in the test environment.
935
936Expected values for this field are:
937
938 * ClassName:test_method_name - traces one test_method
939 * ClassName:setUp(Class) - traces specific setup functions
940 * ClassName:tearDown(Class) - traces specific teardown functions
941 * ClassName:_run_cleanups - traces the cleanup functions
942
943If nothing is specified, this feature is not enabled. To trace everything
944specify .* as the regex.
945""")
Attila Fazekasaeeeefd2013-08-06 17:01:56 +0200946]
947
Andrea Frittolif5da28b2013-12-06 07:08:07 +0000948input_scenario_group = cfg.OptGroup(name="input-scenario",
949 title="Filters and values for"
950 " input scenarios")
951
952InputScenarioGroup = [
953 cfg.StrOpt('image_regex',
954 default='^cirros-0.3.1-x86_64-uec$',
955 help="Matching images become parameters for scenario tests"),
956 cfg.StrOpt('flavor_regex',
Andrea Frittoli99901c02014-01-30 18:06:49 +0000957 default='^m1.nano$',
Andrea Frittolif5da28b2013-12-06 07:08:07 +0000958 help="Matching flavors become parameters for scenario tests"),
959 cfg.StrOpt('non_ssh_image_regex',
960 default='^.*[Ww]in.*$',
961 help="SSH verification in tests is skipped"
962 "for matching images"),
963 cfg.StrOpt('ssh_user_regex',
964 default="[[\"^.*[Cc]irros.*$\", \"root\"]]",
965 help="List of user mapped to regex "
966 "to matching image names."),
967]
968
Attila Fazekasaeeeefd2013-08-06 17:01:56 +0200969
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +0300970baremetal_group = cfg.OptGroup(name='baremetal',
971 title='Baremetal provisioning service options')
972
973BaremetalGroup = [
974 cfg.StrOpt('catalog_type',
975 default='baremetal',
Adam Gandelman4a48a602014-03-20 18:23:18 -0700976 help="Catalog type of the baremetal provisioning service"),
977 cfg.BoolOpt('driver_enabled',
978 default=False,
979 help="Whether the Ironic nova-compute driver is enabled"),
Yuiko Takada1ee1b322014-07-04 09:55:30 +0900980 cfg.StrOpt('driver',
981 default='fake',
982 help="Driver name which Ironic uses"),
JordanPfc62c902014-02-26 14:47:28 +0000983 cfg.StrOpt('endpoint_type',
984 default='publicURL',
985 choices=['public', 'admin', 'internal',
986 'publicURL', 'adminURL', 'internalURL'],
987 help="The endpoint type to use for the baremetal provisioning "
Adam Gandelman4a48a602014-03-20 18:23:18 -0700988 "service"),
989 cfg.IntOpt('active_timeout',
990 default=300,
991 help="Timeout for Ironic node to completely provision"),
992 cfg.IntOpt('association_timeout',
Adam Gandelmane42f0922014-06-10 15:26:37 -0700993 default=30,
Adam Gandelman4a48a602014-03-20 18:23:18 -0700994 help="Timeout for association of Nova instance and Ironic "
995 "node"),
996 cfg.IntOpt('power_timeout',
Adam Gandelmane42f0922014-06-10 15:26:37 -0700997 default=60,
Adam Gandelman4a48a602014-03-20 18:23:18 -0700998 help="Timeout for Ironic power transitions."),
999 cfg.IntOpt('unprovision_timeout',
Adam Gandelmane42f0922014-06-10 15:26:37 -07001000 default=60,
Adam Gandelman4a48a602014-03-20 18:23:18 -07001001 help="Timeout for unprovisioning an Ironic node.")
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +03001002]
1003
Matthew Treinishe2b56b52014-01-29 19:25:50 +00001004cli_group = cfg.OptGroup(name='cli', title="cli Configuration Options")
1005
1006CLIGroup = [
1007 cfg.BoolOpt('enabled',
1008 default=True,
1009 help="enable cli tests"),
1010 cfg.StrOpt('cli_dir',
1011 default='/usr/local/bin',
1012 help="directory where python client binaries are located"),
Sean Dague44b24682014-02-20 19:08:24 -05001013 cfg.BoolOpt('has_manage',
1014 default=True,
1015 help=("Whether the tempest run location has access to the "
1016 "*-manage commands. In a pure blackbox environment "
1017 "it will not.")),
Matthew Treinishe2b56b52014-01-29 19:25:50 +00001018 cfg.IntOpt('timeout',
1019 default=15,
1020 help="Number of seconds to wait on a CLI timeout"),
1021]
1022
Marc Koderer6ee82dc2014-02-17 10:26:29 +01001023negative_group = cfg.OptGroup(name='negative', title="Negative Test Options")
1024
1025NegativeGroup = [
1026 cfg.StrOpt('test_generator',
1027 default='tempest.common.' +
1028 'generator.negative_generator.NegativeTestGenerator',
1029 help="Test generator class for all negative tests"),
1030]
1031
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +03001032
Matthew Treinish43b296a2014-02-28 15:23:00 -05001033def register_opts():
Matthew Treinishc791ac42014-07-16 09:15:23 -04001034 register_opt_group(cfg.CONF, auth_group, AuthGroup)
Matthew Treinish43b296a2014-02-28 15:23:00 -05001035 register_opt_group(cfg.CONF, compute_group, ComputeGroup)
1036 register_opt_group(cfg.CONF, compute_features_group,
1037 ComputeFeaturesGroup)
1038 register_opt_group(cfg.CONF, identity_group, IdentityGroup)
1039 register_opt_group(cfg.CONF, identity_feature_group,
1040 IdentityFeatureGroup)
1041 register_opt_group(cfg.CONF, image_group, ImageGroup)
1042 register_opt_group(cfg.CONF, image_feature_group, ImageFeaturesGroup)
1043 register_opt_group(cfg.CONF, network_group, NetworkGroup)
1044 register_opt_group(cfg.CONF, network_feature_group,
1045 NetworkFeaturesGroup)
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -05001046 register_opt_group(cfg.CONF, queuing_group, QueuingGroup)
Matthew Treinish43b296a2014-02-28 15:23:00 -05001047 register_opt_group(cfg.CONF, volume_group, VolumeGroup)
1048 register_opt_group(cfg.CONF, volume_feature_group,
1049 VolumeFeaturesGroup)
1050 register_opt_group(cfg.CONF, object_storage_group, ObjectStoreGroup)
1051 register_opt_group(cfg.CONF, object_storage_feature_group,
1052 ObjectStoreFeaturesGroup)
Nikhil Manchandadd6886f2014-03-03 01:58:45 -08001053 register_opt_group(cfg.CONF, database_group, DatabaseGroup)
Matthew Treinish43b296a2014-02-28 15:23:00 -05001054 register_opt_group(cfg.CONF, orchestration_group, OrchestrationGroup)
1055 register_opt_group(cfg.CONF, telemetry_group, TelemetryGroup)
1056 register_opt_group(cfg.CONF, dashboard_group, DashboardGroup)
1057 register_opt_group(cfg.CONF, data_processing_group,
1058 DataProcessingGroup)
1059 register_opt_group(cfg.CONF, boto_group, BotoGroup)
1060 register_opt_group(cfg.CONF, compute_admin_group, ComputeAdminGroup)
1061 register_opt_group(cfg.CONF, stress_group, StressGroup)
1062 register_opt_group(cfg.CONF, scenario_group, ScenarioGroup)
1063 register_opt_group(cfg.CONF, service_available_group,
1064 ServiceAvailableGroup)
1065 register_opt_group(cfg.CONF, debug_group, DebugGroup)
1066 register_opt_group(cfg.CONF, baremetal_group, BaremetalGroup)
1067 register_opt_group(cfg.CONF, input_scenario_group, InputScenarioGroup)
1068 register_opt_group(cfg.CONF, cli_group, CLIGroup)
Marc Koderer6ee82dc2014-02-17 10:26:29 +01001069 register_opt_group(cfg.CONF, negative_group, NegativeGroup)
Matthew Treinish43b296a2014-02-28 15:23:00 -05001070
1071
Sean Dague3b9b1f32013-12-20 17:04:54 -05001072# this should never be called outside of this class
1073class TempestConfigPrivate(object):
Daryl Walleck1465d612011-11-02 02:22:15 -05001074 """Provides OpenStack configuration information."""
1075
Brian Waldon738cd632011-12-12 18:45:09 -05001076 DEFAULT_CONFIG_DIR = os.path.join(
Zhongyue Luoa1343de2013-01-04 16:21:35 +08001077 os.path.abspath(os.path.dirname(os.path.dirname(__file__))),
Brian Waldon738cd632011-12-12 18:45:09 -05001078 "etc")
Daryl Walleck1465d612011-11-02 02:22:15 -05001079
Brian Waldon738cd632011-12-12 18:45:09 -05001080 DEFAULT_CONFIG_FILE = "tempest.conf"
1081
Matthew Treinish43b296a2014-02-28 15:23:00 -05001082 def _set_attrs(self):
Matthew Treinishc791ac42014-07-16 09:15:23 -04001083 self.auth = cfg.CONF.auth
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001084 self.compute = cfg.CONF.compute
Matthew Treinishd5c96022013-10-17 21:51:23 +00001085 self.compute_feature_enabled = cfg.CONF['compute-feature-enabled']
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001086 self.identity = cfg.CONF.identity
Matthew Treinishd5021a72014-01-09 18:42:51 +00001087 self.identity_feature_enabled = cfg.CONF['identity-feature-enabled']
Matt Riedemannd3efe902014-02-10 06:46:38 -08001088 self.image = cfg.CONF.image
Matthew Treinish2b5287d2013-10-22 17:40:34 +00001089 self.image_feature_enabled = cfg.CONF['image-feature-enabled']
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001090 self.network = cfg.CONF.network
Matthew Treinishe3d26142013-11-26 19:14:58 +00001091 self.network_feature_enabled = cfg.CONF['network-feature-enabled']
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001092 self.volume = cfg.CONF.volume
Matthew Treinishd5c96022013-10-17 21:51:23 +00001093 self.volume_feature_enabled = cfg.CONF['volume-feature-enabled']
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001094 self.object_storage = cfg.CONF['object-storage']
Matthew Treinishd5c96022013-10-17 21:51:23 +00001095 self.object_storage_feature_enabled = cfg.CONF[
1096 'object-storage-feature-enabled']
Nikhil Manchandadd6886f2014-03-03 01:58:45 -08001097 self.database = cfg.CONF.database
Steve Bakerc60e4e32013-05-06 15:22:41 +12001098 self.orchestration = cfg.CONF.orchestration
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -05001099 self.queuing = cfg.CONF.queuing
Yassine Lamgarchalb158d412013-12-27 19:29:42 +01001100 self.telemetry = cfg.CONF.telemetry
Julie Pichond1017642013-07-24 16:37:23 +01001101 self.dashboard = cfg.CONF.dashboard
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +04001102 self.data_processing = cfg.CONF.data_processing
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001103 self.boto = cfg.CONF.boto
Attila Fazekascadcb1f2013-01-21 23:10:53 +01001104 self.compute_admin = cfg.CONF['compute-admin']
Matthew Treinish615ea6a2013-02-25 17:26:59 -05001105 self.stress = cfg.CONF.stress
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +09001106 self.scenario = cfg.CONF.scenario
Matthew Treinish4c412922013-07-16 15:27:42 -04001107 self.service_available = cfg.CONF.service_available
Attila Fazekas5fae7a32013-09-25 16:52:44 +02001108 self.debug = cfg.CONF.debug
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +03001109 self.baremetal = cfg.CONF.baremetal
Andrea Frittolif5da28b2013-12-06 07:08:07 +00001110 self.input_scenario = cfg.CONF['input-scenario']
Matthew Treinishe2b56b52014-01-29 19:25:50 +00001111 self.cli = cfg.CONF.cli
Marc Koderer6ee82dc2014-02-17 10:26:29 +01001112 self.negative = cfg.CONF.negative
Attila Fazekascadcb1f2013-01-21 23:10:53 +01001113 if not self.compute_admin.username:
1114 self.compute_admin.username = self.identity.admin_username
1115 self.compute_admin.password = self.identity.admin_password
1116 self.compute_admin.tenant_name = self.identity.admin_tenant_name
Andrea Frittolib1b04bb2014-04-06 11:57:07 +01001117 cfg.CONF.set_default('domain_name', self.identity.admin_domain_name,
1118 group='identity')
1119 cfg.CONF.set_default('alt_domain_name',
1120 self.identity.admin_domain_name,
1121 group='identity')
1122 cfg.CONF.set_default('domain_name', self.identity.admin_domain_name,
1123 group='compute-admin')
Sean Dague86bd8422013-12-20 09:56:44 -05001124
Joe Gordon28a84ae2014-07-17 15:38:28 +00001125 def __init__(self, parse_conf=True, config_path=None):
Matthew Treinish43b296a2014-02-28 15:23:00 -05001126 """Initialize a configuration from a conf directory and conf file."""
1127 super(TempestConfigPrivate, self).__init__()
1128 config_files = []
1129 failsafe_path = "/etc/tempest/" + self.DEFAULT_CONFIG_FILE
1130
Joe Gordon28a84ae2014-07-17 15:38:28 +00001131 if config_path:
1132 path = config_path
1133 else:
1134 # Environment variables override defaults...
1135 conf_dir = os.environ.get('TEMPEST_CONFIG_DIR',
1136 self.DEFAULT_CONFIG_DIR)
1137 conf_file = os.environ.get('TEMPEST_CONFIG',
1138 self.DEFAULT_CONFIG_FILE)
Matthew Treinish43b296a2014-02-28 15:23:00 -05001139
Joe Gordon28a84ae2014-07-17 15:38:28 +00001140 path = os.path.join(conf_dir, conf_file)
Matthew Treinish43b296a2014-02-28 15:23:00 -05001141
1142 if not os.path.isfile(path):
1143 path = failsafe_path
1144
1145 # only parse the config file if we expect one to exist. This is needed
1146 # to remove an issue with the config file up to date checker.
1147 if parse_conf:
1148 config_files.append(path)
1149
1150 cfg.CONF([], project='tempest', default_config_files=config_files)
1151 logging.setup('tempest')
1152 LOG = logging.getLogger('tempest')
1153 LOG.info("Using tempest config file %s" % path)
1154 register_opts()
1155 self._set_attrs()
Masayuki Igawa9ec4cd82014-02-05 15:04:16 +09001156 if parse_conf:
1157 cfg.CONF.log_opt_values(LOG, std_logging.DEBUG)
1158
Sean Dague86bd8422013-12-20 09:56:44 -05001159
1160class TempestConfigProxy(object):
1161 _config = None
Joe Gordon28a84ae2014-07-17 15:38:28 +00001162 _path = None
Sean Dague86bd8422013-12-20 09:56:44 -05001163
Sean Daguedb6ac6c2014-06-06 16:52:44 -04001164 _extra_log_defaults = [
1165 'keystoneclient.session=INFO',
1166 'paramiko.transport=INFO',
1167 'requests.packages.urllib3.connectionpool=WARN'
1168 ]
1169
1170 def _fix_log_levels(self):
1171 """Tweak the oslo log defaults."""
1172 for opt in logging.log_opts:
1173 if opt.dest == 'default_log_levels':
1174 opt.default.extend(self._extra_log_defaults)
1175
Sean Dague86bd8422013-12-20 09:56:44 -05001176 def __getattr__(self, attr):
1177 if not self._config:
Sean Daguedb6ac6c2014-06-06 16:52:44 -04001178 self._fix_log_levels()
Joe Gordon28a84ae2014-07-17 15:38:28 +00001179 self._config = TempestConfigPrivate(config_path=self._path)
Sean Dague86bd8422013-12-20 09:56:44 -05001180
1181 return getattr(self._config, attr)
1182
Joe Gordon28a84ae2014-07-17 15:38:28 +00001183 def set_config_path(self, path):
1184 self._path = path
1185
Sean Dague86bd8422013-12-20 09:56:44 -05001186
1187CONF = TempestConfigProxy()