11.1. Listing floating IPs¶
GET /v2.0/floatingips
Lists floating IPs.
Source: https://docs.openstack.org/api-ref/network/v2/index.html#list-floating-ips
11.1.1. Request¶
Name | In | Type | Description |
---|---|---|---|
id (Optional) |
query | string | Filter the list result by the ID of the resource. |
router_id (Optional) |
query | string | Filter the floating IP list result by the ID of the router for the floating IP. |
status (Optional) |
query | string | Filter the floating IP list result by the status of the floating IP.
Values are ACTIVE , DOWN and ERROR . |
tenant_id (Optional) |
query | string | Filter the list result by the ID of the project that owns the resource. |
project_id (Optional) |
query | string | Filter the list result by the ID of the project that owns the resource. |
revision_number (Optional) |
query | integer | Filter the list result by the revision number of the resource. |
description (Optional) |
query | string | Filter the list result by the human-readable description of the resource. |
floating_network_id (Optional) |
query | string | Filter the floating IP list result by the ID of the network associated with the floating IP. |
fixed_ip_address (Optional) |
query | string | Filter the floating IP list result by the fixed IP address that is associated with the floating IP address. |
floating_ip_address (Optional) |
query | string | Filter the floating IP list result by the floating IP address. |
port_id (Optional) |
query | string | Filter the floating IP list result by the ID of a port associated with the floating IP. |
sort_dir (Optional) |
query | string | Sort direction. A valid value is asc (ascending) or desc
(descending). You can specify multiple pairs of sort key and
sort direction query parameters. |
sort_key (Optional) |
query | string | Sorts by a floatingip attribute. You can specify multiple pairs of sort key and sort direction query parameters. The sort keys are limited to:
|
tags (Optional) |
query | string | A list of tags to filter the list result by. Resources that match all tags in this list will be returned. Tags in query must be separated by comma. |
tags-any (Optional) |
query | string | A list of tags to filter the list result by. Resources that match any tag in this list will be returned. Tags in query must be separated by comma. |
not-tags (Optional) |
query | string | A list of tags to filter the list result by. Resources that match all tags in this list will be excluded. Tags in query must be separated by comma. |
not-tags-any (Optional) |
query | string | A list of tags to filter the list result by. Resources that match any tag in this list will be excluded. Tags in query must be separated by comma. |
fields (Optional) |
query | string | The fields that you want the server to return.
If no fields query parameter is specified,
the networking API returns all attributes allowed by the policy settings.
By using fields parameter, the API returns only the requested set of
attributes. fields parameter can be specified multiple times.
For example, if you specify fields=id&fields=name in the request URL,
only id and name attributes will be returned. |
11.1.1.1. Example¶
# curl -ks -H 'Content-Type: application/json' -H 'X-Auth-Token: gAAAAA<...>' \
https://<node_IP_addr>:9696/v2.0/floatingips
11.1.2. Response¶
Name | In | Type | Description |
---|---|---|---|
floatingips |
body | array | A list of floatingip objects. |
id |
body | string | The ID of the floating IP address. |
router_id |
body | string | The ID of the router for the floating IP. |
status |
body | string | The status of the floating IP. Values are
ACTIVE , DOWN and ERROR . |
tenant_id |
body | string | The ID of the project. |
project_id |
body | string | The ID of the project. |
created_at |
body | string | Time at which the resource has been created (in UTC ISO8601 format). |
updated_at |
body | string | Time at which the resource has been updated (in UTC ISO8601 format). |
revision_number |
body | integer | The revision number of the resource. |
description |
body | string | A human-readable description for the resource. |
dns_domain |
body | string | A valid DNS domain. |
dns_name |
body | string | A valid DNS name. |
port_details |
body | string | The information of the port that this floating IP associates with.
In particular, if the floating IP is associated with a port, this field
contains some attributes of the associated port, including name ,
network_id , mac_address , admin_state_up , status ,
device_id and device_owner . If the floating IP is not associated
with a port, this field is null . |
floating_network_id |
body | string | The ID of the network associated with the floating IP. |
fixed_ip_address |
body | string | The fixed IP address that is associated with the floating IP address. |
floating_ip_address |
body | string | The floating IP address. |
port_id |
body | string | The ID of a port associated with the floating IP. |
tags |
body | array | The list of tags on the resource. |
port_forwardings |
body | array | The associated port forwarding resources for the floating IP. If the
floating IP has multiple port forwarding resources, this field has
multiple entries. Each entry consists of network IP protocol
(protocol ), the fixed IP address of internal neutron port
(internal_ip_address ), the TCP or UDP port used by internal
neutron port (internal_port ) and the TCP or UDP port used by
floating IP (external_port ). |
11.1.2.1. Status codes¶
11.1.2.1.1. Success¶
Code | Reason |
---|---|
200 - OK |
Request was successful. |
11.1.2.1.2. Error¶
Code | Reason |
---|---|
401 - Unauthorized |
User must authenticate before making a request. |
11.1.2.2. Example¶
{
"floatingips": [
{
"router_id": "02542148-44cb-470d-a551-58f370c47b83",
"status": "ACTIVE",
"description": "",
"tags": [],
"tenant_id": "f5d834d636c642c7bfe8af86139c6f26",
"created_at": "2020-03-04T16:37:27Z",
"updated_at": "2020-03-04T16:37:32Z",
"floating_network_id": "b4907761-8c0f-447e-9cfe-c688ca6e44a0",
"port_details": {
"status": "ACTIVE",
"name": "",
"admin_state_up": true,
"network_id": "c4e2f31b-fe3b-402b-ac1b-b182693f72f7",
"device_owner": "compute:nova",
"mac_address": "fa:16:3e:66:ab:b3",
"device_id": "e1ae6f7e-c35d-4656-a4fd-2371f9a791d4"
},
"fixed_ip_address": "192.168.0.112",
"floating_ip_address": "10.94.139.170",
"revision_number": 1,
"project_id": "f5d834d636c642c7bfe8af86139c6f26",
"port_id": "165d5ff3-d015-4361-9bce-d59054c585cf",
"id": "239fe333-b801-4096-a04f-20f33f6177c3"
}
]
}
Version 5.0.0 — Feb 01, 2022