Remove version checks

openstacksdk 1.0.0 was released 3½ years ago [1]. pip is not going to
pull that version any more. These checks are redundant.

In addition, we can remove sdk_version extra var. Change
I9665f04e6c0d5a84d6c20a73ef7b0dfdc7bd8159 removed the last guard that
relied on this, similarly about 3½ years ago.

[1] https://pypi.org/project/openstacksdk/1.0.0/

Change-Id: Ic0dd7bc5de1f24d1ee3336ccea97aced850f86af
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
Stephen Finucane
2026-06-10 12:28:26 +01:00
parent c81422e3f6
commit 0ada05ec10
5 changed files with 3 additions and 73 deletions

View File

@@ -155,9 +155,6 @@ import sys
from ansible.errors import AnsibleParserError
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable, Cacheable
from ansible_collections.openstack.cloud.plugins.module_utils.openstack import (
ensure_compatibility
)
try:
import openstack
@@ -179,12 +176,6 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
raise AnsibleParserError(
'Could not import Python library openstacksdk')
try:
ensure_compatibility(openstack.version.__version__)
except ImportError as e:
raise AnsibleParserError(
'Incompatible openstacksdk library found: {0}'.format(e))
# Redirect logging to stderr so it does not mix with output, in
# particular JSON output of ansible-inventory.
# TODO: Integrate openstack's logging with Ansible's logging.