Tempest support for testing against multiple keystone API versions
Tempests needs to be able to choose which version of keystone API shall be used.
At the moment tempest clients, tenant isolation classes and tests themselves rely on getting access to a specific version of an identity client, as well as of a specific set of credentials, which makes it difficult to switch between v2 and v3 and newer versions in the future.
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 shall be factored out in an authentication provider .
Credentials shall be stored in a dedicated class, and provided to tests by a credential manager, being them static or dynamic ones.
Clients managers shall receive credentials and be the sole responsible for instantiating clients and provide them to the tests. At the moment client managers instantiate all available clients when created. This is unnecessary, and it's an overkill when just a single client is needed for a specific set of credentials. So client managers shall be changed to lazy instantiation of clients.
Different kind of tests are to be addressed: API tests, scenario tests, CLI tests, 3rd party tests, stress test framework. For scenario and CLI tests, tempest uses official clients. The adoption to keystone v3 tests is limited to the availability of keystone v3 compatibility in the official clients.
Blueprint information
- Status:
- Complete
- Approver:
- Giulio Fidente
- Priority:
- High
- Drafter:
- Andrea Frittoli
- Direction:
- Approved
- Assignee:
- Andrea Frittoli
- Definition:
- Approved
- Series goal:
- Accepted for kilo
- Implementation:
-
Implemented
- Milestone target:
- None
- Started by
- Andrea Frittoli
- Completed by
- Andrea Frittoli
Related branches
Related bugs
Sprints
Whiteboard
This should probably be implemented with a config option.
Working assumption is that all non-keystone tests only uses a single keystone domain. There is no need for multiple domains for the non-keystone tests. ATM we have username and project name in tempest.conf. With this assumption it would be sufficient to add a domain name, which would apply for both user domain scope as well as project domain scope.
Created https:/
Gerrit topic: https:/
Addressed by: https:/
Multiversion authentication part1
Addressed by: https:/
Fixes handling of arrays in XML to JSON conversion
Addressed by: https:/
Multiversion authentication part2
Gerrit topic: https:/
Addressed by: https:/
Refactor Managers to a common base class
Addressed by: https:/
Defines a Credentials class
Gerrit topic: https:/
Addressed by: https:/
Enforces the use of Credentials
Addressed by: https:/
Object storage tests to use default auth_provider
Addressed by: https:/
Configuration for domain name
Addressed by: https:/
Get credential IDs from Credentials class
Addressed by: https:/
add bp:multi-
Addressed by: https:/
Define V3 Credentials
Addressed by: https:/
Use auth data to fill credentials
Addressed by: https:/
Enforces the use of Credentials (part2)
Addressed by: https:/
Access credential fields as attributes
Addressed by: https:/
Official client based auth
Addressed by: https:/
Add config fixture support to unit tests
Addressed by: https:/
Use auth provider in official client manager
Addressed by: https:/
Get tenant_id from credentials
Addressed by: https:/
Support v3 in credential providers and subclasses
Addressed by: https:/
Use the configured version of identity in stress
Addressed by: https:/
Skip ec2 and s3 tests without identity v2
Addressed by: https:/
Skip CLI tests is identity v2 is not available
Addressed by: https:/
Copy the default params dict to avoid race
Addressed by: https:/
Support identity_version in credential provider wrappers
Addressed by: https:/
Non-admin token tests for Keystone API
Addressed by: https:/
mv multi-keystone-
Work Items
Work items:
Define exact scope: DONE
Move auth from rest_client to auth provider: DONE
Provide unit tests for the new auth class: DONE
Refactor Manager, Credentials class everywhere: DONE
Tenant isolation support for V3: INPROGRESS
Provide multi auth-version for API tests: DONE
Provide multi auth-version for scenario tests: DONE
Skip 3rd part tests in case of v3 auth: DONE
Provide multi auth-version for stress framework: DONE
Setup an experimental keystone v3 check: DONE
Dependency tree

* Blueprints in grey have been implemented.