Merge "Upgrade from docker-py to docker"

This commit is contained in:
Jenkins 2017-07-19 03:19:33 +00:00 committed by Gerrit Code Review
commit 7333ae330f
11 changed files with 13 additions and 22 deletions

View File

@ -53,10 +53,7 @@ import docker
def get_docker_client():
try:
return docker.Client
except AttributeError:
return docker.APIClient
return docker.APIClient
def main():

View File

@ -198,10 +198,7 @@ import docker
def get_docker_client():
try:
return docker.Client
except AttributeError:
return docker.APIClient
return docker.APIClient
class DockerWorker(object):

View File

@ -109,10 +109,7 @@ def gen_commandline(params):
def get_docker_client():
try:
return docker.Client
except AttributeError:
return docker.APIClient
return docker.APIClient
def main():

View File

@ -52,8 +52,8 @@
easy_install: name=pip
become: True
- name: Install docker-py
pip: name=docker-py state=latest
- name: Install docker SDK for python
pip: name=docker state=latest
become: True
- name: Remove packages

View File

@ -1,5 +1,5 @@
---
- name: Checking docker-py version
- name: Checking docker SDK version
command: "{{ ansible_python.executable }} -c \"import docker; print docker.__version__\""
register: result
changed_when: false

View File

@ -1,4 +1,4 @@
---
docker_version_min: '1.10.0'
docker_py_version_min: '1.8.1'
docker_py_version_min: '2.0.0'
ansible_version_min: '2.2.0'

View File

@ -76,7 +76,7 @@ function prep_work {
exit 1
fi
pip install --upgrade docker-py
pip install --upgrade docker
}
# Do some cleanup after the installation of kolla

View File

@ -105,7 +105,7 @@ Component Min Version Max Version Comment
===================== =========== =========== =========================
Ansible 2.2.0 none On deployment host
Docker 1.10.0 none On target nodes
Docker Python 1.8.1 none On target nodes
Docker Python 2.0.0 none On target nodes
Python Jinja2 2.8.0 none On deployment host
===================== =========== =========== =========================
@ -242,7 +242,7 @@ Or using ``pip`` to install the latest version:
::
pip install -U docker-py
pip install -U docker
OpenStack, RabbitMQ, and Ceph require all hosts to have matching times to

View File

@ -2,7 +2,7 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
pbr!=2.1.0,>=2.0.0 # Apache-2.0
docker-py>=1.8.1 # Apache-2.0
docker>=2.0.0 # Apache-2.0
Jinja2!=2.9.0,!=2.9.1,!=2.9.2,!=2.9.3,!=2.9.4,>=2.8 # BSD License (3 clause)
six>=1.9.0 # MIT
oslo.config!=4.3.0,!=4.4.0,>=4.0.0 # Apache-2.0

View File

@ -173,7 +173,7 @@ FAKE_DATA = {
}
@mock.patch("docker.Client")
@mock.patch("docker.APIClient")
def get_DockerWorker(mod_param, mock_dclient):
module = mock.MagicMock()
module.params = mod_param

View File

@ -126,7 +126,7 @@ function setup_ansible {
mkdir /tmp/kolla
# TODO(SamYaple): Move to virtualenv
sudo -H pip install -U "ansible>=2" "docker-py>=1.6.0" "python-openstackclient" "python-neutronclient" "ara"
sudo -H pip install -U "ansible>=2" "docker>=2.0.0" "python-openstackclient" "python-neutronclient" "ara"
detect_distro
setup_inventory