Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PR #1258/9a6f6515 backport][stable-3] Bump various deprecations from 4.0.0 to 5.0.0 #1259

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelogs/fragments/1257-deprecations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
minor_changes:
- iam_server_certificate - the deprecations for ``cert_chain``, ``cert``, ``key`` and ``dup_ok`` have been extended from release 4.0.0 to release 5.0.0 (https://github.com/ansible-collections/community.aws/pull/1256).
- iam_server_certificate - the deprecation for the ``iam_cert`` alias has been extended from release 4.0.0 to release 5.0.0 (https://github.com/ansible-collections/community.aws/pull/1257).
- rds_instance_snapshot - the deprecation for the ``rds_snapshot`` alias has been extended from release 4.0.0 to release 5.0.0 (https://github.com/ansible-collections/community.aws/pull/1257).
4 changes: 2 additions & 2 deletions meta/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,14 +215,14 @@ plugin_routing:
iam_cert:
redirect: community.aws.iam_server_certificate
deprecation:
removal_version: 4.0.0
removal_version: 5.0.0
warning_text: >-
iam_cert has been renamed to iam_server_certificate for consistency.
Please update your tasks.
rds_snapshot:
redirect: community.aws.rds_instance_snapshot
deprecation:
removal_version: 4.0.0
removal_version: 5.0.0
warning_text: >-
rds_snapshot has been renamed to rds_instance_snapshot.
Please update your tasks.
16 changes: 8 additions & 8 deletions plugins/modules/iam_server_certificate.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,28 +58,28 @@
- The path to, or content of, the CA certificate chain in PEM encoded format.
- If the parameter is not a file, it is assumed to be content.
- Passing a file name is deprecated, and support will be dropped in
version 4.0.0 of this collection.
version 5.0.0 of this collection.
type: str
cert:
description:
- The path to, or content of the certificate body in PEM encoded format.
- If the parameter is not a file, it is assumed to be content.
- Passing a file name is deprecated, and support will be dropped in
version 4.0.0 of this collection.
version 5.0.0 of this collection.
type: str
key:
description:
- The path to, or content of the private key in PEM encoded format.
If the parameter is not a file, it is assumed to be content.
- Passing a file name is deprecated, and support will be dropped in
version 4.0.0 of this collection.
version 5.0.0 of this collection.
type: str
dup_ok:
description:
- By default the module will not upload a certificate that is already uploaded into AWS.
- If I(dup_ok=True), it will upload the certificate as long as the name is unique.
- Currently defaults to C(false), this will default to C(true) in release
4.0.0.
5.0.0.
type: bool

author: Jonathan I. Davila (@defionscode)
Expand Down Expand Up @@ -323,21 +323,21 @@ def load_data():
module.deprecate(
'Passing a file name as the cert argument has been deprecated. '
'Please use a lookup instead, see the documentation for examples.',
version='4.0.0', collection_name='community.aws')
version='5.0.0', collection_name='community.aws')
if key and os.path.isfile(key):
with open(key, 'r') as key_fh:
key = key_fh.read().rstrip()
module.deprecate(
'Passing a file name as the key argument has been deprecated. '
'Please use a lookup instead, see the documentation for examples.',
version='4.0.0', collection_name='community.aws')
version='5.0.0', collection_name='community.aws')
if cert_chain and os.path.isfile(cert_chain):
with open(cert_chain, 'r') as cert_chain_fh:
cert_chain = cert_chain_fh.read()
module.deprecate(
'Passing a file name as the cert_chain argument has been deprecated. '
'Please use a lookup instead, see the documentation for examples.',
version='4.0.0', collection_name='community.aws')
version='5.0.0', collection_name='community.aws')
return cert, key, cert_chain


Expand Down Expand Up @@ -409,7 +409,7 @@ def main():
if dup_ok is None:
module.deprecate(
'The dup_ok module currently defaults to false, this will change in '
'release 4.0.0 to true.', version='4.0.0', collection_name='community.aws')
'release 5.0.0 to true.', version='5.0.0', collection_name='community.aws')

current_cert = get_server_certificate(name)

Expand Down