With Ubuntu base Docker image, Python 2.7 will always be used on
Scenario test containers if we just install "python-*".

This patch fixes to switch base Docker image and enables to use
the specific Python version.

Signed-off-by: IWASE Yusuke <[email protected]>
---
 ryu/tests/integrated/bgp/base.py           |  5 ++++-
 ryu/tests/integrated/bgp/base_ip6.py       |  5 ++++-
 ryu/tests/integrated/common/docker_base.py | 10 ----------
 3 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/ryu/tests/integrated/bgp/base.py b/ryu/tests/integrated/bgp/base.py
index 39186bb..26fa396 100644
--- a/ryu/tests/integrated/bgp/base.py
+++ b/ryu/tests/integrated/bgp/base.py
@@ -17,6 +17,7 @@
 from __future__ import absolute_import
 
 import logging
+import sys
 import unittest
 
 from ryu.tests.integrated.common import docker_base as ctn_base
@@ -40,7 +41,9 @@ class BgpSpeakerTestBase(unittest.TestCase):
         cls.bridges.append(cls.brdc1)
 
         cls.dockerimg = ctn_base.DockerImage()
-        cls.r_img = cls.dockerimg.create_ryu(check_exist=True)
+        image = 'python:%d.%d' % (
+            sys.version_info.major, sys.version_info.minor)
+        cls.r_img = cls.dockerimg.create_ryu(image=image, check_exist=True)
         cls.images.append(cls.r_img)
         cls.q_img = 'osrg/quagga'
         cls.images.append(cls.q_img)
diff --git a/ryu/tests/integrated/bgp/base_ip6.py 
b/ryu/tests/integrated/bgp/base_ip6.py
index ebe4e5b..be26faf 100644
--- a/ryu/tests/integrated/bgp/base_ip6.py
+++ b/ryu/tests/integrated/bgp/base_ip6.py
@@ -17,6 +17,7 @@
 from __future__ import absolute_import
 
 import logging
+import sys
 import unittest
 
 from ryu.tests.integrated.common import docker_base as ctn_base
@@ -40,7 +41,9 @@ class BgpSpeakerTestBase(unittest.TestCase):
         cls.bridges.append(cls.brdc1)
 
         cls.dockerimg = ctn_base.DockerImage()
-        cls.r_img = cls.dockerimg.create_ryu(check_exist=True)
+        image = 'python:%d.%d' % (
+            sys.version_info.major, sys.version_info.minor)
+        cls.r_img = cls.dockerimg.create_ryu(image=image, check_exist=True)
         cls.images.append(cls.r_img)
         cls.q_img = 'osrg/quagga'
         cls.images.append(cls.q_img)
diff --git a/ryu/tests/integrated/common/docker_base.py 
b/ryu/tests/integrated/common/docker_base.py
index 7e13313..e2f9a98 100644
--- a/ryu/tests/integrated/common/docker_base.py
+++ b/ryu/tests/integrated/common/docker_base.py
@@ -196,18 +196,8 @@ class DockerImage(object):
         workdir = os.path.join(TEST_BASE_DIR, tagname)
         workdir_ctn = '/root/osrg/ryu'
         pkges = ' '.join([
-            'telnet',
             'tcpdump',
             'iproute2',
-            'python-setuptools',
-            'python-pip',
-            'gcc',
-            'python-dev',
-            'libffi-dev',
-            'libssl-dev',
-            'libxml2-dev',
-            'libxslt1-dev',
-            'zlib1g-dev',
         ])
         if image:
             use_image = image
-- 
2.7.4


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to