summaryrefslogtreecommitdiffhomepage
path: root/test/scenario_test/bgp_router_test.py
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2015-04-15 05:24:58 +0000
committerISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2015-04-15 05:24:58 +0000
commit3f6876df0b16043412972e7fd92377226bc9c89d (patch)
treed8b1e2a41a0dca1720929807cc8161568e7c3565 /test/scenario_test/bgp_router_test.py
parenta1114dc7bb6dcb165c6494799be94b5d10fe5b17 (diff)
api: add a method to convert internal structs to protobuf structs
- add ToApiStruct() for convertion of internal structs to protobuf structs to avoid ugly convertion by json.Marshal() && json.Unmarshal() - move grpc server code under /server instead of /api - update proto file to include more detailed path information Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'test/scenario_test/bgp_router_test.py')
-rw-r--r--test/scenario_test/bgp_router_test.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/scenario_test/bgp_router_test.py b/test/scenario_test/bgp_router_test.py
index 268f468d..f965d224 100644
--- a/test/scenario_test/bgp_router_test.py
+++ b/test/scenario_test/bgp_router_test.py
@@ -69,7 +69,6 @@ class GoBGPTest(GoBGPTestBase):
self.assert_global_rib()
-
# Test of advertising route to each quagga form gobgp
def test_03_advertising_route(self):
print "test_advertising_route"
@@ -157,7 +156,7 @@ class GoBGPTest(GoBGPTestBase):
still_exists = False
for dst in rib:
for path in dst['paths']:
- if path['network'] == removed_prefix:
+ if path['nlri']['prefix'] == removed_prefix:
still_exists = True
if not still_exists:
@@ -236,7 +235,7 @@ class GoBGPTest(GoBGPTestBase):
print "please wait " + str(self.initial_wait_time) + " second"
time.sleep(self.initial_wait_time)
- target_network = "192.168.20.0"
+ target_network = "192.168.20.0/24"
ans_nexthop = "10.0.0.3"
print "check whether target network %s 's nexthop is %s" % (target_network, ans_nexthop)