From 75558c5c2e970d40133273432ac77bbb161ff4ed Mon Sep 17 00:00:00 2001 From: Jakob Meng Date: Tue, 26 Apr 2022 10:05:42 +0200 Subject: [PATCH] Lowered maximum OpenStack SDK version to 0.98.999 Alongside OpenStack SDK 1.0.0 we will release a new collection version 2.0.0 which is compatible to OpenStack SDK 1.x.x series only. Code in branch stable/1.0.0 will remain compatible to OpenStack SDK 0.x.x series only. Release candidates for the first major release of OpenStackSDK 1.x.x will be numbered using 0.99.x versions. At Ansible OpenStack modules PTG on 2022-04-07 it was decided to raise an error if one is using a incompatible releases of the OpenStack SDK with our collection. We decided against showing warnings only because they can be missed easily and functionality will be broken but probably hardly detectable when using the wrong SDK. This patch caps the maximum required SDK versions to 0.98.999, so that an error will be raised when users try to use our collection with an incompatible SDK release, e.g. use code from our stable/1.0.0 branch with a OpenStack SDK 0.99.x or 1.x.x release. Change-Id: Ic077f7a906698025edf20acf22c7a5c6caa8734a --- README.md | 2 +- plugins/doc_fragments/openstack.py | 2 +- plugins/module_utils/openstack.py | 2 +- requirements.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d6f17455..4930a80c 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ For using the Openstack Cloud collection firstly you need to install `ansible` a For example with pip: ```bash -pip install "ansible>=2.9" "openstacksdk>=0.36" +pip install "ansible>=2.9" "openstacksdk>=0.36,<0.99.0" ``` OpenStackSDK has to be available to Ansible and to the Python interpreter on the host, where Ansible executes the module (target host). diff --git a/plugins/doc_fragments/openstack.py b/plugins/doc_fragments/openstack.py index 57d68302..944fad10 100644 --- a/plugins/doc_fragments/openstack.py +++ b/plugins/doc_fragments/openstack.py @@ -91,7 +91,7 @@ options: type: str requirements: - python >= 3.6 - - openstacksdk >= 0.36.0 + - openstacksdk >= 0.36, < 0.99.0 notes: - The standard OpenStack environment variables, such as C(OS_USERNAME) may be used instead of providing explicit values. diff --git a/plugins/module_utils/openstack.py b/plugins/module_utils/openstack.py index 80c89b1f..5ce739bf 100644 --- a/plugins/module_utils/openstack.py +++ b/plugins/module_utils/openstack.py @@ -68,7 +68,7 @@ OVERRIDES = {'os_client_config': 'config', CUSTOM_VAR_PARAMS = ['min_ver', 'max_ver'] MINIMUM_SDK_VERSION = '0.36.0' -MAXIMUM_SDK_VERSION = None +MAXIMUM_SDK_VERSION = '0.98.999' def openstack_argument_spec(): diff --git a/requirements.txt b/requirements.txt index a1c77fe1..ff1e9021 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -openstacksdk>=0.36 +openstacksdk>=0.36,<0.99.0