aboutsummaryrefslogtreecommitdiffstats
path: root/testcases/Controllers/ONOS/Teston/CI/adapters/client.py
diff options
context:
space:
mode:
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