keystone  18.0.0
About: OpenStack Keystone (Core Service: Identity) provides an authentication and authorization service for other OpenStack services. Provides a catalog of endpoints for all OpenStack services.
The "Victoria" series (maintained release).
  Fossies Dox: keystone-18.0.0.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

os_simple_cert.py
Go to the documentation of this file.
1 # Licensed under the Apache License, Version 2.0 (the "License"); you may
2 # not use this file except in compliance with the License. You may obtain
3 # a copy of the License at
4 #
5 # http://www.apache.org/licenses/LICENSE-2.0
6 #
7 # Unless required by applicable law or agreed to in writing, software
8 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 # License for the specific language governing permissions and limitations
11 # under the License.
12 
13 # This file handles all flask-restful resources for /v3/OS-SIMPLE-CERT
14 
15 import flask_restful
16 
17 from keystone.api._shared import json_home_relations
18 import keystone.conf
19 from keystone import exception
20 from keystone.i18n import _
21 from keystone.server import flask as ks_flask
22 
23 
24 CONF = keystone.conf.CONF
25 
26 
27 _build_resource_relation = json_home_relations.os_simple_cert_resource_rel_func
28 
29 
30 class SimpleCertCAResource(flask_restful.Resource):
31  @ks_flask.unenforced_api
32  def get(self):
33  raise exception.Gone(
34  message=_('This API is no longer available due to the removal '
35  'of support for PKI tokens.'))
36 
37 
38 class SimpleCertListResource(flask_restful.Resource):
39  @ks_flask.unenforced_api
40  def get(self):
41  raise exception.Gone(
42  message=_('This API is no longer available due to the removal '
43  'of support for PKI tokens.'))
44 
45 
46 class SimpleCertAPI(ks_flask.APIBase):
47  _name = 'OS-SIMPLE-CERT'
48  _import_name = __name__
49  resources = []
50  resource_mapping = [
51  ks_flask.construct_resource_map(
52  resource=SimpleCertCAResource,
53  url='/OS-SIMPLE-CERT/ca',
54  resource_kwargs={},
55  rel='ca_certificate',
56  resource_relation_func=_build_resource_relation),
57  ks_flask.construct_resource_map(
58  resource=SimpleCertListResource,
59  url='/OS-SIMPLE-CERT/certificates',
60  resource_kwargs={},
61  rel='certificates',
62  resource_relation_func=_build_resource_relation),
63  ]
64 
65 
66 APIs = (SimpleCertAPI,)
keystone.exception.Gone
Definition: exception.py:628
keystone.api.os_simple_cert.SimpleCertListResource.get
def get(self)
Definition: os_simple_cert.py:40
keystone.api.os_simple_cert.SimpleCertCAResource
Definition: os_simple_cert.py:30
keystone.api.os_simple_cert.SimpleCertCAResource.get
def get(self)
Definition: os_simple_cert.py:32
keystone.api.os_simple_cert.SimpleCertListResource
Definition: os_simple_cert.py:38
keystone.server
Definition: __init__.py:1
keystone.conf
Definition: __init__.py:1
keystone.i18n._
_
Definition: i18n.py:29
keystone.i18n
Definition: i18n.py:1
keystone.api._shared
Definition: __init__.py:1
keystone.api.os_simple_cert.SimpleCertAPI
Definition: os_simple_cert.py:46