Skip to content

Commit

Permalink
Remove deprecated function from module_utils/common.py (#726)
Browse files Browse the repository at this point in the history
Remove deprecated function from module_utils/common.py

SUMMARY

Remove deprecated functions and class from module_utils/common.py in order to prepare release 4.0.0

ISSUE TYPE


Feature Pull Request

COMPONENT NAME

module_utils/common.py

Reviewed-by: Alina Buzachis
  • Loading branch information
abikouo authored May 24, 2024
1 parent cbadbe3 commit 072a080
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 (https://github.com/ansible-collections/kubernetes.core/pull/726).
- module_utils/common.py - the previously deprecated ``K8sAnsibleMixin`` class has been removed (https://github.com/ansible-collections/kubernetes.core/pull/726).
- module_utils/common.py - the previously deprecated ``configuration_digest()`` function has been removed (https://github.com/ansible-collections/kubernetes.core/pull/726).
- module_utils/common.py - the previously deprecated ``get_api_client()`` function has been removed (https://github.com/ansible-collections/kubernetes.core/pull/726).
- module_utils/common.py - the previously deprecated ``unique_string()`` function has been removed (https://github.com/ansible-collections/kubernetes.core/pull/726).
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

1 comment on commit 072a080

@chadmf
Copy link

@chadmf chadmf commented on 072a080 May 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@abikouo it looks like the kubevirt.core collection was using this in in its previous state. @0xFelix FYI
image

Please sign in to comment.