Nix EndpointData.get_versioned_data(authenticated)

Remove unused `authenticated` kwarg from as-yet-unreleased public API
EndpointData.get_versioned_data, and private method
EndpointData._set_version_info.

Change-Id: I03a9969df4586c79b6b63d44fcb5474dd94e6ba2
Closes-Bug: #1703446
This commit is contained in:
Eric Fried 2017-07-10 14:33:47 -05:00
parent 37a2352a21
commit 498320a5fb
2 changed files with 18 additions and 20 deletions

View File

@ -542,9 +542,8 @@ class EndpointData(object):
@positional(3)
def get_versioned_data(self, session, version=None,
authenticated=False, allow=None, cache=None,
allow_version_hack=True, project_id=None,
discover_versions=True,
allow=None, cache=None, allow_version_hack=True,
project_id=None, discover_versions=True,
min_version=None, max_version=None):
"""Run version discovery for the service described.
@ -558,19 +557,17 @@ class EndpointData(object):
:type session: keystoneauth1.session.Session
:param version: The minimum major version required for this endpoint.
Mutually exclusive with min_version and max_version.
:param string project_id: ID of the currently scoped project. Used for
removing project_id components of URLs from
the catalog. (optional)
:param dict allow: Extra filters to pass when discovering API
versions. (optional)
:param bool allow_version_hack: Allow keystoneauth to hack up catalog
URLS to support older schemes.
(optional, default True)
:param dict cache: A dict to be used for caching results in
addition to caching them on the Session.
(optional)
:param bool authenticated: Include a token in the discovery call.
(optional) Defaults to False.
:param bool allow_version_hack: Allow keystoneauth to hack up catalog
URLS to support older schemes.
(optional, default True)
:param string project_id: ID of the currently scoped project. Used for
removing project_id components of URLs from
the catalog. (optional)
:param bool discover_versions: Whether to get version metadata from
the version discovery document even
if it's not neccessary to fulfill the
@ -585,8 +582,11 @@ class EndpointData(object):
with no max_version it is as if max version is
'latest'.
:raises keystoneauth1.exceptions.http.HttpError: An error from an
invalid HTTP response.
:returns: A new EndpointData with the requested versioned data.
:rtype: :py:class:`keystoneauth1.discover.EndpointData`
:raises keystoneauth1.exceptions.discovery.DiscoveryFailure: If the
appropriate versioned data
could not be discovered.
"""
version, min_version, max_version = _normalize_version_args(
version, min_version, max_version)
@ -598,14 +598,13 @@ class EndpointData(object):
new_data = copy.copy(self)
new_data._set_version_info(
session=session, version=version, authenticated=authenticated,
allow=allow, cache=cache, allow_version_hack=allow_version_hack,
project_id=project_id, discover_versions=discover_versions,
min_version=min_version, max_version=max_version)
session=session, version=version, allow=allow, cache=cache,
allow_version_hack=allow_version_hack, project_id=project_id,
discover_versions=discover_versions, min_version=min_version,
max_version=max_version)
return new_data
def _set_version_info(self, session, version,
authenticated=False, allow=None, cache=None,
def _set_version_info(self, session, version, allow=None, cache=None,
allow_version_hack=True, project_id=None,
discover_versions=False,
min_version=None, max_version=None):

View File

@ -287,7 +287,6 @@ class BaseIdentityPlugin(plugin.BaseAuthPlugin):
project_id=project_id,
min_version=min_version,
max_version=max_version,
authenticated=False,
cache=self._discovery_cache,
discover_versions=discover_versions,
allow_version_hack=allow_version_hack, allow=allow)