mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-03-27 05:43:02 +00:00
Add deprecation notice to k8s_exec (#233)
Add deprecation notice to k8s_exec SUMMARY ISSUE TYPE Bugfix Pull Request COMPONENT NAME ADDITIONAL INFORMATION Reviewed-by: None <None> Reviewed-by: Mike Graves <mgraves@redhat.com> Reviewed-by: Alina Buzachis <None> Reviewed-by: None <None>
This commit is contained in:
3
changelogs/fragments/223-add-deprecation-notice.yaml
Normal file
3
changelogs/fragments/223-add-deprecation-notice.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
bugfixes:
|
||||
- k8s_exec - add missing deprecation notice to return_code for k8s_exec (https://github.com/ansible-collections/kubernetes.core/pull/233).
|
||||
@@ -31,7 +31,7 @@ requirements:
|
||||
- "PyYAML >= 3.11"
|
||||
|
||||
notes:
|
||||
- Return code C(rc) for the command executed is added in output in version 2.3.0, and depricates return code C(return_code).
|
||||
- Return code C(rc) for the command executed is added in output in version 2.2.0, and deprecates return code C(return_code).
|
||||
- Return code C(return_code) for the command executed is added in output in version 1.0.0.
|
||||
- The authenticated user must have at least read access to the pods resource and write access to the pods/exec resource.
|
||||
|
||||
@@ -110,7 +110,7 @@ result:
|
||||
type: int
|
||||
version_added: 2.3.0
|
||||
return_code:
|
||||
description: The command status code. This attribute is depricated and will remove in future release. Please use rc instead.
|
||||
description: The command status code. This attribute is deprecated and will be removed in a future release. Please use rc instead.
|
||||
type: int
|
||||
'''
|
||||
|
||||
@@ -183,6 +183,7 @@ def execute_module(module, k8s_ansible_mixin):
|
||||
else:
|
||||
rc = int(err['details']['causes'][0]['message'])
|
||||
|
||||
module.deprecate("The 'return_code' return key is deprecated. Please use 'rc' instead.", version="4.0.0", collection_name="kubernetes.core")
|
||||
module.exit_json(
|
||||
# Some command might change environment, but ultimately failing at end
|
||||
changed=True,
|
||||
|
||||
Reference in New Issue
Block a user