blob: 39c2be1f87b67e4bca2c5883fc26584c43beea25 [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?"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000298 cfg.BoolOpt('resize',
299 default=False,
300 help="Does the test environment support resizing?"),
Eric Windischb5538072014-03-09 23:47:35 -0400301 cfg.BoolOpt('pause',
302 default=True,
303 help="Does the test environment support pausing?"),
David Shrewsbury25f666f2014-07-22 12:17:59 -0400304 cfg.BoolOpt('shelve',
305 default=True,
306 help="Does the test environment support shelving/unshelving?"),
Eric Windischaeb7e842014-03-10 01:10:50 -0400307 cfg.BoolOpt('suspend',
308 default=True,
309 help="Does the test environment support suspend/resume?"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000310 cfg.BoolOpt('live_migration',
311 default=False,
312 help="Does the test environment support live migration "
313 "available?"),
314 cfg.BoolOpt('block_migration_for_live_migration',
315 default=False,
316 help="Does the test environment use block devices for live "
317 "migration"),
318 cfg.BoolOpt('block_migrate_cinder_iscsi',
319 default=False,
320 help="Does the test environment block migration support "
Ghanshyam Mann41c17572014-02-27 18:52:56 +0900321 "cinder iSCSI volumes"),
322 cfg.BoolOpt('vnc_console',
323 default=False,
324 help='Enable VNC console. This configuration value should '
Ghanshyam70876d02014-03-11 11:40:18 +0900325 'be same as [nova.vnc]->vnc_enabled in nova.conf'),
326 cfg.BoolOpt('spice_console',
327 default=False,
328 help='Enable Spice console. This configuration value should '
329 'be same as [nova.spice]->enabled in nova.conf'),
330 cfg.BoolOpt('rdp_console',
331 default=False,
332 help='Enable RDP console. This configuration value should '
Adam Gandelman2e37b4f2014-06-18 17:34:21 -0700333 'be same as [nova.rdp]->enabled in nova.conf'),
334 cfg.BoolOpt('rescue',
335 default=True,
336 help='Does the test environment support instance rescue '
Ghanshyam9c2e50d2014-07-22 21:32:05 +0900337 'mode?'),
338 cfg.BoolOpt('enable_instance_password',
339 default=True,
340 help='Enables returning of the instance password by the '
341 'relevant server API calls such as create, rebuild '
Adam Gandelman7186f7a2014-07-23 09:28:56 -0400342 'or rescue.'),
343 cfg.BoolOpt('interface_attach',
344 default=True,
345 help='Does the test environment support dynamic network '
346 'interface attachment?')
Matthew Treinishd5c96022013-10-17 21:51:23 +0000347]
348
349
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500350compute_admin_group = cfg.OptGroup(name='compute-admin',
351 title="Compute Admin Options")
donald-ngo7fb1efa2011-12-13 17:17:36 -0800352
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500353ComputeAdminGroup = [
354 cfg.StrOpt('username',
Andrea Frittolia9463672014-03-03 14:39:02 +0000355 default=None,
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500356 help="Administrative Username to use for Nova API requests."),
357 cfg.StrOpt('tenant_name',
Andrea Frittolia9463672014-03-03 14:39:02 +0000358 default=None,
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500359 help="Administrative Tenant name to use for Nova API "
360 "requests."),
361 cfg.StrOpt('password',
Andrea Frittolia9463672014-03-03 14:39:02 +0000362 default=None,
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500363 help="API key to use when authenticating as admin.",
364 secret=True),
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100365 cfg.StrOpt('domain_name',
366 default=None,
367 help="Domain name for authentication as admin (Keystone V3)."
368 "The same domain applies to user and project"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500369]
Daryl Walleck587385b2012-03-03 13:00:26 -0600370
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500371image_group = cfg.OptGroup(name='image',
372 title="Image Service Options")
Jay Pipesf38eaac2012-06-21 13:37:35 -0400373
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500374ImageGroup = [
Matthew Treinish72ea4422013-02-07 14:42:49 -0500375 cfg.StrOpt('catalog_type',
376 default='image',
Sean Dague83401992013-05-06 17:46:36 -0400377 help='Catalog type of the Image service.'),
Arata Notsu8f440392013-09-13 16:14:20 +0900378 cfg.StrOpt('region',
379 default='',
380 help="The image region name to use. If empty, the value "
381 "of identity.region is used instead. If no such region "
382 "is found in the service catalog, the first found one is "
383 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000384 cfg.StrOpt('endpoint_type',
385 default='publicURL',
386 choices=['public', 'admin', 'internal',
387 'publicURL', 'adminURL', 'internalURL'],
388 help="The endpoint type to use for the image service."),
Sean Dague83401992013-05-06 17:46:36 -0400389 cfg.StrOpt('http_image',
390 default='http://download.cirros-cloud.net/0.3.1/'
391 'cirros-0.3.1-x86_64-uec.tar.gz',
DennyZhang8912d012013-09-25 18:08:34 -0500392 help='http accessible image')
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500393]
Jay Pipesf38eaac2012-06-21 13:37:35 -0400394
Matthew Treinish2b5287d2013-10-22 17:40:34 +0000395image_feature_group = cfg.OptGroup(name='image-feature-enabled',
396 title='Enabled image service features')
397
398ImageFeaturesGroup = [
399 cfg.BoolOpt('api_v2',
400 default=True,
401 help="Is the v2 image API enabled"),
402 cfg.BoolOpt('api_v1',
403 default=True,
404 help="Is the v1 image API enabled"),
405]
Jay Pipesf38eaac2012-06-21 13:37:35 -0400406
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500407network_group = cfg.OptGroup(name='network',
408 title='Network Service Options')
Daryl Walleck587385b2012-03-03 13:00:26 -0600409
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500410NetworkGroup = [
411 cfg.StrOpt('catalog_type',
412 default='network',
Mark McClainf2982e82013-07-06 17:48:03 -0400413 help='Catalog type of the Neutron service.'),
Arata Notsu8f440392013-09-13 16:14:20 +0900414 cfg.StrOpt('region',
415 default='',
416 help="The network region name to use. If empty, the value "
417 "of identity.region is used instead. If no such region "
418 "is found in the service catalog, the first found one is "
419 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000420 cfg.StrOpt('endpoint_type',
421 default='publicURL',
422 choices=['public', 'admin', 'internal',
423 'publicURL', 'adminURL', 'internalURL'],
424 help="The endpoint type to use for the network service."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500425 cfg.StrOpt('tenant_network_cidr',
426 default="10.100.0.0/16",
Henry Gessauffda37a2014-01-16 11:17:55 -0500427 help="The cidr block to allocate tenant ipv4 subnets from"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500428 cfg.IntOpt('tenant_network_mask_bits',
Attila Fazekas8ea181b2013-07-13 16:26:14 +0200429 default=28,
Henry Gessauffda37a2014-01-16 11:17:55 -0500430 help="The mask bits for tenant ipv4 subnets"),
431 cfg.StrOpt('tenant_network_v6_cidr',
432 default="2003::/64",
433 help="The cidr block to allocate tenant ipv6 subnets from"),
434 cfg.IntOpt('tenant_network_v6_mask_bits',
435 default=96,
436 help="The mask bits for tenant ipv6 subnets"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500437 cfg.BoolOpt('tenant_networks_reachable',
438 default=False,
439 help="Whether tenant network connectivity should be "
440 "evaluated directly"),
441 cfg.StrOpt('public_network_id',
442 default="",
443 help="Id of the public network that provides external "
444 "connectivity"),
445 cfg.StrOpt('public_router_id',
446 default="",
447 help="Id of the public router that provides external "
448 "connectivity"),
izikpensod9a01a62014-02-17 20:02:32 +0200449 cfg.IntOpt('build_timeout',
450 default=300,
451 help="Timeout in seconds to wait for network operation to "
452 "complete."),
453 cfg.IntOpt('build_interval',
Sean Dague82190852014-05-24 07:42:59 -0400454 default=1,
izikpensod9a01a62014-02-17 20:02:32 +0200455 help="Time in seconds between network operation status "
456 "checks."),
Attila Fazekas640392b2014-06-12 15:58:10 +0200457 cfg.ListOpt('dns_servers',
458 default=["8.8.8.8", "8.8.4.4"],
459 help="List of dns servers whichs hould be used"
460 " for subnet creation")
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500461]
Jay Pipes3f981df2012-03-27 18:59:44 -0400462
Matthew Treinishe3d26142013-11-26 19:14:58 +0000463network_feature_group = cfg.OptGroup(name='network-feature-enabled',
464 title='Enabled network service features')
465
466NetworkFeaturesGroup = [
Matthew Treinishe2e33cf2014-03-03 19:28:41 +0000467 cfg.BoolOpt('ipv6',
468 default=True,
469 help="Allow the execution of IPv6 tests"),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000470 cfg.ListOpt('api_extensions',
471 default=['all'],
Zhi Kun Liude25c022014-02-14 13:25:19 +0800472 help='A list of enabled network extensions with a special '
Simeon Monov5d7effe2014-07-16 07:32:38 +0300473 'entry all which indicates every extension is enabled. '
474 'Empty list indicates all extensions are disabled'),
Sean M. Collinsdd27a4d2014-05-13 10:33:15 -0400475 cfg.BoolOpt('ipv6_subnet_attributes',
476 default=False,
477 help="Allow the execution of IPv6 subnet tests that use "
478 "the extended IPv6 attributes ipv6_ra_mode "
479 "and ipv6_address_mode"
480 )
Matthew Treinishe3d26142013-11-26 19:14:58 +0000481]
482
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500483queuing_group = cfg.OptGroup(name='queuing',
484 title='Queuing Service')
485
486QueuingGroup = [
487 cfg.StrOpt('catalog_type',
488 default='queuing',
489 help='Catalog type of the Queuing service.'),
Jorge Chai83ba4ee2014-04-15 18:58:08 +0000490 cfg.IntOpt('max_queues_per_page',
491 default=20,
492 help='The maximum number of queue records per page when '
493 'listing queues'),
Malini Kamalambal7458b4b2014-05-29 11:47:28 -0400494 cfg.IntOpt('max_queue_metadata',
495 default=65536,
496 help='The maximum metadata size for a queue'),
497 cfg.IntOpt('max_messages_per_page',
498 default=20,
499 help='The maximum number of queue message per page when '
500 'listing (or) posting messages'),
501 cfg.IntOpt('max_message_size',
502 default=262144,
503 help='The maximum size of a message body'),
504 cfg.IntOpt('max_messages_per_claim',
505 default=20,
506 help='The maximum number of messages per claim'),
507 cfg.IntOpt('max_message_ttl',
508 default=1209600,
509 help='The maximum ttl for a message'),
510 cfg.IntOpt('max_claim_ttl',
511 default=43200,
512 help='The maximum ttl for a claim'),
513 cfg.IntOpt('max_claim_grace',
514 default=43200,
515 help='The maximum grace period for a claim'),
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500516]
517
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500518volume_group = cfg.OptGroup(name='volume',
519 title='Block Storage Options')
Daryl Walleck587385b2012-03-03 13:00:26 -0600520
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500521VolumeGroup = [
522 cfg.IntOpt('build_interval',
Sean Dague82190852014-05-24 07:42:59 -0400523 default=1,
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500524 help='Time in seconds between volume availability checks.'),
525 cfg.IntOpt('build_timeout',
526 default=300,
527 help='Timeout in seconds to wait for a volume to become'
528 'available.'),
529 cfg.StrOpt('catalog_type',
Matthew Treinisheb724512013-10-25 15:12:59 +0000530 default='volume',
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500531 help="Catalog type of the Volume Service"),
Arata Notsu8f440392013-09-13 16:14:20 +0900532 cfg.StrOpt('region',
533 default='',
534 help="The volume region name to use. If empty, the value "
535 "of identity.region is used instead. If no such region "
536 "is found in the service catalog, the first found one is "
537 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000538 cfg.StrOpt('endpoint_type',
539 default='publicURL',
540 choices=['public', 'admin', 'internal',
541 'publicURL', 'adminURL', 'internalURL'],
542 help="The endpoint type to use for the volume service."),
Jérôme Gallard86551ce2013-03-08 11:41:26 +0100543 cfg.StrOpt('backend1_name',
Giulio Fidentef4fa8942013-05-28 18:48:03 +0200544 default='BACKEND_1',
Jérôme Gallard86551ce2013-03-08 11:41:26 +0100545 help="Name of the backend1 (must be declared in cinder.conf)"),
546 cfg.StrOpt('backend2_name',
Giulio Fidentef4fa8942013-05-28 18:48:03 +0200547 default='BACKEND_2',
Jérôme Gallard86551ce2013-03-08 11:41:26 +0100548 help="Name of the backend2 (must be declared in cinder.conf)"),
Adam Gandelman827ad332013-06-24 17:04:09 -0700549 cfg.StrOpt('storage_protocol',
550 default='iSCSI',
551 help='Backend protocol to target when creating volume types'),
552 cfg.StrOpt('vendor_name',
553 default='Open Source',
554 help='Backend vendor to target when creating volume types'),
Ryan Hsua67f4632013-08-29 16:03:06 -0700555 cfg.StrOpt('disk_format',
556 default='raw',
557 help='Disk format to use when copying a volume to image'),
Jerry Cai9733d0e2014-03-19 15:50:49 +0800558 cfg.IntOpt('volume_size',
559 default=1,
560 help='Default size in GB for volumes created by volumes tests'),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500561]
K Jonathan Harkerd6ba4b42012-12-18 13:50:47 -0800562
Matthew Treinishd5c96022013-10-17 21:51:23 +0000563volume_feature_group = cfg.OptGroup(name='volume-feature-enabled',
564 title='Enabled Cinder Features')
565
566VolumeFeaturesGroup = [
567 cfg.BoolOpt('multi_backend',
568 default=False,
Matthew Treinishe3d26142013-11-26 19:14:58 +0000569 help="Runs Cinder multi-backend test (requires 2 backends)"),
Giulio Fidente74b08ad2014-01-18 04:02:51 +0100570 cfg.BoolOpt('backup',
571 default=True,
572 help='Runs Cinder volumes backup test'),
JordanPbce55532014-03-19 12:10:32 +0100573 cfg.BoolOpt('snapshot',
574 default=True,
575 help='Runs Cinder volume snapshot test'),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000576 cfg.ListOpt('api_extensions',
577 default=['all'],
Zhi Kun Liude25c022014-02-14 13:25:19 +0800578 help='A list of enabled volume extensions with a special '
Simeon Monov5d7effe2014-07-16 07:32:38 +0300579 'entry all which indicates every extension is enabled. '
580 'Empty list indicates all extensions are disabled'),
Zhi Kun Liubb363a22013-11-28 18:47:39 +0800581 cfg.BoolOpt('api_v1',
582 default=True,
583 help="Is the v1 volume API enabled"),
Zhi Kun Liu8cc3c842014-01-07 10:44:34 +0800584 cfg.BoolOpt('api_v2',
585 default=True,
586 help="Is the v2 volume API enabled"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000587]
588
Daryl Walleck587385b2012-03-03 13:00:26 -0600589
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500590object_storage_group = cfg.OptGroup(name='object-storage',
591 title='Object Storage Service Options')
Attila Fazekasa23f5002012-10-23 19:32:45 +0200592
DennyZhang1e71b612013-09-26 12:35:40 -0500593ObjectStoreGroup = [
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500594 cfg.StrOpt('catalog_type',
595 default='object-store',
596 help="Catalog type of the Object-Storage service."),
Arata Notsu8f440392013-09-13 16:14:20 +0900597 cfg.StrOpt('region',
598 default='',
599 help="The object-storage region name to use. If empty, the "
600 "value of identity.region is used instead. If no such "
601 "region is found in the service catalog, the first found "
602 "one is used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000603 cfg.StrOpt('endpoint_type',
604 default='publicURL',
605 choices=['public', 'admin', 'internal',
606 'publicURL', 'adminURL', 'internalURL'],
607 help="The endpoint type to use for the object-store service."),
Matthew Treinishf319a732013-10-24 21:39:24 +0000608 cfg.IntOpt('container_sync_timeout',
nayna-patelb4989b32013-01-09 06:25:13 +0000609 default=120,
Fabien Boucher2178d312013-12-31 15:38:57 +0100610 help="Number of seconds to time on waiting for a container "
nayna-patelb4989b32013-01-09 06:25:13 +0000611 "to container synchronization complete."),
Matthew Treinishf319a732013-10-24 21:39:24 +0000612 cfg.IntOpt('container_sync_interval',
nayna-patelb4989b32013-01-09 06:25:13 +0000613 default=5,
Fabien Boucher2178d312013-12-31 15:38:57 +0100614 help="Number of seconds to wait while looping to check the "
nayna-patelb4989b32013-01-09 06:25:13 +0000615 "status of a container to container synchronization"),
Matthew Treinish3fdb80c2013-08-15 11:13:19 -0400616 cfg.StrOpt('operator_role',
617 default='Member',
618 help="Role to add to users created for swift tests to "
619 "enable creating containers"),
Matthew Treinish998c91d2014-03-01 12:39:49 -0500620 cfg.StrOpt('reseller_admin_role',
621 default='ResellerAdmin',
622 help="User role that has reseller admin"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500623]
Attila Fazekasa23f5002012-10-23 19:32:45 +0200624
Matthew Treinishd5c96022013-10-17 21:51:23 +0000625object_storage_feature_group = cfg.OptGroup(
626 name='object-storage-feature-enabled',
627 title='Enabled object-storage features')
628
629ObjectStoreFeaturesGroup = [
Matthew Treinish20345382013-12-13 17:04:23 +0000630 cfg.ListOpt('discoverable_apis',
631 default=['all'],
632 help="A list of the enabled optional discoverable apis. "
633 "A single entry, all, indicates that all of these "
634 "features are expected to be enabled"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000635]
636
Nikhil Manchandadd6886f2014-03-03 01:58:45 -0800637database_group = cfg.OptGroup(name='database',
638 title='Database Service Options')
639
640DatabaseGroup = [
641 cfg.StrOpt('catalog_type',
642 default='database',
643 help="Catalog type of the Database service."),
644 cfg.StrOpt('db_flavor_ref',
645 default="1",
646 help="Valid primary flavor to use in database tests."),
Peter Stachowski320f9c72014-04-21 16:13:23 -0400647 cfg.StrOpt('db_current_version',
648 default="v1.0",
649 help="Current database version to use in database tests."),
Nikhil Manchandadd6886f2014-03-03 01:58:45 -0800650]
Attila Fazekasa23f5002012-10-23 19:32:45 +0200651
Steve Bakerc60e4e32013-05-06 15:22:41 +1200652orchestration_group = cfg.OptGroup(name='orchestration',
653 title='Orchestration Service Options')
654
655OrchestrationGroup = [
656 cfg.StrOpt('catalog_type',
657 default='orchestration',
658 help="Catalog type of the Orchestration service."),
Arata Notsu8f440392013-09-13 16:14:20 +0900659 cfg.StrOpt('region',
660 default='',
661 help="The orchestration region name to use. If empty, the "
662 "value of identity.region is used instead. If no such "
663 "region is found in the service catalog, the first found "
664 "one is used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000665 cfg.StrOpt('endpoint_type',
666 default='publicURL',
667 choices=['public', 'admin', 'internal',
668 'publicURL', 'adminURL', 'internalURL'],
669 help="The endpoint type to use for the orchestration service."),
Steve Bakerc60e4e32013-05-06 15:22:41 +1200670 cfg.BoolOpt('allow_tenant_isolation',
671 default=False,
672 help="Allows test cases to create/destroy tenants and "
673 "users. This option enables isolated test cases and "
674 "better parallel execution, but also requires that "
675 "OpenStack Identity API admin credentials are known."),
676 cfg.IntOpt('build_interval',
677 default=1,
678 help="Time in seconds between build status checks."),
679 cfg.IntOpt('build_timeout',
Matthew Treinisha2dfd492014-04-15 11:15:34 -0400680 default=1200,
Steve Bakerc60e4e32013-05-06 15:22:41 +1200681 help="Timeout in seconds to wait for a stack to build."),
Steve Bakerc60e4e32013-05-06 15:22:41 +1200682 cfg.StrOpt('instance_type',
Steve Baker9e86b832013-05-22 15:40:28 +1200683 default='m1.micro',
Steve Bakerc60e4e32013-05-06 15:22:41 +1200684 help="Instance type for tests. Needs to be big enough for a "
685 "full OS plus the test workload"),
686 cfg.StrOpt('image_ref',
687 default=None,
688 help="Name of heat-cfntools enabled image to use when "
689 "launching test instances."),
690 cfg.StrOpt('keypair_name',
691 default=None,
692 help="Name of existing keypair to launch servers with."),
Clint Byrum71f27632013-09-09 11:41:32 -0700693 cfg.IntOpt('max_template_size',
Joe Gordon0e51b222013-10-24 14:11:10 +0100694 default=524288,
Clint Byrum71f27632013-09-09 11:41:32 -0700695 help="Value must match heat configuration of the same name."),
Steven Hardyfdc6bd72014-03-21 16:56:04 +0000696 cfg.IntOpt('max_resources_per_stack',
697 default=1000,
698 help="Value must match heat configuration of the same name."),
Steve Bakerc60e4e32013-05-06 15:22:41 +1200699]
700
701
Yassine Lamgarchalb158d412013-12-27 19:29:42 +0100702telemetry_group = cfg.OptGroup(name='telemetry',
703 title='Telemetry Service Options')
704
705TelemetryGroup = [
706 cfg.StrOpt('catalog_type',
707 default='metering',
708 help="Catalog type of the Telemetry service."),
JordanPfc62c902014-02-26 14:47:28 +0000709 cfg.StrOpt('endpoint_type',
710 default='publicURL',
711 choices=['public', 'admin', 'internal',
712 'publicURL', 'adminURL', 'internalURL'],
713 help="The endpoint type to use for the telemetry service."),
Vadim Rovachev7bcea352013-12-26 15:56:17 +0400714 cfg.BoolOpt('too_slow_to_test',
715 default=True,
716 help="This variable is used as flag to enable "
717 "notification tests")
Yassine Lamgarchalb158d412013-12-27 19:29:42 +0100718]
719
720
Julie Pichond1017642013-07-24 16:37:23 +0100721dashboard_group = cfg.OptGroup(name="dashboard",
722 title="Dashboard options")
723
724DashboardGroup = [
725 cfg.StrOpt('dashboard_url',
726 default='http://localhost/',
727 help="Where the dashboard can be found"),
728 cfg.StrOpt('login_url',
729 default='http://localhost/auth/login/',
730 help="Login page for the dashboard"),
731]
732
733
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +0400734data_processing_group = cfg.OptGroup(name="data_processing",
735 title="Data Processing options")
736
737DataProcessingGroup = [
738 cfg.StrOpt('catalog_type',
739 default='data_processing',
JordanPfc62c902014-02-26 14:47:28 +0000740 help="Catalog type of the data processing service."),
741 cfg.StrOpt('endpoint_type',
742 default='publicURL',
743 choices=['public', 'admin', 'internal',
744 'publicURL', 'adminURL', 'internalURL'],
745 help="The endpoint type to use for the data processing "
746 "service."),
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +0400747]
748
749
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500750boto_group = cfg.OptGroup(name='boto',
751 title='EC2/S3 options')
DennyZhang1e71b612013-09-26 12:35:40 -0500752BotoGroup = [
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500753 cfg.StrOpt('ec2_url',
754 default="http://localhost:8773/services/Cloud",
755 help="EC2 URL"),
756 cfg.StrOpt('s3_url',
757 default="http://localhost:8080",
758 help="S3 URL"),
759 cfg.StrOpt('aws_secret',
760 default=None,
761 help="AWS Secret Key",
762 secret=True),
763 cfg.StrOpt('aws_access',
764 default=None,
765 help="AWS Access Key"),
Attila Fazekas27dd92e2014-02-21 14:49:40 +0100766 cfg.StrOpt('aws_zone',
767 default="nova",
768 help="AWS Zone for EC2 tests"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500769 cfg.StrOpt('s3_materials_path',
770 default="/opt/stack/devstack/files/images/"
771 "s3-materials/cirros-0.3.0",
772 help="S3 Materials Path"),
773 cfg.StrOpt('ari_manifest',
774 default="cirros-0.3.0-x86_64-initrd.manifest.xml",
775 help="ARI Ramdisk Image manifest"),
776 cfg.StrOpt('ami_manifest',
777 default="cirros-0.3.0-x86_64-blank.img.manifest.xml",
778 help="AMI Machine Image manifest"),
779 cfg.StrOpt('aki_manifest',
780 default="cirros-0.3.0-x86_64-vmlinuz.manifest.xml",
781 help="AKI Kernel Image manifest"),
782 cfg.StrOpt('instance_type',
783 default="m1.tiny",
784 help="Instance type"),
785 cfg.IntOpt('http_socket_timeout',
786 default=3,
787 help="boto Http socket timeout"),
788 cfg.IntOpt('num_retries',
789 default=1,
790 help="boto num_retries on error"),
791 cfg.IntOpt('build_timeout',
792 default=60,
793 help="Status Change Timeout"),
794 cfg.IntOpt('build_interval',
795 default=1,
796 help="Status Change Test Interval"),
797]
Attila Fazekasf7f2d932012-12-13 09:14:38 +0100798
Matthew Treinish615ea6a2013-02-25 17:26:59 -0500799stress_group = cfg.OptGroup(name='stress', title='Stress Test Options')
800
801StressGroup = [
802 cfg.StrOpt('nova_logdir',
803 default=None,
804 help='Directory containing log files on the compute nodes'),
805 cfg.IntOpt('max_instances',
806 default=16,
807 help='Maximum number of instances to create during test.'),
808 cfg.StrOpt('controller',
809 default=None,
David Kranzb9d97502013-05-01 15:55:04 -0400810 help='Controller host.'),
811 # new stress options
812 cfg.StrOpt('target_controller',
813 default=None,
814 help='Controller host.'),
815 cfg.StrOpt('target_ssh_user',
816 default=None,
817 help='ssh user.'),
818 cfg.StrOpt('target_private_key_path',
819 default=None,
820 help='Path to private key.'),
821 cfg.StrOpt('target_logfiles',
822 default=None,
823 help='regexp for list of log files.'),
Matthew Treinishf319a732013-10-24 21:39:24 +0000824 cfg.IntOpt('log_check_interval',
David Kranzb9d97502013-05-01 15:55:04 -0400825 default=60,
Marc Koderer32221b8e2013-08-23 13:57:50 +0200826 help='time (in seconds) between log file error checks.'),
Matthew Treinishf319a732013-10-24 21:39:24 +0000827 cfg.IntOpt('default_thread_number_per_action',
Marc Koderer32221b8e2013-08-23 13:57:50 +0200828 default=4,
Julien Leloup04d40f72014-01-28 11:17:18 +0100829 help='The number of threads created while stress test.'),
830 cfg.BoolOpt('leave_dirty_stack',
831 default=False,
832 help='Prevent the cleaning (tearDownClass()) between'
833 ' each stress test run if an exception occurs'
Julien Leloupa5ee5422014-02-13 14:29:02 +0100834 ' during this run.'),
835 cfg.BoolOpt('full_clean_stack',
836 default=False,
837 help='Allows a full cleaning process after a stress test.'
838 ' Caution : this cleanup will remove every objects of'
839 ' every tenant.')
Matthew Treinish615ea6a2013-02-25 17:26:59 -0500840]
841
842
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +0900843scenario_group = cfg.OptGroup(name='scenario', title='Scenario Test Options')
844
845ScenarioGroup = [
846 cfg.StrOpt('img_dir',
847 default='/opt/stack/new/devstack/files/images/'
848 'cirros-0.3.1-x86_64-uec',
849 help='Directory containing image files'),
Masayuki Igawa4f71bf02014-02-21 14:02:29 +0900850 cfg.StrOpt('qcow2_img_file',
851 default='cirros-0.3.1-x86_64-disk.img',
852 help='QCOW2 image file name'),
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +0900853 cfg.StrOpt('ami_img_file',
854 default='cirros-0.3.1-x86_64-blank.img',
855 help='AMI image file name'),
856 cfg.StrOpt('ari_img_file',
857 default='cirros-0.3.1-x86_64-initrd',
858 help='ARI image file name'),
859 cfg.StrOpt('aki_img_file',
860 default='cirros-0.3.1-x86_64-vmlinuz',
861 help='AKI image file name'),
862 cfg.StrOpt('ssh_user',
863 default='cirros',
Joe Gordonb5e10cd2013-07-10 15:51:12 +0000864 help='ssh username for the image file'),
865 cfg.IntOpt(
866 'large_ops_number',
867 default=0,
868 help="specifies how many resources to request at once. Used "
869 "for large operations testing.")
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +0900870]
871
872
Matthew Treinish4c412922013-07-16 15:27:42 -0400873service_available_group = cfg.OptGroup(name="service_available",
874 title="Available OpenStack Services")
875
876ServiceAvailableGroup = [
877 cfg.BoolOpt('cinder',
878 default=True,
879 help="Whether or not cinder is expected to be available"),
Matthew Treinishfaa340d2013-07-19 16:26:21 -0400880 cfg.BoolOpt('neutron',
881 default=False,
882 help="Whether or not neutron is expected to be available"),
Matthew Treinish853ae442013-07-19 16:36:07 -0400883 cfg.BoolOpt('glance',
884 default=True,
885 help="Whether or not glance is expected to be available"),
Matthew Treinish61e332b2013-07-19 16:42:31 -0400886 cfg.BoolOpt('swift',
887 default=True,
888 help="Whether or not swift is expected to be available"),
Matthew Treinish6b41e242013-07-19 16:49:28 -0400889 cfg.BoolOpt('nova',
890 default=True,
891 help="Whether or not nova is expected to be available"),
Matthew Treinisha9d43882013-07-19 16:54:52 -0400892 cfg.BoolOpt('heat',
893 default=False,
894 help="Whether or not Heat is expected to be available"),
Mehdi Abaakouk8581c0b2013-10-04 10:45:42 +0200895 cfg.BoolOpt('ceilometer',
896 default=True,
897 help="Whether or not Ceilometer is expected to be available"),
Julie Pichond1017642013-07-24 16:37:23 +0100898 cfg.BoolOpt('horizon',
899 default=True,
900 help="Whether or not Horizon is expected to be available"),
Sergey Lukjanov9c95a252014-03-13 23:59:22 +0400901 cfg.BoolOpt('sahara',
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +0400902 default=False,
Sergey Lukjanov9c95a252014-03-13 23:59:22 +0400903 help="Whether or not Sahara is expected to be available"),
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +0300904 cfg.BoolOpt('ironic',
905 default=False,
906 help="Whether or not Ironic is expected to be available"),
Nikhil Manchandadd6886f2014-03-03 01:58:45 -0800907 cfg.BoolOpt('trove',
908 default=False,
909 help="Whether or not Trove is expected to be available"),
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500910 cfg.BoolOpt('marconi',
911 default=False,
912 help="Whether or not Marconi is expected to be available"),
Matthew Treinish4c412922013-07-16 15:27:42 -0400913]
914
Attila Fazekasaeeeefd2013-08-06 17:01:56 +0200915debug_group = cfg.OptGroup(name="debug",
916 title="Debug System")
917
918DebugGroup = [
919 cfg.BoolOpt('enable',
920 default=True,
921 help="Enable diagnostic commands"),
Sean Daguec522c092014-03-24 10:43:22 -0400922 cfg.StrOpt('trace_requests',
923 default='',
924 help="""A regex to determine which requests should be traced.
925
926This is a regex to match the caller for rest client requests to be able to
927selectively trace calls out of specific classes and methods. It largely
928exists for test development, and is not expected to be used in a real deploy
929of tempest. This will be matched against the discovered ClassName:method
930in the test environment.
931
932Expected values for this field are:
933
934 * ClassName:test_method_name - traces one test_method
935 * ClassName:setUp(Class) - traces specific setup functions
936 * ClassName:tearDown(Class) - traces specific teardown functions
937 * ClassName:_run_cleanups - traces the cleanup functions
938
939If nothing is specified, this feature is not enabled. To trace everything
940specify .* as the regex.
941""")
Attila Fazekasaeeeefd2013-08-06 17:01:56 +0200942]
943
Andrea Frittolif5da28b2013-12-06 07:08:07 +0000944input_scenario_group = cfg.OptGroup(name="input-scenario",
945 title="Filters and values for"
946 " input scenarios")
947
948InputScenarioGroup = [
949 cfg.StrOpt('image_regex',
950 default='^cirros-0.3.1-x86_64-uec$',
951 help="Matching images become parameters for scenario tests"),
952 cfg.StrOpt('flavor_regex',
Andrea Frittoli99901c02014-01-30 18:06:49 +0000953 default='^m1.nano$',
Andrea Frittolif5da28b2013-12-06 07:08:07 +0000954 help="Matching flavors become parameters for scenario tests"),
955 cfg.StrOpt('non_ssh_image_regex',
956 default='^.*[Ww]in.*$',
957 help="SSH verification in tests is skipped"
958 "for matching images"),
959 cfg.StrOpt('ssh_user_regex',
960 default="[[\"^.*[Cc]irros.*$\", \"root\"]]",
961 help="List of user mapped to regex "
962 "to matching image names."),
963]
964
Attila Fazekasaeeeefd2013-08-06 17:01:56 +0200965
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +0300966baremetal_group = cfg.OptGroup(name='baremetal',
967 title='Baremetal provisioning service options')
968
969BaremetalGroup = [
970 cfg.StrOpt('catalog_type',
971 default='baremetal',
Adam Gandelman4a48a602014-03-20 18:23:18 -0700972 help="Catalog type of the baremetal provisioning service"),
973 cfg.BoolOpt('driver_enabled',
974 default=False,
975 help="Whether the Ironic nova-compute driver is enabled"),
Yuiko Takada1ee1b322014-07-04 09:55:30 +0900976 cfg.StrOpt('driver',
977 default='fake',
978 help="Driver name which Ironic uses"),
JordanPfc62c902014-02-26 14:47:28 +0000979 cfg.StrOpt('endpoint_type',
980 default='publicURL',
981 choices=['public', 'admin', 'internal',
982 'publicURL', 'adminURL', 'internalURL'],
983 help="The endpoint type to use for the baremetal provisioning "
Adam Gandelman4a48a602014-03-20 18:23:18 -0700984 "service"),
985 cfg.IntOpt('active_timeout',
986 default=300,
987 help="Timeout for Ironic node to completely provision"),
988 cfg.IntOpt('association_timeout',
Adam Gandelmane42f0922014-06-10 15:26:37 -0700989 default=30,
Adam Gandelman4a48a602014-03-20 18:23:18 -0700990 help="Timeout for association of Nova instance and Ironic "
991 "node"),
992 cfg.IntOpt('power_timeout',
Adam Gandelmane42f0922014-06-10 15:26:37 -0700993 default=60,
Adam Gandelman4a48a602014-03-20 18:23:18 -0700994 help="Timeout for Ironic power transitions."),
995 cfg.IntOpt('unprovision_timeout',
Adam Gandelmane42f0922014-06-10 15:26:37 -0700996 default=60,
Adam Gandelman4a48a602014-03-20 18:23:18 -0700997 help="Timeout for unprovisioning an Ironic node.")
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +0300998]
999
Matthew Treinishe2b56b52014-01-29 19:25:50 +00001000cli_group = cfg.OptGroup(name='cli', title="cli Configuration Options")
1001
1002CLIGroup = [
1003 cfg.BoolOpt('enabled',
1004 default=True,
1005 help="enable cli tests"),
1006 cfg.StrOpt('cli_dir',
1007 default='/usr/local/bin',
1008 help="directory where python client binaries are located"),
Sean Dague44b24682014-02-20 19:08:24 -05001009 cfg.BoolOpt('has_manage',
1010 default=True,
1011 help=("Whether the tempest run location has access to the "
1012 "*-manage commands. In a pure blackbox environment "
1013 "it will not.")),
Matthew Treinishe2b56b52014-01-29 19:25:50 +00001014 cfg.IntOpt('timeout',
1015 default=15,
1016 help="Number of seconds to wait on a CLI timeout"),
1017]
1018
Marc Koderer6ee82dc2014-02-17 10:26:29 +01001019negative_group = cfg.OptGroup(name='negative', title="Negative Test Options")
1020
1021NegativeGroup = [
1022 cfg.StrOpt('test_generator',
1023 default='tempest.common.' +
1024 'generator.negative_generator.NegativeTestGenerator',
1025 help="Test generator class for all negative tests"),
1026]
1027
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +03001028
Matthew Treinish43b296a2014-02-28 15:23:00 -05001029def register_opts():
Matthew Treinishc791ac42014-07-16 09:15:23 -04001030 register_opt_group(cfg.CONF, auth_group, AuthGroup)
Matthew Treinish43b296a2014-02-28 15:23:00 -05001031 register_opt_group(cfg.CONF, compute_group, ComputeGroup)
1032 register_opt_group(cfg.CONF, compute_features_group,
1033 ComputeFeaturesGroup)
1034 register_opt_group(cfg.CONF, identity_group, IdentityGroup)
1035 register_opt_group(cfg.CONF, identity_feature_group,
1036 IdentityFeatureGroup)
1037 register_opt_group(cfg.CONF, image_group, ImageGroup)
1038 register_opt_group(cfg.CONF, image_feature_group, ImageFeaturesGroup)
1039 register_opt_group(cfg.CONF, network_group, NetworkGroup)
1040 register_opt_group(cfg.CONF, network_feature_group,
1041 NetworkFeaturesGroup)
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -05001042 register_opt_group(cfg.CONF, queuing_group, QueuingGroup)
Matthew Treinish43b296a2014-02-28 15:23:00 -05001043 register_opt_group(cfg.CONF, volume_group, VolumeGroup)
1044 register_opt_group(cfg.CONF, volume_feature_group,
1045 VolumeFeaturesGroup)
1046 register_opt_group(cfg.CONF, object_storage_group, ObjectStoreGroup)
1047 register_opt_group(cfg.CONF, object_storage_feature_group,
1048 ObjectStoreFeaturesGroup)
Nikhil Manchandadd6886f2014-03-03 01:58:45 -08001049 register_opt_group(cfg.CONF, database_group, DatabaseGroup)
Matthew Treinish43b296a2014-02-28 15:23:00 -05001050 register_opt_group(cfg.CONF, orchestration_group, OrchestrationGroup)
1051 register_opt_group(cfg.CONF, telemetry_group, TelemetryGroup)
1052 register_opt_group(cfg.CONF, dashboard_group, DashboardGroup)
1053 register_opt_group(cfg.CONF, data_processing_group,
1054 DataProcessingGroup)
1055 register_opt_group(cfg.CONF, boto_group, BotoGroup)
1056 register_opt_group(cfg.CONF, compute_admin_group, ComputeAdminGroup)
1057 register_opt_group(cfg.CONF, stress_group, StressGroup)
1058 register_opt_group(cfg.CONF, scenario_group, ScenarioGroup)
1059 register_opt_group(cfg.CONF, service_available_group,
1060 ServiceAvailableGroup)
1061 register_opt_group(cfg.CONF, debug_group, DebugGroup)
1062 register_opt_group(cfg.CONF, baremetal_group, BaremetalGroup)
1063 register_opt_group(cfg.CONF, input_scenario_group, InputScenarioGroup)
1064 register_opt_group(cfg.CONF, cli_group, CLIGroup)
Marc Koderer6ee82dc2014-02-17 10:26:29 +01001065 register_opt_group(cfg.CONF, negative_group, NegativeGroup)
Matthew Treinish43b296a2014-02-28 15:23:00 -05001066
1067
Sean Dague3b9b1f32013-12-20 17:04:54 -05001068# this should never be called outside of this class
1069class TempestConfigPrivate(object):
Daryl Walleck1465d612011-11-02 02:22:15 -05001070 """Provides OpenStack configuration information."""
1071
Brian Waldon738cd632011-12-12 18:45:09 -05001072 DEFAULT_CONFIG_DIR = os.path.join(
Zhongyue Luoa1343de2013-01-04 16:21:35 +08001073 os.path.abspath(os.path.dirname(os.path.dirname(__file__))),
Brian Waldon738cd632011-12-12 18:45:09 -05001074 "etc")
Daryl Walleck1465d612011-11-02 02:22:15 -05001075
Brian Waldon738cd632011-12-12 18:45:09 -05001076 DEFAULT_CONFIG_FILE = "tempest.conf"
1077
Matthew Treinish43b296a2014-02-28 15:23:00 -05001078 def _set_attrs(self):
Matthew Treinishc791ac42014-07-16 09:15:23 -04001079 self.auth = cfg.CONF.auth
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001080 self.compute = cfg.CONF.compute
Matthew Treinishd5c96022013-10-17 21:51:23 +00001081 self.compute_feature_enabled = cfg.CONF['compute-feature-enabled']
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001082 self.identity = cfg.CONF.identity
Matthew Treinishd5021a72014-01-09 18:42:51 +00001083 self.identity_feature_enabled = cfg.CONF['identity-feature-enabled']
Matt Riedemannd3efe902014-02-10 06:46:38 -08001084 self.image = cfg.CONF.image
Matthew Treinish2b5287d2013-10-22 17:40:34 +00001085 self.image_feature_enabled = cfg.CONF['image-feature-enabled']
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001086 self.network = cfg.CONF.network
Matthew Treinishe3d26142013-11-26 19:14:58 +00001087 self.network_feature_enabled = cfg.CONF['network-feature-enabled']
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001088 self.volume = cfg.CONF.volume
Matthew Treinishd5c96022013-10-17 21:51:23 +00001089 self.volume_feature_enabled = cfg.CONF['volume-feature-enabled']
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001090 self.object_storage = cfg.CONF['object-storage']
Matthew Treinishd5c96022013-10-17 21:51:23 +00001091 self.object_storage_feature_enabled = cfg.CONF[
1092 'object-storage-feature-enabled']
Nikhil Manchandadd6886f2014-03-03 01:58:45 -08001093 self.database = cfg.CONF.database
Steve Bakerc60e4e32013-05-06 15:22:41 +12001094 self.orchestration = cfg.CONF.orchestration
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -05001095 self.queuing = cfg.CONF.queuing
Yassine Lamgarchalb158d412013-12-27 19:29:42 +01001096 self.telemetry = cfg.CONF.telemetry
Julie Pichond1017642013-07-24 16:37:23 +01001097 self.dashboard = cfg.CONF.dashboard
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +04001098 self.data_processing = cfg.CONF.data_processing
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001099 self.boto = cfg.CONF.boto
Attila Fazekascadcb1f2013-01-21 23:10:53 +01001100 self.compute_admin = cfg.CONF['compute-admin']
Matthew Treinish615ea6a2013-02-25 17:26:59 -05001101 self.stress = cfg.CONF.stress
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +09001102 self.scenario = cfg.CONF.scenario
Matthew Treinish4c412922013-07-16 15:27:42 -04001103 self.service_available = cfg.CONF.service_available
Attila Fazekas5fae7a32013-09-25 16:52:44 +02001104 self.debug = cfg.CONF.debug
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +03001105 self.baremetal = cfg.CONF.baremetal
Andrea Frittolif5da28b2013-12-06 07:08:07 +00001106 self.input_scenario = cfg.CONF['input-scenario']
Matthew Treinishe2b56b52014-01-29 19:25:50 +00001107 self.cli = cfg.CONF.cli
Marc Koderer6ee82dc2014-02-17 10:26:29 +01001108 self.negative = cfg.CONF.negative
Attila Fazekascadcb1f2013-01-21 23:10:53 +01001109 if not self.compute_admin.username:
1110 self.compute_admin.username = self.identity.admin_username
1111 self.compute_admin.password = self.identity.admin_password
1112 self.compute_admin.tenant_name = self.identity.admin_tenant_name
Andrea Frittolib1b04bb2014-04-06 11:57:07 +01001113 cfg.CONF.set_default('domain_name', self.identity.admin_domain_name,
1114 group='identity')
1115 cfg.CONF.set_default('alt_domain_name',
1116 self.identity.admin_domain_name,
1117 group='identity')
1118 cfg.CONF.set_default('domain_name', self.identity.admin_domain_name,
1119 group='compute-admin')
Sean Dague86bd8422013-12-20 09:56:44 -05001120
Joe Gordon28a84ae2014-07-17 15:38:28 +00001121 def __init__(self, parse_conf=True, config_path=None):
Matthew Treinish43b296a2014-02-28 15:23:00 -05001122 """Initialize a configuration from a conf directory and conf file."""
1123 super(TempestConfigPrivate, self).__init__()
1124 config_files = []
1125 failsafe_path = "/etc/tempest/" + self.DEFAULT_CONFIG_FILE
1126
Joe Gordon28a84ae2014-07-17 15:38:28 +00001127 if config_path:
1128 path = config_path
1129 else:
1130 # Environment variables override defaults...
1131 conf_dir = os.environ.get('TEMPEST_CONFIG_DIR',
1132 self.DEFAULT_CONFIG_DIR)
1133 conf_file = os.environ.get('TEMPEST_CONFIG',
1134 self.DEFAULT_CONFIG_FILE)
Matthew Treinish43b296a2014-02-28 15:23:00 -05001135
Joe Gordon28a84ae2014-07-17 15:38:28 +00001136 path = os.path.join(conf_dir, conf_file)
Matthew Treinish43b296a2014-02-28 15:23:00 -05001137
1138 if not os.path.isfile(path):
1139 path = failsafe_path
1140
1141 # only parse the config file if we expect one to exist. This is needed
1142 # to remove an issue with the config file up to date checker.
1143 if parse_conf:
1144 config_files.append(path)
1145
1146 cfg.CONF([], project='tempest', default_config_files=config_files)
1147 logging.setup('tempest')
1148 LOG = logging.getLogger('tempest')
1149 LOG.info("Using tempest config file %s" % path)
1150 register_opts()
1151 self._set_attrs()
Masayuki Igawa9ec4cd82014-02-05 15:04:16 +09001152 if parse_conf:
1153 cfg.CONF.log_opt_values(LOG, std_logging.DEBUG)
1154
Sean Dague86bd8422013-12-20 09:56:44 -05001155
1156class TempestConfigProxy(object):
1157 _config = None
Joe Gordon28a84ae2014-07-17 15:38:28 +00001158 _path = None
Sean Dague86bd8422013-12-20 09:56:44 -05001159
Sean Daguedb6ac6c2014-06-06 16:52:44 -04001160 _extra_log_defaults = [
1161 'keystoneclient.session=INFO',
1162 'paramiko.transport=INFO',
1163 'requests.packages.urllib3.connectionpool=WARN'
1164 ]
1165
1166 def _fix_log_levels(self):
1167 """Tweak the oslo log defaults."""
1168 for opt in logging.log_opts:
1169 if opt.dest == 'default_log_levels':
1170 opt.default.extend(self._extra_log_defaults)
1171
Sean Dague86bd8422013-12-20 09:56:44 -05001172 def __getattr__(self, attr):
1173 if not self._config:
Sean Daguedb6ac6c2014-06-06 16:52:44 -04001174 self._fix_log_levels()
Joe Gordon28a84ae2014-07-17 15:38:28 +00001175 self._config = TempestConfigPrivate(config_path=self._path)
Sean Dague86bd8422013-12-20 09:56:44 -05001176
1177 return getattr(self._config, attr)
1178
Joe Gordon28a84ae2014-07-17 15:38:28 +00001179 def set_config_path(self, path):
1180 self._path = path
1181
Sean Dague86bd8422013-12-20 09:56:44 -05001182
1183CONF = TempestConfigProxy()