Remove deprecated functionality. (#363)

This commit is contained in:
Felix Fontein
2022-07-01 19:02:22 +02:00
committed by GitHub
parent 00ddbbdeb2
commit 209aeb57fd
5 changed files with 6 additions and 27 deletions
+1 -4
View File
@@ -323,10 +323,7 @@ class AnsibleDockerClientBase(Client):
use_ssh_client=self._get_value('use_ssh_client', params['use_ssh_client'], None, False),
)
def depr(*args, **kwargs):
self.deprecate(*args, **kwargs)
update_tls_hostname(result, old_behavior=True, deprecate_function=depr, uses_tls=is_using_tls(result))
update_tls_hostname(result)
return result
+1 -14
View File
@@ -107,22 +107,9 @@ class DockerBaseClass(object):
def update_tls_hostname(result, old_behavior=False, deprecate_function=None, uses_tls=True):
if result['tls_hostname'] is None:
if old_behavior:
result['tls_hostname'] = DEFAULT_TLS_HOSTNAME
if uses_tls and deprecate_function is not None:
deprecate_function(
'The default value "localhost" for tls_hostname is deprecated and will be removed in community.docker 3.0.0.'
' From then on, docker_host will be used to compute tls_hostname. If you want to keep using "localhost",'
' please set that value explicitly.',
version='3.0.0', collection_name='community.docker')
return
# get default machine name from the url
parsed_url = urlparse(result['docker_host'])
if ':' in parsed_url.netloc:
result['tls_hostname'] = parsed_url.netloc[:parsed_url.netloc.rindex(':')]
else:
result['tls_hostname'] = parsed_url
result['tls_hostname'] = parsed_url.netloc.rsplit(':', 1)[0]
def compare_dict_allow_more_present(av, bv):