blob: 524c0fabeeb6a21d121a97ac230ea2c7861a5567 [file] [log] [blame]
Matthew Treinisha970d652015-03-11 15:39:24 -04001.. _tempest-configuration:
2
Matthew Treinishbc1b15b2015-02-20 15:56:07 -05003Tempest Configuration Guide
4===========================
5
Eric Friede0cfc3e2015-12-14 16:10:49 -06006This guide is a starting point for configuring Tempest. It aims to elaborate
Matthew Treinishf640f662015-03-11 15:13:30 -04007on and explain some of the mandatory and common configuration settings and how
8they are used in conjunction. The source of truth on each option is the sample
Matthew Treinishf45ba2e2015-08-24 15:05:01 -04009config file which explains the purpose of each individual option. You can see
10the sample config file here: :ref:`tempest-sampleconf`
Matthew Treinishf640f662015-03-11 15:13:30 -040011
Matthew Treinishbc1b15b2015-02-20 15:56:07 -050012Auth/Credentials
13----------------
14
Eric Friede0cfc3e2015-12-14 16:10:49 -060015Tempest currently has two different ways in configuration to provide credentials
16to use when running Tempest. One is a traditional set of configuration options
17in the tempest.conf file. These options are clearly labelled in the ``identity``
18section and let you specify a set of credentials for a regular user, a global
19admin user, and an alternate user, consisting of a username, password, and
20project/tenant name.
Matthew Treinishbc1b15b2015-02-20 15:56:07 -050021
22The other method to provide credentials is using the accounts.yaml file. This
23file is used to specify an arbitrary number of users available to run tests
Eric Friede0cfc3e2015-12-14 16:10:49 -060024with. You can specify the location of the file in the ``auth`` section in the
25tempest.conf file. To see the specific format used in the file please refer to
26the accounts.yaml.sample file included in Tempest. Eventually the config
27options for providing credentials to Tempest will be deprecated and removed in
28favor of the accounts.yaml file.
Matthew Treinishbc1b15b2015-02-20 15:56:07 -050029
Matthew Treinish7909e122015-04-15 15:43:50 -040030Keystone Connection Info
31^^^^^^^^^^^^^^^^^^^^^^^^
Eric Friede0cfc3e2015-12-14 16:10:49 -060032In order for Tempest to be able to talk to your OpenStack deployment you need
Matthew Treinish7909e122015-04-15 15:43:50 -040033to provide it with information about how it communicates with keystone.
Eric Friede0cfc3e2015-12-14 16:10:49 -060034This involves configuring the following options in the ``identity`` section:
Matthew Treinish7909e122015-04-15 15:43:50 -040035
Eric Friede0cfc3e2015-12-14 16:10:49 -060036 #. ``auth_version``
37 #. ``uri``
38 #. ``uri_v3``
Matthew Treinish7909e122015-04-15 15:43:50 -040039
Eric Friede0cfc3e2015-12-14 16:10:49 -060040The ``auth_version`` option is used to tell Tempest whether it should be using
Matthew Treinish7909e122015-04-15 15:43:50 -040041keystone's v2 or v3 api for communicating with keystone. (except for the
Eric Friede0cfc3e2015-12-14 16:10:49 -060042identity api tests which will test a specific version) The two uri options are
43used to tell Tempest the url of the keystone endpoint. The ``uri`` option is
44used for keystone v2 request and ``uri_v3`` is used for keystone v3. You want to
45ensure that which ever version you set for ``auth_version`` has its uri option
46defined.
Matthew Treinish7909e122015-04-15 15:43:50 -040047
48
Matthew Treinishbc1b15b2015-02-20 15:56:07 -050049Credential Provider Mechanisms
50^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
51
Eric Friede0cfc3e2015-12-14 16:10:49 -060052Tempest currently also has three different internal methods for providing
53authentication to tests: dynamic credentials, locking test accounts, and
Matthew Treinishbc1b15b2015-02-20 15:56:07 -050054non-locking test accounts. Depending on which one is in use the configuration
Eric Friede0cfc3e2015-12-14 16:10:49 -060055of Tempest is slightly different.
Matthew Treinishbc1b15b2015-02-20 15:56:07 -050056
Andrea Frittoli (andreaf)17209bb2015-05-22 10:16:57 -070057Dynamic Credentials
58"""""""""""""""""""
59Dynamic Credentials (formerly known as Tenant isolation) was originally created
Eric Friede0cfc3e2015-12-14 16:10:49 -060060to enable running Tempest in parallel. For each test class it creates a unique
61set of user credentials to use for the tests in the class. It can create up to
62three sets of username, password, and tenant/project names for a primary user,
63an admin user, and an alternate user. To enable and use dynamic credentials you
64only need to configure two things:
Matthew Treinishbc1b15b2015-02-20 15:56:07 -050065
66 #. A set of admin credentials with permissions to create users and
Eric Friede0cfc3e2015-12-14 16:10:49 -060067 tenants/projects. This is specified in the ``auth`` section with the
68 ``admin_username``, ``admin_tenant_name``, ``admin_domain_name`` and
69 ``admin_password`` options
70 #. To enable dynamic credentials in the ``auth`` section with the
71 ``use_dynamic_credentials`` option.
Matthew Treinishbc1b15b2015-02-20 15:56:07 -050072
Eric Friede0cfc3e2015-12-14 16:10:49 -060073This is also currently the default credential provider enabled by Tempest, due
74to its common use and ease of configuration.
Matthew Treinishbc1b15b2015-02-20 15:56:07 -050075
Matthew Treinish4fae4722015-04-16 21:03:54 -040076It is worth pointing out that depending on your cloud configuration you might
Andrea Frittoli (andreaf)17209bb2015-05-22 10:16:57 -070077need to assign a role to each of the users created by Tempest's dynamic
Eric Friede0cfc3e2015-12-14 16:10:49 -060078credentials. This can be set using the ``tempest_roles`` option. It takes in a
79list of role names each of which will be assigned to each of the users created
80by dynamic credentials. This option will not have any effect when Tempest is not
Andrea Frittoli (andreaf)17209bb2015-05-22 10:16:57 -070081configured to use dynamic credentials.
Matthew Treinish4fae4722015-04-16 21:03:54 -040082
83
Eric Friede0cfc3e2015-12-14 16:10:49 -060084Pre-Provisioned Credentials (aka accounts.yaml or accounts file)
85""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Andrea Frittoli (andreaf)17209bb2015-05-22 10:16:57 -070086For a long time using dynamic credentials was the only method available if you
Eric Friede0cfc3e2015-12-14 16:10:49 -060087wanted to enable parallel execution of Tempest tests. However, this was
Matthew Treinishbc1b15b2015-02-20 15:56:07 -050088insufficient for certain use cases because of the admin credentials requirement
89to create the credential sets on demand. To get around that the accounts.yaml
90file was introduced and with that a new internal credential provider to enable
91using the list of credentials instead of creating them on demand. With locking
92test accounts each test class will reserve a set of credentials from the
93accounts.yaml before executing any of its tests so that each class is isolated
Andrea Frittoli (andreaf)17209bb2015-05-22 10:16:57 -070094like with dynamic credentials.
Matthew Treinishbc1b15b2015-02-20 15:56:07 -050095
Matthew Treinishbc1b15b2015-02-20 15:56:07 -050096To enable and use locking test accounts you need do a few things:
97
Eric Friede0cfc3e2015-12-14 16:10:49 -060098 #. Create an accounts.yaml file which contains the set of pre-existing
Matthew Treinishbc1b15b2015-02-20 15:56:07 -050099 credentials to use for testing. To make sure you don't have a credentials
Eric Friede0cfc3e2015-12-14 16:10:49 -0600100 starvation issue when running in parallel make sure you have at least two
101 times the number of worker processes you are using to execute Tempest
102 available in the file. (If running serially the worker count is 1.)
Matthew Treinish0fd69e42015-03-06 00:40:51 -0500103
Eric Friede0cfc3e2015-12-14 16:10:49 -0600104 You can check the accounts.yaml.sample file packaged in Tempest for the yaml
105 format.
106 #. Provide Tempest with the location of your accounts.yaml file with the
107 ``test_accounts_file`` option in the ``auth`` section
Matthew Treinishbc1b15b2015-02-20 15:56:07 -0500108
Eric Friede0cfc3e2015-12-14 16:10:49 -0600109 *NOTE: Be sure to use a full path for the file; otherwise Tempest will
Matthew Treinish84c6d292015-12-16 17:50:57 -0500110 likely not find it.*
111
Eric Friede0cfc3e2015-12-14 16:10:49 -0600112 #. Set ``use_dynamic_credentials = False`` in the ``auth`` group
Fei Long Wang7fee7872015-05-12 11:36:49 +1200113
Matthew Treinish93299852015-04-24 09:58:18 -0400114It is worth pointing out that each set of credentials in the accounts.yaml
115should have a unique tenant. This is required to provide proper isolation
116to the tests using the credentials, and failure to do this will likely cause
117unexpected failures in some tests.
Matthew Treinishbc1b15b2015-02-20 15:56:07 -0500118
Matthew Treinish93299852015-04-24 09:58:18 -0400119
Eric Friede0cfc3e2015-12-14 16:10:49 -0600120Legacy Credentials (aka credentials config options)
121"""""""""""""""""""""""""""""""""""""""""""""""""""
122**Starting in the Liberty release this mechanism was deprecated; it will be
123removed in a future release.**
Matthew Treinish16cf1e52015-08-11 10:39:23 -0400124
Matthew Treinish57092132015-04-21 14:21:35 -0400125When Tempest was refactored to allow for locking test accounts, the original
126non-tenant isolated case was converted to internally work similarly to the
Andrea Frittoli (andreaf)290b3e12015-10-08 10:25:02 +0100127accounts.yaml file. This mechanism was then called the legacy test accounts
128provider. To use the legacy test accounts provider you can specify the sets of
Eric Friede0cfc3e2015-12-14 16:10:49 -0600129credentials in the configuration file as detailed above with following nine
130options in the ``identity`` section:
Matthew Treinishbc1b15b2015-02-20 15:56:07 -0500131
Eric Friede0cfc3e2015-12-14 16:10:49 -0600132 #. ``username``
133 #. ``password``
134 #. ``tenant_name``
135 #. ``admin_username``
136 #. ``admin_password``
137 #. ``admin_tenant_name``
138 #. ``alt_username``
139 #. ``alt_password``
140 #. ``alt_tenant_name``
Matthew Treinishbc1b15b2015-02-20 15:56:07 -0500141
John Warrenc2764782016-02-26 14:32:09 -0500142If using Identity API v3, use the ``domain_name`` option to specify a
143domain other than the default domain. The ``auth_version`` setting is
144used to switch between v2 (``v2``) or v3 (``v3``) versions of the Identity
145API.
146
Eric Friede0cfc3e2015-12-14 16:10:49 -0600147And in the ``auth`` section:
Fei Long Wang7fee7872015-05-12 11:36:49 +1200148
Eric Friede0cfc3e2015-12-14 16:10:49 -0600149 #. ``use_dynamic_credentials = False``
150 #. Comment out ``test_accounts_file`` or keep it empty.
151
152It only makes sense to use this if parallel execution isn't needed, since
153Tempest won't be able to properly isolate tests using this. Additionally, using
154the traditional config options for credentials is not able to provide
155credentials to tests requiring specific roles on accounts. This is because the
156config options do not give sufficient flexibility to describe the roles assigned
157to a user for running the tests. There are additional limitations with regard to
158network configuration when using this credential provider mechanism - see the
Matthew Treinish57092132015-04-21 14:21:35 -0400159`Networking`_ section below.
Matthew Treinish2b7f0482015-04-10 12:49:01 -0400160
Matthew Treinish7909e122015-04-15 15:43:50 -0400161Compute
162-------
163
164Flavors
165^^^^^^^
Eric Friede0cfc3e2015-12-14 16:10:49 -0600166For Tempest to be able to create servers you need to specify flavors that it
167can use to boot the servers with. There are two options in the Tempest config
Matthew Treinish7909e122015-04-15 15:43:50 -0400168for doing this:
169
Eric Friede0cfc3e2015-12-14 16:10:49 -0600170 #. ``flavor_ref``
171 #. ``flavor_ref_alt``
Matthew Treinish7909e122015-04-15 15:43:50 -0400172
Eric Friede0cfc3e2015-12-14 16:10:49 -0600173Both of these options are in the ``compute`` section of the config file and take
174in the flavor id (not the name) from nova. The ``flavor_ref`` option is what
175will be used for booting almost all of the guests; ``flavor_ref_alt`` is only
176used in tests where two different-sized servers are required (for example, a
177resize test).
Matthew Treinish7909e122015-04-15 15:43:50 -0400178
Eric Friede0cfc3e2015-12-14 16:10:49 -0600179Using a smaller flavor is generally recommended. When larger flavors are used,
Matthew Treinish7909e122015-04-15 15:43:50 -0400180the extra time required to bring up servers will likely affect total run time
181and probably require tweaking timeout values to ensure tests have ample time to
182finish.
183
184Images
185^^^^^^
Eric Friede0cfc3e2015-12-14 16:10:49 -0600186Just like with flavors, Tempest needs to know which images to use for booting
187servers. There are two options in the compute section just like with flavors:
Matthew Treinish7909e122015-04-15 15:43:50 -0400188
Eric Friede0cfc3e2015-12-14 16:10:49 -0600189 #. ``image_ref``
190 #. ``image_ref_alt``
Matthew Treinish7909e122015-04-15 15:43:50 -0400191
Eric Friede0cfc3e2015-12-14 16:10:49 -0600192Both options are expecting an image id (not name) from nova. The ``image_ref``
193option is what will be used for booting the majority of servers in Tempest.
194``image_ref_alt`` is used for tests that require two images such as rebuild. If
195two images are not available you can set both options to the same image id and
Matthew Treinish7909e122015-04-15 15:43:50 -0400196those tests will be skipped.
197
Eric Friede0cfc3e2015-12-14 16:10:49 -0600198There are also options in the ``scenario`` section for images:
Matthew Treinish7909e122015-04-15 15:43:50 -0400199
Eric Friede0cfc3e2015-12-14 16:10:49 -0600200 #. ``img_file``
201 #. ``img_dir``
202 #. ``aki_img_file``
203 #. ``ari_img_file``
204 #. ``ami_img_file``
205 #. ``img_container_format``
206 #. ``img_disk_format``
Matthew Treinish7909e122015-04-15 15:43:50 -0400207
Eric Friede0cfc3e2015-12-14 16:10:49 -0600208However, unlike the other image options, these are used for a very small subset
Matthew Treinish7909e122015-04-15 15:43:50 -0400209of scenario tests which are uploading an image. These options are used to tell
Eric Friede0cfc3e2015-12-14 16:10:49 -0600210Tempest where an image file is located and describe its metadata for when it is
Matthew Treinish7909e122015-04-15 15:43:50 -0400211uploaded.
212
Eric Friede0cfc3e2015-12-14 16:10:49 -0600213The behavior of these options is a bit convoluted (which will likely be fixed in
214future versions). You first need to specify ``img_dir``, which is the directory
215in which Tempest will look for the image files. First it will check if the
216filename set for ``img_file`` could be found in ``img_dir``. If it is found then
217the ``img_container_format`` and ``img_disk_format`` options are used to upload
218that image to glance. However, if it is not found, Tempest will look for the
219three uec image file name options as a fallback. If neither is found, the tests
220requiring an image to upload will fail.
Matthew Treinish7909e122015-04-15 15:43:50 -0400221
222It is worth pointing out that using `cirros`_ is a very good choice for running
Eric Friede0cfc3e2015-12-14 16:10:49 -0600223Tempest. It's what is used for upstream testing, they boot quickly and have a
Matthew Treinish7909e122015-04-15 15:43:50 -0400224small footprint.
225
226.. _cirros: https://launchpad.net/cirros
227
Matthew Treinish2b7f0482015-04-10 12:49:01 -0400228Networking
229----------
230OpenStack has a myriad of different networking configurations possible and
Eric Friede0cfc3e2015-12-14 16:10:49 -0600231depending on which of the two network backends, nova-network or neutron, you are
Matthew Treinish2b7f0482015-04-10 12:49:01 -0400232using things can vary drastically. Due to this complexity Tempest has to provide
Eric Friede0cfc3e2015-12-14 16:10:49 -0600233a certain level of flexibility in its configuration to ensure it will work
Matthew Treinish2b7f0482015-04-10 12:49:01 -0400234against any cloud. This ends up causing a large number of permutations in
235Tempest's config around network configuration.
236
237
238Enabling Remote Access to Created Servers
239^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
240When Tempest creates servers for testing, some tests require being able to
241connect those servers. Depending on the configuration of the cloud, the methods
242for doing this can be different. In certain configurations it is required to
243specify a single network with server create calls. Accordingly, Tempest provides
244a few different methods for providing this information in configuration to try
Eric Friede0cfc3e2015-12-14 16:10:49 -0600245and ensure that regardless of the cloud's configuration it'll still be able to
Matthew Treinish2b7f0482015-04-10 12:49:01 -0400246run. This section covers the different methods of configuring Tempest to provide
247a network when creating servers.
248
249Fixed Network Name
250""""""""""""""""""
251This is the simplest method of specifying how networks should be used. You can
252just specify a single network name/label to use for all server creations. The
253limitation with this is that all tenants/projects and users must be able to see
Eric Friede0cfc3e2015-12-14 16:10:49 -0600254that network name/label if they are to perform a network list and be able to use
255it.
Matthew Treinish2b7f0482015-04-10 12:49:01 -0400256
257If no network name is assigned in the config file and none of the below
258alternatives are used, then Tempest will not specify a network on server
259creations, which depending on the cloud configuration might prevent them from
260booting.
261
Eric Friede0cfc3e2015-12-14 16:10:49 -0600262To set a fixed network name simply:
Matthew Treinish2b7f0482015-04-10 12:49:01 -0400263
Eric Friede0cfc3e2015-12-14 16:10:49 -0600264 #. Set the ``fixed_network_name`` option in the ``compute`` group
Matthew Treinish2b7f0482015-04-10 12:49:01 -0400265
266In the case that the configured fixed network name can not be found by a user
267network list call, it will be treated like one was not provided except that a
268warning will be logged stating that it couldn't be found.
269
270
271Accounts File
272"""""""""""""
273If you are using an accounts file to provide credentials for running Tempest
274then you can leverage it to also specify which network should be used with
275server creations on a per tenant/project and user pair basis. This provides
276the necessary flexibility to work with more intricate networking configurations
277by enabling the user to specify exactly which network to use for which
Eric Friede0cfc3e2015-12-14 16:10:49 -0600278tenants/projects. You can refer to the accounts.yaml.sample file included in
279the Tempest repo for the syntax around specifying networks in the file.
Matthew Treinish2b7f0482015-04-10 12:49:01 -0400280
281However, specifying a network is not required when using an accounts file. If
282one is not specified you can use a fixed network name to specify the network to
283use when creating servers just as without an accounts file. However, any network
284specified in the accounts file will take precedence over the fixed network name
285provided. If no network is provided in the accounts file and a fixed network
286name is not set then no network will be included in create server requests.
287
288If a fixed network is provided and the accounts.yaml file also contains networks
289this has the benefit of enabling a couple more tests which require a static
290network to perform operations like server lists with a network filter. If a
291fixed network name is not provided these tests are skipped. Additionally, if a
292fixed network name is provided it will serve as a fallback in case of a
293misconfiguration or a missing network in the accounts file.
294
295
Andrea Frittoli (andreaf)17209bb2015-05-22 10:16:57 -0700296With Dynamic Credentials
297""""""""""""""""""""""""
Eric Friede0cfc3e2015-12-14 16:10:49 -0600298With dynamic credentials enabled and using nova-network, your only option for
299configuration is to either set a fixed network name or not. However, in most
300cases it shouldn't matter because nova-network should have no problem booting a
301server with multiple networks. If this is not the case for your cloud then using
302an accounts file is recommended because it provides the necessary flexibility to
303describe your configuration. Dynamic credentials is not able to dynamically
304allocate things as necessary if neutron is not enabled.
Matthew Treinish2b7f0482015-04-10 12:49:01 -0400305
Andrea Frittoli (andreaf)17209bb2015-05-22 10:16:57 -0700306With neutron and dynamic credentials enabled there should not be any additional
Matthew Treinish2b7f0482015-04-10 12:49:01 -0400307configuration necessary to enable Tempest to create servers with working
Eric Friede0cfc3e2015-12-14 16:10:49 -0600308networking, assuming you have properly configured the ``network`` section to
309work for your cloud. Tempest will dynamically create the neutron resources
310necessary to enable using servers with that network. Also, just as with the
311accounts file, if you specify a fixed network name while using neutron and
312dynamic credentials it will enable running tests which require a static network
313and it will additionally be used as a fallback for server creation. However,
314unlike accounts.yaml this should never be triggered.
Matthew Treinish3220cad2015-04-15 16:25:48 -0400315
Eric Friede0cfc3e2015-12-14 16:10:49 -0600316However, there is an option ``create_isolated_networks`` to disable dynamic
317credentials's automatic provisioning of network resources. If this option is set
318to False you will have to either rely on there only being a single/default
319network available for the server creation, or use ``fixed_network_name`` to
320inform Tempest which network to use.
Matthew Treinish2219d382015-04-24 10:33:04 -0400321
Matthew Treinishf96ab3a2015-04-15 19:11:31 -0400322Configuring Available Services
323------------------------------
324OpenStack is really a constellation of several different projects which
325are running together to create a cloud. However which projects you're running
326is not set in stone, and which services are running is up to the deployer.
327Tempest however needs to know which services are available so it can figure
328out which tests it is able to run and certain setup steps which differ based
329on the available services.
330
Eric Friede0cfc3e2015-12-14 16:10:49 -0600331The ``service_available`` section of the config file is used to set which
Matthew Treinishf96ab3a2015-04-15 19:11:31 -0400332services are available. It contains a boolean option for each service (except
333for keystone which is a hard requirement) set it to True if the service is
334available or False if it is not.
335
336Service Catalog
337^^^^^^^^^^^^^^^
338Each project which has its own REST API contains an entry in the service
339catalog. Like most things in OpenStack this is also completely configurable.
Eric Friede0cfc3e2015-12-14 16:10:49 -0600340However, for Tempest to be able to figure out which endpoints should get REST
341API calls for each service, it needs to know how that project is defined in the
342service catalog. There are three options for each service section to accomplish
Matthew Treinishf96ab3a2015-04-15 19:11:31 -0400343this:
344
Eric Friede0cfc3e2015-12-14 16:10:49 -0600345 #. ``catalog_type``
346 #. ``endpoint_type``
347 #. ``region``
Matthew Treinishf96ab3a2015-04-15 19:11:31 -0400348
Eric Friede0cfc3e2015-12-14 16:10:49 -0600349Setting ``catalog_type`` and ``endpoint_type`` should normally give Tempest
350enough information to determine which endpoint it should pull from the service
351catalog to use for talking to that particular service. However, if your cloud
352has multiple regions available and you need to specify a particular one to use a
353service you can set the ``region`` option in that service's section.
Matthew Treinishf96ab3a2015-04-15 19:11:31 -0400354
355It should also be noted that the default values for these options are set
Eric Friede0cfc3e2015-12-14 16:10:49 -0600356to what devstack uses (which is a de facto standard for service catalog
357entries). So often nothing actually needs to be set on these options to enable
Matthew Treinishf96ab3a2015-04-15 19:11:31 -0400358communication to a particular service. It is only if you are either not using
Eric Friede0cfc3e2015-12-14 16:10:49 -0600359the same ``catalog_type`` as devstack or you want Tempest to talk to a different
Matthew Treinishf96ab3a2015-04-15 19:11:31 -0400360endpoint type instead of publicURL for a service that these need to be changed.
361
ghanshyam571dfac2015-10-30 11:21:28 +0900362.. note::
363
Eric Friede0cfc3e2015-12-14 16:10:49 -0600364 Tempest does not serve all kinds of fancy URLs in the service catalog. The
365 service catalog should be in a standard format (which is going to be
366 standardized at the keystone level).
367 Tempest expects URLs in the Service catalog in the following format:
368 * ``http://example.com:1234/<version-info>``
ghanshyam571dfac2015-10-30 11:21:28 +0900369 Examples:
Eric Friede0cfc3e2015-12-14 16:10:49 -0600370 * Good - ``http://example.com:1234/v2.0``
371 * Wouldn’t work - ``http://example.com:1234/xyz/v2.0/``
ghanshyam571dfac2015-10-30 11:21:28 +0900372 (adding prefix/suffix around version etc)
Matthew Treinishf96ab3a2015-04-15 19:11:31 -0400373
Eric Friede0cfc3e2015-12-14 16:10:49 -0600374Service Feature Configuration
Matthew Treinish3220cad2015-04-15 16:25:48 -0400375-----------------------------
376
Eric Friede0cfc3e2015-12-14 16:10:49 -0600377OpenStack provides its deployers a myriad of different configuration options to
378enable anyone deploying it to create a cloud tailor-made for any individual use
379case. It provides options for several different backend types, databases,
Matthew Treinish3220cad2015-04-15 16:25:48 -0400380message queues, etc. However, the downside to this configurability is that
381certain operations and features aren't supported depending on the configuration.
382These features may or may not be discoverable from the API so the burden is
Eric Friede0cfc3e2015-12-14 16:10:49 -0600383often on the user to figure out what is supported by the cloud they're talking
384to. Besides the obvious interoperability issues with this it also leaves
385Tempest in an interesting situation trying to figure out which tests are
386expected to work. However, Tempest tests do not rely on dynamic API discovery
387for a feature (assuming one exists). Instead Tempest has to be explicitly
388configured as to which optional features are enabled. This is in order to
389prevent bugs in the discovery mechanisms from masking failures.
Matthew Treinish3220cad2015-04-15 16:25:48 -0400390
391The service feature-enabled config sections are how Tempest addresses the
392optional feature question. Each service that has tests for optional features
393contains one of these sections. The only options in it are boolean options
394with the name of a feature which is used. If it is set to false any test which
395depends on that functionality will be skipped. For a complete list of all these
396options refer to the sample config file.
397
398
399API Extensions
400^^^^^^^^^^^^^^
Eric Friede0cfc3e2015-12-14 16:10:49 -0600401The service feature-enabled sections often contain an ``api-extensions`` option
402(or in the case of swift a ``discoverable_apis`` option). This is used to tell
403Tempest which api extensions (or configurable middleware) is used in your
404deployment. It has two valid config states: either it contains a single value
405``all`` (which is the default) which means that every api extension is assumed
Matthew Treinish3220cad2015-04-15 16:25:48 -0400406to be enabled, or it is set to a list of each individual extension that is
407enabled for that service.