Merge "Upgrade from docker-py to docker"
This commit is contained in:
commit
ecb61b58bc
@ -31,5 +31,5 @@ six>=1.9.0 # MIT
|
||||
WSME>=0.8 # MIT
|
||||
SQLAlchemy!=1.1.5,!=1.1.6,!=1.1.7,!=1.1.8,>=1.0.10 # MIT
|
||||
stevedore>=1.20.0 # Apache-2.0
|
||||
docker-py>=1.8.1 # Apache-2.0
|
||||
docker>=2.0.0 # Apache-2.0
|
||||
netaddr!=0.7.16,>=0.7.13 # BSD
|
||||
|
@ -12,9 +12,8 @@
|
||||
import contextlib
|
||||
import six
|
||||
|
||||
from docker import client
|
||||
import docker
|
||||
from docker import errors
|
||||
from docker import tls
|
||||
|
||||
from zun.common import exception
|
||||
import zun.conf
|
||||
@ -41,7 +40,7 @@ def docker_client():
|
||||
raise exception.DockerError(error_msg=six.text_type(e))
|
||||
|
||||
|
||||
class DockerHTTPClient(client.Client):
|
||||
class DockerHTTPClient(docker.APIClient):
|
||||
def __init__(self, url=CONF.docker.api_url,
|
||||
ver=CONF.docker.docker_remote_api_version,
|
||||
timeout=CONF.docker.default_timeout,
|
||||
@ -50,7 +49,7 @@ class DockerHTTPClient(client.Client):
|
||||
client_cert=None):
|
||||
|
||||
if ca_cert and client_key and client_cert:
|
||||
ssl_config = tls.TLSConfig(
|
||||
ssl_config = docker.tls.TLSConfig(
|
||||
client_cert=(client_cert, client_key),
|
||||
verify=ca_cert,
|
||||
assert_hostname=False,
|
||||
|
Loading…
x
Reference in New Issue
Block a user