blob: eb62f967cc5ccc405b425bb2548ab8a6a7987e61 [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
Maru Newbyf440c292015-03-31 15:58:47 +000026# TODO(marun) Replace use of oslo_config's global ConfigOpts
27# (cfg.CONF) instance with a local instance (cfg.ConfigOpts()) once
28# the cli tests move to the clients. The cli tests rely on oslo
29# incubator modules that use the global cfg.CONF.
30_CONF = cfg.CONF
31
32
DennyZhang88a2dd82013-10-07 12:55:35 -050033def register_opt_group(conf, opt_group, options):
34 conf.register_group(opt_group)
35 for opt in options:
36 conf.register_opt(opt, group=opt_group.name)
37
38
Matthew Treinishc791ac42014-07-16 09:15:23 -040039auth_group = cfg.OptGroup(name='auth',
40 title="Options for authentication and credentials")
41
42
43AuthGroup = [
44 cfg.StrOpt('test_accounts_file',
Matthew Treinishc791ac42014-07-16 09:15:23 -040045 help="Path to the yaml file that contains the list of "
Matthew Treinishfc7cd8f2015-03-30 11:51:55 -040046 "credentials to use for running tests. If used when "
47 "running in parallel you have to make sure sufficient "
48 "credentials are provided in the accounts file. For "
49 "example if no tests with roles are being run it requires "
50 "at least `2 * CONC` distinct accounts configured in "
51 " the `test_accounts_file`, with CONC == the "
52 "number of concurrent test processes."),
Andrea Frittoli8283b4e2014-07-17 13:28:58 +010053 cfg.BoolOpt('allow_tenant_isolation',
Attila Fazekas5dda1582015-02-18 17:16:02 +010054 default=True,
Andrea Frittoli8283b4e2014-07-17 13:28:58 +010055 help="Allows test cases to create/destroy tenants and "
56 "users. This option requires that OpenStack Identity "
57 "API admin credentials are known. If false, isolated "
58 "test cases and parallel execution, can still be "
59 "achieved configuring a list of test accounts",
60 deprecated_opts=[cfg.DeprecatedOpt('allow_tenant_isolation',
61 group='compute'),
62 cfg.DeprecatedOpt('allow_tenant_isolation',
63 group='orchestration')]),
Matthew Treinish167b2be2015-01-15 17:20:27 -050064 cfg.ListOpt('tempest_roles',
65 help="Roles to assign to all users created by tempest",
Andrea Frittolic3280152015-02-26 12:42:34 +000066 default=[]),
67 cfg.StrOpt('tenant_isolation_domain_name',
68 default=None,
69 help="Only applicable when identity.auth_version is v3."
70 "Domain within which isolated credentials are provisioned."
71 "The default \"None\" means that the domain from the"
72 "admin user is used instead.")
Matthew Treinishc791ac42014-07-16 09:15:23 -040073]
74
Matthew Treinish39e48ef2012-12-21 13:36:15 -050075identity_group = cfg.OptGroup(name='identity',
76 title="Keystone Configuration Options")
Daryl Walleck1465d612011-11-02 02:22:15 -050077
Matthew Treinish39e48ef2012-12-21 13:36:15 -050078IdentityGroup = [
79 cfg.StrOpt('catalog_type',
80 default='identity',
81 help="Catalog type of the Identity service."),
Jay Pipescd8eaec2013-01-16 21:03:48 -050082 cfg.BoolOpt('disable_ssl_certificate_validation',
83 default=False,
84 help="Set to True if using self-signed SSL certificates."),
Rob Crittendena7db6692014-11-23 18:44:38 -050085 cfg.StrOpt('ca_certificates_file',
86 default=None,
87 help='Specify a CA bundle file to use in verifying a '
88 'TLS (https) server certificate.'),
Jay Pipes7c88eb22013-01-16 21:32:43 -050089 cfg.StrOpt('uri',
Brant Knudsonc7ca3342013-03-28 21:08:50 -050090 help="Full URI of the OpenStack Identity API (Keystone), v2"),
91 cfg.StrOpt('uri_v3',
92 help='Full URI of the OpenStack Identity API (Keystone), v3'),
Andrea Frittoli8bbdb162014-01-06 11:06:13 +000093 cfg.StrOpt('auth_version',
94 default='v2',
95 help="Identity API version to be used for authentication "
Andrea Frittoli77f9da42014-02-06 11:18:19 +000096 "for API tests."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -050097 cfg.StrOpt('region',
Attila Fazekascadcb1f2013-01-21 23:10:53 +010098 default='RegionOne',
Arata Notsu8f440392013-09-13 16:14:20 +090099 help="The identity region name to use. Also used as the other "
100 "services' region name unless they are set explicitly. "
101 "If no such region is found in the service catalog, the "
102 "first found one is used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000103 cfg.StrOpt('endpoint_type',
104 default='publicURL',
105 choices=['public', 'admin', 'internal',
106 'publicURL', 'adminURL', 'internalURL'],
107 help="The endpoint type to use for the identity service."),
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100108 cfg.StrOpt('username',
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100109 help="Username to use for Nova API requests."),
110 cfg.StrOpt('tenant_name',
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100111 help="Tenant name to use for Nova API requests."),
Russell Sim7f894a52013-09-13 10:35:21 +1000112 cfg.StrOpt('admin_role',
113 default='admin',
114 help="Role required to administrate keystone."),
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100115 cfg.StrOpt('password',
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100116 help="API key to use when authenticating.",
117 secret=True),
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100118 cfg.StrOpt('domain_name',
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100119 help="Domain name for authentication (Keystone V3)."
120 "The same domain applies to user and project"),
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100121 cfg.StrOpt('alt_username',
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100122 help="Username of alternate user to use for Nova API "
123 "requests."),
124 cfg.StrOpt('alt_tenant_name',
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100125 help="Alternate user's Tenant name to use for Nova API "
126 "requests."),
127 cfg.StrOpt('alt_password',
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100128 help="API key to use when authenticating as alternate user.",
129 secret=True),
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100130 cfg.StrOpt('alt_domain_name',
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100131 help="Alternate domain name for authentication (Keystone V3)."
132 "The same domain applies to user and project"),
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100133 cfg.StrOpt('admin_username',
Dirk Mueller14bd5622014-01-14 19:33:05 +0100134 help="Administrative Username to use for "
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100135 "Keystone API requests."),
136 cfg.StrOpt('admin_tenant_name',
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100137 help="Administrative Tenant name to use for Keystone API "
138 "requests."),
139 cfg.StrOpt('admin_password',
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100140 help="API key to use when authenticating as admin.",
141 secret=True),
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100142 cfg.StrOpt('admin_domain_name',
Andrea Frittolib1b04bb2014-04-06 11:57:07 +0100143 help="Admin domain name for authentication (Keystone V3)."
144 "The same domain applies to user and project"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500145]
Jay Pipes3f981df2012-03-27 18:59:44 -0400146
Matthew Treinishd5021a72014-01-09 18:42:51 +0000147identity_feature_group = cfg.OptGroup(name='identity-feature-enabled',
148 title='Enabled Identity Features')
149
150IdentityFeatureGroup = [
151 cfg.BoolOpt('trust',
152 default=True,
153 help='Does the identity service have delegation and '
Matthew Treinishdb2c5972014-01-31 22:18:59 +0000154 'impersonation enabled'),
155 cfg.BoolOpt('api_v2',
156 default=True,
157 help='Is the v2 identity API enabled'),
158 cfg.BoolOpt('api_v3',
159 default=True,
160 help='Is the v3 identity API enabled'),
Matthew Treinishd5021a72014-01-09 18:42:51 +0000161]
162
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500163compute_group = cfg.OptGroup(name='compute',
164 title='Compute Service Options')
Rohit Karajgie1b050d2011-12-02 16:13:18 -0800165
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500166ComputeGroup = [
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500167 cfg.StrOpt('image_ref',
Matthew Treinishafcb6b42014-05-27 13:50:02 -0400168 help="Valid primary image reference to be used in tests. "
169 "This is a required option"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500170 cfg.StrOpt('image_ref_alt',
Matthew Treinishafcb6b42014-05-27 13:50:02 -0400171 help="Valid secondary image reference to be used in tests. "
172 "This is a required option, but if only one image is "
173 "available duplicate the value of image_ref above"),
Ken'ichi Ohmichi35772602013-11-14 15:03:27 +0900174 cfg.StrOpt('flavor_ref',
175 default="1",
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500176 help="Valid primary flavor to use in tests."),
Ken'ichi Ohmichi35772602013-11-14 15:03:27 +0900177 cfg.StrOpt('flavor_ref_alt',
178 default="2",
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500179 help='Valid secondary flavor to be used in tests.'),
Maru Newbyaf292e82013-05-20 21:32:28 +0000180 cfg.StrOpt('image_ssh_user',
181 default="root",
182 help="User name used to authenticate to an instance."),
Ryan Hsucb2e1252013-09-03 21:44:49 -0700183 cfg.StrOpt('image_ssh_password',
184 default="password",
185 help="Password used to authenticate to an instance."),
Maru Newbyaf292e82013-05-20 21:32:28 +0000186 cfg.StrOpt('image_alt_ssh_user',
187 default="root",
188 help="User name used to authenticate to an instance using "
189 "the alternate image."),
Ryan Hsucb2e1252013-09-03 21:44:49 -0700190 cfg.StrOpt('image_alt_ssh_password',
191 default="password",
192 help="Password used to authenticate to an instance using "
193 "the alternate image."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500194 cfg.IntOpt('build_interval',
Sean Dague82190852014-05-24 07:42:59 -0400195 default=1,
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500196 help="Time in seconds between build status checks."),
197 cfg.IntOpt('build_timeout',
198 default=300,
Hugh Saunders5b139ad2014-12-15 09:08:41 +0000199 help="Timeout in seconds to wait for an instance to build. "
200 "Other services that do not define build_timeout will "
Lucian Petrut1cfe2982015-01-06 13:57:36 +0200201 "inherit this value."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500202 cfg.BoolOpt('run_ssh',
203 default=False,
Derek Higgins85cd5142013-12-17 17:10:11 +0000204 help="Should the tests ssh to instances?"),
Attila Fazekas423834d2014-03-14 17:33:13 +0100205 cfg.StrOpt('ssh_auth_method',
206 default='keypair',
207 help="Auth method used for authenticate to the instance. "
208 "Valid choices are: keypair, configured, adminpass. "
209 "keypair: start the servers with an ssh keypair. "
210 "configured: use the configured user and password. "
211 "adminpass: use the injected adminPass. "
212 "disabled: avoid using ssh when it is an option."),
213 cfg.StrOpt('ssh_connect_method',
214 default='fixed',
215 help="How to connect to the instance? "
216 "fixed: using the first ip belongs the fixed network "
217 "floating: creating and using a floating ip"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500218 cfg.StrOpt('ssh_user',
219 default='root',
220 help="User name used to authenticate to an instance."),
Nachi Ueno6d580be2013-07-24 10:58:11 -0700221 cfg.IntOpt('ping_timeout',
Darragh O'Reilly6b636672014-01-24 12:17:40 +0000222 default=120,
Nachi Ueno6d580be2013-07-24 10:58:11 -0700223 help="Timeout in seconds to wait for ping to "
224 "succeed."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500225 cfg.IntOpt('ssh_timeout',
226 default=300,
Chris Yeoh76916042013-02-27 16:25:25 +1030227 help="Timeout in seconds to wait for authentication to "
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500228 "succeed."),
Attila Fazekas0abbc952013-07-01 19:19:42 +0200229 cfg.IntOpt('ready_wait',
230 default=0,
DennyZhang8912d012013-09-25 18:08:34 -0500231 help="Additional wait time for clean state, when there is "
232 "no OS-EXT-STS extension available"),
Chris Yeoh76916042013-02-27 16:25:25 +1030233 cfg.IntOpt('ssh_channel_timeout',
234 default=60,
235 help="Timeout in seconds to wait for output from ssh "
236 "channel."),
Attila Fazekasb0661652013-05-08 13:01:36 +0200237 cfg.StrOpt('fixed_network_name',
Chris Hoge8f1401b2014-11-19 14:00:37 -0800238 help="Name of the fixed network that is visible to all test "
Matthew Treinish03feae02015-03-27 10:25:45 -0400239 "tenants. If multiple networks are available for a tenant"
240 " this is the network which will be used for creating "
241 "servers if tempest does not create a network or a "
242 "network is not specified elsewhere"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500243 cfg.StrOpt('network_for_ssh',
244 default='public',
Chris Hoge8f1401b2014-11-19 14:00:37 -0800245 help="Network used for SSH connections. Ignored if "
246 "use_floatingip_for_ssh=true or run_ssh=false."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500247 cfg.IntOpt('ip_version_for_ssh',
248 default=4,
249 help="IP version used for SSH connections."),
fujioka yuuichia11994e2013-07-09 11:19:51 +0900250 cfg.BoolOpt('use_floatingip_for_ssh',
251 default=True,
Tushar Kalra95a482d2014-03-25 14:24:43 -0700252 help="Does SSH use Floating IPs?"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500253 cfg.StrOpt('catalog_type',
254 default='compute',
255 help="Catalog type of the Compute service."),
Arata Notsu8f440392013-09-13 16:14:20 +0900256 cfg.StrOpt('region',
257 default='',
258 help="The compute region name to use. If empty, the value "
259 "of identity.region is used instead. If no such region "
260 "is found in the service catalog, the first found one is "
261 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000262 cfg.StrOpt('endpoint_type',
263 default='publicURL',
264 choices=['public', 'admin', 'internal',
265 'publicURL', 'adminURL', 'internalURL'],
266 help="The endpoint type to use for the compute service."),
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100267 cfg.StrOpt('path_to_private_key',
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100268 help="Path to a private key file for SSH access to remote "
269 "hosts"),
Ryan Hsucb2e1252013-09-03 21:44:49 -0700270 cfg.StrOpt('volume_device_name',
271 default='vdb',
272 help="Expected device name when a volume is attached to "
Ken'ichi Ohmichi39437e22013-10-06 00:21:38 +0900273 "an instance"),
274 cfg.IntOpt('shelved_offload_time',
275 default=0,
276 help='Time in seconds before a shelved instance is eligible '
277 'for removing from a host. -1 never offload, 0 offload '
278 'when shelved. This time should be the same as the time '
279 'of nova.conf, and some tests will run for as long as the '
Ghanshyam06a5b4a2014-04-11 17:32:45 +0900280 'time.'),
281 cfg.StrOpt('floating_ip_range',
282 default='10.0.0.0/29',
283 help='Unallocated floating IP range, which will be used to '
Chris Hoge8f1401b2014-11-19 14:00:37 -0800284 'test the floating IP bulk feature for CRUD operation. '
285 'This block must not overlap an existing floating IP '
286 'pool.')
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500287]
Rohit Karajgie1b050d2011-12-02 16:13:18 -0800288
Matthew Treinishd5c96022013-10-17 21:51:23 +0000289compute_features_group = cfg.OptGroup(name='compute-feature-enabled',
290 title="Enabled Compute Service Features")
291
292ComputeFeaturesGroup = [
293 cfg.BoolOpt('disk_config',
294 default=True,
295 help="If false, skip disk config tests"),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000296 cfg.ListOpt('api_extensions',
297 default=['all'],
Zhi Kun Liude25c022014-02-14 13:25:19 +0800298 help='A list of enabled compute extensions with a special '
Ken'ichi Ohmichia7e68712014-05-06 10:47:26 +0900299 'entry all which indicates every extension is enabled. '
Simeon Monov5d7effe2014-07-16 07:32:38 +0300300 'Each extension should be specified with alias name. '
301 'Empty list indicates all extensions are disabled'),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000302 cfg.BoolOpt('change_password',
303 default=False,
304 help="Does the test environment support changing the admin "
305 "password?"),
Adam Gandelmanc6eefb42014-07-15 16:44:08 -0700306 cfg.BoolOpt('console_output',
307 default=True,
308 help="Does the test environment support obtaining instance "
309 "serial console output?"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000310 cfg.BoolOpt('resize',
311 default=False,
312 help="Does the test environment support resizing?"),
Eric Windischb5538072014-03-09 23:47:35 -0400313 cfg.BoolOpt('pause',
314 default=True,
315 help="Does the test environment support pausing?"),
David Shrewsbury25f666f2014-07-22 12:17:59 -0400316 cfg.BoolOpt('shelve',
317 default=True,
318 help="Does the test environment support shelving/unshelving?"),
Eric Windischaeb7e842014-03-10 01:10:50 -0400319 cfg.BoolOpt('suspend',
320 default=True,
321 help="Does the test environment support suspend/resume?"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000322 cfg.BoolOpt('live_migration',
Joe Gordon31a139a2014-11-17 16:39:04 -0800323 default=True,
Matthew Treinishd5c96022013-10-17 21:51:23 +0000324 help="Does the test environment support live migration "
325 "available?"),
326 cfg.BoolOpt('block_migration_for_live_migration',
327 default=False,
328 help="Does the test environment use block devices for live "
329 "migration"),
330 cfg.BoolOpt('block_migrate_cinder_iscsi',
331 default=False,
332 help="Does the test environment block migration support "
Joe Gordon0a5788f2015-03-17 11:29:38 -0700333 "cinder iSCSI volumes. Note, libvirt doesn't support this, "
334 "see https://bugs.launchpad.net/nova/+bug/1398999"),
Ghanshyam Mann41c17572014-02-27 18:52:56 +0900335 cfg.BoolOpt('vnc_console',
336 default=False,
337 help='Enable VNC console. This configuration value should '
Ghanshyam70876d02014-03-11 11:40:18 +0900338 'be same as [nova.vnc]->vnc_enabled in nova.conf'),
339 cfg.BoolOpt('spice_console',
340 default=False,
341 help='Enable Spice console. This configuration value should '
342 'be same as [nova.spice]->enabled in nova.conf'),
343 cfg.BoolOpt('rdp_console',
344 default=False,
345 help='Enable RDP console. This configuration value should '
Adam Gandelman2e37b4f2014-06-18 17:34:21 -0700346 'be same as [nova.rdp]->enabled in nova.conf'),
347 cfg.BoolOpt('rescue',
348 default=True,
349 help='Does the test environment support instance rescue '
Ghanshyam9c2e50d2014-07-22 21:32:05 +0900350 'mode?'),
351 cfg.BoolOpt('enable_instance_password',
352 default=True,
353 help='Enables returning of the instance password by the '
354 'relevant server API calls such as create, rebuild '
Adam Gandelman7186f7a2014-07-23 09:28:56 -0400355 'or rescue.'),
356 cfg.BoolOpt('interface_attach',
357 default=True,
358 help='Does the test environment support dynamic network '
Adam Gandelmanfbc95ac2014-06-19 17:33:43 -0700359 'interface attachment?'),
360 cfg.BoolOpt('snapshot',
361 default=True,
362 help='Does the test environment support creating snapshot '
Matthew Treinishdfd7ac02015-02-09 17:47:31 -0500363 'images of running instances?'),
364 cfg.BoolOpt('ec2_api',
365 default=True,
Matt Riedemann17940732015-03-13 14:18:19 +0000366 help='Does the test environment have the ec2 api running?'),
367 # TODO(mriedem): Remove preserve_ports once juno-eol happens.
368 cfg.BoolOpt('preserve_ports',
369 default=False,
370 help='Does Nova preserve preexisting ports from Neutron '
371 'when deleting an instance? This should be set to True '
372 'if testing Kilo+ Nova.')
Matthew Treinishd5c96022013-10-17 21:51:23 +0000373]
374
375
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500376image_group = cfg.OptGroup(name='image',
377 title="Image Service Options")
Jay Pipesf38eaac2012-06-21 13:37:35 -0400378
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500379ImageGroup = [
Matthew Treinish72ea4422013-02-07 14:42:49 -0500380 cfg.StrOpt('catalog_type',
381 default='image',
Sean Dague83401992013-05-06 17:46:36 -0400382 help='Catalog type of the Image service.'),
Arata Notsu8f440392013-09-13 16:14:20 +0900383 cfg.StrOpt('region',
384 default='',
385 help="The image region name to use. If empty, the value "
386 "of identity.region is used instead. If no such region "
387 "is found in the service catalog, the first found one is "
388 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000389 cfg.StrOpt('endpoint_type',
390 default='publicURL',
391 choices=['public', 'admin', 'internal',
392 'publicURL', 'adminURL', 'internalURL'],
393 help="The endpoint type to use for the image service."),
Sean Dague83401992013-05-06 17:46:36 -0400394 cfg.StrOpt('http_image',
395 default='http://download.cirros-cloud.net/0.3.1/'
396 'cirros-0.3.1-x86_64-uec.tar.gz',
Lucian Petrut1cfe2982015-01-06 13:57:36 +0200397 help='http accessible image'),
398 cfg.IntOpt('build_timeout',
399 default=300,
400 help="Timeout in seconds to wait for an image to "
401 "become available."),
402 cfg.IntOpt('build_interval',
403 default=1,
404 help="Time in seconds between image operation status "
405 "checks.")
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500406]
Jay Pipesf38eaac2012-06-21 13:37:35 -0400407
Matthew Treinish2b5287d2013-10-22 17:40:34 +0000408image_feature_group = cfg.OptGroup(name='image-feature-enabled',
409 title='Enabled image service features')
410
411ImageFeaturesGroup = [
412 cfg.BoolOpt('api_v2',
413 default=True,
414 help="Is the v2 image API enabled"),
415 cfg.BoolOpt('api_v1',
416 default=True,
417 help="Is the v1 image API enabled"),
418]
Jay Pipesf38eaac2012-06-21 13:37:35 -0400419
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500420network_group = cfg.OptGroup(name='network',
421 title='Network Service Options')
Daryl Walleck587385b2012-03-03 13:00:26 -0600422
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500423NetworkGroup = [
424 cfg.StrOpt('catalog_type',
425 default='network',
Mark McClainf2982e82013-07-06 17:48:03 -0400426 help='Catalog type of the Neutron service.'),
Arata Notsu8f440392013-09-13 16:14:20 +0900427 cfg.StrOpt('region',
428 default='',
429 help="The network region name to use. If empty, the value "
430 "of identity.region is used instead. If no such region "
431 "is found in the service catalog, the first found one is "
432 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000433 cfg.StrOpt('endpoint_type',
434 default='publicURL',
435 choices=['public', 'admin', 'internal',
436 'publicURL', 'adminURL', 'internalURL'],
437 help="The endpoint type to use for the network service."),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500438 cfg.StrOpt('tenant_network_cidr',
439 default="10.100.0.0/16",
Henry Gessauffda37a2014-01-16 11:17:55 -0500440 help="The cidr block to allocate tenant ipv4 subnets from"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500441 cfg.IntOpt('tenant_network_mask_bits',
Attila Fazekas8ea181b2013-07-13 16:26:14 +0200442 default=28,
Henry Gessauffda37a2014-01-16 11:17:55 -0500443 help="The mask bits for tenant ipv4 subnets"),
444 cfg.StrOpt('tenant_network_v6_cidr',
Sergey Shnaidman1f3659a2014-08-27 18:26:42 +0400445 default="2003::/48",
Henry Gessauffda37a2014-01-16 11:17:55 -0500446 help="The cidr block to allocate tenant ipv6 subnets from"),
447 cfg.IntOpt('tenant_network_v6_mask_bits',
Sergey Shnaidman1f3659a2014-08-27 18:26:42 +0400448 default=64,
Henry Gessauffda37a2014-01-16 11:17:55 -0500449 help="The mask bits for tenant ipv6 subnets"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500450 cfg.BoolOpt('tenant_networks_reachable',
451 default=False,
452 help="Whether tenant network connectivity should be "
453 "evaluated directly"),
454 cfg.StrOpt('public_network_id',
455 default="",
456 help="Id of the public network that provides external "
457 "connectivity"),
458 cfg.StrOpt('public_router_id',
459 default="",
460 help="Id of the public router that provides external "
Yair Fried1eb27f52014-11-10 15:24:19 +0200461 "connectivity. This should only be used when Neutron's "
462 "'allow_overlapping_ips' is set to 'False' in "
463 "neutron.conf. usually not needed past 'Grizzly' release"),
izikpensod9a01a62014-02-17 20:02:32 +0200464 cfg.IntOpt('build_timeout',
465 default=300,
466 help="Timeout in seconds to wait for network operation to "
467 "complete."),
468 cfg.IntOpt('build_interval',
Sean Dague82190852014-05-24 07:42:59 -0400469 default=1,
izikpensod9a01a62014-02-17 20:02:32 +0200470 help="Time in seconds between network operation status "
471 "checks."),
Attila Fazekas640392b2014-06-12 15:58:10 +0200472 cfg.ListOpt('dns_servers',
473 default=["8.8.8.8", "8.8.4.4"],
Itzik Brown5be44582014-12-24 09:05:13 +0200474 help="List of dns servers which should be used"
Itzik Brown2ca01cd2014-12-08 12:58:20 +0200475 " for subnet creation"),
476 cfg.StrOpt('port_vnic_type',
477 choices=[None, 'normal', 'direct', 'macvtap'],
478 help="vnic_type to use when Launching instances"
479 " with pre-configured ports."
480 " Supported ports are:"
481 " ['normal','direct','macvtap']"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500482]
Jay Pipes3f981df2012-03-27 18:59:44 -0400483
Matthew Treinishe3d26142013-11-26 19:14:58 +0000484network_feature_group = cfg.OptGroup(name='network-feature-enabled',
485 title='Enabled network service features')
486
487NetworkFeaturesGroup = [
Matthew Treinishe2e33cf2014-03-03 19:28:41 +0000488 cfg.BoolOpt('ipv6',
489 default=True,
490 help="Allow the execution of IPv6 tests"),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000491 cfg.ListOpt('api_extensions',
492 default=['all'],
Zhi Kun Liude25c022014-02-14 13:25:19 +0800493 help='A list of enabled network extensions with a special '
Simeon Monov5d7effe2014-07-16 07:32:38 +0300494 'entry all which indicates every extension is enabled. '
495 'Empty list indicates all extensions are disabled'),
Sean M. Collinsdd27a4d2014-05-13 10:33:15 -0400496 cfg.BoolOpt('ipv6_subnet_attributes',
497 default=False,
498 help="Allow the execution of IPv6 subnet tests that use "
499 "the extended IPv6 attributes ipv6_ra_mode "
500 "and ipv6_address_mode"
Mark McClain6e07c0d2014-10-10 11:25:03 -0400501 ),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000502]
503
Victoria Martínez de la Cruz1173b6e2014-09-22 18:32:13 -0300504messaging_group = cfg.OptGroup(name='messaging',
505 title='Messaging Service')
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500506
Victoria Martínez de la Cruz1173b6e2014-09-22 18:32:13 -0300507MessagingGroup = [
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500508 cfg.StrOpt('catalog_type',
Victoria Martínez de la Cruz1173b6e2014-09-22 18:32:13 -0300509 default='messaging',
510 help='Catalog type of the Messaging service.'),
Jorge Chai83ba4ee2014-04-15 18:58:08 +0000511 cfg.IntOpt('max_queues_per_page',
512 default=20,
513 help='The maximum number of queue records per page when '
514 'listing queues'),
Malini Kamalambal7458b4b2014-05-29 11:47:28 -0400515 cfg.IntOpt('max_queue_metadata',
516 default=65536,
517 help='The maximum metadata size for a queue'),
518 cfg.IntOpt('max_messages_per_page',
519 default=20,
520 help='The maximum number of queue message per page when '
521 'listing (or) posting messages'),
522 cfg.IntOpt('max_message_size',
523 default=262144,
524 help='The maximum size of a message body'),
525 cfg.IntOpt('max_messages_per_claim',
526 default=20,
527 help='The maximum number of messages per claim'),
528 cfg.IntOpt('max_message_ttl',
529 default=1209600,
530 help='The maximum ttl for a message'),
531 cfg.IntOpt('max_claim_ttl',
532 default=43200,
533 help='The maximum ttl for a claim'),
534 cfg.IntOpt('max_claim_grace',
535 default=43200,
536 help='The maximum grace period for a claim'),
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500537]
538
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500539volume_group = cfg.OptGroup(name='volume',
540 title='Block Storage Options')
Daryl Walleck587385b2012-03-03 13:00:26 -0600541
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500542VolumeGroup = [
543 cfg.IntOpt('build_interval',
Sean Dague82190852014-05-24 07:42:59 -0400544 default=1,
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500545 help='Time in seconds between volume availability checks.'),
546 cfg.IntOpt('build_timeout',
547 default=300,
Eric Harney9b1f89c2014-10-14 14:40:19 -0400548 help='Timeout in seconds to wait for a volume to become '
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500549 'available.'),
550 cfg.StrOpt('catalog_type',
Matthew Treinisheb724512013-10-25 15:12:59 +0000551 default='volume',
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500552 help="Catalog type of the Volume Service"),
Arata Notsu8f440392013-09-13 16:14:20 +0900553 cfg.StrOpt('region',
554 default='',
555 help="The volume region name to use. If empty, the value "
556 "of identity.region is used instead. If no such region "
557 "is found in the service catalog, the first found one is "
558 "used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000559 cfg.StrOpt('endpoint_type',
560 default='publicURL',
561 choices=['public', 'admin', 'internal',
562 'publicURL', 'adminURL', 'internalURL'],
563 help="The endpoint type to use for the volume service."),
Jérôme Gallard86551ce2013-03-08 11:41:26 +0100564 cfg.StrOpt('backend1_name',
Giulio Fidentef4fa8942013-05-28 18:48:03 +0200565 default='BACKEND_1',
Jérôme Gallard86551ce2013-03-08 11:41:26 +0100566 help="Name of the backend1 (must be declared in cinder.conf)"),
567 cfg.StrOpt('backend2_name',
Giulio Fidentef4fa8942013-05-28 18:48:03 +0200568 default='BACKEND_2',
Jérôme Gallard86551ce2013-03-08 11:41:26 +0100569 help="Name of the backend2 (must be declared in cinder.conf)"),
Adam Gandelman827ad332013-06-24 17:04:09 -0700570 cfg.StrOpt('storage_protocol',
571 default='iSCSI',
572 help='Backend protocol to target when creating volume types'),
573 cfg.StrOpt('vendor_name',
574 default='Open Source',
575 help='Backend vendor to target when creating volume types'),
Ryan Hsua67f4632013-08-29 16:03:06 -0700576 cfg.StrOpt('disk_format',
577 default='raw',
578 help='Disk format to use when copying a volume to image'),
Jerry Cai9733d0e2014-03-19 15:50:49 +0800579 cfg.IntOpt('volume_size',
580 default=1,
581 help='Default size in GB for volumes created by volumes tests'),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500582]
K Jonathan Harkerd6ba4b42012-12-18 13:50:47 -0800583
Matthew Treinishd5c96022013-10-17 21:51:23 +0000584volume_feature_group = cfg.OptGroup(name='volume-feature-enabled',
585 title='Enabled Cinder Features')
586
587VolumeFeaturesGroup = [
588 cfg.BoolOpt('multi_backend',
589 default=False,
Matthew Treinishe3d26142013-11-26 19:14:58 +0000590 help="Runs Cinder multi-backend test (requires 2 backends)"),
Giulio Fidente74b08ad2014-01-18 04:02:51 +0100591 cfg.BoolOpt('backup',
592 default=True,
593 help='Runs Cinder volumes backup test'),
JordanPbce55532014-03-19 12:10:32 +0100594 cfg.BoolOpt('snapshot',
595 default=True,
596 help='Runs Cinder volume snapshot test'),
Matthew Treinishe3d26142013-11-26 19:14:58 +0000597 cfg.ListOpt('api_extensions',
598 default=['all'],
Zhi Kun Liude25c022014-02-14 13:25:19 +0800599 help='A list of enabled volume extensions with a special '
Simeon Monov5d7effe2014-07-16 07:32:38 +0300600 'entry all which indicates every extension is enabled. '
601 'Empty list indicates all extensions are disabled'),
Zhi Kun Liubb363a22013-11-28 18:47:39 +0800602 cfg.BoolOpt('api_v1',
603 default=True,
604 help="Is the v1 volume API enabled"),
Zhi Kun Liu8cc3c842014-01-07 10:44:34 +0800605 cfg.BoolOpt('api_v2',
606 default=True,
607 help="Is the v2 volume API enabled"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000608]
609
Daryl Walleck587385b2012-03-03 13:00:26 -0600610
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500611object_storage_group = cfg.OptGroup(name='object-storage',
612 title='Object Storage Service Options')
Attila Fazekasa23f5002012-10-23 19:32:45 +0200613
DennyZhang1e71b612013-09-26 12:35:40 -0500614ObjectStoreGroup = [
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500615 cfg.StrOpt('catalog_type',
616 default='object-store',
617 help="Catalog type of the Object-Storage service."),
Arata Notsu8f440392013-09-13 16:14:20 +0900618 cfg.StrOpt('region',
619 default='',
620 help="The object-storage region name to use. If empty, the "
621 "value of identity.region is used instead. If no such "
622 "region is found in the service catalog, the first found "
623 "one is used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000624 cfg.StrOpt('endpoint_type',
625 default='publicURL',
626 choices=['public', 'admin', 'internal',
627 'publicURL', 'adminURL', 'internalURL'],
628 help="The endpoint type to use for the object-store service."),
Matthew Treinishf319a732013-10-24 21:39:24 +0000629 cfg.IntOpt('container_sync_timeout',
Daisuke Morita1ac3ee02014-08-25 12:59:18 +0900630 default=600,
Fabien Boucher2178d312013-12-31 15:38:57 +0100631 help="Number of seconds to time on waiting for a container "
nayna-patelb4989b32013-01-09 06:25:13 +0000632 "to container synchronization complete."),
Matthew Treinishf319a732013-10-24 21:39:24 +0000633 cfg.IntOpt('container_sync_interval',
nayna-patelb4989b32013-01-09 06:25:13 +0000634 default=5,
Fabien Boucher2178d312013-12-31 15:38:57 +0100635 help="Number of seconds to wait while looping to check the "
nayna-patelb4989b32013-01-09 06:25:13 +0000636 "status of a container to container synchronization"),
Matthew Treinish3fdb80c2013-08-15 11:13:19 -0400637 cfg.StrOpt('operator_role',
638 default='Member',
639 help="Role to add to users created for swift tests to "
640 "enable creating containers"),
Matthew Treinish998c91d2014-03-01 12:39:49 -0500641 cfg.StrOpt('reseller_admin_role',
642 default='ResellerAdmin',
643 help="User role that has reseller admin"),
Daisuke Morita1ac3ee02014-08-25 12:59:18 +0900644 cfg.StrOpt('realm_name',
645 default='realm1',
646 help="Name of sync realm. A sync realm is a set of clusters "
647 "that have agreed to allow container syncing with each "
648 "other. Set the same realm name as Swift's "
649 "container-sync-realms.conf"),
650 cfg.StrOpt('cluster_name',
651 default='name1',
652 help="One name of cluster which is set in the realm whose name "
653 "is set in 'realm_name' item in this file. Set the "
654 "same cluster name as Swift's container-sync-realms.conf"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500655]
Attila Fazekasa23f5002012-10-23 19:32:45 +0200656
Matthew Treinishd5c96022013-10-17 21:51:23 +0000657object_storage_feature_group = cfg.OptGroup(
658 name='object-storage-feature-enabled',
659 title='Enabled object-storage features')
660
661ObjectStoreFeaturesGroup = [
Matthew Treinish20345382013-12-13 17:04:23 +0000662 cfg.ListOpt('discoverable_apis',
663 default=['all'],
664 help="A list of the enabled optional discoverable apis. "
665 "A single entry, all, indicates that all of these "
666 "features are expected to be enabled"),
Daisuke Morita20a183f2014-08-25 14:43:36 +0900667 cfg.BoolOpt('container_sync',
668 default=True,
669 help="Execute (old style) container-sync tests"),
670 cfg.BoolOpt('object_versioning',
671 default=True,
672 help="Execute object-versioning tests"),
673 cfg.BoolOpt('discoverability',
674 default=True,
675 help="Execute discoverability tests"),
Matthew Treinishd5c96022013-10-17 21:51:23 +0000676]
677
Nikhil Manchandadd6886f2014-03-03 01:58:45 -0800678database_group = cfg.OptGroup(name='database',
679 title='Database Service Options')
680
681DatabaseGroup = [
682 cfg.StrOpt('catalog_type',
683 default='database',
684 help="Catalog type of the Database service."),
685 cfg.StrOpt('db_flavor_ref',
686 default="1",
687 help="Valid primary flavor to use in database tests."),
Peter Stachowski320f9c72014-04-21 16:13:23 -0400688 cfg.StrOpt('db_current_version',
689 default="v1.0",
690 help="Current database version to use in database tests."),
Nikhil Manchandadd6886f2014-03-03 01:58:45 -0800691]
Attila Fazekasa23f5002012-10-23 19:32:45 +0200692
Steve Bakerc60e4e32013-05-06 15:22:41 +1200693orchestration_group = cfg.OptGroup(name='orchestration',
694 title='Orchestration Service Options')
695
696OrchestrationGroup = [
697 cfg.StrOpt('catalog_type',
698 default='orchestration',
699 help="Catalog type of the Orchestration service."),
Arata Notsu8f440392013-09-13 16:14:20 +0900700 cfg.StrOpt('region',
701 default='',
702 help="The orchestration region name to use. If empty, the "
703 "value of identity.region is used instead. If no such "
704 "region is found in the service catalog, the first found "
705 "one is used."),
JordanP5d29b2c2013-12-18 13:56:03 +0000706 cfg.StrOpt('endpoint_type',
707 default='publicURL',
708 choices=['public', 'admin', 'internal',
709 'publicURL', 'adminURL', 'internalURL'],
710 help="The endpoint type to use for the orchestration service."),
Matthew Treinishdb9721d2015-03-18 14:21:28 -0400711 cfg.StrOpt('stack_owner_role', default='heat_stack_owner',
712 help='Role required for users to be able to manage stacks'),
Steve Bakerc60e4e32013-05-06 15:22:41 +1200713 cfg.IntOpt('build_interval',
714 default=1,
715 help="Time in seconds between build status checks."),
716 cfg.IntOpt('build_timeout',
Matthew Treinisha2dfd492014-04-15 11:15:34 -0400717 default=1200,
Steve Bakerc60e4e32013-05-06 15:22:41 +1200718 help="Timeout in seconds to wait for a stack to build."),
Steve Bakerc60e4e32013-05-06 15:22:41 +1200719 cfg.StrOpt('instance_type',
Steve Baker9e86b832013-05-22 15:40:28 +1200720 default='m1.micro',
Steve Bakerc60e4e32013-05-06 15:22:41 +1200721 help="Instance type for tests. Needs to be big enough for a "
722 "full OS plus the test workload"),
Steve Bakerc60e4e32013-05-06 15:22:41 +1200723 cfg.StrOpt('keypair_name',
Steve Bakerc60e4e32013-05-06 15:22:41 +1200724 help="Name of existing keypair to launch servers with."),
Clint Byrum71f27632013-09-09 11:41:32 -0700725 cfg.IntOpt('max_template_size',
Joe Gordon0e51b222013-10-24 14:11:10 +0100726 default=524288,
Clint Byrum71f27632013-09-09 11:41:32 -0700727 help="Value must match heat configuration of the same name."),
Steven Hardyfdc6bd72014-03-21 16:56:04 +0000728 cfg.IntOpt('max_resources_per_stack',
729 default=1000,
730 help="Value must match heat configuration of the same name."),
Steve Bakerc60e4e32013-05-06 15:22:41 +1200731]
732
733
Yassine Lamgarchalb158d412013-12-27 19:29:42 +0100734telemetry_group = cfg.OptGroup(name='telemetry',
735 title='Telemetry Service Options')
736
737TelemetryGroup = [
738 cfg.StrOpt('catalog_type',
739 default='metering',
740 help="Catalog type of the Telemetry service."),
JordanPfc62c902014-02-26 14:47:28 +0000741 cfg.StrOpt('endpoint_type',
742 default='publicURL',
743 choices=['public', 'admin', 'internal',
744 'publicURL', 'adminURL', 'internalURL'],
745 help="The endpoint type to use for the telemetry service."),
Vadim Rovachev7bcea352013-12-26 15:56:17 +0400746 cfg.BoolOpt('too_slow_to_test',
747 default=True,
748 help="This variable is used as flag to enable "
749 "notification tests")
Yassine Lamgarchalb158d412013-12-27 19:29:42 +0100750]
751
752
Julie Pichond1017642013-07-24 16:37:23 +0100753dashboard_group = cfg.OptGroup(name="dashboard",
754 title="Dashboard options")
755
756DashboardGroup = [
757 cfg.StrOpt('dashboard_url',
758 default='http://localhost/',
759 help="Where the dashboard can be found"),
760 cfg.StrOpt('login_url',
761 default='http://localhost/auth/login/',
762 help="Login page for the dashboard"),
763]
764
765
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +0400766data_processing_group = cfg.OptGroup(name="data_processing",
767 title="Data Processing options")
768
769DataProcessingGroup = [
770 cfg.StrOpt('catalog_type',
771 default='data_processing',
JordanPfc62c902014-02-26 14:47:28 +0000772 help="Catalog type of the data processing service."),
773 cfg.StrOpt('endpoint_type',
774 default='publicURL',
775 choices=['public', 'admin', 'internal',
776 'publicURL', 'adminURL', 'internalURL'],
777 help="The endpoint type to use for the data processing "
778 "service."),
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +0400779]
780
781
Luigi Toscano14d172d2015-01-23 16:37:47 +0100782data_processing_feature_group = cfg.OptGroup(
783 name="data_processing-feature-enabled",
784 title="Enabled Data Processing features")
785
786DataProcessingFeaturesGroup = [
787 cfg.ListOpt('plugins',
788 default=["vanilla", "hdp"],
789 help="List of enabled data processing plugins")
790]
791
792
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500793boto_group = cfg.OptGroup(name='boto',
794 title='EC2/S3 options')
DennyZhang1e71b612013-09-26 12:35:40 -0500795BotoGroup = [
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500796 cfg.StrOpt('ec2_url',
797 default="http://localhost:8773/services/Cloud",
798 help="EC2 URL"),
799 cfg.StrOpt('s3_url',
800 default="http://localhost:8080",
801 help="S3 URL"),
802 cfg.StrOpt('aws_secret',
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500803 help="AWS Secret Key",
804 secret=True),
805 cfg.StrOpt('aws_access',
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500806 help="AWS Access Key"),
Attila Fazekas27dd92e2014-02-21 14:49:40 +0100807 cfg.StrOpt('aws_zone',
808 default="nova",
809 help="AWS Zone for EC2 tests"),
Matthew Treinish39e48ef2012-12-21 13:36:15 -0500810 cfg.StrOpt('s3_materials_path',
811 default="/opt/stack/devstack/files/images/"
812 "s3-materials/cirros-0.3.0",
813 help="S3 Materials Path"),
814 cfg.StrOpt('ari_manifest',
815 default="cirros-0.3.0-x86_64-initrd.manifest.xml",
816 help="ARI Ramdisk Image manifest"),
817 cfg.StrOpt('ami_manifest',
818 default="cirros-0.3.0-x86_64-blank.img.manifest.xml",
819 help="AMI Machine Image manifest"),
820 cfg.StrOpt('aki_manifest',
821 default="cirros-0.3.0-x86_64-vmlinuz.manifest.xml",
822 help="AKI Kernel Image manifest"),
823 cfg.StrOpt('instance_type',
824 default="m1.tiny",
825 help="Instance type"),
826 cfg.IntOpt('http_socket_timeout',
827 default=3,
828 help="boto Http socket timeout"),
829 cfg.IntOpt('num_retries',
830 default=1,
831 help="boto num_retries on error"),
832 cfg.IntOpt('build_timeout',
833 default=60,
834 help="Status Change Timeout"),
835 cfg.IntOpt('build_interval',
836 default=1,
837 help="Status Change Test Interval"),
838]
Attila Fazekasf7f2d932012-12-13 09:14:38 +0100839
Matthew Treinish615ea6a2013-02-25 17:26:59 -0500840stress_group = cfg.OptGroup(name='stress', title='Stress Test Options')
841
842StressGroup = [
843 cfg.StrOpt('nova_logdir',
Matthew Treinish615ea6a2013-02-25 17:26:59 -0500844 help='Directory containing log files on the compute nodes'),
845 cfg.IntOpt('max_instances',
846 default=16,
847 help='Maximum number of instances to create during test.'),
848 cfg.StrOpt('controller',
David Kranzb9d97502013-05-01 15:55:04 -0400849 help='Controller host.'),
850 # new stress options
851 cfg.StrOpt('target_controller',
David Kranzb9d97502013-05-01 15:55:04 -0400852 help='Controller host.'),
853 cfg.StrOpt('target_ssh_user',
David Kranzb9d97502013-05-01 15:55:04 -0400854 help='ssh user.'),
855 cfg.StrOpt('target_private_key_path',
David Kranzb9d97502013-05-01 15:55:04 -0400856 help='Path to private key.'),
857 cfg.StrOpt('target_logfiles',
David Kranzb9d97502013-05-01 15:55:04 -0400858 help='regexp for list of log files.'),
Matthew Treinishf319a732013-10-24 21:39:24 +0000859 cfg.IntOpt('log_check_interval',
David Kranzb9d97502013-05-01 15:55:04 -0400860 default=60,
Marc Koderer32221b8e2013-08-23 13:57:50 +0200861 help='time (in seconds) between log file error checks.'),
Matthew Treinishf319a732013-10-24 21:39:24 +0000862 cfg.IntOpt('default_thread_number_per_action',
Marc Koderer32221b8e2013-08-23 13:57:50 +0200863 default=4,
Julien Leloup04d40f72014-01-28 11:17:18 +0100864 help='The number of threads created while stress test.'),
865 cfg.BoolOpt('leave_dirty_stack',
866 default=False,
867 help='Prevent the cleaning (tearDownClass()) between'
868 ' each stress test run if an exception occurs'
Julien Leloupa5ee5422014-02-13 14:29:02 +0100869 ' during this run.'),
870 cfg.BoolOpt('full_clean_stack',
871 default=False,
872 help='Allows a full cleaning process after a stress test.'
873 ' Caution : this cleanup will remove every objects of'
874 ' every tenant.')
Matthew Treinish615ea6a2013-02-25 17:26:59 -0500875]
876
877
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +0900878scenario_group = cfg.OptGroup(name='scenario', title='Scenario Test Options')
879
880ScenarioGroup = [
881 cfg.StrOpt('img_dir',
882 default='/opt/stack/new/devstack/files/images/'
883 'cirros-0.3.1-x86_64-uec',
884 help='Directory containing image files'),
Alessandro Pilottib7c1daa2014-08-16 14:24:13 +0300885 cfg.StrOpt('img_file', deprecated_name='qcow2_img_file',
Masayuki Igawa4f71bf02014-02-21 14:02:29 +0900886 default='cirros-0.3.1-x86_64-disk.img',
Alessandro Pilottib7c1daa2014-08-16 14:24:13 +0300887 help='Image file name'),
888 cfg.StrOpt('img_disk_format',
889 default='qcow2',
890 help='Image disk format'),
891 cfg.StrOpt('img_container_format',
892 default='bare',
893 help='Image container format'),
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +0900894 cfg.StrOpt('ami_img_file',
895 default='cirros-0.3.1-x86_64-blank.img',
896 help='AMI image file name'),
897 cfg.StrOpt('ari_img_file',
898 default='cirros-0.3.1-x86_64-initrd',
899 help='ARI image file name'),
900 cfg.StrOpt('aki_img_file',
901 default='cirros-0.3.1-x86_64-vmlinuz',
902 help='AKI image file name'),
903 cfg.StrOpt('ssh_user',
904 default='cirros',
Joe Gordonb5e10cd2013-07-10 15:51:12 +0000905 help='ssh username for the image file'),
906 cfg.IntOpt(
907 'large_ops_number',
908 default=0,
909 help="specifies how many resources to request at once. Used "
Yair Fried413bf2d2014-11-19 17:07:11 +0200910 "for large operations testing."),
911 # TODO(yfried): add support for dhcpcd
912 cfg.StrOpt('dhcp_client',
913 default='udhcpc',
914 choices=["udhcpc", "dhclient"],
915 help='DHCP client used by images to renew DCHP lease. '
916 'If left empty, update operation will be skipped. '
917 'Supported clients: "udhcpc", "dhclient"')
Masayuki Igawa73d9f3a2013-05-24 10:30:01 +0900918]
919
920
Matthew Treinish4c412922013-07-16 15:27:42 -0400921service_available_group = cfg.OptGroup(name="service_available",
922 title="Available OpenStack Services")
923
924ServiceAvailableGroup = [
925 cfg.BoolOpt('cinder',
926 default=True,
927 help="Whether or not cinder is expected to be available"),
Matthew Treinishfaa340d2013-07-19 16:26:21 -0400928 cfg.BoolOpt('neutron',
929 default=False,
930 help="Whether or not neutron is expected to be available"),
Matthew Treinish853ae442013-07-19 16:36:07 -0400931 cfg.BoolOpt('glance',
932 default=True,
933 help="Whether or not glance is expected to be available"),
Matthew Treinish61e332b2013-07-19 16:42:31 -0400934 cfg.BoolOpt('swift',
935 default=True,
936 help="Whether or not swift is expected to be available"),
Matthew Treinish6b41e242013-07-19 16:49:28 -0400937 cfg.BoolOpt('nova',
938 default=True,
939 help="Whether or not nova is expected to be available"),
Matthew Treinisha9d43882013-07-19 16:54:52 -0400940 cfg.BoolOpt('heat',
941 default=False,
942 help="Whether or not Heat is expected to be available"),
Mehdi Abaakouk8581c0b2013-10-04 10:45:42 +0200943 cfg.BoolOpt('ceilometer',
944 default=True,
945 help="Whether or not Ceilometer is expected to be available"),
Julie Pichond1017642013-07-24 16:37:23 +0100946 cfg.BoolOpt('horizon',
947 default=True,
948 help="Whether or not Horizon is expected to be available"),
Sergey Lukjanov9c95a252014-03-13 23:59:22 +0400949 cfg.BoolOpt('sahara',
Sergey Lukjanovcec6c3f2013-12-10 12:38:21 +0400950 default=False,
Sergey Lukjanov9c95a252014-03-13 23:59:22 +0400951 help="Whether or not Sahara is expected to be available"),
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +0300952 cfg.BoolOpt('ironic',
953 default=False,
954 help="Whether or not Ironic is expected to be available"),
Nikhil Manchandadd6886f2014-03-03 01:58:45 -0800955 cfg.BoolOpt('trove',
956 default=False,
957 help="Whether or not Trove is expected to be available"),
Malini Kamalambal8681e922014-08-18 10:10:45 -0400958 cfg.BoolOpt('zaqar',
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500959 default=False,
Malini Kamalambal8681e922014-08-18 10:10:45 -0400960 help="Whether or not Zaqar is expected to be available"),
Matthew Treinish4c412922013-07-16 15:27:42 -0400961]
962
Attila Fazekasaeeeefd2013-08-06 17:01:56 +0200963debug_group = cfg.OptGroup(name="debug",
964 title="Debug System")
965
966DebugGroup = [
Sean Daguec522c092014-03-24 10:43:22 -0400967 cfg.StrOpt('trace_requests',
968 default='',
969 help="""A regex to determine which requests should be traced.
970
971This is a regex to match the caller for rest client requests to be able to
972selectively trace calls out of specific classes and methods. It largely
973exists for test development, and is not expected to be used in a real deploy
974of tempest. This will be matched against the discovered ClassName:method
975in the test environment.
976
977Expected values for this field are:
978
979 * ClassName:test_method_name - traces one test_method
980 * ClassName:setUp(Class) - traces specific setup functions
981 * ClassName:tearDown(Class) - traces specific teardown functions
982 * ClassName:_run_cleanups - traces the cleanup functions
983
984If nothing is specified, this feature is not enabled. To trace everything
985specify .* as the regex.
986""")
Attila Fazekasaeeeefd2013-08-06 17:01:56 +0200987]
988
Andrea Frittolif5da28b2013-12-06 07:08:07 +0000989input_scenario_group = cfg.OptGroup(name="input-scenario",
990 title="Filters and values for"
991 " input scenarios")
992
993InputScenarioGroup = [
994 cfg.StrOpt('image_regex',
995 default='^cirros-0.3.1-x86_64-uec$',
996 help="Matching images become parameters for scenario tests"),
997 cfg.StrOpt('flavor_regex',
Andrea Frittoli99901c02014-01-30 18:06:49 +0000998 default='^m1.nano$',
Andrea Frittolif5da28b2013-12-06 07:08:07 +0000999 help="Matching flavors become parameters for scenario tests"),
1000 cfg.StrOpt('non_ssh_image_regex',
1001 default='^.*[Ww]in.*$',
1002 help="SSH verification in tests is skipped"
1003 "for matching images"),
1004 cfg.StrOpt('ssh_user_regex',
1005 default="[[\"^.*[Cc]irros.*$\", \"root\"]]",
1006 help="List of user mapped to regex "
1007 "to matching image names."),
1008]
1009
Attila Fazekasaeeeefd2013-08-06 17:01:56 +02001010
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +03001011baremetal_group = cfg.OptGroup(name='baremetal',
Chris Hoge8f1401b2014-11-19 14:00:37 -08001012 title='Baremetal provisioning service options',
1013 help='When enabling baremetal tests, Nova '
1014 'must be configured to use the Ironic '
1015 'driver. The following paremeters for the '
1016 '[compute] section must be disabled: '
1017 'console_output, interface_attach, '
1018 'live_migration, pause, rescue, resize '
1019 'shelve, snapshot, and suspend')
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +03001020
1021BaremetalGroup = [
1022 cfg.StrOpt('catalog_type',
1023 default='baremetal',
Adam Gandelman4a48a602014-03-20 18:23:18 -07001024 help="Catalog type of the baremetal provisioning service"),
1025 cfg.BoolOpt('driver_enabled',
1026 default=False,
1027 help="Whether the Ironic nova-compute driver is enabled"),
Yuiko Takada1ee1b322014-07-04 09:55:30 +09001028 cfg.StrOpt('driver',
1029 default='fake',
1030 help="Driver name which Ironic uses"),
JordanPfc62c902014-02-26 14:47:28 +00001031 cfg.StrOpt('endpoint_type',
1032 default='publicURL',
1033 choices=['public', 'admin', 'internal',
1034 'publicURL', 'adminURL', 'internalURL'],
1035 help="The endpoint type to use for the baremetal provisioning "
Adam Gandelman4a48a602014-03-20 18:23:18 -07001036 "service"),
1037 cfg.IntOpt('active_timeout',
1038 default=300,
1039 help="Timeout for Ironic node to completely provision"),
1040 cfg.IntOpt('association_timeout',
Adam Gandelmane42f0922014-06-10 15:26:37 -07001041 default=30,
Adam Gandelman4a48a602014-03-20 18:23:18 -07001042 help="Timeout for association of Nova instance and Ironic "
1043 "node"),
1044 cfg.IntOpt('power_timeout',
Adam Gandelmane42f0922014-06-10 15:26:37 -07001045 default=60,
Adam Gandelman4a48a602014-03-20 18:23:18 -07001046 help="Timeout for Ironic power transitions."),
1047 cfg.IntOpt('unprovision_timeout',
Adam Gandelmane42f0922014-06-10 15:26:37 -07001048 default=60,
Adam Gandelman4a48a602014-03-20 18:23:18 -07001049 help="Timeout for unprovisioning an Ironic node.")
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +03001050]
1051
Matthew Treinishe2b56b52014-01-29 19:25:50 +00001052cli_group = cfg.OptGroup(name='cli', title="cli Configuration Options")
1053
1054CLIGroup = [
1055 cfg.BoolOpt('enabled',
1056 default=True,
1057 help="enable cli tests"),
1058 cfg.StrOpt('cli_dir',
1059 default='/usr/local/bin',
1060 help="directory where python client binaries are located"),
Sean Dague44b24682014-02-20 19:08:24 -05001061 cfg.BoolOpt('has_manage',
1062 default=True,
1063 help=("Whether the tempest run location has access to the "
1064 "*-manage commands. In a pure blackbox environment "
1065 "it will not.")),
Matthew Treinishe2b56b52014-01-29 19:25:50 +00001066 cfg.IntOpt('timeout',
1067 default=15,
1068 help="Number of seconds to wait on a CLI timeout"),
1069]
1070
Marc Koderer6ee82dc2014-02-17 10:26:29 +01001071negative_group = cfg.OptGroup(name='negative', title="Negative Test Options")
1072
1073NegativeGroup = [
1074 cfg.StrOpt('test_generator',
1075 default='tempest.common.' +
1076 'generator.negative_generator.NegativeTestGenerator',
1077 help="Test generator class for all negative tests"),
1078]
1079
Jon Grimm270bd7f2014-08-05 18:11:29 +00001080_opts = [
1081 (auth_group, AuthGroup),
1082 (compute_group, ComputeGroup),
1083 (compute_features_group, ComputeFeaturesGroup),
1084 (identity_group, IdentityGroup),
1085 (identity_feature_group, IdentityFeatureGroup),
1086 (image_group, ImageGroup),
1087 (image_feature_group, ImageFeaturesGroup),
1088 (network_group, NetworkGroup),
1089 (network_feature_group, NetworkFeaturesGroup),
1090 (messaging_group, MessagingGroup),
1091 (volume_group, VolumeGroup),
1092 (volume_feature_group, VolumeFeaturesGroup),
1093 (object_storage_group, ObjectStoreGroup),
1094 (object_storage_feature_group, ObjectStoreFeaturesGroup),
1095 (database_group, DatabaseGroup),
1096 (orchestration_group, OrchestrationGroup),
1097 (telemetry_group, TelemetryGroup),
1098 (dashboard_group, DashboardGroup),
1099 (data_processing_group, DataProcessingGroup),
Luigi Toscano14d172d2015-01-23 16:37:47 +01001100 (data_processing_feature_group, DataProcessingFeaturesGroup),
Jon Grimm270bd7f2014-08-05 18:11:29 +00001101 (boto_group, BotoGroup),
Jon Grimm270bd7f2014-08-05 18:11:29 +00001102 (stress_group, StressGroup),
1103 (scenario_group, ScenarioGroup),
1104 (service_available_group, ServiceAvailableGroup),
1105 (debug_group, DebugGroup),
1106 (baremetal_group, BaremetalGroup),
1107 (input_scenario_group, InputScenarioGroup),
1108 (cli_group, CLIGroup),
1109 (negative_group, NegativeGroup)
1110]
1111
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +03001112
Matthew Treinish43b296a2014-02-28 15:23:00 -05001113def register_opts():
Jon Grimm270bd7f2014-08-05 18:11:29 +00001114 for g, o in _opts:
Maru Newbyf440c292015-03-31 15:58:47 +00001115 register_opt_group(_CONF, g, o)
Jon Grimm270bd7f2014-08-05 18:11:29 +00001116
1117
1118def list_opts():
1119 """Return a list of oslo.config options available.
1120
1121 The purpose of this is to allow tools like the Oslo sample config file
1122 generator to discover the options exposed to users.
1123 """
Doug Hellmann583ce2c2015-03-11 14:55:46 +00001124 return [(g.name, o) for g, o in _opts]
Matthew Treinish43b296a2014-02-28 15:23:00 -05001125
1126
Sean Dague3b9b1f32013-12-20 17:04:54 -05001127# this should never be called outside of this class
1128class TempestConfigPrivate(object):
Daryl Walleck1465d612011-11-02 02:22:15 -05001129 """Provides OpenStack configuration information."""
1130
Brian Waldon738cd632011-12-12 18:45:09 -05001131 DEFAULT_CONFIG_DIR = os.path.join(
Zhongyue Luoa1343de2013-01-04 16:21:35 +08001132 os.path.abspath(os.path.dirname(os.path.dirname(__file__))),
Brian Waldon738cd632011-12-12 18:45:09 -05001133 "etc")
Daryl Walleck1465d612011-11-02 02:22:15 -05001134
Brian Waldon738cd632011-12-12 18:45:09 -05001135 DEFAULT_CONFIG_FILE = "tempest.conf"
1136
Andrea Frittolia96ee212014-08-15 18:34:20 +01001137 def __getattr__(self, attr):
1138 # Handles config options from the default group
Maru Newbyf440c292015-03-31 15:58:47 +00001139 return getattr(_CONF, attr)
Andrea Frittolia96ee212014-08-15 18:34:20 +01001140
Matthew Treinish43b296a2014-02-28 15:23:00 -05001141 def _set_attrs(self):
Maru Newbyf440c292015-03-31 15:58:47 +00001142 self.auth = _CONF.auth
1143 self.compute = _CONF.compute
1144 self.compute_feature_enabled = _CONF['compute-feature-enabled']
1145 self.identity = _CONF.identity
1146 self.identity_feature_enabled = _CONF['identity-feature-enabled']
1147 self.image = _CONF.image
1148 self.image_feature_enabled = _CONF['image-feature-enabled']
1149 self.network = _CONF.network
1150 self.network_feature_enabled = _CONF['network-feature-enabled']
1151 self.volume = _CONF.volume
1152 self.volume_feature_enabled = _CONF['volume-feature-enabled']
1153 self.object_storage = _CONF['object-storage']
1154 self.object_storage_feature_enabled = _CONF[
Matthew Treinishd5c96022013-10-17 21:51:23 +00001155 'object-storage-feature-enabled']
Maru Newbyf440c292015-03-31 15:58:47 +00001156 self.database = _CONF.database
1157 self.orchestration = _CONF.orchestration
1158 self.messaging = _CONF.messaging
1159 self.telemetry = _CONF.telemetry
1160 self.dashboard = _CONF.dashboard
1161 self.data_processing = _CONF.data_processing
1162 self.data_processing_feature_enabled = _CONF[
Luigi Toscano14d172d2015-01-23 16:37:47 +01001163 'data_processing-feature-enabled']
Maru Newbyf440c292015-03-31 15:58:47 +00001164 self.boto = _CONF.boto
1165 self.stress = _CONF.stress
1166 self.scenario = _CONF.scenario
1167 self.service_available = _CONF.service_available
1168 self.debug = _CONF.debug
1169 self.baremetal = _CONF.baremetal
1170 self.input_scenario = _CONF['input-scenario']
1171 self.cli = _CONF.cli
1172 self.negative = _CONF.negative
1173 _CONF.set_default('domain_name', self.identity.admin_domain_name,
1174 group='identity')
1175 _CONF.set_default('alt_domain_name', self.identity.admin_domain_name,
1176 group='identity')
Sean Dague86bd8422013-12-20 09:56:44 -05001177
Joe Gordon28a84ae2014-07-17 15:38:28 +00001178 def __init__(self, parse_conf=True, config_path=None):
Matthew Treinish43b296a2014-02-28 15:23:00 -05001179 """Initialize a configuration from a conf directory and conf file."""
1180 super(TempestConfigPrivate, self).__init__()
1181 config_files = []
1182 failsafe_path = "/etc/tempest/" + self.DEFAULT_CONFIG_FILE
1183
Joe Gordon28a84ae2014-07-17 15:38:28 +00001184 if config_path:
1185 path = config_path
1186 else:
1187 # Environment variables override defaults...
1188 conf_dir = os.environ.get('TEMPEST_CONFIG_DIR',
1189 self.DEFAULT_CONFIG_DIR)
1190 conf_file = os.environ.get('TEMPEST_CONFIG',
1191 self.DEFAULT_CONFIG_FILE)
Matthew Treinish43b296a2014-02-28 15:23:00 -05001192
Joe Gordon28a84ae2014-07-17 15:38:28 +00001193 path = os.path.join(conf_dir, conf_file)
Matthew Treinish43b296a2014-02-28 15:23:00 -05001194
1195 if not os.path.isfile(path):
1196 path = failsafe_path
1197
1198 # only parse the config file if we expect one to exist. This is needed
1199 # to remove an issue with the config file up to date checker.
1200 if parse_conf:
1201 config_files.append(path)
Maru Newbyf440c292015-03-31 15:58:47 +00001202 logging.register_options(_CONF)
Matthew Treinish5440a402014-10-02 14:36:16 -04001203 if os.path.isfile(path):
Maru Newbyf440c292015-03-31 15:58:47 +00001204 _CONF([], project='tempest', default_config_files=config_files)
Matthew Treinish5440a402014-10-02 14:36:16 -04001205 else:
Maru Newbyf440c292015-03-31 15:58:47 +00001206 _CONF([], project='tempest')
1207 logging.setup(_CONF, 'tempest')
Matthew Treinish43b296a2014-02-28 15:23:00 -05001208 LOG = logging.getLogger('tempest')
1209 LOG.info("Using tempest config file %s" % path)
1210 register_opts()
1211 self._set_attrs()
Masayuki Igawa9ec4cd82014-02-05 15:04:16 +09001212 if parse_conf:
Maru Newbyf440c292015-03-31 15:58:47 +00001213 _CONF.log_opt_values(LOG, std_logging.DEBUG)
Masayuki Igawa9ec4cd82014-02-05 15:04:16 +09001214
Sean Dague86bd8422013-12-20 09:56:44 -05001215
1216class TempestConfigProxy(object):
1217 _config = None
Joe Gordon28a84ae2014-07-17 15:38:28 +00001218 _path = None
Sean Dague86bd8422013-12-20 09:56:44 -05001219
Sean Daguedb6ac6c2014-06-06 16:52:44 -04001220 _extra_log_defaults = [
Doug Hellmann583ce2c2015-03-11 14:55:46 +00001221 ('paramiko.transport', std_logging.INFO),
1222 ('requests.packages.urllib3.connectionpool', std_logging.WARN),
Sean Daguedb6ac6c2014-06-06 16:52:44 -04001223 ]
1224
1225 def _fix_log_levels(self):
1226 """Tweak the oslo log defaults."""
Doug Hellmann583ce2c2015-03-11 14:55:46 +00001227 for name, level in self._extra_log_defaults:
1228 std_logging.getLogger(name).setLevel(level)
Sean Daguedb6ac6c2014-06-06 16:52:44 -04001229
Sean Dague86bd8422013-12-20 09:56:44 -05001230 def __getattr__(self, attr):
1231 if not self._config:
Sean Daguedb6ac6c2014-06-06 16:52:44 -04001232 self._fix_log_levels()
Joe Gordon28a84ae2014-07-17 15:38:28 +00001233 self._config = TempestConfigPrivate(config_path=self._path)
Sean Dague86bd8422013-12-20 09:56:44 -05001234
1235 return getattr(self._config, attr)
1236
Joe Gordon28a84ae2014-07-17 15:38:28 +00001237 def set_config_path(self, path):
1238 self._path = path
1239
Sean Dague86bd8422013-12-20 09:56:44 -05001240
1241CONF = TempestConfigProxy()