Coverage for nova/api/openstack/compute/agents.py: 84%

25 statements  

« prev     ^ index     » next       coverage.py v7.6.12, created at 2025-04-17 15:08 +0000

1# Copyright 2012 IBM Corp. 

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. 

14 

15 

16from webob import exc 

17 

18from nova.api.openstack.compute.schemas import agents as schema 

19from nova.api.openstack import wsgi 

20from nova.api import validation 

21 

22_removal_reason = """\ 

23This API only works with the Xen virt driver, which was deprecated in the 

2420.0.0 (Train) release. 

25It was removed in the 23.0.0 (Wallaby) release. 

26""" 

27 

28 

29class AgentController(wsgi.Controller): 

30 """(Removed) Controller for agent resources. 

31 

32 This was removed during the Victoria release along with the XenAPI driver. 

33 """ 

34 @wsgi.expected_errors(410) 

35 @wsgi.removed('22.0.0', _removal_reason) 

36 @validation.query_schema(schema.index_query) 

37 def index(self, req): 

38 raise exc.HTTPGone() 

39 

40 @wsgi.expected_errors(410) 

41 @wsgi.removed('22.0.0', _removal_reason) 

42 @validation.schema(schema.update) 

43 def update(self, req, id, body): 

44 raise exc.HTTPGone() 

45 

46 @wsgi.expected_errors(410) 

47 @wsgi.removed('22.0.0', _removal_reason) 

48 def delete(self, req, id): 

49 raise exc.HTTPGone() 

50 

51 @wsgi.expected_errors(410) 

52 @wsgi.removed('22.0.0', _removal_reason) 

53 @validation.schema(schema.create) 

54 def create(self, req, body): 

55 raise exc.HTTPGone()