summaryrefslogtreecommitdiffhomepage
path: root/test/scenario_test/gobgp_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/scenario_test/gobgp_test.py')
-rw-r--r--test/scenario_test/gobgp_test.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/scenario_test/gobgp_test.py b/test/scenario_test/gobgp_test.py
index 45f36f1e..34a94c7d 100644
--- a/test/scenario_test/gobgp_test.py
+++ b/test/scenario_test/gobgp_test.py
@@ -231,7 +231,7 @@ class GoBGPTestBase(unittest.TestCase):
if len(g_dest) > 0:
assert len(g_dest) == 1
d = g_dest[0]
- return d['paths']
+ return d['paths'][0]
else:
retry_count += 1
if retry_count > retry:
@@ -326,7 +326,7 @@ class GoBGPTestBase(unittest.TestCase):
# get route information on quagga
- def check_community(self, neighbor_address, target_addr, community, retry=3, interval=-1, af=IPv4):
+ def check_community(self, neighbor_address, target_addr, community, retry=3, interval=-1, af=IPv4, extended=False):
if interval < 0:
interval = self.wait_per_retry
print "check route %s on quagga : %s" % (target_addr, neighbor_address)
@@ -334,7 +334,11 @@ class GoBGPTestBase(unittest.TestCase):
while True:
tn = qaccess.login(neighbor_address)
- result = qaccess.check_community(tn, target_addr, community, af)
+ result = False
+ if extended:
+ result = qaccess.check_ext_community(tn, target_addr, community, af)
+ else:
+ result = qaccess.check_community(tn, target_addr, community, af)
qaccess.logout(tn)
if result: