From d21c52867f7bba2c95ca6f69354ea9218264a583 Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur Date: Mon, 24 Aug 2020 11:46:18 +0200 Subject: [PATCH] Provide the default get_auth_ref implementation osc-lib tries to call it, failing for e.g. http_basic. Change-Id: Iacfba0940beda4dce2a9be0c863cb506d4013e2f --- keystoneauth1/plugin.py | 11 +++++++++++ releasenotes/notes/get-auth-ref-7418e13bd0942060.yaml | 5 +++++ 2 files changed, 16 insertions(+) create mode 100644 releasenotes/notes/get-auth-ref-7418e13bd0942060.yaml diff --git a/keystoneauth1/plugin.py b/keystoneauth1/plugin.py index 0fc3e011..440d65e2 100644 --- a/keystoneauth1/plugin.py +++ b/keystoneauth1/plugin.py @@ -61,6 +61,17 @@ class BaseAuthPlugin(object): """ return None + def get_auth_ref(self, session, **kwargs): + """Return the authentication reference of an auth plugin. + + There are no required kwargs. They are passed directly to the auth + plugin and they are implementation specific. + + :param session: A session object to be used for communication + :type session: keystoneauth1.session.session + """ + return None + def get_headers(self, session, **kwargs): """Fetch authentication headers for message. diff --git a/releasenotes/notes/get-auth-ref-7418e13bd0942060.yaml b/releasenotes/notes/get-auth-ref-7418e13bd0942060.yaml new file mode 100644 index 00000000..4bf92e79 --- /dev/null +++ b/releasenotes/notes/get-auth-ref-7418e13bd0942060.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + Fixes missing ``get_auth_ref`` call for the ``none`` and ``http_basic`` + authentication plugins. The implementation simply returns ``None``.