os_loadbalancer: support to create populated load balancer (#44619)

The user can use os_loadbalancer module to configure a fully functional
load balancer by specifying the sub-resources definition in the module,
rather than combining os_listener, os_pool and os_member modules.
This commit is contained in:
Lingxian Kong 2018-09-18 06:10:03 +12:00 committed by David Shrewsbury
commit cf1e0bde99
2 changed files with 466 additions and 118 deletions

View file

@ -213,8 +213,9 @@ def main():
if not pool:
loadbalancer_id = None
if not (loadbalancer or listener):
module.fail_json("either loadbalancer or listener must "
"be provided")
module.fail_json(
msg="either loadbalancer or listener must be provided"
)
if loadbalancer:
lb = cloud.load_balancer.find_load_balancer(loadbalancer)