diff options
-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'] |