api-ref for ndp proxy

This patch adds the API documentation for the ndp proxy

Change-Id: I876405a68cd0f1727350e96eca6fb65433d7247f
Partial-Bug: #1877301
This commit is contained in:
Yang JianFeng
2021-07-17 04:09:50 -04:00
committed by yangjianfeng
parent c5fd7066f6
commit c7a2f76cdb
10 changed files with 456 additions and 0 deletions

View File

@@ -31,6 +31,7 @@ Layer 3 Networking
.. include:: floatingippools.inc
.. include:: fip-port-forwarding.inc
.. include:: routers.inc
.. include:: router-ndp-proxy.inc
.. include:: subnetpools.inc
.. include:: subnetpool_prefix_ops.inc
.. include:: subnets.inc

View File

@@ -205,6 +205,12 @@ metering_label_rule-id-path:
in: path
required: true
type: string
ndp_proxy_id-path:
description: |
The ID of the ndp proxy.
in: path
required: true
type: string
network_id-path:
description: |
The ID of the network.
@@ -983,6 +989,39 @@ name-query:
in: query
required: false
type: string
ndp_proxy-ip-address-query:
description:
The IPv6 address which the ``ndp proxy`` annunciate to external network.
in: query
required: false
type: string
ndp_proxy-port-id-query:
description:
The ID of the port for the ndp proxy.
in: query
required: false
type: string
ndp_proxy-router-id-query:
description:
The ID of the router for the ndp proxy.
in: query
required: false
type: string
ndp_proxy-sort_key:
description: |
Sorts by a ndp proxy attribute. You can specify multiple pairs of sort key
and sort direction query parameters. The sort keys are limited to:
- ``id``
- ``name``
- ``tenant_id``
- ``project_id``
- ``router_id``
- ``port_id``
- ``ip_address``
in: query
required: false
type: string
network-name-query:
description: |
Filter the list result by the human-readable name of the network.
@@ -4801,6 +4840,48 @@ name_resource:
in: body
required: false
type: string
ndp_proxies:
description: |
A list of ``ndp proxy`` object.
in: body
required: true
type: array
ndp_proxy:
description: |
A ``ndp proxy`` object.
in: body
required: true
type: object
ndp_proxy_id-body:
description: |
The ID of the ndp proxy
in: body
required: true
type: string
ndp_proxy_ip_address-body:
description: |
The IPv6 address which the ``ndp proxy`` annunciate to external network.
in: body
required: true
type: string
ndp_proxy_ip_address-body-request:
description: |
The IPv6 address which the ``ndp proxy`` annunciate to external network.
in: body
required: false
type: string
ndp_proxy_port_id-body:
description: |
The ID of the port for the ndp proxy.
in: body
required: true
type: string
ndp_proxy_router_id-body:
description: |
The ID of the router for the ndp proxy.
in: body
required: true
type: string
network:
description: |
A ``network`` object.
@@ -6008,6 +6089,26 @@ router-distributed-request:
in: body
required: false
type: boolean
router-enable_ndp_proxy:
description: |
Enable NDP proxy attribute. ``true`` means NDP proxy is enabled for the
router, the IPv6 address of internal subnets attached to the router can be
published to external by create ``ndp_proxy``. ``false`` means NDP proxy is
disabled, the IPv6 address of internal subnets attached to the router can
not be published to external by ``ndp_proxy``. It is available when
``router-extend-ndp-proxy`` extension is enabled.
in: body
required: true
type: boolean
router-enable_ndp_proxy-request:
description: |
Enable NDP proxy attribute. Default is ``false``, To persist this attribute
value, set the ``enable_ndp_proxy_by_default`` option in the
``neutron.conf`` file. It is available when ``router-extend-ndp-proxy``
extension is enabled.
in: body
required: false
type: boolean
router-enable_snat:
description: |
Enable Source NAT (SNAT) attribute.

View File

