Skip to content

Commit 03ce169

Browse files
soulxumriedem
authored andcommitted
Deprecate Multinic, floatingip action and os-virtual-interface API
The following APIs which are considered as proxies of Neutron networking API, are deprecated and will result in a 404 error response in new Microversion: POST /servers/{server_uuid}/action { "addFixedIp": {...} } POST /servers/{server_uuid}/action { "removeFixedIp": {...} } POST /servers/{server_uuid}/action { "addFloatingIp": {...} } POST /servers/{server_uuid}/action { "removeFloatingIp": {...} And the nova-network specific API for query server's interfaces is deprecated also: GET /servers/{server_uuid}/os-virtual-interfaces Partial implement blueprint deprecate-multinic-proxy-api Change-Id: I1848db384a825d3b166f113b30ebad92113af8e5
1 parent a3038b6 commit 03ce169

15 files changed

+169
-44
lines changed

api-ref/source/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ the `API guide <http://developer.openstack.org/api-guide/compute/index.html>`_.
3030
.. include:: os-instance-actions.inc
3131
.. include:: os-interface.inc
3232
.. include:: os-server-password.inc
33-
.. include:: os-virtual-interfaces.inc
3433
.. include:: os-volume-attachments.inc
3534
.. include:: flavors.inc
3635
.. include:: os-flavor-access.inc
@@ -71,3 +70,4 @@ the `API guide <http://developer.openstack.org/api-guide/compute/index.html>`_.
7170
.. include:: os-security-group-default-rules.inc
7271
.. include:: os-security-group-rules.inc
7372
.. include:: os-hosts.inc
73+
.. include:: os-virtual-interfaces.inc

api-ref/source/os-virtual-interfaces.inc

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
.. -*- rst -*-
22
3-
=============================================================
4-
Servers virtual interfaces (servers, os-virtual-interfaces)
5-
=============================================================
3+
=========================================================================
4+
Servers virtual interfaces (servers, os-virtual-interfaces) (DEPRECATED)
5+
=========================================================================
66

77
Lists virtual interfaces for a server.
88

9+
.. warning:: Since this API is only implemented for the nova-network, the API
10+
is deprecated from the Microversion 2.44. This API will fail with
11+
a 404 starting from microversion 2.44. To query the server attached
12+
neutron interface, please use the API
13+
``GET /servers/{server_uuid}/os-interface``.
14+
915
.. note::
1016
This API is only implemented for the nova-network service and will result
1117
in a 400 error response if the cloud is using the Neutron networking

api-ref/source/servers-action-fixed-ip.inc

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
.. -*- rst -*-
22
3-
Add (Associate) Fixed Ip (addFixedIp Action)
4-
============================================
3+
Add (Associate) Fixed Ip (addFixedIp Action) (DEPRECATED)
4+
==========================================================
55

6-
.. note::
7-
8-
Network APIs and proxies are deprecated beginning microversion 2.36, except
9-
for actions on non-deprecated resources such as servers. The addFixedIp
10-
action is one such exemption.
6+
.. warning:: This API is deprecated and will fail with a 404 starting
7+
from microversion 2.44. This is replaced with using the
8+
Neutron networking service API.
119

1210
.. rest_method:: POST /servers/{server_id}/action
1311

@@ -46,14 +44,12 @@ Response
4644
No response body is returned after a successful addFixedIp action.
4745

4846

49-
Remove (Disassociate) Fixed Ip (removeFixedIp Action)
50-
=====================================================
51-
52-
.. note::
47+
Remove (Disassociate) Fixed Ip (removeFixedIp Action) (DEPRECATED)
48+
===================================================================
5349

54-
Network APIs and proxies are deprecated as of microversion 2.36, except
55-
for actions on non-deprecated resources such as servers. The removeFixedIp
56-
action is one such exemption.
50+
.. warning:: This API is deprecated and will fail with a 404 starting
51+
from microversion 2.44. This is replaced with using the
52+
Neutron networking service API.
5753

5854
.. rest_method:: POST /servers/{server_id}/action
5955

api-ref/source/servers-actions.inc

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,12 @@ into a server since Mitaka release.
2525

2626
You can get an RDP, serial, SPICE, or VNC console for a server.
2727

28-
Add (Associate) Floating Ip (addFloatingIp Action)
29-
==================================================
28+
Add (Associate) Floating Ip (addFloatingIp Action) (DEPRECATED)
29+
================================================================
30+
31+
.. warning:: This API is deprecated and will fail with a 404 starting
32+
from microversion 2.44. This is replaced with using the
33+
Neutron networking service API.
3034

3135
.. rest_method:: POST /servers/{server_id}/action
3236

@@ -430,8 +434,12 @@ Response
430434
.. literalinclude:: ../../doc/api_samples/servers/server-action-rebuild-resp.json
431435
:language: javascript
432436

433-
Remove (Disassociate) Floating Ip (removeFloatingIp Action)
434-
===========================================================
437+
Remove (Disassociate) Floating Ip (removeFloatingIp Action) (DEPRECATED)
438+
=========================================================================
439+
440+
.. warning:: This API is deprecated and will fail with a 404 starting
441+
from microversion 2.44. This is replaced with using the
442+
Neutron networking service API.
435443

436444
.. rest_method:: POST /servers/{server_id}/action
437445

doc/api_samples/versions/v21-version-get-resp.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
}
2020
],
2121
"status": "CURRENT",
22-
"version": "2.43",
22+
"version": "2.44",
2323
"min_version": "2.1",
2424
"updated": "2013-07-23T11:33:21Z"
2525
}

