diff options
author | Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp> | 2015-03-09 19:01:19 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-03-09 19:01:19 +0900 |
commit | a71bd7802a404c1c279326d3b0107470e383c05e (patch) | |
tree | 541b3990c315f5e54ca121d1a8465cb329b46a08 /test | |
parent | 12965dd2177b06e215a0b4cf6036aa110ba0aa49 (diff) |
scenario_test: specify address-family in the URL to get local-rib
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'test')
-rw-r--r-- | test/scenario_test/route_server_ipv4_v6_test.py | 4 | ||||
-rw-r--r-- | test/scenario_test/route_server_test.py | 16 |
2 files changed, 15 insertions, 5 deletions
diff --git a/test/scenario_test/route_server_ipv4_v6_test.py b/test/scenario_test/route_server_ipv4_v6_test.py index 5ba17959..fa882f1b 100644 --- a/test/scenario_test/route_server_ipv4_v6_test.py +++ b/test/scenario_test/route_server_ipv4_v6_test.py @@ -91,7 +91,9 @@ class GoBGPIPv6Test(unittest.TestCase): for address in self.get_neighbor_address(self.gobgp_config): print "check of [ " + address[0] + " : " + address[1] + " ]" # get local-rib per peer - url = "http://" + self.gobgp_ip + ":" + self.gobgp_port + "/v1/bgp/neighbor/" + address[0] + "/local-rib" + af = "/ipv6" if address[1] == "IPv6" else "/ipv4" + url = "http://" + self.gobgp_ip + ":" + self.gobgp_port \ + + "/v1/bgp/neighbor/" + address[0] + "/local-rib" + af r = requests.get(url) local_rib = json.loads(r.text) diff --git a/test/scenario_test/route_server_test.py b/test/scenario_test/route_server_test.py index dbaa0d43..c93de865 100644 --- a/test/scenario_test/route_server_test.py +++ b/test/scenario_test/route_server_test.py @@ -89,7 +89,9 @@ class GoBGPTest(unittest.TestCase): for address in self.get_neighbor_address(self.gobgp_config): print "check of [ " + address + " ]" # get local-rib per peer - url = "http://" + self.gobgp_ip + ":" + self.gobgp_port + "/v1/bgp/neighbor/" + address + "/local-rib" + af = "/ipv4" + url = "http://" + self.gobgp_ip + ":" + self.gobgp_port +\ + "/v1/bgp/neighbor/" + address + "/local-rib" + af r = requests.get(url) local_rib = json.loads(r.text) @@ -172,7 +174,9 @@ class GoBGPTest(unittest.TestCase): for address in self.get_neighbor_address(self.gobgp_config): print "check of [ " + address + " ]" # get local-rib per peer - url = "http://" + self.gobgp_ip + ":" + self.gobgp_port + "/v1/bgp/neighbor/" + address + "/local-rib" + af = "/ipv4" + url = "http://" + self.gobgp_ip + ":" + self.gobgp_port +\ + "/v1/bgp/neighbor/" + address + "/local-rib" + af r = requests.get(url) local_rib = json.loads(r.text) @@ -264,7 +268,9 @@ class GoBGPTest(unittest.TestCase): print "check of [ " + address + " ]" # get local-rib per peer - url = "http://" + self.gobgp_ip + ":" + self.gobgp_port + "/v1/bgp/neighbor/" + address + "/local-rib" + af = "/ipv4" + url = "http://" + self.gobgp_ip + ":" + self.gobgp_port +\ + "/v1/bgp/neighbor/" + address + "/local-rib" + af r = requests.get(url) local_rib = json.loads(r.text) @@ -395,7 +401,9 @@ class GoBGPTest(unittest.TestCase): # get local-rib rep_nexthop = "" target_exist = False - url = "http://" + self.gobgp_ip + ":" + self.gobgp_port + "/v1/bgp/neighbor/" + check_address + "/local-rib" + af = "/ipv4" + url = "http://" + self.gobgp_ip + ":" + self.gobgp_port +\ + "/v1/bgp/neighbor/" + check_address + "/local-rib" + af r = requests.get(url) local_rib = json.loads(r.text) g_dests = local_rib['Destinations'] |