summaryrefslogtreecommitdiffstats
path: root/testcases/Controllers/ONOS/Teston/CI/adapters/client.py
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2015-10-12 08:09:22 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2015-10-12 08:09:22 +0000
commitd9f2b10c12895db9501d26431b3b6f2e4b3d0e9c (patch)
tree55ff05e20f4e44337a5dfbc9f1cbe3074eb6e04c /testcases/Controllers/ONOS/Teston/CI/adapters/client.py
parent4d737767bfd653b262b4b20933be2fad2adca5e8 (diff)
parentdd53db9a5ffae2f71b89bc8d9d82f64104384541 (diff)
Merge "Use new client script to run onos test"
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 000000000..25adcbe08
--- /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