2016-04-12 09:03:46 -04:00
|
|
|
.. -*- rst -*-
|
|
|
|
|
2019-09-21 22:27:15 +01:00
|
|
|
======================================
|
2016-06-14 15:31:18 +09:00
|
|
|
Networks (os-networks) (DEPRECATED)
|
2019-09-21 22:27:15 +01:00
|
|
|
======================================
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2019-09-21 22:27:15 +01:00
|
|
|
.. warning::
|
|
|
|
|
|
|
|
This API was designed to work with ``nova-network`` which was deprecated in
|
|
|
|
the 14.0.0 (Newton) release and removed in the 21.0.0 (Ussuri) release. Some
|
|
|
|
features are proxied to the Network service (neutron) when appropriate, but
|
|
|
|
as with all translation proxies, this is far from perfect compatibility.
|
|
|
|
These APIs should be avoided in new applications in favor of `using
|
|
|
|
neutron directly`__. These will fail with a 404 starting from microversion
|
|
|
|
2.36. They were removed in the 21.0.0 (Ussuri) release.
|
2016-06-14 15:31:18 +09:00
|
|
|
|
2019-09-21 22:27:15 +01:00
|
|
|
__ https://docs.openstack.org/api-ref/network/v2/#networks
|
2016-05-09 12:10:21 -04:00
|
|
|
|
2016-04-12 09:03:46 -04:00
|
|
|
Creates, lists, shows information for, and deletes networks.
|
|
|
|
|
|
|
|
Adds network to a project, disassociates a network from a project, and
|
|
|
|
disassociates a project from a network.
|
|
|
|
|
|
|
|
Associates host with and disassociates host from a network.
|
|
|
|
|
2016-05-09 12:10:21 -04:00
|
|
|
List Networks
|
|
|
|
=============
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-06-02 08:50:03 -04:00
|
|
|
.. rest_method:: GET /os-networks
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-05-09 12:10:21 -04:00
|
|
|
Lists networks for the project.
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-05-09 12:10:21 -04:00
|
|
|
Policy defaults enable all users to perform this operation. Cloud
|
|
|
|
providers can change these permissions through the ``policy.json`` file.
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Normal response codes: 200
|
|
|
|
|
2016-05-09 12:10:21 -04:00
|
|
|
Error response codes: unauthorized(401), forbidden(403)
|
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-09 12:10:21 -04:00
|
|
|
**Example List Networks: JSON response**
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-05-09 12:10:21 -04:00
|
|
|
.. literalinclude:: ../../doc/api_samples/os-networks/networks-list-resp.json
|
2016-04-12 09:03:46 -04:00
|
|
|
:language: javascript
|
|
|
|
|
2016-05-09 12:10:21 -04:00
|
|
|
Create Network
|
|
|
|
==============
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-06-02 08:50:03 -04:00
|
|
|
.. rest_method:: POST /os-networks
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-05-09 12:10:21 -04:00
|
|
|
Creates a network.
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-05-09 12:10:21 -04:00
|
|
|
Policy defaults enable only users with the administrative role or the
|
|
|
|
owner of the network to perform this operation. Cloud providers can change
|
|
|
|
these permissions through the ``policy.json`` file.
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Normal response codes: 200
|
|
|
|
|
2019-09-21 22:27:15 +01:00
|
|
|
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
|
|
|
|
conflict(409), gone(410), 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
|
|
|
|
2016-05-09 12:10:21 -04:00
|
|
|
**Example Create Network: JSON request**
|
|
|
|
|
|
|
|
.. literalinclude:: ../../doc/api_samples/os-networks/network-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
|
|
|
|
2016-05-09 12:10:21 -04:00
|
|
|
**Example Create Network: JSON response**
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-05-09 12:10:21 -04:00
|
|
|
.. literalinclude:: ../../doc/api_samples/os-networks/network-create-resp.json
|
2016-04-12 09:03:46 -04:00
|
|
|
:language: javascript
|
|
|
|
|
|
|
|
Add Network
|
|
|
|
===========
|
|
|
|
|
2016-06-02 08:50:03 -04:00
|
|
|
.. rest_method:: POST /os-networks/add
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Adds a network to a project.
|
|
|
|
|
2016-05-09 12:10:21 -04:00
|
|
|
Policy defaults enable only users with the administrative role to perform
|
|
|
|
this operation. Cloud providers can change these permissions through the
|
|
|
|
``policy.json`` file.
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Normal response codes: 202
|
|
|
|
|
2019-09-21 22:27:15 +01:00
|
|
|
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
|
|
|
|
gone(410), 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
|
|
|
|
|
|
|
**Example Add Network: JSON request**
|
|
|
|
|
|
|
|
.. literalinclude:: ../../doc/api_samples/os-networks/network-add-req.json
|
|
|
|
:language: javascript
|
|
|
|
|
|
|
|
Response
|
2016-04-14 13:10:59 -04:00
|
|
|
--------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Show Network Details
|
|
|
|
====================
|
|
|
|
|
2016-06-02 08:50:03 -04:00
|
|
|
.. rest_method:: GET /os-networks/{network_id}
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Shows details for a network.
|
|
|
|
|
2016-05-09 12:10:21 -04:00
|
|
|
Policy defaults enable all users to perform this operation. Cloud providers
|
|
|
|
can change these permissions through the ``policy.json`` file.
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Normal response codes: 200
|
|
|
|
|
2016-05-09 12:10:21 -04: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
|
|
|
|
|
|
|
|
- network_id: network_id
|
|
|
|
|
|
|
|
Response
|
2016-04-14 13:10:59 -04:00
|
|
|
--------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-04-19 17:52:18 +09:00
|
|
|
**Example Show Network Details: JSON response**
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
.. literalinclude:: ../../doc/api_samples/os-networks/network-show-resp.json
|
|
|
|
:language: javascript
|
|
|
|
|
|
|
|
Delete Network
|
|
|
|
==============
|
|
|
|
|
2016-06-02 08:50:03 -04:00
|
|
|
.. rest_method:: DELETE /os-networks/{network_id}
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Deletes a network.
|
|
|
|
|
2016-05-09 12:10:21 -04:00
|
|
|
Policy defaults enable only users with the administrative role or the
|
|
|
|
owner of the network to perform this operation. Cloud providers can change
|
|
|
|
these permissions through the ``policy.json`` file.
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Normal response codes: 202
|
|
|
|
|
2019-09-21 22:27:15 +01:00
|
|
|
Error response codes: unauthorized(401), forbidden(403), itemNotFound(404),
|
|
|
|
conflict(409), gone(410)
|
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
|
|
|
|
|
|
|
|
- network_id: network_id
|
|
|
|
|
|
|
|
Response
|
2016-04-14 13:10:59 -04:00
|
|
|
--------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-05-09 12:10:21 -04:00
|
|
|
There is no body content for the response of a successful DELETE query.
|
|
|
|
|
2019-09-21 22:27:15 +01:00
|
|
|
Associate Host
|
|
|
|
==============
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-06-02 08:50:03 -04:00
|
|
|
.. rest_method:: POST /os-networks/{network_id}/action
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Associates a network with a host.
|
|
|
|
|
2016-04-20 17:11:06 +09:00
|
|
|
Specify the ``associate_host`` action in the request body.
|
|
|
|
|
2016-05-09 12:10:21 -04:00
|
|
|
Policy defaults enable only users with the administrative role or the owner
|
|
|
|
of the network to perform this operation. Cloud providers can change these
|
|
|
|
permissions through the ``policy.json`` file.
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Normal response codes: 202
|
|
|
|
|
2019-09-21 22:27:15 +01:00
|
|
|
Error response codes: unauthorized(401), forbidden(403), itemNotFound(404),
|
|
|
|
gone(410), 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
|
|
|
|
|
|
|
|
- network_id: network_id
|
2016-05-09 12:10:21 -04:00
|
|
|
- associate_host: associate_host
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-05-09 12:10:21 -04:00
|
|
|
**Example Associate Host to Network: JSON request**
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-04-20 12:03:04 +09:00
|
|
|
.. literalinclude:: ../../doc/api_samples/os-networks-associate/network-associate-host-req.json
|
2016-04-12 09:03:46 -04:00
|
|
|
:language: javascript
|
|
|
|
|
|
|
|
Response
|
2016-04-14 13:10:59 -04:00
|
|
|
--------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-05-09 12:10:21 -04:00
|
|
|
There is no body content for the response of a successful POST query.
|
|
|
|
|
2019-09-21 22:27:15 +01:00
|
|
|
Disassociate Network
|
|
|
|
====================
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-06-02 08:50:03 -04:00
|
|
|
.. rest_method:: POST /os-networks/{network_id}/action
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-05-09 12:10:21 -04:00
|
|
|
Disassociates a network from a project. You can then reuse the network.
|
|
|
|
|
|
|
|
Specify the ``disassociate`` action in the request body.
|
2016-04-20 17:11:06 +09:00
|
|
|
|
2016-05-09 12:10:21 -04:00
|
|
|
Policy defaults enable only users with the administrative role or the
|
|
|
|
owner of the network to perform this operation. Cloud providers can change
|
|
|
|
these permissions through the ``policy.json`` file.
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Normal response codes: 202
|
|
|
|
|
2019-09-21 22:27:15 +01:00
|
|
|
Error response codes: unauthorized(401), forbidden(403), itemNotFound(404),
|
|
|
|
gone(410), 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
|
|
|
|
|
|
|
|
- network_id: network_id
|
|
|
|
|
2016-05-09 12:10:21 -04:00
|
|
|
**Example Disassociate Network: JSON request**
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-06-10 14:56:46 +09:00
|
|
|
.. literalinclude:: ../../doc/api_samples/os-networks-associate/network-disassociate-req.json
|
2016-04-12 09:03:46 -04:00
|
|
|
:language: javascript
|
|
|
|
|
|
|
|
Response
|
2016-04-14 13:10:59 -04:00
|
|
|
--------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-05-09 12:10:21 -04:00
|
|
|
There is no body content for the response of a successful POST query.
|
|
|
|
|
2019-09-21 22:27:15 +01:00
|
|
|
Disassociate Host
|
|
|
|
=================
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-06-02 08:50:03 -04:00
|
|
|
.. rest_method:: POST /os-networks/{network_id}/action
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-05-09 12:10:21 -04:00
|
|
|
Disassociates a host from a network.
|
2016-04-20 17:11:06 +09:00
|
|
|
|
2016-05-09 12:10:21 -04:00
|
|
|
Specify the ``disassociate_host`` action in the request body.
|
2016-04-20 11:14:38 +00:00
|
|
|
|
2016-05-09 12:10:21 -04:00
|
|
|
Policy defaults enable only users with the administrative role or the
|
|
|
|
owner of the network to perform this operation. Cloud providers can change
|
|
|
|
these permissions through the ``policy.json`` file.
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Normal response codes: 202
|
|
|
|
|
2019-09-21 22:27:15 +01:00
|
|
|
Error response codes: unauthorized(401), forbidden(403), itemNotFound(404),
|
|
|
|
gone(410), 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
|
|
|
|
|
|
|
|
- network_id: network_id
|
|
|
|
|
2016-05-09 12:10:21 -04:00
|
|
|
**Example Disassociate Host from Network: JSON request**
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-05-09 12:10:21 -04:00
|
|
|
.. literalinclude:: ../../doc/api_samples/os-networks-associate/network-disassociate-host-req.json
|
2016-04-12 09:03:46 -04:00
|
|
|
:language: javascript
|
|
|
|
|
|
|
|
Response
|
2016-04-14 13:10:59 -04:00
|
|
|
--------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-05-09 12:10:21 -04:00
|
|
|
There is no body content for the response of a successful POST query.
|
|
|
|
|
|
|
|
|
2019-09-21 22:27:15 +01:00
|
|
|
Disassociate Project
|
|
|
|
====================
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-06-02 08:50:03 -04:00
|
|
|
.. rest_method:: POST /os-networks/{network_id}/action
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-05-09 12:10:21 -04:00
|
|
|
Disassociates a project from a network.
|
2016-04-20 17:11:06 +09:00
|
|
|
|
2016-04-20 11:14:38 +00:00
|
|
|
Specify the ``disassociate_project`` action in the request body.
|
|
|
|
|
2016-05-09 12:10:21 -04:00
|
|
|
Policy defaults enable only users with the administrative role or the
|
|
|
|
owner of the network to perform this operation. Cloud providers can change
|
|
|
|
these permissions through the ``policy.json`` file.
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Normal response codes: 202
|
|
|
|
|
2019-09-21 22:27:15 +01:00
|
|
|
Error response codes: unauthorized(401), forbidden(403), itemNotFound(404),
|
|
|
|
gone(410), 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
|
|
|
|
|
|
|
|
- network_id: network_id
|
|
|
|
|
2016-05-09 12:10:21 -04:00
|
|
|
**Example Disassociate Project from Network: JSON request**
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-04-20 12:03:04 +09:00
|
|
|
.. literalinclude:: ../../doc/api_samples/os-networks-associate/network-disassociate-project-req.json
|
2016-04-12 09:03:46 -04:00
|
|
|
:language: javascript
|
|
|
|
|
|
|
|
Response
|
2016-04-14 13:10:59 -04:00
|
|
|
--------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-05-09 12:10:21 -04:00
|
|
|
There is no body content for the response of a successful POST query.
|