@@ -0,0 +1,251 @@
.. -*- rst -*-
==============================
Router NDP proxy (ndp_proxies)
==============================
A ``ndp_proxy`` is a logical entity for annunciate a unique IPv6 address to
external network. It depends on a ``router`` entity on which external gateway
is enabled.
List ndp proxies
================
.. rest_method:: GET /v2.0/ndp_proxies
Lists logical ndp_proxies that the project who submits the request can
access.
Default policy settings return only those ndp_proxies that the project
who submits the request owns, unless an administrative user submits
the request.
Use the ``fields`` query parameter to control which fields are
returned in the response body. Additionally, you can filter results
by using query string parameters. For information, see `Filtering
and Column Selection <https://wiki.openstack.org/wiki/Neutron/APIv2
-specification#Filtering_and_Column_Selection>`__.
Normal response codes: 200
Error response codes: 401
Request
-------
.. rest_parameters:: parameters.yaml
- id: id-query
- tenant_id: project_id-query
- project_id: project_id-query
- name: name-query
- description: description-query
- router_id: ndp_proxy-router-id-query
- port_id: ndp_proxy-port-id-query
- ip_address: ndp_proxy-ip-address-query
- revision_number: revision_number-query
- sort_dir: sort_dir
- sort_key: ndp_proxy-sort_key
- fields: fields
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- ndp_proxies: ndp_proxies
- name: name
- id: ndp_proxy_id-body
- description: description
- tenant_id: project_id
- project_id: project_id
- revision_number: revision_number
- router_id: ndp_proxy_router_id-body
- port_id: ndp_proxy_port_id-body
- ip_address: ndp_proxy_ip_address-body
- created_at: created_at_resource
- updated_at: updated_at_resource
Response Example
----------------
.. literalinclude:: samples/ndp_proxies/ndp-proxies-list-response.json
:language: javascript
Show ndp proxy details
======================
.. rest_method:: GET /v2.0/ndp_proxies/{ndp_proxy_id}
Shows information for a ndp proxy
Use the ``fields`` query parameter to control which fields are returned in the response body.
For information, see `Filtering and Column Selection <https://wiki.openstack.org/wiki/Neutron/APIv2
-specification#Filtering_and_Column_Selection>`__.
Normal response codes: 200
Error response codes: 401, 404
Request
-------
.. rest_parameters:: parameters.yaml
- ndp_proxy_id: ndp_proxy_id-path
- fields: fields
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- ndp_proxy: ndp_proxy
- name: name
- id: ndp_proxy_id-body
- description: description
- tenant_id: project_id
- project_id: project_id
- revision_number: revision_number
- router_id: ndp_proxy_router_id-body
- port_id: ndp_proxy_port_id-body
- ip_address: ndp_proxy_ip_address-body
- created_at: created_at_resource
- updated_at: updated_at_resource
Response Example
----------------
.. literalinclude:: samples/ndp_proxies/ndp-proxy-show-response.json
:language: javascript
Update a ndp proxy
==================
.. rest_method:: PUT /v2.0/ndp_proxies/{ndp_proxy_id}
Updates a ndp proxy
Normal response codes: 200
Error response codes: 400, 401, 404
Request
-------
.. rest_parameters:: parameters.yaml
- ndp_proxy_id: ndp_proxy_id-path
- ndp_proxy: ndp_proxy
- name: name
- description: description-request-put
Request Example
---------------
.. literalinclude:: samples/ndp_proxies/ndp-proxy-update-request.json
:language: javascript
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- ndp_proxy: ndp_proxy
- name: name
- id: ndp_proxy_id-body
- description: description
- tenant_id: project_id
- project_id: project_id
- revision_number: revision_number
- router_id: ndp_proxy_router_id-body
- port_id: ndp_proxy_port_id-body
- ip_address: ndp_proxy_ip_address-body
- created_at: created_at_resource
- updated_at: updated_at_resource
Response Example
----------------
.. literalinclude:: samples/ndp_proxies/ndp-proxy-update-response.json
:language: javascript
Create ndp proxy
================
.. rest_method:: POST /v2.0/ndp_proxies
Creates a ndp proxy
Normal response codes: 201
Error response codes: 400, 401
Request
-------
.. rest_parameters:: parameters.yaml
- ndp_proxy: ndp_proxy
- name: name-request
- router_id: ndp_proxy_router_id-body
- port_id: ndp_proxy_port_id-body
- ip_address: ndp_proxy_ip_address-body-request
- description: description-request
Request Example
---------------
.. literalinclude:: samples/ndp_proxies/ndp-proxy-create-request.json
:language: javascript
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- ndp_proxy: ndp_proxy
- name: name
- id: ndp_proxy_id-body
- description: description
- tenant_id: project_id
- project_id: project_id
- revision_number: revision_number
- router_id: ndp_proxy_router_id-body
- port_id: ndp_proxy_port_id-body
- ip_address: ndp_proxy_ip_address-body
- created_at: created_at_resource
- updated_at: updated_at_resource
Response Example
----------------
.. literalinclude:: samples/ndp_proxies/ndp-proxy-create-response.json
:language: javascript
Delete a ndp proxy
==================
.. rest_method:: DELETE /v2.0/ndp_proxies/{ndp_proxy_id}
Deletes a ndp proxy.
Normal response codes: 204
Error response codes: 404
Request
-------
.. rest_parameters:: parameters.yaml
- ndp_proxy_id: ndp_proxy_id-path
Response
--------
There is no body content for the response of a successful DELETE request.

View File

