From e1372d3c4955a92f36bfb50ae5925dac2fc0b89c Mon Sep 17 00:00:00 2001 From: tomsou Date: Thu, 9 Nov 2017 16:53:54 +0200 Subject: Adapt bgp daemon to run properly for testcase3 Since apex includes a new version of zrpcd compatible with Carbon and Nitrogen [0], an adaptation is needed for bgp daemon enabling and running within testcase3 Note that zrpcd run now as a process and not as a service JIRA: SDNVPN-172 [0] https://jira.opnfv.org/projects/APEX/issues/APEX-508 Change-Id: Ia0ec4ab0f15ecf3d5c76c5fa541fe8338762ecaf Signed-off-by: tomsou --- sdnvpn/test/functest/testcase_3.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/sdnvpn/test/functest/testcase_3.py b/sdnvpn/test/functest/testcase_3.py index fe1d116..88fb421 100644 --- a/sdnvpn/test/functest/testcase_3.py +++ b/sdnvpn/test/functest/testcase_3.py @@ -70,11 +70,14 @@ def main(): logger.info("Checking if zrpcd is " "running on the controller node") - cmd = "systemctl status zrpcd |grep -i running" - output = controller.run_cmd(cmd) + output_zrpcd = controller.run_cmd("ps --no-headers -C " + "zrpcd -o state") + states = output_zrpcd.split() + running = any([s != 'Z' for s in states]) + msg = ("zrpcd is running") - if not output: + if not running: logger.info("zrpcd is not running on the controller node") results.add_failure(msg) else: @@ -83,6 +86,11 @@ def main(): results.add_to_summary(0, "-") + # Ensure that ZRPCD ip & port are well configured within ODL + add_client_conn_to_bgp = "bgp-connect -p 7644 -h 127.0.0.1 add" + test_utils.run_odl_cmd(controller, add_client_conn_to_bgp) + + # Start bgp daemon start_quagga = "odl:configure-bgp -op start-bgp-server " \ "--as-num 100 --router-id {0}".format(controller_ext_ip) test_utils.run_odl_cmd(controller, start_quagga) -- cgit 1.2.3-korg