blob: 4836c63db4d873c5ef5a765dba3018497b5938b6 [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 '
Adam Gandelmanfbc95ac2014-06-19 17:33:43 -0700350 'interface attachment?'),
351 cfg.BoolOpt('snapshot',
352 default=True,
353 help='Does the test environment support creating snapshot '
354 'images of running instances?')
Matthew Treinishd5c96022013-10-17 21:51:23 +0000355]
356
357
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500358compute_admin_group = cfg.OptGroup(name='compute-admin',
359 title="Compute Admin Options")
donald-ngo7fb1efa2011-12-13 17:17:36 -0800360
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500361ComputeAdminGroup = [
362 cfg.StrOpt('username',
Andrea Frittolia9463672014-03-03 14:39:02 +0000363 default=None,
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500364 help="Administrative Username to use for Nova API requests."),
365 cfg.StrOpt('tenant_name',
Andrea Frittolia9463672014-03-03 14:39:02 +0000366 default=None,
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500367 help="Administrative Tenant name to use for Nova API "
368 "requests."),
369 cfg.StrOpt('password',
Andrea Frittolia9463672014-03-03 14:39:02 +0000370 default=None,
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500371 help="API key to use when authenticating as admin.",
372 secret=True),
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100373 cfg.StrOpt('domain_name',
374 default=None,
375 help="Domain name for authentication as admin (Keystone V3)."
376 "The same domain applies to user and project"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500377]
Daryl Walleck587385b2012-03-03 13:00:26 -0600378
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500379image_group = cfg.OptGroup(name='image',
380 title="Image Service Options")
Jay Pipesf38eaac2012-06-21 13:37:35 -0400381
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500382ImageGroup = [
Matthew Treinish72ea4422013-02-07 14:42:49 -0500383 cfg.StrOpt('catalog_type',
384 default='image',
Sean Dague83401992013-05-06 17:46:36 -0400385 help='Catalog type of the Image service.'),
Arata Notsu8f440392013-09-13 16:14:20 +0900386 cfg.StrOpt('region',
387 default='',
388 help="The image region name to use. If empty, the value "
389 "of identity.region is used instead. If no such region "
390 "is found in the service catalog, the first found one is "
391 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000392 cfg.StrOpt('endpoint_type',
393 default='publicURL',
394 choices=['public', 'admin', 'internal',
395 'publicURL', 'adminURL', 'internalURL'],
396 help="The endpoint type to use for the image service."),
Sean Dague83401992013-05-06 17:46:36 -0400397 cfg.StrOpt('http_image',
398 default='http://download.cirros-cloud.net/0.3.1/'
399 'cirros-0.3.1-x86_64-uec.tar.gz',
DennyZhang8912d012013-09-25 18:08:34 -0500400 help='http accessible image')
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500401]
Jay Pipesf38eaac2012-06-21 13:37:35 -0400402
Matthew Treinish2b5287d2013-10-22 17:40:34 +0000403image_feature_group = cfg.OptGroup(name='image-feature-enabled',
404 title='Enabled image service features')
405
406ImageFeaturesGroup = [
407 cfg.BoolOpt('api_v2',
408 default=True,
409 help="Is the v2 image API enabled"),
410 cfg.BoolOpt('api_v1',
411 default=True,
412 help="Is the v1 image API enabled"),
413]
Jay Pipesf38eaac2012-06-21 13:37:35 -0400414
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500415network_group = cfg.OptGroup(name='network',
416 title='Network Service Options')
Daryl Walleck587385b2012-03-03 13:00:26 -0600417
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500418NetworkGroup = [
419 cfg.StrOpt('catalog_type',
420 default='network',
Mark McClainf2982e82013-07-06 17:48:03 -0400421 help='Catalog type of the Neutron service.'),
Arata Notsu8f440392013-09-13 16:14:20 +0900422 cfg.StrOpt('region',
423 default='',
424 help="The network region name to use. If empty, the value "
425 "of identity.region is used instead. If no such region "
426 "is found in the service catalog, the first found one is "
427 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000428 cfg.StrOpt('endpoint_type',
429 default='publicURL',
430 choices=['public', 'admin', 'internal',
431 'publicURL', 'adminURL', 'internalURL'],
432 help="The endpoint type to use for the network service."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500433 cfg.StrOpt('tenant_network_cidr',
434 default="10.100.0.0/16",
Henry Gessauffda37a2014-01-16 11:17:55 -0500435 help="The cidr block to allocate tenant ipv4 subnets from"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500436 cfg.IntOpt('tenant_network_mask_bits',
Attila Fazekas8ea181b2013-07-13 16:26:14 +0200437 default=28,
Henry Gessauffda37a2014-01-16 11:17:55 -0500438 help="The mask bits for tenant ipv4 subnets"),
439 cfg.StrOpt('tenant_network_v6_cidr',
440 default="2003::/64",
441 help="The cidr block to allocate tenant ipv6 subnets from"),
442 cfg.IntOpt('tenant_network_v6_mask_bits',
443 default=96,
444 help="The mask bits for tenant ipv6 subnets"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500445 cfg.BoolOpt('tenant_networks_reachable',
446 default=False,
447 help="Whether tenant network connectivity should be "
448 "evaluated directly"),
449 cfg.StrOpt('public_network_id',
450 default="",
451 help="Id of the public network that provides external "
452 "connectivity"),
453 cfg.StrOpt('public_router_id',
454 default="",
455 help="Id of the public router that provides external "
456 "connectivity"),
izikpensod9a01a62014-02-17 20:02:32 +0200457 cfg.IntOpt('build_timeout',
458 default=300,
459 help="Timeout in seconds to wait for network operation to "
460 "complete."),
461 cfg.IntOpt('build_interval',
Sean Dague82190852014-05-24 07:42:59 -0400462 default=1,
izikpensod9a01a62014-02-17 20:02:32 +0200463 help="Time in seconds between network operation status "
464 "checks."),
Attila Fazekas640392b2014-06-12 15:58:10 +0200465 cfg.ListOpt('dns_servers',
466 default=["8.8.8.8", "8.8.4.4"],
467 help="List of dns servers whichs hould be used"
468 " for subnet creation")
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500469]
Jay Pipes3f981df2012-03-27 18:59:44 -0400470
Matthew Treinishe3d26142013-11-26 19:14:58 +0000471network_feature_group = cfg.OptGroup(name='network-feature-enabled',
472 title='Enabled network service features')
473
474NetworkFeaturesGroup = [
Matthew Treinishe2e33cf2014-03-03 19:28:41 +0000475 cfg.BoolOpt('ipv6',
476 default=True,
477 help="Allow the execution of IPv6 tests"),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000478 cfg.ListOpt('api_extensions',
479 default=['all'],
Zhi Kun Liude25c022014-02-14 13:25:19 +0800480 help='A list of enabled network extensions with a special '
Simeon Monov5d7effe2014-07-16 07:32:38 +0300481 'entry all which indicates every extension is enabled. '
482 'Empty list indicates all extensions are disabled'),
Sean M. Collinsdd27a4d2014-05-13 10:33:15 -0400483 cfg.BoolOpt('ipv6_subnet_attributes',
484 default=False,
485 help="Allow the execution of IPv6 subnet tests that use "
486 "the extended IPv6 attributes ipv6_ra_mode "
487 "and ipv6_address_mode"
488 )
Matthew Treinishe3d26142013-11-26 19:14:58 +0000489]
490
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500491queuing_group = cfg.OptGroup(name='queuing',
492 title='Queuing Service')
493
494QueuingGroup = [
495 cfg.StrOpt('catalog_type',
496 default='queuing',
497 help='Catalog type of the Queuing service.'),
Jorge Chai83ba4ee2014-04-15 18:58:08 +0000498 cfg.IntOpt('max_queues_per_page',
499 default=20,
500 help='The maximum number of queue records per page when '
501 'listing queues'),
Malini Kamalambal7458b4b2014-05-29 11:47:28 -0400502 cfg.IntOpt('max_queue_metadata',
503 default=65536,
504 help='The maximum metadata size for a queue'),
505 cfg.IntOpt('max_messages_per_page',
506 default=20,
507 help='The maximum number of queue message per page when '
508 'listing (or) posting messages'),
509 cfg.IntOpt('max_message_size',
510 default=262144,
511 help='The maximum size of a message body'),
512 cfg.IntOpt('max_messages_per_claim',
513 default=20,
514 help='The maximum number of messages per claim'),
515 cfg.IntOpt('max_message_ttl',
516 default=1209600,
517 help='The maximum ttl for a message'),
518 cfg.IntOpt('max_claim_ttl',
519 default=43200,
520 help='The maximum ttl for a claim'),
521 cfg.IntOpt('max_claim_grace',
522 default=43200,
523 help='The maximum grace period for a claim'),
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500524]
525
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500526volume_group = cfg.OptGroup(name='volume',
527 title='Block Storage Options')
Daryl Walleck587385b2012-03-03 13:00:26 -0600528
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500529VolumeGroup = [
530 cfg.IntOpt('build_interval',
Sean Dague82190852014-05-24 07:42:59 -0400531 default=1,
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500532 help='Time in seconds between volume availability checks.'),
533 cfg.IntOpt('build_timeout',
534 default=300,
535 help='Timeout in seconds to wait for a volume to become'
536 'available.'),
537 cfg.StrOpt('catalog_type',
Matthew Treinisheb724512013-10-25 15:12:59 +0000538 default='volume',
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500539 help="Catalog type of the Volume Service"),
Arata Notsu8f440392013-09-13 16:14:20 +0900540 cfg.StrOpt('region',
541 default='',
542 help="The volume region name to use. If empty, the value "
543 "of identity.region is used instead. If no such region "
544 "is found in the service catalog, the first found one is "
545 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000546 cfg.StrOpt('endpoint_type',
547 default='publicURL',
548 choices=['public', 'admin', 'internal',
549 'publicURL', 'adminURL', 'internalURL'],
550 help="The endpoint type to use for the volume service."),
Jérôme Gallard86551ce2013-03-08 11:41:26 +0100551 cfg.StrOpt('backend1_name',
Giulio Fidentef4fa8942013-05-28 18:48:03 +0200552 default='BACKEND_1',
Jérôme Gallard86551ce2013-03-08 11:41:26 +0100553 help="Name of the backend1 (must be declared in cinder.conf)"),
554 cfg.StrOpt('backend2_name',
Giulio Fidentef4fa8942013-05-28 18:48:03 +0200555 default='BACKEND_2',
Jérôme Gallard86551ce2013-03-08 11:41:26 +0100556 help="Name of the backend2 (must be declared in cinder.conf)"),
Adam Gandelman827ad332013-06-24 17:04:09 -0700557 cfg.StrOpt('storage_protocol',
558 default='iSCSI',
559 help='Backend protocol to target when creating volume types'),
560 cfg.StrOpt('vendor_name',
561 default='Open Source',
562 help='Backend vendor to target when creating volume types'),
Ryan Hsua67f4632013-08-29 16:03:06 -0700563 cfg.StrOpt('disk_format',
564 default='raw',
565 help='Disk format to use when copying a volume to image'),
Jerry Cai9733d0e2014-03-19 15:50:49 +0800566 cfg.IntOpt('volume_size',
567 default=1,
568 help='Default size in GB for volumes created by volumes tests'),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500569]
K Jonathan Harkerd6ba4b42012-12-18 13:50:47 -0800570
Matthew Treinishd5c96022013-10-17 21:51:23 +0000571volume_feature_group = cfg.OptGroup(name='volume-feature-enabled',
572 title='Enabled Cinder Features')
573
574VolumeFeaturesGroup = [
575 cfg.BoolOpt('multi_backend',
576 default=False,
Matthew Treinishe3d26142013-11-26 19:14:58 +0000577 help="Runs Cinder multi-backend test (requires 2 backends)"),
Giulio Fidente74b08ad2014-01-18 04:02:51 +0100578 cfg.BoolOpt('backup',
579 default=True,
580 help='Runs Cinder volumes backup test'),
JordanPbce55532014-03-19 12:10:32 +0100581 cfg.BoolOpt('snapshot',
582 default=True,
583 help='Runs Cinder volume snapshot test'),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000584 cfg.ListOpt('api_extensions',
585 default=['all'],
Zhi Kun Liude25c022014-02-14 13:25:19 +0800586 help='A list of enabled volume extensions with a special '
Simeon Monov5d7effe2014-07-16 07:32:38 +0300587 'entry all which indicates every extension is enabled. '
588 'Empty list indicates all extensions are disabled'),
Zhi Kun Liubb363a22013-11-28 18:47:39 +0800589 cfg.BoolOpt('api_v1',
590 default=True,
591 help="Is the v1 volume API enabled"),
Zhi Kun Liu8cc3c842014-01-07 10:44:34 +0800592 cfg.BoolOpt('api_v2',
593 default=True,
594 help="Is the v2 volume API enabled"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000595]
596
Daryl Walleck587385b2012-03-03 13:00:26 -0600597
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500598object_storage_group = cfg.OptGroup(name='object-storage',
599 title='Object Storage Service Options')
Attila Fazekasa23f5002012-10-23 19:32:45 +0200600
DennyZhang1e71b612013-09-26 12:35:40 -0500601ObjectStoreGroup = [
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500602 cfg.StrOpt('catalog_type',
603 default='object-store',
604 help="Catalog type of the Object-Storage service."),
Arata Notsu8f440392013-09-13 16:14:20 +0900605 cfg.StrOpt('region',
606 default='',
607 help="The object-storage region name to use. If empty, the "
608 "value of identity.region is used instead. If no such "
609 "region is found in the service catalog, the first found "
610 "one is used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000611 cfg.StrOpt('endpoint_type',
612 default='publicURL',
613 choices=['public', 'admin', 'internal',
614 'publicURL', 'adminURL', 'internalURL'],
615 help="The endpoint type to use for the object-store service."),
Matthew Treinishf319a732013-10-24 21:39:24 +0000616 cfg.IntOpt('container_sync_timeout',
nayna-patelb4989b32013-01-09 06:25:13 +0000617 default=120,
Fabien Boucher2178d312013-12-31 15:38:57 +0100618 help="Number of seconds to time on waiting for a container "
nayna-patelb4989b32013-01-09 06:25:13 +0000619 "to container synchronization complete."),
Matthew Treinishf319a732013-10-24 21:39:24 +0000620 cfg.IntOpt('container_sync_interval',
nayna-patelb4989b32013-01-09 06:25:13 +0000621 default=5,
Fabien Boucher2178d312013-12-31 15:38:57 +0100622 help="Number of seconds to wait while looping to check the "
nayna-patelb4989b32013-01-09 06:25:13 +0000623 "status of a container to container synchronization"),
Matthew Treinish3fdb80c2013-08-15 11:13:19 -0400624 cfg.StrOpt('operator_role',
625 default='Member',
626 help="Role to add to users created for swift tests to "
627 "enable creating containers"),
Matthew Treinish998c91d2014-03-01 12:39:49 -0500628 cfg.StrOpt('reseller_admin_role',
629 default='ResellerAdmin',
630 help="User role that has reseller admin"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500631]
Attila Fazekasa23f5002012-10-23 19:32:45 +0200632
Matthew Treinishd5c96022013-10-17 21:51:23 +0000633object_storage_feature_group = cfg.OptGroup(
634 name='object-storage-feature-enabled',
635 title='Enabled object-storage features')
636
637ObjectStoreFeaturesGroup = [
Matthew Treinish20345382013-12-13 17:04:23 +0000638 cfg.ListOpt('discoverable_apis',
639 default=['all'],
640 help="A list of the enabled optional discoverable apis. "
641 "A single entry, all, indicates that all of these "
642 "features are expected to be enabled"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000643]
644
Nikhil Manchandadd6886f2014-03-03 01:58:45 -0800645database_group = cfg.OptGroup(name='database',
646 title='Database Service Options')
647
648DatabaseGroup = [
649 cfg.StrOpt('catalog_type',
650 default='database',
651 help="Catalog type of the Database service."),
652 cfg.StrOpt('db_flavor_ref',
653 default="1",
654 help="Valid primary flavor to use in database tests."),
Peter Stachowski320f9c72014-04-21 16:13:23 -0400655 cfg.StrOpt('db_current_version',
656 default="v1.0",
657 help="Current database version to use in database tests."),
Nikhil Manchandadd6886f2014-03-03 01:58:45 -0800658]
Attila Fazekasa23f5002012-10-23 19:32:45 +0200659
Steve Bakerc60e4e32013-05-06 15:22:41 +1200660orchestration_group = cfg.OptGroup(name='orchestration',
661 title='Orchestration Service Options')
662
663OrchestrationGroup = [
664 cfg.StrOpt('catalog_type',
665 default='orchestration',
666 help="Catalog type of the Orchestration service."),
Arata Notsu8f440392013-09-13 16:14:20 +0900667 cfg.StrOpt('region',
668 default='',
669 help="The orchestration region name to use. If empty, the "
670 "value of identity.region is used instead. If no such "
671 "region is found in the service catalog, the first found "
672 "one is used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000673 cfg.StrOpt('endpoint_type',
674 default='publicURL',
675 choices=['public', 'admin', 'internal',
676 'publicURL', 'adminURL', 'internalURL'],
677 help="The endpoint type to use for the orchestration service."),
Steve Bakerc60e4e32013-05-06 15:22:41 +1200678 cfg.BoolOpt('allow_tenant_isolation',
679 default=False,
680 help="Allows test cases to create/destroy tenants and "
681 "users. This option enables isolated test cases and "
682 "better parallel execution, but also requires that "
683 "OpenStack Identity API admin credentials are known."),
684 cfg.IntOpt('build_interval',
685 default=1,
686 help="Time in seconds between build status checks."),
687 cfg.IntOpt('build_timeout',
Matthew Treinisha2dfd492014-04-15 11:15:34 -0400688 default=1200,
Steve Bakerc60e4e32013-05-06 15:22:41 +1200689 help="Timeout in seconds to wait for a stack to build."),
Steve Bakerc60e4e32013-05-06 15:22:41 +1200690 cfg.StrOpt('instance_type',
Steve Baker9e86b832013-05-22 15:40:28 +1200691 default='m1.micro',
Steve Bakerc60e4e32013-05-06 15:22:41 +1200692 help="Instance type for tests. Needs to be big enough for a "
693 "full OS plus the test workload"),
694 cfg.StrOpt('image_ref',
695 default=None,
696 help="Name of heat-cfntools enabled image to use when "
697 "launching test instances."),
698 cfg.StrOpt('keypair_name',
699 default=None,
700 help="Name of existing keypair to launch servers with."),
Clint Byrum71f27632013-09-09 11:41:32 -0700701 cfg.IntOpt('max_template_size',
Joe Gordon0e51b222013-10-24 14:11:10 +0100702 default=524288,
Clint Byrum71f27632013-09-09 11:41:32 -0700703 help="Value must match heat configuration of the same name."),
Steven Hardyfdc6bd72014-03-21 16:56:04 +0000704 cfg.IntOpt('max_resources_per_stack',
705 default=1000,
706 help="Value must match heat configuration of the same name."),
Steve Bakerc60e4e32013-05-06 15:22:41 +1200707]
708
709
Yassine Lamgarchalb158d412013-12-27 19:29:42 +0100710telemetry_group = cfg.OptGroup(name='telemetry',
711 title='Telemetry Service Options')
712
713TelemetryGroup = [
714 cfg.StrOpt('catalog_type',
715 default='metering',
716 help="Catalog type of the Telemetry service."),
JordanPfc62c902014-02-26 14:47:28 +0000717 cfg.StrOpt('endpoint_type',
718 default='publicURL',
719 choices=['public', 'admin', 'internal',
720 'publicURL', 'adminURL', 'internalURL'],
721 help="The endpoint type to use for the telemetry service."),
Vadim Rovachev7bcea352013-12-26 15:56:17 +0400722 cfg.BoolOpt('too_slow_to_test',
723 default=True,
724 help="This variable is used as flag to enable "
725 "notification tests")
Yassine Lamgarchalb158d412013-12-27 19:29:42 +0100726]
727
728
Julie Pichond1017642013-07-24 16:37:23 +0100729dashboard_group = cfg.OptGroup(name="dashboard",
730 title="Dashboard options")
731
732DashboardGroup = [
733 cfg.StrOpt('dashboard_url',
734 default='http://localhost/',
735 help="Where the dashboard can be found"),
736 cfg.StrOpt('login_url',
737 default='http://localhost/auth/login/',
738 help="Login page for the dashboard"),
739]
740
741
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +0400742data_processing_group = cfg.OptGroup(name="data_processing",
743 title="Data Processing options")
744
745DataProcessingGroup = [
746 cfg.StrOpt('catalog_type',
747 default='data_processing',
JordanPfc62c902014-02-26 14:47:28 +0000748 help="Catalog type of the data processing service."),
749 cfg.StrOpt('endpoint_type',
750 default='publicURL',
751 choices=['public', 'admin', 'internal',
752 'publicURL', 'adminURL', 'internalURL'],
753 help="The endpoint type to use for the data processing "
754 "service."),
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +0400755]
756
757
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500758boto_group = cfg.OptGroup(name='boto',
759 title='EC2/S3 options')
DennyZhang1e71b612013-09-26 12:35:40 -0500760BotoGroup = [
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500761 cfg.StrOpt('ec2_url',
762 default="http://localhost:8773/services/Cloud",
763 help="EC2 URL"),
764 cfg.StrOpt('s3_url',
765 default="http://localhost:8080",
766 help="S3 URL"),
767 cfg.StrOpt('aws_secret',
768 default=None,
769 help="AWS Secret Key",
770 secret=True),
771 cfg.StrOpt('aws_access',
772 default=None,
773 help="AWS Access Key"),
Attila Fazekas27dd92e2014-02-21 14:49:40 +0100774 cfg.StrOpt('aws_zone',
775 default="nova",
776 help="AWS Zone for EC2 tests"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500777 cfg.StrOpt('s3_materials_path',
778 default="/opt/stack/devstack/files/images/"
779 "s3-materials/cirros-0.3.0",
780 help="S3 Materials Path"),
781 cfg.StrOpt('ari_manifest',
782 default="cirros-0.3.0-x86_64-initrd.manifest.xml",
783 help="ARI Ramdisk Image manifest"),
784 cfg.StrOpt('ami_manifest',
785 default="cirros-0.3.0-x86_64-blank.img.manifest.xml",
786 help="AMI Machine Image manifest"),
787 cfg.StrOpt('aki_manifest',
788 default="cirros-0.3.0-x86_64-vmlinuz.manifest.xml",
789 help="AKI Kernel Image manifest"),
790 cfg.StrOpt('instance_type',
791 default="m1.tiny",
792 help="Instance type"),
793 cfg.IntOpt('http_socket_timeout',
794 default=3,
795 help="boto Http socket timeout"),
796 cfg.IntOpt('num_retries',
797 default=1,
798 help="boto num_retries on error"),
799 cfg.IntOpt('build_timeout',
800 default=60,
801 help="Status Change Timeout"),
802 cfg.IntOpt('build_interval',
803 default=1,
804 help="Status Change Test Interval"),
805]
Attila Fazekasf7f2d932012-12-13 09:14:38 +0100806
Matthew Treinish615ea6a2013-02-25 17:26:59 -0500807stress_group = cfg.OptGroup(name='stress', title='Stress Test Options')
808
809StressGroup = [
810 cfg.StrOpt('nova_logdir',
811 default=None,
812 help='Directory containing log files on the compute nodes'),
813 cfg.IntOpt('max_instances',
814 default=16,
815 help='Maximum number of instances to create during test.'),
816 cfg.StrOpt('controller',
817 default=None,
David Kranzb9d97502013-05-01 15:55:04 -0400818 help='Controller host.'),
819 # new stress options
820 cfg.StrOpt('target_controller',
821 default=None,
822 help='Controller host.'),
823 cfg.StrOpt('target_ssh_user',
824 default=None,
825 help='ssh user.'),
826 cfg.StrOpt('target_private_key_path',
827 default=None,
828 help='Path to private key.'),
829 cfg.StrOpt('target_logfiles',
830 default=None,
831 help='regexp for list of log files.'),
Matthew Treinishf319a732013-10-24 21:39:24 +0000832 cfg.IntOpt('log_check_interval',
David Kranzb9d97502013-05-01 15:55:04 -0400833 default=60,
Marc Koderer32221b8e2013-08-23 13:57:50 +0200834 help='time (in seconds) between log file error checks.'),
Matthew Treinishf319a732013-10-24 21:39:24 +0000835 cfg.IntOpt('default_thread_number_per_action',
Marc Koderer32221b8e2013-08-23 13:57:50 +0200836 default=4,
Julien Leloup04d40f72014-01-28 11:17:18 +0100837 help='The number of threads created while stress test.'),
838 cfg.BoolOpt('leave_dirty_stack',
839 default=False,
840 help='Prevent the cleaning (tearDownClass()) between'
841 ' each stress test run if an exception occurs'
Julien Leloupa5ee5422014-02-13 14:29:02 +0100842 ' during this run.'),
843 cfg.BoolOpt('full_clean_stack',
844 default=False,
845 help='Allows a full cleaning process after a stress test.'
846 ' Caution : this cleanup will remove every objects of'
847 ' every tenant.')
Matthew Treinish615ea6a2013-02-25 17:26:59 -0500848]
849
850
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +0900851scenario_group = cfg.OptGroup(name='scenario', title='Scenario Test Options')
852
853ScenarioGroup = [
854 cfg.StrOpt('img_dir',
855 default='/opt/stack/new/devstack/files/images/'
856 'cirros-0.3.1-x86_64-uec',
857 help='Directory containing image files'),
Masayuki Igawa4f71bf02014-02-21 14:02:29 +0900858 cfg.StrOpt('qcow2_img_file',
859 default='cirros-0.3.1-x86_64-disk.img',
860 help='QCOW2 image file name'),
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +0900861 cfg.StrOpt('ami_img_file',
862 default='cirros-0.3.1-x86_64-blank.img',
863 help='AMI image file name'),
864 cfg.StrOpt('ari_img_file',
865 default='cirros-0.3.1-x86_64-initrd',
866 help='ARI image file name'),
867 cfg.StrOpt('aki_img_file',
868 default='cirros-0.3.1-x86_64-vmlinuz',
869 help='AKI image file name'),
870 cfg.StrOpt('ssh_user',
871 default='cirros',
Joe Gordonb5e10cd2013-07-10 15:51:12 +0000872 help='ssh username for the image file'),
873 cfg.IntOpt(
874 'large_ops_number',
875 default=0,
876 help="specifies how many resources to request at once. Used "
877 "for large operations testing.")
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +0900878]
879
880
Matthew Treinish4c412922013-07-16 15:27:42 -0400881service_available_group = cfg.OptGroup(name="service_available",
882 title="Available OpenStack Services")
883
884ServiceAvailableGroup = [
885 cfg.BoolOpt('cinder',
886 default=True,
887 help="Whether or not cinder is expected to be available"),
Matthew Treinishfaa340d2013-07-19 16:26:21 -0400888 cfg.BoolOpt('neutron',
889 default=False,
890 help="Whether or not neutron is expected to be available"),
Matthew Treinish853ae442013-07-19 16:36:07 -0400891 cfg.BoolOpt('glance',
892 default=True,
893 help="Whether or not glance is expected to be available"),
Matthew Treinish61e332b2013-07-19 16:42:31 -0400894 cfg.BoolOpt('swift',
895 default=True,
896 help="Whether or not swift is expected to be available"),
Matthew Treinish6b41e242013-07-19 16:49:28 -0400897 cfg.BoolOpt('nova',
898 default=True,
899 help="Whether or not nova is expected to be available"),
Matthew Treinisha9d43882013-07-19 16:54:52 -0400900 cfg.BoolOpt('heat',
901 default=False,
902 help="Whether or not Heat is expected to be available"),
Mehdi Abaakouk8581c0b2013-10-04 10:45:42 +0200903 cfg.BoolOpt('ceilometer',
904 default=True,
905 help="Whether or not Ceilometer is expected to be available"),
Julie Pichond1017642013-07-24 16:37:23 +0100906 cfg.BoolOpt('horizon',
907 default=True,
908 help="Whether or not Horizon is expected to be available"),
Sergey Lukjanov9c95a252014-03-13 23:59:22 +0400909 cfg.BoolOpt('sahara',
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +0400910 default=False,
Sergey Lukjanov9c95a252014-03-13 23:59:22 +0400911 help="Whether or not Sahara is expected to be available"),
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +0300912 cfg.BoolOpt('ironic',
913 default=False,
914 help="Whether or not Ironic is expected to be available"),
Nikhil Manchandadd6886f2014-03-03 01:58:45 -0800915 cfg.BoolOpt('trove',
916 default=False,
917 help="Whether or not Trove is expected to be available"),
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500918 cfg.BoolOpt('marconi',
919 default=False,
920 help="Whether or not Marconi is expected to be available"),
Matthew Treinish4c412922013-07-16 15:27:42 -0400921]
922
Attila Fazekasaeeeefd2013-08-06 17:01:56 +0200923debug_group = cfg.OptGroup(name="debug",
924 title="Debug System")
925
926DebugGroup = [
927 cfg.BoolOpt('enable',
928 default=True,
929 help="Enable diagnostic commands"),
Sean Daguec522c092014-03-24 10:43:22 -0400930 cfg.StrOpt('trace_requests',
931 default='',
932 help="""A regex to determine which requests should be traced.
933
934This is a regex to match the caller for rest client requests to be able to
935selectively trace calls out of specific classes and methods. It largely
936exists for test development, and is not expected to be used in a real deploy
937of tempest. This will be matched against the discovered ClassName:method
938in the test environment.
939
940Expected values for this field are:
941
942 * ClassName:test_method_name - traces one test_method
943 * ClassName:setUp(Class) - traces specific setup functions
944 * ClassName:tearDown(Class) - traces specific teardown functions
945 * ClassName:_run_cleanups - traces the cleanup functions
946
947If nothing is specified, this feature is not enabled. To trace everything
948specify .* as the regex.
949""")
Attila Fazekasaeeeefd2013-08-06 17:01:56 +0200950]
951
Andrea Frittolif5da28b2013-12-06 07:08:07 +0000952input_scenario_group = cfg.OptGroup(name="input-scenario",
953 title="Filters and values for"
954 " input scenarios")
955
956InputScenarioGroup = [
957 cfg.StrOpt('image_regex',
958 default='^cirros-0.3.1-x86_64-uec$',
959 help="Matching images become parameters for scenario tests"),
960 cfg.StrOpt('flavor_regex',
Andrea Frittoli99901c02014-01-30 18:06:49 +0000961 default='^m1.nano$',
Andrea Frittolif5da28b2013-12-06 07:08:07 +0000962 help="Matching flavors become parameters for scenario tests"),
963 cfg.StrOpt('non_ssh_image_regex',
964 default='^.*[Ww]in.*$',
965 help="SSH verification in tests is skipped"
966 "for matching images"),
967 cfg.StrOpt('ssh_user_regex',
968 default="[[\"^.*[Cc]irros.*$\", \"root\"]]",
969 help="List of user mapped to regex "
970 "to matching image names."),
971]
972
Attila Fazekasaeeeefd2013-08-06 17:01:56 +0200973
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +0300974baremetal_group = cfg.OptGroup(name='baremetal',
975 title='Baremetal provisioning service options')
976
977BaremetalGroup = [
978 cfg.StrOpt('catalog_type',
979 default='baremetal',
Adam Gandelman4a48a602014-03-20 18:23:18 -0700980 help="Catalog type of the baremetal provisioning service"),
981 cfg.BoolOpt('driver_enabled',
982 default=False,
983 help="Whether the Ironic nova-compute driver is enabled"),
Yuiko Takada1ee1b322014-07-04 09:55:30 +0900984 cfg.StrOpt('driver',
985 default='fake',
986 help="Driver name which Ironic uses"),
JordanPfc62c902014-02-26 14:47:28 +0000987 cfg.StrOpt('endpoint_type',
988 default='publicURL',
989 choices=['public', 'admin', 'internal',
990 'publicURL', 'adminURL', 'internalURL'],
991 help="The endpoint type to use for the baremetal provisioning "
Adam Gandelman4a48a602014-03-20 18:23:18 -0700992 "service"),
993 cfg.IntOpt('active_timeout',
994 default=300,
995 help="Timeout for Ironic node to completely provision"),
996 cfg.IntOpt('association_timeout',
Adam Gandelmane42f0922014-06-10 15:26:37 -0700997 default=30,
Adam Gandelman4a48a602014-03-20 18:23:18 -0700998 help="Timeout for association of Nova instance and Ironic "
999 "node"),
1000 cfg.IntOpt('power_timeout',
Adam Gandelmane42f0922014-06-10 15:26:37 -07001001 default=60,
Adam Gandelman4a48a602014-03-20 18:23:18 -07001002 help="Timeout for Ironic power transitions."),
1003 cfg.IntOpt('unprovision_timeout',
Adam Gandelmane42f0922014-06-10 15:26:37 -07001004 default=60,
Adam Gandelman4a48a602014-03-20 18:23:18 -07001005 help="Timeout for unprovisioning an Ironic node.")
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +03001006]
1007
Matthew Treinishe2b56b52014-01-29 19:25:50 +00001008cli_group = cfg.OptGroup(name='cli', title="cli Configuration Options")
1009
1010CLIGroup = [
1011 cfg.BoolOpt('enabled',
1012 default=True,
1013 help="enable cli tests"),
1014 cfg.StrOpt('cli_dir',
1015 default='/usr/local/bin',
1016 help="directory where python client binaries are located"),
Sean Dague44b24682014-02-20 19:08:24 -05001017 cfg.BoolOpt('has_manage',
1018 default=True,
1019 help=("Whether the tempest run location has access to the "
1020 "*-manage commands. In a pure blackbox environment "
1021 "it will not.")),
Matthew Treinishe2b56b52014-01-29 19:25:50 +00001022 cfg.IntOpt('timeout',
1023 default=15,
1024 help="Number of seconds to wait on a CLI timeout"),
1025]
1026
Marc Koderer6ee82dc2014-02-17 10:26:29 +01001027negative_group = cfg.OptGroup(name='negative', title="Negative Test Options")
1028
1029NegativeGroup = [
1030 cfg.StrOpt('test_generator',
1031 default='tempest.common.' +
1032 'generator.negative_generator.NegativeTestGenerator',
1033 help="Test generator class for all negative tests"),
1034]
1035
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +03001036
Matthew Treinish43b296a2014-02-28 15:23:00 -05001037def register_opts():
Matthew Treinishc791ac42014-07-16 09:15:23 -04001038 register_opt_group(cfg.CONF, auth_group, AuthGroup)
Matthew Treinish43b296a2014-02-28 15:23:00 -05001039 register_opt_group(cfg.CONF, compute_group, ComputeGroup)
1040 register_opt_group(cfg.CONF, compute_features_group,
1041 ComputeFeaturesGroup)
1042 register_opt_group(cfg.CONF, identity_group, IdentityGroup)
1043 register_opt_group(cfg.CONF, identity_feature_group,
1044 IdentityFeatureGroup)
1045 register_opt_group(cfg.CONF, image_group, ImageGroup)
1046 register_opt_group(cfg.CONF, image_feature_group, ImageFeaturesGroup)
1047 register_opt_group(cfg.CONF, network_group, NetworkGroup)
1048 register_opt_group(cfg.CONF, network_feature_group,
1049 NetworkFeaturesGroup)
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -05001050 register_opt_group(cfg.CONF, queuing_group, QueuingGroup)
Matthew Treinish43b296a2014-02-28 15:23:00 -05001051 register_opt_group(cfg.CONF, volume_group, VolumeGroup)
1052 register_opt_group(cfg.CONF, volume_feature_group,
1053 VolumeFeaturesGroup)
1054 register_opt_group(cfg.CONF, object_storage_group, ObjectStoreGroup)
1055 register_opt_group(cfg.CONF, object_storage_feature_group,
1056 ObjectStoreFeaturesGroup)
Nikhil Manchandadd6886f2014-03-03 01:58:45 -08001057 register_opt_group(cfg.CONF, database_group, DatabaseGroup)
Matthew Treinish43b296a2014-02-28 15:23:00 -05001058 register_opt_group(cfg.CONF, orchestration_group, OrchestrationGroup)
1059 register_opt_group(cfg.CONF, telemetry_group, TelemetryGroup)
1060 register_opt_group(cfg.CONF, dashboard_group, DashboardGroup)
1061 register_opt_group(cfg.CONF, data_processing_group,
1062 DataProcessingGroup)
1063 register_opt_group(cfg.CONF, boto_group, BotoGroup)
1064 register_opt_group(cfg.CONF, compute_admin_group, ComputeAdminGroup)
1065 register_opt_group(cfg.CONF, stress_group, StressGroup)
1066 register_opt_group(cfg.CONF, scenario_group, ScenarioGroup)
1067 register_opt_group(cfg.CONF, service_available_group,
1068 ServiceAvailableGroup)
1069 register_opt_group(cfg.CONF, debug_group, DebugGroup)
1070 register_opt_group(cfg.CONF, baremetal_group, BaremetalGroup)
1071 register_opt_group(cfg.CONF, input_scenario_group, InputScenarioGroup)
1072 register_opt_group(cfg.CONF, cli_group, CLIGroup)
Marc Koderer6ee82dc2014-02-17 10:26:29 +01001073 register_opt_group(cfg.CONF, negative_group, NegativeGroup)
Matthew Treinish43b296a2014-02-28 15:23:00 -05001074
1075
Sean Dague3b9b1f32013-12-20 17:04:54 -05001076# this should never be called outside of this class
1077class TempestConfigPrivate(object):
Daryl Walleck1465d612011-11-02 02:22:15 -05001078 """Provides OpenStack configuration information."""
1079
Brian Waldon738cd632011-12-12 18:45:09 -05001080 DEFAULT_CONFIG_DIR = os.path.join(
Zhongyue Luoa1343de2013-01-04 16:21:35 +08001081 os.path.abspath(os.path.dirname(os.path.dirname(__file__))),
Brian Waldon738cd632011-12-12 18:45:09 -05001082 "etc")
Daryl Walleck1465d612011-11-02 02:22:15 -05001083
Brian Waldon738cd632011-12-12 18:45:09 -05001084 DEFAULT_CONFIG_FILE = "tempest.conf"
1085
Andrea Frittolia96ee212014-08-15 18:34:20 +01001086 def __getattr__(self, attr):
1087 # Handles config options from the default group
1088 return getattr(cfg.CONF, attr)
1089
Matthew Treinish43b296a2014-02-28 15:23:00 -05001090 def _set_attrs(self):
Matthew Treinishc791ac42014-07-16 09:15:23 -04001091 self.auth = cfg.CONF.auth
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001092 self.compute = cfg.CONF.compute
Matthew Treinishd5c96022013-10-17 21:51:23 +00001093 self.compute_feature_enabled = cfg.CONF['compute-feature-enabled']
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001094 self.identity = cfg.CONF.identity
Matthew Treinishd5021a72014-01-09 18:42:51 +00001095 self.identity_feature_enabled = cfg.CONF['identity-feature-enabled']
Matt Riedemannd3efe902014-02-10 06:46:38 -08001096 self.image = cfg.CONF.image
Matthew Treinish2b5287d2013-10-22 17:40:34 +00001097 self.image_feature_enabled = cfg.CONF['image-feature-enabled']
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001098 self.network = cfg.CONF.network
Matthew Treinishe3d26142013-11-26 19:14:58 +00001099 self.network_feature_enabled = cfg.CONF['network-feature-enabled']
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001100 self.volume = cfg.CONF.volume
Matthew Treinishd5c96022013-10-17 21:51:23 +00001101 self.volume_feature_enabled = cfg.CONF['volume-feature-enabled']
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001102 self.object_storage = cfg.CONF['object-storage']
Matthew Treinishd5c96022013-10-17 21:51:23 +00001103 self.object_storage_feature_enabled = cfg.CONF[
1104 'object-storage-feature-enabled']
Nikhil Manchandadd6886f2014-03-03 01:58:45 -08001105 self.database = cfg.CONF.database
Steve Bakerc60e4e32013-05-06 15:22:41 +12001106 self.orchestration = cfg.CONF.orchestration
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -05001107 self.queuing = cfg.CONF.queuing
Yassine Lamgarchalb158d412013-12-27 19:29:42 +01001108 self.telemetry = cfg.CONF.telemetry
Julie Pichond1017642013-07-24 16:37:23 +01001109 self.dashboard = cfg.CONF.dashboard
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +04001110 self.data_processing = cfg.CONF.data_processing
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001111 self.boto = cfg.CONF.boto
Attila Fazekascadcb1f2013-01-21 23:10:53 +01001112 self.compute_admin = cfg.CONF['compute-admin']
Matthew Treinish615ea6a2013-02-25 17:26:59 -05001113 self.stress = cfg.CONF.stress
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +09001114 self.scenario = cfg.CONF.scenario
Matthew Treinish4c412922013-07-16 15:27:42 -04001115 self.service_available = cfg.CONF.service_available
Attila Fazekas5fae7a32013-09-25 16:52:44 +02001116 self.debug = cfg.CONF.debug
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +03001117 self.baremetal = cfg.CONF.baremetal
Andrea Frittolif5da28b2013-12-06 07:08:07 +00001118 self.input_scenario = cfg.CONF['input-scenario']
Matthew Treinishe2b56b52014-01-29 19:25:50 +00001119 self.cli = cfg.CONF.cli
Marc Koderer6ee82dc2014-02-17 10:26:29 +01001120 self.negative = cfg.CONF.negative
Attila Fazekascadcb1f2013-01-21 23:10:53 +01001121 if not self.compute_admin.username:
1122 self.compute_admin.username = self.identity.admin_username
1123 self.compute_admin.password = self.identity.admin_password
1124 self.compute_admin.tenant_name = self.identity.admin_tenant_name
Andrea Frittolib1b04bb2014-04-06 11:57:07 +01001125 cfg.CONF.set_default('domain_name', self.identity.admin_domain_name,
1126 group='identity')
1127 cfg.CONF.set_default('alt_domain_name',
1128 self.identity.admin_domain_name,
1129 group='identity')
1130 cfg.CONF.set_default('domain_name', self.identity.admin_domain_name,
1131 group='compute-admin')
Sean Dague86bd8422013-12-20 09:56:44 -05001132
Joe Gordon28a84ae2014-07-17 15:38:28 +00001133 def __init__(self, parse_conf=True, config_path=None):
Matthew Treinish43b296a2014-02-28 15:23:00 -05001134 """Initialize a configuration from a conf directory and conf file."""
1135 super(TempestConfigPrivate, self).__init__()
1136 config_files = []
1137 failsafe_path = "/etc/tempest/" + self.DEFAULT_CONFIG_FILE
1138
Joe Gordon28a84ae2014-07-17 15:38:28 +00001139 if config_path:
1140 path = config_path
1141 else:
1142 # Environment variables override defaults...
1143 conf_dir = os.environ.get('TEMPEST_CONFIG_DIR',
1144 self.DEFAULT_CONFIG_DIR)
1145 conf_file = os.environ.get('TEMPEST_CONFIG',
1146 self.DEFAULT_CONFIG_FILE)
Matthew Treinish43b296a2014-02-28 15:23:00 -05001147
Joe Gordon28a84ae2014-07-17 15:38:28 +00001148 path = os.path.join(conf_dir, conf_file)
Matthew Treinish43b296a2014-02-28 15:23:00 -05001149
1150 if not os.path.isfile(path):
1151 path = failsafe_path
1152
1153 # only parse the config file if we expect one to exist. This is needed
1154 # to remove an issue with the config file up to date checker.
1155 if parse_conf:
1156 config_files.append(path)
1157
1158 cfg.CONF([], project='tempest', default_config_files=config_files)
1159 logging.setup('tempest')
1160 LOG = logging.getLogger('tempest')
1161 LOG.info("Using tempest config file %s" % path)
1162 register_opts()
1163 self._set_attrs()
Masayuki Igawa9ec4cd82014-02-05 15:04:16 +09001164 if parse_conf:
1165 cfg.CONF.log_opt_values(LOG, std_logging.DEBUG)
1166
Sean Dague86bd8422013-12-20 09:56:44 -05001167
1168class TempestConfigProxy(object):
1169 _config = None
Joe Gordon28a84ae2014-07-17 15:38:28 +00001170 _path = None
Sean Dague86bd8422013-12-20 09:56:44 -05001171
Sean Daguedb6ac6c2014-06-06 16:52:44 -04001172 _extra_log_defaults = [
1173 'keystoneclient.session=INFO',
1174 'paramiko.transport=INFO',
1175 'requests.packages.urllib3.connectionpool=WARN'
1176 ]
1177
1178 def _fix_log_levels(self):
1179 """Tweak the oslo log defaults."""
1180 for opt in logging.log_opts:
1181 if opt.dest == 'default_log_levels':
1182 opt.default.extend(self._extra_log_defaults)
1183
Sean Dague86bd8422013-12-20 09:56:44 -05001184 def __getattr__(self, attr):
1185 if not self._config:
Sean Daguedb6ac6c2014-06-06 16:52:44 -04001186 self._fix_log_levels()
Joe Gordon28a84ae2014-07-17 15:38:28 +00001187 self._config = TempestConfigPrivate(config_path=self._path)
Sean Dague86bd8422013-12-20 09:56:44 -05001188
1189 return getattr(self._config, attr)
1190
Joe Gordon28a84ae2014-07-17 15:38:28 +00001191 def set_config_path(self, path):
1192 self._path = path
1193
Sean Dague86bd8422013-12-20 09:56:44 -05001194
1195CONF = TempestConfigProxy()