revert deprecation of v2 API
For more info, see the openstack-dev mailing list: http://lists.openstack.org/pipermail/openstack-dev/2014-March/031016.html Related Blueprint: https://blueprints.launchpad.net/keystone/+spec/deprecate-v2-api Change-Id: Ic160da00f1c2fbcf0589b3e1c6c93f53a4e67b72
This commit is contained in:
parent
e45ff9e0da
commit
17e77f9e32
|
@ -24,15 +24,28 @@ from keystone import config
|
||||||
from keystone import exception
|
from keystone import exception
|
||||||
from keystone.openstack.common.gettextutils import _
|
from keystone.openstack.common.gettextutils import _
|
||||||
from keystone.openstack.common import log
|
from keystone.openstack.common import log
|
||||||
from keystone.openstack.common import versionutils
|
|
||||||
|
|
||||||
|
|
||||||
LOG = log.getLogger(__name__)
|
LOG = log.getLogger(__name__)
|
||||||
CONF = config.CONF
|
CONF = config.CONF
|
||||||
|
|
||||||
v2_deprecated = versionutils.deprecated(what='v2 API',
|
|
||||||
as_of=versionutils.deprecated.ICEHOUSE,
|
def v2_deprecated(f):
|
||||||
in_favor_of='v3 API')
|
"""No-op decorator in preparation for deprecating Identity API v2.
|
||||||
|
|
||||||
|
This is a placeholder for the pending deprecation of v2. The implementation
|
||||||
|
of this decorator can be replaced with::
|
||||||
|
|
||||||
|
from keystone.openstack.common import versionutils
|
||||||
|
|
||||||
|
|
||||||
|
v2_deprecated = versionutils.deprecated(
|
||||||
|
what='v2 API',
|
||||||
|
as_of=versionutils.deprecated.JUNO,
|
||||||
|
in_favor_of='v3 API')
|
||||||
|
|
||||||
|
"""
|
||||||
|
return f
|
||||||
|
|
||||||
|
|
||||||
def _build_policy_check_credentials(self, action, context, kwargs):
|
def _build_policy_check_credentials(self, action, context, kwargs):
|
||||||
|
|
|
@ -326,10 +326,7 @@ class XmlSerializer(object):
|
||||||
|
|
||||||
# NOTE(blk-u): For compatibility with Folsom, when serializing the
|
# NOTE(blk-u): For compatibility with Folsom, when serializing the
|
||||||
# v2.0 version element also add the links to the base element.
|
# v2.0 version element also add the links to the base element.
|
||||||
if (value.get('id') == 'v2.0' and
|
if value.get('id') == 'v2.0':
|
||||||
value.get('status') == 'deprecated' and
|
|
||||||
value.get('updated') == '2014-04-17T00:00:00Z'):
|
|
||||||
|
|
||||||
for item in value['links']:
|
for item in value['links']:
|
||||||
child = etree.Element('link')
|
child = etree.Element('link')
|
||||||
self.populate_element(child, item)
|
self.populate_element(child, item)
|
||||||
|
|
|
@ -80,7 +80,7 @@ class Version(wsgi.Application):
|
||||||
if 'v2.0' in _VERSIONS:
|
if 'v2.0' in _VERSIONS:
|
||||||
versions['v2.0'] = {
|
versions['v2.0'] = {
|
||||||
'id': 'v2.0',
|
'id': 'v2.0',
|
||||||
'status': 'deprecated',
|
'status': 'stable',
|
||||||
'updated': '2014-04-17T00:00:00Z',
|
'updated': '2014-04-17T00:00:00Z',
|
||||||
'links': [
|
'links': [
|
||||||
{
|
{
|
||||||
|
|
|
@ -55,7 +55,7 @@ v2_PDF_DESCRIPTION = {
|
||||||
|
|
||||||
v2_EXPECTED_RESPONSE = {
|
v2_EXPECTED_RESPONSE = {
|
||||||
"id": "v2.0",
|
"id": "v2.0",
|
||||||
"status": "deprecated",
|
"status": "stable",
|
||||||
"updated": "2014-04-17T00:00:00Z",
|
"updated": "2014-04-17T00:00:00Z",
|
||||||
"links": [
|
"links": [
|
||||||
{
|
{
|
||||||
|
@ -318,7 +318,7 @@ class XmlVersionTestCase(tests.TestCase):
|
||||||
XML_NAMESPACE_V3 = 'xmlns="http://docs.openstack.org/identity/api/v3"'
|
XML_NAMESPACE_V3 = 'xmlns="http://docs.openstack.org/identity/api/v3"'
|
||||||
|
|
||||||
v2_VERSION_DATA = """
|
v2_VERSION_DATA = """
|
||||||
<version %(v2_namespace)s status="deprecated" updated="2014-04-17T00:00:00Z"
|
<version %(v2_namespace)s status="stable" updated="2014-04-17T00:00:00Z"
|
||||||
id="v2.0">
|
id="v2.0">
|
||||||
<media-types>
|
<media-types>
|
||||||
<media-type base="application/json" type="application/\
|
<media-type base="application/json" type="application/\
|
||||||
|
|
Loading…
Reference in New Issue