aboutsummaryrefslogtreecommitdiffstats
path: root/testcases/Controllers/ONOS/Teston
diff options
context:
space:
mode:
authorwuwenbin2 <wuwenbin2@huawei.com>2016-07-29 17:18:53 +0800
committerwuwenbin2 <wuwenbin2@huawei.com>2016-07-30 09:56:44 +0800
commit86ff7d4f2fbe563f4b6ca781909c7c9d8681f39a (patch)
tree460104eab921a797c744b55c1e74dd7a10b792fa /testcases/Controllers/ONOS/Teston
parent34e80199fbb9829c2425ecf37b3998df692212eb (diff)
Add onos_sfc scenario
JIRA:ONOSFW-172 Change-Id: I019edf79f8d343f794aa7af151d8e30c18e2c5f6 Signed-off-by: wuwenbin2 <wuwenbin2@huawei.com>
Diffstat (limited to 'testcases/Controllers/ONOS/Teston')
-rwxr-xr-xtestcases/Controllers/ONOS/Teston/onosfunctest.py24
1 files changed, 17 insertions, 7 deletions
diff --git a/testcases/Controllers/ONOS/Teston/onosfunctest.py b/testcases/Controllers/ONOS/Teston/onosfunctest.py
index 35ced61c..2790e694 100755
--- a/testcases/Controllers/ONOS/Teston/onosfunctest.py
+++ b/testcases/Controllers/ONOS/Teston/onosfunctest.py
@@ -18,6 +18,7 @@ import datetime
import os
import re
import time
+import argparse
from neutronclient.v2_0 import client as neutronclient
@@ -25,6 +26,11 @@ import functest.utils.functest_logger as ft_logger
import functest.utils.functest_utils as functest_utils
import functest.utils.openstack_utils as openstack_utils
+parser = argparse.ArgumentParser()
+parser.add_argument("-t", "--testcase", help="Testcase name")
+args = parser.parse_args()
+
+
""" logging configuration """
logger = ft_logger.Logger("onos").getLogger()
@@ -215,11 +221,9 @@ def SetSfcConf():
logger.info("Modify configuration for SFC")
-def main():
+def OnosTest():
start_time = time.time()
stop_time = start_time
- # DownloadCodes()
- # if args.installer == "joid":
if INSTALLER_TYPE == "joid":
logger.debug("Installer is Joid")
SetOnosIpForJoid()
@@ -254,13 +258,19 @@ def main():
except:
logger.error("Error pushing results into Database")
- if DEPLOY_SCENARIO == "os-onos-sfc-ha":
+ if status == "FAIL":
+ EXIT_CODE = -1
+ exit(EXIT_CODE)
+
+
+def main():
+
+ if args.testcase == "sfc":
CreateImage()
SetSfcConf()
SfcTest()
-
- # CleanOnosTest()
-
+ else:
+ OnosTest()
if __name__ == '__main__':
main()