osc compute server add-floating-ip21
Adds a floating IP address to a server, which associates that address with the server.
A pool of floating IP addresses, configured by the cloud administrator, is available in OpenStack Compute. The project quota defines the maximum number of floating IP addresses that you can allocate to the project. After you create (allocate) a floating IPaddress for a project, you can associate that address with the server. Specify the addFloatingIp
action in the request body.
If an instance is connected to multiple networks, you can associate a floating IP address with a specific fixed IP address by using the optional fixed_address
parameter.
Preconditions
The server must exist.
You can only add a floating IP address to the server when its status is ACTIVE
or STOPPED
Normal response codes: 202
Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404)
Usage: osc compute server add-floating-ip21 [OPTIONS] --address <ADDRESS> <ID>
Arguments:
<ID>
— id parameter for /v2.1/servers/{id}/action API
Options:
--address <ADDRESS>
— The fixed IP address with which you want to associate the floating IP address--fixed-address <FIXED_ADDRESS>
— The fixed IP address with which you want to associate the floating IP address