From 8e158fae899804e5e7fbfe42068e81c2e008941d 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. --- rax | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rax b/rax index fbc174aaecb..259f62a5a82 100644 --- a/rax +++ b/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 648fd28dce8063770b0faef5cbb036a91f3a1c89 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. --- rax | 1 - 1 file changed, 1 deletion(-) diff --git a/rax b/rax index 259f62a5a82..754b3751c46 100644 --- a/rax +++ b/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: