Merge "Upgrade from docker-py to docker"
This commit is contained in:
commit
7333ae330f
@ -53,10 +53,7 @@ import docker
|
|||||||
|
|
||||||
|
|
||||||
def get_docker_client():
|
def get_docker_client():
|
||||||
try:
|
return docker.APIClient
|
||||||
return docker.Client
|
|
||||||
except AttributeError:
|
|
||||||
return docker.APIClient
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
@ -198,10 +198,7 @@ import docker
|
|||||||
|
|
||||||
|
|
||||||
def get_docker_client():
|
def get_docker_client():
|
||||||
try:
|
return docker.APIClient
|
||||||
return docker.Client
|
|
||||||
except AttributeError:
|
|
||||||
return docker.APIClient
|
|
||||||
|
|
||||||
|
|
||||||
class DockerWorker(object):
|
class DockerWorker(object):
|
||||||
|
@ -109,10 +109,7 @@ def gen_commandline(params):
|
|||||||
|
|
||||||
|
|
||||||
def get_docker_client():
|
def get_docker_client():
|
||||||
try:
|
return docker.APIClient
|
||||||
return docker.Client
|
|
||||||
except AttributeError:
|
|
||||||
return docker.APIClient
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
@ -52,8 +52,8 @@
|
|||||||
easy_install: name=pip
|
easy_install: name=pip
|
||||||
become: True
|
become: True
|
||||||
|
|
||||||
- name: Install docker-py
|
- name: Install docker SDK for python
|
||||||
pip: name=docker-py state=latest
|
pip: name=docker state=latest
|
||||||
become: True
|
become: True
|
||||||
|
|
||||||
- name: Remove packages
|
- name: Remove packages
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
- name: Checking docker-py version
|
- name: Checking docker SDK version
|
||||||
command: "{{ ansible_python.executable }} -c \"import docker; print docker.__version__\""
|
command: "{{ ansible_python.executable }} -c \"import docker; print docker.__version__\""
|
||||||
register: result
|
register: result
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
---
|
---
|
||||||
docker_version_min: '1.10.0'
|
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'
|
ansible_version_min: '2.2.0'
|
||||||
|
@ -76,7 +76,7 @@ function prep_work {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pip install --upgrade docker-py
|
pip install --upgrade docker
|
||||||
}
|
}
|
||||||
|
|
||||||
# Do some cleanup after the installation of kolla
|
# Do some cleanup after the installation of kolla
|
||||||
|
@ -105,7 +105,7 @@ Component Min Version Max Version Comment
|
|||||||
===================== =========== =========== =========================
|
===================== =========== =========== =========================
|
||||||
Ansible 2.2.0 none On deployment host
|
Ansible 2.2.0 none On deployment host
|
||||||
Docker 1.10.0 none On target nodes
|
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
|
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
|
OpenStack, RabbitMQ, and Ceph require all hosts to have matching times to
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# of appearance. Changing the order has an impact on the overall integration
|
# of appearance. Changing the order has an impact on the overall integration
|
||||||
# process, which may cause wedges in the gate later.
|
# process, which may cause wedges in the gate later.
|
||||||
pbr!=2.1.0,>=2.0.0 # Apache-2.0
|
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)
|
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
|
six>=1.9.0 # MIT
|
||||||
oslo.config!=4.3.0,!=4.4.0,>=4.0.0 # Apache-2.0
|
oslo.config!=4.3.0,!=4.4.0,>=4.0.0 # Apache-2.0
|
||||||
|
@ -173,7 +173,7 @@ FAKE_DATA = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@mock.patch("docker.Client")
|
@mock.patch("docker.APIClient")
|
||||||
def get_DockerWorker(mod_param, mock_dclient):
|
def get_DockerWorker(mod_param, mock_dclient):
|
||||||
module = mock.MagicMock()
|
module = mock.MagicMock()
|
||||||
module.params = mod_param
|
module.params = mod_param
|
||||||
|
@ -126,7 +126,7 @@ function setup_ansible {
|
|||||||
mkdir /tmp/kolla
|
mkdir /tmp/kolla
|
||||||
|
|
||||||
# TODO(SamYaple): Move to virtualenv
|
# 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
|
detect_distro
|
||||||
|
|
||||||
setup_inventory
|
setup_inventory
|
||||||
|
Loading…
Reference in New Issue
Block a user