Coverage for nova/api/openstack/compute/cloudpipe.py: 100%
21 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 2011 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.
15"""Connect your vlan to the world."""
17from webob import exc
19from nova.api.openstack.compute.schemas import cloudpipe as schema
20from nova.api.openstack import wsgi
21from nova.api import validation
23_removal_reason = """\
24This API only works with *nova-network*, which was deprecated in the
2514.0.0 (Newton) release.
26It was removed in the 16.0.0 (Pike) release.
27"""
30class CloudpipeController(wsgi.Controller):
31 """Handle creating and listing cloudpipe instances."""
33 @wsgi.expected_errors((410))
34 @wsgi.removed('16.0.0', _removal_reason)
35 @validation.schema(schema.create)
36 def create(self, req, body):
37 """Create a new cloudpipe instance, if none exists."""
38 raise exc.HTTPGone()
40 @wsgi.expected_errors((410))
41 @wsgi.removed('16.0.0', _removal_reason)
42 @validation.query_schema(schema.index_query)
43 def index(self, req):
44 """List running cloudpipe instances."""
45 raise exc.HTTPGone()
47 @wsgi.expected_errors(410)
48 @wsgi.removed('16.0.0', _removal_reason)
49 @validation.schema(schema.update)
50 def update(self, req, id, body):
51 """Configure cloudpipe parameters for the project."""
52 raise exc.HTTPGone()