summaryrefslogtreecommitdiffhomepage
path: root/test/scenario_test/gobgp_test.py
diff options
context:
space:
mode:
authorHiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp>2015-08-19 11:39:46 +0900
committerHiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp>2015-08-19 17:31:29 +0900
commitfb91965dd47045339a78f2231169a9d32be52985 (patch)
tree91e6785c25bb3d1c753352615884d529b077ff5c /test/scenario_test/gobgp_test.py
parent34c10c943f9b581285316f529a982d69bf9d8fd5 (diff)
scenario_test: add ext-community action test
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: