Improve API version handling. (#389)

This commit is contained in:
Felix Fontein
2022-06-20 07:34:38 +02:00
committed by GitHub
parent c4e2117844
commit a44e0736cf
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -0,0 +1,2 @@
bugfixes:
- "Docker SDK for Python based modules and plugins - if the API version is specified as an option, use that one to validate API version requirements of module/plugin options instead of the latest API version supported by the Docker daemon. This also avoids one unnecessary API call per module/plugin (https://github.com/ansible-collections/community.docker/pull/389)."
+1 -1
View File
@@ -308,7 +308,7 @@ class AnsibleDockerClientBase(Client):
try:
super(AnsibleDockerClientBase, self).__init__(**self._connect_params)
self.docker_api_version_str = self.version()['ApiVersion']
self.docker_api_version_str = self.api_version
except APIError as exc:
self.fail("Docker API error: %s" % exc)
except Exception as exc: