AWS: make jittered_backoff API parameter configurable (#49086)

* AWS: make jittered_backoff API parameter configurable
* Review comments
* minor doc changes

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
Abhijeet Kasurde
2018-12-16 11:07:59 +05:30
committed by GitHub
parent 162d9497ba
commit 1558f77081
2 changed files with 38 additions and 2 deletions

View File

@@ -45,7 +45,7 @@ are included. If you do find an issue, please raise a bug report.
When porting, keep in mind that AnsibleAWSModule also will add the default ec2
argument spec by default. In pre-port modules, you should see common arguments
specfied with:
specified with:
```
def main():
@@ -416,6 +416,13 @@ describe_instances(module.client('ec2'), InstanceIds=['i-123456789'])
The call will be retried the specified number of times, so the calling functions
don't need to be wrapped in the backoff decorator.
You can also use customization for `retries`, `delay` and `max_delay` parameters used by
`AWSRetry.jittered_backoff` API using module params. You can take a look into
[cloudformation](/lib/ansible/modules/cloud/amazon/cloudformation.py) module for example.
To make all Amazon modules uniform, prefix the module param with `backoff_`, so `retries` becomes `backoff_retries`
and likewise with `backoff_delay` and `backoff_max_delay`.
### Returning Values
When you make a call using boto3, you will probably get back some useful information that you