From b9fe8166fdcd24691ceac8503ee37ec826c18c00 Mon Sep 17 00:00:00 2001 From: "Timothy R. Chavez" Date: Wed, 9 Dec 2015 19:11:10 -0600 Subject: [PATCH] Get new server object after adding floating IP We need a new server object once we add the floating ip, otherwise we will be operating with the older server object pre-floating-ip assignment. --- cloud/openstack/os_floating_ip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloud/openstack/os_floating_ip.py b/cloud/openstack/os_floating_ip.py index 957e3057375..b6342f8fa01 100644 --- a/cloud/openstack/os_floating_ip.py +++ b/cloud/openstack/os_floating_ip.py @@ -154,7 +154,7 @@ def main(): msg="server {0} not found".format(server_name_or_id)) if state == 'present': - cloud.add_ips_to_server( + server = cloud.add_ips_to_server( server=server, ips=floating_ip_address, reuse=reuse, fixed_address=fixed_address, wait=wait, timeout=timeout) fip_address = cloud.get_server_public_ip(server)