Deprecate the openshift inventory plugin (#186)

* Deprecate the openshift inventory plugin

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Fix indentation

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Update docs

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

---------

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>
This commit is contained in:
Alina Buzachis
2023-02-07 16:20:58 +01:00
committed by GitHub
parent 81339235c7
commit e9c891c5c2
3 changed files with 19 additions and 0 deletions

View File

@@ -17,6 +17,13 @@ DOCUMENTATION = '''
- Groups by cluster name, namespace, namespace_services, namespace_pods, namespace_routes, and labels
- Uses openshift.(yml|yaml) YAML configuration file to set parameter values.
deprecated:
removed_in: 4.0.0
why: |
As discussed in U(https://github.com/ansible-collections/kubernetes.core/issues/31), we decided to
remove the openshift inventory plugin in release 4.0.0.
alternative: "Use M(kubernetes.core.k8s_info) and M(ansible.builtin.add_host) instead."
options:
plugin:
description: token that ensures this is a source file for the 'openshift' plugin.
@@ -141,6 +148,9 @@ class InventoryModule(K8sInventoryModule):
self.check_kubernetes_collection()
super(InventoryModule, self).fetch_objects(connections)
self.display.deprecated("The 'openshift' inventory plugin has been deprecated and will be removed in release 4.0.0",
version='4.0.0', collection_name='community.okd')
if connections:
if not isinstance(connections, list):
raise K8sInventoryException("Expecting connections to be a list.")