Adds default domain name to dashboard login params

Desc:

The current tempest configs requires a new property for the version of
Keystone that Horizon is set too. The login screen will require a
domain name when Horizon's local_settings.py is set to Keystone v3 with
multi-domain support enabled.

Details:

The Keystone API runs both version 2 and version 3 concurrently.
They are not compatible and have different methods of authentication.

Clients can choose which version of the API to talk to. (i.e. choosing
the endpoint)

Horizon (The OpenStack Dashboard) uses the Keystone Client binding to
authenticate to the Keystone API. Too choose which version of the
Keystone API to use there are settings in Horizon.

When Horizon's settings are configured to talk to the Keystone V3 API
the login screen will require additional credentials. Namely the the
domain name of the user. When this is omitted, authentication will fail.
The user will not be able to login and view the Overview screen.

Tempest has a scenario test that assumes Horizon will be configured to
use Keystone V2. This tests fails when Horizon is configured to use
Keystone V3.

The Proposed Fix:

Pass an additional request param to the login form that will allow
this scenario test to work for both keystone v2 and keystone v3.

Closes-Bug: #1531594
Change-Id: I060a7ceb19c2c2872b065c94d31255b0dc1750fc
This commit is contained in:
daniel-a-nguyen 2016-01-06 13:15:21 -08:00 committed by Dan Nguyen
parent 5cc7ef78b4
commit a6aa1aa6d0
1 changed files with 4 additions and 0 deletions

View File

@ -97,9 +97,13 @@ class TestDashboardBasicOps(manager.ScenarioTest):
req = request.Request(login_url)
req.add_header('Content-type', 'application/x-www-form-urlencoded')
req.add_header('Referer', CONF.dashboard.dashboard_url)
# Pass the default domain name regardless of the auth version in order
# to test the scenario of when horizon is running with keystone v3
params = {'username': username,
'password': password,
'region': parser.region,
'domain': CONF.auth.default_credentials_domain_name,
'csrfmiddlewaretoken': parser.csrf_token}
self.opener.open(req, parse.urlencode(params))