2016-04-12 09:03:46 -04:00
|
|
|
.. -*- rst -*-
|
|
|
|
|
|
|
|
=========================================
|
|
|
|
Port interfaces (servers, os-interface)
|
|
|
|
=========================================
|
|
|
|
|
2016-07-06 16:54:46 +08:00
|
|
|
List port interfaces, show port interface details of the given server.
|
|
|
|
Create a port interface and uses it to attach a port to the given server,
|
|
|
|
detach a port interface from the given server.
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-04-23 22:54:22 +08:00
|
|
|
List Port Interfaces
|
|
|
|
====================
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-06-02 08:50:03 -04:00
|
|
|
.. rest_method:: GET /servers/{server_id}/os-interface
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-04-23 22:54:22 +08:00
|
|
|
Lists port interfaces that are attached to a server.
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-04-18 16:41:58 -07:00
|
|
|
Normal response codes: 200
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-04-23 22:54:22 +08:00
|
|
|
Error response codes: unauthorized(401), forbidden(403), itemNotFound(404),
|
|
|
|
NotImplemented(501)
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Request
|
2016-04-14 13:10:59 -04:00
|
|
|
-------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
2016-06-02 08:50:03 -04:00
|
|
|
|
2016-05-12 11:23:29 +09:00
|
|
|
- server_id: server_id_path
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Response
|
2016-04-14 13:10:59 -04:00
|
|
|
--------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
2016-05-12 11:23:29 +09:00
|
|
|
- interfaceAttachments: interfaceAttachments
|
2016-04-23 22:54:22 +08:00
|
|
|
- port_state: port_state
|
2016-05-12 11:23:29 +09:00
|
|
|
- fixed_ips: fixed_ips_resp
|
|
|
|
- ip_address: ip_address
|
|
|
|
- subnet_id: subnet_id
|
2016-04-12 09:03:46 -04:00
|
|
|
- mac_addr: mac_addr
|
2016-05-12 11:23:29 +09:00
|
|
|
- net_id: net_id_resp
|
|
|
|
- port_id: port_id_resp
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-04-23 22:54:22 +08:00
|
|
|
**Example List Port Interfaces: JSON response**
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-04-23 22:54:22 +08:00
|
|
|
.. literalinclude:: ../../doc/api_samples/os-attach-interfaces/attach-interfaces-list-resp.json
|
2016-04-12 09:03:46 -04:00
|
|
|
:language: javascript
|
|
|
|
|
2016-04-23 22:54:22 +08:00
|
|
|
Create Interface
|
|
|
|
================
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-06-02 08:50:03 -04:00
|
|
|
.. rest_method:: POST /servers/{server_id}/os-interface
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-07-06 16:54:46 +08:00
|
|
|
Creates a port interface and uses it to attach a port to a server.
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-04-18 16:41:58 -07:00
|
|
|
Normal response codes: 200
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-04-23 22:54:22 +08:00
|
|
|
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
|
|
|
|
itemNotFound(404), conflict(409), computeFault(500), NotImplemented(501)
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Request
|
2016-04-14 13:10:59 -04:00
|
|
|
-------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
2016-06-02 08:50:03 -04:00
|
|
|
|
2016-05-12 11:23:29 +09:00
|
|
|
- server_id: server_id_path
|
2016-04-23 22:54:22 +08:00
|
|
|
- interfaceAttachment: interfaceAttachment
|
|
|
|
- port_id: port_id
|
|
|
|
- net_id: net_id
|
|
|
|
- fixed_ips: fixed_ips
|
2016-05-12 11:23:29 +09:00
|
|
|
- ip_address: ip_address_req
|
2016-09-25 10:00:43 -04:00
|
|
|
- tag: device_tag_nic_attachment
|
2016-04-23 22:54:22 +08:00
|
|
|
|
|
|
|
**Example Create Interface: JSON request**
|
|
|
|
|
2016-07-06 16:54:46 +08:00
|
|
|
Create interface with ``net_id`` and ``fixed_ips``.
|
2016-05-24 11:32:12 +09:00
|
|
|
|
|
|
|
.. literalinclude:: ../../doc/api_samples/os-attach-interfaces/attach-interfaces-create-net_id-req.json
|
|
|
|
:language: javascript
|
|
|
|
|
2016-07-06 16:54:46 +08:00
|
|
|
Create interface with ``port_id``.
|
2016-05-24 11:32:12 +09:00
|
|
|
|
2016-04-23 22:54:22 +08:00
|
|
|
.. literalinclude:: ../../doc/api_samples/os-attach-interfaces/attach-interfaces-create-req.json
|
|
|
|
:language: javascript
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-09-25 10:00:43 -04:00
|
|
|
**Example Create Tagged Interface (v2.49): JSON request**
|
|
|
|
|
|
|
|
.. literalinclude:: ../../doc/api_samples/os-attach-interfaces/v2.49/attach-interfaces-create-req.json
|
|
|
|
:language: javascript
|
|
|
|
|
2016-04-12 09:03:46 -04:00
|
|
|
Response
|
2016-04-14 13:10:59 -04:00
|
|
|
--------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
2016-05-12 11:23:29 +09:00
|
|
|
- interfaceAttachment: interfaceAttachment_resp
|
|
|
|
- fixed_ips: fixed_ips_resp
|
|
|
|
- ip_address: ip_address
|
|
|
|
- subnet_id: subnet_id
|
2016-04-12 09:03:46 -04:00
|
|
|
- mac_addr: mac_addr
|
2016-05-12 11:23:29 +09:00
|
|
|
- net_id: net_id_resp
|
|
|
|
- port_id: port_id_resp
|
2016-04-23 22:54:22 +08:00
|
|
|
- port_state: port_state
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-04-23 22:54:22 +08:00
|
|
|
**Example Create Interface: JSON response**
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-04-23 22:54:22 +08:00
|
|
|
.. literalinclude:: ../../doc/api_samples/os-attach-interfaces/attach-interfaces-create-resp.json
|
2016-04-12 09:03:46 -04:00
|
|
|
:language: javascript
|
|
|
|
|
|
|
|
Show Port Interface Details
|
|
|
|
===========================
|
|
|
|
|
2016-06-02 08:50:03 -04:00
|
|
|
.. rest_method:: GET /servers/{server_id}/os-interface/{port_id}
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Shows details for a port interface that is attached to a server.
|
|
|
|
|
2016-04-18 16:41:58 -07:00
|
|
|
Normal response codes: 200
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-04-23 22:54:22 +08:00
|
|
|
Error response codes: unauthorized(401), forbidden(403), itemNotFound(404)
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Request
|
2016-04-14 13:10:59 -04:00
|
|
|
-------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
2016-06-02 08:50:03 -04:00
|
|
|
|
2016-05-12 11:23:29 +09:00
|
|
|
- server_id: server_id_path
|
|
|
|
- port_id: port_id_path
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Response
|
2016-04-14 13:10:59 -04:00
|
|
|
--------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-05-12 11:23:29 +09:00
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- interfaceAttachment: interfaceAttachment_resp
|
|
|
|
- port_state: port_state
|
|
|
|
- fixed_ips: fixed_ips_resp
|
|
|
|
- ip_address: ip_address
|
|
|
|
- subnet_id: subnet_id
|
|
|
|
- mac_addr: mac_addr
|
|
|
|
- net_id: net_id_resp
|
|
|
|
- port_id: port_id_resp
|
|
|
|
|
2016-04-19 17:52:18 +09:00
|
|
|
**Example Show Port Interface Details: JSON response**
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-04-20 11:38:31 +09:00
|
|
|
.. literalinclude:: ../../doc/api_samples/os-attach-interfaces/attach-interfaces-show-resp.json
|
2016-04-12 09:03:46 -04:00
|
|
|
:language: javascript
|
|
|
|
|
|
|
|
Detach Interface
|
|
|
|
================
|
|
|
|
|
2016-06-02 08:50:03 -04:00
|
|
|
.. rest_method:: DELETE /servers/{server_id}/os-interface/{port_id}
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-07-06 16:54:46 +08:00
|
|
|
Detaches a port interface from a server.
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-04-18 16:41:58 -07:00
|
|
|
Normal response codes: 202
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-04-23 22:54:22 +08:00
|
|
|
Error response codes: unauthorized(401), forbidden(403), itemNotFound(404),
|
2016-05-24 11:32:12 +09:00
|
|
|
conflict(409), NotImplemented(501)
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Request
|
2016-04-14 13:10:59 -04:00
|
|
|
-------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
2016-06-02 08:50:03 -04:00
|
|
|
|
2016-05-12 11:23:29 +09:00
|
|
|
- server_id: server_id_path
|
|
|
|
- port_id: port_id_path
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Response
|
2016-04-14 13:10:59 -04:00
|
|
|
--------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-05-12 11:23:29 +09:00
|
|
|
No body is returned on successful request.
|