refactor: use new to_native function path (#238)

e535eb625b/lib/ansible/module_utils/_text.py
This commit is contained in:
Jonas L 2023-06-27 13:17:21 +02:00 committed by GitHub
parent 10f47eab0f
commit 0fcf4aad22
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 31 additions and 31 deletions

View file

@ -118,7 +118,7 @@ import os
from ipaddress import IPv6Network from ipaddress import IPv6Network
from ansible.errors import AnsibleError 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.inventory import BaseInventoryPlugin, Constructable from ansible.plugins.inventory import BaseInventoryPlugin, Constructable
from ansible.release import __version__ from ansible.release import __version__

View file

@ -134,8 +134,8 @@ hcloud_certificate:
type: dict type: dict
""" """
from ansible.module_utils._text import to_native
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.common.text.converters import to_native
from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud

View file

@ -82,8 +82,8 @@ hcloud_certificate_info:
returned: always returned: always
type: dict type: dict
""" """
from ansible.module_utils._text import to_native
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.common.text.converters import to_native
from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud

View file

@ -77,8 +77,8 @@ hcloud_datacenter_info:
sample: fsn1 sample: fsn1
""" """
from ansible.module_utils._text import to_native
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.common.text.converters import to_native
from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud

View file

@ -168,8 +168,8 @@ hcloud_firewall:
import time import time
from ansible.module_utils._text import to_native
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.common.text.converters import to_native
from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud
try: try:

View file

@ -161,8 +161,8 @@ hcloud_floating_ip:
mylabel: 123 mylabel: 123
""" """
from ansible.module_utils._text import to_native
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.common.text.converters import to_native
from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud

View file

@ -94,8 +94,8 @@ hcloud_floating_ip_info:
type: dict type: dict
""" """
from ansible.module_utils._text import to_native
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.common.text.converters import to_native
from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud

View file

@ -110,8 +110,8 @@ hcloud_image_info:
type: dict type: dict
""" """
from ansible.module_utils._text import to_native
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.common.text.converters import to_native
from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud

View file

@ -141,8 +141,8 @@ hcloud_load_balancer:
sample: false sample: false
""" """
from ansible.module_utils._text import to_native
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.common.text.converters import to_native
from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud

View file

@ -256,8 +256,8 @@ hcloud_load_balancer_info:
sample: false sample: false
""" """
from ansible.module_utils._text import to_native
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.common.text.converters import to_native
from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud

View file

@ -91,8 +91,8 @@ hcloud_load_balancer_network:
sample: 10.0.0.8 sample: 10.0.0.8
""" """
from ansible.module_utils._text import to_native
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.common.text.converters import to_native
from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud

View file

@ -279,8 +279,8 @@ hcloud_load_balancer_service:
sample: false sample: false
""" """
from ansible.module_utils._text import to_native
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.common.text.converters import to_native
from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud
try: try:

View file

@ -135,8 +135,8 @@ hcloud_load_balancer_target:
returned: always returned: always
""" """
from ansible.module_utils._text import to_native
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.common.text.converters import to_native
from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud
try: try:

View file

@ -84,8 +84,8 @@ hcloud_load_balancer_type_info:
sample: 5 sample: 5
""" """
from ansible.module_utils._text import to_native
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.common.text.converters import to_native
from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud

View file

@ -76,8 +76,8 @@ hcloud_location_info:
sample: Falkenstein sample: Falkenstein
""" """
from ansible.module_utils._text import to_native
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.common.text.converters import to_native
from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud

View file

@ -116,8 +116,8 @@ hcloud_network:
mylabel: 123 mylabel: 123
""" """
from ansible.module_utils._text import to_native
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.common.text.converters import to_native
from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud

View file

@ -181,8 +181,8 @@ hcloud_network_info:
type: dict type: dict
""" """
from ansible.module_utils._text import to_native
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.common.text.converters import to_native
from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud

View file

@ -107,8 +107,8 @@ hcloud_placement_group:
- 4712 - 4712
""" """
from ansible.module_utils._text import to_native
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.common.text.converters import to_native
from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud

View file

@ -131,8 +131,8 @@ hcloud_primary_ip:
mylabel: 123 mylabel: 123
""" """
from ansible.module_utils._text import to_native
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.common.text.converters import to_native
from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud

View file

@ -117,8 +117,8 @@ hcloud_primary_ip_info:
type: bool type: bool
""" """
from ansible.module_utils._text import to_native
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.common.text.converters import to_native
from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud

View file

@ -134,8 +134,8 @@ hcloud_rdns:
sample: example.com sample: example.com
""" """
from ansible.module_utils._text import to_native
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.common.text.converters import to_native
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import ( from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
utils, utils,
) )

View file

@ -87,8 +87,8 @@ hcloud_route:
sample: 10.0.0.1 sample: 10.0.0.1
""" """
from ansible.module_utils._text import to_native
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.common.text.converters import to_native
from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud
try: try:

View file

@ -330,8 +330,8 @@ hcloud_server:
from datetime import datetime, timedelta, timezone from datetime import datetime, timedelta, timezone
from ansible.module_utils._text import to_native
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.common.text.converters import to_native
from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud
try: try:

View file

@ -139,8 +139,8 @@ hcloud_server_info:
version_added: "0.1.0" version_added: "0.1.0"
""" """
from ansible.module_utils._text import to_native
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.common.text.converters import to_native
from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud

View file

@ -111,8 +111,8 @@ hcloud_server_network:
sample: [10.1.0.1, ...] sample: [10.1.0.1, ...]
""" """
from ansible.module_utils._text import to_native
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.common.text.converters import to_native
from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud
try: try:

View file

@ -122,8 +122,8 @@ hcloud_server_type_info:
""" """
from ansible.module_utils._text import to_native
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.common.text.converters import to_native
from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud

View file

@ -110,8 +110,8 @@ hcloud_ssh_key:
mylabel: 123 mylabel: 123
""" """
from ansible.module_utils._text import to_native
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.common.text.converters import to_native
from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud

View file

@ -76,8 +76,8 @@ hcloud_ssh_key_info:
returned: always returned: always
type: dict type: dict
""" """
from ansible.module_utils._text import to_native
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.common.text.converters import to_native
from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud

View file

@ -124,8 +124,8 @@ hcloud_subnetwork:
sample: 10.0.0.1 sample: 10.0.0.1
""" """
from ansible.module_utils._text import to_native
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.common.text.converters import to_native
from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud
try: try:

View file

@ -157,8 +157,8 @@ hcloud_volume:
version_added: "0.1.0" version_added: "0.1.0"
""" """
from ansible.module_utils._text import to_native
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.common.text.converters import to_native
from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud

View file

@ -91,8 +91,8 @@ hcloud_volume_info:
type: dict type: dict
""" """
from ansible.module_utils._text import to_native
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.common.text.converters import to_native
from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud from ansible_collections.hetzner.hcloud.plugins.module_utils.hcloud import Hcloud