diff options
-rw-r--r-- | ryu/tests/integrated/common/docker_base.py | 16 | ||||
-rw-r--r-- | ryu/tests/integrated/common/install_docker_test_pkg_common.sh | 2 |
2 files changed, 5 insertions, 13 deletions
diff --git a/ryu/tests/integrated/common/docker_base.py b/ryu/tests/integrated/common/docker_base.py index 2986cc90..5fb8bc79 100644 --- a/ryu/tests/integrated/common/docker_base.py +++ b/ryu/tests/integrated/common/docker_base.py @@ -23,7 +23,6 @@ import logging import subprocess import time -from docker import Client import netaddr import six @@ -497,18 +496,11 @@ class Container(object): else: return self.cmd.sudo(cmd, capture=capture) - def exec_on_ctn(self, cmd, capture=True, stream=False, detach=False): + def exec_on_ctn(self, cmd, capture=True, detach=False): name = self.docker_name() - if stream: - # This needs root permission. - dcli = Client(timeout=120, version='auto') - i = dcli.exec_create(container=name, cmd=cmd) - return dcli.exec_start(i['Id'], tty=True, - stream=stream, detach=detach) - else: - flag = '-d' if detach else '' - return self.dcexec('docker exec {0} {1} {2}'.format( - flag, name, cmd), capture=capture) + flag = '-d' if detach else '' + return self.dcexec('docker exec {0} {1} {2}'.format( + flag, name, cmd), capture=capture) def get_containers(self, allctn=False): cmd = 'docker ps --no-trunc=true' diff --git a/ryu/tests/integrated/common/install_docker_test_pkg_common.sh b/ryu/tests/integrated/common/install_docker_test_pkg_common.sh index 3a54c4c7..08b059ac 100644 --- a/ryu/tests/integrated/common/install_docker_test_pkg_common.sh +++ b/ryu/tests/integrated/common/install_docker_test_pkg_common.sh @@ -33,5 +33,5 @@ function install_depends_pkg { sudo rm -rf $DIR_BASE/pipework git clone https://github.com/jpetazzo/pipework.git $DIR_BASE/pipework sudo install -m 0755 $DIR_BASE/pipework/pipework /usr/local/bin/pipework - $SUDO_PIP pip install docker-py pycrypto nsenter + $SUDO_PIP pip install pycrypto nsenter } |