Merge "Fix another upgrade from docker-py to docker place"

This commit is contained in:
Jenkins 2017-07-11 06:52:30 +00:00 committed by Gerrit Code Review
commit 076c921229

View File

@ -20,8 +20,7 @@ import inspect
from oslo_config import cfg from oslo_config import cfg
import six import six
from docker import client import docker
from docker import tls
CONF = cfg.CONF CONF = cfg.CONF
DEFAULT_TIMEOUT_SECONDS = 120 DEFAULT_TIMEOUT_SECONDS = 120
@ -52,7 +51,7 @@ def filter_data(f):
return wrapper return wrapper
class DockerHTTPClient(client.Client): class DockerHTTPClient(docker.APIClient):
def __init__(self, url='unix://var/run/docker.sock'): def __init__(self, url='unix://var/run/docker.sock'):
if (CONF.docker.cert_file or if (CONF.docker.cert_file or
CONF.docker.key_file): CONF.docker.key_file):
@ -62,7 +61,7 @@ class DockerHTTPClient(client.Client):
if (CONF.docker.ca_file or if (CONF.docker.ca_file or
CONF.docker.api_insecure or CONF.docker.api_insecure or
client_cert): client_cert):
ssl_config = tls.TLSConfig( ssl_config = docker.tls.TLSConfig(
client_cert=client_cert, client_cert=client_cert,
ca_cert=CONF.docker.ca_file, ca_cert=CONF.docker.ca_file,
verify=CONF.docker.api_insecure) verify=CONF.docker.api_insecure)