def get_docker_client(cluster, address):
 def get_path(name):
  return cluster.certificates_path.child(name).path
 tls = TLSConfig(client_cert=(get_path('user.crt'), get_path('user.key')), ssl_version=ssl.PROTOCOL_TLSv1, assert_hostname=False, verify=get_path('cluster.crt'))
 return dockerpy_client(base_url='https://{}:{}'.format(address, DOCKER_PORT), tls=tls, timeout=100, version='1.21')

def get_docker_client ( cluster , address ) : def get_path ( name ) : return cluster . certificates_path . child ( name ) . path tls = TLSConfig ( client_cert = ( get_path ( 'user.crt' ) , get_path ( 'user.key' ) ) , ssl_version = ssl . PROTOCOL_TLSv1 , assert_hostname = False , verify = get_path ( 'cluster.crt' ) ) return dockerpy_client ( base_url = 'https://{}:{}' . format ( address , DOCKER_PORT ) , tls = tls , timeout = 100 , version = '1.21' )
open a docker client to the given address .