diff options
author | Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp> | 2015-06-24 21:32:11 +0900 |
---|---|---|
committer | Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp> | 2015-07-01 14:26:31 +0900 |
commit | d45e2c9dfafb78001dd3b17fe42c1eb822bff3e9 (patch) | |
tree | b1c5315fe35da5e89d876ab0d82900d3b4ab3cc2 /test/scenario_test/gobgp_test.py | |
parent | 8339ada8dfffd086a4fadc10e729bbe07d3e3e83 (diff) |
scenario_test: add test cases for distribute policy
Diffstat (limited to 'test/scenario_test/gobgp_test.py')
-rw-r--r-- | test/scenario_test/gobgp_test.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/scenario_test/gobgp_test.py b/test/scenario_test/gobgp_test.py index 78a29823..e416db2c 100644 --- a/test/scenario_test/gobgp_test.py +++ b/test/scenario_test/gobgp_test.py @@ -205,6 +205,13 @@ class GoBGPTestBase(unittest.TestCase): cmd += "softreset%s -a %s" % (type, af) local(cmd) + def set_policy(self, peer, target, policy_name, default_accept=True): + default_policy = "ACCEPT" if default_accept else "REJECT" + cmd = "%s " % CLI_CMD + cmd += NEIGHBOR + " %s " % peer + cmd += POLICY + " add %s %s %s" % (target, policy_name, default_policy) + local(cmd) + def get_paths_in_localrib(self, neighbor_address, target_prefix, af="ipv4", retry=3, interval=5): retry_count = 0 while True: |