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.
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 implements the code to raise errors when users are trying
to use our collection with an incompatible SDK release, e.g. use code
from our stable/1.0.0 branch with a OpenStack SDK 1.x.x release.
It does not yet change the minimum and maximum required SDK versions
because OpenStack SDK 1.0.0 has not yet been released to PyPI and
SDK's master branch still does not return a 1.x.x version number.
Change-Id: I1052d21cf8f108dbc99619cd4c4072488645b855
(cherry picked from commit bc6622e0e7)
Commit 879270aa47 [1] bumped the required minimum SDK release
but missed to update two locations in code and docs.
Ref.:
[1] 879270aa47
Change-Id: I725a26b07484619f6f2c460e974821f81d60b153
(cherry picked from commit 5a43bdb873)
Change I51105f11565c5ff33b04add36259c8703af11240 moved validate_certs default from None to False.
This causes checks to fail in openstack_cloud_from_module as validate_certs is never None anymore.
This patch changes reverts the default back to None, and reflects this in the documentation.
Task: 41776
Story: 2008600
Change-Id: Ic79510f863cf3a39c3f5c6d99f61d335f92f9388
While it's currently possible to set min_ver and max_ver for specific
parameter, there are times when the whole module needs to specify a
minimum version:
- When the object isn't supported at all prior to a version
- When major features are missing from the SDK prior to a version
Change-Id: I94bbff7c54621e8a4786ebc7eb030103255dcb17
When the module faces API exception we can give much more useful
information to the user. Let us do this for the modules inheriting from
the base class, since all modules should do this at some point in time
Change-Id: I5f1ef01765829900334aa2ecae5dab3ba96f1a49
don't inherit OpenstackModule class from AnsibleModule class to
prevent occasional overriding Ansible methods or vars and failing
module.
Change-Id: Ic34fff0c938eb87cc0d2c5e98fbafed64bf349f6
In module_utils we have a bunch of factory functions that we expect
people to use in a certain combination to build a module, then we
pass around a reference to the SDK and to the connection we created.
That's largely just due to how this stuff grew organically.
Instead, create a base class to be used in the modules. For now it
allows us to clean things up a bit. But as a follow on - it should
maybe help us put in things like richer logging collection which
would otherwise need to be done with helper methods and whatnot.
Change-Id: I487e79fe18c0b9a75df7dacd224ab40ed7f4e1ab