1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Replace ansible.module_utils._text by ansible.module_utils.common.text.converters (#2877)

* Replace ansible.module_utils._text by ansible.module_utils.common.text.converters.

* Also adjust tests.
This commit is contained in:
Felix Fontein 2021-06-26 23:59:11 +02:00 committed by GitHub
parent d180390dbc
commit fafabed9e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
249 changed files with 252 additions and 250 deletions

View file

@ -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 (https://github.com/ansible-collections/community.general/pull/2877)."

View file

@ -7,7 +7,7 @@ from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.errors import AnsibleError, AnsibleConnectionFailure
from ansible.module_utils._text import to_native, to_text
from ansible.module_utils.common.text.converters import to_native, to_text
from ansible.module_utils.common.collections import is_string
from ansible.plugins.action import ActionBase
from ansible.utils.display import Display

View file

@ -81,7 +81,7 @@ DOCUMENTATION = '''
import re
from ansible.module_utils._text import to_bytes
from ansible.module_utils.common.text.converters import to_bytes
from ansible.plugins.become import BecomeBase

View file

@ -82,7 +82,7 @@ DOCUMENTATION = '''
import re
from ansible.module_utils._text import to_bytes
from ansible.module_utils.common.text.converters import to_bytes
from ansible.plugins.become import BecomeBase

View file

@ -67,7 +67,7 @@ import json
from ansible import constants as C
from ansible.errors import AnsibleError
from ansible.module_utils._text import to_native
from ansible.module_utils.common.text.converters import to_native
from ansible.parsing.ajson import AnsibleJSONEncoder, AnsibleJSONDecoder
from ansible.plugins.cache import BaseCacheModule
from ansible.release import __version__ as ansible_base_version

View file

@ -792,7 +792,7 @@ from ansible.utils.color import colorize, hostcolor
from ansible.template import Templar
from ansible.vars.manager import VariableManager
from ansible.plugins.callback.default import CallbackModule as Default
from ansible.module_utils._text import to_text
from ansible.module_utils.common.text.converters import to_text
class DummyStdout(object):

View file

@ -31,7 +31,7 @@ import time
import json
from ansible.utils.path import makedirs_safe
from ansible.module_utils._text import to_bytes
from ansible.module_utils.common.text.converters import to_bytes
from ansible.module_utils.common._collections_compat import MutableMapping
from ansible.parsing.ajson import AnsibleJSONEncoder
from ansible.plugins.callback import CallbackBase

View file

@ -111,7 +111,7 @@ try:
except ImportError:
HAS_FLATDICT = False
from ansible.module_utils._text import to_bytes, to_text
from ansible.module_utils.common.text.converters import to_bytes, to_text
from ansible.plugins.callback import CallbackBase
# Todo:

View file

@ -62,7 +62,7 @@ import re
import smtplib
from ansible.module_utils.six import string_types
from ansible.module_utils._text import to_bytes
from ansible.module_utils.common.text.converters import to_bytes
from ansible.parsing.ajson import AnsibleJSONEncoder
from ansible.plugins.callback import CallbackBase

View file

@ -40,7 +40,7 @@ import difflib
from ansible import constants as C
from ansible.plugins.callback import CallbackBase
from ansible.module_utils._text import to_text
from ansible.module_utils.common.text.converters import to_text
try:
codeCodes = C.COLOR_CODES

View file

@ -58,7 +58,7 @@ import os
import uuid
from ansible import context
from ansible.module_utils._text import to_text
from ansible.module_utils.common.text.converters import to_text
from ansible.module_utils.urls import open_url
from ansible.plugins.callback import CallbackBase

View file

@ -22,7 +22,7 @@ DOCUMENTATION = '''
from os.path import basename
from ansible import constants as C
from ansible import context
from ansible.module_utils._text import to_text
from ansible.module_utils.common.text.converters import to_text
from ansible.utils.color import colorize, hostcolor
from ansible.plugins.callback.default import CallbackModule as CallbackModule_default

View file

@ -25,7 +25,7 @@ import re
import string
import sys
from ansible.module_utils._text import to_bytes, to_text
from ansible.module_utils.common.text.converters import to_bytes, to_text
from ansible.module_utils.six import string_types
from ansible.parsing.yaml.dumper import AnsibleDumper
from ansible.plugins.callback import CallbackBase, strip_internal_keys, module_response_deepcopy

View file

@ -54,7 +54,7 @@ from ansible.errors import AnsibleError
from ansible.module_utils.basic import is_executable
from ansible.module_utils.common.process import get_bin_path
from ansible.module_utils.six.moves import shlex_quote
from ansible.module_utils._text import to_bytes, to_native
from ansible.module_utils.common.text.converters import to_bytes, to_native
from ansible.plugins.connection import ConnectionBase, BUFSIZE
from ansible.utils.display import Display

View file

@ -32,7 +32,7 @@ DOCUMENTATION = '''
import subprocess
from ansible_collections.community.general.plugins.connection.jail import Connection as Jail
from ansible.module_utils._text import to_native
from ansible.module_utils.common.text.converters import to_native
from ansible.errors import AnsibleError
from ansible.utils.display import Display

View file

@ -38,7 +38,7 @@ import traceback
from ansible.errors import AnsibleError
from ansible.module_utils.six.moves import shlex_quote
from ansible.module_utils._text import to_bytes, to_native, to_text
from ansible.module_utils.common.text.converters import to_bytes, to_native, to_text
from ansible.plugins.connection import ConnectionBase, BUFSIZE
from ansible.utils.display import Display

View file

@ -43,7 +43,7 @@ except ImportError:
pass
from ansible import errors
from ansible.module_utils._text import to_bytes, to_native
from ansible.module_utils.common.text.converters import to_bytes, to_native
from ansible.plugins.connection import ConnectionBase

View file

@ -46,7 +46,7 @@ from distutils.spawn import find_executable
from subprocess import Popen, PIPE
from ansible.errors import AnsibleError, AnsibleConnectionFailure, AnsibleFileNotFound
from ansible.module_utils._text import to_bytes, to_text
from ansible.module_utils.common.text.converters import to_bytes, to_text
from ansible.plugins.connection import ConnectionBase

View file

@ -39,7 +39,7 @@ DOCUMENTATION = '''
import subprocess
from ansible.module_utils._text import to_bytes
from ansible.module_utils.common.text.converters import to_bytes
from ansible.plugins.connection import ConnectionBase, ensure_connect
from ansible.errors import AnsibleConnectionFailure
from ansible.utils.display import Display

View file

@ -33,7 +33,7 @@ import traceback
from ansible.errors import AnsibleError
from ansible.module_utils.six.moves import shlex_quote
from ansible.module_utils._text import to_bytes
from ansible.module_utils.common.text.converters import to_bytes
from ansible.plugins.connection import ConnectionBase, BUFSIZE
from ansible.utils.display import Display

View file

@ -8,7 +8,7 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
from ansible.errors import AnsibleFilterError
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.csv import (initialize_dialect, read_csv, CSVError,
DialectNotAvailableError,

View file

@ -72,7 +72,7 @@ from distutils.version import LooseVersion
import socket
from ansible.errors import AnsibleError
from ansible.module_utils._text import to_bytes, to_native, to_text
from ansible.module_utils.common.text.converters import to_bytes, to_native, to_text
from ansible.module_utils.common._collections_compat import MutableMapping
from ansible.module_utils.six import iteritems
from ansible.plugins.inventory import BaseInventoryPlugin, Cacheable, to_safe_group_name

View file

@ -82,7 +82,7 @@ keyed_groups:
'''
from ansible.errors import AnsibleError, AnsibleParserError
from ansible.module_utils._text import to_native
from ansible.module_utils.common.text.converters import to_native
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable
try:

View file

@ -124,7 +124,7 @@ import time
import os
import socket
from ansible.plugins.inventory import BaseInventoryPlugin
from ansible.module_utils._text import to_native, to_text
from ansible.module_utils.common.text.converters import to_native, to_text
from ansible.module_utils.common.dict_transformations import dict_merge
from ansible.module_utils.six import raise_from
from ansible.errors import AnsibleError, AnsibleParserError

View file

@ -56,7 +56,7 @@ from subprocess import Popen, PIPE
from ansible import constants as C
from ansible.errors import AnsibleParserError
from ansible.module_utils._text import to_native, to_text
from ansible.module_utils.common.text.converters import to_native, to_text
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable, Cacheable
from ansible.module_utils.common.process import get_bin_path

View file

@ -61,7 +61,7 @@ from sys import version as python_version
from ansible.errors import AnsibleError
from ansible.module_utils.urls import open_url
from ansible.plugins.inventory import BaseInventoryPlugin
from ansible.module_utils._text import to_native, to_text
from ansible.module_utils.common.text.converters import to_native, to_text
from ansible.module_utils.ansible_release import __version__ as ansible_version
from ansible.module_utils.six.moves.urllib.parse import urljoin

View file

@ -100,7 +100,7 @@ from ansible.errors import AnsibleError
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable
from ansible_collections.community.general.plugins.module_utils.scaleway import SCALEWAY_LOCATION, parse_pagination_link
from ansible.module_utils.urls import open_url
from ansible.module_utils._text import to_native, to_text
from ansible.module_utils.common.text.converters import to_native, to_text
import ansible.module_utils.six.moves.urllib.parse as urllib_parse

View file

@ -56,7 +56,7 @@ import os
from subprocess import Popen, PIPE
from ansible.errors import AnsibleParserError
from ansible.module_utils._text import to_bytes, to_native, to_text
from ansible.module_utils.common.text.converters import to_bytes, to_native, to_text
from ansible.module_utils.common._collections_compat import MutableMapping
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable, Cacheable
from ansible.module_utils.common.process import get_bin_path

View file

@ -106,7 +106,7 @@ import os
from ansible.module_utils.six.moves.urllib.parse import urlparse
from ansible.errors import AnsibleError, AnsibleAssertionError
from ansible.plugins.lookup import LookupBase
from ansible.module_utils._text import to_text
from ansible.module_utils.common.text.converters import to_text
try:
import consul

View file

@ -74,7 +74,7 @@ from subprocess import Popen
from ansible.errors import AnsibleError
from ansible.plugins.lookup import LookupBase
from ansible.parsing.splitter import parse_kv
from ansible.module_utils._text import to_bytes, to_text, to_native
from ansible.module_utils.common.text.converters import to_bytes, to_text, to_native
from ansible.utils.display import Display
display = Display()

View file

@ -152,7 +152,7 @@ RETURN = """
from ansible.errors import AnsibleError
from ansible.plugins.lookup import LookupBase
from ansible.module_utils._text import to_native
from ansible.module_utils.common.text.converters import to_native
import socket
try:

View file

@ -54,7 +54,7 @@ except ImportError:
pass
from ansible.errors import AnsibleError
from ansible.module_utils._text import to_native
from ansible.module_utils.common.text.converters import to_native
from ansible.plugins.lookup import LookupBase
# ==============================================================

View file

@ -138,7 +138,7 @@ import re
from ansible.plugins.lookup import LookupBase
from ansible.utils.display import Display
from ansible.module_utils.basic import missing_required_lib
from ansible.module_utils._text import to_native
from ansible.module_utils.common.text.converters import to_native
from ansible.plugins.lookup import LookupBase
from ansible.errors import AnsibleError, AnsibleLookupError

View file

@ -124,7 +124,7 @@ except ImportError:
pass
from ansible.plugins.lookup import LookupBase
from ansible.module_utils._text import to_native, to_text
from ansible.module_utils.common.text.converters import to_native, to_text
from ansible.utils.display import Display
display = Display()

View file

@ -63,7 +63,7 @@ import os
from ansible.plugins.lookup import LookupBase
from ansible.utils.cmd_functions import run_cmd
from ansible.module_utils._text import to_text
from ansible.module_utils.common.text.converters import to_text
ANSIBLE_HIERA_CFG = os.getenv('ANSIBLE_HIERA_CFG', '/etc/hiera.yaml')
ANSIBLE_HIERA_BIN = os.getenv('ANSIBLE_HIERA_BIN', '/usr/bin/hiera')

View file

@ -39,7 +39,7 @@ RETURN = """
from subprocess import Popen, PIPE
from ansible.errors import AnsibleError
from ansible.module_utils._text import to_bytes, to_text
from ansible.module_utils.common.text.converters import to_bytes, to_text
from ansible.plugins.lookup import LookupBase

View file

@ -55,7 +55,7 @@ _raw:
from ansible.errors import AnsibleError
from ansible.plugins.lookup import LookupBase
from ansible.module_utils._text import to_native, to_text
from ansible.module_utils.common.text.converters import to_native, to_text
HAVE_LMDB = True
try:
import lmdb

View file

@ -74,7 +74,7 @@ _list:
from ansible.plugins.lookup import LookupBase
from ansible_collections.community.general.plugins.module_utils.net_tools.nios.api import WapiLookup
from ansible.module_utils._text import to_text
from ansible.module_utils.common.text.converters import to_text
from ansible.errors import AnsibleError

View file

@ -84,7 +84,7 @@ _list:
from ansible.plugins.lookup import LookupBase
from ansible_collections.community.general.plugins.module_utils.net_tools.nios.api import WapiLookup
from ansible.module_utils._text import to_text
from ansible.module_utils.common.text.converters import to_text
from ansible.errors import AnsibleError

View file

@ -103,7 +103,7 @@ from subprocess import Popen, PIPE
from ansible.plugins.lookup import LookupBase
from ansible.errors import AnsibleLookupError
from ansible.module_utils._text import to_bytes, to_text
from ansible.module_utils.common.text.converters import to_bytes, to_text
class OnePass(object):

View file

@ -142,7 +142,7 @@ import yaml
from distutils import util
from ansible.errors import AnsibleError, AnsibleAssertionError
from ansible.module_utils._text import to_bytes, to_native, to_text
from ansible.module_utils.common.text.converters import to_bytes, to_native, to_text
from ansible.utils.display import Display
from ansible.utils.encrypt import random_password
from ansible.plugins.lookup import LookupBase

View file

@ -138,7 +138,7 @@ import string
from ansible.errors import AnsibleLookupError
from ansible.plugins.lookup import LookupBase
from ansible.module_utils._text import to_bytes, to_text
from ansible.module_utils.common.text.converters import to_bytes, to_text
class LookupModule(LookupBase):

View file

@ -80,7 +80,7 @@ try:
except ImportError:
pass
from ansible.module_utils._text import to_text
from ansible.module_utils.common.text.converters import to_text
from ansible.errors import AnsibleError
from ansible.plugins.lookup import LookupBase

View file

@ -36,7 +36,7 @@ import shelve
from ansible.errors import AnsibleError, AnsibleAssertionError
from ansible.plugins.lookup import LookupBase
from ansible.module_utils._text import to_bytes, to_text
from ansible.module_utils.common.text.converters import to_bytes, to_text
class LookupModule(LookupBase):

View file

@ -41,7 +41,7 @@ from ansible.module_utils.basic import AnsibleModule, missing_required_lib
from ansible.module_utils.six.moves.urllib.error import HTTPError, URLError
from ansible.module_utils.urls import open_url
from ansible.module_utils.api import basic_auth_argument_spec
from ansible.module_utils._text import to_native
from ansible.module_utils.common.text.converters import to_native
try:
from ansible.module_utils.ansible_release import __version__ as ansible_version

View file

@ -10,7 +10,7 @@ __metaclass__ = type
import csv
from io import BytesIO, StringIO
from ansible.module_utils._text import to_native
from ansible.module_utils.common.text.converters import to_native
from ansible.module_utils.six import PY3

View file

@ -7,7 +7,7 @@ __metaclass__ = type
import json
from ansible.module_utils._text import to_native, to_text
from ansible.module_utils.common.text.converters import to_native, to_text
from ansible.module_utils.urls import fetch_url

View file

@ -12,7 +12,7 @@ from distutils.version import StrictVersion
from ansible.module_utils.basic import missing_required_lib
from ansible.module_utils.urls import fetch_url
from ansible.module_utils._text import to_native
from ansible.module_utils.common.text.converters import to_native
try:
from urllib import quote_plus # Python 2.X

View file

@ -21,7 +21,7 @@ except ImportError:
from ansible.module_utils.basic import (AnsibleModule, env_fallback,
missing_required_lib)
from ansible.module_utils._text import to_text
from ansible.module_utils.common.text.converters import to_text
class HwcModuleException(Exception):

View file

@ -9,7 +9,7 @@ __metaclass__ = type
import traceback
from functools import wraps
from ansible.module_utils._text import to_native
from ansible.module_utils.common.text.converters import to_native
from ansible.module_utils.basic import missing_required_lib
PYXCLI_INSTALLED = True

View file

@ -35,7 +35,7 @@ import traceback
from ansible.module_utils.urls import open_url
from ansible.module_utils.six.moves.urllib.parse import urlencode, quote
from ansible.module_utils.six.moves.urllib.error import HTTPError
from ansible.module_utils._text import to_native, to_text
from ansible.module_utils.common.text.converters import to_native, to_text
URL_REALMS = "{url}/admin/realms"
URL_REALM = "{url}/admin/realms/{realm}"

View file

@ -18,7 +18,7 @@ import socket
import uuid
import re
from ansible.module_utils._text import to_bytes, to_native, to_text
from ansible.module_utils.common.text.converters import to_bytes, to_native, to_text
from ansible.module_utils.six import PY3
from ansible.module_utils.six.moves.urllib.parse import quote
from ansible.module_utils.urls import fetch_url, HAS_GSSAPI

View file

@ -10,7 +10,7 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
import traceback
from ansible.module_utils._text import to_native
from ansible.module_utils.common.text.converters import to_native
try:
import ldap

View file

@ -20,7 +20,7 @@ import ssl
from ansible.module_utils.urls import generic_urlparse
from ansible.module_utils.six.moves.urllib.parse import urlparse
from ansible.module_utils.six.moves import http_client
from ansible.module_utils._text import to_text
from ansible.module_utils.common.text.converters import to_text
# httplib/http.client connection using unix domain socket
HTTPConnection = http_client.HTTPConnection

View file

@ -14,9 +14,9 @@ __metaclass__ = type
import os
from functools import partial
from ansible.module_utils._text import to_native
from ansible.module_utils.common.text.converters import to_native
from ansible.module_utils.six import iteritems
from ansible.module_utils._text import to_text
from ansible.module_utils.common.text.converters import to_text
from ansible.module_utils.basic import env_fallback
from ansible.module_utils.common.validation import check_type_dict

View file

@ -27,7 +27,7 @@ except ImportError:
from ansible.module_utils import six
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
from ansible.module_utils._text import to_native
from ansible.module_utils.common.text.converters import to_native
from ansible.module_utils.common._collections_compat import Mapping

View file

@ -38,7 +38,7 @@ except ImportError:
HAS_OCI_PY_SDK = False
from ansible.module_utils._text import to_bytes
from ansible.module_utils.common.text.converters import to_bytes
from ansible.module_utils.six import iteritems
__version__ = "1.6.0-dev"

View file

@ -6,8 +6,8 @@ __metaclass__ = type
import json
from ansible.module_utils.urls import open_url
from ansible.module_utils._text import to_native
from ansible.module_utils._text import to_text
from ansible.module_utils.common.text.converters import to_native
from ansible.module_utils.common.text.converters import to_text
from ansible.module_utils.six.moves import http_client
from ansible.module_utils.six.moves.urllib.error import URLError, HTTPError
from ansible.module_utils.six.moves.urllib.parse import urlparse

View file

@ -7,7 +7,7 @@ __metaclass__ = type
import json
from ansible.module_utils._text import to_text
from ansible.module_utils.common.text.converters import to_text
from ansible.module_utils.basic import env_fallback
from ansible.module_utils.urls import fetch_url, basic_auth_header

View file

@ -13,7 +13,7 @@ __metaclass__ = type
import json
from ansible.module_utils._text import to_native
from ansible.module_utils.common.text.converters import to_native
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.urls import fetch_url

View file

@ -13,7 +13,7 @@ try:
except ImportError:
HAS_VEXATAPI = False
from ansible.module_utils._text import to_native
from ansible.module_utils.common.text.converters import to_native
from ansible.module_utils.basic import env_fallback
VXOS_VERSION = None

View file

@ -95,7 +95,7 @@ msg:
import traceback
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 do_install(module, mode, rootfs, container, image, values_list, backend):

View file

@ -52,7 +52,7 @@ import os
import traceback
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 core(module):

View file

@ -69,7 +69,7 @@ msg:
import traceback
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 do_upgrade(module, image):

View file

@ -113,7 +113,7 @@ import traceback
from ansible.module_utils.basic import AnsibleModule
from ansible_collections.community.general.plugins.module_utils.dimensiondata import HAS_LIBCLOUD, DimensionDataModule
from ansible.module_utils._text import to_native
from ansible.module_utils.common.text.converters import to_native
if HAS_LIBCLOUD:
from libcloud.compute.base import NodeLocation

View file

@ -433,7 +433,7 @@ else:
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.parsing.convert_bool import BOOLEANS_FALSE, BOOLEANS_TRUE
from ansible.module_utils.six.moves import xrange
from ansible.module_utils._text import to_text, to_bytes
from ansible.module_utils.common.text.converters import to_text, to_bytes
# LXC_COMPRESSION_MAP is a map of available compression types when creating

View file

@ -85,7 +85,7 @@ cloud_init_data_facts:
import os
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils._text import to_text
from ansible.module_utils.common.text.converters import to_text
CLOUD_INIT_PATH = "/var/lib/cloud/data"

View file

@ -364,7 +364,7 @@ except ImportError:
HAS_PROXMOXER = False
from ansible.module_utils.basic import AnsibleModule, env_fallback
from ansible.module_utils._text import to_native
from ansible.module_utils.common.text.converters import to_native
VZ_TYPE = None

View file

@ -771,7 +771,7 @@ except ImportError:
HAS_PROXMOXER = False
from ansible.module_utils.basic import AnsibleModule, env_fallback
from ansible.module_utils._text import to_native
from ansible.module_utils.common.text.converters import to_native
def get_nextvmid(module, proxmox):

View file

@ -119,7 +119,7 @@ except ImportError:
HAS_PROXMOXER = False
from ansible.module_utils.basic import AnsibleModule, missing_required_lib, env_fallback
from ansible.module_utils._text import to_native
from ansible.module_utils.common.text.converters import to_native
VZ_TYPE = None

View file

@ -275,7 +275,7 @@ import uuid
import traceback
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
HAS_PACKET_SDK = True
try:

View file

@ -151,7 +151,7 @@ import uuid
import re
from ansible.module_utils.basic import AnsibleModule, env_fallback
from ansible.module_utils._text import to_native
from ansible.module_utils.common.text.converters import to_native
HAS_PACKET_SDK = True

View file

@ -122,7 +122,7 @@ id:
'''
from ansible.module_utils.basic import AnsibleModule, env_fallback
from ansible.module_utils._text import to_native
from ansible.module_utils.common.text.converters import to_native
HAS_PACKET_SDK = True

View file

@ -168,7 +168,7 @@ description:
import uuid
from ansible.module_utils.basic import AnsibleModule, env_fallback
from ansible.module_utils._text import to_native
from ansible.module_utils.common.text.converters import to_native
HAS_PACKET_SDK = True

View file

@ -130,7 +130,7 @@ device_id:
import uuid
from ansible.module_utils.basic import AnsibleModule, env_fallback
from ansible.module_utils._text import to_native
from ansible.module_utils.common.text.converters import to_native
HAS_PACKET_SDK = True

View file

@ -198,7 +198,7 @@ except ImportError:
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.six.moves import xrange
from ansible.module_utils._text import to_native
from ansible.module_utils.common.text.converters import to_native
LOCATIONS = ['us/las',

View file

@ -149,7 +149,7 @@ except ImportError:
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.six.moves import xrange
from ansible.module_utils._text import to_native
from ansible.module_utils.common.text.converters import to_native
uuid_match = re.compile(

View file

@ -247,7 +247,7 @@ except ImportError:
exceptions = None
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils._text import to_text
from ansible.module_utils.common.text.converters import to_text
def pubnub_user(module):

View file

@ -77,7 +77,7 @@ except ImportError:
HAS_PYRAX = False
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils._text import to_text
from ansible.module_utils.common.text.converters import to_text
from ansible_collections.community.general.plugins.module_utils.rax import rax_argument_spec, rax_required_together, rax_to_dict, setup_rax_module

View file

@ -133,7 +133,7 @@ data:
import traceback
from ansible_collections.community.general.plugins.module_utils.scaleway import SCALEWAY_LOCATION, scaleway_argument_spec, Scaleway, payload_from_object
from ansible.module_utils._text import to_text
from ansible.module_utils.common.text.converters import to_text
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
try:

View file

@ -404,7 +404,7 @@ import traceback
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
# While vmadm(1M) supports a -E option to return any errors in JSON, the
# generated JSON does not play well with the JSON parsers of Python.

View file

@ -136,7 +136,7 @@ EXAMPLES = '''
state: acquire
'''
from ansible.module_utils._text import to_text
from ansible.module_utils.common.text.converters import to_text
try:
import consul

View file

@ -119,7 +119,7 @@ old_value:
import traceback
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
from ansible.module_utils._text import to_native
from ansible.module_utils.common.text.converters import to_native
try:

View file

@ -84,7 +84,7 @@ EXAMPLES = '''
import json
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
from ansible.module_utils._text import to_native
from ansible.module_utils.common.text.converters import to_native
import_nomad = None
try:

View file

@ -270,7 +270,7 @@ import os
import json
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
from ansible.module_utils._text import to_native
from ansible.module_utils.common.text.converters import to_native
import_nomad = None
try:

View file

@ -108,7 +108,7 @@ except ImportError:
KAZOO_INSTALLED = False
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
from ansible.module_utils._text import to_bytes
from ansible.module_utils.common.text.converters import to_bytes
def main():

View file

@ -64,7 +64,7 @@ query_results:
'''
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.influxdb import InfluxDb

View file

@ -145,7 +145,7 @@ except ImportError:
from ansible.module_utils.basic import AnsibleModule
from ansible_collections.community.general.plugins.module_utils.influxdb import InfluxDb
from ansible.module_utils._text import to_native
from ansible.module_utils.common.text.converters import to_native
VALID_DURATION_REGEX = re.compile(r'^(INF|(\d+(ns|u|µ|ms|s|m|h|d|w)))+$')

View file

@ -104,7 +104,7 @@ import json
from ansible.module_utils.urls import ConnectionError
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
import ansible_collections.community.general.plugins.module_utils.influxdb as influx

View file

@ -61,7 +61,7 @@ RETURN = r'''
'''
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.influxdb import InfluxDb

View file

@ -78,7 +78,7 @@ row_count:
'''
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
from ansible.module_utils._text import to_native
from ansible.module_utils.common.text.converters import to_native
HAS_PYODBC = None
try:

View file

@ -143,7 +143,7 @@ else:
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
from ansible.module_utils.common.text.formatters import human_to_bytes
from ansible.module_utils._text import to_native
from ansible.module_utils.common.text.converters import to_native
import re

View file

@ -196,7 +196,7 @@ except ImportError:
HAS_REDIS_PACKAGE = False
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
from ansible.module_utils._text import to_native
from ansible.module_utils.common.text.converters import to_native
def redis_client(**client_params):

View file

@ -103,7 +103,7 @@ query_result:
import csv
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.six import StringIO
from ansible.module_utils._text import to_native
from ansible.module_utils.common.text.converters import to_native
def csv_to_list(rawcsv):

View file

@ -76,7 +76,7 @@ else:
pyodbc_found = True
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
from ansible.module_utils._text import to_native
from ansible.module_utils.common.text.converters import to_native
class NotSupportedError(Exception):

View file

@ -74,7 +74,7 @@ else:
pyodbc_found = True
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
from ansible.module_utils._text import to_native
from ansible.module_utils.common.text.converters import to_native
class NotSupportedError(Exception):

View file

@ -87,7 +87,7 @@ else:
pyodbc_found = True
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
from ansible.module_utils._text import to_native
from ansible.module_utils.common.text.converters import to_native
class NotSupportedError(Exception):

View file

@ -109,7 +109,7 @@ else:
pyodbc_found = True
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
from ansible.module_utils._text import to_native
from ansible.module_utils.common.text.converters import to_native
class NotSupportedError(Exception):

View file

@ -118,7 +118,7 @@ else:
pyodbc_found = True
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
from ansible.module_utils._text import to_native
from ansible.module_utils.common.text.converters import to_native
class NotSupportedError(Exception):

View file

@ -224,7 +224,7 @@ import os
import math
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
# These are the multiplicative suffixes understood (or returned) by dd and

Some files were not shown because too many files have changed in this diff Show more