blob: c459d76afd30ed3df8250f39a89f2ccce2b078c3 [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
Doug Hellmann583ce2c2015-03-11 14:55:46 +000021from oslo_config import cfg
Matthew Treinish90aedd12013-02-25 17:56:49 -050022
Doug Hellmann583ce2c2015-03-11 14:55:46 +000023from oslo_log 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"),
Andrea Frittoli8283b4e2014-07-17 13:28:58 +010041 cfg.BoolOpt('allow_tenant_isolation',
Attila Fazekas5dda1582015-02-18 17:16:02 +010042 default=True,
Andrea Frittoli8283b4e2014-07-17 13:28:58 +010043 help="Allows test cases to create/destroy tenants and "
44 "users. This option requires that OpenStack Identity "
45 "API admin credentials are known. If false, isolated "
46 "test cases and parallel execution, can still be "
47 "achieved configuring a list of test accounts",
48 deprecated_opts=[cfg.DeprecatedOpt('allow_tenant_isolation',
49 group='compute'),
50 cfg.DeprecatedOpt('allow_tenant_isolation',
51 group='orchestration')]),
52 cfg.BoolOpt('locking_credentials_provider',
53 default=False,
54 help="If set to True it enables the Accounts provider, "
55 "which locks credentials to allow for parallel execution "
56 "with pre-provisioned accounts. It can only be used to "
57 "run tests that ensure credentials cleanup happens. "
58 "It requires at least `2 * CONC` distinct accounts "
59 "configured in `test_accounts_file`, with CONC == the "
60 "number of concurrent test processes."),
Matthew Treinish167b2be2015-01-15 17:20:27 -050061 cfg.ListOpt('tempest_roles',
62 help="Roles to assign to all users created by tempest",
63 default=[])
Matthew Treinishc791ac42014-07-16 09:15:23 -040064]
65
Matthew Treinish39e48ef2012-12-21 13:36:15 -050066identity_group = cfg.OptGroup(name='identity',
67 title="Keystone Configuration Options")
Daryl Walleck1465d612011-11-02 02:22:15 -050068
Matthew Treinish39e48ef2012-12-21 13:36:15 -050069IdentityGroup = [
70 cfg.StrOpt('catalog_type',
71 default='identity',
72 help="Catalog type of the Identity service."),
Jay Pipescd8eaec2013-01-16 21:03:48 -050073 cfg.BoolOpt('disable_ssl_certificate_validation',
74 default=False,
75 help="Set to True if using self-signed SSL certificates."),
Rob Crittendena7db6692014-11-23 18:44:38 -050076 cfg.StrOpt('ca_certificates_file',
77 default=None,
78 help='Specify a CA bundle file to use in verifying a '
79 'TLS (https) server certificate.'),
Jay Pipes7c88eb22013-01-16 21:32:43 -050080 cfg.StrOpt('uri',
Brant Knudsonc7ca3342013-03-28 21:08:50 -050081 help="Full URI of the OpenStack Identity API (Keystone), v2"),
82 cfg.StrOpt('uri_v3',
83 help='Full URI of the OpenStack Identity API (Keystone), v3'),
Andrea Frittoli8bbdb162014-01-06 11:06:13 +000084 cfg.StrOpt('auth_version',
85 default='v2',
86 help="Identity API version to be used for authentication "
Andrea Frittoli77f9da42014-02-06 11:18:19 +000087 "for API tests."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -050088 cfg.StrOpt('region',
Attila Fazekascadcb1f2013-01-21 23:10:53 +010089 default='RegionOne',
Arata Notsu8f440392013-09-13 16:14:20 +090090 help="The identity region name to use. Also used as the other "
91 "services' region name unless they are set explicitly. "
92 "If no such region is found in the service catalog, the "
93 "first found one is used."),
JordanP5d29b2c2013-12-18 13:56:03 +000094 cfg.StrOpt('endpoint_type',
95 default='publicURL',
96 choices=['public', 'admin', 'internal',
97 'publicURL', 'adminURL', 'internalURL'],
98 help="The endpoint type to use for the identity service."),
Attila Fazekascadcb1f2013-01-21 23:10:53 +010099 cfg.StrOpt('username',
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100100 help="Username to use for Nova API requests."),
101 cfg.StrOpt('tenant_name',
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100102 help="Tenant name to use for Nova API requests."),
Russell Sim7f894a52013-09-13 10:35:21 +1000103 cfg.StrOpt('admin_role',
104 default='admin',
105 help="Role required to administrate keystone."),
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100106 cfg.StrOpt('password',
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100107 help="API key to use when authenticating.",
108 secret=True),
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100109 cfg.StrOpt('domain_name',
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100110 help="Domain name for authentication (Keystone V3)."
111 "The same domain applies to user and project"),
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100112 cfg.StrOpt('alt_username',
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100113 help="Username of alternate user to use for Nova API "
114 "requests."),
115 cfg.StrOpt('alt_tenant_name',
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100116 help="Alternate user's Tenant name to use for Nova API "
117 "requests."),
118 cfg.StrOpt('alt_password',
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100119 help="API key to use when authenticating as alternate user.",
120 secret=True),
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100121 cfg.StrOpt('alt_domain_name',
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100122 help="Alternate domain name for authentication (Keystone V3)."
123 "The same domain applies to user and project"),
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100124 cfg.StrOpt('admin_username',
Dirk Mueller14bd5622014-01-14 19:33:05 +0100125 help="Administrative Username to use for "
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100126 "Keystone API requests."),
127 cfg.StrOpt('admin_tenant_name',
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100128 help="Administrative Tenant name to use for Keystone API "
129 "requests."),
130 cfg.StrOpt('admin_password',
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100131 help="API key to use when authenticating as admin.",
132 secret=True),
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100133 cfg.StrOpt('admin_domain_name',
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100134 help="Admin domain name for authentication (Keystone V3)."
135 "The same domain applies to user and project"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500136]
Jay Pipes3f981df2012-03-27 18:59:44 -0400137
Matthew Treinishd5021a72014-01-09 18:42:51 +0000138identity_feature_group = cfg.OptGroup(name='identity-feature-enabled',
139 title='Enabled Identity Features')
140
141IdentityFeatureGroup = [
142 cfg.BoolOpt('trust',
143 default=True,
144 help='Does the identity service have delegation and '
Matthew Treinishdb2c5972014-01-31 22:18:59 +0000145 'impersonation enabled'),
146 cfg.BoolOpt('api_v2',
147 default=True,
148 help='Is the v2 identity API enabled'),
149 cfg.BoolOpt('api_v3',
150 default=True,
151 help='Is the v3 identity API enabled'),
Matthew Treinishd5021a72014-01-09 18:42:51 +0000152]
153
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500154compute_group = cfg.OptGroup(name='compute',
155 title='Compute Service Options')
Rohit Karajgie1b050d2011-12-02 16:13:18 -0800156
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500157ComputeGroup = [
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500158 cfg.StrOpt('image_ref',
Matthew Treinishafcb6b42014-05-27 13:50:02 -0400159 help="Valid primary image reference to be used in tests. "
160 "This is a required option"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500161 cfg.StrOpt('image_ref_alt',
Matthew Treinishafcb6b42014-05-27 13:50:02 -0400162 help="Valid secondary image reference to be used in tests. "
163 "This is a required option, but if only one image is "
164 "available duplicate the value of image_ref above"),
Ken'ichi Ohmichi35772602013-11-14 15:03:27 +0900165 cfg.StrOpt('flavor_ref',
166 default="1",
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500167 help="Valid primary flavor to use in tests."),
Ken'ichi Ohmichi35772602013-11-14 15:03:27 +0900168 cfg.StrOpt('flavor_ref_alt',
169 default="2",
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500170 help='Valid secondary flavor to be used in tests.'),
Maru Newbyaf292e82013-05-20 21:32:28 +0000171 cfg.StrOpt('image_ssh_user',
172 default="root",
173 help="User name used to authenticate to an instance."),
Ryan Hsucb2e1252013-09-03 21:44:49 -0700174 cfg.StrOpt('image_ssh_password',
175 default="password",
176 help="Password used to authenticate to an instance."),
Maru Newbyaf292e82013-05-20 21:32:28 +0000177 cfg.StrOpt('image_alt_ssh_user',
178 default="root",
179 help="User name used to authenticate to an instance using "
180 "the alternate image."),
Ryan Hsucb2e1252013-09-03 21:44:49 -0700181 cfg.StrOpt('image_alt_ssh_password',
182 default="password",
183 help="Password used to authenticate to an instance using "
184 "the alternate image."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500185 cfg.IntOpt('build_interval',
Sean Dague82190852014-05-24 07:42:59 -0400186 default=1,
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500187 help="Time in seconds between build status checks."),
188 cfg.IntOpt('build_timeout',
189 default=300,
Hugh Saunders5b139ad2014-12-15 09:08:41 +0000190 help="Timeout in seconds to wait for an instance to build. "
191 "Other services that do not define build_timeout will "
Lucian Petrut1cfe2982015-01-06 13:57:36 +0200192 "inherit this value."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500193 cfg.BoolOpt('run_ssh',
194 default=False,
Derek Higgins85cd5142013-12-17 17:10:11 +0000195 help="Should the tests ssh to instances?"),
Attila Fazekas423834d2014-03-14 17:33:13 +0100196 cfg.StrOpt('ssh_auth_method',
197 default='keypair',
198 help="Auth method used for authenticate to the instance. "
199 "Valid choices are: keypair, configured, adminpass. "
200 "keypair: start the servers with an ssh keypair. "
201 "configured: use the configured user and password. "
202 "adminpass: use the injected adminPass. "
203 "disabled: avoid using ssh when it is an option."),
204 cfg.StrOpt('ssh_connect_method',
205 default='fixed',
206 help="How to connect to the instance? "
207 "fixed: using the first ip belongs the fixed network "
208 "floating: creating and using a floating ip"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500209 cfg.StrOpt('ssh_user',
210 default='root',
211 help="User name used to authenticate to an instance."),
Nachi Ueno6d580be2013-07-24 10:58:11 -0700212 cfg.IntOpt('ping_timeout',
Darragh O'Reilly6b636672014-01-24 12:17:40 +0000213 default=120,
Nachi Ueno6d580be2013-07-24 10:58:11 -0700214 help="Timeout in seconds to wait for ping to "
215 "succeed."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500216 cfg.IntOpt('ssh_timeout',
217 default=300,
Chris Yeoh76916042013-02-27 16:25:25 +1030218 help="Timeout in seconds to wait for authentication to "
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500219 "succeed."),
Attila Fazekas0abbc952013-07-01 19:19:42 +0200220 cfg.IntOpt('ready_wait',
221 default=0,
DennyZhang8912d012013-09-25 18:08:34 -0500222 help="Additional wait time for clean state, when there is "
223 "no OS-EXT-STS extension available"),
Chris Yeoh76916042013-02-27 16:25:25 +1030224 cfg.IntOpt('ssh_channel_timeout',
225 default=60,
226 help="Timeout in seconds to wait for output from ssh "
227 "channel."),
Attila Fazekasb0661652013-05-08 13:01:36 +0200228 cfg.StrOpt('fixed_network_name',
229 default='private',
Chris Hoge8f1401b2014-11-19 14:00:37 -0800230 help="Name of the fixed network that is visible to all test "
231 "tenants."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500232 cfg.StrOpt('network_for_ssh',
233 default='public',
Chris Hoge8f1401b2014-11-19 14:00:37 -0800234 help="Network used for SSH connections. Ignored if "
235 "use_floatingip_for_ssh=true or run_ssh=false."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500236 cfg.IntOpt('ip_version_for_ssh',
237 default=4,
238 help="IP version used for SSH connections."),
fujioka yuuichia11994e2013-07-09 11:19:51 +0900239 cfg.BoolOpt('use_floatingip_for_ssh',
240 default=True,
Tushar Kalra95a482d2014-03-25 14:24:43 -0700241 help="Does SSH use Floating IPs?"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500242 cfg.StrOpt('catalog_type',
243 default='compute',
244 help="Catalog type of the Compute service."),
Arata Notsu8f440392013-09-13 16:14:20 +0900245 cfg.StrOpt('region',
246 default='',
247 help="The compute region name to use. If empty, the value "
248 "of identity.region is used instead. If no such region "
249 "is found in the service catalog, the first found one is "
250 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000251 cfg.StrOpt('endpoint_type',
252 default='publicURL',
253 choices=['public', 'admin', 'internal',
254 'publicURL', 'adminURL', 'internalURL'],
255 help="The endpoint type to use for the compute service."),
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100256 cfg.StrOpt('path_to_private_key',
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100257 help="Path to a private key file for SSH access to remote "
258 "hosts"),
Ryan Hsucb2e1252013-09-03 21:44:49 -0700259 cfg.StrOpt('volume_device_name',
260 default='vdb',
261 help="Expected device name when a volume is attached to "
Ken'ichi Ohmichi39437e22013-10-06 00:21:38 +0900262 "an instance"),
263 cfg.IntOpt('shelved_offload_time',
264 default=0,
265 help='Time in seconds before a shelved instance is eligible '
266 'for removing from a host. -1 never offload, 0 offload '
267 'when shelved. This time should be the same as the time '
268 'of nova.conf, and some tests will run for as long as the '
Ghanshyam06a5b4a2014-04-11 17:32:45 +0900269 'time.'),
270 cfg.StrOpt('floating_ip_range',
271 default='10.0.0.0/29',
272 help='Unallocated floating IP range, which will be used to '
Chris Hoge8f1401b2014-11-19 14:00:37 -0800273 'test the floating IP bulk feature for CRUD operation. '
274 'This block must not overlap an existing floating IP '
275 'pool.')
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500276]
Rohit Karajgie1b050d2011-12-02 16:13:18 -0800277
Matthew Treinishd5c96022013-10-17 21:51:23 +0000278compute_features_group = cfg.OptGroup(name='compute-feature-enabled',
279 title="Enabled Compute Service Features")
280
281ComputeFeaturesGroup = [
282 cfg.BoolOpt('disk_config',
283 default=True,
284 help="If false, skip disk config tests"),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000285 cfg.ListOpt('api_extensions',
286 default=['all'],
Zhi Kun Liude25c022014-02-14 13:25:19 +0800287 help='A list of enabled compute extensions with a special '
Ken'ichi Ohmichia7e68712014-05-06 10:47:26 +0900288 'entry all which indicates every extension is enabled. '
Simeon Monov5d7effe2014-07-16 07:32:38 +0300289 'Each extension should be specified with alias name. '
290 'Empty list indicates all extensions are disabled'),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000291 cfg.BoolOpt('change_password',
292 default=False,
293 help="Does the test environment support changing the admin "
294 "password?"),
Adam Gandelmanc6eefb42014-07-15 16:44:08 -0700295 cfg.BoolOpt('console_output',
296 default=True,
297 help="Does the test environment support obtaining instance "
298 "serial console output?"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000299 cfg.BoolOpt('resize',
300 default=False,
301 help="Does the test environment support resizing?"),
Eric Windischb5538072014-03-09 23:47:35 -0400302 cfg.BoolOpt('pause',
303 default=True,
304 help="Does the test environment support pausing?"),
David Shrewsbury25f666f2014-07-22 12:17:59 -0400305 cfg.BoolOpt('shelve',
306 default=True,
307 help="Does the test environment support shelving/unshelving?"),
Eric Windischaeb7e842014-03-10 01:10:50 -0400308 cfg.BoolOpt('suspend',
309 default=True,
310 help="Does the test environment support suspend/resume?"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000311 cfg.BoolOpt('live_migration',
Joe Gordon31a139a2014-11-17 16:39:04 -0800312 default=True,
Matthew Treinishd5c96022013-10-17 21:51:23 +0000313 help="Does the test environment support live migration "
314 "available?"),
315 cfg.BoolOpt('block_migration_for_live_migration',
316 default=False,
317 help="Does the test environment use block devices for live "
318 "migration"),
319 cfg.BoolOpt('block_migrate_cinder_iscsi',
320 default=False,
321 help="Does the test environment block migration support "
Ghanshyam Mann41c17572014-02-27 18:52:56 +0900322 "cinder iSCSI volumes"),
323 cfg.BoolOpt('vnc_console',
324 default=False,
325 help='Enable VNC console. This configuration value should '
Ghanshyam70876d02014-03-11 11:40:18 +0900326 'be same as [nova.vnc]->vnc_enabled in nova.conf'),
327 cfg.BoolOpt('spice_console',
328 default=False,
329 help='Enable Spice console. This configuration value should '
330 'be same as [nova.spice]->enabled in nova.conf'),
331 cfg.BoolOpt('rdp_console',
332 default=False,
333 help='Enable RDP console. This configuration value should '
Adam Gandelman2e37b4f2014-06-18 17:34:21 -0700334 'be same as [nova.rdp]->enabled in nova.conf'),
335 cfg.BoolOpt('rescue',
336 default=True,
337 help='Does the test environment support instance rescue '
Ghanshyam9c2e50d2014-07-22 21:32:05 +0900338 'mode?'),
339 cfg.BoolOpt('enable_instance_password',
340 default=True,
341 help='Enables returning of the instance password by the '
342 'relevant server API calls such as create, rebuild '
Adam Gandelman7186f7a2014-07-23 09:28:56 -0400343 'or rescue.'),
344 cfg.BoolOpt('interface_attach',
345 default=True,
346 help='Does the test environment support dynamic network '
Adam Gandelmanfbc95ac2014-06-19 17:33:43 -0700347 'interface attachment?'),
348 cfg.BoolOpt('snapshot',
349 default=True,
350 help='Does the test environment support creating snapshot '
Matthew Treinishdfd7ac02015-02-09 17:47:31 -0500351 'images of running instances?'),
352 cfg.BoolOpt('ec2_api',
353 default=True,
354 help='Does the test environment have the ec2 api running?')
Matthew Treinishd5c96022013-10-17 21:51:23 +0000355]
356
357
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500358image_group = cfg.OptGroup(name='image',
359 title="Image Service Options")
Jay Pipesf38eaac2012-06-21 13:37:35 -0400360
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500361ImageGroup = [
Matthew Treinish72ea4422013-02-07 14:42:49 -0500362 cfg.StrOpt('catalog_type',
363 default='image',
Sean Dague83401992013-05-06 17:46:36 -0400364 help='Catalog type of the Image service.'),
Arata Notsu8f440392013-09-13 16:14:20 +0900365 cfg.StrOpt('region',
366 default='',
367 help="The image region name to use. If empty, the value "
368 "of identity.region is used instead. If no such region "
369 "is found in the service catalog, the first found one is "
370 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000371 cfg.StrOpt('endpoint_type',
372 default='publicURL',
373 choices=['public', 'admin', 'internal',
374 'publicURL', 'adminURL', 'internalURL'],
375 help="The endpoint type to use for the image service."),
Sean Dague83401992013-05-06 17:46:36 -0400376 cfg.StrOpt('http_image',
377 default='http://download.cirros-cloud.net/0.3.1/'
378 'cirros-0.3.1-x86_64-uec.tar.gz',
Lucian Petrut1cfe2982015-01-06 13:57:36 +0200379 help='http accessible image'),
380 cfg.IntOpt('build_timeout',
381 default=300,
382 help="Timeout in seconds to wait for an image to "
383 "become available."),
384 cfg.IntOpt('build_interval',
385 default=1,
386 help="Time in seconds between image operation status "
387 "checks.")
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500388]
Jay Pipesf38eaac2012-06-21 13:37:35 -0400389
Matthew Treinish2b5287d2013-10-22 17:40:34 +0000390image_feature_group = cfg.OptGroup(name='image-feature-enabled',
391 title='Enabled image service features')
392
393ImageFeaturesGroup = [
394 cfg.BoolOpt('api_v2',
395 default=True,
396 help="Is the v2 image API enabled"),
397 cfg.BoolOpt('api_v1',
398 default=True,
399 help="Is the v1 image API enabled"),
400]
Jay Pipesf38eaac2012-06-21 13:37:35 -0400401
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500402network_group = cfg.OptGroup(name='network',
403 title='Network Service Options')
Daryl Walleck587385b2012-03-03 13:00:26 -0600404
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500405NetworkGroup = [
406 cfg.StrOpt('catalog_type',
407 default='network',
Mark McClainf2982e82013-07-06 17:48:03 -0400408 help='Catalog type of the Neutron service.'),
Arata Notsu8f440392013-09-13 16:14:20 +0900409 cfg.StrOpt('region',
410 default='',
411 help="The network region name to use. If empty, the value "
412 "of identity.region is used instead. If no such region "
413 "is found in the service catalog, the first found one is "
414 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000415 cfg.StrOpt('endpoint_type',
416 default='publicURL',
417 choices=['public', 'admin', 'internal',
418 'publicURL', 'adminURL', 'internalURL'],
419 help="The endpoint type to use for the network service."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500420 cfg.StrOpt('tenant_network_cidr',
421 default="10.100.0.0/16",
Henry Gessauffda37a2014-01-16 11:17:55 -0500422 help="The cidr block to allocate tenant ipv4 subnets from"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500423 cfg.IntOpt('tenant_network_mask_bits',
Attila Fazekas8ea181b2013-07-13 16:26:14 +0200424 default=28,
Henry Gessauffda37a2014-01-16 11:17:55 -0500425 help="The mask bits for tenant ipv4 subnets"),
426 cfg.StrOpt('tenant_network_v6_cidr',
Sergey Shnaidman1f3659a2014-08-27 18:26:42 +0400427 default="2003::/48",
Henry Gessauffda37a2014-01-16 11:17:55 -0500428 help="The cidr block to allocate tenant ipv6 subnets from"),
429 cfg.IntOpt('tenant_network_v6_mask_bits',
Sergey Shnaidman1f3659a2014-08-27 18:26:42 +0400430 default=64,
Henry Gessauffda37a2014-01-16 11:17:55 -0500431 help="The mask bits for tenant ipv6 subnets"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500432 cfg.BoolOpt('tenant_networks_reachable',
433 default=False,
434 help="Whether tenant network connectivity should be "
435 "evaluated directly"),
436 cfg.StrOpt('public_network_id',
437 default="",
438 help="Id of the public network that provides external "
439 "connectivity"),
440 cfg.StrOpt('public_router_id',
441 default="",
442 help="Id of the public router that provides external "
Yair Fried1eb27f52014-11-10 15:24:19 +0200443 "connectivity. This should only be used when Neutron's "
444 "'allow_overlapping_ips' is set to 'False' in "
445 "neutron.conf. usually not needed past 'Grizzly' release"),
izikpensod9a01a62014-02-17 20:02:32 +0200446 cfg.IntOpt('build_timeout',
447 default=300,
448 help="Timeout in seconds to wait for network operation to "
449 "complete."),
450 cfg.IntOpt('build_interval',
Sean Dague82190852014-05-24 07:42:59 -0400451 default=1,
izikpensod9a01a62014-02-17 20:02:32 +0200452 help="Time in seconds between network operation status "
453 "checks."),
Attila Fazekas640392b2014-06-12 15:58:10 +0200454 cfg.ListOpt('dns_servers',
455 default=["8.8.8.8", "8.8.4.4"],
Itzik Brown5be44582014-12-24 09:05:13 +0200456 help="List of dns servers which should be used"
Itzik Brown2ca01cd2014-12-08 12:58:20 +0200457 " for subnet creation"),
458 cfg.StrOpt('port_vnic_type',
459 choices=[None, 'normal', 'direct', 'macvtap'],
460 help="vnic_type to use when Launching instances"
461 " with pre-configured ports."
462 " Supported ports are:"
463 " ['normal','direct','macvtap']"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500464]
Jay Pipes3f981df2012-03-27 18:59:44 -0400465
Matthew Treinishe3d26142013-11-26 19:14:58 +0000466network_feature_group = cfg.OptGroup(name='network-feature-enabled',
467 title='Enabled network service features')
468
469NetworkFeaturesGroup = [
Matthew Treinishe2e33cf2014-03-03 19:28:41 +0000470 cfg.BoolOpt('ipv6',
471 default=True,
472 help="Allow the execution of IPv6 tests"),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000473 cfg.ListOpt('api_extensions',
474 default=['all'],
Zhi Kun Liude25c022014-02-14 13:25:19 +0800475 help='A list of enabled network extensions with a special '
Simeon Monov5d7effe2014-07-16 07:32:38 +0300476 'entry all which indicates every extension is enabled. '
477 'Empty list indicates all extensions are disabled'),
Sean M. Collinsdd27a4d2014-05-13 10:33:15 -0400478 cfg.BoolOpt('ipv6_subnet_attributes',
479 default=False,
480 help="Allow the execution of IPv6 subnet tests that use "
481 "the extended IPv6 attributes ipv6_ra_mode "
482 "and ipv6_address_mode"
Mark McClain6e07c0d2014-10-10 11:25:03 -0400483 ),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000484]
485
Victoria Martínez de la Cruz1173b6e2014-09-22 18:32:13 -0300486messaging_group = cfg.OptGroup(name='messaging',
487 title='Messaging Service')
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500488
Victoria Martínez de la Cruz1173b6e2014-09-22 18:32:13 -0300489MessagingGroup = [
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500490 cfg.StrOpt('catalog_type',
Victoria Martínez de la Cruz1173b6e2014-09-22 18:32:13 -0300491 default='messaging',
492 help='Catalog type of the Messaging service.'),
Jorge Chai83ba4ee2014-04-15 18:58:08 +0000493 cfg.IntOpt('max_queues_per_page',
494 default=20,
495 help='The maximum number of queue records per page when '
496 'listing queues'),
Malini Kamalambal7458b4b2014-05-29 11:47:28 -0400497 cfg.IntOpt('max_queue_metadata',
498 default=65536,
499 help='The maximum metadata size for a queue'),
500 cfg.IntOpt('max_messages_per_page',
501 default=20,
502 help='The maximum number of queue message per page when '
503 'listing (or) posting messages'),
504 cfg.IntOpt('max_message_size',
505 default=262144,
506 help='The maximum size of a message body'),
507 cfg.IntOpt('max_messages_per_claim',
508 default=20,
509 help='The maximum number of messages per claim'),
510 cfg.IntOpt('max_message_ttl',
511 default=1209600,
512 help='The maximum ttl for a message'),
513 cfg.IntOpt('max_claim_ttl',
514 default=43200,
515 help='The maximum ttl for a claim'),
516 cfg.IntOpt('max_claim_grace',
517 default=43200,
518 help='The maximum grace period for a claim'),
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500519]
520
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500521volume_group = cfg.OptGroup(name='volume',
522 title='Block Storage Options')
Daryl Walleck587385b2012-03-03 13:00:26 -0600523
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500524VolumeGroup = [
525 cfg.IntOpt('build_interval',
Sean Dague82190852014-05-24 07:42:59 -0400526 default=1,
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500527 help='Time in seconds between volume availability checks.'),
528 cfg.IntOpt('build_timeout',
529 default=300,
Eric Harney9b1f89c2014-10-14 14:40:19 -0400530 help='Timeout in seconds to wait for a volume to become '
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500531 'available.'),
532 cfg.StrOpt('catalog_type',
Matthew Treinisheb724512013-10-25 15:12:59 +0000533 default='volume',
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500534 help="Catalog type of the Volume Service"),
Arata Notsu8f440392013-09-13 16:14:20 +0900535 cfg.StrOpt('region',
536 default='',
537 help="The volume region name to use. If empty, the value "
538 "of identity.region is used instead. If no such region "
539 "is found in the service catalog, the first found one is "
540 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000541 cfg.StrOpt('endpoint_type',
542 default='publicURL',
543 choices=['public', 'admin', 'internal',
544 'publicURL', 'adminURL', 'internalURL'],
545 help="The endpoint type to use for the volume service."),
Jérôme Gallard86551ce2013-03-08 11:41:26 +0100546 cfg.StrOpt('backend1_name',
Giulio Fidentef4fa8942013-05-28 18:48:03 +0200547 default='BACKEND_1',
Jérôme Gallard86551ce2013-03-08 11:41:26 +0100548 help="Name of the backend1 (must be declared in cinder.conf)"),
549 cfg.StrOpt('backend2_name',
Giulio Fidentef4fa8942013-05-28 18:48:03 +0200550 default='BACKEND_2',
Jérôme Gallard86551ce2013-03-08 11:41:26 +0100551 help="Name of the backend2 (must be declared in cinder.conf)"),
Adam Gandelman827ad332013-06-24 17:04:09 -0700552 cfg.StrOpt('storage_protocol',
553 default='iSCSI',
554 help='Backend protocol to target when creating volume types'),
555 cfg.StrOpt('vendor_name',
556 default='Open Source',
557 help='Backend vendor to target when creating volume types'),
Ryan Hsua67f4632013-08-29 16:03:06 -0700558 cfg.StrOpt('disk_format',
559 default='raw',
560 help='Disk format to use when copying a volume to image'),
Jerry Cai9733d0e2014-03-19 15:50:49 +0800561 cfg.IntOpt('volume_size',
562 default=1,
563 help='Default size in GB for volumes created by volumes tests'),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500564]
K Jonathan Harkerd6ba4b42012-12-18 13:50:47 -0800565
Matthew Treinishd5c96022013-10-17 21:51:23 +0000566volume_feature_group = cfg.OptGroup(name='volume-feature-enabled',
567 title='Enabled Cinder Features')
568
569VolumeFeaturesGroup = [
570 cfg.BoolOpt('multi_backend',
571 default=False,
Matthew Treinishe3d26142013-11-26 19:14:58 +0000572 help="Runs Cinder multi-backend test (requires 2 backends)"),
Giulio Fidente74b08ad2014-01-18 04:02:51 +0100573 cfg.BoolOpt('backup',
574 default=True,
575 help='Runs Cinder volumes backup test'),
JordanPbce55532014-03-19 12:10:32 +0100576 cfg.BoolOpt('snapshot',
577 default=True,
578 help='Runs Cinder volume snapshot test'),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000579 cfg.ListOpt('api_extensions',
580 default=['all'],
Zhi Kun Liude25c022014-02-14 13:25:19 +0800581 help='A list of enabled volume extensions with a special '
Simeon Monov5d7effe2014-07-16 07:32:38 +0300582 'entry all which indicates every extension is enabled. '
583 'Empty list indicates all extensions are disabled'),
Zhi Kun Liubb363a22013-11-28 18:47:39 +0800584 cfg.BoolOpt('api_v1',
585 default=True,
586 help="Is the v1 volume API enabled"),
Zhi Kun Liu8cc3c842014-01-07 10:44:34 +0800587 cfg.BoolOpt('api_v2',
588 default=True,
589 help="Is the v2 volume API enabled"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000590]
591
Daryl Walleck587385b2012-03-03 13:00:26 -0600592
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500593object_storage_group = cfg.OptGroup(name='object-storage',
594 title='Object Storage Service Options')
Attila Fazekasa23f5002012-10-23 19:32:45 +0200595
DennyZhang1e71b612013-09-26 12:35:40 -0500596ObjectStoreGroup = [
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500597 cfg.StrOpt('catalog_type',
598 default='object-store',
599 help="Catalog type of the Object-Storage service."),
Arata Notsu8f440392013-09-13 16:14:20 +0900600 cfg.StrOpt('region',
601 default='',
602 help="The object-storage region name to use. If empty, the "
603 "value of identity.region is used instead. If no such "
604 "region is found in the service catalog, the first found "
605 "one is used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000606 cfg.StrOpt('endpoint_type',
607 default='publicURL',
608 choices=['public', 'admin', 'internal',
609 'publicURL', 'adminURL', 'internalURL'],
610 help="The endpoint type to use for the object-store service."),
Matthew Treinishf319a732013-10-24 21:39:24 +0000611 cfg.IntOpt('container_sync_timeout',
Daisuke Morita1ac3ee02014-08-25 12:59:18 +0900612 default=600,
Fabien Boucher2178d312013-12-31 15:38:57 +0100613 help="Number of seconds to time on waiting for a container "
nayna-patelb4989b32013-01-09 06:25:13 +0000614 "to container synchronization complete."),
Matthew Treinishf319a732013-10-24 21:39:24 +0000615 cfg.IntOpt('container_sync_interval',
nayna-patelb4989b32013-01-09 06:25:13 +0000616 default=5,
Fabien Boucher2178d312013-12-31 15:38:57 +0100617 help="Number of seconds to wait while looping to check the "
nayna-patelb4989b32013-01-09 06:25:13 +0000618 "status of a container to container synchronization"),
Matthew Treinish3fdb80c2013-08-15 11:13:19 -0400619 cfg.StrOpt('operator_role',
620 default='Member',
621 help="Role to add to users created for swift tests to "
622 "enable creating containers"),
Matthew Treinish998c91d2014-03-01 12:39:49 -0500623 cfg.StrOpt('reseller_admin_role',
624 default='ResellerAdmin',
625 help="User role that has reseller admin"),
Daisuke Morita1ac3ee02014-08-25 12:59:18 +0900626 cfg.StrOpt('realm_name',
627 default='realm1',
628 help="Name of sync realm. A sync realm is a set of clusters "
629 "that have agreed to allow container syncing with each "
630 "other. Set the same realm name as Swift's "
631 "container-sync-realms.conf"),
632 cfg.StrOpt('cluster_name',
633 default='name1',
634 help="One name of cluster which is set in the realm whose name "
635 "is set in 'realm_name' item in this file. Set the "
636 "same cluster name as Swift's container-sync-realms.conf"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500637]
Attila Fazekasa23f5002012-10-23 19:32:45 +0200638
Matthew Treinishd5c96022013-10-17 21:51:23 +0000639object_storage_feature_group = cfg.OptGroup(
640 name='object-storage-feature-enabled',
641 title='Enabled object-storage features')
642
643ObjectStoreFeaturesGroup = [
Matthew Treinish20345382013-12-13 17:04:23 +0000644 cfg.ListOpt('discoverable_apis',
645 default=['all'],
646 help="A list of the enabled optional discoverable apis. "
647 "A single entry, all, indicates that all of these "
648 "features are expected to be enabled"),
Daisuke Morita20a183f2014-08-25 14:43:36 +0900649 cfg.BoolOpt('container_sync',
650 default=True,
651 help="Execute (old style) container-sync tests"),
652 cfg.BoolOpt('object_versioning',
653 default=True,
654 help="Execute object-versioning tests"),
655 cfg.BoolOpt('discoverability',
656 default=True,
657 help="Execute discoverability tests"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000658]
659
Nikhil Manchandadd6886f2014-03-03 01:58:45 -0800660database_group = cfg.OptGroup(name='database',
661 title='Database Service Options')
662
663DatabaseGroup = [
664 cfg.StrOpt('catalog_type',
665 default='database',
666 help="Catalog type of the Database service."),
667 cfg.StrOpt('db_flavor_ref',
668 default="1",
669 help="Valid primary flavor to use in database tests."),
Peter Stachowski320f9c72014-04-21 16:13:23 -0400670 cfg.StrOpt('db_current_version',
671 default="v1.0",
672 help="Current database version to use in database tests."),
Nikhil Manchandadd6886f2014-03-03 01:58:45 -0800673]
Attila Fazekasa23f5002012-10-23 19:32:45 +0200674
Steve Bakerc60e4e32013-05-06 15:22:41 +1200675orchestration_group = cfg.OptGroup(name='orchestration',
676 title='Orchestration Service Options')
677
678OrchestrationGroup = [
679 cfg.StrOpt('catalog_type',
680 default='orchestration',
681 help="Catalog type of the Orchestration service."),
Arata Notsu8f440392013-09-13 16:14:20 +0900682 cfg.StrOpt('region',
683 default='',
684 help="The orchestration region name to use. If empty, the "
685 "value of identity.region is used instead. If no such "
686 "region is found in the service catalog, the first found "
687 "one is used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000688 cfg.StrOpt('endpoint_type',
689 default='publicURL',
690 choices=['public', 'admin', 'internal',
691 'publicURL', 'adminURL', 'internalURL'],
692 help="The endpoint type to use for the orchestration service."),
Steve Bakerc60e4e32013-05-06 15:22:41 +1200693 cfg.IntOpt('build_interval',
694 default=1,
695 help="Time in seconds between build status checks."),
696 cfg.IntOpt('build_timeout',
Matthew Treinisha2dfd492014-04-15 11:15:34 -0400697 default=1200,
Steve Bakerc60e4e32013-05-06 15:22:41 +1200698 help="Timeout in seconds to wait for a stack to build."),
Steve Bakerc60e4e32013-05-06 15:22:41 +1200699 cfg.StrOpt('instance_type',
Steve Baker9e86b832013-05-22 15:40:28 +1200700 default='m1.micro',
Steve Bakerc60e4e32013-05-06 15:22:41 +1200701 help="Instance type for tests. Needs to be big enough for a "
702 "full OS plus the test workload"),
Steve Bakerc60e4e32013-05-06 15:22:41 +1200703 cfg.StrOpt('keypair_name',
Steve Bakerc60e4e32013-05-06 15:22:41 +1200704 help="Name of existing keypair to launch servers with."),
Clint Byrum71f27632013-09-09 11:41:32 -0700705 cfg.IntOpt('max_template_size',
Joe Gordon0e51b222013-10-24 14:11:10 +0100706 default=524288,
Clint Byrum71f27632013-09-09 11:41:32 -0700707 help="Value must match heat configuration of the same name."),
Steven Hardyfdc6bd72014-03-21 16:56:04 +0000708 cfg.IntOpt('max_resources_per_stack',
709 default=1000,
710 help="Value must match heat configuration of the same name."),
Steve Bakerc60e4e32013-05-06 15:22:41 +1200711]
712
713
Yassine Lamgarchalb158d412013-12-27 19:29:42 +0100714telemetry_group = cfg.OptGroup(name='telemetry',
715 title='Telemetry Service Options')
716
717TelemetryGroup = [
718 cfg.StrOpt('catalog_type',
719 default='metering',
720 help="Catalog type of the Telemetry service."),
JordanPfc62c902014-02-26 14:47:28 +0000721 cfg.StrOpt('endpoint_type',
722 default='publicURL',
723 choices=['public', 'admin', 'internal',
724 'publicURL', 'adminURL', 'internalURL'],
725 help="The endpoint type to use for the telemetry service."),
Vadim Rovachev7bcea352013-12-26 15:56:17 +0400726 cfg.BoolOpt('too_slow_to_test',
727 default=True,
728 help="This variable is used as flag to enable "
729 "notification tests")
Yassine Lamgarchalb158d412013-12-27 19:29:42 +0100730]
731
732
Julie Pichond1017642013-07-24 16:37:23 +0100733dashboard_group = cfg.OptGroup(name="dashboard",
734 title="Dashboard options")
735
736DashboardGroup = [
737 cfg.StrOpt('dashboard_url',
738 default='http://localhost/',
739 help="Where the dashboard can be found"),
740 cfg.StrOpt('login_url',
741 default='http://localhost/auth/login/',
742 help="Login page for the dashboard"),
743]
744
745
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +0400746data_processing_group = cfg.OptGroup(name="data_processing",
747 title="Data Processing options")
748
749DataProcessingGroup = [
750 cfg.StrOpt('catalog_type',
751 default='data_processing',
JordanPfc62c902014-02-26 14:47:28 +0000752 help="Catalog type of the data processing service."),
753 cfg.StrOpt('endpoint_type',
754 default='publicURL',
755 choices=['public', 'admin', 'internal',
756 'publicURL', 'adminURL', 'internalURL'],
757 help="The endpoint type to use for the data processing "
758 "service."),
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +0400759]
760
761
Luigi Toscano14d172d2015-01-23 16:37:47 +0100762data_processing_feature_group = cfg.OptGroup(
763 name="data_processing-feature-enabled",
764 title="Enabled Data Processing features")
765
766DataProcessingFeaturesGroup = [
767 cfg.ListOpt('plugins',
768 default=["vanilla", "hdp"],
769 help="List of enabled data processing plugins")
770]
771
772
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500773boto_group = cfg.OptGroup(name='boto',
774 title='EC2/S3 options')
DennyZhang1e71b612013-09-26 12:35:40 -0500775BotoGroup = [
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500776 cfg.StrOpt('ec2_url',
777 default="http://localhost:8773/services/Cloud",
778 help="EC2 URL"),
779 cfg.StrOpt('s3_url',
780 default="http://localhost:8080",
781 help="S3 URL"),
782 cfg.StrOpt('aws_secret',
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500783 help="AWS Secret Key",
784 secret=True),
785 cfg.StrOpt('aws_access',
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500786 help="AWS Access Key"),
Attila Fazekas27dd92e2014-02-21 14:49:40 +0100787 cfg.StrOpt('aws_zone',
788 default="nova",
789 help="AWS Zone for EC2 tests"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500790 cfg.StrOpt('s3_materials_path',
791 default="/opt/stack/devstack/files/images/"
792 "s3-materials/cirros-0.3.0",
793 help="S3 Materials Path"),
794 cfg.StrOpt('ari_manifest',
795 default="cirros-0.3.0-x86_64-initrd.manifest.xml",
796 help="ARI Ramdisk Image manifest"),
797 cfg.StrOpt('ami_manifest',
798 default="cirros-0.3.0-x86_64-blank.img.manifest.xml",
799 help="AMI Machine Image manifest"),
800 cfg.StrOpt('aki_manifest',
801 default="cirros-0.3.0-x86_64-vmlinuz.manifest.xml",
802 help="AKI Kernel Image manifest"),
803 cfg.StrOpt('instance_type',
804 default="m1.tiny",
805 help="Instance type"),
806 cfg.IntOpt('http_socket_timeout',
807 default=3,
808 help="boto Http socket timeout"),
809 cfg.IntOpt('num_retries',
810 default=1,
811 help="boto num_retries on error"),
812 cfg.IntOpt('build_timeout',
813 default=60,
814 help="Status Change Timeout"),
815 cfg.IntOpt('build_interval',
816 default=1,
817 help="Status Change Test Interval"),
818]
Attila Fazekasf7f2d932012-12-13 09:14:38 +0100819
Matthew Treinish615ea6a2013-02-25 17:26:59 -0500820stress_group = cfg.OptGroup(name='stress', title='Stress Test Options')
821
822StressGroup = [
823 cfg.StrOpt('nova_logdir',
Matthew Treinish615ea6a2013-02-25 17:26:59 -0500824 help='Directory containing log files on the compute nodes'),
825 cfg.IntOpt('max_instances',
826 default=16,
827 help='Maximum number of instances to create during test.'),
828 cfg.StrOpt('controller',
David Kranzb9d97502013-05-01 15:55:04 -0400829 help='Controller host.'),
830 # new stress options
831 cfg.StrOpt('target_controller',
David Kranzb9d97502013-05-01 15:55:04 -0400832 help='Controller host.'),
833 cfg.StrOpt('target_ssh_user',
David Kranzb9d97502013-05-01 15:55:04 -0400834 help='ssh user.'),
835 cfg.StrOpt('target_private_key_path',
David Kranzb9d97502013-05-01 15:55:04 -0400836 help='Path to private key.'),
837 cfg.StrOpt('target_logfiles',
David Kranzb9d97502013-05-01 15:55:04 -0400838 help='regexp for list of log files.'),
Matthew Treinishf319a732013-10-24 21:39:24 +0000839 cfg.IntOpt('log_check_interval',
David Kranzb9d97502013-05-01 15:55:04 -0400840 default=60,
Marc Koderer32221b8e2013-08-23 13:57:50 +0200841 help='time (in seconds) between log file error checks.'),
Matthew Treinishf319a732013-10-24 21:39:24 +0000842 cfg.IntOpt('default_thread_number_per_action',
Marc Koderer32221b8e2013-08-23 13:57:50 +0200843 default=4,
Julien Leloup04d40f72014-01-28 11:17:18 +0100844 help='The number of threads created while stress test.'),
845 cfg.BoolOpt('leave_dirty_stack',
846 default=False,
847 help='Prevent the cleaning (tearDownClass()) between'
848 ' each stress test run if an exception occurs'
Julien Leloupa5ee5422014-02-13 14:29:02 +0100849 ' during this run.'),
850 cfg.BoolOpt('full_clean_stack',
851 default=False,
852 help='Allows a full cleaning process after a stress test.'
853 ' Caution : this cleanup will remove every objects of'
854 ' every tenant.')
Matthew Treinish615ea6a2013-02-25 17:26:59 -0500855]
856
857
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +0900858scenario_group = cfg.OptGroup(name='scenario', title='Scenario Test Options')
859
860ScenarioGroup = [
861 cfg.StrOpt('img_dir',
862 default='/opt/stack/new/devstack/files/images/'
863 'cirros-0.3.1-x86_64-uec',
864 help='Directory containing image files'),
Alessandro Pilottib7c1daa2014-08-16 14:24:13 +0300865 cfg.StrOpt('img_file', deprecated_name='qcow2_img_file',
Masayuki Igawa4f71bf02014-02-21 14:02:29 +0900866 default='cirros-0.3.1-x86_64-disk.img',
Alessandro Pilottib7c1daa2014-08-16 14:24:13 +0300867 help='Image file name'),
868 cfg.StrOpt('img_disk_format',
869 default='qcow2',
870 help='Image disk format'),
871 cfg.StrOpt('img_container_format',
872 default='bare',
873 help='Image container format'),
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +0900874 cfg.StrOpt('ami_img_file',
875 default='cirros-0.3.1-x86_64-blank.img',
876 help='AMI image file name'),
877 cfg.StrOpt('ari_img_file',
878 default='cirros-0.3.1-x86_64-initrd',
879 help='ARI image file name'),
880 cfg.StrOpt('aki_img_file',
881 default='cirros-0.3.1-x86_64-vmlinuz',
882 help='AKI image file name'),
883 cfg.StrOpt('ssh_user',
884 default='cirros',
Joe Gordonb5e10cd2013-07-10 15:51:12 +0000885 help='ssh username for the image file'),
886 cfg.IntOpt(
887 'large_ops_number',
888 default=0,
889 help="specifies how many resources to request at once. Used "
Yair Fried413bf2d2014-11-19 17:07:11 +0200890 "for large operations testing."),
891 # TODO(yfried): add support for dhcpcd
892 cfg.StrOpt('dhcp_client',
893 default='udhcpc',
894 choices=["udhcpc", "dhclient"],
895 help='DHCP client used by images to renew DCHP lease. '
896 'If left empty, update operation will be skipped. '
897 'Supported clients: "udhcpc", "dhclient"')
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +0900898]
899
900
Matthew Treinish4c412922013-07-16 15:27:42 -0400901service_available_group = cfg.OptGroup(name="service_available",
902 title="Available OpenStack Services")
903
904ServiceAvailableGroup = [
905 cfg.BoolOpt('cinder',
906 default=True,
907 help="Whether or not cinder is expected to be available"),
Matthew Treinishfaa340d2013-07-19 16:26:21 -0400908 cfg.BoolOpt('neutron',
909 default=False,
910 help="Whether or not neutron is expected to be available"),
Matthew Treinish853ae442013-07-19 16:36:07 -0400911 cfg.BoolOpt('glance',
912 default=True,
913 help="Whether or not glance is expected to be available"),
Matthew Treinish61e332b2013-07-19 16:42:31 -0400914 cfg.BoolOpt('swift',
915 default=True,
916 help="Whether or not swift is expected to be available"),
Matthew Treinish6b41e242013-07-19 16:49:28 -0400917 cfg.BoolOpt('nova',
918 default=True,
919 help="Whether or not nova is expected to be available"),
Matthew Treinisha9d43882013-07-19 16:54:52 -0400920 cfg.BoolOpt('heat',
921 default=False,
922 help="Whether or not Heat is expected to be available"),
Mehdi Abaakouk8581c0b2013-10-04 10:45:42 +0200923 cfg.BoolOpt('ceilometer',
924 default=True,
925 help="Whether or not Ceilometer is expected to be available"),
Julie Pichond1017642013-07-24 16:37:23 +0100926 cfg.BoolOpt('horizon',
927 default=True,
928 help="Whether or not Horizon is expected to be available"),
Sergey Lukjanov9c95a252014-03-13 23:59:22 +0400929 cfg.BoolOpt('sahara',
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +0400930 default=False,
Sergey Lukjanov9c95a252014-03-13 23:59:22 +0400931 help="Whether or not Sahara is expected to be available"),
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +0300932 cfg.BoolOpt('ironic',
933 default=False,
934 help="Whether or not Ironic is expected to be available"),
Nikhil Manchandadd6886f2014-03-03 01:58:45 -0800935 cfg.BoolOpt('trove',
936 default=False,
937 help="Whether or not Trove is expected to be available"),
Malini Kamalambal8681e922014-08-18 10:10:45 -0400938 cfg.BoolOpt('zaqar',
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500939 default=False,
Malini Kamalambal8681e922014-08-18 10:10:45 -0400940 help="Whether or not Zaqar is expected to be available"),
Matthew Treinish4c412922013-07-16 15:27:42 -0400941]
942
Attila Fazekasaeeeefd2013-08-06 17:01:56 +0200943debug_group = cfg.OptGroup(name="debug",
944 title="Debug System")
945
946DebugGroup = [
Sean Daguec522c092014-03-24 10:43:22 -0400947 cfg.StrOpt('trace_requests',
948 default='',
949 help="""A regex to determine which requests should be traced.
950
951This is a regex to match the caller for rest client requests to be able to
952selectively trace calls out of specific classes and methods. It largely
953exists for test development, and is not expected to be used in a real deploy
954of tempest. This will be matched against the discovered ClassName:method
955in the test environment.
956
957Expected values for this field are:
958
959 * ClassName:test_method_name - traces one test_method
960 * ClassName:setUp(Class) - traces specific setup functions
961 * ClassName:tearDown(Class) - traces specific teardown functions
962 * ClassName:_run_cleanups - traces the cleanup functions
963
964If nothing is specified, this feature is not enabled. To trace everything
965specify .* as the regex.
966""")
Attila Fazekasaeeeefd2013-08-06 17:01:56 +0200967]
968
Andrea Frittolif5da28b2013-12-06 07:08:07 +0000969input_scenario_group = cfg.OptGroup(name="input-scenario",
970 title="Filters and values for"
971 " input scenarios")
972
973InputScenarioGroup = [
974 cfg.StrOpt('image_regex',
975 default='^cirros-0.3.1-x86_64-uec$',
976 help="Matching images become parameters for scenario tests"),
977 cfg.StrOpt('flavor_regex',
Andrea Frittoli99901c02014-01-30 18:06:49 +0000978 default='^m1.nano$',
Andrea Frittolif5da28b2013-12-06 07:08:07 +0000979 help="Matching flavors become parameters for scenario tests"),
980 cfg.StrOpt('non_ssh_image_regex',
981 default='^.*[Ww]in.*$',
982 help="SSH verification in tests is skipped"
983 "for matching images"),
984 cfg.StrOpt('ssh_user_regex',
985 default="[[\"^.*[Cc]irros.*$\", \"root\"]]",
986 help="List of user mapped to regex "
987 "to matching image names."),
988]
989
Attila Fazekasaeeeefd2013-08-06 17:01:56 +0200990
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +0300991baremetal_group = cfg.OptGroup(name='baremetal',
Chris Hoge8f1401b2014-11-19 14:00:37 -0800992 title='Baremetal provisioning service options',
993 help='When enabling baremetal tests, Nova '
994 'must be configured to use the Ironic '
995 'driver. The following paremeters for the '
996 '[compute] section must be disabled: '
997 'console_output, interface_attach, '
998 'live_migration, pause, rescue, resize '
999 'shelve, snapshot, and suspend')
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +03001000
1001BaremetalGroup = [
1002 cfg.StrOpt('catalog_type',
1003 default='baremetal',
Adam Gandelman4a48a602014-03-20 18:23:18 -07001004 help="Catalog type of the baremetal provisioning service"),
1005 cfg.BoolOpt('driver_enabled',
1006 default=False,
1007 help="Whether the Ironic nova-compute driver is enabled"),
Yuiko Takada1ee1b322014-07-04 09:55:30 +09001008 cfg.StrOpt('driver',
1009 default='fake',
1010 help="Driver name which Ironic uses"),
JordanPfc62c902014-02-26 14:47:28 +00001011 cfg.StrOpt('endpoint_type',
1012 default='publicURL',
1013 choices=['public', 'admin', 'internal',
1014 'publicURL', 'adminURL', 'internalURL'],
1015 help="The endpoint type to use for the baremetal provisioning "
Adam Gandelman4a48a602014-03-20 18:23:18 -07001016 "service"),
1017 cfg.IntOpt('active_timeout',
1018 default=300,
1019 help="Timeout for Ironic node to completely provision"),
1020 cfg.IntOpt('association_timeout',
Adam Gandelmane42f0922014-06-10 15:26:37 -07001021 default=30,
Adam Gandelman4a48a602014-03-20 18:23:18 -07001022 help="Timeout for association of Nova instance and Ironic "
1023 "node"),
1024 cfg.IntOpt('power_timeout',
Adam Gandelmane42f0922014-06-10 15:26:37 -07001025 default=60,
Adam Gandelman4a48a602014-03-20 18:23:18 -07001026 help="Timeout for Ironic power transitions."),
1027 cfg.IntOpt('unprovision_timeout',
Adam Gandelmane42f0922014-06-10 15:26:37 -07001028 default=60,
Adam Gandelman4a48a602014-03-20 18:23:18 -07001029 help="Timeout for unprovisioning an Ironic node.")
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +03001030]
1031
Matthew Treinishe2b56b52014-01-29 19:25:50 +00001032cli_group = cfg.OptGroup(name='cli', title="cli Configuration Options")
1033
1034CLIGroup = [
1035 cfg.BoolOpt('enabled',
1036 default=True,
1037 help="enable cli tests"),
1038 cfg.StrOpt('cli_dir',
1039 default='/usr/local/bin',
1040 help="directory where python client binaries are located"),
Sean Dague44b24682014-02-20 19:08:24 -05001041 cfg.BoolOpt('has_manage',
1042 default=True,
1043 help=("Whether the tempest run location has access to the "
1044 "*-manage commands. In a pure blackbox environment "
1045 "it will not.")),
Matthew Treinishe2b56b52014-01-29 19:25:50 +00001046 cfg.IntOpt('timeout',
1047 default=15,
1048 help="Number of seconds to wait on a CLI timeout"),
1049]
1050
Marc Koderer6ee82dc2014-02-17 10:26:29 +01001051negative_group = cfg.OptGroup(name='negative', title="Negative Test Options")
1052
1053NegativeGroup = [
1054 cfg.StrOpt('test_generator',
1055 default='tempest.common.' +
1056 'generator.negative_generator.NegativeTestGenerator',
1057 help="Test generator class for all negative tests"),
1058]
1059
Jon Grimm270bd7f2014-08-05 18:11:29 +00001060_opts = [
1061 (auth_group, AuthGroup),
1062 (compute_group, ComputeGroup),
1063 (compute_features_group, ComputeFeaturesGroup),
1064 (identity_group, IdentityGroup),
1065 (identity_feature_group, IdentityFeatureGroup),
1066 (image_group, ImageGroup),
1067 (image_feature_group, ImageFeaturesGroup),
1068 (network_group, NetworkGroup),
1069 (network_feature_group, NetworkFeaturesGroup),
1070 (messaging_group, MessagingGroup),
1071 (volume_group, VolumeGroup),
1072 (volume_feature_group, VolumeFeaturesGroup),
1073 (object_storage_group, ObjectStoreGroup),
1074 (object_storage_feature_group, ObjectStoreFeaturesGroup),
1075 (database_group, DatabaseGroup),
1076 (orchestration_group, OrchestrationGroup),
1077 (telemetry_group, TelemetryGroup),
1078 (dashboard_group, DashboardGroup),
1079 (data_processing_group, DataProcessingGroup),
Luigi Toscano14d172d2015-01-23 16:37:47 +01001080 (data_processing_feature_group, DataProcessingFeaturesGroup),
Jon Grimm270bd7f2014-08-05 18:11:29 +00001081 (boto_group, BotoGroup),
Jon Grimm270bd7f2014-08-05 18:11:29 +00001082 (stress_group, StressGroup),
1083 (scenario_group, ScenarioGroup),
1084 (service_available_group, ServiceAvailableGroup),
1085 (debug_group, DebugGroup),
1086 (baremetal_group, BaremetalGroup),
1087 (input_scenario_group, InputScenarioGroup),
1088 (cli_group, CLIGroup),
1089 (negative_group, NegativeGroup)
1090]
1091
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +03001092
Matthew Treinish43b296a2014-02-28 15:23:00 -05001093def register_opts():
Jon Grimm270bd7f2014-08-05 18:11:29 +00001094 for g, o in _opts:
1095 register_opt_group(cfg.CONF, g, o)
1096
1097
1098def list_opts():
1099 """Return a list of oslo.config options available.
1100
1101 The purpose of this is to allow tools like the Oslo sample config file
1102 generator to discover the options exposed to users.
1103 """
Doug Hellmann583ce2c2015-03-11 14:55:46 +00001104 return [(g.name, o) for g, o in _opts]
Matthew Treinish43b296a2014-02-28 15:23:00 -05001105
1106
Sean Dague3b9b1f32013-12-20 17:04:54 -05001107# this should never be called outside of this class
1108class TempestConfigPrivate(object):
Daryl Walleck1465d612011-11-02 02:22:15 -05001109 """Provides OpenStack configuration information."""
1110
Brian Waldon738cd632011-12-12 18:45:09 -05001111 DEFAULT_CONFIG_DIR = os.path.join(
Zhongyue Luoa1343de2013-01-04 16:21:35 +08001112 os.path.abspath(os.path.dirname(os.path.dirname(__file__))),
Brian Waldon738cd632011-12-12 18:45:09 -05001113 "etc")
Daryl Walleck1465d612011-11-02 02:22:15 -05001114
Brian Waldon738cd632011-12-12 18:45:09 -05001115 DEFAULT_CONFIG_FILE = "tempest.conf"
1116
Andrea Frittolia96ee212014-08-15 18:34:20 +01001117 def __getattr__(self, attr):
1118 # Handles config options from the default group
1119 return getattr(cfg.CONF, attr)
1120
Matthew Treinish43b296a2014-02-28 15:23:00 -05001121 def _set_attrs(self):
Matthew Treinishc791ac42014-07-16 09:15:23 -04001122 self.auth = cfg.CONF.auth
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001123 self.compute = cfg.CONF.compute
Matthew Treinishd5c96022013-10-17 21:51:23 +00001124 self.compute_feature_enabled = cfg.CONF['compute-feature-enabled']
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001125 self.identity = cfg.CONF.identity
Matthew Treinishd5021a72014-01-09 18:42:51 +00001126 self.identity_feature_enabled = cfg.CONF['identity-feature-enabled']
Matt Riedemannd3efe902014-02-10 06:46:38 -08001127 self.image = cfg.CONF.image
Matthew Treinish2b5287d2013-10-22 17:40:34 +00001128 self.image_feature_enabled = cfg.CONF['image-feature-enabled']
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001129 self.network = cfg.CONF.network
Matthew Treinishe3d26142013-11-26 19:14:58 +00001130 self.network_feature_enabled = cfg.CONF['network-feature-enabled']
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001131 self.volume = cfg.CONF.volume
Matthew Treinishd5c96022013-10-17 21:51:23 +00001132 self.volume_feature_enabled = cfg.CONF['volume-feature-enabled']
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001133 self.object_storage = cfg.CONF['object-storage']
Matthew Treinishd5c96022013-10-17 21:51:23 +00001134 self.object_storage_feature_enabled = cfg.CONF[
1135 'object-storage-feature-enabled']
Nikhil Manchandadd6886f2014-03-03 01:58:45 -08001136 self.database = cfg.CONF.database
Steve Bakerc60e4e32013-05-06 15:22:41 +12001137 self.orchestration = cfg.CONF.orchestration
Victoria Martínez de la Cruz1173b6e2014-09-22 18:32:13 -03001138 self.messaging = cfg.CONF.messaging
Yassine Lamgarchalb158d412013-12-27 19:29:42 +01001139 self.telemetry = cfg.CONF.telemetry
Julie Pichond1017642013-07-24 16:37:23 +01001140 self.dashboard = cfg.CONF.dashboard
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +04001141 self.data_processing = cfg.CONF.data_processing
Luigi Toscano14d172d2015-01-23 16:37:47 +01001142 self.data_processing_feature_enabled = cfg.CONF[
1143 'data_processing-feature-enabled']
Matthew Treinish39e48ef2012-12-21 13:36:15 -05001144 self.boto = cfg.CONF.boto
Matthew Treinish615ea6a2013-02-25 17:26:59 -05001145 self.stress = cfg.CONF.stress
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +09001146 self.scenario = cfg.CONF.scenario
Matthew Treinish4c412922013-07-16 15:27:42 -04001147 self.service_available = cfg.CONF.service_available
Attila Fazekas5fae7a32013-09-25 16:52:44 +02001148 self.debug = cfg.CONF.debug
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +03001149 self.baremetal = cfg.CONF.baremetal
Andrea Frittolif5da28b2013-12-06 07:08:07 +00001150 self.input_scenario = cfg.CONF['input-scenario']
Matthew Treinishe2b56b52014-01-29 19:25:50 +00001151 self.cli = cfg.CONF.cli
Marc Koderer6ee82dc2014-02-17 10:26:29 +01001152 self.negative = cfg.CONF.negative
Andrea Frittolib1b04bb2014-04-06 11:57:07 +01001153 cfg.CONF.set_default('domain_name', self.identity.admin_domain_name,
1154 group='identity')
1155 cfg.CONF.set_default('alt_domain_name',
1156 self.identity.admin_domain_name,
1157 group='identity')
Sean Dague86bd8422013-12-20 09:56:44 -05001158
Joe Gordon28a84ae2014-07-17 15:38:28 +00001159 def __init__(self, parse_conf=True, config_path=None):
Matthew Treinish43b296a2014-02-28 15:23:00 -05001160 """Initialize a configuration from a conf directory and conf file."""
1161 super(TempestConfigPrivate, self).__init__()
1162 config_files = []
1163 failsafe_path = "/etc/tempest/" + self.DEFAULT_CONFIG_FILE
1164
Joe Gordon28a84ae2014-07-17 15:38:28 +00001165 if config_path:
1166 path = config_path
1167 else:
1168 # Environment variables override defaults...
1169 conf_dir = os.environ.get('TEMPEST_CONFIG_DIR',
1170 self.DEFAULT_CONFIG_DIR)
1171 conf_file = os.environ.get('TEMPEST_CONFIG',
1172 self.DEFAULT_CONFIG_FILE)
Matthew Treinish43b296a2014-02-28 15:23:00 -05001173
Joe Gordon28a84ae2014-07-17 15:38:28 +00001174 path = os.path.join(conf_dir, conf_file)
Matthew Treinish43b296a2014-02-28 15:23:00 -05001175
1176 if not os.path.isfile(path):
1177 path = failsafe_path
1178
1179 # only parse the config file if we expect one to exist. This is needed
1180 # to remove an issue with the config file up to date checker.
1181 if parse_conf:
1182 config_files.append(path)
Doug Hellmann583ce2c2015-03-11 14:55:46 +00001183 logging.register_options(cfg.CONF)
Matthew Treinish5440a402014-10-02 14:36:16 -04001184 if os.path.isfile(path):
1185 cfg.CONF([], project='tempest', default_config_files=config_files)
1186 else:
1187 cfg.CONF([], project='tempest')
Doug Hellmann583ce2c2015-03-11 14:55:46 +00001188 logging.setup(cfg.CONF, 'tempest')
Matthew Treinish43b296a2014-02-28 15:23:00 -05001189 LOG = logging.getLogger('tempest')
1190 LOG.info("Using tempest config file %s" % path)
1191 register_opts()
1192 self._set_attrs()
Masayuki Igawa9ec4cd82014-02-05 15:04:16 +09001193 if parse_conf:
1194 cfg.CONF.log_opt_values(LOG, std_logging.DEBUG)
1195
Sean Dague86bd8422013-12-20 09:56:44 -05001196
1197class TempestConfigProxy(object):
1198 _config = None
Joe Gordon28a84ae2014-07-17 15:38:28 +00001199 _path = None
Sean Dague86bd8422013-12-20 09:56:44 -05001200
Sean Daguedb6ac6c2014-06-06 16:52:44 -04001201 _extra_log_defaults = [
Doug Hellmann583ce2c2015-03-11 14:55:46 +00001202 ('keystoneclient.session', std_logging.INFO),
1203 ('paramiko.transport', std_logging.INFO),
1204 ('requests.packages.urllib3.connectionpool', std_logging.WARN),
Sean Daguedb6ac6c2014-06-06 16:52:44 -04001205 ]
1206
1207 def _fix_log_levels(self):
1208 """Tweak the oslo log defaults."""
Doug Hellmann583ce2c2015-03-11 14:55:46 +00001209 for name, level in self._extra_log_defaults:
1210 std_logging.getLogger(name).setLevel(level)
Sean Daguedb6ac6c2014-06-06 16:52:44 -04001211
Sean Dague86bd8422013-12-20 09:56:44 -05001212 def __getattr__(self, attr):
1213 if not self._config:
Sean Daguedb6ac6c2014-06-06 16:52:44 -04001214 self._fix_log_levels()
Joe Gordon28a84ae2014-07-17 15:38:28 +00001215 self._config = TempestConfigPrivate(config_path=self._path)
Sean Dague86bd8422013-12-20 09:56:44 -05001216
1217 return getattr(self._config, attr)
1218
Joe Gordon28a84ae2014-07-17 15:38:28 +00001219 def set_config_path(self, path):
1220 self._path = path
1221
Sean Dague86bd8422013-12-20 09:56:44 -05001222
1223CONF = TempestConfigProxy()