Initial Split of python-keystoneclient to keystoneauth

Change-Id: Ib33d022506072749e23caf6d9defbcc9a65c8b48
changes/12/178912/1
Morgan Fainberg 8 years ago
parent 0d0a57c963
commit f70d313def
  1. 4
      .coveragerc
  2. 2
      .gitreview
  3. 2
      .testr.conf
  4. 2
      CONTRIBUTING.rst
  5. 2
      HACKING.rst
  6. 2
      LICENSE
  7. 0
      README.rst
  8. 0
      keystoneauth/__init__.py
  9. 4
      keystoneauth/access.py
  10. 26
      keystoneauth/adapter.py
  11. 6
      keystoneauth/auth/__init__.py
  12. 24
      keystoneauth/auth/base.py
  13. 12
      keystoneauth/auth/cli.py
  14. 6
      keystoneauth/auth/conf.py
  15. 8
      keystoneauth/auth/identity/__init__.py
  16. 6
      keystoneauth/auth/identity/access.py
  17. 38
      keystoneauth/auth/identity/base.py
  18. 6
      keystoneauth/auth/identity/generic/__init__.py
  19. 10
      keystoneauth/auth/identity/generic/base.py
  20. 10
      keystoneauth/auth/identity/generic/password.py
  21. 8
      keystoneauth/auth/identity/generic/token.py
  22. 8
      keystoneauth/auth/identity/v2.py
  23. 8
      keystoneauth/auth/identity/v3/__init__.py
  24. 12
      keystoneauth/auth/identity/v3/base.py
  25. 8
      keystoneauth/auth/identity/v3/federated.py
  26. 2
      keystoneauth/auth/identity/v3/password.py
  27. 2
      keystoneauth/auth/identity/v3/token.py
  28. 2
      keystoneauth/auth/token_endpoint.py
  29. 6
      keystoneauth/exceptions.py
  30. 12
      keystoneauth/fixture/__init__.py
  31. 2
      keystoneauth/fixture/discovery.py
  32. 0
      keystoneauth/fixture/exception.py
  33. 2
      keystoneauth/fixture/v2.py
  34. 2
      keystoneauth/fixture/v3.py
  35. 0
      keystoneauth/hacking/__init__.py
  36. 4
      keystoneauth/hacking/checks.py
  37. 2
      keystoneauth/i18n.py
  38. 0
      keystoneauth/openstack/__init__.py
  39. 0
      keystoneauth/openstack/common/__init__.py
  40. 2
      keystoneauth/openstack/common/_i18n.py
  41. 0
      keystoneauth/openstack/common/apiclient/__init__.py
  42. 4
      keystoneauth/openstack/common/apiclient/auth.py
  43. 4
      keystoneauth/openstack/common/apiclient/base.py
  44. 10
      keystoneauth/openstack/common/apiclient/client.py
  45. 2
      keystoneauth/openstack/common/apiclient/exceptions.py
  46. 2
      keystoneauth/openstack/common/apiclient/fake_client.py
  47. 6
      keystoneauth/openstack/common/apiclient/utils.py
  48. 0
      keystoneauth/openstack/common/memorycache.py
  49. 0
      keystoneauth/openstack/common/uuidutils.py
  50. 6
      keystoneauth/service_catalog.py
  51. 50
      keystoneauth/session.py
  52. 0
      keystoneauth/tests/__init__.py
  53. 0
      keystoneauth/tests/unit/__init__.py
  54. 0
      keystoneauth/tests/unit/auth/__init__.py
  55. 12
      keystoneauth/tests/unit/auth/test_access.py
  56. 6
      keystoneauth/tests/unit/auth/test_cli.py
  57. 12
      keystoneauth/tests/unit/auth/test_conf.py
  58. 12
      keystoneauth/tests/unit/auth/test_identity_common.py
  59. 8
      keystoneauth/tests/unit/auth/test_identity_v2.py
  60. 16
      keystoneauth/tests/unit/auth/test_identity_v3.py
  61. 10
      keystoneauth/tests/unit/auth/test_identity_v3_federated.py
  62. 2
      keystoneauth/tests/unit/auth/test_loading.py
  63. 10
      keystoneauth/tests/unit/auth/test_password.py
  64. 10
      keystoneauth/tests/unit/auth/test_token.py
  65. 6
      keystoneauth/tests/unit/auth/test_token_endpoint.py
  66. 12
      keystoneauth/tests/unit/auth/utils.py
  67. 74
      keystoneauth/tests/unit/keystoneauth_fixtures.py
  68. 20
      keystoneauth/tests/unit/test_discovery.py
  69. 4
      keystoneauth/tests/unit/test_hacking_checks.py
  70. 12
      keystoneauth/tests/unit/test_session.py
  71. 209
      keystoneauth/tests/unit/utils.py
  72. 2
      keystoneauth/utils.py
  73. 3
      openstack-common.conf
  74. 40
      setup.cfg
  75. 8
      tox.ini

