module.fail_json(msg='IP LoadBalancing {} does not exist'.format(name))
# Check that no task is pending before going on
try:
ifnotwaitForNoTask(client,name,timeout):
module.fail_json(msg='Timeout of {} seconds while waiting for no pending tasks before executing the module '.format(timeout))
exceptAPIErrorasapiError:
module.fail_json(msg='Unable to call OVH api for getting the list of pending tasks of the loadBalancing, check application key, secret, consumerkey and parameters. Error returned by OVH api was : {}'.format(apiError))
module.fail_json(msg='Unable to call OVH api for deleting the backend, check application key, secret, consumerkey and parameters. Error returned by OVH api was : {}'.format(apiError))
module.fail_json(msg='Unable to call OVH api for getting the backend properties, check application key, secret, consumerkey and parameters. Error returned by OVH api was : {}'.format(apiError))
if(backendProperties['weight']!=weight):
# Change weight
try:
@ -179,6 +183,7 @@ def main():
exceptAPIErrorasapiError:
module.fail_json(msg='Unable to call OVH api for updating the weight of the backend, check application key, secret, consumerkey and parameters. Error returned by OVH api was : {}'.format(apiError))
module.fail_json(msg='Unable to call OVH api for creating the backend, check application key, secret, consumerkey and parameters. Error returned by OVH api was : {}'.format(apiError))
ifnotwaitForNoTask(client,name,timeout):
module.fail_json(msg='Timeout of {} seconds while waiting for completion of backend creation task'.format(timeout))