osc network floating-ip create
Creates a floating IP, and, if you specify port information, associates the floating IP with an internal port.
To associate the floating IP with an internal port, specify the port ID attribute in the request body. If you do not specify a port ID in the request, you can issue a PUT request instead of a POST request.
Default policy settings enable only administrative users to set floating IP addresses and some non-administrative users might require a floating IP address. If you do not specify a floating IP address in the request, the operation automatically allocates one.
By default, this operation associates the floating IP address with a single fixed IP address that is configured on an OpenStack Networking port. If a port has multiple IP addresses, you must specify the fixed_ip_address
attribute in the request body to associate a fixed IP address with the floating IP address.
You can create floating IPs on only external networks. When you create a floating IP, you must specify the ID of the network on which you want to create the floating IP. Alternatively, you can create a floating IP on a subnet in the external network, based on the costs and quality of that subnet.
You must configure an IP address with the internal OpenStack Networking port that is associated with the floating IP address.
The operation returns the Bad Request (400)
response code for one of reasons:
If the port ID is not valid, this operation returns 404
response code.
The operation returns the Conflict (409)
response code for one of reasons:
Normal response codes: 201
Error response codes: 400, 401, 404, 409
Usage: osc network floating-ip create [OPTIONS] --floating-network-id <FLOATING_NETWORK_ID>
Options:
--description <DESCRIPTION>
— A human-readable description for the resource. Default is an empty string--dns-domain <DNS_DOMAIN>
— A valid DNS domain--dns-name <DNS_NAME>
— A valid DNS name--fixed-ip-address <FIXED_IP_ADDRESS>
— The fixed IP address that is associated with the floating IP. If an internal port has multiple associated IP addresses, the service chooses the first IP address unless you explicitly define a fixed IP address in thefixed_ip_address
parameter--floating-ip-address <FLOATING_IP_ADDRESS>
— The floating IP address--floating-network-id <FLOATING_NETWORK_ID>
— The ID of the network associated with the floating IP--port-id <PORT_ID>
— The ID of a port associated with the floating IP. To associate the floating IP with a fixed IP at creation time, you must specify the identifier of the internal port--qos-policy-id <QOS_POLICY_ID>
— The ID of the QoS policy associated with the floating IP--subnet-id <SUBNET_ID>
— The subnet ID on which you want to create the floating IP--tenant-id <TENANT_ID>
— The ID of the project