Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 OpenStack LLC # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License.
"""Base extensions controller to be extended by public and admin API's."""
# TODO(dolph): Extensions should obviously provide this information # themselves, but hardcoding it here allows us to match # the API spec in the short term with minimal complexity. 'name': 'Openstack Keystone Admin', 'namespace': 'http://docs.openstack.org/identity/api/ext/' 'OS-KSADM/v1.0', 'alias': 'OS-KSADM', 'updated': '2011-08-19T13:25:27-06:00', 'description': 'Openstack extensions to Keystone v2.0 API ' 'enabling Admin Operations.', 'links': [ { 'rel': 'describedby', # TODO(dolph): link needs to be revised after # bug 928059 merges 'type': 'text/html', 'href': 'https://github.com/openstack/identity-api', } ] }
"""Returns a URL to keystone's own endpoint.""" url += '/'
"""The list of versions is dependent on the context.""" 'id': 'v2.0', 'status': 'stable', 'updated': '2013-03-06T00:00:00Z', 'links': [ { 'rel': 'self', 'href': self._get_identity_url(version='v2.0'), }, { 'rel': 'describedby', 'type': 'text/html', 'href': 'http://docs.openstack.org/api/openstack-' 'identity-service/2.0/content/' }, { 'rel': 'describedby', 'type': 'application/pdf', 'href': 'http://docs.openstack.org/api/openstack-' 'identity-service/2.0/identity-dev-guide-' '2.0.pdf' } ], 'media-types': [ { 'base': 'application/json', 'type': MEDIA_TYPE_JSON % 'v2.0' }, { 'base': 'application/xml', 'type': MEDIA_TYPE_XML % 'v2.0' } ] }
'id': 'v3.0', 'status': 'stable', 'updated': '2013-03-06T00:00:00Z', 'links': [ { 'rel': 'self', 'href': self._get_identity_url(version='v3'), } ], 'media-types': [ { 'base': 'application/json', 'type': MEDIA_TYPE_JSON % 'v3' }, { 'base': 'application/xml', 'type': MEDIA_TYPE_XML % 'v3' } ] }
'versions': { 'values': versions.values() } })
'version': versions['v2.0'] }) else:
'version': versions['v3'] }) else: |