You can check the command nova floating-ip-associate
or if you are using Neutron, try the following:
Select a floating IP address for the new VM instance to use.
Use the neutron floatingip-list
command to display floating IP addresses for the tenant you chose in Step 1. If necessary, use the neutron floatingip-create
command to create a floating IP address for this tenant. Note the ID of the floating IP address.
Associate the floating IP address with the new VM instance.
Use the neutron floatingip-associate
command to associate the floating IP address from Step 6 with the new VM instance.
http://docs.oracle.com/cd/E36784_01/html/E54155/clicreatevm.html
You can check Openstack docs, it explained there just share with the exact command line. But be careful when associate by command line by practice I find its better to de associate by command line.