aboutsummaryrefslogtreecommitdiffstats
path: root/testcases/Controllers/ONOS/Teston/CI/adapters/client.py
diff options
context:
space:
mode:
authorlanqinglong <lanqinglong@huawei.com>2015-10-09 21:19:49 +0800
committerlanqinglong <lanqinglong@huawei.com>2015-10-10 11:01:22 +0800
commitdd53db9a5ffae2f71b89bc8d9d82f64104384541 (patch)
treeafeaa338e3d80f37fc7403e5f18511338e14ad8b /testcases/Controllers/ONOS/Teston/CI/adapters/client.py
parent295fe1dd4b70dc33c9da15006811a65863d19e51 (diff)
Use new client script to run onos test
JIRA:FUNCTEST-61 Add client.py modify some scripts Change-Id: Icc562ec5211dfea664f89086d259cc7fc011e3a4 Signed-off-by: lanqinglong <lanqinglong@huawei.com>
Diffstat (limited to 'testcases/Controllers/ONOS/Teston/CI/adapters/client.py')
-rw-r--r--testcases/Controllers/ONOS/Teston/CI/adapters/client.py35
1 files changed, 35 insertions, 0 deletions
diff --git a/testcases/Controllers/ONOS/Teston/CI/adapters/client.py b/testcases/Controllers/ONOS/Teston/CI/adapters/client.py
new file mode 100644
index 00000000..25adcbe0
--- /dev/null
+++ b/testcases/Controllers/ONOS/Teston/CI/adapters/client.py
@@ -0,0 +1,35 @@
+"""
+Description:
+ This file is used to run testcase
+ lanqinglong@huawei.com
+"""
+from environment import environment
+
+class client( environment ):
+
+ def __init__( self ):
+ environment.__init__( self )
+ self.loginfo = environment()
+
+ def RunScript( self, testname ):
+ """
+ Run ONOS Test Script
+ Parameters:
+ testname: ONOS Testcase Name
+ masterusername: The server username of running ONOS
+ masterpassword: The server password of running ONOS
+ """
+ self.ChangeTestCasePara( testname, self.masterusername, self.masterpassword )
+ runtest = "OnosSystemTest/TestON/bin/cli.py run " + testname
+ os.system(runtest)
+ print "Done!"
+
+ def onosbasic(self):
+ #This is the compass run machine user&pass,you need to modify
+
+ print "Test Begin....."
+ self.OnosConnectionSet()
+ masterhandle = self.SSHlogin(self.localhost, self.masterusername,
+ self.masterpassword)
+ self.OnosEnvSetup( masterhandle )
+ self.SSHRelease( masterhandle ) \ No newline at end of file