From f506fc56c70f7d4a220264f1ab172b6adca12be5 Mon Sep 17 00:00:00 2001 From: "dimitris.tsiolakis" Date: Wed, 3 Oct 2018 17:12:47 +0300 Subject: Fix testcase_3 After new Apex release Opendaylight run in container. This enhancement identifies the controllers where the Opendaylight runs, for both containerized and none containerized installations. Change-Id: I336176a9a74486a3f91a36508bb848a90bc6bda2 Signed-off-by: dimitris.tsiolakis --- sdnvpn/test/functest/testcase_3.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/sdnvpn/test/functest/testcase_3.py b/sdnvpn/test/functest/testcase_3.py index b06915a..258652f 100644 --- a/sdnvpn/test/functest/testcase_3.py +++ b/sdnvpn/test/functest/testcase_3.py @@ -40,12 +40,23 @@ def main(): results.add_to_summary(0, "=") openstack_nodes = test_utils.get_nodes() + installer_type = str(os.environ['INSTALLER_TYPE'].lower()) # node.is_odl() doesn't work in Apex # https://jira.opnfv.org/browse/RELENG-192 - controllers = [node for node in openstack_nodes - if "running" in - node.run_cmd("sudo systemctl status opendaylight")] + fuel_cmd = "sudo systemctl status opendaylight" + apex_cmd = "sudo docker exec opendaylight_api " \ + "/opt/opendaylight/bin/status" + health_cmd = "sudo docker ps -f name=opendaylight_api -f " \ + "health=healthy -q" + if installer_type in ["fuel"]: + controllers = [node for node in openstack_nodes + if "running" in node.run_cmd(fuel_cmd)] + elif installer_type in ["apex"]: + controllers = [node for node in openstack_nodes + if node.run_cmd(health_cmd) + if "Running" in node.run_cmd(apex_cmd)] + computes = [node for node in openstack_nodes if node.is_compute()] msg = ("Verify that OpenDaylight can start/communicate with zrpcd/Quagga") -- cgit 1.2.3-korg