@@ -143,6 +143,13 @@ BFD monitors for Extraroutes extension (``bfd-for-extraroutes``)
BFD monitors for Extraroutes extension (``bfd-for-extraroutes``) adds
``bfd_monitor_id`` field to the extraroutes dictionary.
Router enable ndp proxy extension (router-extend-ndp-proxy)
===========================================================
The ``router-extend-ndp-proxy`` extension adds a ``enable_ndp_proxy`` parameter
to router. If this parameter is set as ``false``, the router don't support
``ndp_proxy``.
.. warning::
This API extension was merged as experimental to enable parallel
@@ -221,6 +228,7 @@ Response Parameters
- updated_at: updated_at_resource
- tags: tags
- conntrack_helpers: router-conntrack_helpers
- enable_ndp_proxy: router-enable_ndp_proxy
Response Example
----------------
@@ -266,6 +274,7 @@ Request
- availability_zone_hints: router-availability_zone_hints-request
- service_type_id: router-service_type_id-request
- flavor_id: router-flavor_id-optional
- enable_ndp_proxy: router-enable_ndp_proxy-request
Request Example
---------------
@@ -302,6 +311,7 @@ Response Parameters
- updated_at: updated_at_resource
- tags: tags
- conntrack_helpers: router-conntrack_helpers
- enable_ndp_proxy: router-enable_ndp_proxy
Response Example
----------------
@@ -363,6 +373,7 @@ Response Parameters
- updated_at: updated_at_resource
- tags: tags
- conntrack_helpers: router-conntrack_helpers
- enable_ndp_proxy: router-enable_ndp_proxy
Response Example
----------------
@@ -399,6 +410,7 @@ Request
- description: description-request
- routes: router-routes-request
- distributed: router-distributed-request
- enable_ndp_proxy: router-enable_ndp_proxy-request
Request Example
---------------
@@ -435,6 +447,7 @@ Response Parameters
- updated_at: updated_at_resource
- tags: tags
- conntrack_helpers: router-conntrack_helpers
- enable_ndp_proxy: router-enable_ndp_proxy
Response Example
----------------

View File

@@ -0,0 +1,30 @@
{
"ndp_proxies": [
{
"name": "proxy1",
"id": "b930d7f6-ceb7-40a0-8b81-a425dd994ccf",
"router_id": "915a14a6-867b-4af7-83d1-70efceb146f9",
"port_id": "f7b14d9a-b0dc-4fbe-bb14-a0f4970a69e0",
"ip_address": "2001::1:56",
"revision_number": 1,
"project_id": "0bd18306d801447bb457a46252d82d13",
"tenant_id": "0bd18306d801447bb457a46252d82d13",
"created_at": "2021-07-16T19:17:04Z",
"updated_at": "2021-07-16T20:36:22Z",
"description": ""
},
{
"name": "proxy2",
"id": "f8a44de0-fc8e-45df-93c7-f79bf3b01c95",
"router_id": "915a14a6-867b-4af7-83d1-70efceb146f9",
"port_id": "fc36c5b0-497b-42a3-8ef3-545f90756a41",
"ip_address": "2001::1:67",
"revision_number": 1,
"project_id": "0bd18306d801447bb457a46252d82d13",
"tenant_id": "0bd18306d801447bb457a46252d82d13",
"created_at": "2021-07-16T19:27:04Z",
"updated_at": "2021-07-16T20:38:22Z",
"description": ""
}
]
}

View File

@@ -0,0 +1,9 @@
{
"ndp_proxy": {
"name": "ndp_proxy1",
"router_id": "1238be08-a2a8-4b8d-addf-fb5e2250e480",
"port_id": "6738be23-a398-445d-aaaf-785e4550e4cb",
"ip_address": "2001::1:6",
"description": "Some description"
}
}

View File

@@ -0,0 +1,15 @@
{
"ndp_proxy": {
"name": "ndp_proxy1",
"id": "b930d7f6-ceb7-40a0-8b81-a425dd994ccf",
"router_id": "1238be08-a2a8-4b8d-addf-fb5e2250e480",
"port_id": "6738be23-a398-445d-aaaf-785e4550e4cb",
"ip_address": "2001::1:6",
"revision_number": 0,
"project_id": "0bd18306d801447bb457a46252d82d13",
"tenant_id": "0bd18306d801447bb457a46252d82d13",
"created_at": "2021-07-16T19:17:04Z",
"updated_at": "2021-07-16T20:36:22Z",
"description": "Some description"
}
}

View File

@@ -0,0 +1,15 @@
{
"ndp_proxy": {
"name": "proxy1",
"id": "b930d7f6-ceb7-40a0-8b81-a425dd994ccf",
"router_id": "915a14a6-867b-4af7-83d1-70efceb146f9",
"port_id": "f7b14d9a-b0dc-4fbe-bb14-a0f4970a69e0",
"ip_address": "2001::1:56",
"revision_number": 1,
"project_id": "0bd18306d801447bb457a46252d82d13",
"tenant_id": "0bd18306d801447bb457a46252d82d13",
"created_at": "2021-07-16T19:17:04Z",
"updated_at": "2021-07-16T20:36:22Z",
"description": ""
}
}

View File

@@ -0,0 +1,6 @@
{
"ndp_proxy": {
"name": "new-name",
"description": "balabalabala"
}
}

View File

@@ -0,0 +1,15 @@
{
"ndp_proxy": {
"name": "new-name",
"id": "b930d7f6-ceb7-40a0-8b81-a425dd994ccf",
"router_id": "915a14a6-867b-4af7-83d1-70efceb146f9",
"port_id": "f7b14d9a-b0dc-4fbe-bb14-a0f4970a69e0",
"ip_address": "2001::1:56",
"revision_number": 3,
"project_id": "0bd18306d801447bb457a46252d82d13",
"tenant_id": "0bd18306d801447bb457a46252d82d13",
"created_at": "2021-07-16T19:17:04Z",
"updated_at": "2021-07-16T20:36:22Z",
"description": "balabalabala"
}
}