summaryrefslogtreecommitdiff
path: root/keystoneclient/auth
diff options
context:
space:
mode:
authorJamie Lennox <jamielennox@gmail.com>2015-12-16 18:14:33 +1100
committerJamie Lennox <jamielennox@gmail.com>2016-02-03 12:08:07 +1100
commit03e209fd6fd8519aedfdd1bf3d36e5adaf14c7ce (patch)
tree9dbd3bebecea2cb90bb0f1aaefbe3e9516908144 /keystoneclient/auth
parentc1c2043da966ad8fb61f93739b11da609ee52d43 (diff)
downloadpython-keystoneclient-03e209fd6fd8519aedfdd1bf3d36e5adaf14c7ce.tar.gz
Deprecate auth plugins from keystoneclient
Deprecate auth plugins in favour of those from keystoneauth. Change-Id: I8963ded9b68569717d7a6e30623ee78301b59a4a Implements: bp deprecate-to-ksa
Diffstat (limited to 'keystoneclient/auth')
-rw-r--r--keystoneclient/auth/base.py16
-rw-r--r--keystoneclient/auth/cli.py11
-rw-r--r--keystoneclient/auth/conf.py21
-rw-r--r--keystoneclient/auth/identity/base.py5
-rw-r--r--keystoneclient/auth/token_endpoint.py8
5 files changed, 61 insertions, 0 deletions
diff --git a/keystoneclient/auth/base.py b/keystoneclient/auth/base.py
index c1cf69e..1387222 100644
--- a/keystoneclient/auth/base.py
+++ b/keystoneclient/auth/base.py
@@ -12,6 +12,7 @@
import os
+from debtcollector import removals
from keystoneauth1 import plugin
import six
import stevedore
@@ -28,6 +29,11 @@ PLUGIN_NAMESPACE = 'keystoneclient.auth.plugin'
IDENTITY_AUTH_HEADER_NAME = 'X-Auth-Token'
+@removals.remove(
+ message='keystoneclient auth plugins are deprecated. Use keystoneauth.',
+ version='2.1.0',
+ removal_version='3.0.0'
+)
def get_available_plugin_names():
"""Get the names of all the plugins that are available on the system.
@@ -42,6 +48,11 @@ def get_available_plugin_names():
return frozenset(mgr.names())
+@removals.remove(
+ message='keystoneclient auth plugins are deprecated. Use keystoneauth.',
+ version='2.1.0',
+ removal_version='3.0.0'
+)
def get_available_plugin_classes():
"""Retrieve all the plugin classes available on the system.
@@ -56,6 +67,11 @@ def get_available_plugin_classes():
return dict(mgr.map(lambda ext: (ext.entry_point.name, ext.plugin)))
+@removals.remove(
+ message='keystoneclient auth plugins are deprecated. Use keystoneauth.',
+ version='2.1.0',
+ removal_version='3.0.0'
+)
def get_plugin_class(name):
"""Retrieve a plugin class by its entrypoint name.
diff --git a/keystoneclient/auth/cli.py b/keystoneclient/auth/cli.py
index 172049e..e8f69f2 100644
--- a/keystoneclient/auth/cli.py
+++ b/keystoneclient/auth/cli.py
@@ -13,11 +13,17 @@
import argparse
import os
+from debtcollector import removals
from positional import positional
from keystoneclient.auth import base
+@removals.remove(
+ message='keystoneclient auth plugins are deprecated. Use keystoneauth.',
+ version='2.1.0',
+ removal_version='3.0.0'
+)
@positional()
def register_argparse_arguments(parser, argv, default=None):
"""Register CLI options needed to create a plugin.
@@ -61,6 +67,11 @@ def register_argparse_arguments(parser, argv, default=None):
return plugin
+@removals.remove(
+ message='keystoneclient auth plugins are deprecated. Use keystoneauth.',
+ version='2.1.0',
+ removal_version='3.0.0'
+)
def load_from_argparse_arguments(namespace, **kwargs):
"""Retrieve the created plugin from the completed argparse results.
diff --git a/keystoneclient/auth/conf.py b/keystoneclient/auth/conf.py
index b61c123..6390521 100644
--- a/keystoneclient/auth/conf.py
+++ b/keystoneclient/auth/conf.py
@@ -10,6 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
+from debtcollector import removals
from oslo_config import cfg
from keystoneclient.auth import base
@@ -20,6 +21,11 @@ _section_help = 'Config Section from which to load plugin specific options'
_AUTH_SECTION_OPT = cfg.StrOpt('auth_section', help=_section_help)
+@removals.remove(
+ message='keystoneclient auth plugins are deprecated. Use keystoneauth.',
+ version='2.1.0',
+ removal_version='3.0.0'
+)
def get_common_conf_options():
"""Get the oslo_config options common for all auth plugins.
@@ -35,6 +41,11 @@ def get_common_conf_options():
return [_AUTH_PLUGIN_OPT, _AUTH_SECTION_OPT]
+@removals.remove(
+ message='keystoneclient auth plugins are deprecated. Use keystoneauth.',
+ version='2.1.0',
+ removal_version='3.0.0'
+)
def get_plugin_options(name):
"""Get the oslo_config options for a specific plugin.
@@ -46,6 +57,11 @@ def get_plugin_options(name):
return base.get_plugin_class(name).get_options()
+@removals.remove(
+ message='keystoneclient auth plugins are deprecated. Use keystoneauth.',
+ version='2.1.0',
+ removal_version='3.0.0'
+)
def register_conf_options(conf, group):
"""Register the oslo_config options that are needed for a plugin.
@@ -77,6 +93,11 @@ def register_conf_options(conf, group):
conf.register_opt(_AUTH_PLUGIN_OPT, group=group)
+@removals.remove(
+ message='keystoneclient auth plugins are deprecated. Use keystoneauth.',
+ version='2.1.0',
+ removal_version='3.0.0'
+)
def load_from_conf_options(conf, group, **kwargs):
"""Load a plugin from an oslo_config CONF object.
diff --git a/keystoneclient/auth/identity/base.py b/keystoneclient/auth/identity/base.py
index 854c106..799f30c 100644
--- a/keystoneclient/auth/identity/base.py
+++ b/keystoneclient/auth/identity/base.py
@@ -50,6 +50,11 @@ class BaseIdentityPlugin(base.BaseAuthPlugin):
super(BaseIdentityPlugin, self).__init__()
+ warnings.warn(
+ 'keystoneclient auth plugins are deprecated as of the 2.1.0 '
+ 'release in favor of keystoneauth1 plugins. They will be removed '
+ 'in future releases.', DeprecationWarning)
+
self.auth_url = auth_url
self.auth_ref = None
self.reauthenticate = reauthenticate
diff --git a/keystoneclient/auth/token_endpoint.py b/keystoneclient/auth/token_endpoint.py
index 4055062..6b60f9c 100644
--- a/keystoneclient/auth/token_endpoint.py
+++ b/keystoneclient/auth/token_endpoint.py
@@ -10,6 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
+import warnings
+
from oslo_config import cfg
from keystoneclient.auth import base
@@ -25,6 +27,12 @@ class Token(base.BaseAuthPlugin):
def __init__(self, endpoint, token):
# NOTE(jamielennox): endpoint is reserved for when plugins
# can be used to provide that information
+ warnings.warn(
+ 'TokenEndpoint plugin is deprecated as of the 2.1.0 release in '
+ 'favor of keystoneauth1.token_endpoint.Token. It will be removed '
+ 'in future releases.',
+ DeprecationWarning)
+
self.endpoint = endpoint
self.token = token