Commit 047dffdd by Matt Martz

Fix rax_find_loadbalancer issues

* Loadbalancer IDs are not UUIDs
* Ensure found list exists before using it
parent 200ecbc3
...@@ -173,9 +173,9 @@ def rax_find_server(module, rax_module, server): ...@@ -173,9 +173,9 @@ def rax_find_server(module, rax_module, server):
def rax_find_loadbalancer(module, rax_module, loadbalancer): def rax_find_loadbalancer(module, rax_module, loadbalancer):
clb = rax_module.cloud_loadbalancers clb = rax_module.cloud_loadbalancers
try: try:
UUID(loadbalancer)
found = clb.get(loadbalancer) found = clb.get(loadbalancer)
except: except:
found = []
for lb in clb.list(): for lb in clb.list():
if loadbalancer == lb.name: if loadbalancer == lb.name:
found.append(lb) found.append(lb)
......
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