api-ref for floating IPs port forwardings
This patch adds the API documentation for the floating IPs port forwardings Change-Id: Ib3d223220785959aebee29e9a001d985cce0920c Partially-Implements: blueprint port-forwarding Partial-Bug: #1491317
This commit is contained in:
parent
3b2c748fdc
commit
473280422a
228
api-ref/source/v2/fip-port-forwarding.inc
Normal file
228
api-ref/source/v2/fip-port-forwarding.inc
Normal file
@ -0,0 +1,228 @@
|
||||
.. -*- rst -*-
|
||||
|
||||
============================
|
||||
Floating IPs port forwarding
|
||||
============================
|
||||
|
||||
Lists, creates, shows details for, updates, and deletes floating IPs port
|
||||
forwardings.
|
||||
|
||||
Show port forwarding
|
||||
====================
|
||||
|
||||
.. rest_method:: GET /v2.0/floatingips/{floatingip_id}/port_forwardings/{port_forwarding_id}
|
||||
|
||||
Shows information for a floating IP port forwarding.
|
||||
|
||||
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: 400, 404
|
||||
|
||||
Request
|
||||
-------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- floatingip_id: floatingip-id-path
|
||||
- port_forwarding_id: fip_port_forwarding_id-path
|
||||
- fields: fields
|
||||
|
||||
Response Parameters
|
||||
-------------------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- port_forwarding: fip_port_forwarding
|
||||
- id: fip_port_forwarding_id-body
|
||||
- internal_port_id: internal_port_id
|
||||
- internal_ip_address: internal_ip_address-response
|
||||
- internal_port: internal_port
|
||||
- external_port: external_port
|
||||
- protocol: fip_port_forwarding_protocol-body
|
||||
|
||||
Response Example
|
||||
----------------
|
||||
|
||||
.. literalinclude:: samples/port_forwardings/port-fowarding-show-response.json
|
||||
:language: javascript
|
||||
|
||||
|
||||
Update a port forwarding
|
||||
========================
|
||||
|
||||
.. rest_method:: PUT /v2.0/floatingips/{floatingip_id}/port_forwardings/{port_forwarding_id}
|
||||
|
||||
Updates a floating IP port forwarding.
|
||||
|
||||
Normal response codes: 200
|
||||
|
||||
Error response codes: 400, 404
|
||||
|
||||
Request
|
||||
-------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- floatingip_id: floatingip-id-path
|
||||
- port_forwarding_id: fip_port_forwarding_id-path
|
||||
- port_forwarding: fip_port_forwarding
|
||||
- internal_port_id: internal_port_id-update
|
||||
- internal_ip_address: internal_ip_address
|
||||
- internal_port: internal_port-update
|
||||
- external_port: external_port-update
|
||||
- protocol: fip_port_forwarding_protocol-update
|
||||
|
||||
Request Example
|
||||
---------------
|
||||
|
||||
.. literalinclude:: samples/port_forwardings/port-fowarding-update-request.json
|
||||
:language: javascript
|
||||
|
||||
Response Parameters
|
||||
-------------------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- port_forwarding: fip_port_forwarding
|
||||
- id: fip_port_forwarding_id-body
|
||||
- internal_port_id: internal_port_id
|
||||
- internal_ip_address: internal_ip_address-response
|
||||
- internal_port: internal_port
|
||||
- external_port: external_port
|
||||
- protocol: fip_port_forwarding_protocol-body
|
||||
|
||||
Response Example
|
||||
----------------
|
||||
|
||||
.. literalinclude:: samples/port_forwardings/port-fowarding-update-response.json
|
||||
:language: javascript
|
||||
|
||||
Delete a floating IP port forwarding
|
||||
====================================
|
||||
|
||||
.. rest_method:: DELETE /v2.0/floatingips/{floatingip_id}/port_forwardings/{port_forwarding_id}
|
||||
|
||||
Deletes a floating IP port forwarding.
|
||||
|
||||
Normal response codes: 204
|
||||
|
||||
Error response codes: 404
|
||||
|
||||
Request
|
||||
-------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- floatingip_id: floatingip-id-path
|
||||
- port_forwarding_id: fip_port_forwarding_id-path
|
||||
|
||||
Response
|
||||
--------
|
||||
|
||||
There is no body content for the response of a successful DELETE request.
|
||||
|
||||
List floating IP port forwardings
|
||||
=================================
|
||||
|
||||
.. rest_method:: GET /v2.0/floatingips/{floatingip_id}/port_forwardings
|
||||
|
||||
Lists floating IP port forwardings that the project has access to.
|
||||
|
||||
Default policy settings return only the port forwardings associated to floating
|
||||
IPs owned by the project of the user submitting the request, unless the
|
||||
user has administrative role.
|
||||
|
||||
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: 400, 404
|
||||
|
||||
Request
|
||||
-------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- floatingip_id: floatingip-id-path
|
||||
- id: id-query
|
||||
- internal_port_id: internal_port_id-query
|
||||
- external_port: external_port-query
|
||||
- protocol: fip_port_forwarding_protocol-query
|
||||
- sort_key: fip_port_forwarding-sort_key
|
||||
- sort_dir: sort_dir
|
||||
- fields: fields
|
||||
|
||||
Response Parameters
|
||||
-------------------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- port_forwardings: fip_port_forwardings
|
||||
- id: fip_port_forwarding_id-body
|
||||
- internal_port_id: internal_port_id
|
||||
- internal_ip_address: internal_ip_address-response
|
||||
- internal_port: internal_port
|
||||
- external_port: external_port
|
||||
- protocol: fip_port_forwarding_protocol-body
|
||||
|
||||
Response Example
|
||||
----------------
|
||||
|
||||
.. literalinclude:: samples/port_forwardings/port-fowarding-list-response.json
|
||||
:language: javascript
|
||||
|
||||
Create port forwarding
|
||||
======================
|
||||
|
||||
.. rest_method:: POST /v2.0/floatingips/{floatingip_id}/port_forwardings
|
||||
|
||||
Creates a floating IP port forwarding.
|
||||
|
||||
Normal response codes: 201
|
||||
|
||||
Error response codes: 400, 404
|
||||
|
||||
Request
|
||||
-------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- floatingip_id: floatingip-id-path
|
||||
- port_forwarding: fip_port_forwarding
|
||||
- internal_port_id: internal_port_id
|
||||
- internal_ip_address: internal_ip_address
|
||||
- internal_port: internal_port
|
||||
- external_port: external_port
|
||||
- protocol: fip_port_forwarding_protocol-body
|
||||
|
||||
Request Example
|
||||
---------------
|
||||
|
||||
.. literalinclude:: samples/port_forwardings/port-fowarding-create-request.json
|
||||
:language: javascript
|
||||
|
||||
Response Parameters
|
||||
-------------------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- port_forwarding: fip_port_forwarding
|
||||
- id: fip_port_forwarding_id-body
|
||||
- internal_port_id: internal_port_id
|
||||
- internal_ip_address: internal_ip_address-response
|
||||
- internal_port: internal_port
|
||||
- external_port: external_port
|
||||
- protocol: fip_port_forwarding_protocol-body
|
||||
|
||||
Response Example
|
||||
----------------
|
||||
|
||||
.. literalinclude:: samples/port_forwardings/port-fowarding-create-response.json
|
||||
:language: javascript
|
@ -26,6 +26,7 @@ Layer 3 Networking
|
||||
##################
|
||||
.. include:: address-scopes.inc
|
||||
.. include:: floatingips.inc
|
||||
.. include:: fip-port-forwarding.inc
|
||||
.. include:: routers.inc
|
||||
.. include:: subnetpools.inc
|
||||
.. include:: subnets.inc
|
||||
|
@ -61,6 +61,12 @@ extensions-alias-path:
|
||||
in: path
|
||||
required: true
|
||||
type: string
|
||||
fip_port_forwarding_id-path:
|
||||
description: |
|
||||
The ID of the floating IP port forwarding.
|
||||
in: path
|
||||
required: true
|
||||
type: string
|
||||
firewall_group_id-path-required:
|
||||
description: |
|
||||
The ID of the firewall group.
|
||||
@ -447,6 +453,13 @@ excluded-query:
|
||||
in: query
|
||||
required: false
|
||||
type: boolean
|
||||
external_port-query:
|
||||
description: |
|
||||
Filter the list result by the TCP/UDP/other protocol port number of the
|
||||
floating IP.
|
||||
in: query
|
||||
required: false
|
||||
type: integer
|
||||
fields:
|
||||
description: |
|
||||
The fields that you want the server to return.
|
||||
@ -459,6 +472,25 @@ fields:
|
||||
in: query
|
||||
required: false
|
||||
type: string
|
||||
fip_port_forwarding-sort_key:
|
||||
description: |
|
||||
Sorts by a floating IP port forwarding attribute. You can specify multiple
|
||||
pairs of sort key and sort direction query parameters. The sort keys are
|
||||
limited to:
|
||||
|
||||
- ``id``
|
||||
- ``internal_port_id``
|
||||
- ``external_port``
|
||||
- ``protocol``
|
||||
in: query
|
||||
required: false
|
||||
type: string
|
||||
fip_port_forwarding_protocol-query:
|
||||
description: |
|
||||
Filter the list result by the used protocol.
|
||||
in: query
|
||||
required: false
|
||||
type: string
|
||||
fixed_ips-query:
|
||||
description: |
|
||||
Filter the port list result by the IP addresses for the port.
|
||||
@ -565,6 +597,12 @@ id-query:
|
||||
in: query
|
||||
required: false
|
||||
type: string
|
||||
internal_port_id-query:
|
||||
description: |
|
||||
Filter the list result by the ID of the internal Neutron port.
|
||||
in: query
|
||||
required: false
|
||||
type: string
|
||||
ip_allocation-query:
|
||||
description: |
|
||||
Filter the port list result based on if the ports use ``deferred``,
|
||||
@ -2346,6 +2384,20 @@ extensions:
|
||||
in: body
|
||||
required: true
|
||||
type: array
|
||||
external_port:
|
||||
description: |
|
||||
The TCP/UDP/other protocol port number of the port forwarding's floating IP
|
||||
address.
|
||||
in: body
|
||||
required: true
|
||||
type: integer
|
||||
external_port-update:
|
||||
description: |
|
||||
The TCP/UDP/other protocol port number of the port forwarding's floating IP
|
||||
address.
|
||||
in: body
|
||||
required: false
|
||||
type: integer
|
||||
external_v4_ip:
|
||||
description: |
|
||||
Read-only external (public) IPv4 address that is
|
||||
@ -2376,6 +2428,36 @@ extra_dhcp_opts-request:
|
||||
in: body
|
||||
required: false
|
||||
type: array
|
||||
fip_port_forwarding:
|
||||
description: |
|
||||
A ``floating IP port forwarding`` object.
|
||||
in: body
|
||||
required: true
|
||||
type: object
|
||||
fip_port_forwarding_id-body:
|
||||
description: |
|
||||
The ID of the floating IP port forwarding.
|
||||
in: body
|
||||
required: true
|
||||
type: string
|
||||
fip_port_forwarding_protocol-body:
|
||||
description: |
|
||||
The IP protocol used in the floating IP port forwarding.
|
||||
in: body
|
||||
required: true
|
||||
type: string
|
||||
fip_port_forwarding_protocol-update:
|
||||
description: |
|
||||
The IP protocol used in the floating IP port forwarding.
|
||||
in: body
|
||||
required: false
|
||||
type: string
|
||||
fip_port_forwardings:
|
||||
description: |
|
||||
A list of ``floating IP port forwardings`` objects.
|
||||
in: body
|
||||
required: true
|
||||
type: array
|
||||
firewall:
|
||||
description: |
|
||||
A ``firewall`` object.
|
||||
@ -3253,6 +3335,47 @@ interfaces:
|
||||
in: body
|
||||
required: true
|
||||
type: string
|
||||
internal_ip_address:
|
||||
description: |
|
||||
The fixed IPv4 address of the Neutron port associated to the floating IP
|
||||
port forwarding. If it is not specified, the first IPv4 address found by
|
||||
the port forwardings plug-in will be used.
|
||||
in: body
|
||||
required: false
|
||||
type: string
|
||||
internal_ip_address-response:
|
||||
description: |
|
||||
The fixed IPv4 address of the Neutron port associated to the floating IP
|
||||
port forwarding.
|
||||
in: body
|
||||
required: true
|
||||
type: string
|
||||
internal_port:
|
||||
description: |
|
||||
The TCP/UDP/other protocol port number of the Neutron port fixed IP
|
||||
address associated to the floating ip port forwarding.
|
||||
in: body
|
||||
required: true
|
||||
type: integer
|
||||
internal_port-update:
|
||||
description: |
|
||||
The TCP/UDP/other protocol port number of the Neutron port fixed IP
|
||||
address associated to the floating ip port forwarding.
|
||||
in: body
|
||||
required: false
|
||||
type: integer
|
||||
internal_port_id:
|
||||
description: |
|
||||
The ID of the Neutron port associated to the floating IP port forwarding.
|
||||
in: body
|
||||
required: true
|
||||
type: string
|
||||
internal_port_id-update:
|
||||
description: |
|
||||
The ID of the Neutron port associated to the floating IP port forwarding.
|
||||
in: body
|
||||
required: false
|
||||
type: string
|
||||
interval:
|
||||
description: |
|
||||
The dead peer detection (DPD) interval, in
|
||||
|
@ -0,0 +1,9 @@
|
||||
{
|
||||
"port_forwarding": {
|
||||
"protocol": "tcp",
|
||||
"internal_ip_address": "10.0.0.11",
|
||||
"internal_port": 25,
|
||||
"internal_port_id": "1238be08-a2a8-4b8d-addf-fb5e2250e480",
|
||||
"external_port": 2230
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
{
|
||||
"port_forwarding": {
|
||||
"protocol": "tcp",
|
||||
"internal_ip_address": "10.0.0.11",
|
||||
"internal_port": 25,
|
||||
"internal_port_id": "1238be08-a2a8-4b8d-addf-fb5e2250e480",
|
||||
"external_port": 2230,
|
||||
"id": "725ade3c-9760-4880-8080-8fc2dbab9acc"
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
{
|
||||
"port_forwardings": [
|
||||
{
|
||||
"protocol": "tcp",
|
||||
"internal_ip_address": "10.0.0.24",
|
||||
"internal_port": 25,
|
||||
"internal_port_id": "070ef0b2-0175-4299-be5c-01fea8cca522",
|
||||
"external_port": 2229,
|
||||
"id": "1798dc82-c0ed-4b79-b12d-4c3c18f90eb2"
|
||||
},
|
||||
{
|
||||
"protocol": "tcp",
|
||||
"internal_ip_address": "10.0.0.11",
|
||||
"internal_port": 25,
|
||||
"internal_port_id": "1238be08-a2a8-4b8d-addf-fb5e2250e480",
|
||||
"external_port": 2230,
|
||||
"id": "e0a0274e-4d19-4eab-9e12-9e77a8caf3ea"
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
{
|
||||
"port_forwarding": {
|
||||
"protocol": "tcp",
|
||||
"internal_ip_address": "10.0.0.11",
|
||||
"internal_port": 25,
|
||||
"internal_port_id": "1238be08-a2a8-4b8d-addf-fb5e2250e480",
|
||||
"external_port": 2230,
|
||||
"id": "725ade3c-9760-4880-8080-8fc2dbab9acc"
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
{
|
||||
"port_forwarding": {
|
||||
"protocol": "udp",
|
||||
"internal_port": 37,
|
||||
"internal_port_id": "99889dc2-19a7-4edb-b9d0-d2ace8d1e144",
|
||||
"external_port": 1960
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
{
|
||||
"port_forwarding": {
|
||||
"protocol": "udp",
|
||||
"internal_ip_address": "10.0.0.14",
|
||||
"internal_port": 37,
|
||||
"internal_port_id": "99889dc2-19a7-4edb-b9d0-d2ace8d1e144",
|
||||
"external_port": 1960,
|
||||
"id": "725ade3c-9760-4880-8080-8fc2dbab9acc"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user