From ab0959480ec93be2490b1f7d277ad7da32841bef Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Tue, 3 Dec 2024 08:17:44 +1300 Subject: [PATCH] redfish_utils module utils: remove redundant code (#9190) deprecate method instead --- changelogs/fragments/9190-redfish-utils-unused-code.yml | 4 ++++ plugins/module_utils/redfish_utils.py | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/9190-redfish-utils-unused-code.yml diff --git a/changelogs/fragments/9190-redfish-utils-unused-code.yml b/changelogs/fragments/9190-redfish-utils-unused-code.yml new file mode 100644 index 0000000000..47f7588b96 --- /dev/null +++ b/changelogs/fragments/9190-redfish-utils-unused-code.yml @@ -0,0 +1,4 @@ +minor_changes: + - redfish_utils module utils - remove redundant code (https://github.com/ansible-collections/community.general/pull/9190). +deprecated_features: + - redfish_utils module utils - deprecate method ``RedfishUtils._init_session()`` (https://github.com/ansible-collections/community.general/pull/9190). diff --git a/plugins/module_utils/redfish_utils.py b/plugins/module_utils/redfish_utils.py index 388fc93669..dd559921ae 100644 --- a/plugins/module_utils/redfish_utils.py +++ b/plugins/module_utils/redfish_utils.py @@ -55,7 +55,6 @@ class RedfishUtils(object): self.strip_etag_quotes = strip_etag_quotes self.ciphers = ciphers self._vendor = None - self._init_session() def _auth_params(self, headers): """ @@ -411,7 +410,7 @@ class RedfishUtils(object): return msg, data def _init_session(self): - pass + self.module.deprecate("Method _init_session is deprecated and will be removed.", version="11.0.0", collection_name="community.general") def _get_vendor(self): # If we got the vendor info once, don't get it again