Deprecate keystone.common.kvs

Since only the memcache backends (that are being removed) use the
kvs system in keystone now, this can be safely deprecated.

Change-Id: I395e66bc957465df0f38ccfc3c48900e1b3a3320
bp: deprecated-as-of-newton
This commit is contained in:
Morgan Fainberg 2016-01-25 00:49:14 -08:00 committed by Steve Martinelli
parent 973b9d7aa3
commit 108310bf54
5 changed files with 20 additions and 1 deletions

View File

@ -24,6 +24,7 @@ from dogpile.cache import util as dogpile_util
from dogpile.core import nameregistry
from oslo_config import cfg
from oslo_log import log
from oslo_log import versionutils
from oslo_utils import importutils
from oslo_utils import reflection
@ -93,8 +94,14 @@ class KeyValueStore(object):
This manager also supports the concept of locking a given key resource to
allow for a guaranteed atomic transaction to the backend.
Deprecated as of Newton.
"""
@versionutils.deprecated(
versionutils.deprecated.NEWTON,
what='keystone key-value-store common code',
remove_in=+2)
def __init__(self, kvs_region):
self.locking = True
self._lock_timeout = 0

View File

@ -602,7 +602,6 @@ class TestCase(BaseTestCase):
group='signing', certfile=signing_certfile,
keyfile=signing_keyfile,
ca_certs='examples/pki/certs/cacert.pem')
self.config_fixture.config(group='token', driver='kvs')
self.config_fixture.config(
group='saml', certfile=signing_certfile, keyfile=signing_keyfile)
self.config_fixture.config(

View File

@ -29,6 +29,10 @@ class KvsToken(unit.TestCase, token_tests.TokenTests):
super(KvsToken, self).setUp()
self.load_backends()
def config_overrides(self):
super(KvsToken, self).config_overrides()
self.config_fixture.config(group='token', driver='kvs')
def test_flush_expired_token(self):
self.assertRaises(
exception.NotImplemented,

View File

@ -18,11 +18,13 @@ from six.moves import http_client
import webtest
from keystone.tests import unit
from keystone.tests.unit.ksfixtures import database
class TestNoAdminTokenAuth(unit.TestCase):
def setUp(self):
super(TestNoAdminTokenAuth, self).setUp()
self.useFixture(database.Database())
self.load_backends()
self._generate_paste_config()

View File

@ -0,0 +1,7 @@
---
deprecations:
- >
[`blueprint deprecated-as-of-newton <https://blueprints.launchpad.net/keystone/+spec/deprecated-as-of-newton>`_]
As of the Newton release, the class plugin `keystone.common.kvs.core.KeyValueStore`
has been deprecated. It is recommended to use alternative backends instead.
The ``KeyValueStore`` class will be removed in the 'P' release.