summaryrefslogtreecommitdiff
path: root/api-ref/source/servers-action-fixed-ip.inc
blob: 71f06490f5047b3e6310e8a38d4e0c703f130400 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
.. -*- rst -*-

Add (Associate) Fixed Ip (addFixedIp Action) (DEPRECATED)
==========================================================

.. warning:: This API is deprecated and will fail with a 404 starting
             from microversion 2.44. This is replaced with using the
             Neutron networking service API.

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

Adds a fixed IP address to a server instance, which associates that
address with the server. The fixed IP address is retrieved from the
network that you specify in the request.

Specify the ``addFixedIp`` action and the network ID in the request body.

Policy defaults enable only users with the administrative role or
the owner of the server to perform this operation. Cloud providers
can change these permissions through the ``policy.json`` file.

Normal response codes: 202

Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404)

Request
-------

.. rest_parameters:: parameters.yaml

  - server_id: server_id_path
  - addFixedIp: addFixedIp
  - networkId: net_id_resp

**Example Add (Associate) Fixed Ip (addFixedIp Action)**

.. literalinclude:: ../../doc/api_samples/os-multinic/multinic-add-fixed-ip-req.json
   :language: javascript

Response
--------

No response body is returned after a successful addFixedIp action.


Remove (Disassociate) Fixed Ip (removeFixedIp Action) (DEPRECATED)
===================================================================

.. warning:: This API is deprecated and will fail with a 404 starting
             from microversion 2.44. This is replaced with using the
             Neutron networking service API.

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

Removes, or disassociates, a fixed IP address from a server.

Specify the ``removeFixedIp`` action in the request body.

Policy defaults enable only users with the administrative role or
the owner of the server to perform this operation. Cloud providers
can change these permissions through the ``policy.json`` file.

Normal response codes: 202

Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404)

Request
-------

.. rest_parameters:: parameters.yaml


  - server_id: server_id_path
  - removeFixedIp: removeFixedIp
  - address: ip_address

**Example Remove (Disassociate) Fixed Ip (removeFixedIp Action)**

.. literalinclude:: ../../doc/api_samples/os-multinic/multinic-remove-fixed-ip-req.json
   :language: javascript

Response
--------

No response body is returned after a successful removeFixedIp action.