From b6c067268535329efd7933449a694b34cfbbf5a9 Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Wed, 19 May 2021 19:22:29 +0200 Subject: [PATCH] Core parameter sanity test cleanup (breaking change) (#290) Core parameter sanity test cleanup (breaking change) Reviewed-by: https://github.com/apps/ansible-zuul --- changelogs/fragments/290-lint-cleanup.yml | 2 ++ plugins/module_utils/core.py | 4 ++-- tests/sanity/ignore-2.11.txt | 1 - tests/sanity/ignore-2.12.txt | 1 - 4 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 changelogs/fragments/290-lint-cleanup.yml diff --git a/changelogs/fragments/290-lint-cleanup.yml b/changelogs/fragments/290-lint-cleanup.yml new file mode 100644 index 00000000000..36ab84b6df3 --- /dev/null +++ b/changelogs/fragments/290-lint-cleanup.yml @@ -0,0 +1,2 @@ +breaking_changes: +- module_utils.core - The boto3 switch has been removed from the region parameter (https://github.com/ansible-collections/amazon.aws/pull/287). diff --git a/plugins/module_utils/core.py b/plugins/module_utils/core.py index 44855fdf3af..35fc24df98b 100644 --- a/plugins/module_utils/core.py +++ b/plugins/module_utils/core.py @@ -190,8 +190,8 @@ def resource(self, service): region=region, endpoint=ec2_url, **aws_connect_kwargs) @property - def region(self, boto3=True): - return get_aws_region(self, boto3) + def region(self): + return get_aws_region(self, True) def fail_json_aws(self, exception, msg=None, **kwargs): """call fail_json with processed exception diff --git a/tests/sanity/ignore-2.11.txt b/tests/sanity/ignore-2.11.txt index 82cef71c1ff..31a4d4c9c6d 100644 --- a/tests/sanity/ignore-2.11.txt +++ b/tests/sanity/ignore-2.11.txt @@ -2,4 +2,3 @@ plugins/modules/ec2_tag.py validate-modules:parameter-state-invalid-choice # De plugins/modules/ec2_vol.py validate-modules:parameter-state-invalid-choice # Deprecated choice that can't be removed until 2022 plugins/module_utils/compat/_ipaddress.py no-assert # Vendored library plugins/module_utils/compat/_ipaddress.py no-unicode-literals # Vendored library -plugins/module_utils/core.py pylint:property-with-parameters # Breaking change required to fix - https://github.com/ansible-collections/amazon.aws/pull/290 diff --git a/tests/sanity/ignore-2.12.txt b/tests/sanity/ignore-2.12.txt index 82cef71c1ff..31a4d4c9c6d 100644 --- a/tests/sanity/ignore-2.12.txt +++ b/tests/sanity/ignore-2.12.txt @@ -2,4 +2,3 @@ plugins/modules/ec2_tag.py validate-modules:parameter-state-invalid-choice # De plugins/modules/ec2_vol.py validate-modules:parameter-state-invalid-choice # Deprecated choice that can't be removed until 2022 plugins/module_utils/compat/_ipaddress.py no-assert # Vendored library plugins/module_utils/compat/_ipaddress.py no-unicode-literals # Vendored library -plugins/module_utils/core.py pylint:property-with-parameters # Breaking change required to fix - https://github.com/ansible-collections/amazon.aws/pull/290