Commit 670f59a4 by Jesse Keating

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.
parent 1f969251
...@@ -124,7 +124,7 @@ def cloudservers(module, state, name, flavor, image, meta, key_name, files, ...@@ -124,7 +124,7 @@ def cloudservers(module, state, name, flavor, image, meta, key_name, files,
for server in pyrax.cloudservers.list(): for server in pyrax.cloudservers.list():
if name != server.name: if name != server.name:
continue continue
if flavor != server.flavor['id']: if int(flavor) != int(server.flavor['id']):
continue continue
if image != server.image['id']: if image != server.image['id']:
continue continue
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment