;;
"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..."
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')
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)
def main():
DownloadCodes()
- SetOnosIp()
+ if args.installer == "joid":
+ logger.debug( "Installer is Joid")
+ SetOnosIpForJoid()
+ else:
+ SetOnosIp()
RunScript("FUNCvirNetNB")
RunScript("FUNCvirNetNBL3")