diff options
author | Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp> | 2015-09-17 19:19:56 +0900 |
---|---|---|
committer | Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp> | 2015-09-17 20:12:39 +0900 |
commit | 37dffe0cfc687b33037c7846d567e4a7e9503cd9 (patch) | |
tree | c2e9882472d1c37e58860d1acbd013de4fecbafb /test | |
parent | ccd9164cbb3ca30a0636f647720fb5f8671c92c3 (diff) |
scenario_test: generate zebra config
Signed-off-by: Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp>
Diffstat (limited to 'test')
-rw-r--r-- | test/scenario_test/lib/gobgp.py | 5 |
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))) |