• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Neutron
  5. Floating IP
  6. Create floating IP

Create floating IP

Function Description

This interface is used to create a floating IP address.

Interface Format

Method

URI

Description

POST

/v2.0/floatingips

Creates a floating IP address and associates it with an internal port.

Restrictions

You need to obtain the UUID of the external network using the floating IP address. You can run the GET /v2.0/networks?router:external=True or neutron net-external-list command to obtain the UUID.

Request Parameter

Parameter

Type

Mandatory

Description

floatingip

Dict

Yes

Specifies the floating IP address. For details, see Table 1.

Mandatory field: floating_network_id

Response Parameter

Parameter

Type

Mandatory

Description

floatingip

Dict

Yes

Specifies the floating IP address. For details, see Table 1.

Request Example

POST  /v2.0/floatingips
{
    "floatingip": {
        "floating_network_id": "5ce655fa-c911-4d2c-99f7-445bc1162ef8",
        "port_id": "552389f5-8f4c-4bb7-9991-07233c315d60"
    }
}

Response Example

{
    "floatingip": {
"router_id": "76c052d6-6a92-444c-b67d-147ee166a480",
    "status": "DOWN",
    "tenant_id": "6fd9b5fdb997425f97bc5ba1f0846084",
    "floating_network_id": "5ce655fa-c911-4d2c-99f7-445bc1162ef8",
    "fixed_ip_address": "12.14.56.5",
    "floating_ip_address": "100.64.0.30",
    "port_id": "552389f5-8f4c-4bb7-9991-07233c315d60",
    "id": "2567f393-5c76-42db-a397-477723ce41f7"
    }
}

Error Code

See section Return Code Processing.