Add proxy_url to get_credentials in auth

When proxy_url was added, it was added to the AuthProvider
but not to the get_credentials helper, so fixing that.

Change-Id: I2bcb8446295178cc7a24437478a6a1d293e5a197
This commit is contained in:
Andrea Frittoli 2017-10-23 16:53:34 +02:00
parent c0a96b3132
commit cb94b5e506
2 changed files with 10 additions and 2 deletions

View File

@ -0,0 +1,6 @@
---
features:
- |
Add the proxy_url optional parameter to the get_credentials method in
tempest/lib/auth.py so that that helper can be used when going through
and HTTP proxy.

View File

@ -600,7 +600,8 @@ def is_identity_version_supported(identity_version):
def get_credentials(auth_url, fill_in=True, identity_version='v2',
disable_ssl_certificate_validation=None, ca_certs=None,
trace_requests=None, http_timeout=None, **kwargs):
trace_requests=None, http_timeout=None, proxy_url=None,
**kwargs):
"""Builds a credentials object based on the configured auth_version
:param auth_url (string): Full URI of the OpenStack Identity API(Keystone)
@ -618,6 +619,7 @@ def get_credentials(auth_url, fill_in=True, identity_version='v2',
:param trace_requests: trace in log API requests to the auth system
:param http_timeout: timeout in seconds to wait for the http request to
return
:param proxy_url: URL of HTTP(s) proxy used when fill_in is True
:param kwargs (dict): Dict of credential key/value pairs
Examples:
@ -642,7 +644,7 @@ def get_credentials(auth_url, fill_in=True, identity_version='v2',
auth_provider = auth_provider_class(
creds, auth_url, disable_ssl_certificate_validation=dscv,
ca_certs=ca_certs, trace_requests=trace_requests,
http_timeout=http_timeout)
http_timeout=http_timeout, proxy_url=proxy_url)
creds = auth_provider.fill_credentials()
return creds