diff options
author | Naoto Hanaue <hanaue.naoto@po.ntts.co.jp> | 2015-04-20 18:44:01 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-04-22 18:12:51 +0900 |
commit | e8ff6de23a4b30af2aa495afadfb27d3afa7efcb (patch) | |
tree | 10be1ee115392c4a070a9153982652f5dcc85949 /test/scenario_test/gobgp_test.py | |
parent | c5264192a2295fa617cc1569257796fedf06d9b6 (diff) |
scenario_test: support to the new cli client
Diffstat (limited to 'test/scenario_test/gobgp_test.py')
-rw-r--r-- | test/scenario_test/gobgp_test.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/scenario_test/gobgp_test.py b/test/scenario_test/gobgp_test.py index d3bcdc21..5498275e 100644 --- a/test/scenario_test/gobgp_test.py +++ b/test/scenario_test/gobgp_test.py @@ -186,7 +186,8 @@ class GoBGPTestBase(unittest.TestCase): return True def ask_gobgp(self, what, who="", af="ipv4"): - cmd = "%s/%s -j -u %s -p %s show " % (CONFIG_DIR, CLI_CMD, self.gobgp_ip, self.gobgp_port) + af = "-a %s" % af + cmd = "%s/%s -j -u %s -p %s " % (CONFIG_DIR, CLI_CMD, self.gobgp_ip, self.gobgp_port) if what == GLOBAL_RIB: cmd += " ".join([what, af]) elif what == NEIGHBOR: @@ -198,8 +199,9 @@ class GoBGPTestBase(unittest.TestCase): return result def soft_reset(self, neighbor_address, route_family, type="in"): - cmd = "%s/%s -j -u %s -p %s softreset%s " % (CONFIG_DIR, CLI_CMD, self.gobgp_ip, self.gobgp_port, type) - cmd += "neighbor %s %s" % (neighbor_address, route_family) + cmd = "%s/%s -j -u %s -p %s " % (CONFIG_DIR, CLI_CMD, self.gobgp_ip, self.gobgp_port) + cmd += "neighbor %s " % neighbor_address + cmd += "softreset%s -a %s" % (type, route_family) local(cmd) def get_paths_in_localrib(self, neighbor_address, target_prefix, retry=3, interval=5): |