diff options
author | dimitris.tsiolakis <dmts@intracom-telecom.com> | 2018-10-02 17:34:27 +0300 |
---|---|---|
committer | Dimitris Tsiolakis <dmts@intracom-telecom.com> | 2018-10-05 09:12:52 +0000 |
commit | 3c95b11bcd889f1a5e9eb76ade16e985ceec1f03 (patch) | |
tree | 5ee0ade4e98c1d363a7c05d2385ec7241d3552e0 | |
parent | 4d9843200ef1dde2442667cd077afb24f09087ba (diff) |
Fix testcase_9
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: I5821bfa7ddce40eb76d3c2cddfcbc112b058f737
Signed-off-by: dimitris.tsiolakis <dmts@intracom-telecom.com>
-rw-r--r-- | sdnvpn/test/functest/testcase_9.py | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/sdnvpn/test/functest/testcase_9.py b/sdnvpn/test/functest/testcase_9.py index b77360d..c74ceb5 100644 --- a/sdnvpn/test/functest/testcase_9.py +++ b/sdnvpn/test/functest/testcase_9.py @@ -15,6 +15,7 @@ # - Verify that the OpenDaylight and gateway Quagga peer import logging import sys +import os from sdnvpn.lib import config as sdnvpn_config from sdnvpn.lib import utils as test_utils @@ -34,12 +35,21 @@ 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)] msg = ("Verify that all OpenStack nodes OVS br-int have " "fail_mode set to secure") |