Move to the latest docker client over docker-py python client.
If you are running an old docker-engine, just update with:
sudo service docker stop && sudo apt-get -y install docker-engine
And you should be good to go.
If you don't run the prerequisites, this change should be backward compatible with older docker clients installations.
Change-Id: Ieaa08586df1b29fc5b0fc72710736b17ae9a5f65
diff --git a/src/test/setup/cord-test.py b/src/test/setup/cord-test.py
index f2c4600..8b7e0fc 100755
--- a/src/test/setup/cord-test.py
+++ b/src/test/setup/cord-test.py
@@ -31,7 +31,10 @@
from CordTestServer import cord_test_server_start,cord_test_server_stop,cord_test_server_shutdown,CORD_TEST_HOST,CORD_TEST_PORT
from TestManifest import TestManifest
from VolthaCtrl import VolthaService
-from docker import Client
+try:
+ from docker import APIClient as Client
+except:
+ from docker import Client
from docker.utils import kwargs_from_env
from Xos import XosServiceProfile
try:
diff --git a/src/test/setup/requirements.txt b/src/test/setup/requirements.txt
index 94a195c..57cdaed 100644
--- a/src/test/setup/requirements.txt
+++ b/src/test/setup/requirements.txt
@@ -2,7 +2,7 @@
scapy==2.3.2
monotonic
configObj
-docker-py
+docker
nsenter
pyroute2
netaddr
diff --git a/src/test/utils/CordContainer.py b/src/test/utils/CordContainer.py
index 841fcd0..ba62ef7 100644
--- a/src/test/utils/CordContainer.py
+++ b/src/test/utils/CordContainer.py
@@ -23,7 +23,10 @@
from pyroute2.netlink import NetlinkError
from itertools import chain
from nsenter import Namespace
-from docker import Client
+try:
+ from docker import APIClient as Client
+except:
+ from docker import Client
from docker import utils as dockerutils
import shutil
from OnosCtrl import OnosCtrl
diff --git a/src/test/utils/CordLogger.py b/src/test/utils/CordLogger.py
index 18517b4..ae7334a 100644
--- a/src/test/utils/CordLogger.py
+++ b/src/test/utils/CordLogger.py
@@ -4,7 +4,10 @@
from CordTestUtils import log_test as log
from onosclidriver import OnosCliDriver
from OnosCtrl import OnosCtrl
-from docker import Client
+try:
+ from docker import APIClient as Client
+except:
+ from docker import Client
from CordContainer import *
import json
import requests