Skip to content

Commit

Permalink
Remove deprecated function from module_utils/common.py
Browse files Browse the repository at this point in the history
  • Loading branch information
abikouo committed May 23, 2024
1 parent cbadbe3 commit 99375d4
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1,455 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
removed_features:
- k8s_exec - the previously deprecated ``result.return_code`` return value has been removed, consider using ``result.rc`` instead.
- module_utils/common.py - the previously deprecated ``K8sAnsibleMixin`` class has been removed.
- module_utils/common.py - the previously deprecated ``configuration_digest()`` function has been removed.
- module_utils/common.py - the previously deprecated ``get_api_client()`` function has been removed.
- module_utils/common.py - the previously deprecated ``unique_string()`` function has been removed.
18 changes: 9 additions & 9 deletions plugins/inventory/k8s.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,18 +125,18 @@

from ansible.errors import AnsibleError
from ansible.plugins.inventory import BaseInventoryPlugin, Cacheable, Constructable
from ansible_collections.kubernetes.core.plugins.module_utils.common import (
HAS_K8S_MODULE_HELPER,
k8s_import_exception,
)
from ansible_collections.kubernetes.core.plugins.module_utils.k8s.client import (
get_api_client,
)

try:
from kubernetes.dynamic.exceptions import DynamicApiError
except ImportError:
pass

HAS_K8S_MODULE_HELPER = True
k8s_import_exception = None
except ImportError as e:
HAS_K8S_MODULE_HELPER = False
k8s_import_exception = e
from ansible_collections.kubernetes.core.plugins.module_utils.k8s.client import (
get_api_client,
)


def format_dynamic_api_exc(exc):
Expand Down
Loading

0 comments on commit 99375d4

Please sign in to comment.