mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-03-15 19:58:28 +00:00
Improve API version handling. (#389)
This commit is contained in:
parent
c4e2117844
commit
a44e0736cf
2
changelogs/fragments/389-api-version.yml
Normal file
2
changelogs/fragments/389-api-version.yml
Normal 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)."
|
||||
@ -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:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user