Merge "Remove unused compare_version"

This commit is contained in:
Jenkins 2017-04-12 01:58:56 +00:00 committed by Gerrit Code Review
commit 55f02836c3

View File

@ -12,11 +12,9 @@
import contextlib import contextlib
import six import six
import docker
from docker import client from docker import client
from docker import errors from docker import errors
from docker import tls from docker import tls
from docker.utils import utils
from zun.common import exception from zun.common import exception
import zun.conf import zun.conf
@ -25,18 +23,6 @@ from zun import objects
CONF = zun.conf.CONF CONF = zun.conf.CONF
def is_docker_library_version_atleast(version):
if utils.compare_version(docker.version, version) <= 0:
return True
return False
def is_docker_api_version_atleast(docker, version):
if utils.compare_version(docker.version()['ApiVersion'], version) <= 0:
return True
return False
@contextlib.contextmanager @contextlib.contextmanager
def docker_client(): def docker_client():
client_kwargs = dict() client_kwargs = dict()