From b6ccac372c43e23dfc54f30b0351b91c7ada7c76 Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Sat, 19 Feb 2022 08:21:01 +0100 Subject: [PATCH] Fix some more instances of ansible.module_utils._text. (#4232) (#4233) (cherry picked from commit a262a30122635413fea7aca828f358c22717b133) Co-authored-by: Felix Fontein --- changelogs/fragments/4232-text-converter-import.yml | 2 ++ plugins/inventory/opennebula.py | 2 +- plugins/modules/remote_management/redfish/ilo_redfish_config.py | 2 +- plugins/modules/remote_management/redfish/ilo_redfish_info.py | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 changelogs/fragments/4232-text-converter-import.yml diff --git a/changelogs/fragments/4232-text-converter-import.yml b/changelogs/fragments/4232-text-converter-import.yml new file mode 100644 index 0000000000..cd78c2627f --- /dev/null +++ b/changelogs/fragments/4232-text-converter-import.yml @@ -0,0 +1,2 @@ +minor_changes: + - "Avoid internal ansible-core module_utils in favor of equivalent public API available since at least Ansible 2.9. This fixes some instances added since the last time this was fixed (https://github.com/ansible-collections/community.general/pull/4232)." diff --git a/plugins/inventory/opennebula.py b/plugins/inventory/opennebula.py index 921dd96525..d967e13f7a 100644 --- a/plugins/inventory/opennebula.py +++ b/plugins/inventory/opennebula.py @@ -95,7 +95,7 @@ except ImportError: from ansible.errors import AnsibleError from ansible.plugins.inventory import BaseInventoryPlugin, Constructable -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native from collections import namedtuple import os diff --git a/plugins/modules/remote_management/redfish/ilo_redfish_config.py b/plugins/modules/remote_management/redfish/ilo_redfish_config.py index 79a7a78584..4640688407 100644 --- a/plugins/modules/remote_management/redfish/ilo_redfish_config.py +++ b/plugins/modules/remote_management/redfish/ilo_redfish_config.py @@ -98,7 +98,7 @@ CATEGORY_COMMANDS_ALL = { from ansible_collections.community.general.plugins.module_utils.ilo_redfish_utils import iLORedfishUtils from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native def main(): diff --git a/plugins/modules/remote_management/redfish/ilo_redfish_info.py b/plugins/modules/remote_management/redfish/ilo_redfish_info.py index 2ac61fcea6..6773c4ae95 100644 --- a/plugins/modules/remote_management/redfish/ilo_redfish_info.py +++ b/plugins/modules/remote_management/redfish/ilo_redfish_info.py @@ -105,7 +105,7 @@ CATEGORY_COMMANDS_DEFAULT = { } from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_native +from ansible.module_utils.common.text.converters import to_native from ansible_collections.community.general.plugins.module_utils.ilo_redfish_utils import iLORedfishUtils