summaryrefslogtreecommitdiffhomepage
path: root/test/scenario_test/lib/exabgp.py
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2015-08-22 17:42:29 +0900
committerISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2015-08-22 17:48:57 +0900
commite0c7d1823a0ffa5661f7b2dd54810e0fd92f72fb (patch)
tree4e0fcadd8142db39d2d62849f2d416c7dbc89d66 /test/scenario_test/lib/exabgp.py
parentcbd731658749acad58759e4f7fe0849d5111a3b3 (diff)
test: enable parallel execution of malformed test
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'test/scenario_test/lib/exabgp.py')
-rw-r--r--test/scenario_test/lib/exabgp.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/scenario_test/lib/exabgp.py b/test/scenario_test/lib/exabgp.py
index f5cdd313..cf5fbc1a 100644
--- a/test/scenario_test/lib/exabgp.py
+++ b/test/scenario_test/lib/exabgp.py
@@ -82,7 +82,10 @@ class ExaBGPContainer(BGPContainer):
cmd << ' static {'
for route in routes:
r = CmdBuffer(' ')
- r << ' route {0} next-hop {1}'.format(route['prefix'], local_addr)
+ nexthop = local_addr
+ if route['next-hop']:
+ nexthop = route['next-hop']
+ r << ' route {0} next-hop {1}'.format(route['prefix'], nexthop)
if route['as-path']:
r << 'as-path [{0}]'.format(' '.join(str(i) for i in route['as-path']))
if route['community']:
@@ -92,7 +95,7 @@ class ExaBGPContainer(BGPContainer):
if route['extended-community']:
r << 'extended-community [{0}]'.format(route['extended-community'])
if route['attr']:
- r << 'attribute {0}'.format(route['attr'])
+ r << 'attribute [ {0} ]'.format(route['attr'])
cmd << '{0};'.format(str(r))
cmd << ' }'