summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorHiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp>2015-09-17 19:19:56 +0900
committerHiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp>2015-09-17 20:12:39 +0900
commit37dffe0cfc687b33037c7846d567e4a7e9503cd9 (patch)
treec2e9882472d1c37e58860d1acbd013de4fecbafb
parentccd9164cbb3ca30a0636f647720fb5f8671c92c3 (diff)
scenario_test: generate zebra config
Signed-off-by: Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp>
-rw-r--r--test/scenario_test/lib/gobgp.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/scenario_test/lib/gobgp.py b/test/scenario_test/lib/gobgp.py
index 2c48c179..445c4205 100644
--- a/test/scenario_test/lib/gobgp.py
+++ b/test/scenario_test/lib/gobgp.py
@@ -39,8 +39,6 @@ class GoBGPContainer(BGPContainer):
def _start_gobgp(self):
zebra_op = ''
- if self.zebra:
- zebra_op = '-z'
c = CmdBuffer()
c << '#!/bin/bash'
c << '/go/bin/gobgpd -f {0}/gobgpd.conf -l {1} -p {2} > ' \
@@ -276,6 +274,9 @@ class GoBGPContainer(BGPContainer):
if len(policy_list) > 0:
config['PolicyDefinitions'] = {'PolicyDefinitionList': policy_list}
+ if self.zebra:
+ config['Global']['Zebra'] = {'Enabled': True}
+
with open('{0}/gobgpd.conf'.format(self.config_dir), 'w') as f:
print colors.yellow('[{0}\'s new config]'.format(self.name))
print colors.yellow(indent(toml.dumps(config)))