From cb94b5e506808463caef9fcd302cb1f40c6216a9 Mon Sep 17 00:00:00 2001 From: Andrea Frittoli Date: Mon, 23 Oct 2017 16:53:34 +0200 Subject: [PATCH] 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 --- .../add_proxy_url_get_credentials-aef66b085450513f.yaml | 6 ++++++ tempest/lib/auth.py | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/add_proxy_url_get_credentials-aef66b085450513f.yaml diff --git a/releasenotes/notes/add_proxy_url_get_credentials-aef66b085450513f.yaml b/releasenotes/notes/add_proxy_url_get_credentials-aef66b085450513f.yaml new file mode 100644 index 0000000000..94ab462f22 --- /dev/null +++ b/releasenotes/notes/add_proxy_url_get_credentials-aef66b085450513f.yaml @@ -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. diff --git a/tempest/lib/auth.py b/tempest/lib/auth.py index a850fe1ac8..2dd9d00ce7 100644 --- a/tempest/lib/auth.py +++ b/tempest/lib/auth.py @@ -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