Emit deprecation warning for federated domain/project APIs
Before the identity API documentation lived in-tree, it lived in the openstack/keystone-specs project. Before that it lived in it's own identity-api repository. A long time ago we merged a patch [0] to that project to deprecate the project and domain APIs in the federation path. That documentation has since been copied and migrated to the keystone-specs repository and now keystone itself. Even though we've deprecated those API in the documentation, we never formally deprecated them in code using ``versionutils``. This commit does that. Now a message will be logged anytime that API is used instead of GET /auth/domains or GET /auth/projects. This makes the implementation of keystone consistent with documentation we merged ages ago. [0] If0c010119512d6a159ce82147a87c4698205a648 Change-Id: I88cb587c7cd69fef400b2eaf7dffda655355b710
This commit is contained in:
parent
c44a9eaaeb
commit
67967c84fd
@ -15,6 +15,7 @@
|
||||
import string
|
||||
|
||||
from oslo_log import log
|
||||
from oslo_log import versionutils
|
||||
from six.moves import http_client
|
||||
from six.moves import urllib
|
||||
import webob
|
||||
@ -439,6 +440,10 @@ class DomainV3(controller.V3Controller):
|
||||
super(DomainV3, self).__init__()
|
||||
self.get_member_from_driver = self.resource_api.get_domain
|
||||
|
||||
@versionutils.deprecated(
|
||||
as_of=versionutils.deprecated.JUNO,
|
||||
in_favor_of='GET /v3/auth/domains/',
|
||||
)
|
||||
@controller.protected()
|
||||
def list_domains_for_user(self, request):
|
||||
"""List all domains available to an authenticated user.
|
||||
@ -465,6 +470,10 @@ class ProjectAssignmentV3(controller.V3Controller):
|
||||
super(ProjectAssignmentV3, self).__init__()
|
||||
self.get_member_from_driver = self.resource_api.get_project
|
||||
|
||||
@versionutils.deprecated(
|
||||
as_of=versionutils.deprecated.JUNO,
|
||||
in_favor_of='GET /v3/auth/projects/',
|
||||
)
|
||||
@controller.protected()
|
||||
def list_projects_for_user(self, request):
|
||||
"""List all projects available to an authenticated user.
|
||||
|
@ -0,0 +1,9 @@
|
||||
---
|
||||
deprecations:
|
||||
- |
|
||||
The ``/OS-FEDERATION/projects`` and ``/OS-FEDERATION/domains`` APIs are
|
||||
deprecated in favor of the ``/v3/auth/projects`` and ``/v3/auth/domains``
|
||||
APIs. These APIs were originally marked as deprecated during the Juno
|
||||
release cycle, but we never deprecated using ``versionutils`` from oslo.
|
||||
More information regarding this deprecation can be found in the `patch
|
||||
<https://review.openstack.org/#/c/115423/>`_ that proposed the deprecation.
|
Loading…
Reference in New Issue
Block a user