add bp:multi-keystone-api-version-tests

Blueprint to add support for keystone v3 throughout tempest.

Change-Id: Ib9ff5ea56d708db7fd310a4f08dadacfc0b80f54
This commit is contained in:
Andrea Frittoli 2014-03-18 16:30:28 +00:00
parent 7c6f296c2c
commit 6ec2ea04b4
1 changed files with 95 additions and 0 deletions

View File

@ -0,0 +1,95 @@
::
This work is licensed under a Creative Commons Attribution 3.0 Unported License.
http://creativecommons.org/licenses/by/3.0/legalcode
..
This template should be in ReSTructured text. The filename in the git
repository should match the launchpad URL, for example a URL of
https://blueprints.launchpad.net/tempest/+spec/awesome-thing should be named
awesome-thing.rst . Please do not delete any of the sections in this
template. If you have nothing to say for a whole section, just write: None
For help with syntax, see http://sphinx-doc.org/rest.html
To test out your formatting, see http://www.tele3.cz/jbar/rest/rest.html
===================================================
Tempest support for multiple keystone API versions
===================================================
https://blueprints.launchpad.net/tempest/+spec/multi-keystone-api-version-tests
Decouple tempest from keystone version specifics and run tests with keystone v3
Problem description
===================
Tempest code is tightly coupled with keystone V2 specific implementations.
Common classes (such as rest client and tenant isolation), test base classes
and test themselves all assume the identity service is provided by a keystone
v2 endpoint.
Tempest shall be able to run with a keystone V3 identity service, and newer versions
as they become available.
Proposed change
===============
A new configuration flag is introduced to specify the auth version to be used.
A number of refactors are required to achieve this and make sure we don't need
to change test code again when moving to different keystone API versions.
Authentication are factored out in an authentication provider. Credentials are handled
via a dedicated class, provided to tests by a credential manager.
Clients managers receive credentials and are the sole responsible for instantiating
clients and provide them to tests. At the moment client managers instantiate all
available clients when created. This is unnecessary, and it leads to issues when not
all openstack services are available for test. Client managers are thus changed to
lazy instantiation of clients.
Areas affected by refactor:
- Rest client: move auth code to an external auth provider
- Client managers: work with a Credentials class. Lazy load of clients
- Tests base classes: adapt where needed to modified rest client, client manager and
credentials
- Tests: adapt where needed to modified rest client, client manager and credentials
Alternatives
------------
We could change all the code in place - without refactoring - adding checks for the
configured auth version. This would still require touching a considerable chunk
of tempest code, without the benefit for future keystone versions.
Implementation
==============
Assignee(s)
-----------
Primary assignee:
Andrea Frittoli <andrea.frittoli@hp.com>
Milestones
----------
Target Milestone for completion:
Juno-1
Work Items
----------
- Move auth from rest_client to auth provider
- Provide unit tests for the new auth class
- Refactor Manager, Credentials class everywhere
- Client Manager provide client lazy load
- Tenant isolation support for V3
- Provide multi auth-version for API tests
- Provide multi auth-version for scenario tests
- Provide multi auth-version for CLI tests
- Provide multi auth-version for 3rd part tests
- Provide multi auth-version for stress framework
Dependencies
============
- Python bindings and CLI are not yet all V3 ready. Some of the work in this blueprint
will have to be postponed until this is fixed