Coverage for nova/api/openstack/compute/certificates.py: 100%
16 statements
« prev ^ index » next coverage.py v7.6.12, created at 2025-04-17 15:08 +0000
« prev ^ index » next coverage.py v7.6.12, created at 2025-04-17 15:08 +0000
1# Copyright (c) 2012 OpenStack Foundation
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may
4# not use this file except in compliance with the License. You may obtain
5# a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations
13# under the License.
15import webob.exc
17from nova.api.openstack.compute.schemas import certificates as schema
18from nova.api.openstack import wsgi
19from nova.api import validation
21_removal_reason = """\
22This API was only used to build euca bundles when Nova had an in-tree EC2 API.
23It no longer interacts with any parts of the system besides its own certificate
24daemon.
25It was removed in the 16.0.0 (Pike) release.
26"""
29class CertificatesController(wsgi.Controller):
30 """The x509 Certificates API controller for the OpenStack API."""
32 @wsgi.expected_errors(410)
33 @wsgi.removed('16.0.0', _removal_reason)
34 @validation.query_schema(schema.show_query)
35 def show(self, req, id):
36 """Return certificate information."""
37 raise webob.exc.HTTPGone()
39 @wsgi.expected_errors((410))
40 @wsgi.removed('16.0.0', _removal_reason)
41 @validation.schema(schema.create)
42 def create(self, req, body=None):
43 """Create a certificate."""
44 raise webob.exc.HTTPGone()