doc/api_samples/versions/versions-get-resp.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
}
2323
],
2424
"status": "CURRENT",
25-
"version": "2.43",
25+
"version": "2.44",
2626
"min_version": "2.1",
2727
"updated": "2013-07-23T11:33:21Z"
2828
}

nova/api/openstack/api_version_request.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@
103103
starting with version 2.33 for block devices and starting with
104104
version 2.37 for network interfaces.
105105
* 2.43 - Deprecate os-hosts API
106+
* 2.44 - The servers action addFixedIp, removeFixedIp, addFloatingIp,
107+
removeFloatingIp and os-virtual-interfaces APIs are deprecated.
106108
"""
107109

108110
# The minimum and maximum versions of the API supported
@@ -111,7 +113,7 @@
111113
# Note(cyeoh): This only applies for the v2.1 API once microversions
112114
# support is fully merged. It does not affect the V2 API.
113115
_MIN_API_VERSION = "2.1"
114-
_MAX_API_VERSION = "2.43"
116+
_MAX_API_VERSION = "2.44"
115117
DEFAULT_API_VERSION = _MIN_API_VERSION
116118

117119
# Almost all proxy APIs which related to network, images and baremetal

nova/api/openstack/compute/floating_ips.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,11 +203,14 @@ def delete(self, req, id):
203203

204204

205205
class FloatingIPActionController(wsgi.Controller):
206+
"""This API is deprecated from the Microversion '2.44'."""
207+
206208
def __init__(self, *args, **kwargs):
207209
super(FloatingIPActionController, self).__init__(*args, **kwargs)
208210
self.compute_api = compute.API()
209211
self.network_api = network.API()
210212

213+
@wsgi.Controller.api_version("2.1", "2.43")
211214
@extensions.expected_errors((400, 403, 404))
212215
@wsgi.action('addFloatingIp')
213216
@validation.schema(floating_ips.add_floating_ip)
@@ -286,6 +289,7 @@ def _add_floating_ip(self, req, id, body):
286289

287290
return webob.Response(status_int=202)
288291

292+
@wsgi.Controller.api_version("2.1", "2.43")
289293
@extensions.expected_errors((400, 403, 404, 409))
290294
@wsgi.action('removeFloatingIp')
291295
@validation.schema(floating_ips.remove_floating_ip)

nova/api/openstack/compute/multinic.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,13 @@
3131

3232

3333
class MultinicController(wsgi.Controller):
34+
"""This API is deprecated from Microversion '2.44'."""
35+
3436
def __init__(self, *args, **kwargs):
3537
super(MultinicController, self).__init__(*args, **kwargs)
3638
self.compute_api = compute.API()
3739

40+
@wsgi.Controller.api_version("2.1", "2.43")
3841
@wsgi.response(202)
3942
@wsgi.action('addFixedIp')
4043
@extensions.expected_errors((400, 404))
@@ -53,6 +56,7 @@ def _add_fixed_ip(self, req, id, body):
5356
except exception.NoMoreFixedIps as e:
5457
raise exc.HTTPBadRequest(explanation=e.format_message())
5558

59+
@wsgi.Controller.api_version("2.1", "2.43")
5660
@wsgi.response(202)
5761
@wsgi.action('removeFixedIp')
5862
@extensions.expected_errors((400, 404))

nova/api/openstack/compute/rest_api_version_history.rst

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,3 +493,39 @@ user documentation.
493493
`shutdown`, `startup`, `reboot`, or `maintenance_mode` actions as those are
494494
system-level operations which should be outside of the control of the
495495
compute service.
496+
497+
2.44
498+
----
499+
500+
The following APIs which are considered as proxies of Neutron networking API,
501+
are deprecated and will result in a 404 error response in new Microversion::
502+
503+
POST /servers/{server_uuid}/action
504+
{
505+
"addFixedIp": {...}
506+
}
507+
508+
POST /servers/{server_uuid}/action
509+
{
510+
"removeFixedIp": {...}
511+
}
512+
513+
POST /servers/{server_uuid}/action
514+
{
515+
"addFloatingIp": {...}
516+
}
517+
518+
POST /servers/{server_uuid}/action
519+
{
520+
"removeFloatingIp": {...}
521+
}
522+
523+
Those server actions can be replaced by calling the Neutron API directly.
524+
525+
The nova-network specific API to query the server's interfaces is
526+
deprecated::
527+
528+
GET /servers/{server_uuid}/os-virtual-interfaces
529+
530+
To query attached neutron interfaces for a specific server, the API
531+
`GET /servers/{server_uuid}/os-interface` can be used.

0 commit comments

Comments
 (0)