Skip to content

Commit

Permalink
Move common utility code to plugins.module_utils.util (#390)
Browse files Browse the repository at this point in the history
* Move common utility code to plugins.module_utils.util.

* Also adjust plugins.

* Fix import.
  • Loading branch information
felixfontein authored Jun 20, 2022
1 parent a44e073 commit f41d7ac
Show file tree
Hide file tree
Showing 22 changed files with 495 additions and 410 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/390-util.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
minor_changes:
- "Move common utility functions from the ``common`` module_util to a new module_util called ``util``. This should not have any user-visible effect (https://github.com/ansible-collections/community.docker/pull/390)."
2 changes: 2 additions & 0 deletions plugins/inventory/docker_containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@

from ansible_collections.community.docker.plugins.module_utils.common import (
RequestException,
)
from ansible_collections.community.docker.plugins.module_utils.util import (
DOCKER_COMMON_ARGS_VARS,
)
from ansible_collections.community.docker.plugins.plugin_utils.common import (
Expand Down
3 changes: 2 additions & 1 deletion plugins/inventory/docker_swarm.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@

from ansible.errors import AnsibleError
from ansible.module_utils.common.text.converters import to_native
from ansible_collections.community.docker.plugins.module_utils.common import update_tls_hostname, get_connect_params
from ansible_collections.community.docker.plugins.module_utils.common import get_connect_params
from ansible_collections.community.docker.plugins.module_utils.util import update_tls_hostname
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable
from ansible.parsing.utils.addresses import parse_address

Expand Down
Loading

0 comments on commit f41d7ac

Please sign in to comment.