blob: 54a4dd1f60f56171289cd4c026da2704feae5a40 [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
Jon Grimm270bd7f2014-08-05 18:11:29 +000023from tempest.openstack.common import lockutils
Matthew Treinishf4a9b0f2013-07-26 16:58:26 -040024from tempest.openstack.common import log as logging
Jay Pipes7f757632011-12-02 15:53:32 -050025
Daryl Walleck1465d612011-11-02 02:22:15 -050026
DennyZhang88a2dd82013-10-07 12:55:35 -050027def register_opt_group(conf, opt_group, options):
28 conf.register_group(opt_group)
29 for opt in options:
30 conf.register_opt(opt, group=opt_group.name)
31
32
Matthew Treinishc791ac42014-07-16 09:15:23 -040033auth_group = cfg.OptGroup(name='auth',
34 title="Options for authentication and credentials")
35
36
37AuthGroup = [
38 cfg.StrOpt('test_accounts_file',
39 default='etc/accounts.yaml',
40 help="Path to the yaml file that contains the list of "
41 "credentials to use for running tests"),
Andrea Frittoli8283b4e2014-07-17 13:28:58 +010042 cfg.BoolOpt('allow_tenant_isolation',
43 default=False,
44 help="Allows test cases to create/destroy tenants and "
45 "users. This option requires that OpenStack Identity "
46 "API admin credentials are known. If false, isolated "
47 "test cases and parallel execution, can still be "
48 "achieved configuring a list of test accounts",
49 deprecated_opts=[cfg.DeprecatedOpt('allow_tenant_isolation',
50 group='compute'),
51 cfg.DeprecatedOpt('allow_tenant_isolation',
52 group='orchestration')]),
53 cfg.BoolOpt('locking_credentials_provider',
54 default=False,
55 help="If set to True it enables the Accounts provider, "
56 "which locks credentials to allow for parallel execution "
57 "with pre-provisioned accounts. It can only be used to "
58 "run tests that ensure credentials cleanup happens. "
59 "It requires at least `2 * CONC` distinct accounts "
60 "configured in `test_accounts_file`, with CONC == the "
61 "number of concurrent test processes."),
Matthew Treinishc791ac42014-07-16 09:15:23 -040062]
63
Matthew Treinish39e48ef2012-12-21 13:36:15 -050064identity_group = cfg.OptGroup(name='identity',
65 title="Keystone Configuration Options")
Daryl Walleck1465d612011-11-02 02:22:15 -050066
Matthew Treinish39e48ef2012-12-21 13:36:15 -050067IdentityGroup = [
68 cfg.StrOpt('catalog_type',
69 default='identity',
70 help="Catalog type of the Identity service."),
Jay Pipescd8eaec2013-01-16 21:03:48 -050071 cfg.BoolOpt('disable_ssl_certificate_validation',
72 default=False,
73 help="Set to True if using self-signed SSL certificates."),
Rob Crittendena7db6692014-11-23 18:44:38 -050074 cfg.StrOpt('ca_certificates_file',
75 default=None,
76 help='Specify a CA bundle file to use in verifying a '
77 'TLS (https) server certificate.'),
Jay Pipes7c88eb22013-01-16 21:32:43 -050078 cfg.StrOpt('uri',
Brant Knudsonc7ca3342013-03-28 21:08:50 -050079 help="Full URI of the OpenStack Identity API (Keystone), v2"),
80 cfg.StrOpt('uri_v3',
81 help='Full URI of the OpenStack Identity API (Keystone), v3'),
Andrea Frittoli8bbdb162014-01-06 11:06:13 +000082 cfg.StrOpt('auth_version',
83 default='v2',
84 help="Identity API version to be used for authentication "
Andrea Frittoli77f9da42014-02-06 11:18:19 +000085 "for API tests."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -050086 cfg.StrOpt('region',
Attila Fazekascadcb1f2013-01-21 23:10:53 +010087 default='RegionOne',
Arata Notsu8f440392013-09-13 16:14:20 +090088 help="The identity region name to use. Also used as the other "
89 "services' region name unless they are set explicitly. "
90 "If no such region is found in the service catalog, the "
91 "first found one is used."),
JordanP5d29b2c2013-12-18 13:56:03 +000092 cfg.StrOpt('endpoint_type',
93 default='publicURL',
94 choices=['public', 'admin', 'internal',
95 'publicURL', 'adminURL', 'internalURL'],
96 help="The endpoint type to use for the identity service."),
Attila Fazekascadcb1f2013-01-21 23:10:53 +010097 cfg.StrOpt('username',
Attila Fazekascadcb1f2013-01-21 23:10:53 +010098 help="Username to use for Nova API requests."),
99 cfg.StrOpt('tenant_name',
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100100 help="Tenant name to use for Nova API requests."),
Russell Sim7f894a52013-09-13 10:35:21 +1000101 cfg.StrOpt('admin_role',
102 default='admin',
103 help="Role required to administrate keystone."),
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100104 cfg.StrOpt('password',
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100105 help="API key to use when authenticating.",
106 secret=True),
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100107 cfg.StrOpt('domain_name',
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100108 help="Domain name for authentication (Keystone V3)."
109 "The same domain applies to user and project"),
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100110 cfg.StrOpt('alt_username',
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100111 help="Username of alternate user to use for Nova API "
112 "requests."),
113 cfg.StrOpt('alt_tenant_name',
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100114 help="Alternate user's Tenant name to use for Nova API "
115 "requests."),
116 cfg.StrOpt('alt_password',
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100117 help="API key to use when authenticating as alternate user.",
118 secret=True),
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100119 cfg.StrOpt('alt_domain_name',
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100120 help="Alternate domain name for authentication (Keystone V3)."
121 "The same domain applies to user and project"),
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100122 cfg.StrOpt('admin_username',
Dirk Mueller14bd5622014-01-14 19:33:05 +0100123 help="Administrative Username to use for "
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100124 "Keystone API requests."),
125 cfg.StrOpt('admin_tenant_name',
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100126 help="Administrative Tenant name to use for Keystone API "
127 "requests."),
128 cfg.StrOpt('admin_password',
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100129 help="API key to use when authenticating as admin.",
130 secret=True),
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100131 cfg.StrOpt('admin_domain_name',
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100132 help="Admin domain name for authentication (Keystone V3)."
133 "The same domain applies to user and project"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500134]
Jay Pipes3f981df2012-03-27 18:59:44 -0400135
Matthew Treinishd5021a72014-01-09 18:42:51 +0000136identity_feature_group = cfg.OptGroup(name='identity-feature-enabled',
137 title='Enabled Identity Features')
138
139IdentityFeatureGroup = [
140 cfg.BoolOpt('trust',
141 default=True,
142 help='Does the identity service have delegation and '
Matthew Treinishdb2c5972014-01-31 22:18:59 +0000143 'impersonation enabled'),
144 cfg.BoolOpt('api_v2',
145 default=True,
146 help='Is the v2 identity API enabled'),
147 cfg.BoolOpt('api_v3',
148 default=True,
149 help='Is the v3 identity API enabled'),
Matthew Treinishd5021a72014-01-09 18:42:51 +0000150]
151
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500152compute_group = cfg.OptGroup(name='compute',
153 title='Compute Service Options')
Rohit Karajgie1b050d2011-12-02 16:13:18 -0800154
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500155ComputeGroup = [
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500156 cfg.StrOpt('image_ref',
Matthew Treinishafcb6b42014-05-27 13:50:02 -0400157 help="Valid primary image reference to be used in tests. "
158 "This is a required option"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500159 cfg.StrOpt('image_ref_alt',
Matthew Treinishafcb6b42014-05-27 13:50:02 -0400160 help="Valid secondary image reference to be used in tests. "
161 "This is a required option, but if only one image is "
162 "available duplicate the value of image_ref above"),
Ken'ichi Ohmichi35772602013-11-14 15:03:27 +0900163 cfg.StrOpt('flavor_ref',
164 default="1",
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500165 help="Valid primary flavor to use in tests."),
Ken'ichi Ohmichi35772602013-11-14 15:03:27 +0900166 cfg.StrOpt('flavor_ref_alt',
167 default="2",
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500168 help='Valid secondary flavor to be used in tests.'),
Maru Newbyaf292e82013-05-20 21:32:28 +0000169 cfg.StrOpt('image_ssh_user',
170 default="root",
171 help="User name used to authenticate to an instance."),
Ryan Hsucb2e1252013-09-03 21:44:49 -0700172 cfg.StrOpt('image_ssh_password',
173 default="password",
174 help="Password used to authenticate to an instance."),
Maru Newbyaf292e82013-05-20 21:32:28 +0000175 cfg.StrOpt('image_alt_ssh_user',
176 default="root",
177 help="User name used to authenticate to an instance using "
178 "the alternate image."),
Ryan Hsucb2e1252013-09-03 21:44:49 -0700179 cfg.StrOpt('image_alt_ssh_password',
180 default="password",
181 help="Password used to authenticate to an instance using "
182 "the alternate image."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500183 cfg.IntOpt('build_interval',
Sean Dague82190852014-05-24 07:42:59 -0400184 default=1,
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500185 help="Time in seconds between build status checks."),
186 cfg.IntOpt('build_timeout',
187 default=300,
Hugh Saunders5b139ad2014-12-15 09:08:41 +0000188 help="Timeout in seconds to wait for an instance to build. "
189 "Other services that do not define build_timeout will "
190 "inherit this value, for example the image service."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500191 cfg.BoolOpt('run_ssh',
192 default=False,
Derek Higgins85cd5142013-12-17 17:10:11 +0000193 help="Should the tests ssh to instances?"),
Attila Fazekas423834d2014-03-14 17:33:13 +0100194 cfg.StrOpt('ssh_auth_method',
195 default='keypair',
196 help="Auth method used for authenticate to the instance. "
197 "Valid choices are: keypair, configured, adminpass. "
198 "keypair: start the servers with an ssh keypair. "
199 "configured: use the configured user and password. "
200 "adminpass: use the injected adminPass. "
201 "disabled: avoid using ssh when it is an option."),
202 cfg.StrOpt('ssh_connect_method',
203 default='fixed',
204 help="How to connect to the instance? "
205 "fixed: using the first ip belongs the fixed network "
206 "floating: creating and using a floating ip"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500207 cfg.StrOpt('ssh_user',
208 default='root',
209 help="User name used to authenticate to an instance."),
Nachi Ueno6d580be2013-07-24 10:58:11 -0700210 cfg.IntOpt('ping_timeout',
Darragh O'Reilly6b636672014-01-24 12:17:40 +0000211 default=120,
Nachi Ueno6d580be2013-07-24 10:58:11 -0700212 help="Timeout in seconds to wait for ping to "
213 "succeed."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500214 cfg.IntOpt('ssh_timeout',
215 default=300,
Chris Yeoh76916042013-02-27 16:25:25 +1030216 help="Timeout in seconds to wait for authentication to "
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500217 "succeed."),
Attila Fazekas0abbc952013-07-01 19:19:42 +0200218 cfg.IntOpt('ready_wait',
219 default=0,
DennyZhang8912d012013-09-25 18:08:34 -0500220 help="Additional wait time for clean state, when there is "
221 "no OS-EXT-STS extension available"),
Chris Yeoh76916042013-02-27 16:25:25 +1030222 cfg.IntOpt('ssh_channel_timeout',
223 default=60,
224 help="Timeout in seconds to wait for output from ssh "
225 "channel."),
Attila Fazekasb0661652013-05-08 13:01:36 +0200226 cfg.StrOpt('fixed_network_name',
227 default='private',
Chris Hoge8f1401b2014-11-19 14:00:37 -0800228 help="Name of the fixed network that is visible to all test "
229 "tenants."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500230 cfg.StrOpt('network_for_ssh',
231 default='public',
Chris Hoge8f1401b2014-11-19 14:00:37 -0800232 help="Network used for SSH connections. Ignored if "
233 "use_floatingip_for_ssh=true or run_ssh=false."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500234 cfg.IntOpt('ip_version_for_ssh',
235 default=4,
236 help="IP version used for SSH connections."),
fujioka yuuichia11994e2013-07-09 11:19:51 +0900237 cfg.BoolOpt('use_floatingip_for_ssh',
238 default=True,
Tushar Kalra95a482d2014-03-25 14:24:43 -0700239 help="Does SSH use Floating IPs?"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500240 cfg.StrOpt('catalog_type',
241 default='compute',
242 help="Catalog type of the Compute service."),
Arata Notsu8f440392013-09-13 16:14:20 +0900243 cfg.StrOpt('region',
244 default='',
245 help="The compute region name to use. If empty, the value "
246 "of identity.region is used instead. If no such region "
247 "is found in the service catalog, the first found one is "
248 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000249 cfg.StrOpt('endpoint_type',
250 default='publicURL',
251 choices=['public', 'admin', 'internal',
252 'publicURL', 'adminURL', 'internalURL'],
253 help="The endpoint type to use for the compute service."),
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100254 cfg.StrOpt('path_to_private_key',
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100255 help="Path to a private key file for SSH access to remote "
256 "hosts"),
Ryan Hsucb2e1252013-09-03 21:44:49 -0700257 cfg.StrOpt('volume_device_name',
258 default='vdb',
259 help="Expected device name when a volume is attached to "
Ken'ichi Ohmichi39437e22013-10-06 00:21:38 +0900260 "an instance"),
261 cfg.IntOpt('shelved_offload_time',
262 default=0,
263 help='Time in seconds before a shelved instance is eligible '
264 'for removing from a host. -1 never offload, 0 offload '
265 'when shelved. This time should be the same as the time '
266 'of nova.conf, and some tests will run for as long as the '
Ghanshyam06a5b4a2014-04-11 17:32:45 +0900267 'time.'),
268 cfg.StrOpt('floating_ip_range',
269 default='10.0.0.0/29',
270 help='Unallocated floating IP range, which will be used to '
Chris Hoge8f1401b2014-11-19 14:00:37 -0800271 'test the floating IP bulk feature for CRUD operation. '
272 'This block must not overlap an existing floating IP '
273 'pool.')
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500274]
Rohit Karajgie1b050d2011-12-02 16:13:18 -0800275
Matthew Treinishd5c96022013-10-17 21:51:23 +0000276compute_features_group = cfg.OptGroup(name='compute-feature-enabled',
277 title="Enabled Compute Service Features")
278
279ComputeFeaturesGroup = [
280 cfg.BoolOpt('disk_config',
281 default=True,
282 help="If false, skip disk config tests"),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000283 cfg.ListOpt('api_extensions',
284 default=['all'],
Zhi Kun Liude25c022014-02-14 13:25:19 +0800285 help='A list of enabled compute extensions with a special '
Ken'ichi Ohmichia7e68712014-05-06 10:47:26 +0900286 'entry all which indicates every extension is enabled. '
Simeon Monov5d7effe2014-07-16 07:32:38 +0300287 'Each extension should be specified with alias name. '
288 'Empty list indicates all extensions are disabled'),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000289 cfg.BoolOpt('change_password',
290 default=False,
291 help="Does the test environment support changing the admin "
292 "password?"),
Adam Gandelmanc6eefb42014-07-15 16:44:08 -0700293 cfg.BoolOpt('console_output',
294 default=True,
295 help="Does the test environment support obtaining instance "
296 "serial console output?"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000297 cfg.BoolOpt('resize',
298 default=False,
299 help="Does the test environment support resizing?"),
Eric Windischb5538072014-03-09 23:47:35 -0400300 cfg.BoolOpt('pause',
301 default=True,
302 help="Does the test environment support pausing?"),
David Shrewsbury25f666f2014-07-22 12:17:59 -0400303 cfg.BoolOpt('shelve',
304 default=True,
305 help="Does the test environment support shelving/unshelving?"),
Eric Windischaeb7e842014-03-10 01:10:50 -0400306 cfg.BoolOpt('suspend',
307 default=True,
308 help="Does the test environment support suspend/resume?"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000309 cfg.BoolOpt('live_migration',
Joe Gordon31a139a2014-11-17 16:39:04 -0800310 default=True,
Matthew Treinishd5c96022013-10-17 21:51:23 +0000311 help="Does the test environment support live migration "
312 "available?"),
313 cfg.BoolOpt('block_migration_for_live_migration',
314 default=False,
315 help="Does the test environment use block devices for live "
316 "migration"),
317 cfg.BoolOpt('block_migrate_cinder_iscsi',
318 default=False,
319 help="Does the test environment block migration support "
Ghanshyam Mann41c17572014-02-27 18:52:56 +0900320 "cinder iSCSI volumes"),
321 cfg.BoolOpt('vnc_console',
322 default=False,
323 help='Enable VNC console. This configuration value should '
Ghanshyam70876d02014-03-11 11:40:18 +0900324 'be same as [nova.vnc]->vnc_enabled in nova.conf'),
325 cfg.BoolOpt('spice_console',
326 default=False,
327 help='Enable Spice console. This configuration value should '
328 'be same as [nova.spice]->enabled in nova.conf'),
329 cfg.BoolOpt('rdp_console',
330 default=False,
331 help='Enable RDP console. This configuration value should '
Adam Gandelman2e37b4f2014-06-18 17:34:21 -0700332 'be same as [nova.rdp]->enabled in nova.conf'),
333 cfg.BoolOpt('rescue',
334 default=True,
335 help='Does the test environment support instance rescue '
Ghanshyam9c2e50d2014-07-22 21:32:05 +0900336 'mode?'),
337 cfg.BoolOpt('enable_instance_password',
338 default=True,
339 help='Enables returning of the instance password by the '
340 'relevant server API calls such as create, rebuild '
Adam Gandelman7186f7a2014-07-23 09:28:56 -0400341 'or rescue.'),
342 cfg.BoolOpt('interface_attach',
343 default=True,
344 help='Does the test environment support dynamic network '
Adam Gandelmanfbc95ac2014-06-19 17:33:43 -0700345 'interface attachment?'),
346 cfg.BoolOpt('snapshot',
347 default=True,
348 help='Does the test environment support creating snapshot '
349 'images of running instances?')
Matthew Treinishd5c96022013-10-17 21:51:23 +0000350]
351
352
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500353image_group = cfg.OptGroup(name='image',
354 title="Image Service Options")
Jay Pipesf38eaac2012-06-21 13:37:35 -0400355
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500356ImageGroup = [
Matthew Treinish72ea4422013-02-07 14:42:49 -0500357 cfg.StrOpt('catalog_type',
358 default='image',
Sean Dague83401992013-05-06 17:46:36 -0400359 help='Catalog type of the Image service.'),
Arata Notsu8f440392013-09-13 16:14:20 +0900360 cfg.StrOpt('region',
361 default='',
362 help="The image region name to use. If empty, the value "
363 "of identity.region is used instead. If no such region "
364 "is found in the service catalog, the first found one is "
365 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000366 cfg.StrOpt('endpoint_type',
367 default='publicURL',
368 choices=['public', 'admin', 'internal',
369 'publicURL', 'adminURL', 'internalURL'],
370 help="The endpoint type to use for the image service."),
Sean Dague83401992013-05-06 17:46:36 -0400371 cfg.StrOpt('http_image',
372 default='http://download.cirros-cloud.net/0.3.1/'
373 'cirros-0.3.1-x86_64-uec.tar.gz',
DennyZhang8912d012013-09-25 18:08:34 -0500374 help='http accessible image')
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500375]
Jay Pipesf38eaac2012-06-21 13:37:35 -0400376
Matthew Treinish2b5287d2013-10-22 17:40:34 +0000377image_feature_group = cfg.OptGroup(name='image-feature-enabled',
378 title='Enabled image service features')
379
380ImageFeaturesGroup = [
381 cfg.BoolOpt('api_v2',
382 default=True,
383 help="Is the v2 image API enabled"),
384 cfg.BoolOpt('api_v1',
385 default=True,
386 help="Is the v1 image API enabled"),
387]
Jay Pipesf38eaac2012-06-21 13:37:35 -0400388
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500389network_group = cfg.OptGroup(name='network',
390 title='Network Service Options')
Daryl Walleck587385b2012-03-03 13:00:26 -0600391
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500392NetworkGroup = [
393 cfg.StrOpt('catalog_type',
394 default='network',
Mark McClainf2982e82013-07-06 17:48:03 -0400395 help='Catalog type of the Neutron service.'),
Arata Notsu8f440392013-09-13 16:14:20 +0900396 cfg.StrOpt('region',
397 default='',
398 help="The network region name to use. If empty, the value "
399 "of identity.region is used instead. If no such region "
400 "is found in the service catalog, the first found one is "
401 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000402 cfg.StrOpt('endpoint_type',
403 default='publicURL',
404 choices=['public', 'admin', 'internal',
405 'publicURL', 'adminURL', 'internalURL'],
406 help="The endpoint type to use for the network service."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500407 cfg.StrOpt('tenant_network_cidr',
408 default="10.100.0.0/16",
Henry Gessauffda37a2014-01-16 11:17:55 -0500409 help="The cidr block to allocate tenant ipv4 subnets from"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500410 cfg.IntOpt('tenant_network_mask_bits',
Attila Fazekas8ea181b2013-07-13 16:26:14 +0200411 default=28,
Henry Gessauffda37a2014-01-16 11:17:55 -0500412 help="The mask bits for tenant ipv4 subnets"),
413 cfg.StrOpt('tenant_network_v6_cidr',
Sergey Shnaidman1f3659a2014-08-27 18:26:42 +0400414 default="2003::/48",
Henry Gessauffda37a2014-01-16 11:17:55 -0500415 help="The cidr block to allocate tenant ipv6 subnets from"),
416 cfg.IntOpt('tenant_network_v6_mask_bits',
Sergey Shnaidman1f3659a2014-08-27 18:26:42 +0400417 default=64,
Henry Gessauffda37a2014-01-16 11:17:55 -0500418 help="The mask bits for tenant ipv6 subnets"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500419 cfg.BoolOpt('tenant_networks_reachable',
420 default=False,
421 help="Whether tenant network connectivity should be "
422 "evaluated directly"),
423 cfg.StrOpt('public_network_id',
424 default="",
425 help="Id of the public network that provides external "
426 "connectivity"),
427 cfg.StrOpt('public_router_id',
428 default="",
429 help="Id of the public router that provides external "
Yair Fried1eb27f52014-11-10 15:24:19 +0200430 "connectivity. This should only be used when Neutron's "
431 "'allow_overlapping_ips' is set to 'False' in "
432 "neutron.conf. usually not needed past 'Grizzly' release"),
izikpensod9a01a62014-02-17 20:02:32 +0200433 cfg.IntOpt('build_timeout',
434 default=300,
435 help="Timeout in seconds to wait for network operation to "
436 "complete."),
437 cfg.IntOpt('build_interval',
Sean Dague82190852014-05-24 07:42:59 -0400438 default=1,
izikpensod9a01a62014-02-17 20:02:32 +0200439 help="Time in seconds between network operation status "
440 "checks."),
Attila Fazekas640392b2014-06-12 15:58:10 +0200441 cfg.ListOpt('dns_servers',
442 default=["8.8.8.8", "8.8.4.4"],
Itzik Brown5be44582014-12-24 09:05:13 +0200443 help="List of dns servers which should be used"
Attila Fazekas640392b2014-06-12 15:58:10 +0200444 " for subnet creation")
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500445]
Jay Pipes3f981df2012-03-27 18:59:44 -0400446
Matthew Treinishe3d26142013-11-26 19:14:58 +0000447network_feature_group = cfg.OptGroup(name='network-feature-enabled',
448 title='Enabled network service features')
449
450NetworkFeaturesGroup = [
Matthew Treinishe2e33cf2014-03-03 19:28:41 +0000451 cfg.BoolOpt('ipv6',
452 default=True,
453 help="Allow the execution of IPv6 tests"),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000454 cfg.ListOpt('api_extensions',
455 default=['all'],
Zhi Kun Liude25c022014-02-14 13:25:19 +0800456 help='A list of enabled network extensions with a special '
Simeon Monov5d7effe2014-07-16 07:32:38 +0300457 'entry all which indicates every extension is enabled. '
458 'Empty list indicates all extensions are disabled'),
Sean M. Collinsdd27a4d2014-05-13 10:33:15 -0400459 cfg.BoolOpt('ipv6_subnet_attributes',
460 default=False,
461 help="Allow the execution of IPv6 subnet tests that use "
462 "the extended IPv6 attributes ipv6_ra_mode "
463 "and ipv6_address_mode"
Mark McClain6e07c0d2014-10-10 11:25:03 -0400464 ),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000465]
466
Victoria Martínez de la Cruz1173b6e2014-09-22 18:32:13 -0300467messaging_group = cfg.OptGroup(name='messaging',
468 title='Messaging Service')
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500469
Victoria Martínez de la Cruz1173b6e2014-09-22 18:32:13 -0300470MessagingGroup = [
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500471 cfg.StrOpt('catalog_type',
Victoria Martínez de la Cruz1173b6e2014-09-22 18:32:13 -0300472 default='messaging',
473 help='Catalog type of the Messaging service.'),
Jorge Chai83ba4ee2014-04-15 18:58:08 +0000474 cfg.IntOpt('max_queues_per_page',
475 default=20,
476 help='The maximum number of queue records per page when '
477 'listing queues'),
Malini Kamalambal7458b4b2014-05-29 11:47:28 -0400478 cfg.IntOpt('max_queue_metadata',
479 default=65536,
480 help='The maximum metadata size for a queue'),
481 cfg.IntOpt('max_messages_per_page',
482 default=20,
483 help='The maximum number of queue message per page when '
484 'listing (or) posting messages'),
485 cfg.IntOpt('max_message_size',
486 default=262144,
487 help='The maximum size of a message body'),
488 cfg.IntOpt('max_messages_per_claim',
489 default=20,
490 help='The maximum number of messages per claim'),
491 cfg.IntOpt('max_message_ttl',
492 default=1209600,
493 help='The maximum ttl for a message'),
494 cfg.IntOpt('max_claim_ttl',
495 default=43200,
496 help='The maximum ttl for a claim'),
497 cfg.IntOpt('max_claim_grace',
498 default=43200,
499 help='The maximum grace period for a claim'),
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500500]
501
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500502volume_group = cfg.OptGroup(name='volume',
503 title='Block Storage Options')
Daryl Walleck587385b2012-03-03 13:00:26 -0600504
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500505VolumeGroup = [
506 cfg.IntOpt('build_interval',
Sean Dague82190852014-05-24 07:42:59 -0400507 default=1,
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500508 help='Time in seconds between volume availability checks.'),
509 cfg.IntOpt('build_timeout',
510 default=300,
Eric Harney9b1f89c2014-10-14 14:40:19 -0400511 help='Timeout in seconds to wait for a volume to become '
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500512 'available.'),
513 cfg.StrOpt('catalog_type',
Matthew Treinisheb724512013-10-25 15:12:59 +0000514 default='volume',
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500515 help="Catalog type of the Volume Service"),
Arata Notsu8f440392013-09-13 16:14:20 +0900516 cfg.StrOpt('region',
517 default='',
518 help="The volume region name to use. If empty, the value "
519 "of identity.region is used instead. If no such region "
520 "is found in the service catalog, the first found one is "
521 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000522 cfg.StrOpt('endpoint_type',
523 default='publicURL',
524 choices=['public', 'admin', 'internal',
525 'publicURL', 'adminURL', 'internalURL'],
526 help="The endpoint type to use for the volume service."),
Jérôme Gallard86551ce2013-03-08 11:41:26 +0100527 cfg.StrOpt('backend1_name',
Giulio Fidentef4fa8942013-05-28 18:48:03 +0200528 default='BACKEND_1',
Jérôme Gallard86551ce2013-03-08 11:41:26 +0100529 help="Name of the backend1 (must be declared in cinder.conf)"),
530 cfg.StrOpt('backend2_name',
Giulio Fidentef4fa8942013-05-28 18:48:03 +0200531 default='BACKEND_2',
Jérôme Gallard86551ce2013-03-08 11:41:26 +0100532 help="Name of the backend2 (must be declared in cinder.conf)"),
Adam Gandelman827ad332013-06-24 17:04:09 -0700533 cfg.StrOpt('storage_protocol',
534 default='iSCSI',
535 help='Backend protocol to target when creating volume types'),
536 cfg.StrOpt('vendor_name',
537 default='Open Source',
538 help='Backend vendor to target when creating volume types'),
Ryan Hsua67f4632013-08-29 16:03:06 -0700539 cfg.StrOpt('disk_format',
540 default='raw',
541 help='Disk format to use when copying a volume to image'),
Jerry Cai9733d0e2014-03-19 15:50:49 +0800542 cfg.IntOpt('volume_size',
543 default=1,
544 help='Default size in GB for volumes created by volumes tests'),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500545]
K Jonathan Harkerd6ba4b42012-12-18 13:50:47 -0800546
Matthew Treinishd5c96022013-10-17 21:51:23 +0000547volume_feature_group = cfg.OptGroup(name='volume-feature-enabled',
548 title='Enabled Cinder Features')
549
550VolumeFeaturesGroup = [
551 cfg.BoolOpt('multi_backend',
552 default=False,
Matthew Treinishe3d26142013-11-26 19:14:58 +0000553 help="Runs Cinder multi-backend test (requires 2 backends)"),
Giulio Fidente74b08ad2014-01-18 04:02:51 +0100554 cfg.BoolOpt('backup',
555 default=True,
556 help='Runs Cinder volumes backup test'),
JordanPbce55532014-03-19 12:10:32 +0100557 cfg.BoolOpt('snapshot',
558 default=True,
559 help='Runs Cinder volume snapshot test'),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000560 cfg.ListOpt('api_extensions',
561 default=['all'],
Zhi Kun Liude25c022014-02-14 13:25:19 +0800562 help='A list of enabled volume extensions with a special '
Simeon Monov5d7effe2014-07-16 07:32:38 +0300563 'entry all which indicates every extension is enabled. '
564 'Empty list indicates all extensions are disabled'),
Zhi Kun Liubb363a22013-11-28 18:47:39 +0800565 cfg.BoolOpt('api_v1',
566 default=True,
567 help="Is the v1 volume API enabled"),
Zhi Kun Liu8cc3c842014-01-07 10:44:34 +0800568 cfg.BoolOpt('api_v2',
569 default=True,
570 help="Is the v2 volume API enabled"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000571]
572
Daryl Walleck587385b2012-03-03 13:00:26 -0600573
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500574object_storage_group = cfg.OptGroup(name='object-storage',
575 title='Object Storage Service Options')
Attila Fazekasa23f5002012-10-23 19:32:45 +0200576
DennyZhang1e71b612013-09-26 12:35:40 -0500577ObjectStoreGroup = [
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500578 cfg.StrOpt('catalog_type',
579 default='object-store',
580 help="Catalog type of the Object-Storage service."),
Arata Notsu8f440392013-09-13 16:14:20 +0900581 cfg.StrOpt('region',
582 default='',
583 help="The object-storage region name to use. If empty, the "
584 "value of identity.region is used instead. If no such "
585 "region is found in the service catalog, the first found "
586 "one is used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000587 cfg.StrOpt('endpoint_type',
588 default='publicURL',
589 choices=['public', 'admin', 'internal',
590 'publicURL', 'adminURL', 'internalURL'],
591 help="The endpoint type to use for the object-store service."),
Matthew Treinishf319a732013-10-24 21:39:24 +0000592 cfg.IntOpt('container_sync_timeout',
nayna-patelb4989b32013-01-09 06:25:13 +0000593 default=120,
Fabien Boucher2178d312013-12-31 15:38:57 +0100594 help="Number of seconds to time on waiting for a container "
nayna-patelb4989b32013-01-09 06:25:13 +0000595 "to container synchronization complete."),
Matthew Treinishf319a732013-10-24 21:39:24 +0000596 cfg.IntOpt('container_sync_interval',
nayna-patelb4989b32013-01-09 06:25:13 +0000597 default=5,
Fabien Boucher2178d312013-12-31 15:38:57 +0100598 help="Number of seconds to wait while looping to check the "
nayna-patelb4989b32013-01-09 06:25:13 +0000599 "status of a container to container synchronization"),
Matthew Treinish3fdb80c2013-08-15 11:13:19 -0400600 cfg.StrOpt('operator_role',
601 default='Member',
602 help="Role to add to users created for swift tests to "
603 "enable creating containers"),
Matthew Treinish998c91d2014-03-01 12:39:49 -0500604 cfg.StrOpt('reseller_admin_role',
605 default='ResellerAdmin',
606 help="User role that has reseller admin"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500607]
Attila Fazekasa23f5002012-10-23 19:32:45 +0200608
Matthew Treinishd5c96022013-10-17 21:51:23 +0000609object_storage_feature_group = cfg.OptGroup(
610 name='object-storage-feature-enabled',
611 title='Enabled object-storage features')
612
613ObjectStoreFeaturesGroup = [
Matthew Treinish20345382013-12-13 17:04:23 +0000614 cfg.ListOpt('discoverable_apis',
615 default=['all'],
616 help="A list of the enabled optional discoverable apis. "
617 "A single entry, all, indicates that all of these "
618 "features are expected to be enabled"),
Daisuke Morita20a183f2014-08-25 14:43:36 +0900619 cfg.BoolOpt('container_sync',
620 default=True,
621 help="Execute (old style) container-sync tests"),
622 cfg.BoolOpt('object_versioning',
623 default=True,
624 help="Execute object-versioning tests"),
625 cfg.BoolOpt('discoverability',
626 default=True,
627 help="Execute discoverability tests"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000628]
629
Nikhil Manchandadd6886f2014-03-03 01:58:45 -0800630database_group = cfg.OptGroup(name='database',
631 title='Database Service Options')
632
633DatabaseGroup = [
634 cfg.StrOpt('catalog_type',
635 default='database',
636 help="Catalog type of the Database service."),
637 cfg.StrOpt('db_flavor_ref',
638 default="1",
639 help="Valid primary flavor to use in database tests."),
Peter Stachowski320f9c72014-04-21 16:13:23 -0400640 cfg.StrOpt('db_current_version',
641 default="v1.0",
642 help="Current database version to use in database tests."),
Nikhil Manchandadd6886f2014-03-03 01:58:45 -0800643]
Attila Fazekasa23f5002012-10-23 19:32:45 +0200644
Steve Bakerc60e4e32013-05-06 15:22:41 +1200645orchestration_group = cfg.OptGroup(name='orchestration',
646 title='Orchestration Service Options')
647
648OrchestrationGroup = [
649 cfg.StrOpt('catalog_type',
650 default='orchestration',
651 help="Catalog type of the Orchestration service."),
Arata Notsu8f440392013-09-13 16:14:20 +0900652 cfg.StrOpt('region',
653 default='',
654 help="The orchestration region name to use. If empty, the "
655 "value of identity.region is used instead. If no such "
656 "region is found in the service catalog, the first found "
657 "one is used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000658 cfg.StrOpt('endpoint_type',
659 default='publicURL',
660 choices=['public', 'admin', 'internal',
661 'publicURL', 'adminURL', 'internalURL'],
662 help="The endpoint type to use for the orchestration service."),
Steve Bakerc60e4e32013-05-06 15:22:41 +1200663 cfg.IntOpt('build_interval',
664 default=1,
665 help="Time in seconds between build status checks."),
666 cfg.IntOpt('build_timeout',
Matthew Treinisha2dfd492014-04-15 11:15:34 -0400667 default=1200,
Steve Bakerc60e4e32013-05-06 15:22:41 +1200668 help="Timeout in seconds to wait for a stack to build."),
Steve Bakerc60e4e32013-05-06 15:22:41 +1200669 cfg.StrOpt('instance_type',
Steve Baker9e86b832013-05-22 15:40:28 +1200670 default='m1.micro',
Steve Bakerc60e4e32013-05-06 15:22:41 +1200671 help="Instance type for tests. Needs to be big enough for a "
672 "full OS plus the test workload"),
673 cfg.StrOpt('image_ref',
Steve Bakerc60e4e32013-05-06 15:22:41 +1200674 help="Name of heat-cfntools enabled image to use when "
675 "launching test instances."),
676 cfg.StrOpt('keypair_name',
Steve Bakerc60e4e32013-05-06 15:22:41 +1200677 help="Name of existing keypair to launch servers with."),
Clint Byrum71f27632013-09-09 11:41:32 -0700678 cfg.IntOpt('max_template_size',
Joe Gordon0e51b222013-10-24 14:11:10 +0100679 default=524288,
Clint Byrum71f27632013-09-09 11:41:32 -0700680 help="Value must match heat configuration of the same name."),
Steven Hardyfdc6bd72014-03-21 16:56:04 +0000681 cfg.IntOpt('max_resources_per_stack',
682 default=1000,
683 help="Value must match heat configuration of the same name."),
Steve Bakerc60e4e32013-05-06 15:22:41 +1200684]
685
686
Yassine Lamgarchalb158d412013-12-27 19:29:42 +0100687telemetry_group = cfg.OptGroup(name='telemetry',
688 title='Telemetry Service Options')
689
690TelemetryGroup = [
691 cfg.StrOpt('catalog_type',
692 default='metering',
693 help="Catalog type of the Telemetry service."),
JordanPfc62c902014-02-26 14:47:28 +0000694 cfg.StrOpt('endpoint_type',
695 default='publicURL',
696 choices=['public', 'admin', 'internal',
697 'publicURL', 'adminURL', 'internalURL'],
698 help="The endpoint type to use for the telemetry service."),
Vadim Rovachev7bcea352013-12-26 15:56:17 +0400699 cfg.BoolOpt('too_slow_to_test',
700 default=True,
701 help="This variable is used as flag to enable "
702 "notification tests")
Yassine Lamgarchalb158d412013-12-27 19:29:42 +0100703]
704
705
Julie Pichond1017642013-07-24 16:37:23 +0100706dashboard_group = cfg.OptGroup(name="dashboard",
707 title="Dashboard options")
708
709DashboardGroup = [
710 cfg.StrOpt('dashboard_url',
711 default='http://localhost/',
712 help="Where the dashboard can be found"),
713 cfg.StrOpt('login_url',
714 default='http://localhost/auth/login/',
715 help="Login page for the dashboard"),
716]
717
718
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +0400719data_processing_group = cfg.OptGroup(name="data_processing",
720 title="Data Processing options")
721
722DataProcessingGroup = [
723 cfg.StrOpt('catalog_type',
724 default='data_processing',
JordanPfc62c902014-02-26 14:47:28 +0000725 help="Catalog type of the data processing service."),
726 cfg.StrOpt('endpoint_type',
727 default='publicURL',
728 choices=['public', 'admin', 'internal',
729 'publicURL', 'adminURL', 'internalURL'],
730 help="The endpoint type to use for the data processing "
731 "service."),
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +0400732]
733
734
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500735boto_group = cfg.OptGroup(name='boto',
736 title='EC2/S3 options')
DennyZhang1e71b612013-09-26 12:35:40 -0500737BotoGroup = [
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500738 cfg.StrOpt('ec2_url',
739 default="http://localhost:8773/services/Cloud",
740 help="EC2 URL"),
741 cfg.StrOpt('s3_url',
742 default="http://localhost:8080",
743 help="S3 URL"),
744 cfg.StrOpt('aws_secret',
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500745 help="AWS Secret Key",
746 secret=True),
747 cfg.StrOpt('aws_access',
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500748 help="AWS Access Key"),
Attila Fazekas27dd92e2014-02-21 14:49:40 +0100749 cfg.StrOpt('aws_zone',
750 default="nova",
751 help="AWS Zone for EC2 tests"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500752 cfg.StrOpt('s3_materials_path',
753 default="/opt/stack/devstack/files/images/"
754 "s3-materials/cirros-0.3.0",
755 help="S3 Materials Path"),
756 cfg.StrOpt('ari_manifest',
757 default="cirros-0.3.0-x86_64-initrd.manifest.xml",
758 help="ARI Ramdisk Image manifest"),
759 cfg.StrOpt('ami_manifest',
760 default="cirros-0.3.0-x86_64-blank.img.manifest.xml",
761 help="AMI Machine Image manifest"),
762 cfg.StrOpt('aki_manifest',
763 default="cirros-0.3.0-x86_64-vmlinuz.manifest.xml",
764 help="AKI Kernel Image manifest"),
765 cfg.StrOpt('instance_type',
766 default="m1.tiny",
767 help="Instance type"),
768 cfg.IntOpt('http_socket_timeout',
769 default=3,
770 help="boto Http socket timeout"),
771 cfg.IntOpt('num_retries',
772 default=1,
773 help="boto num_retries on error"),
774 cfg.IntOpt('build_timeout',
775 default=60,
776 help="Status Change Timeout"),
777 cfg.IntOpt('build_interval',
778 default=1,
779 help="Status Change Test Interval"),
780]
Attila Fazekasf7f2d932012-12-13 09:14:38 +0100781
Matthew Treinish615ea6a2013-02-25 17:26:59 -0500782stress_group = cfg.OptGroup(name='stress', title='Stress Test Options')
783
784StressGroup = [
785 cfg.StrOpt('nova_logdir',
Matthew Treinish615ea6a2013-02-25 17:26:59 -0500786 help='Directory containing log files on the compute nodes'),
787 cfg.IntOpt('max_instances',
788 default=16,
789 help='Maximum number of instances to create during test.'),
790 cfg.StrOpt('controller',
David Kranzb9d97502013-05-01 15:55:04 -0400791 help='Controller host.'),
792 # new stress options
793 cfg.StrOpt('target_controller',
David Kranzb9d97502013-05-01 15:55:04 -0400794 help='Controller host.'),
795 cfg.StrOpt('target_ssh_user',
David Kranzb9d97502013-05-01 15:55:04 -0400796 help='ssh user.'),
797 cfg.StrOpt('target_private_key_path',
David Kranzb9d97502013-05-01 15:55:04 -0400798 help='Path to private key.'),
799 cfg.StrOpt('target_logfiles',
David Kranzb9d97502013-05-01 15:55:04 -0400800 help='regexp for list of log files.'),
Matthew Treinishf319a732013-10-24 21:39:24 +0000801 cfg.IntOpt('log_check_interval',
David Kranzb9d97502013-05-01 15:55:04 -0400802 default=60,
Marc Koderer32221b8e2013-08-23 13:57:50 +0200803 help='time (in seconds) between log file error checks.'),
Matthew Treinishf319a732013-10-24 21:39:24 +0000804 cfg.IntOpt('default_thread_number_per_action',
Marc Koderer32221b8e2013-08-23 13:57:50 +0200805 default=4,
Julien Leloup04d40f72014-01-28 11:17:18 +0100806 help='The number of threads created while stress test.'),
807 cfg.BoolOpt('leave_dirty_stack',
808 default=False,
809 help='Prevent the cleaning (tearDownClass()) between'
810 ' each stress test run if an exception occurs'
Julien Leloupa5ee5422014-02-13 14:29:02 +0100811 ' during this run.'),
812 cfg.BoolOpt('full_clean_stack',
813 default=False,
814 help='Allows a full cleaning process after a stress test.'
815 ' Caution : this cleanup will remove every objects of'
816 ' every tenant.')
Matthew Treinish615ea6a2013-02-25 17:26:59 -0500817]
818
819
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +0900820scenario_group = cfg.OptGroup(name='scenario', title='Scenario Test Options')
821
822ScenarioGroup = [
823 cfg.StrOpt('img_dir',
824 default='/opt/stack/new/devstack/files/images/'
825 'cirros-0.3.1-x86_64-uec',
826 help='Directory containing image files'),
Alessandro Pilottib7c1daa2014-08-16 14:24:13 +0300827 cfg.StrOpt('img_file', deprecated_name='qcow2_img_file',
Masayuki Igawa4f71bf02014-02-21 14:02:29 +0900828 default='cirros-0.3.1-x86_64-disk.img',
Alessandro Pilottib7c1daa2014-08-16 14:24:13 +0300829 help='Image file name'),
830 cfg.StrOpt('img_disk_format',
831 default='qcow2',
832 help='Image disk format'),
833 cfg.StrOpt('img_container_format',
834 default='bare',
835 help='Image container format'),
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +0900836 cfg.StrOpt('ami_img_file',
837 default='cirros-0.3.1-x86_64-blank.img',
838 help='AMI image file name'),
839 cfg.StrOpt('ari_img_file',
840 default='cirros-0.3.1-x86_64-initrd',
841 help='ARI image file name'),
842 cfg.StrOpt('aki_img_file',
843 default='cirros-0.3.1-x86_64-vmlinuz',
844 help='AKI image file name'),
845 cfg.StrOpt('ssh_user',
846 default='cirros',
Joe Gordonb5e10cd2013-07-10 15:51:12 +0000847 help='ssh username for the image file'),
848 cfg.IntOpt(
849 'large_ops_number',
850 default=0,
851 help="specifies how many resources to request at once. Used "
852 "for large operations testing.")
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +0900853]
854
855
Matthew Treinish4c412922013-07-16 15:27:42 -0400856service_available_group = cfg.OptGroup(name="service_available",
857 title="Available OpenStack Services")
858
859ServiceAvailableGroup = [
860 cfg.BoolOpt('cinder',
861 default=True,
862 help="Whether or not cinder is expected to be available"),
Matthew Treinishfaa340d2013-07-19 16:26:21 -0400863 cfg.BoolOpt('neutron',
864 default=False,
865 help="Whether or not neutron is expected to be available"),
Matthew Treinish853ae442013-07-19 16:36:07 -0400866 cfg.BoolOpt('glance',
867 default=True,
868 help="Whether or not glance is expected to be available"),
Matthew Treinish61e332b2013-07-19 16:42:31 -0400869 cfg.BoolOpt('swift',
870 default=True,
871 help="Whether or not swift is expected to be available"),
Matthew Treinish6b41e242013-07-19 16:49:28 -0400872 cfg.BoolOpt('nova',
873 default=True,
874 help="Whether or not nova is expected to be available"),
Matthew Treinisha9d43882013-07-19 16:54:52 -0400875 cfg.BoolOpt('heat',
876 default=False,
877 help="Whether or not Heat is expected to be available"),
Mehdi Abaakouk8581c0b2013-10-04 10:45:42 +0200878 cfg.BoolOpt('ceilometer',
879 default=True,
880 help="Whether or not Ceilometer is expected to be available"),
Julie Pichond1017642013-07-24 16:37:23 +0100881 cfg.BoolOpt('horizon',
882 default=True,
883 help="Whether or not Horizon is expected to be available"),
Sergey Lukjanov9c95a252014-03-13 23:59:22 +0400884 cfg.BoolOpt('sahara',
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +0400885 default=False,
Sergey Lukjanov9c95a252014-03-13 23:59:22 +0400886 help="Whether or not Sahara is expected to be available"),
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +0300887 cfg.BoolOpt('ironic',
888 default=False,
889 help="Whether or not Ironic is expected to be available"),
Nikhil Manchandadd6886f2014-03-03 01:58:45 -0800890 cfg.BoolOpt('trove',
891 default=False,
892 help="Whether or not Trove is expected to be available"),
Malini Kamalambal8681e922014-08-18 10:10:45 -0400893 cfg.BoolOpt('zaqar',
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500894 default=False,
Malini Kamalambal8681e922014-08-18 10:10:45 -0400895 help="Whether or not Zaqar is expected to be available"),
Matthew Treinish4c412922013-07-16 15:27:42 -0400896]
897
Attila Fazekasaeeeefd2013-08-06 17:01:56 +0200898debug_group = cfg.OptGroup(name="debug",
899 title="Debug System")
900
901DebugGroup = [
Sean Daguec522c092014-03-24 10:43:22 -0400902 cfg.StrOpt('trace_requests',
903 default='',
904 help="""A regex to determine which requests should be traced.
905
906This is a regex to match the caller for rest client requests to be able to
907selectively trace calls out of specific classes and methods. It largely
908exists for test development, and is not expected to be used in a real deploy
909of tempest. This will be matched against the discovered ClassName:method
910in the test environment.
911
912Expected values for this field are:
913
914 * ClassName:test_method_name - traces one test_method
915 * ClassName:setUp(Class) - traces specific setup functions
916 * ClassName:tearDown(Class) - traces specific teardown functions
917 * ClassName:_run_cleanups - traces the cleanup functions
918
919If nothing is specified, this feature is not enabled. To trace everything
920specify .* as the regex.
921""")
Attila Fazekasaeeeefd2013-08-06 17:01:56 +0200922]
923
Andrea Frittolif5da28b2013-12-06 07:08:07 +0000924input_scenario_group = cfg.OptGroup(name="input-scenario",
925 title="Filters and values for"
926 " input scenarios")
927
928InputScenarioGroup = [
929 cfg.StrOpt('image_regex',
930 default='^cirros-0.3.1-x86_64-uec$',
931 help="Matching images become parameters for scenario tests"),
932 cfg.StrOpt('flavor_regex',
Andrea Frittoli99901c02014-01-30 18:06:49 +0000933 default='^m1.nano$',
Andrea Frittolif5da28b2013-12-06 07:08:07 +0000934 help="Matching flavors become parameters for scenario tests"),
935 cfg.StrOpt('non_ssh_image_regex',
936 default='^.*[Ww]in.*$',
937 help="SSH verification in tests is skipped"
938 "for matching images"),
939 cfg.StrOpt('ssh_user_regex',
940 default="[[\"^.*[Cc]irros.*$\", \"root\"]]",
941 help="List of user mapped to regex "
942 "to matching image names."),
943]
944
Attila Fazekasaeeeefd2013-08-06 17:01:56 +0200945
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +0300946baremetal_group = cfg.OptGroup(name='baremetal',
Chris Hoge8f1401b2014-11-19 14:00:37 -0800947 title='Baremetal provisioning service options',
948 help='When enabling baremetal tests, Nova '
949 'must be configured to use the Ironic '
950 'driver. The following paremeters for the '
951 '[compute] section must be disabled: '
952 'console_output, interface_attach, '
953 'live_migration, pause, rescue, resize '
954 'shelve, snapshot, and suspend')
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +0300955
956BaremetalGroup = [
957 cfg.StrOpt('catalog_type',
958 default='baremetal',
Adam Gandelman4a48a602014-03-20 18:23:18 -0700959 help="Catalog type of the baremetal provisioning service"),
960 cfg.BoolOpt('driver_enabled',
961 default=False,
962 help="Whether the Ironic nova-compute driver is enabled"),
Yuiko Takada1ee1b322014-07-04 09:55:30 +0900963 cfg.StrOpt('driver',
964 default='fake',
965 help="Driver name which Ironic uses"),
JordanPfc62c902014-02-26 14:47:28 +0000966 cfg.StrOpt('endpoint_type',
967 default='publicURL',
968 choices=['public', 'admin', 'internal',
969 'publicURL', 'adminURL', 'internalURL'],
970 help="The endpoint type to use for the baremetal provisioning "
Adam Gandelman4a48a602014-03-20 18:23:18 -0700971 "service"),
972 cfg.IntOpt('active_timeout',
973 default=300,
974 help="Timeout for Ironic node to completely provision"),
975 cfg.IntOpt('association_timeout',
Adam Gandelmane42f0922014-06-10 15:26:37 -0700976 default=30,
Adam Gandelman4a48a602014-03-20 18:23:18 -0700977 help="Timeout for association of Nova instance and Ironic "
978 "node"),
979 cfg.IntOpt('power_timeout',
Adam Gandelmane42f0922014-06-10 15:26:37 -0700980 default=60,
Adam Gandelman4a48a602014-03-20 18:23:18 -0700981 help="Timeout for Ironic power transitions."),
982 cfg.IntOpt('unprovision_timeout',
Adam Gandelmane42f0922014-06-10 15:26:37 -0700983 default=60,
Adam Gandelman4a48a602014-03-20 18:23:18 -0700984 help="Timeout for unprovisioning an Ironic node.")
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +0300985]
986
Matthew Treinishe2b56b52014-01-29 19:25:50 +0000987cli_group = cfg.OptGroup(name='cli', title="cli Configuration Options")
988
989CLIGroup = [
990 cfg.BoolOpt('enabled',
991 default=True,
992 help="enable cli tests"),
993 cfg.StrOpt('cli_dir',
994 default='/usr/local/bin',
995 help="directory where python client binaries are located"),
Sean Dague44b24682014-02-20 19:08:24 -0500996 cfg.BoolOpt('has_manage',
997 default=True,
998 help=("Whether the tempest run location has access to the "
999 "*-manage commands. In a pure blackbox environment "
1000 "it will not.")),
Matthew Treinishe2b56b52014-01-29 19:25:50 +00001001 cfg.IntOpt('timeout',
1002 default=15,
1003 help="Number of seconds to wait on a CLI timeout"),
1004]
1005
Marc Koderer6ee82dc2014-02-17 10:26:29 +01001006negative_group = cfg.OptGroup(name='negative', title="Negative Test Options")
1007
1008NegativeGroup = [
1009 cfg.StrOpt('test_generator',
1010 default='tempest.common.' +
1011 'generator.negative_generator.NegativeTestGenerator',
1012 help="Test generator class for all negative tests"),
1013]
1014
Jon Grimm270bd7f2014-08-05 18:11:29 +00001015_opts = [
1016 (auth_group, AuthGroup),
1017 (compute_group, ComputeGroup),
1018 (compute_features_group, ComputeFeaturesGroup),
1019 (identity_group, IdentityGroup),
1020 (identity_feature_group, IdentityFeatureGroup),
1021 (image_group, ImageGroup),
1022 (image_feature_group, ImageFeaturesGroup),
1023 (network_group, NetworkGroup),
1024 (network_feature_group, NetworkFeaturesGroup),
1025 (messaging_group, MessagingGroup),
1026 (volume_group, VolumeGroup),
1027 (volume_feature_group, VolumeFeaturesGroup),
1028 (object_storage_group, ObjectStoreGroup),
1029 (object_storage_feature_group, ObjectStoreFeaturesGroup),
1030 (database_group, DatabaseGroup),
1031 (orchestration_group, OrchestrationGroup),
1032 (telemetry_group, TelemetryGroup),
1033 (dashboard_group, DashboardGroup),
1034 (data_processing_group, DataProcessingGroup),
1035 (boto_group, BotoGroup),
Jon Grimm270bd7f2014-08-05 18:11:29 +00001036 (stress_group, StressGroup),
1037 (scenario_group, ScenarioGroup),
1038 (service_available_group, ServiceAvailableGroup),
1039 (debug_group, DebugGroup),
1040 (baremetal_group, BaremetalGroup),
1041 (input_scenario_group, InputScenarioGroup),
1042 (cli_group, CLIGroup),
1043 (negative_group, NegativeGroup)
1044]
1045
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +03001046
Matthew Treinish43b296a2014-02-28 15:23:00 -05001047def register_opts():
Jon Grimm270bd7f2014-08-05 18:11:29 +00001048 for g, o in _opts:
1049 register_opt_group(cfg.CONF, g, o)
1050
1051
1052def list_opts():
1053 """Return a list of oslo.config options available.
1054
1055 The purpose of this is to allow tools like the Oslo sample config file
1056 generator to discover the options exposed to users.
1057 """
1058 optlist = [(g.name, o) for g, o in _opts]
1059
1060 # NOTE(jgrimm): Can be removed once oslo-incubator/oslo changes happen.
1061 optlist.append((None, lockutils.util_opts))
1062 optlist.append((None, logging.common_cli_opts))
1063 optlist.append((None, logging.logging_cli_opts))
1064 optlist.append((None, logging.generic_log_opts))
1065 optlist.append((None, logging.log_opts))
1066
1067 return optlist
Matthew Treinish43b296a2014-02-28 15:23:00 -05001068
1069
Sean Dague3b9b1f32013-12-20 17:04:54 -05001070# this should never be called outside of this class
1071class TempestConfigPrivate(object):
Daryl Walleck1465d612011-11-02 02:22:15 -05001072 """Provides OpenStack configuration information."""
1073
Brian Waldon738cd632011-12-12 18:45:09 -05001074 DEFAULT_CONFIG_DIR = os.path.join(
Zhongyue Luoa1343de2013-01-04 16:21:35 +08001075 os.path.abspath(os.path.dirname(os.path.dirname(__file__))),
Brian Waldon738cd632011-12-12 18:45:09 -05001076 "etc")
Daryl Walleck1465d612011-11-02 02:22:15 -05001077
Brian Waldon738cd632011-12-12 18:45:09 -05001078 DEFAULT_CONFIG_FILE = "tempest.conf"
1079
Andrea Frittolia96ee212014-08-15 18:34:20 +01001080 def __getattr__(self, attr):
1081 # Handles config options from the default group
1082 return getattr(cfg.CONF, attr)
1083
Matthew Treinish43b296a2014-02-28 15:23:00 -05001084 def _set_attrs(self):
Matthew Treinishc791ac42014-07-16 09:15:23 -04001085 self.auth = cfg.CONF.auth
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001086 self.compute = cfg.CONF.compute
Matthew Treinishd5c96022013-10-17 21:51:23 +00001087 self.compute_feature_enabled = cfg.CONF['compute-feature-enabled']
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001088 self.identity = cfg.CONF.identity
Matthew Treinishd5021a72014-01-09 18:42:51 +00001089 self.identity_feature_enabled = cfg.CONF['identity-feature-enabled']
Matt Riedemannd3efe902014-02-10 06:46:38 -08001090 self.image = cfg.CONF.image
Matthew Treinish2b5287d2013-10-22 17:40:34 +00001091 self.image_feature_enabled = cfg.CONF['image-feature-enabled']
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001092 self.network = cfg.CONF.network
Matthew Treinishe3d26142013-11-26 19:14:58 +00001093 self.network_feature_enabled = cfg.CONF['network-feature-enabled']
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001094 self.volume = cfg.CONF.volume
Matthew Treinishd5c96022013-10-17 21:51:23 +00001095 self.volume_feature_enabled = cfg.CONF['volume-feature-enabled']
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001096 self.object_storage = cfg.CONF['object-storage']
Matthew Treinishd5c96022013-10-17 21:51:23 +00001097 self.object_storage_feature_enabled = cfg.CONF[
1098 'object-storage-feature-enabled']
Nikhil Manchandadd6886f2014-03-03 01:58:45 -08001099 self.database = cfg.CONF.database
Steve Bakerc60e4e32013-05-06 15:22:41 +12001100 self.orchestration = cfg.CONF.orchestration
Victoria Martínez de la Cruz1173b6e2014-09-22 18:32:13 -03001101 self.messaging = cfg.CONF.messaging
Yassine Lamgarchalb158d412013-12-27 19:29:42 +01001102 self.telemetry = cfg.CONF.telemetry
Julie Pichond1017642013-07-24 16:37:23 +01001103 self.dashboard = cfg.CONF.dashboard
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +04001104 self.data_processing = cfg.CONF.data_processing
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001105 self.boto = cfg.CONF.boto
Matthew Treinish615ea6a2013-02-25 17:26:59 -05001106 self.stress = cfg.CONF.stress
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +09001107 self.scenario = cfg.CONF.scenario
Matthew Treinish4c412922013-07-16 15:27:42 -04001108 self.service_available = cfg.CONF.service_available
Attila Fazekas5fae7a32013-09-25 16:52:44 +02001109 self.debug = cfg.CONF.debug
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +03001110 self.baremetal = cfg.CONF.baremetal
Andrea Frittolif5da28b2013-12-06 07:08:07 +00001111 self.input_scenario = cfg.CONF['input-scenario']
Matthew Treinishe2b56b52014-01-29 19:25:50 +00001112 self.cli = cfg.CONF.cli
Marc Koderer6ee82dc2014-02-17 10:26:29 +01001113 self.negative = cfg.CONF.negative
Andrea Frittolib1b04bb2014-04-06 11:57:07 +01001114 cfg.CONF.set_default('domain_name', self.identity.admin_domain_name,
1115 group='identity')
1116 cfg.CONF.set_default('alt_domain_name',
1117 self.identity.admin_domain_name,
1118 group='identity')
Sean Dague86bd8422013-12-20 09:56:44 -05001119
Joe Gordon28a84ae2014-07-17 15:38:28 +00001120 def __init__(self, parse_conf=True, config_path=None):
Matthew Treinish43b296a2014-02-28 15:23:00 -05001121 """Initialize a configuration from a conf directory and conf file."""
1122 super(TempestConfigPrivate, self).__init__()
1123 config_files = []
1124 failsafe_path = "/etc/tempest/" + self.DEFAULT_CONFIG_FILE
1125
Joe Gordon28a84ae2014-07-17 15:38:28 +00001126 if config_path:
1127 path = config_path
1128 else:
1129 # Environment variables override defaults...
1130 conf_dir = os.environ.get('TEMPEST_CONFIG_DIR',
1131 self.DEFAULT_CONFIG_DIR)
1132 conf_file = os.environ.get('TEMPEST_CONFIG',
1133 self.DEFAULT_CONFIG_FILE)
Matthew Treinish43b296a2014-02-28 15:23:00 -05001134
Joe Gordon28a84ae2014-07-17 15:38:28 +00001135 path = os.path.join(conf_dir, conf_file)
Matthew Treinish43b296a2014-02-28 15:23:00 -05001136
1137 if not os.path.isfile(path):
1138 path = failsafe_path
1139
1140 # only parse the config file if we expect one to exist. This is needed
1141 # to remove an issue with the config file up to date checker.
1142 if parse_conf:
1143 config_files.append(path)
Matthew Treinish5440a402014-10-02 14:36:16 -04001144 if os.path.isfile(path):
1145 cfg.CONF([], project='tempest', default_config_files=config_files)
1146 else:
1147 cfg.CONF([], project='tempest')
Matthew Treinish43b296a2014-02-28 15:23:00 -05001148 logging.setup('tempest')
1149 LOG = logging.getLogger('tempest')
1150 LOG.info("Using tempest config file %s" % path)
1151 register_opts()
1152 self._set_attrs()
Masayuki Igawa9ec4cd82014-02-05 15:04:16 +09001153 if parse_conf:
1154 cfg.CONF.log_opt_values(LOG, std_logging.DEBUG)
1155
Sean Dague86bd8422013-12-20 09:56:44 -05001156
1157class TempestConfigProxy(object):
1158 _config = None
Joe Gordon28a84ae2014-07-17 15:38:28 +00001159 _path = None
Sean Dague86bd8422013-12-20 09:56:44 -05001160
Sean Daguedb6ac6c2014-06-06 16:52:44 -04001161 _extra_log_defaults = [
1162 'keystoneclient.session=INFO',
1163 'paramiko.transport=INFO',
1164 'requests.packages.urllib3.connectionpool=WARN'
1165 ]
1166
1167 def _fix_log_levels(self):
1168 """Tweak the oslo log defaults."""
1169 for opt in logging.log_opts:
1170 if opt.dest == 'default_log_levels':
1171 opt.default.extend(self._extra_log_defaults)
1172
Sean Dague86bd8422013-12-20 09:56:44 -05001173 def __getattr__(self, attr):
1174 if not self._config:
Sean Daguedb6ac6c2014-06-06 16:52:44 -04001175 self._fix_log_levels()
Joe Gordon28a84ae2014-07-17 15:38:28 +00001176 self._config = TempestConfigPrivate(config_path=self._path)
Sean Dague86bd8422013-12-20 09:56:44 -05001177
1178 return getattr(self._config, attr)
1179
Joe Gordon28a84ae2014-07-17 15:38:28 +00001180 def set_config_path(self, path):
1181 self._path = path
1182
Sean Dague86bd8422013-12-20 09:56:44 -05001183
1184CONF = TempestConfigProxy()