Move to the keystoneauth1 namespace

Conver from the keystoneauth namespace to keystoneauth1. This is to
ensure that is is possible to install all versions of keystoneauth
side-by-side.

Change-Id: Ibbaf11525980c8edb5968d8b8ee19c55094e77d8
This commit is contained in:
Morgan Fainberg 2015-06-25 12:34:42 -07:00
parent fd74823cfb
commit a0000e4e9a
73 changed files with 258 additions and 258 deletions

View File

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

View File

@ -28,13 +28,13 @@ V2 Identity Plugins
-------------------
Standard V2 identity plugins are defined in the module:
:py:mod:`keystoneauth.auth.identity.v2`
:py:mod:`keystoneauth1.auth.identity.v2`
They include:
- :py:class:`~keystoneauth.auth.identity.v2.Password`: Authenticate against
- :py:class:`~keystoneauth1.auth.identity.v2.Password`: Authenticate against
a V2 identity service using a username and password.
- :py:class:`~keystoneauth.auth.identity.v2.Token`: Authenticate against a
- :py:class:`~keystoneauth1.auth.identity.v2.Token`: Authenticate against a
V2 identity service using an existing token.
V2 identity plugins must use an auth_url that points to the root of a V2
@ -44,23 +44,23 @@ V3 Identity Plugins
-------------------
Standard V3 identity plugins are defined in the module
:py:mod:`keystoneauth.auth.identity.v3`.
:py:mod:`keystoneauth1.auth.identity.v3`.
V3 Identity plugins are slightly different from their V2 counterparts as a V3
authentication request can contain multiple authentication methods. To handle
this V3 defines a number of different
:py:class:`~keystoneauth.auth.identity.v3.AuthMethod` classes:
:py:class:`~keystoneauth1.auth.identity.v3.AuthMethod` classes:
- :py:class:`~keystoneauth.auth.identity.v3.PasswordMethod`: Authenticate
- :py:class:`~keystoneauth1.auth.identity.v3.PasswordMethod`: Authenticate
against a V3 identity service using a username and password.
- :py:class:`~keystoneauth.auth.identity.v3.TokenMethod`: Authenticate against
- :py:class:`~keystoneauth1.auth.identity.v3.TokenMethod`: Authenticate against
a V2 identity service using an existing token.
The :py:class:`~keystoneauth.auth.identity.v3.AuthMethod` objects are then
passed to the :py:class:`~keystoneauth.auth.identity.v3.Auth` plugin::
The :py:class:`~keystoneauth1.auth.identity.v3.AuthMethod` objects are then
passed to the :py:class:`~keystoneauth1.auth.identity.v3.Auth` plugin::
>>> from keystoneauth import session
>>> from keystoneauth.auth.identity import v3
>>> from keystoneauth1 import session
>>> from keystoneauth1.auth.identity import v3
>>> password = v3.PasswordMethod(username='user',
... password='password')
>>> auth = v3.Auth(auth_url='http://my.keystone.com:5000/v3',
@ -69,15 +69,15 @@ passed to the :py:class:`~keystoneauth.auth.identity.v3.Auth` plugin::
>>> sess = session.Session(auth=auth)
As in the majority of cases you will only want to use one
:py:class:`~keystoneauth.auth.identity.v3.AuthMethod` there are also helper
:py:class:`~keystoneauth1.auth.identity.v3.AuthMethod` there are also helper
authentication plugins for the various
:py:class:`~keystoneauth.auth.identity.v3.AuthMethod` which can be used more
:py:class:`~keystoneauth1.auth.identity.v3.AuthMethod` which can be used more
like the V2 plugins:
- :py:class:`~keystoneauth.auth.identity.v3.Password`: Authenticate using
only a :py:class:`~keystoneauth.auth.identity.v3.PasswordMethod`.
- :py:class:`~keystoneauth.auth.identity.v3.Token`: Authenticate using only a
:py:class:`~keystoneauth.auth.identity.v3.TokenMethod`.
- :py:class:`~keystoneauth1.auth.identity.v3.Password`: Authenticate using
only a :py:class:`~keystoneauth1.auth.identity.v3.PasswordMethod`.
- :py:class:`~keystoneauth1.auth.identity.v3.Token`: Authenticate using only a
:py:class:`~keystoneauth1.auth.identity.v3.TokenMethod`.
::
@ -88,7 +88,7 @@ like the V2 plugins:
>>> sess = session.Session(auth=auth)
This will have exactly the same effect as using the single
:py:class:`~keystoneauth.auth.identity.v3.PasswordMethod` above.
:py:class:`~keystoneauth1.auth.identity.v3.PasswordMethod` above.
V3 identity plugins must use an auth_url that points to the root of a V3
identity server URL, i.e.: `http://hostname:5000/v3`.
@ -97,7 +97,7 @@ Version Independent Identity Plugins
------------------------------------
Standard version independent identity plugins are defined in the module
:py:mod:`keystoneauth.auth.identity.generic`.
:py:mod:`keystoneauth1.auth.identity.generic`.
For the cases of plugins that exist under both the identity V2 and V3 APIs
there is an abstraction to allow the plugin to determine which of the V2 and V3
@ -105,9 +105,9 @@ APIs are supported by the server and use the most appropriate API.
These plugins are:
- :py:class:`~keystoneauth.auth.identity.generic.Password`: Authenticate
- :py:class:`~keystoneauth1.auth.identity.generic.Password`: Authenticate
using a user/password against either v2 or v3 API.
- :py:class:`~keystoneauth.auth.identity.generic.Token`: Authenticate using
- :py:class:`~keystoneauth1.auth.identity.generic.Token`: Authenticate using
an existing token against either v2 or v3 API.
These plugins work by first querying the identity server to determine available
@ -124,7 +124,7 @@ same provided token and endpoint is available. This is useful in situations
where you have an ``ADMIN_TOKEN`` or in testing when you specifically know the
endpoint you want to communicate with.
It can be found at :py:class:`keystoneauth.auth.token_endpoint.Token`.
It can be found at :py:class:`keystoneauth1.auth.token_endpoint.Token`.
V3 OAuth 1.0a Plugins
@ -132,13 +132,13 @@ V3 OAuth 1.0a Plugins
There also exists a plugin for OAuth 1.0a authentication. We provide a helper
authentication plugin at:
:py:class:`~keystoneauth.v3.contrib.oauth1.auth.OAuth`.
:py:class:`~keystoneauth1.v3.contrib.oauth1.auth.OAuth`.
The plugin requires the OAuth consumer's key and secret, as well as the OAuth
access token's key and secret. For example::
>>> from keystoneauth.v3.contrib.oauth1 import auth
>>> from keystoneauth import session
>>> from keystoneauth.v3 import client
>>> from keystoneauth1.v3.contrib.oauth1 import auth
>>> from keystoneauth1 import session
>>> from keystoneauth1.v3 import client
>>> a = auth.OAuth('http://my.keystone.com:5000/v3',
... consumer_key=consumer_id,
... consumer_secret=consumer_secret,
@ -155,12 +155,12 @@ possible to specify a plugin to load via name. The authentication options that
are available are then specific to the plugin that you specified. Currently the
authentication plugins that are available in `keystoneauth` are:
- password: :py:class:`keystoneauth.auth.identity.generic.Password`
- token: :py:class:`keystoneauth.auth.identity.generic.Token`
- v2password: :py:class:`keystoneauth.auth.identity.v2.Password`
- v2token: :py:class:`keystoneauth.auth.identity.v2.Token`
- v3password: :py:class:`keystoneauth.auth.identity.v3.Password`
- v3token: :py:class:`keystoneauth.auth.identity.v3.Token`
- password: :py:class:`keystoneauth1.auth.identity.generic.Password`
- token: :py:class:`keystoneauth1.auth.identity.generic.Token`
- v2password: :py:class:`keystoneauth1.auth.identity.v2.Password`
- v2token: :py:class:`keystoneauth1.auth.identity.v2.Token`
- v3password: :py:class:`keystoneauth1.auth.identity.v3.Password`
- v3token: :py:class:`keystoneauth1.auth.identity.v3.Token`
Creating Authentication Plugins
@ -175,43 +175,43 @@ for the existing Identity mechanisms. As the V2 identity API is essentially
frozen, it is expected that new plugins are for the V3 API.
To implement a new V3 plugin that can be combined with others you should
implement the base :py:class:`keystoneauth.auth.identity.v3.AuthMethod` class
implement the base :py:class:`keystoneauth1.auth.identity.v3.AuthMethod` class
and implement the
:py:meth:`~keystoneauth.auth.identity.v3.AuthMethod.get_auth_data` function.
:py:meth:`~keystoneauth1.auth.identity.v3.AuthMethod.get_auth_data` function.
If your Plugin cannot be used in conjunction with existing
:py:class:`keystoneauth.auth.identity.v3.AuthMethod` then you should just
override :py:class:`keystoneauth.auth.identity.v3.Auth` directly.
:py:class:`keystoneauth1.auth.identity.v3.AuthMethod` then you should just
override :py:class:`keystoneauth1.auth.identity.v3.Auth` directly.
The new :py:class:`~keystoneauth.auth.identity.v3.AuthMethod` should take all
The new :py:class:`~keystoneauth1.auth.identity.v3.AuthMethod` should take all
the required parameters via
:py:meth:`~keystoneauth.auth.identity.v3.AuthMethod.__init__` and return from
:py:meth:`~keystoneauth.auth.identity.v3.AuthMethod.get_auth_data` a tuple
:py:meth:`~keystoneauth1.auth.identity.v3.AuthMethod.__init__` and return from
:py:meth:`~keystoneauth1.auth.identity.v3.AuthMethod.get_auth_data` a tuple
with the unique identifier of this plugin (e.g. *password*) and a dictionary
containing the payload of values to send to the authentication server. The
session, calling auth object and request headers are also passed to this
function so that the plugin may use or manipulate them.
You should also provide a class that inherits from
:py:class:`keystoneauth.auth.identity.v3.Auth` with an instance of your new
:py:class:`~keystoneauth.auth.identity.v3.AuthMethod` as the `auth_methods`
parameter to :py:class:`keystoneauth.auth.identity.v3.Auth`.
:py:class:`keystoneauth1.auth.identity.v3.Auth` with an instance of your new
:py:class:`~keystoneauth1.auth.identity.v3.AuthMethod` as the `auth_methods`
parameter to :py:class:`keystoneauth1.auth.identity.v3.Auth`.
By convention (and like above) these are named `PluginType` and
`PluginTypeMethod` (for example
:py:class:`~keystoneauth.auth.identity.v3.Password` and
:py:class:`~keystoneauth.auth.identity.v3.PasswordMethod`).
:py:class:`~keystoneauth1.auth.identity.v3.Password` and
:py:class:`~keystoneauth1.auth.identity.v3.PasswordMethod`).
Creating a Custom Plugin
------------------------
To implement an entirely new plugin you should implement the base class
:py:class:`keystoneauth.auth.base.BaseAuthPlugin` and provide the
:py:meth:`~keystoneauth.auth.base.BaseAuthPlugin.get_endpoint`,
:py:meth:`~keystoneauth.auth.base.BaseAuthPlugin.get_token` and
:py:meth:`~keystoneauth.auth.base.BaseAuthPlugin.invalidate` functions.
:py:class:`keystoneauth1.auth.base.BaseAuthPlugin` and provide the
:py:meth:`~keystoneauth1.auth.base.BaseAuthPlugin.get_endpoint`,
:py:meth:`~keystoneauth1.auth.base.BaseAuthPlugin.get_token` and
:py:meth:`~keystoneauth1.auth.base.BaseAuthPlugin.invalidate` functions.
:py:meth:`~keystoneauth.auth.base.BaseAuthPlugin.get_token` is called to
:py:meth:`~keystoneauth1.auth.base.BaseAuthPlugin.get_token` is called to
retrieve the string token from a plugin. It is intended that a plugin will
cache a received token and so if the token is still valid then it should be
re-used rather than fetching a new one. A session object is provided with which
@ -219,19 +219,19 @@ the plugin can contact it's server. (Note: use `authenticated=False` when
making those requests or it will end up being called recursively). The return
value should be the token as a string.
:py:meth:`~keystoneauth.auth.base.BaseAuthPlugin.get_endpoint` is called to
:py:meth:`~keystoneauth1.auth.base.BaseAuthPlugin.get_endpoint` is called to
determine a base URL for a particular service's requests. The keyword arguments
provided to the function are those that are given by the `endpoint_filter`
variable in :py:meth:`keystoneauth.session.Session.request`. A session object
variable in :py:meth:`keystoneauth1.session.Session.request`. A session object
is also provided so that the plugin may contact an external source to determine
the endpoint. Again this will be generally be called once per request and so
it is up to the plugin to cache these responses if appropriate. The return
value should be the base URL to communicate with.
:py:meth:`~keystoneauth.auth.base.BaseAuthPlugin.invalidate` should also be
:py:meth:`~keystoneauth1.auth.base.BaseAuthPlugin.invalidate` should also be
implemented to clear the current user credentials so that on the next
:py:meth:`~keystoneauth.auth.base.BaseAuthPlugin.get_token` call a new token
:py:meth:`~keystoneauth1.auth.base.BaseAuthPlugin.get_token` call a new token
can be retrieved.
The most simple example of a plugin is the
:py:class:`keystoneauth.auth.token_endpoint.Token` plugin.
:py:class:`keystoneauth1.auth.token_endpoint.Token` plugin.

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# keystoneauth documentation build configuration file, created by
# keystoneauth1 documentation build configuration file, created by
# sphinx-quickstart on Sun Dec 6 14:19:25 2009.
#
# This file is execfile()d with the current directory set to its containing
@ -55,13 +55,13 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
project = 'keystoneauth'
project = 'keystoneauth1'
copyright = 'OpenStack Contributors'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
version_info = pbr.version.VersionInfo('keystoneauth')
version_info = pbr.version.VersionInfo('keystoneauth1')
# The short X.Y version.
version = version_info.version_string()
# The full version, including alpha/beta/rc tags.
@ -201,8 +201,8 @@ htmlhelp_basename = 'keystoneauthdoc'
# (source start file, target name, title, author, documentclass [howto/manual])
# .
latex_documents = [
('index', 'keystoneauth.tex',
'keystoneauth Documentation',
('index', 'keystoneauth1.tex',
'keystoneauth1 Documentation',
'Nebula Inc, based on work by Rackspace and Jacob Kaplan-Moss',
'manual'),
]

View File

@ -5,8 +5,8 @@ Using Sessions
Introduction
============
The :py:class:`keystoneauth.session.Session` class was introduced into
keystoneauth as an attempt to bring a unified interface to the various
The :py:class:`keystoneauth1.session.Session` class was introduced into
keystoneauth1 as an attempt to bring a unified interface to the various
OpenStack clients that share common authentication and request parameters
between a variety of services.
@ -55,9 +55,9 @@ service and fetch a new one.
An example from keystoneauth::
>>> from keystoneauth.auth.identity import v3
>>> from keystoneauth import session
>>> from keystoneauth.v3 import client
>>> from keystoneauth1.auth.identity import v3
>>> from keystoneauth1 import session
>>> from keystoneauth1.v3 import client
>>> auth = v3.Password(auth_url='https://my.keystone.com:5000/v2.0',
... username='myuser',
@ -72,16 +72,16 @@ As clients adopt this means of operating they will be created in a similar
fashion by passing the Session object to the client's constructor.
Migrating keystoneauth to use a Session
Migrating keystoneauth1 to use a Session
-----------------------------------------
By using a session with a keystoneauth Client we presume that you have opted
By using a session with a keystoneauth1 Client we presume that you have opted
in to new behavior defined by the session. For example authentication is now
on-demand rather than on creation. To allow this change in behavior there are
a number of functions that have changed behavior or are no longer available.
For example the
:py:meth:`keystoneauth.httpclient.HTTPClient.authenticate` method used
:py:meth:`keystoneauth1.httpclient.HTTPClient.authenticate` method used
to be able to always re-authenticate the current client and fetch a new token.
As this is now controlled by the Session and not the client this has changed,
however the function will still exist to provide compatibility with older
@ -91,7 +91,7 @@ Likewise certain parameters such as ``user_id`` and ``auth_token`` that used to
be available on the client object post authentication will remain
uninitialized.
When converting an application to use a session object with keystoneauth you
When converting an application to use a session object with keystoneauth1 you
should be aware of the possibility of changes to authentication and
authentication parameters and make sure to test your code thoroughly. It should
have no impact on the typical CRUD interaction with the client.
@ -188,7 +188,7 @@ While authentication plugins will endeavour to maintain a consistent set of
arguments for an ``endpoint_filter`` the concept of an authentication plugin is
purposefully generic and a specific mechanism may not know how to interpret
certain arguments and ignore them. For example the
:py:class:`keystoneauth.auth.token_endpoint.Token` plugin (which is used when
:py:class:`keystoneauth1.auth.token_endpoint.Token` plugin (which is used when
you want to always use a specific endpoint and token combination) will always
return the same endpoint regardless of the parameters to ``endpoint_filter`` or
a custom OpenStack authentication mechanism may not have the concept of

View File

@ -16,9 +16,9 @@
import functools
from keystoneauth import _utils as utils
from keystoneauth import service_catalog
from keystoneauth import service_providers
from keystoneauth1 import _utils as utils
from keystoneauth1 import service_catalog
from keystoneauth1 import service_providers
# gap, in seconds, to determine whether the given token is about to expire
@ -358,7 +358,7 @@ class AccessInfo(object):
Used for Keystone2Keystone federating-out.
:returns: :py:class:`keystoneauth.service_providers.ServiceProviders`
:returns: :py:class:`keystoneauth1.service_providers.ServiceProviders`
or None
"""
raise NotImplementedError()

View File

@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from keystoneauth import _utils as utils
from keystoneauth1 import _utils as utils
class Adapter(object):

View File

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

View File

@ -15,7 +15,7 @@ import os
import six
import stevedore
from keystoneauth import exceptions
from keystoneauth1 import exceptions
# NOTE(jamielennox): The AUTH_INTERFACE is a special value that can be
@ -23,7 +23,7 @@ from keystoneauth import exceptions
# 'interface' it should return the initial URL that was passed to the plugin.
AUTH_INTERFACE = object()
PLUGIN_NAMESPACE = 'keystoneauth.auth.plugin'
PLUGIN_NAMESPACE = 'keystoneauth1.auth.plugin'
IDENTITY_AUTH_HEADER_NAME = 'X-Auth-Token'

View File

@ -13,8 +13,8 @@
import argparse
import os
from keystoneauth import _utils as utils
from keystoneauth.auth import base
from keystoneauth1 import _utils as utils
from keystoneauth1.auth import base
@utils.positional()

View File

@ -12,7 +12,7 @@
from oslo_config import cfg
from keystoneauth.auth import base
from keystoneauth1.auth import base
_AUTH_PLUGIN_OPT = cfg.StrOpt('auth_plugin', help='Name of the plugin to load')

View File

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

View File

@ -10,8 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from keystoneauth import _utils as utils
from keystoneauth.auth.identity import base
from keystoneauth1 import _utils as utils
from keystoneauth1.auth.identity import base
class AccessInfoPlugin(base.BaseIdentityPlugin):

View File

@ -16,10 +16,10 @@ import logging
from oslo_config import cfg
import six
from keystoneauth import _utils as utils
from keystoneauth.auth import base
from keystoneauth import discover
from keystoneauth import exceptions
from keystoneauth1 import _utils as utils
from keystoneauth1.auth import base
from keystoneauth1 import discover
from keystoneauth1 import exceptions
LOG = logging.getLogger(__name__)

View File

@ -10,9 +10,9 @@
# License for the specific language governing permissions and limitations
# under the License.
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
from keystoneauth1.auth.identity.generic.base import BaseGenericPlugin # noqa
from keystoneauth1.auth.identity.generic.password import Password # noqa
from keystoneauth1.auth.identity.generic.token import Token # noqa
__all__ = ['BaseGenericPlugin',

View File

@ -17,9 +17,9 @@ from oslo_config import cfg
import six
import six.moves.urllib.parse as urlparse
from keystoneauth.auth.identity import base
from keystoneauth import discover
from keystoneauth import exceptions
from keystoneauth1.auth.identity import base
from keystoneauth1 import discover
from keystoneauth1 import exceptions
LOG = logging.getLogger(__name__)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -15,8 +15,8 @@ import abc
from oslo_config import cfg
import six
from keystoneauth.auth.identity.v3 import base
from keystoneauth.auth.identity.v3 import token
from keystoneauth1.auth.identity.v3 import base
from keystoneauth1.auth.identity.v3 import token
__all__ = ['FederationBaseAuth']

View File

@ -12,11 +12,11 @@
from oslo_config import cfg
from keystoneauth import access
from keystoneauth.auth import base as auth_base
from keystoneauth.auth.identity.v3 import base
from keystoneauth.auth.identity.v3 import token
from keystoneauth import exceptions
from keystoneauth1 import access
from keystoneauth1.auth import base as auth_base
from keystoneauth1.auth.identity.v3 import base
from keystoneauth1.auth.identity.v3 import token
from keystoneauth1 import exceptions
__all__ = ['Keystone2Keystone']
@ -30,7 +30,7 @@ class Keystone2Keystone(base.BaseAuth):
:param base_plugin: Auth plugin already authenticated against the keystone
IdP.
:type base_plugin: ``keystoneauth.auth.v3.base.BaseAuth``
:type base_plugin: ``keystoneauth1.auth.v3.base.BaseAuth``
:param service_provider: The Service Provider ID.
:type service_provider: string

View File

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

View File

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

View File

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

View File

@ -13,7 +13,7 @@
"""The passive components to version discovery.
The Discover object in discover.py contains functions that can create objects
on your behalf. These functions are not usable from within the keystoneauth
on your behalf. These functions are not usable from within the keystoneauth1
library because you will get dependency resolution issues.
The Discover object in this file provides the querying components of Discovery.
@ -24,8 +24,8 @@ raw data specified in version discovery responses.
import logging
import re
from keystoneauth import _utils as utils
from keystoneauth import exceptions
from keystoneauth1 import _utils as utils
from keystoneauth1 import exceptions
_LOGGER = logging.getLogger(__name__)
@ -314,7 +314,7 @@ _VERSION_HACKS.add_discover_hack('identity', re.compile('/v2.0/?$'), '/')
def _get_catalog_discover_hack(service_type, url):
"""Apply the catalog hacks and figure out an unversioned endpoint.
This function is internal to keystoneauth.
This function is internal to keystoneauth1.
:param str service_type: the service_type to look up.
:param str url: The original url that came from a service_catalog.

View File

@ -11,12 +11,12 @@
# under the License.
from keystoneauth.exceptions.auth import * # noqa
from keystoneauth.exceptions.auth_plugins import * # noqa
from keystoneauth.exceptions.base import * # noqa
from keystoneauth.exceptions.catalog import * # noqa
from keystoneauth.exceptions.connection import * # noqa
from keystoneauth.exceptions.discovery import * # noqa
from keystoneauth.exceptions.http import * # noqa
from keystoneauth.exceptions.response import * # noqa
from keystoneauth.exceptions.service_providers import * # noqa
from keystoneauth1.exceptions.auth import * # noqa
from keystoneauth1.exceptions.auth_plugins import * # noqa
from keystoneauth1.exceptions.base import * # noqa
from keystoneauth1.exceptions.catalog import * # noqa
from keystoneauth1.exceptions.connection import * # noqa
from keystoneauth1.exceptions.discovery import * # noqa
from keystoneauth1.exceptions.http import * # noqa
from keystoneauth1.exceptions.response import * # noqa
from keystoneauth1.exceptions.service_providers import * # noqa

View File

@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from keystoneauth.exceptions import base
from keystoneauth1.exceptions import base
class AuthorizationFailure(base.ClientException):

View File

@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from keystoneauth.exceptions import base
from keystoneauth1.exceptions import base
class AuthPluginException(base.ClientException):

View File

@ -11,7 +11,7 @@
# under the License.
from keystoneauth.exceptions import base
from keystoneauth1.exceptions import base
__all__ = ['CatalogException',
'EmptyCatalog',

View File

@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from keystoneauth.exceptions import base
from keystoneauth1.exceptions import base
__all__ = ['ConnectionError',

View File

@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from keystoneauth.exceptions import base
from keystoneauth1.exceptions import base
__all__ = ['DiscoveryFailure',

View File

@ -17,7 +17,7 @@
# under the License.
"""
HTTP Exceptions used by keystoneauth
HTTP Exceptions used by keystoneauth1
"""
import inspect
@ -25,7 +25,7 @@ import sys
import six
from keystoneauth.exceptions import base
from keystoneauth1.exceptions import base
__all__ = ['HttpError',

View File

@ -11,7 +11,7 @@
# under the License.
from keystoneauth.exceptions import base
from keystoneauth1.exceptions import base
__all__ = ['InvalidResponse']

View File

@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from keystoneauth.exceptions import base
from keystoneauth1.exceptions import base
__all__ = ['ServiceProviderNotFound']

View File

@ -21,10 +21,10 @@ may be dependencies from this module on libraries that are only available in
testing.
"""
from keystoneauth.fixture.discovery import * # noqa
from keystoneauth.fixture import exception
from keystoneauth.fixture import v2
from keystoneauth.fixture import v3
from keystoneauth1.fixture.discovery import * # noqa
from keystoneauth1.fixture import exception
from keystoneauth1.fixture import v2
from keystoneauth1.fixture import v3
FixtureValidationError = exception.FixtureValidationError

View File

@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from keystoneauth import _utils as utils
from keystoneauth1 import _utils as utils
__all__ = ['DiscoveryList',
'V2Discovery',

View File

@ -13,8 +13,8 @@
import datetime
import uuid
from keystoneauth import _utils
from keystoneauth.fixture import exception
from keystoneauth1 import _utils
from keystoneauth1.fixture import exception
class _Service(dict):

View File

@ -13,8 +13,8 @@
import datetime
import uuid
from keystoneauth import _utils
from keystoneauth.fixture import exception
from keystoneauth1 import _utils
from keystoneauth1.fixture import exception
class _Service(dict):

View File

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

View File

@ -20,8 +20,8 @@ import abc
import six
from keystoneauth import _utils as utils
from keystoneauth import exceptions
from keystoneauth1 import _utils as utils
from keystoneauth1 import exceptions
@six.add_metaclass(abc.ABCMeta)

View File

@ -10,7 +10,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from keystoneauth import exceptions
from keystoneauth1 import exceptions
class ServiceProviders(object):

View File

@ -26,8 +26,8 @@ import requests
import six
from six.moves import urllib
from keystoneauth import _utils as utils
from keystoneauth import exceptions
from keystoneauth1 import _utils as utils
from keystoneauth1 import exceptions
try:
import netaddr
@ -39,7 +39,7 @@ try:
except ImportError:
osprofiler_web = None
USER_AGENT = 'keystoneauth'
USER_AGENT = 'keystoneauth1'
_logger = logging.getLogger(__name__)
@ -101,7 +101,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 'keystoneauth')
(optional, defaults to 'keystoneauth1')
: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

View File

@ -12,12 +12,12 @@
import uuid
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
from keystoneauth1 import access
from keystoneauth1 import auth
from keystoneauth1.auth.identity import access as access_plugin
from keystoneauth1 import fixture
from keystoneauth1 import session
from keystoneauth1.tests.unit import utils
class AccessInfoPluginTests(utils.TestCase):

View File

@ -17,9 +17,9 @@ import fixtures
import mock
from oslo_config import cfg
from keystoneauth.auth import base
from keystoneauth.auth import cli
from keystoneauth.tests.unit.auth import utils
from keystoneauth1.auth import base
from keystoneauth1.auth import cli
from keystoneauth1.tests.unit.auth import utils
class TesterPlugin(base.BaseAuthPlugin):

View File

@ -17,12 +17,12 @@ from oslo_config import cfg
from oslo_config import fixture as config
import stevedore
from keystoneauth.auth import base
from keystoneauth.auth import conf
from keystoneauth.auth.identity import v2 as v2_auth
from keystoneauth.auth.identity import v3 as v3_auth
from keystoneauth import exceptions
from keystoneauth.tests.unit.auth import utils
from keystoneauth1.auth import base
from keystoneauth1.auth import conf
from keystoneauth1.auth.identity import v2 as v2_auth
from keystoneauth1.auth.identity import v3 as v3_auth
from keystoneauth1 import exceptions
from keystoneauth1.tests.unit.auth import utils
class ConfTests(utils.TestCase):

View File

@ -16,14 +16,14 @@ import uuid
import mock
import six
from keystoneauth import _utils
from keystoneauth import access
from keystoneauth.auth import base
from keystoneauth.auth import identity
from keystoneauth import exceptions
from keystoneauth import fixture
from keystoneauth import session
from keystoneauth.tests.unit import utils
from keystoneauth1 import _utils
from keystoneauth1 import access
from keystoneauth1.auth import base
from keystoneauth1.auth import identity
from keystoneauth1 import exceptions
from keystoneauth1 import fixture
from keystoneauth1 import session
from keystoneauth1.tests.unit import utils
@six.add_metaclass(abc.ABCMeta)

View File

@ -13,10 +13,10 @@
import copy
import uuid
from keystoneauth.auth.identity import v2
from keystoneauth import exceptions
from keystoneauth import session
from keystoneauth.tests.unit import utils
from keystoneauth1.auth.identity import v2
from keystoneauth1 import exceptions
from keystoneauth1 import session
from keystoneauth1.tests.unit import utils
class V2IdentityPlugin(utils.TestCase):

View File

@ -13,13 +13,13 @@
import copy
import uuid
from keystoneauth import access
from keystoneauth.auth.identity import v3
from keystoneauth.auth.identity.v3 import base as v3_base
from keystoneauth import exceptions
from keystoneauth import fixture
from keystoneauth import session
from keystoneauth.tests.unit import utils
from keystoneauth1 import access
from keystoneauth1.auth.identity import v3
from keystoneauth1.auth.identity.v3 import base as v3_base
from keystoneauth1 import exceptions
from keystoneauth1 import fixture
from keystoneauth1 import session
from keystoneauth1.tests.unit import utils
class V3IdentityPlugin(utils.TestCase):

View File

@ -15,13 +15,13 @@ import uuid
import six
from keystoneauth import access
from keystoneauth.auth.identity import v3
from keystoneauth import exceptions
from keystoneauth import fixture
from keystoneauth import session
from keystoneauth.tests.unit import k2k_fixtures
from keystoneauth.tests.unit import utils
from keystoneauth1 import access
from keystoneauth1.auth.identity import v3
from keystoneauth1 import exceptions
from keystoneauth1 import fixture
from keystoneauth1 import session
from keystoneauth1.tests.unit import k2k_fixtures
from keystoneauth1.tests.unit import utils
class TesterFederationPlugin(v3.FederationBaseAuth):

View File

@ -14,7 +14,7 @@ import uuid
import six
from keystoneauth.tests.unit.auth import utils
from keystoneauth1.tests.unit.auth import utils
class TestOtherLoading(utils.TestCase):

View File

@ -12,11 +12,11 @@
import uuid
from keystoneauth.auth.identity.generic import password
from keystoneauth.auth.identity import v2
from keystoneauth.auth.identity import v3
from keystoneauth.auth.identity.v3 import password as v3_password
from keystoneauth.tests.unit.auth import utils
from keystoneauth1.auth.identity.generic import password
from keystoneauth1.auth.identity import v2
from keystoneauth1.auth.identity import v3
from keystoneauth1.auth.identity.v3 import password as v3_password
from keystoneauth1.tests.unit.auth import utils
class PasswordTests(utils.GenericPluginTestCase):

View File

@ -12,11 +12,11 @@
import uuid
from keystoneauth.auth.identity.generic import token
from keystoneauth.auth.identity import v2
from keystoneauth.auth.identity import v3
from keystoneauth.auth.identity.v3 import token as v3_token
from keystoneauth.tests.unit.auth import utils
from keystoneauth1.auth.identity.generic import token
from keystoneauth1.auth.identity import v2
from keystoneauth1.auth.identity import v3
from keystoneauth1.auth.identity.v3 import token as v3_token
from keystoneauth1.tests.unit.auth import utils
class TokenTests(utils.GenericPluginTestCase):

View File

@ -12,9 +12,9 @@
from testtools import matchers
from keystoneauth.auth import token_endpoint
from keystoneauth import session
from keystoneauth.tests.unit import utils
from keystoneauth1.auth import token_endpoint
from keystoneauth1 import session
from keystoneauth1.tests.unit import utils
class TokenEndpointTest(utils.TestCase):

View File

@ -17,12 +17,12 @@ import mock
from oslo_config import cfg
import six
from keystoneauth import access
from keystoneauth.auth import base
from keystoneauth import exceptions
from keystoneauth import fixture
from keystoneauth import session
from keystoneauth.tests.unit import utils
from keystoneauth1 import access
from keystoneauth1.auth import base
from keystoneauth1 import exceptions
from keystoneauth1 import fixture
from keystoneauth1 import session
from keystoneauth1.tests.unit import utils
class MockPlugin(base.BaseAuthPlugin):

View File

@ -15,9 +15,9 @@ import re
import six
from keystoneauth import discover
from keystoneauth import fixture
from keystoneauth.tests.unit import utils
from keystoneauth1 import discover
from keystoneauth1 import fixture
from keystoneauth1.tests.unit import utils
BASE_HOST = 'http://keystone.example.com'

View File

@ -14,8 +14,8 @@ import uuid
import six
from keystoneauth import fixture
from keystoneauth.tests.unit import utils
from keystoneauth1 import fixture
from keystoneauth1.tests.unit import utils
class V2TokenTests(utils.TestCase):

View File

@ -16,8 +16,8 @@ import mock
import pep8
import testtools
from keystoneauth.hacking import checks
from keystoneauth.tests.unit import keystoneauth_fixtures
from keystoneauth1.hacking import checks
from keystoneauth1.tests.unit import keystoneauth_fixtures
class TestCheckOsloNamespaceImports(testtools.TestCase):

View File

@ -23,11 +23,11 @@ import requests
import six
from testtools import matchers
from keystoneauth import adapter
from keystoneauth.auth import base
from keystoneauth import exceptions
from keystoneauth import session as client_session
from keystoneauth.tests.unit import utils
from keystoneauth1 import adapter
from keystoneauth1.auth import base
from keystoneauth1 import exceptions
from keystoneauth1 import session as client_session
from keystoneauth1.tests.unit import utils
class SessionTests(utils.TestCase):

View File

@ -4,4 +4,4 @@
module=install_venv_common
# The base module to hold the copy of openstack.common
base=keystoneauth
base=keystoneauth1

View File

@ -1,5 +1,5 @@
[metadata]
name = keystoneauth
name = keystoneauth1
summary = Authentication Libarary for OpenStack Identity
description-file =
README.rst
@ -21,18 +21,18 @@ classifier =
[files]
packages =
keystoneauth
keystoneauth1
[entry_points]
keystoneauth.auth.plugin =
password = keystoneauth.auth.identity.generic:Password
token = keystoneauth.auth.identity.generic:Token
v2password = keystoneauth.auth.identity.v2:Password
v2token = keystoneauth.auth.identity.v2:Token
v3password = keystoneauth.auth.identity.v3:Password
v3token = keystoneauth.auth.identity.v3:Token
k2k = keystoneauth.auth.identity.v3:Keystone2Keystone
keystoneauth1.auth.plugin =
password = keystoneauth1.auth.identity.generic:Password
token = keystoneauth1.auth.identity.generic:Token
v2password = keystoneauth1.auth.identity.v2:Password
v2token = keystoneauth1.auth.identity.v2:Token
v3password = keystoneauth1.auth.identity.v3:Password
v3token = keystoneauth1.auth.identity.v3:Token
k2k = keystoneauth1.auth.identity.v3:Keystone2Keystone
[build_sphinx]
source-dir = doc/source

View File

@ -28,7 +28,7 @@ commands = python setup.py testr --coverage --testr-args='{posargs}'
downloadcache = ~/cache/pip
[testenv:debug]
commands = oslo_debug_helper -t keystoneauth/tests {posargs}
commands = oslo_debug_helper -t keystoneauth1/tests {posargs}
[flake8]
# H405: multi line docstring summary not separated with an empty line
@ -41,4 +41,4 @@ commands=
python setup.py build_sphinx
[hacking]
local-check-factory = keystoneauth.hacking.checks.factory
local-check-factory = keystoneauth1.hacking.checks.factory