From 1f6aa62210cdc9f1ba30e579293ad27999889b5f Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Sun, 20 Jun 2021 12:14:37 +0000 Subject: [PATCH] serverless - deprecating unused param (#2845) (#2847) * deprecating unused param * added changelog fragment * deprecate param in arg_spec * Update plugins/modules/cloud/misc/serverless.py Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein (cherry picked from commit 2768eda89573e8ec82ddc046f9d754bc131dfa3e) Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> --- .../2845-serverless-deprecate-functions-param.yml | 2 ++ plugins/modules/cloud/misc/serverless.py | 11 +++-------- 2 files changed, 5 insertions(+), 8 deletions(-) create mode 100644 changelogs/fragments/2845-serverless-deprecate-functions-param.yml diff --git a/changelogs/fragments/2845-serverless-deprecate-functions-param.yml b/changelogs/fragments/2845-serverless-deprecate-functions-param.yml new file mode 100644 index 0000000000..6565b18974 --- /dev/null +++ b/changelogs/fragments/2845-serverless-deprecate-functions-param.yml @@ -0,0 +1,2 @@ +deprecated_features: + - serverless - deprecating parameter ``functions`` because it was not used in the code (https://github.com/ansible-collections/community.general/pull/2845). diff --git a/plugins/modules/cloud/misc/serverless.py b/plugins/modules/cloud/misc/serverless.py index 1b2f8b62a6..878621c38c 100644 --- a/plugins/modules/cloud/misc/serverless.py +++ b/plugins/modules/cloud/misc/serverless.py @@ -38,6 +38,7 @@ options: description: - A list of specific functions to deploy. - If this is not provided, all functions in the service will be deployed. + - Deprecated parameter, it will be removed in community.general 5.0.0. type: list elements: str default: [] @@ -79,13 +80,6 @@ EXAMPLES = r''' service_path: '{{ project_dir }}' state: present -- name: Deploy specific functions - community.general.serverless: - service_path: '{{ project_dir }}' - functions: - - my_func_one - - my_func_two - - name: Deploy a project, then pull its resource list back into Ansible community.general.serverless: stage: dev @@ -165,7 +159,8 @@ def main(): argument_spec=dict( service_path=dict(type='path', required=True), state=dict(type='str', default='present', choices=['absent', 'present']), - functions=dict(type='list', elements='str'), + functions=dict(type='list', elements='str', + removed_in_version="5.0.0", removed_from_collection="community.general"), region=dict(type='str', default=''), stage=dict(type='str', default=''), deploy=dict(type='bool', default=True),