From 670f59a458e32f986f40db8b2f03161ce1cb7ec3 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Sat, 27 Apr 2013 15:13:01 -0700 Subject: [PATCH 1/2] Make sure we compare flavor IDs as ints We were comparing an int to a string and getting things wrong, so idempotence was lost. This forces the comparison to be int. --- library/rax | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/rax b/library/rax index fbc174aaecb..259f62a5a82 100644 --- a/library/rax +++ b/library/rax @@ -124,7 +124,7 @@ def cloudservers(module, state, name, flavor, image, meta, key_name, files, for server in pyrax.cloudservers.list(): if name != server.name: continue - if flavor != server.flavor['id']: + if int(flavor) != int(server.flavor['id']): continue if image != server.image['id']: continue From 12e9a9c2e1edede5e92c3a20e9bf02860fe94bd1 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Sat, 27 Apr 2013 15:13:59 -0700 Subject: [PATCH 2/2] Remove errant debugging code This should have never made it in. --- library/rax | 1 - 1 file changed, 1 deletion(-) diff --git a/library/rax b/library/rax index 259f62a5a82..754b3751c46 100644 --- a/library/rax +++ b/library/rax @@ -246,7 +246,6 @@ def main(): module.fail_json(msg = 'Unable to load %s' % e.message) # setup the auth - sys.stderr.write('region is %s' % region) try: pyrax.set_credential_file(creds_file, region=region) except Exception, e: