summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorfumihiko kakuma <kakuma@valinux.co.jp>2017-01-17 08:06:33 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2017-01-23 22:24:15 +0900
commite9099345d2b9de9a8563695732dafff000f7e65a (patch)
treea6dd938ded3d113f29b19d9b84a08c196ffe3fcf
parent17e2e51924ea85c73607394d784d58e015eb34d5 (diff)
docker_base.py: fix an ip option of "docker network connect"
ip address with subnet is ignored in ip option of "docker network connect" This patch specifies a correct ip format for option. Signed-off-by: Fumihiko Kakuma <kakuma@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--ryu/tests/integrated/common/docker_base.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/ryu/tests/integrated/common/docker_base.py b/ryu/tests/integrated/common/docker_base.py
index 6f7892db..1ae2cc27 100644
--- a/ryu/tests/integrated/common/docker_base.py
+++ b/ryu/tests/integrated/common/docker_base.py
@@ -374,14 +374,15 @@ class Bridge(object):
ipv4 = None
ipv6 = None
ip_address = self.next_ip_address()
+ ip_address_ip = ip_address.split('/')[0]
version = 4
if netaddr.IPNetwork(ip_address).version == 6:
version = 6
- opt_ip = "--ip %s" % ip_address
+ opt_ip = "--ip %s" % ip_address_ip
if version == 4:
ipv4 = ip_address
else:
- opt_ip = "--ip6 %s" % ip_address
+ opt_ip = "--ip6 %s" % ip_address_ip
ipv6 = ip_address
cmd = "docker network connect %s %s %s" % (
opt_ip, self.name, ctn.docker_name())