From d03bf3f50fded7584bbfe3f3aff80ac8d3c64e56 Mon Sep 17 00:00:00 2001 From: Caleb Boylan Date: Mon, 24 Aug 2015 13:35:59 -0700 Subject: [PATCH] Add a missing "not" in the Python libcloud tutorial. The point of the script is to create an instance, give it networking and deploy an app, if the project has an IP that is in use it will try to assign that IP to the instance and fail(silently) so the instance won't get an IP. Change-Id: I7b9ff513c4eac5e2830e57f12e09840159980e07 --- firstapp/samples/libcloud/getting_started.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firstapp/samples/libcloud/getting_started.py b/firstapp/samples/libcloud/getting_started.py index c2f5dc502..786ee56d6 100755 --- a/firstapp/samples/libcloud/getting_started.py +++ b/firstapp/samples/libcloud/getting_started.py @@ -119,7 +119,7 @@ for instance in conn.list_nodes(): print('Checking for unused Floating IP...') unused_floating_ip = None for floating_ip in conn.ex_list_floating_ips(): - if floating_ip.node_id: + if not floating_ip.node_id: unused_floating_ip = floating_ip break