diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2015-11-07 23:17:04 +0900 |
---|---|---|
committer | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2015-11-11 00:28:34 +0900 |
commit | 6dacfb38bf6e5c32abe39cfdfe825d3702316855 (patch) | |
tree | aff47e475ce978bcd8667ca104933ba97cd3c72b /test/scenario_test/lib/exabgp.py | |
parent | 84d73c1b45006c40764c1587207b5ad67598e893 (diff) |
scenario_test: use default interface for ipv4-peering
avoid creating many linux bridges via pipework
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.py | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/test/scenario_test/lib/exabgp.py b/test/scenario_test/lib/exabgp.py index e14a084b..39298c4c 100644 --- a/test/scenario_test/lib/exabgp.py +++ b/test/scenario_test/lib/exabgp.py @@ -65,15 +65,7 @@ class ExaBGPContainer(BGPContainer): for peer, info in self.peers.iteritems(): cmd << 'neighbor {0} {{'.format(info['neigh_addr'].split('/')[0]) cmd << ' router-id {0};'.format(self.router_id) - - local_addr = '' - for me, you in itertools.product(self.ip_addrs, peer.ip_addrs): - if me[2] == you[2]: - local_addr = me[1] - if local_addr == '': - raise Exception('local_addr not found') - local_addr = local_addr.split('/')[0] - cmd << ' local-address {0};'.format(local_addr) + cmd << ' local-address {0};'.format(info['local_addr'].split('/')[0]) cmd << ' local-as {0};'.format(self.asn) cmd << ' peer-as {0};'.format(peer.asn) @@ -83,7 +75,7 @@ class ExaBGPContainer(BGPContainer): cmd << ' static {' for route in routes: r = CmdBuffer(' ') - nexthop = local_addr + nexthop = info['local_addr'].split('/')[0] if route['next-hop']: nexthop = route['next-hop'] r << ' route {0} next-hop {1}'.format(route['prefix'], nexthop) |