blob: bcb1e3e0a7b53eb4594302b4aa2259c76c1384a7 [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
Andrea Frittoli (andreaf)dd250702016-04-29 15:01:22 -050012Test Credentials
Matthew Treinishbc1b15b2015-02-20 15:56:07 -050013----------------
14
Andrea Frittoli (andreaf)dd250702016-04-29 15:01:22 -050015Tempest allows for configuring a set of admin credentials in the ``auth``
16section, via the following parameters:
Matthew Treinishbc1b15b2015-02-20 15:56:07 -050017
Andrea Frittoli (andreaf)dd250702016-04-29 15:01:22 -050018 #. ``admin_username``
19 #. ``admin_password``
20 #. ``admin_project_name``
21 #. ``admin_domain_name``
22
23Admin credentials are not mandatory to run Tempest, but when provided they
24can be used to:
25
26- Run tests for admin APIs
27- Generate test credentials on the fly (see `Dynamic Credentials`_)
28
29Tempest allows for configuring pre-provisioned test credentials as well.
30This can be done in two different ways.
31
32One is to provide credentials is using the accounts.yaml file (see
33`Pre-Provisioned Credentials`_). This file is used to specify an arbitrary
34number of users available to run tests with.
35You can specify the location of the file in the ``auth`` section in the
Eric Friede0cfc3e2015-12-14 16:10:49 -060036tempest.conf file. To see the specific format used in the file please refer to
Andrea Frittoli (andreaf)dd250702016-04-29 15:01:22 -050037the accounts.yaml.sample file included in Tempest.
38
39A second way - now deprecated - is a set of configuration options in the
40tempest.conf file (see `Legacy Credentials`_). These options are clearly
41labelled in the ``identity`` section and let you specify a set of credentials
42for a regular user and an alternate user, consisting of a username, password,
43project and domain name.
Matthew Treinishbc1b15b2015-02-20 15:56:07 -050044
Matthew Treinish7909e122015-04-15 15:43:50 -040045Keystone Connection Info
46^^^^^^^^^^^^^^^^^^^^^^^^
Eric Friede0cfc3e2015-12-14 16:10:49 -060047In order for Tempest to be able to talk to your OpenStack deployment you need
Matthew Treinish7909e122015-04-15 15:43:50 -040048to provide it with information about how it communicates with keystone.
Eric Friede0cfc3e2015-12-14 16:10:49 -060049This involves configuring the following options in the ``identity`` section:
Matthew Treinish7909e122015-04-15 15:43:50 -040050
Eric Friede0cfc3e2015-12-14 16:10:49 -060051 #. ``auth_version``
52 #. ``uri``
53 #. ``uri_v3``
Matthew Treinish7909e122015-04-15 15:43:50 -040054
Eric Friede0cfc3e2015-12-14 16:10:49 -060055The ``auth_version`` option is used to tell Tempest whether it should be using
Matthew Treinish7909e122015-04-15 15:43:50 -040056keystone's v2 or v3 api for communicating with keystone. (except for the
Eric Friede0cfc3e2015-12-14 16:10:49 -060057identity api tests which will test a specific version) The two uri options are
58used to tell Tempest the url of the keystone endpoint. The ``uri`` option is
59used for keystone v2 request and ``uri_v3`` is used for keystone v3. You want to
60ensure that which ever version you set for ``auth_version`` has its uri option
61defined.
Matthew Treinish7909e122015-04-15 15:43:50 -040062
63
Matthew Treinishbc1b15b2015-02-20 15:56:07 -050064Credential Provider Mechanisms
65^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
Eric Friede0cfc3e2015-12-14 16:10:49 -060067Tempest currently also has three different internal methods for providing
68authentication to tests: dynamic credentials, locking test accounts, and
Matthew Treinishbc1b15b2015-02-20 15:56:07 -050069non-locking test accounts. Depending on which one is in use the configuration
Eric Friede0cfc3e2015-12-14 16:10:49 -060070of Tempest is slightly different.
Matthew Treinishbc1b15b2015-02-20 15:56:07 -050071
Andrea Frittoli (andreaf)17209bb2015-05-22 10:16:57 -070072Dynamic Credentials
73"""""""""""""""""""
74Dynamic Credentials (formerly known as Tenant isolation) was originally created
Eric Friede0cfc3e2015-12-14 16:10:49 -060075to enable running Tempest in parallel. For each test class it creates a unique
76set of user credentials to use for the tests in the class. It can create up to
Sean Dagueed6e5862016-04-04 10:49:13 -040077three sets of username, password, and project names for a primary user,
78an admin user, and an alternate user. To enable and use dynamic credentials you
Eric Friede0cfc3e2015-12-14 16:10:49 -060079only need to configure two things:
Matthew Treinishbc1b15b2015-02-20 15:56:07 -050080
81 #. A set of admin credentials with permissions to create users and
Sean Dagueed6e5862016-04-04 10:49:13 -040082 projects. This is specified in the ``auth`` section with the
83 ``admin_username``, ``admin_project_name``, ``admin_domain_name`` and
Eric Friede0cfc3e2015-12-14 16:10:49 -060084 ``admin_password`` options
85 #. To enable dynamic credentials in the ``auth`` section with the
86 ``use_dynamic_credentials`` option.
Matthew Treinishbc1b15b2015-02-20 15:56:07 -050087
Eric Friede0cfc3e2015-12-14 16:10:49 -060088This is also currently the default credential provider enabled by Tempest, due
89to its common use and ease of configuration.
Matthew Treinishbc1b15b2015-02-20 15:56:07 -050090
Matthew Treinish4fae4722015-04-16 21:03:54 -040091It is worth pointing out that depending on your cloud configuration you might
Andrea Frittoli (andreaf)17209bb2015-05-22 10:16:57 -070092need to assign a role to each of the users created by Tempest's dynamic
Eric Friede0cfc3e2015-12-14 16:10:49 -060093credentials. This can be set using the ``tempest_roles`` option. It takes in a
94list of role names each of which will be assigned to each of the users created
95by dynamic credentials. This option will not have any effect when Tempest is not
Andrea Frittoli (andreaf)17209bb2015-05-22 10:16:57 -070096configured to use dynamic credentials.
Matthew Treinish4fae4722015-04-16 21:03:54 -040097
98
Andrea Frittoli (andreaf)dd250702016-04-29 15:01:22 -050099Pre-Provisioned Credentials
100"""""""""""""""""""""""""""
101
Andrea Frittoli (andreaf)17209bb2015-05-22 10:16:57 -0700102For a long time using dynamic credentials was the only method available if you
Eric Friede0cfc3e2015-12-14 16:10:49 -0600103wanted to enable parallel execution of Tempest tests. However, this was
Matthew Treinishbc1b15b2015-02-20 15:56:07 -0500104insufficient for certain use cases because of the admin credentials requirement
105to create the credential sets on demand. To get around that the accounts.yaml
106file was introduced and with that a new internal credential provider to enable
107using the list of credentials instead of creating them on demand. With locking
108test accounts each test class will reserve a set of credentials from the
109accounts.yaml before executing any of its tests so that each class is isolated
Andrea Frittoli (andreaf)17209bb2015-05-22 10:16:57 -0700110like with dynamic credentials.
Matthew Treinishbc1b15b2015-02-20 15:56:07 -0500111
Matthew Treinishbc1b15b2015-02-20 15:56:07 -0500112To enable and use locking test accounts you need do a few things:
113
Eric Friede0cfc3e2015-12-14 16:10:49 -0600114 #. Create an accounts.yaml file which contains the set of pre-existing
Matthew Treinishbc1b15b2015-02-20 15:56:07 -0500115 credentials to use for testing. To make sure you don't have a credentials
Eric Friede0cfc3e2015-12-14 16:10:49 -0600116 starvation issue when running in parallel make sure you have at least two
117 times the number of worker processes you are using to execute Tempest
118 available in the file. (If running serially the worker count is 1.)
Matthew Treinish0fd69e42015-03-06 00:40:51 -0500119
Eric Friede0cfc3e2015-12-14 16:10:49 -0600120 You can check the accounts.yaml.sample file packaged in Tempest for the yaml
121 format.
122 #. Provide Tempest with the location of your accounts.yaml file with the
123 ``test_accounts_file`` option in the ``auth`` section
Matthew Treinishbc1b15b2015-02-20 15:56:07 -0500124
Eric Friede0cfc3e2015-12-14 16:10:49 -0600125 *NOTE: Be sure to use a full path for the file; otherwise Tempest will
Matthew Treinish84c6d292015-12-16 17:50:57 -0500126 likely not find it.*
127
Eric Friede0cfc3e2015-12-14 16:10:49 -0600128 #. Set ``use_dynamic_credentials = False`` in the ``auth`` group
Fei Long Wang7fee7872015-05-12 11:36:49 +1200129
Matthew Treinish93299852015-04-24 09:58:18 -0400130It is worth pointing out that each set of credentials in the accounts.yaml
Sean Dagueed6e5862016-04-04 10:49:13 -0400131should have a unique project. This is required to provide proper isolation
Matthew Treinish93299852015-04-24 09:58:18 -0400132to the tests using the credentials, and failure to do this will likely cause
133unexpected failures in some tests.
Matthew Treinishbc1b15b2015-02-20 15:56:07 -0500134
Andrea Frittoli (andreaf)dd250702016-04-29 15:01:22 -0500135Pre-Provisioned Credentials are also know as accounts.yaml or accounts file.
Matthew Treinish93299852015-04-24 09:58:18 -0400136
Andrea Frittoli (andreaf)dd250702016-04-29 15:01:22 -0500137Legacy Credentials
138""""""""""""""""""
Eric Friede0cfc3e2015-12-14 16:10:49 -0600139**Starting in the Liberty release this mechanism was deprecated; it will be
140removed in a future release.**
Matthew Treinish16cf1e52015-08-11 10:39:23 -0400141
Matthew Treinish57092132015-04-21 14:21:35 -0400142When Tempest was refactored to allow for locking test accounts, the original
Sean Dagueed6e5862016-04-04 10:49:13 -0400143non-project isolated case was converted to internally work similarly to the
Andrea Frittoli (andreaf)290b3e12015-10-08 10:25:02 +0100144accounts.yaml file. This mechanism was then called the legacy test accounts
145provider. To use the legacy test accounts provider you can specify the sets of
Eric Friede0cfc3e2015-12-14 16:10:49 -0600146credentials in the configuration file as detailed above with following nine
147options in the ``identity`` section:
Matthew Treinishbc1b15b2015-02-20 15:56:07 -0500148
Eric Friede0cfc3e2015-12-14 16:10:49 -0600149 #. ``username``
150 #. ``password``
Sean Dagueed6e5862016-04-04 10:49:13 -0400151 #. ``project_name``
Eric Friede0cfc3e2015-12-14 16:10:49 -0600152 #. ``alt_username``
153 #. ``alt_password``
Sean Dagueed6e5862016-04-04 10:49:13 -0400154 #. ``alt_project_name``
Matthew Treinishbc1b15b2015-02-20 15:56:07 -0500155
John Warrenc2764782016-02-26 14:32:09 -0500156If using Identity API v3, use the ``domain_name`` option to specify a
157domain other than the default domain. The ``auth_version`` setting is
158used to switch between v2 (``v2``) or v3 (``v3``) versions of the Identity
159API.
160
Eric Friede0cfc3e2015-12-14 16:10:49 -0600161And in the ``auth`` section:
Fei Long Wang7fee7872015-05-12 11:36:49 +1200162
Eric Friede0cfc3e2015-12-14 16:10:49 -0600163 #. ``use_dynamic_credentials = False``
164 #. Comment out ``test_accounts_file`` or keep it empty.
165
166It only makes sense to use this if parallel execution isn't needed, since
167Tempest won't be able to properly isolate tests using this. Additionally, using
168the traditional config options for credentials is not able to provide
169credentials to tests requiring specific roles on accounts. This is because the
170config options do not give sufficient flexibility to describe the roles assigned
171to a user for running the tests. There are additional limitations with regard to
172network configuration when using this credential provider mechanism - see the
Matthew Treinish57092132015-04-21 14:21:35 -0400173`Networking`_ section below.
Matthew Treinish2b7f0482015-04-10 12:49:01 -0400174
Matthew Treinish7909e122015-04-15 15:43:50 -0400175Compute
176-------
177
178Flavors
179^^^^^^^
Eric Friede0cfc3e2015-12-14 16:10:49 -0600180For Tempest to be able to create servers you need to specify flavors that it
181can use to boot the servers with. There are two options in the Tempest config
Matthew Treinish7909e122015-04-15 15:43:50 -0400182for doing this:
183
Eric Friede0cfc3e2015-12-14 16:10:49 -0600184 #. ``flavor_ref``
185 #. ``flavor_ref_alt``
Matthew Treinish7909e122015-04-15 15:43:50 -0400186
Eric Friede0cfc3e2015-12-14 16:10:49 -0600187Both of these options are in the ``compute`` section of the config file and take
188in the flavor id (not the name) from nova. The ``flavor_ref`` option is what
189will be used for booting almost all of the guests; ``flavor_ref_alt`` is only
190used in tests where two different-sized servers are required (for example, a
191resize test).
Matthew Treinish7909e122015-04-15 15:43:50 -0400192
Eric Friede0cfc3e2015-12-14 16:10:49 -0600193Using a smaller flavor is generally recommended. When larger flavors are used,
Matthew Treinish7909e122015-04-15 15:43:50 -0400194the extra time required to bring up servers will likely affect total run time
195and probably require tweaking timeout values to ensure tests have ample time to
196finish.
197
198Images
199^^^^^^
Eric Friede0cfc3e2015-12-14 16:10:49 -0600200Just like with flavors, Tempest needs to know which images to use for booting
201servers. There are two options in the compute section just like with flavors:
Matthew Treinish7909e122015-04-15 15:43:50 -0400202
Eric Friede0cfc3e2015-12-14 16:10:49 -0600203 #. ``image_ref``
204 #. ``image_ref_alt``
Matthew Treinish7909e122015-04-15 15:43:50 -0400205
Eric Friede0cfc3e2015-12-14 16:10:49 -0600206Both options are expecting an image id (not name) from nova. The ``image_ref``
207option is what will be used for booting the majority of servers in Tempest.
208``image_ref_alt`` is used for tests that require two images such as rebuild. If
209two images are not available you can set both options to the same image id and
Matthew Treinish7909e122015-04-15 15:43:50 -0400210those tests will be skipped.
211
Eric Friede0cfc3e2015-12-14 16:10:49 -0600212There are also options in the ``scenario`` section for images:
Matthew Treinish7909e122015-04-15 15:43:50 -0400213
Eric Friede0cfc3e2015-12-14 16:10:49 -0600214 #. ``img_file``
215 #. ``img_dir``
216 #. ``aki_img_file``
217 #. ``ari_img_file``
218 #. ``ami_img_file``
219 #. ``img_container_format``
220 #. ``img_disk_format``
Matthew Treinish7909e122015-04-15 15:43:50 -0400221
Eric Friede0cfc3e2015-12-14 16:10:49 -0600222However, unlike the other image options, these are used for a very small subset
Matthew Treinish7909e122015-04-15 15:43:50 -0400223of scenario tests which are uploading an image. These options are used to tell
Eric Friede0cfc3e2015-12-14 16:10:49 -0600224Tempest where an image file is located and describe its metadata for when it is
Matthew Treinish7909e122015-04-15 15:43:50 -0400225uploaded.
226
Eric Friede0cfc3e2015-12-14 16:10:49 -0600227The behavior of these options is a bit convoluted (which will likely be fixed in
228future versions). You first need to specify ``img_dir``, which is the directory
229in which Tempest will look for the image files. First it will check if the
230filename set for ``img_file`` could be found in ``img_dir``. If it is found then
231the ``img_container_format`` and ``img_disk_format`` options are used to upload
232that image to glance. However, if it is not found, Tempest will look for the
233three uec image file name options as a fallback. If neither is found, the tests
234requiring an image to upload will fail.
Matthew Treinish7909e122015-04-15 15:43:50 -0400235
236It is worth pointing out that using `cirros`_ is a very good choice for running
Eric Friede0cfc3e2015-12-14 16:10:49 -0600237Tempest. It's what is used for upstream testing, they boot quickly and have a
Matthew Treinish7909e122015-04-15 15:43:50 -0400238small footprint.
239
240.. _cirros: https://launchpad.net/cirros
241
Matthew Treinish2b7f0482015-04-10 12:49:01 -0400242Networking
243----------
244OpenStack has a myriad of different networking configurations possible and
Eric Friede0cfc3e2015-12-14 16:10:49 -0600245depending on which of the two network backends, nova-network or neutron, you are
Matthew Treinish2b7f0482015-04-10 12:49:01 -0400246using things can vary drastically. Due to this complexity Tempest has to provide
Eric Friede0cfc3e2015-12-14 16:10:49 -0600247a certain level of flexibility in its configuration to ensure it will work
Matthew Treinish2b7f0482015-04-10 12:49:01 -0400248against any cloud. This ends up causing a large number of permutations in
249Tempest's config around network configuration.
250
251
252Enabling Remote Access to Created Servers
253^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
254When Tempest creates servers for testing, some tests require being able to
255connect those servers. Depending on the configuration of the cloud, the methods
256for doing this can be different. In certain configurations it is required to
257specify a single network with server create calls. Accordingly, Tempest provides
258a few different methods for providing this information in configuration to try
Eric Friede0cfc3e2015-12-14 16:10:49 -0600259and ensure that regardless of the cloud's configuration it'll still be able to
Matthew Treinish2b7f0482015-04-10 12:49:01 -0400260run. This section covers the different methods of configuring Tempest to provide
261a network when creating servers.
262
lanoux63bb9032016-03-21 03:16:18 -0700263The ``validation`` group gathers all the connection options to remotely access the
264created servers.
265
266To enable remote access to servers, at least the three following options need to be
267set:
268
269* The ``run_validation`` option needs be set to ``true``.
270
271* The ``connect_method`` option. Two connect methods are available: ``fixed`` and
272 ``floating``, the later being set by default.
273
274* The ``auth_method`` option. Currently, only authentication by keypair is
275 available.
276
277
Matthew Treinish2b7f0482015-04-10 12:49:01 -0400278Fixed Network Name
279""""""""""""""""""
280This is the simplest method of specifying how networks should be used. You can
281just specify a single network name/label to use for all server creations. The
Sean Dagueed6e5862016-04-04 10:49:13 -0400282limitation with this is that all projects and users must be able to see
Eric Friede0cfc3e2015-12-14 16:10:49 -0600283that network name/label if they are to perform a network list and be able to use
284it.
Matthew Treinish2b7f0482015-04-10 12:49:01 -0400285
286If no network name is assigned in the config file and none of the below
287alternatives are used, then Tempest will not specify a network on server
288creations, which depending on the cloud configuration might prevent them from
289booting.
290
Eric Friede0cfc3e2015-12-14 16:10:49 -0600291To set a fixed network name simply:
Matthew Treinish2b7f0482015-04-10 12:49:01 -0400292
Eric Friede0cfc3e2015-12-14 16:10:49 -0600293 #. Set the ``fixed_network_name`` option in the ``compute`` group
Matthew Treinish2b7f0482015-04-10 12:49:01 -0400294
295In the case that the configured fixed network name can not be found by a user
296network list call, it will be treated like one was not provided except that a
297warning will be logged stating that it couldn't be found.
298
299
300Accounts File
301"""""""""""""
302If you are using an accounts file to provide credentials for running Tempest
303then you can leverage it to also specify which network should be used with
Sean Dagueed6e5862016-04-04 10:49:13 -0400304server creations on a per project and user pair basis. This provides
Matthew Treinish2b7f0482015-04-10 12:49:01 -0400305the necessary flexibility to work with more intricate networking configurations
306by enabling the user to specify exactly which network to use for which
Sean Dagueed6e5862016-04-04 10:49:13 -0400307projects. You can refer to the accounts.yaml.sample file included in
Eric Friede0cfc3e2015-12-14 16:10:49 -0600308the Tempest repo for the syntax around specifying networks in the file.
Matthew Treinish2b7f0482015-04-10 12:49:01 -0400309
310However, specifying a network is not required when using an accounts file. If
311one is not specified you can use a fixed network name to specify the network to
312use when creating servers just as without an accounts file. However, any network
313specified in the accounts file will take precedence over the fixed network name
314provided. If no network is provided in the accounts file and a fixed network
315name is not set then no network will be included in create server requests.
316
317If a fixed network is provided and the accounts.yaml file also contains networks
318this has the benefit of enabling a couple more tests which require a static
319network to perform operations like server lists with a network filter. If a
320fixed network name is not provided these tests are skipped. Additionally, if a
321fixed network name is provided it will serve as a fallback in case of a
322misconfiguration or a missing network in the accounts file.
323
324
Andrea Frittoli (andreaf)17209bb2015-05-22 10:16:57 -0700325With Dynamic Credentials
326""""""""""""""""""""""""
Eric Friede0cfc3e2015-12-14 16:10:49 -0600327With dynamic credentials enabled and using nova-network, your only option for
lanoux63bb9032016-03-21 03:16:18 -0700328configuration is to either set a fixed network name or not. However, in most
Eric Friede0cfc3e2015-12-14 16:10:49 -0600329cases it shouldn't matter because nova-network should have no problem booting a
330server with multiple networks. If this is not the case for your cloud then using
331an accounts file is recommended because it provides the necessary flexibility to
332describe your configuration. Dynamic credentials is not able to dynamically
333allocate things as necessary if neutron is not enabled.
Matthew Treinish2b7f0482015-04-10 12:49:01 -0400334
Andrea Frittoli (andreaf)17209bb2015-05-22 10:16:57 -0700335With neutron and dynamic credentials enabled there should not be any additional
Matthew Treinish2b7f0482015-04-10 12:49:01 -0400336configuration necessary to enable Tempest to create servers with working
Eric Friede0cfc3e2015-12-14 16:10:49 -0600337networking, assuming you have properly configured the ``network`` section to
338work for your cloud. Tempest will dynamically create the neutron resources
339necessary to enable using servers with that network. Also, just as with the
340accounts file, if you specify a fixed network name while using neutron and
341dynamic credentials it will enable running tests which require a static network
342and it will additionally be used as a fallback for server creation. However,
343unlike accounts.yaml this should never be triggered.
Matthew Treinish3220cad2015-04-15 16:25:48 -0400344
Eric Friede0cfc3e2015-12-14 16:10:49 -0600345However, there is an option ``create_isolated_networks`` to disable dynamic
346credentials's automatic provisioning of network resources. If this option is set
347to False you will have to either rely on there only being a single/default
348network available for the server creation, or use ``fixed_network_name`` to
349inform Tempest which network to use.
Matthew Treinish2219d382015-04-24 10:33:04 -0400350
Matthew Treinishf96ab3a2015-04-15 19:11:31 -0400351Configuring Available Services
352------------------------------
353OpenStack is really a constellation of several different projects which
354are running together to create a cloud. However which projects you're running
355is not set in stone, and which services are running is up to the deployer.
356Tempest however needs to know which services are available so it can figure
357out which tests it is able to run and certain setup steps which differ based
358on the available services.
359
Eric Friede0cfc3e2015-12-14 16:10:49 -0600360The ``service_available`` section of the config file is used to set which
Matthew Treinishf96ab3a2015-04-15 19:11:31 -0400361services are available. It contains a boolean option for each service (except
362for keystone which is a hard requirement) set it to True if the service is
363available or False if it is not.
364
365Service Catalog
366^^^^^^^^^^^^^^^
367Each project which has its own REST API contains an entry in the service
368catalog. Like most things in OpenStack this is also completely configurable.
Eric Friede0cfc3e2015-12-14 16:10:49 -0600369However, for Tempest to be able to figure out which endpoints should get REST
370API calls for each service, it needs to know how that project is defined in the
371service catalog. There are three options for each service section to accomplish
Matthew Treinishf96ab3a2015-04-15 19:11:31 -0400372this:
373
Eric Friede0cfc3e2015-12-14 16:10:49 -0600374 #. ``catalog_type``
375 #. ``endpoint_type``
376 #. ``region``
Matthew Treinishf96ab3a2015-04-15 19:11:31 -0400377
Eric Friede0cfc3e2015-12-14 16:10:49 -0600378Setting ``catalog_type`` and ``endpoint_type`` should normally give Tempest
379enough information to determine which endpoint it should pull from the service
380catalog to use for talking to that particular service. However, if your cloud
381has multiple regions available and you need to specify a particular one to use a
382service you can set the ``region`` option in that service's section.
Matthew Treinishf96ab3a2015-04-15 19:11:31 -0400383
384It should also be noted that the default values for these options are set
Eric Friede0cfc3e2015-12-14 16:10:49 -0600385to what devstack uses (which is a de facto standard for service catalog
386entries). So often nothing actually needs to be set on these options to enable
Matthew Treinishf96ab3a2015-04-15 19:11:31 -0400387communication to a particular service. It is only if you are either not using
Eric Friede0cfc3e2015-12-14 16:10:49 -0600388the same ``catalog_type`` as devstack or you want Tempest to talk to a different
Matthew Treinishf96ab3a2015-04-15 19:11:31 -0400389endpoint type instead of publicURL for a service that these need to be changed.
390
ghanshyam571dfac2015-10-30 11:21:28 +0900391.. note::
392
Eric Friede0cfc3e2015-12-14 16:10:49 -0600393 Tempest does not serve all kinds of fancy URLs in the service catalog. The
394 service catalog should be in a standard format (which is going to be
395 standardized at the keystone level).
396 Tempest expects URLs in the Service catalog in the following format:
397 * ``http://example.com:1234/<version-info>``
ghanshyam571dfac2015-10-30 11:21:28 +0900398 Examples:
Eric Friede0cfc3e2015-12-14 16:10:49 -0600399 * Good - ``http://example.com:1234/v2.0``
400 * Wouldn’t work - ``http://example.com:1234/xyz/v2.0/``
ghanshyam571dfac2015-10-30 11:21:28 +0900401 (adding prefix/suffix around version etc)
Matthew Treinishf96ab3a2015-04-15 19:11:31 -0400402
Eric Friede0cfc3e2015-12-14 16:10:49 -0600403Service Feature Configuration
Matthew Treinish3220cad2015-04-15 16:25:48 -0400404-----------------------------
405
Eric Friede0cfc3e2015-12-14 16:10:49 -0600406OpenStack provides its deployers a myriad of different configuration options to
407enable anyone deploying it to create a cloud tailor-made for any individual use
408case. It provides options for several different backend types, databases,
Matthew Treinish3220cad2015-04-15 16:25:48 -0400409message queues, etc. However, the downside to this configurability is that
410certain operations and features aren't supported depending on the configuration.
411These features may or may not be discoverable from the API so the burden is
Eric Friede0cfc3e2015-12-14 16:10:49 -0600412often on the user to figure out what is supported by the cloud they're talking
413to. Besides the obvious interoperability issues with this it also leaves
414Tempest in an interesting situation trying to figure out which tests are
415expected to work. However, Tempest tests do not rely on dynamic API discovery
416for a feature (assuming one exists). Instead Tempest has to be explicitly
417configured as to which optional features are enabled. This is in order to
418prevent bugs in the discovery mechanisms from masking failures.
Matthew Treinish3220cad2015-04-15 16:25:48 -0400419
420The service feature-enabled config sections are how Tempest addresses the
421optional feature question. Each service that has tests for optional features
422contains one of these sections. The only options in it are boolean options
423with the name of a feature which is used. If it is set to false any test which
424depends on that functionality will be skipped. For a complete list of all these
425options refer to the sample config file.
426
427
428API Extensions
429^^^^^^^^^^^^^^
Eric Friede0cfc3e2015-12-14 16:10:49 -0600430The service feature-enabled sections often contain an ``api-extensions`` option
431(or in the case of swift a ``discoverable_apis`` option). This is used to tell
432Tempest which api extensions (or configurable middleware) is used in your
433deployment. It has two valid config states: either it contains a single value
434``all`` (which is the default) which means that every api extension is assumed
Matthew Treinish3220cad2015-04-15 16:25:48 -0400435to be enabled, or it is set to a list of each individual extension that is
436enabled for that service.