@ -1,7 +1,7 @@
[run]
branch = True
source = keystoneclient
omit = keystoneclient/tests/*,keystoneclient/openstack/*
source = keystoneauth
omit = keystoneauth/tests/*,keystoneauth/openstack/*
[report]
ignore-errors = True

@ -1,4 +1,4 @@
[gerrit]
host=review.openstack.org
port=29418
project=openstack/python-keystoneclient.git
project=openstack/keystoneauth.git

@ -1,4 +1,4 @@
[DEFAULT]
test_command=${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./keystoneclient/tests/unit} $LISTOPT $IDOPTION
test_command=${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./keystoneauth/tests/unit} $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list

@ -15,4 +15,4 @@ Pull requests submitted through GitHub will be ignored.
Bugs should be filed on Launchpad, not GitHub:
https://bugs.launchpad.net/python-keystoneclient
https://bugs.launchpad.net/keystoneauth

@ -15,7 +15,7 @@ exceptions to an instance or subclass of ClientException.
Testing
=======
python-keystoneclient uses testtools and testr for its unittest suite
keystoneauth uses testtools and testr for its unittest suite
and its test runner. Basic workflow around our use of tox and testr can
be found at http://wiki.openstack.org/testr. If you'd like to learn more
in depth:

@ -179,7 +179,7 @@ All rights reserved.
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
--- License for python-keystoneclient versions prior to 2.1 ---
--- License for keystoneauth versions prior to 2.1 ---
All rights reserved.

@ -19,8 +19,8 @@ import datetime
from oslo_utils import timeutils
from keystoneclient.i18n import _
from keystoneclient import service_catalog
from keystoneauth.i18n import _
from keystoneauth import service_catalog
# gap, in seconds, to determine whether the given token is about to expire

@ -12,7 +12,7 @@
from oslo_serialization import jsonutils
from keystoneclient import utils
from keystoneauth import utils
class Adapter(object):
@ -25,7 +25,7 @@ class Adapter(object):
of client local data around the global session object.
:param session: The session object to wrap.
:type session: keystoneclient.session.Session
:type session: keystonauth.session.Session
:param str service_type: The default service_type for URL discovery.
:param str service_name: The default service_name for URL discovery.
:param str interface: The default interface for URL discovery.
@ -34,7 +34,7 @@ class Adapter(object):
for this client.
:param tuple version: The version that this API targets.
:param auth: An auth plugin to use instead of the session one.
:type auth: keystoneclient.auth.base.BaseAuthPlugin
:type auth: keystonauth.auth.base.BaseAuthPlugin
:param str user_agent: The User-Agent string to set.
:param int connect_retries: the maximum number of retries that should
be attempted for connection errors.
@ -99,9 +99,9 @@ class Adapter(object):
:param auth: The auth plugin to use for token. Overrides the plugin
on the session. (optional)
:type auth: :class:`keystoneclient.auth.base.BaseAuthPlugin`
:type auth: :class:`keystonauth.auth.base.BaseAuthPlugin`
:raises keystoneclient.exceptions.AuthorizationFailure: if a new token
:raises keystonauth.exceptions.AuthorizationFailure: if a new token
fetch fails.
:returns: A valid token.
@ -114,9 +114,9 @@ class Adapter(object):
:param auth: The auth plugin to use for token. Overrides the plugin on
the session. (optional)
:type auth: :class:`keystoneclient.auth.base.BaseAuthPlugin`
:type auth: :class:`keystonauth.auth.base.BaseAuthPlugin`
:raises keystoneclient.exceptions.MissingAuthPlugin: if a plugin is not
:raises keystonauth.exceptions.MissingAuthPlugin: if a plugin is not
available.
:returns: An endpoint if available or None.
@ -137,11 +137,11 @@ class Adapter(object):
:param auth: The auth plugin to use for token. Overrides the plugin
on the session. (optional)
:type auth: keystoneclient.auth.base.BaseAuthPlugin
:type auth: keystonauth.auth.base.BaseAuthPlugin
:raises keystoneclient.exceptions.AuthorizationFailure:
:raises keystonauth.exceptions.AuthorizationFailure:
if a new token fetch fails.
:raises keystoneclient.exceptions.MissingAuthPlugin:
:raises keystonauth.exceptions.MissingAuthPlugin:
if a plugin is not available.
:returns: Current `user_id` or None if not supported by plugin.
@ -154,11 +154,11 @@ class Adapter(object):
:param auth: The auth plugin to use for token. Overrides the plugin
on the session. (optional)
:type auth: keystoneclient.auth.base.BaseAuthPlugin
:type auth: keystonauth.auth.base.BaseAuthPlugin
:raises keystoneclient.exceptions.AuthorizationFailure:
:raises keystonauth.exceptions.AuthorizationFailure:
if a new token fetch fails.
:raises keystoneclient.exceptions.MissingAuthPlugin:
:raises keystonauth.exceptions.MissingAuthPlugin:
if a plugin is not available.
:returns: Current `project_id` or None if not supported by plugin.

@ -11,9 +11,9 @@
# under the License.
from keystoneclient.auth.base import * # noqa
from keystoneclient.auth.cli import * # noqa
from keystoneclient.auth.conf import * # noqa
from keystoneauth.auth.base import * # noqa
from keystoneauth.auth.cli import * # noqa
from keystoneauth.auth.conf import * # noqa
__all__ = [

@ -15,7 +15,7 @@ import os
import six
import stevedore
from keystoneclient import exceptions
from keystoneauth import exceptions
# NOTE(jamielennox): The AUTH_INTERFACE is a special value that can be
@ -23,7 +23,7 @@ from keystoneclient import exceptions
# 'interface' it should return the initial URL that was passed to the plugin.
AUTH_INTERFACE = object()
PLUGIN_NAMESPACE = 'keystoneclient.auth.plugin'
PLUGIN_NAMESPACE = 'keystonauth.auth.plugin'
IDENTITY_AUTH_HEADER_NAME = 'X-Auth-Token'
@ -33,9 +33,9 @@ def get_plugin_class(name):
:param str name: The name of the object to get.
:returns: An auth plugin class.
:rtype: :py:class:`keystoneclient.auth.BaseAuthPlugin`
:rtype: :py:class:`keystonauth.auth.BaseAuthPlugin`
:raises keystoneclient.exceptions.NoMatchingPlugin: if a plugin cannot be
:raises keystonauth.exceptions.NoMatchingPlugin: if a plugin cannot be
created.
"""
try:
@ -73,7 +73,7 @@ class BaseAuthPlugin(object):
the `get_headers` method instead.
:param session: A session object so the plugin can make HTTP calls.
:type session: keystoneclient.session.Session
:type session: keystonauth.session.Session
:return: A token to use.
:rtype: string
@ -104,7 +104,7 @@ class BaseAuthPlugin(object):
achieved by returning an empty dictionary.
:param session: The session object that the auth_plugin belongs to.
:type session: keystoneclient.session.Session
:type session: keystonauth.session.Session
:returns: Headers that are set to authenticate a message or None for
failure. Note that when checking this value that the empty
@ -132,7 +132,7 @@ class BaseAuthPlugin(object):
- ``region_name``: the region the endpoint exists in.
:param session: The session object that the auth_plugin belongs to.
:type session: keystoneclient.session.Session
:type session: keystonauth.session.Session
:returns: The base URL that will be used to talk to the required
service or None if not available.
@ -164,7 +164,7 @@ class BaseAuthPlugin(object):
currently authenticated user id.
:param session: A session object so the plugin can make HTTP calls.
:type session: keystoneclient.session.Session
:type session: keystonauth.session.Session
:returns: A user identifier or None if one is not available.
:rtype: str
@ -179,7 +179,7 @@ class BaseAuthPlugin(object):
the currently authenticated project id.
:param session: A session object so the plugin can make HTTP calls.
:type session: keystoneclient.session.Session
:type session: keystonauth.session.Session
:returns: A project identifier or None if one is not available.
:rtype: str
@ -253,7 +253,7 @@ class BaseAuthPlugin(object):
:type namespace: argparse.Namespace
:returns: An auth plugin, or None if a name is not provided.
:rtype: :py:class:`keystoneclient.auth.BaseAuthPlugin`
:rtype: :py:class:`keystonauth.auth.BaseAuthPlugin`
"""
def _getter(opt):
@ -283,7 +283,7 @@ class BaseAuthPlugin(object):
:param string group: The group name that options should be read from.
:returns: An authentication Plugin.
:rtype: :py:class:`keystoneclient.auth.BaseAuthPlugin`
:rtype: :py:class:`keystonauth.auth.BaseAuthPlugin`
"""
def _getter(opt):
@ -306,7 +306,7 @@ class BaseAuthPlugin(object):
:type getter: callable
:returns: An authentication Plugin.
:rtype: :py:class:`keystoneclient.auth.BaseAuthPlugin`
:rtype: :py:class:`keystonauth.auth.BaseAuthPlugin`
"""
plugin_opts = cls.get_options()

@ -13,8 +13,8 @@
import argparse
import os
from keystoneclient.auth import base
from keystoneclient import utils
from keystoneauth.auth import base
from keystoneauth import utils
@utils.positional()
@ -30,9 +30,9 @@ def register_argparse_arguments(parser, argv, default=None):
if one isn't specified by the CLI. default: None.
:returns: The plugin class that will be loaded or None if not provided.
:rtype: :py:class:`keystoneclient.auth.BaseAuthPlugin`
:rtype: :py:class:`keystonauth.auth.BaseAuthPlugin`
:raises keystoneclient.exceptions.NoMatchingPlugin: if a plugin cannot be
:raises keystonauth.exceptions.NoMatchingPlugin: if a plugin cannot be
created.
"""
in_parser = argparse.ArgumentParser(add_help=False)
@ -69,9 +69,9 @@ def load_from_argparse_arguments(namespace, **kwargs):
:param Namespace namespace: The result from CLI parsing.
:returns: An auth plugin, or None if a name is not provided.
:rtype: :py:class:`keystoneclient.auth.BaseAuthPlugin`
:rtype: :py:class:`keystonauth.auth.BaseAuthPlugin`
:raises keystoneclient.exceptions.NoMatchingPlugin: if a plugin cannot be
:raises keystonauth.exceptions.NoMatchingPlugin: if a plugin cannot be
created.
"""
if not namespace.os_auth_plugin:

@ -12,7 +12,7 @@
from oslo_config import cfg
from keystoneclient.auth import base
from keystoneauth.auth import base
_AUTH_PLUGIN_OPT = cfg.StrOpt('auth_plugin', help='Name of the plugin to load')
@ -91,9 +91,9 @@ def load_from_conf_options(conf, group, **kwargs):
:param string group: The group name that options should be read from.
:returns: An authentication Plugin or None if a name is not provided
:rtype: :py:class:`keystoneclient.auth.BaseAuthPlugin`
:rtype: :py:class:`keystonauth.auth.BaseAuthPlugin`
:raises keystoneclient.exceptions.NoMatchingPlugin: if a plugin cannot be
:raises keystonauth.exceptions.NoMatchingPlugin: if a plugin cannot be
created.
"""
# NOTE(jamielennox): plugins are allowed to specify a 'section' which is

@ -10,10 +10,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from keystoneclient.auth.identity import base
from keystoneclient.auth.identity import generic
from keystoneclient.auth.identity import v2
from keystoneclient.auth.identity import v3
from keystoneauth.auth.identity import base
from keystoneauth.auth.identity import generic
from keystoneauth.auth.identity import v2
from keystoneauth.auth.identity import v3
BaseIdentityPlugin = base.BaseIdentityPlugin

@ -10,8 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from keystoneclient.auth.identity import base
from keystoneclient import utils
from keystoneauth.auth.identity import base
from keystoneauth import utils
class AccessInfoPlugin(base.BaseIdentityPlugin):
@ -26,7 +26,7 @@ class AccessInfoPlugin(base.BaseIdentityPlugin):
authorizing information.
:param auth_ref: the existing AccessInfo object.
:type auth_ref: keystoneclient.access.AccessInfo
:type auth_ref: keystonauth.access.AccessInfo
:param auth_url: the url where this AccessInfo was retrieved from. Required
if using the AUTH_INTERFACE with get_endpoint. (optional)
"""

@ -16,11 +16,11 @@ import logging
from oslo_config import cfg
import six
from keystoneclient import _discover
from keystoneclient.auth import base
from keystoneclient import exceptions
from keystoneclient.i18n import _LW
from keystoneclient import utils
from keystoneauth import _discover
from keystoneauth.auth import base
from keystoneauth import exceptions
from keystoneauth.i18n import _LW
from keystoneauth import utils
LOG = logging.getLogger(__name__)
@ -76,16 +76,16 @@ class BaseIdentityPlugin(base.BaseAuthPlugin):
data then you should use get_access.
:param session: A session object that can be used for communication.
:type session: keystoneclient.session.Session
:type session: keystonauth.session.Session
:raises keystoneclient.exceptions.InvalidResponse: The response
:raises keystonauth.exceptions.InvalidResponse: The response
returned wasn't
appropriate.
:raises keystoneclient.exceptions.HttpError: An error from an invalid
:raises keystonauth.exceptions.HttpError: An error from an invalid
HTTP response.
:returns: Token access information.
:rtype: :py:class:`keystoneclient.access.AccessInfo`
:rtype: :py:class:`keystonauth.access.AccessInfo`
"""
def get_token(self, session, **kwargs):
@ -94,9 +94,9 @@ class BaseIdentityPlugin(base.BaseAuthPlugin):
If a valid token is not present then a new one will be fetched.
:param session: A session object that can be used for communication.
:type session: keystoneclient.session.Session
:type session: keystonauth.session.Session
:raises keystoneclient.exceptions.HttpError: An error from an invalid
:raises keystonauth.exceptions.HttpError: An error from an invalid
HTTP response.
:return: A valid token.
@ -133,13 +133,13 @@ class BaseIdentityPlugin(base.BaseAuthPlugin):
one will be fetched.
:param session: A session object that can be used for communication.
:type session: keystoneclient.session.Session
:type session: keystonauth.session.Session
:raises keystoneclient.exceptions.HttpError: An error from an invalid
:raises keystonauth.exceptions.HttpError: An error from an invalid
HTTP response.
:returns: Valid AccessInfo
:rtype: :py:class:`keystoneclient.access.AccessInfo`
:rtype: :py:class:`keystonauth.access.AccessInfo`
"""
if self._needs_reauthenticate():
self.auth_ref = self.get_auth_ref(session)
@ -175,7 +175,7 @@ class BaseIdentityPlugin(base.BaseAuthPlugin):
the session and kwargs.
:param session: A session object that can be used for communication.
:type session: keystoneclient.session.Session
:type session: keystonauth.session.Session
:param string service_type: The type of service to lookup the endpoint
for. This plugin will return None (failure)
if service_type is not provided.
@ -191,7 +191,7 @@ class BaseIdentityPlugin(base.BaseAuthPlugin):
:param tuple version: The minimum version number required for this
endpoint. (optional)
:raises keystoneclient.exceptions.HttpError: An error from an invalid
:raises keystonauth.exceptions.HttpError: An error from an invalid
HTTP response.
:return: A valid endpoint URL or None if not available.
@ -266,15 +266,15 @@ class BaseIdentityPlugin(base.BaseAuthPlugin):
be needed by users.
:param session: A session object to discover with.
:type session: keystoneclient.session.Session
:type session: keystonauth.session.Session
:param str url: The url to lookup.
:param bool authenticated: Include a token in the discovery call.
(optional) Defaults to None (use a token
if a plugin is installed).
:raises keystoneclient.exceptions.DiscoveryFailure: if for some reason
:raises keystonauth.exceptions.DiscoveryFailure: if for some reason
the lookup fails.
:raises keystoneclient.exceptions.HttpError: An error from an invalid
:raises keystonauth.exceptions.HttpError: An error from an invalid
HTTP response.
:returns: A discovery object with the results of looking up that URL.

@ -10,9 +10,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from keystoneclient.auth.identity.generic.base import BaseGenericPlugin # noqa
from keystoneclient.auth.identity.generic.password import Password # noqa
from keystoneclient.auth.identity.generic.token import Token # noqa
from keystoneauth.auth.identity.generic.base import BaseGenericPlugin # noqa
from keystoneauth.auth.identity.generic.password import Password # noqa
from keystoneauth.auth.identity.generic.token import Token # noqa
__all__ = ['BaseGenericPlugin',

@ -17,10 +17,10 @@ from oslo_config import cfg
import six
import six.moves.urllib.parse as urlparse
from keystoneclient import _discover
from keystoneclient.auth.identity import base
from keystoneclient import exceptions
from keystoneclient.i18n import _, _LW
from keystoneauth import _discover
from keystoneauth.auth.identity import base
from keystoneauth import exceptions
from keystoneauth.i18n import _, _LW
LOG = logging.getLogger(__name__)
@ -82,7 +82,7 @@ class BaseGenericPlugin(base.BaseIdentityPlugin):
call will be made with other available URLs.
:param session: A session object.
:type session: keystoneclient.session.Session
:type session: keystonauth.session.Session
:param tuple version: A tuple of the API version at the URL.
:param string url: The base URL for this version.
:param string raw_status: The status that was in the discovery field.

@ -14,11 +14,11 @@ import logging
from oslo_config import cfg
from keystoneclient import _discover
from keystoneclient.auth.identity.generic import base
from keystoneclient.auth.identity import v2
from keystoneclient.auth.identity import v3
from keystoneclient import utils
from keystoneauth import _discover
from keystoneauth.auth.identity.generic import base
from keystoneauth.auth.identity import v2
from keystoneauth.auth.identity import v3
from keystoneauth import utils
LOG = logging.getLogger(__name__)

@ -14,10 +14,10 @@ import logging
from oslo_config import cfg
from keystoneclient import _discover
from keystoneclient.auth.identity.generic import base
from keystoneclient.auth.identity import v2
from keystoneclient.auth.identity import v3
from keystoneauth import _discover
from keystoneauth.auth.identity.generic import base
from keystoneauth.auth.identity import v2
from keystoneauth.auth.identity import v3
LOG = logging.getLogger(__name__)

@ -16,10 +16,10 @@ import logging
from oslo_config import cfg
import six
from keystoneclient import access
from keystoneclient.auth.identity import base
from keystoneclient import exceptions
from keystoneclient import utils
from keystoneauth import access
from keystoneauth.auth.identity import base
from keystoneauth import exceptions
from keystoneauth import utils
_logger = logging.getLogger(__name__)

@ -10,10 +10,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from keystoneclient.auth.identity.v3.base import * # noqa
from keystoneclient.auth.identity.v3.federated import * # noqa
from keystoneclient.auth.identity.v3.password import * # noqa
from keystoneclient.auth.identity.v3.token import * # noqa
from keystoneauth.auth.identity.v3.base import * # noqa
from keystoneauth.auth.identity.v3.federated import * # noqa
from keystoneauth.auth.identity.v3.password import * # noqa
from keystoneauth.auth.identity.v3.token import * # noqa
__all__ = ['Auth',

@ -16,11 +16,11 @@ import logging
from oslo_config import cfg
import six
from keystoneclient import access
from keystoneclient.auth.identity import base
from keystoneclient import exceptions
from keystoneclient.i18n import _
from keystoneclient import utils
from keystoneauth import access
from keystoneauth.auth.identity import base
from keystoneauth import exceptions
from keystoneauth.i18n import _
from keystoneauth import utils
_logger = logging.getLogger(__name__)
@ -222,7 +222,7 @@ class AuthMethod(object):
"""Return the authentication section of an auth plugin.
:param session: The communication session.
:type session: keystoneclient.session.Session
:type session: keystonauth.session.Session
:param Auth auth: The auth plugin calling the method.
:param dict headers: The headers that will be sent with the auth
request if a plugin needs to add to them.

@ -15,8 +15,8 @@ import abc
from oslo_config import cfg
import six
from keystoneclient.auth.identity.v3 import base
from keystoneclient.auth.identity.v3 import token
from keystoneauth.auth.identity.v3 import base
from keystoneauth.auth.identity.v3 import token
__all__ = ['FederatedBaseAuth']
@ -88,10 +88,10 @@ class FederatedBaseAuth(base.BaseAuth):
is present then the token is rescoped to that target.
:param session: a session object to send out HTTP requests.
:type session: keystoneclient.session.Session
:type session: keystonauth.session.Session
:returns: a token data representation
:rtype: :py:class:`keystoneclient.access.AccessInfo`
:rtype: :py:class:`keystonauth.access.AccessInfo`
"""
auth_ref = self.get_unscoped_auth_ref(session)

@ -12,7 +12,7 @@
from oslo_config import cfg
from keystoneclient.auth.identity.v3 import base
from keystoneauth.auth.identity.v3 import base
__all__ = ['PasswordMethod', 'Password']

@ -12,7 +12,7 @@
from oslo_config import cfg
from keystoneclient.auth.identity.v3 import base
from keystoneauth.auth.identity.v3 import base
__all__ = ['TokenMethod', 'Token']

@ -12,7 +12,7 @@
from oslo_config import cfg
from keystoneclient.auth import base
from keystoneauth.auth import base
class Token(base.BaseAuthPlugin):

@ -27,8 +27,8 @@ Exception definitions.
"""
from keystoneclient.i18n import _
from keystoneclient.openstack.common.apiclient.exceptions import * # noqa
from keystoneauth.i18n import _
from keystoneauth.openstack.common.apiclient.exceptions import * # noqa
# NOTE(akurilin): This alias should be left here to support backwards
# compatibility until we are sure that usage of these exceptions in
@ -73,7 +73,7 @@ class VersionNotAvailable(DiscoveryFailure):
class MethodNotImplemented(ClientException):
"""Method not implemented by the keystoneclient API."""
"""Method not implemented by the keystonauth API."""
class MissingAuthPlugin(ClientException):

@ -16,16 +16,16 @@ in testing.
They should be considered part of the public API because they may be relied
upon to generate test tokens for other clients. However they should never be
imported into the main client (keystoneclient or other). Because of this there
imported into the main client (keystonauth or other). Because of this there
may be dependencies from this module on libraries that are only available in
testing.
"""
from keystoneclient.fixture.discovery import * # noqa
from keystoneclient.fixture.exception import FixtureValidationError # noqa
from keystoneclient.fixture.v2 import Token as V2Token # noqa
from keystoneclient.fixture.v3 import Token as V3Token # noqa
from keystoneclient.fixture.v3 import V3FederationToken # noqa
from keystoneauth.fixture.discovery import * # noqa
from keystoneauth.fixture.exception import FixtureValidationError # noqa
from keystoneauth.fixture.v2 import Token as V2Token # noqa
from keystoneauth.fixture.v3 import Token as V3Token # noqa
from keystoneauth.fixture.v3 import V3FederationToken # noqa
__all__ = ['DiscoveryList',
'FixtureValidationError',

@ -14,7 +14,7 @@ import datetime
from oslo_utils import timeutils
from keystoneclient import utils
from keystoneauth import utils
__all__ = ['DiscoveryList',
'V2Discovery',

@ -15,7 +15,7 @@ import uuid
from oslo_utils import timeutils
from keystoneclient.fixture import exception
from keystoneauth.fixture import exception
class _Service(dict):

@ -15,7 +15,7 @@ import uuid
from oslo_utils import timeutils
from keystoneclient.fixture import exception
from keystoneauth.fixture import exception
class _Service(dict):

@ -10,10 +10,10 @@
# License for the specific language governing permissions and limitations
# under the License.
"""python-keystoneclient's pep8 extensions.
"""keystoneauth's pep8 extensions.
In order to make the review process faster and easier for core devs we are
adding some python-keystoneclient specific pep8 checks. This will catch common
adding some keystoneauth specific pep8 checks. This will catch common
errors so that core devs don't have to.
"""

@ -21,7 +21,7 @@ See http://docs.openstack.org/developer/oslo.i18n/usage.html .
import oslo_i18n
_translators = oslo_i18n.TranslatorFactory(domain='keystoneclient')
_translators = oslo_i18n.TranslatorFactory(domain='keystonauth')
# The primary translation function using the well-known name "_"
_ = _translators.primary

@ -24,7 +24,7 @@ import oslo.i18n
# repository. It is OK to have more than one translation function
# using the same domain, since there will still only be one message
# catalog.
_translators = oslo.i18n.TranslatorFactory(domain='keystoneclient')
_translators = oslo.i18n.TranslatorFactory(domain='keystonauth')
# The primary translation function using the well-known name "_"
_ = _translators.primary

@ -24,7 +24,7 @@ import os
import six
from stevedore import extension
from keystoneclient.openstack.common.apiclient import exceptions
from keystoneauth.openstack.common.apiclient import exceptions
_discovered_plugins = {}
@ -41,7 +41,7 @@ def discover_auth_systems():
def add_plugin(ext):
_discovered_plugins[ext.name] = ext.plugin
ep_namespace = "keystoneclient.openstack.common.apiclient.auth"
ep_namespace = "keystonauth.openstack.common.apiclient.auth"
mgr = extension.ExtensionManager(ep_namespace)
mgr.map(add_plugin)

@ -30,8 +30,8 @@ from oslo.utils import strutils
import six
from six.moves.urllib import parse
from keystoneclient.openstack.common._i18n import _
from keystoneclient.openstack.common.apiclient import exceptions
from keystoneauth.openstack.common._i18n import _
from keystoneauth.openstack.common.apiclient import exceptions
def getid(obj):

@ -38,8 +38,8 @@ from oslo.utils import encodeutils
from oslo.utils import importutils
import requests
from keystoneclient.openstack.common._i18n import _
from keystoneclient.openstack.common.apiclient import exceptions
from keystoneauth.openstack.common._i18n import _
from keystoneauth.openstack.common.apiclient import exceptions
_logger = logging.getLogger(__name__)
SENSITIVE_HEADERS = ('X-Auth-Token', 'X-Subject-Token',)
@ -64,7 +64,7 @@ class HTTPClient(object):
into terminal and send the same request with curl.
"""
user_agent = "keystoneclient.openstack.common.apiclient"
user_agent = "keystonauth.openstack.common.apiclient"
def __init__(self,
auth_plugin,
@ -291,7 +291,7 @@ class HTTPClient(object):
Example:
>>> def test_clients():
... from keystoneclient.auth import keystone
... from keystonauth.auth import keystone
... from openstack.common.apiclient import client
... auth = keystone.KeystoneAuthPlugin(
... username="user", password="pass", tenant_name="tenant",
@ -301,7 +301,7 @@ class HTTPClient(object):
... from novaclient.v1_1 import client
... client.Client(openstack_client)
... # create keystone client
... from keystoneclient.v2_0 import client
... from keystonauth.v2_0 import client
... client.Client(openstack_client)
... # use them
... openstack_client.identity.tenants.list()

@ -25,7 +25,7 @@ import sys
import six
from keystoneclient.openstack.common._i18n import _
from keystoneauth.openstack.common._i18n import _
class ClientException(Exception):

@ -30,7 +30,7 @@ import requests
import six
from six.moves.urllib import parse
from keystoneclient.openstack.common.apiclient import client
from keystoneauth.openstack.common.apiclient import client
def assert_has_keys(dct, required=None, optional=None):

@ -14,9 +14,9 @@
from oslo.utils import encodeutils
import six
from keystoneclient.openstack.common._i18n import _
from keystoneclient.openstack.common.apiclient import exceptions
from keystoneclient.openstack.common import uuidutils
from keystoneauth.openstack.common._i18n import _
from keystoneauth.openstack.common.apiclient import exceptions
from keystoneauth.openstack.common import uuidutils
def find_resource(manager, name_or_id, **find_args):

@ -20,9 +20,9 @@ import abc
import six
from keystoneclient import exceptions
from keystoneclient.i18n import _
from keystoneclient import utils
from keystoneauth import exceptions
from keystoneauth.i18n import _
from keystoneauth import utils
@six.add_metaclass(abc.ABCMeta)

@ -25,13 +25,13 @@ import requests
import six
from six.moves import urllib
from keystoneclient import exceptions
from keystoneclient.i18n import _, _LI, _LW
from keystoneclient import utils
from keystoneauth import exceptions
from keystoneauth.i18n import _, _LI, _LW
from keystoneauth import utils
osprofiler_web = importutils.try_import("osprofiler.web")
USER_AGENT = 'python-keystoneclient'
USER_AGENT = 'keystoneauth'
_logger = logging.getLogger(__name__)
@ -82,7 +82,7 @@ class Session(object):
:param auth: An authentication plugin to authenticate the session with.
(optional, defaults to None)
:type auth: :py:class:`keystoneclient.auth.base.BaseAuthPlugin`
:type auth: :py:class:`keystonauth.auth.base.BaseAuthPlugin`
:param requests.Session session: A requests session object that can be used
for issuing requests. (optional)
:param string original_ip: The original IP of the requesting user which
@ -104,7 +104,7 @@ class Session(object):
to 0)
:param string user_agent: A User-Agent header string to use for the
request. If not provided a default is used.
(optional, defaults to 'python-keystoneclient')
(optional, defaults to 'keystoneauth')
:param int/bool redirect: Controls the maximum number of redirections that
can be followed by a request. Either an integer
for a specific count or True/False for
@ -275,7 +275,7 @@ class Session(object):
:param auth: The auth plugin to use when authenticating this request.
This will override the plugin that is attached to the
session (if any). (optional)
:type auth: :py:class:`keystoneclient.auth.base.BaseAuthPlugin`
:type auth: :py:class:`keystonauth.auth.base.BaseAuthPlugin`
:param requests_auth: A requests library auth plugin that cannot be
passed via kwarg because the `auth` kwarg
collides with our own auth plugins. (optional)
@ -289,7 +289,7 @@ class Session(object):
:param bool log: If True then log the request and response data to the
debug log. (optional, default True)
:param logger: The logger object to use to log request and responses.
If not provided the keystoneclient.session default
If not provided the keystonauth.session default
logger will be used.
:type logger: logging.Logger
:param kwargs: any other parameter that can be passed to
@ -298,7 +298,7 @@ class Session(object):
'allow_redirects' is ignored as redirects are handled
by the session.
:raises keystoneclient.exceptions.ClientException: For connection
:raises keystonauth.exceptions.ClientException: For connection
failure, or to indicate an error response code.
:returns: The response to the request.
@ -523,7 +523,7 @@ class Session(object):
@classmethod
def construct(cls, kwargs):
"""Handles constructing a session from the older
:py:class:`~keystoneclient.httpclient.HTTPClient` args as well as the
:py:class:`~keystonauth.httpclient.HTTPClient` args as well as the
new request-style arguments.
.. warning::
@ -584,11 +584,11 @@ class Session(object):
:param auth: The auth plugin to use for token. Overrides the plugin
on the session. (optional)
:type auth: :py:class:`keystoneclient.auth.base.BaseAuthPlugin`
:type auth: :py:class:`keystonauth.auth.base.BaseAuthPlugin`
:raises keystoneclient.exceptions.AuthorizationFailure: if a new token
:raises keystonauth.exceptions.AuthorizationFailure: if a new token
fetch fails.
:raises keystoneclient.exceptions.MissingAuthPlugin: if a plugin is not
:raises keystonauth.exceptions.MissingAuthPlugin: if a plugin is not
available.
:returns: Authentication headers or None for failure.
@ -602,11 +602,11 @@ class Session(object):
:param auth: The auth plugin to use for token. Overrides the plugin
on the session. (optional)
:type auth: :py:class:`keystoneclient.auth.base.BaseAuthPlugin`
:type auth: :py:class:`keystonauth.auth.base.BaseAuthPlugin`
:raises keystoneclient.exceptions.AuthorizationFailure: if a new token
:raises keystonauth.exceptions.AuthorizationFailure: if a new token
fetch fails.
:raises keystoneclient.exceptions.MissingAuthPlugin: if a plugin is not
:raises keystonauth.exceptions.MissingAuthPlugin: if a plugin is not
available.
*DEPRECATED*: This assumes that the only header that is used to
@ -623,9 +623,9 @@ class Session(object):
:param auth: The auth plugin to use for token. Overrides the plugin on
the session. (optional)
:type auth: :py:class:`keystoneclient.auth.base.BaseAuthPlugin`
:type auth: :py:class:`keystonauth.auth.base.BaseAuthPlugin`
:raises keystoneclient.exceptions.MissingAuthPlugin: if a plugin is not
:raises keystonauth.exceptions.MissingAuthPlugin: if a plugin is not
available.
:returns: An endpoint if available or None.
@ -639,7 +639,7 @@ class Session(object):
:param auth: The auth plugin to invalidate. Overrides the plugin on the
session. (optional)
:type auth: :py:class:`keystoneclient.auth.base.BaseAuthPlugin`
:type auth: :py:class:`keystonauth.auth.base.BaseAuthPlugin`
"""
auth = self._auth_required(auth, 'validate')
@ -650,11 +650,11 @@ class Session(object):
:param auth: The auth plugin to use for token. Overrides the plugin
on the session. (optional)
:type auth: keystoneclient.auth.base.BaseAuthPlugin
:type auth: keystonauth.auth.base.BaseAuthPlugin
:raises keystoneclient.exceptions.AuthorizationFailure:
:raises keystonauth.exceptions.AuthorizationFailure:
if a new token fetch fails.
:raises keystoneclient.exceptions.MissingAuthPlugin:
:raises keystonauth.exceptions.MissingAuthPlugin:
if a plugin is not available.
:returns string: Current user_id or None if not supported by plugin.
@ -667,11 +667,11 @@ class Session(object):
:param auth: The auth plugin to use for token. Overrides the plugin
on the session. (optional)
:type auth: keystoneclient.auth.base.BaseAuthPlugin
:type auth: keystonauth.auth.base.BaseAuthPlugin
:raises keystoneclient.exceptions.AuthorizationFailure:
:raises keystonauth.exceptions.AuthorizationFailure:
if a new token fetch fails.
:raises keystoneclient.exceptions.MissingAuthPlugin:
:raises keystonauth.exceptions.MissingAuthPlugin:
if a plugin is not available.
:returns string: Current project_id or None if not supported by plugin.

@ -12,12 +12,12 @@
import uuid
from keystoneclient import access
from keystoneclient import auth
from keystoneclient.auth.identity import access as access_plugin
from keystoneclient import fixture
from keystoneclient import session
from keystoneclient.tests.unit import utils
from keystoneauth import access
from keystoneauth import auth
from keystoneauth.auth.identity import access as access_plugin
from keystoneauth import fixture
from keystoneauth import session
from keystoneauth.tests.unit import utils
class AccessInfoPluginTests(utils.TestCase):

@ -17,9 +17,9 @@ import fixtures
import mock
from oslo_config import cfg
from keystoneclient.auth import base
from keystoneclient.auth import cli
from keystoneclient.tests.unit.auth import utils
from keystoneauth.auth import base
from keystoneauth.auth import cli
from keystoneauth.tests.unit.auth import utils