This patch brings the Networking API Reference to a repository under the neutron stadium. It is a part of the effort described here [1]: As we discussed in the stadium evolution [2], we plan to have the API stuff in neutron-lib, so the API reference is hosted on neutron-lib as well. The goal of this patch is to import converted RST API references. Cleanup is planned once this patch is merged. [1] https://wiki.openstack.org/wiki/Documentation/Migrate#API_Reference_Plan [2] https://review.openstack.org/312199 Change-Id: I6f2c4d476c31b252bfb181138505673f397639fc
114 lines
1.9 KiB
ReStructuredText
114 lines
1.9 KiB
ReStructuredText
.. -*- rst -*-
|
|
|
|
=========================================
|
|
Ports binding extended attributes (ports)
|
|
=========================================
|
|
|
|
Lists, creates, shows information for, updates, and deletes ports.
|
|
|
|
Show port details (port binding)
|
|
================================
|
|
|
|
.. rest_method:: GET /v2.0/ports/{port_id}
|
|
|
|
Shows details for a port.
|
|
|
|
Normal response codes: 200
|
|
Error response codes:
|
|
|
|
Request
|
|
-------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- port_id: port_id
|
|
|
|
Response Example
|
|
----------------
|
|
|
|
.. literalinclude:: ../samples/ports/port-bind-show-response.json
|
|
:language: javascript
|
|
|
|
Update port (port binding)
|
|
==========================
|
|
|
|
.. rest_method:: PUT /v2.0/ports/{port_id}
|
|
|
|
Updates a port.
|
|
|
|
Normal response codes: 200
|
|
Error response codes:404,401,400,
|
|
|
|
Request
|
|
-------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- port_id: port_id
|
|
|
|
Request Example
|
|
---------------
|
|
|
|
.. literalinclude:: ../samples/ports/port-create-request.json
|
|
:language: javascript
|
|
|
|
Response Example
|
|
----------------
|
|
|
|
.. literalinclude:: ../samples/ports/port-bind-create-update-response.json
|
|
:language: javascript
|
|
|
|
Delete port (port binding)
|
|
==========================
|
|
|
|
.. rest_method:: DELETE /v2.0/ports/{port_id}
|
|
|
|
Deletes a port.
|
|
|
|
Error response codes:409,404,204,401,
|
|
|
|
Request
|
|
-------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- port_id: port_id
|
|
|
|
List ports (port binding)
|
|
=========================
|
|
|
|
.. rest_method:: GET /v2.0/ports
|
|
|
|
Lists ports to which the tenant has access.
|
|
|
|
Normal response codes: 200
|
|
Error response codes:401,
|
|
|
|
Request
|
|
-------
|
|
|
|
Response Example
|
|
----------------
|
|
|
|
.. literalinclude:: ../samples/ports/ports-list-response.json
|
|
:language: javascript
|
|
|
|
Create port (port binding)
|
|
==========================
|
|
|
|
.. rest_method:: POST /v2.0/ports
|
|
|
|
Creates a port on a network.
|
|
|
|
Error response codes:201,403,401,400,
|
|
|
|
Request
|
|
-------
|
|
|
|
Request Example
|
|
---------------
|
|
|
|
.. literalinclude:: ../samples/ports/port-create-request.json
|
|
:language: javascript
|
|
|