Merge "Remove unused compare_version"
This commit is contained in:
commit
55f02836c3
@ -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()
|
||||||
|
Loading…
Reference in New Issue
Block a user