Merge pull request #1943 from richbria/devel

Preventing servers that are deleted and left in the deleted state from being included in the server list
This commit is contained in:
Matt Martz 2015-08-20 12:34:31 -05:00
commit 51b800d1df

View file

@ -97,7 +97,9 @@ def rax_facts(module, address, name, server_id):
servers.append(cs.servers.get(server_id)) servers.append(cs.servers.get(server_id))
except Exception, e: except Exception, e:
pass pass
servers[:] = [server for server in servers if server.status != "DELETED"]
if len(servers) > 1: if len(servers) > 1:
module.fail_json(msg='Multiple servers found matching provided ' module.fail_json(msg='Multiple servers found matching provided '
'search parameters') 'search parameters')