Merge pull request #5690 from sivel/rax-regex-fix

rax module: Fix regex match
reviewable/pr18780/r1
jctanner 11 years ago
commit d74a184bad

@ -464,7 +464,7 @@ def cloudservers(module, state, name, flavor, image, meta, key_name, files,
else: else:
module.fail_json(msg=e.message) module.fail_json(msg=e.message)
pattern = re.sub(r'%\d+[sd]', r'(\d+)', name) pattern = re.sub(r'%\d*[sd]', r'(\d+)', name)
for server in cs.servers.list(): for server in cs.servers.list():
if server.metadata.get('group') == group: if server.metadata.get('group') == group:
servers.append(server) servers.append(server)
@ -525,7 +525,7 @@ def cloudservers(module, state, name, flavor, image, meta, key_name, files,
else: else:
module.fail_json(msg=e.message) module.fail_json(msg=e.message)
pattern = re.sub(r'%\d+[sd]', r'(\d+)', name) pattern = re.sub(r'%\d*[sd]', r'(\d+)', name)
for server in cs.servers.list(): for server in cs.servers.list():
if server.metadata.get('group') == group: if server.metadata.get('group') == group:
servers.append(server) servers.append(server)

Loading…
Cancel
Save