summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdocker/run_tests.sh8
-rw-r--r--testcases/Controllers/ONOS/Teston/CI/onosfunctest.py19
2 files changed, 23 insertions, 4 deletions
diff --git a/docker/run_tests.sh b/docker/run_tests.sh
index d24a00948..ff390453f 100755
--- a/docker/run_tests.sh
+++ b/docker/run_tests.sh
@@ -63,7 +63,7 @@ function odl_tests(){
elif [ $INSTALLER_TYPE == "apex" ]; then
:
elif [ $INSTALLER_TYPE == "joid" ]; then
- odl_ip=$(env | grep ODL_CONTROLLER | cut -f2 -d'=')
+ odl_ip=$(env | grep SDN_CONTROLLER | cut -f2 -d'=')
neutron_ip=$(keystone catalog --service network | grep publicURL | cut -f3 -d"/" | cut -f1 -d":")
odl_port=8080
:
@@ -164,7 +164,11 @@ test/csit/suites/vpnservice
;;
"onos")
info "Running ONOS test case..."
- python ${FUNCTEST_REPO_DIR}/testcases/Controllers/ONOS/Teston/CI/onosfunctest.py
+ if [ $INSTALLER_TYPE == "joid" ]; then
+ python ${FUNCTEST_REPO_DIR}/testcases/Controllers/ONOS/Teston/CI/onosfunctest.py -i joid
+ else
+ python ${FUNCTEST_REPO_DIR}/testcases/Controllers/ONOS/Teston/CI/onosfunctest.py
+ fi
;;
"promise")
info "Running PROMISE test case..."
diff --git a/testcases/Controllers/ONOS/Teston/CI/onosfunctest.py b/testcases/Controllers/ONOS/Teston/CI/onosfunctest.py
index 64b8ac1de..eb2c7936c 100644
--- a/testcases/Controllers/ONOS/Teston/CI/onosfunctest.py
+++ b/testcases/Controllers/ONOS/Teston/CI/onosfunctest.py
@@ -21,7 +21,11 @@ import logging
import yaml
import datetime
import re
+import argparse
+parser = argparse.ArgumentParser()
+parser.add_argument("-i", "--installer", help="Installer type")
+args = parser.parse_args()
""" logging configuration """
logger = logging.getLogger('onos')
@@ -97,7 +101,14 @@ def GetResult():
def SetOnosIp():
cmd = "keystone catalog --service network | grep publicURL"
cmd_output = os.popen(cmd).read()
- print cmd_output
+ OC1=re.search(r"\d+\.\d+\.\d+\.\d+",cmd_output).group()
+ os.environ['OC1'] = OC1
+ time.sleep(2)
+ logger.debug( "ONOS IP is " + OC1)
+
+def SetOnosIpForJoid():
+ cmd = "env | grep SDN_CONTROLLER"
+ cmd_output = os.popen(cmd).read()
OC1=re.search(r"\d+\.\d+\.\d+\.\d+",cmd_output).group()
os.environ['OC1'] = OC1
time.sleep(2)
@@ -113,7 +124,11 @@ def CleanOnosTest():
def main():
DownloadCodes()
- SetOnosIp()
+ if args.installer == "joid":
+ logger.debug( "Installer is Joid")
+ SetOnosIpForJoid()
+ else:
+ SetOnosIp()
RunScript("FUNCvirNetNB")
RunScript("FUNCvirNetNBL3")