summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2016-02-28 14:51:24 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-02-29 15:41:37 -0800
commit53c5bc0258cede44d3544270309b6dd2e83cf058 (patch)
tree2e6c9bcc1e75f53cd219d3b18259b3dc634b2eef /test
parent7dd4813776f4ef12b2b76d42e519d7193956fe3a (diff)
server: support active connection with md5 protection
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'test')
-rw-r--r--test/lib/exabgp.py7
-rw-r--r--test/lib/quagga.py2
-rw-r--r--test/scenario_test/bgp_router_test.py4
-rw-r--r--test/scenario_test/evpn_test.py4
4 files changed, 13 insertions, 4 deletions
diff --git a/test/lib/exabgp.py b/test/lib/exabgp.py
index af6b6e0c..5de3d65b 100644
--- a/test/lib/exabgp.py
+++ b/test/lib/exabgp.py
@@ -30,6 +30,7 @@ class ExaBGPContainer(BGPContainer):
def _start_exabgp(self):
cmd = CmdBuffer(' ')
cmd << 'env exabgp.log.destination={0}/exabgpd.log'.format(self.SHARED_VOLUME)
+ cmd << "exabgp.tcp.bind='0.0.0.0' exabgp.tcp.port=179"
cmd << './exabgp/sbin/exabgp {0}/exabgpd.conf'.format(self.SHARED_VOLUME)
self.local(str(cmd), flag='-d')
@@ -74,6 +75,12 @@ class ExaBGPContainer(BGPContainer):
cmd << ' asn4 disable;'
cmd << ' }'
+ if info['passwd']:
+ cmd << ' md5 "{0}";'.format(info['passwd'])
+
+ if info['passive']:
+ cmd << ' passive;'
+
routes = [r for r in self.routes.values() if r['rf'] == 'ipv4' or r['rf'] == 'ipv6']
if len(routes) > 0:
diff --git a/test/lib/quagga.py b/test/lib/quagga.py
index 81c8f666..e76c7a8b 100644
--- a/test/lib/quagga.py
+++ b/test/lib/quagga.py
@@ -197,6 +197,8 @@ class QuaggaBGPContainer(BGPContainer):
direction)
if info['passwd']:
c << 'neighbor {0} password {1}'.format(n_addr, info['passwd'])
+ if info['passive']:
+ c << 'neighbor {0} passive'.format(n_addr)
if version == 6:
c << 'address-family ipv6 unicast'
c << 'neighbor {0} activate'.format(n_addr)
diff --git a/test/scenario_test/bgp_router_test.py b/test/scenario_test/bgp_router_test.py
index b03d0ed2..3bac02ff 100644
--- a/test/scenario_test/bgp_router_test.py
+++ b/test/scenario_test/bgp_router_test.py
@@ -53,8 +53,8 @@ class GoBGPTestBase(unittest.TestCase):
time.sleep(initial_wait_time)
for q in qs:
- g1.add_peer(q, reload_config=False)
- q.add_peer(g1)
+ g1.add_peer(q, reload_config=False, passwd='passwd')
+ q.add_peer(g1, passwd='passwd', passive=True)
g1.create_config()
g1.reload_config()
diff --git a/test/scenario_test/evpn_test.py b/test/scenario_test/evpn_test.py
index b718bd3d..7920bf2b 100644
--- a/test/scenario_test/evpn_test.py
+++ b/test/scenario_test/evpn_test.py
@@ -58,8 +58,8 @@ class GoBGPTestBase(unittest.TestCase):
time.sleep(initial_wait_time)
for a, b in combinations(ctns, 2):
- a.add_peer(b, evpn=True)
- b.add_peer(a, evpn=True)
+ a.add_peer(b, evpn=True, passwd='evpn')
+ b.add_peer(a, evpn=True, passwd='evpn')
cls.g1 = g1
cls.g2 = g2