Skip to content

Commit

Permalink
(internals) make _utils internal to the collection (#63)
Browse files Browse the repository at this point in the history
* Add supported python versions and internal use disclaimer to module_util

* Mark  module_util as private and update references

* Rename test file

* fix typo

* Add internal use disclaimer to plugin_util

* Rename plugin_util with underscore, update references
  • Loading branch information
briantist authored Mar 2, 2021
1 parent 44479fd commit 37a4d07
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 10 deletions.
2 changes: 1 addition & 1 deletion plugins/lookup/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from ansible.plugins.lookup import LookupBase
from ansible.utils.display import Display

from ansible_collections.community.hashi_vault.plugins.plugin_utils.hashi_vault_plugin import HashiVaultPlugin
from ansible_collections.community.hashi_vault.plugins.plugin_utils._hashi_vault_plugin import HashiVaultPlugin

display = Display()

Expand Down
2 changes: 1 addition & 1 deletion plugins/lookup/hashi_vault.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@
from ansible.utils.display import Display

from ansible_collections.community.hashi_vault.plugins.lookup.__init__ import HashiVaultLookupBase
from ansible_collections.community.hashi_vault.plugins.module_utils.hashi_vault_common import HashiVaultHelper
from ansible_collections.community.hashi_vault.plugins.module_utils._hashi_vault_common import HashiVaultHelper

display = Display()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
# Copyright (c) 2021 Brian Scholer (@briantist)
# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause)

'''Python versions supported: all controller-side versions, all remote-side versions except 2.6'''

# FOR INTERNAL COLLECTION USE ONLY
# The interfaces in this file are meant for use within the community.hashi_vault collection
# and may not remain stable to outside uses. Changes may be made in ANY release, even a bugfix release.
# See also: https://github.com/ansible/community/issues/539#issuecomment-780839686
# Please open an issue if you have questions about this.

from __future__ import absolute_import, division, print_function
__metaclass__ = type

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
# Copyright (c) 2021 Brian Scholer (@briantist)
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

# FOR INTERNAL COLLECTION USE ONLY
# The interfaces in this file are meant for use within the community.hashi_vault collection
# and may not remain stable to outside uses. Changes may be made in ANY release, even a bugfix release.
# See also: https://github.com/ansible/community/issues/539#issuecomment-780839686
# Please open an issue if you have questions about this.

from __future__ import absolute_import, division, print_function
__metaclass__ = type
Expand All @@ -10,7 +15,7 @@
from ansible import constants as C
from ansible.utils.display import Display

from ansible_collections.community.hashi_vault.plugins.module_utils.hashi_vault_common import (
from ansible_collections.community.hashi_vault.plugins.module_utils._hashi_vault_common import (
HashiVaultHelper,
HashiVaultOptionAdapter,
HashiVaultConnectionOptions,
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/plugins/base/test_hashi_vault_lookup_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from ansible.errors import AnsibleError
from ansible.plugins.lookup import LookupBase

from ansible_collections.community.hashi_vault.plugins.plugin_utils.hashi_vault_plugin import HashiVaultPlugin
from ansible_collections.community.hashi_vault.plugins.plugin_utils._hashi_vault_plugin import HashiVaultPlugin
from ansible_collections.community.hashi_vault.plugins.lookup.__init__ import HashiVaultLookupBase


Expand Down
4 changes: 2 additions & 2 deletions tests/unit/plugins/base/test_hashi_vault_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

from ansible.plugins import AnsiblePlugin

from ansible_collections.community.hashi_vault.plugins.plugin_utils.hashi_vault_plugin import HashiVaultPlugin
from ansible_collections.community.hashi_vault.plugins.module_utils.hashi_vault_common import HashiVaultOptionAdapter
from ansible_collections.community.hashi_vault.plugins.plugin_utils._hashi_vault_plugin import HashiVaultPlugin
from ansible_collections.community.hashi_vault.plugins.module_utils._hashi_vault_common import HashiVaultOptionAdapter


@pytest.fixture
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

from ansible_collections.community.hashi_vault.tests.unit.compat import mock

from ansible_collections.community.hashi_vault.plugins.module_utils.hashi_vault_common import (
from ansible_collections.community.hashi_vault.plugins.module_utils._hashi_vault_common import (
HashiVaultOptionGroupBase,
HashiVaultConnectionOptions,
HashiVaultOptionAdapter,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import pytest

from ansible_collections.community.hashi_vault.tests.unit.compat import mock
from ansible_collections.community.hashi_vault.plugins.module_utils.hashi_vault_common import HashiVaultHelper
from ansible_collections.community.hashi_vault.plugins.module_utils._hashi_vault_common import HashiVaultHelper


@pytest.fixture
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from ansible.plugins import AnsiblePlugin

from ansible_collections.community.hashi_vault.plugins.module_utils.hashi_vault_common import HashiVaultOptionAdapter
from ansible_collections.community.hashi_vault.plugins.module_utils._hashi_vault_common import HashiVaultOptionAdapter


SAMPLE_DICT = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

from ansible_collections.community.hashi_vault.tests.unit.compat import mock

from ansible_collections.community.hashi_vault.plugins.module_utils.hashi_vault_common import (
from ansible_collections.community.hashi_vault.plugins.module_utils._hashi_vault_common import (
HashiVaultOptionGroupBase,
HashiVaultOptionAdapter,
)
Expand Down

0 comments on commit 37a4d07

Please sign in to comment.