summaryrefslogtreecommitdiffhomepage
path: root/test/scenario_test/route_server_policy_test.py
diff options
context:
space:
mode:
authorHiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp>2015-07-15 19:53:53 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-07-31 16:26:17 +0900
commit0b4b806c06f0ee50bb1bc1b30c38399553687abd (patch)
tree6898ec9eeb21a26668012c1c7743772da7b72214 /test/scenario_test/route_server_policy_test.py
parent2ad42ead02cce21cf71b3dde0731e8f5c6d4ac6a (diff)
config: use the latest openconfig yang
Diffstat (limited to 'test/scenario_test/route_server_policy_test.py')
-rw-r--r--test/scenario_test/route_server_policy_test.py25
1 files changed, 18 insertions, 7 deletions
diff --git a/test/scenario_test/route_server_policy_test.py b/test/scenario_test/route_server_policy_test.py
index 204b55b1..fe4304c5 100644
--- a/test/scenario_test/route_server_policy_test.py
+++ b/test/scenario_test/route_server_policy_test.py
@@ -230,7 +230,9 @@ class GoBGPTest(GoBGPTestBase):
self.initialize()
# add other network
- tn = qaccess.login(peer2)
+ tn = self.try_login_quagga(peer2)
+ self.assertIsNotNone(tn)
+
print "add network 192.168.20.0/24"
qaccess.add_network(tn, 65002, r2)
print "add network 192.168.200.0/24"
@@ -341,7 +343,9 @@ class GoBGPTest(GoBGPTestBase):
self.initialize()
# add other network
- tn = qaccess.login(peer2)
+ tn = self.try_login_quagga(peer2)
+ self.assertIsNotNone(tn)
+
print "add network 192.168.20.0/24"
qaccess.add_network(tn, 65002, r2)
print "add network 192.168.200.0/24"
@@ -565,7 +569,9 @@ class GoBGPTest(GoBGPTestBase):
self.initialize()
# add other network
- tn = qaccess.login(peer2)
+ tn = self.try_login_quagga(peer2)
+ self.assertIsNotNone(tn)
+
print "add network 2001:0:10:20::/64"
qaccess.add_network(tn, 65002, r2, use_ipv6=True)
print "add network 2001:0:10:200::/64"
@@ -678,7 +684,9 @@ class GoBGPTest(GoBGPTestBase):
self.initialize()
# add other network
- tn = qaccess.login(peer2)
+ tn = self.try_login_quagga(peer2)
+ self.assertIsNotNone(tn)
+
print "add network 2001:0:10:20::/64"
qaccess.add_network(tn, 65002, r2, use_ipv6=True)
print "add network 2001:0:10:200::/64"
@@ -934,7 +942,7 @@ class GoBGPTest(GoBGPTestBase):
# generate exabgp configuration file
prefix1 = "192.168.100.0/24"
asns = ['65100'] + [ str(asn) for asn in range(65099, 65090, -1) ]
- as_path = reduce(lambda a,b: a + " " + b, asns)
+ as_path = reduce(lambda a, b: a + " " + b, asns)
e = ExabgpConfig(EXABGP_COMMON_CONF)
e.add_route(prefix1, aspath=as_path)
@@ -953,6 +961,7 @@ class GoBGPTest(GoBGPTestBase):
self.initialize()
addresses = self.get_neighbor_address(self.gobgp_config)
+
self.retry_routine_for_state(addresses, "BGP_FSM_ESTABLISHED")
path = self.get_paths_in_localrib(peer1, prefix1, retry=self.retry_count_common)
@@ -963,7 +972,7 @@ class GoBGPTest(GoBGPTestBase):
self.assertIsNotNone(qpath)
# check local-rib in peer2
- path = self.get_paths_in_localrib(peer2, prefix1,retry=0)
+ path = self.get_paths_in_localrib(peer2, prefix1, retry=0)
self.assertIsNone(path)
# check show ip bgp on peer2(quagga2)
@@ -2309,7 +2318,9 @@ class GoBGPTest(GoBGPTestBase):
self.initialize()
# add other network
- tn = qaccess.login(peer2)
+ tn = self.try_login_quagga(peer2)
+ self.assertIsNotNone(tn)
+
print "add network 192.168.20.0/24"
qaccess.add_network(tn, 65002, r2)
print "add network 192.168.200.0/24"