nova/nova/api/openstack/compute/cells.py
Stephen Finucane fb14f24cc3 Remove '/os-cells' REST APIs
Drop support for the os-cells REST APIs, which are part of the cells v1
feature which has been deprecated since Pike.

This API now returns a 410 response for all routes.

Unit tests are removed and the functional API sample tests are just
asserting the 410 response now. The latter are also expanded to cover
APIs that weren't previously tested.

The API sample docs are left intact since the API reference still builds
from those and can be considered more or less branchless, so people
looking at the API reference can apply it to older deployments of nova
before os-cells was removed.

A release note added for previous cells v1 removals is amended to note
this additional change.

Part of blueprint remove-cells-v1

Change-Id: Iddb519008515f591cf1d884872a5887afbe766f2
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2019-04-16 18:26:13 +01:00

63 lines
1.7 KiB
Python

# Copyright 2011-2012 OpenStack Foundation
# All Rights Reserved.
# Copyright 2013 Red Hat, Inc.
#
# 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.
from webob import exc
from nova.api.openstack import wsgi
class CellsController(wsgi.Controller):
"""(Removed) Controller for Cell resources.
This was removed during the Train release in favour of cells v2.
"""
@wsgi.expected_errors(410)
def index(self, req):
raise exc.HTTPGone()
@wsgi.expected_errors(410)
def detail(self, req):
raise exc.HTTPGone()
@wsgi.expected_errors(410)
def info(self, req):
raise exc.HTTPGone()
@wsgi.expected_errors(410)
def capacities(self, req, id=None):
raise exc.HTTPGone()
@wsgi.expected_errors(410)
def show(self, req, id):
raise exc.HTTPGone()
@wsgi.expected_errors(410)
def delete(self, req, id):
raise exc.HTTPGone()
@wsgi.expected_errors(410)
def create(self, req, body):
raise exc.HTTPGone()
@wsgi.expected_errors(410)
def update(self, req, id, body):
raise exc.HTTPGone()
@wsgi.expected_errors(410)
def sync_instances(self, req, body):
raise exc.HTTPGone()