From 4c080f649b349a91baa04f0d9c102171e3274395 Mon Sep 17 00:00:00 2001 From: Sloane Hertel Date: Tue, 11 Sep 2018 17:34:35 -0400 Subject: [PATCH] [aws] cloudfront_distribution - fix method name, backport/2.7/45498 (#45512) * [AWS] cloudfront_distribution - fix method name from 'validate_distribution_id_from_caller_reference' to 'validate_distribution_from_caller_reference' and set distribution_id to the distribution's key 'Id' (#45498) (cherry picked from commit e5269c047cc811f8f51d4c152098dd9f5066109a) * changelog --- ..._cloudfront_distribution_fix_nonexistent_method_name.yaml | 5 +++++ lib/ansible/modules/cloud/amazon/cloudfront_distribution.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/aws_cloudfront_distribution_fix_nonexistent_method_name.yaml diff --git a/changelogs/fragments/aws_cloudfront_distribution_fix_nonexistent_method_name.yaml b/changelogs/fragments/aws_cloudfront_distribution_fix_nonexistent_method_name.yaml new file mode 100644 index 0000000000..5423445e8d --- /dev/null +++ b/changelogs/fragments/aws_cloudfront_distribution_fix_nonexistent_method_name.yaml @@ -0,0 +1,5 @@ +--- +bugfixes: + - cloudfront_distribution - replace call to nonexistent method 'validate_distribution_id_from_caller_reference' + with 'validate_distribution_from_caller_reference' and set the distribution_id variable to the distribution's + 'Id' key. diff --git a/lib/ansible/modules/cloud/amazon/cloudfront_distribution.py b/lib/ansible/modules/cloud/amazon/cloudfront_distribution.py index 449d1a556c..63145bede2 100644 --- a/lib/ansible/modules/cloud/amazon/cloudfront_distribution.py +++ b/lib/ansible/modules/cloud/amazon/cloudfront_distribution.py @@ -1813,7 +1813,7 @@ class CloudFrontValidationManager(object): def wait_until_processed(self, client, wait_timeout, distribution_id, caller_reference): if distribution_id is None: - distribution_id = self.validate_distribution_id_from_caller_reference(caller_reference=caller_reference) + distribution_id = self.validate_distribution_from_caller_reference(caller_reference=caller_reference)['Id'] try: waiter = client.get_waiter('distribution_deployed')