summaryrefslogtreecommitdiffstats
path: root/testcases/Controllers/ONOS/Teston/CI/adapters/client.py
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2015-10-16 11:54:44 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2015-10-16 11:54:44 +0000
commitb68e0fc717fb462790250bfb0b6ecddc13ae4c51 (patch)
tree24e2bf38018b45dd6740e4cd7d524ac04d156f9d /testcases/Controllers/ONOS/Teston/CI/adapters/client.py
parent31fec5a3682a38f1124766cde116aea6a5d69bd4 (diff)
parent15a6d133f8c7689df58306656cc1c6cff46496d5 (diff)
Merge "Move the configuration from test scripts to config_functest.yaml"
Diffstat (limited to 'testcases/Controllers/ONOS/Teston/CI/adapters/client.py')
-rw-r--r--testcases/Controllers/ONOS/Teston/CI/adapters/client.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/testcases/Controllers/ONOS/Teston/CI/adapters/client.py b/testcases/Controllers/ONOS/Teston/CI/adapters/client.py
index c84f187fa..32e3749f0 100644
--- a/testcases/Controllers/ONOS/Teston/CI/adapters/client.py
+++ b/testcases/Controllers/ONOS/Teston/CI/adapters/client.py
@@ -14,6 +14,7 @@ class client( environment ):
def __init__( self ):
environment.__init__( self )
self.loginfo = environment()
+ self.testcase = ''
def RunScript( self, handle, testname, timeout=300 ):
"""
@@ -23,6 +24,7 @@ class client( environment ):
masterusername: The server username of running ONOS
masterpassword: The server password of running ONOS
"""
+ self.testcase = testname
self.ChangeTestCasePara( testname, self.masterusername, self.masterpassword )
runhandle = handle
runtest = self.home + "/OnosSystemTest/TestON/bin/cli.py run " + testname
@@ -56,3 +58,12 @@ class client( environment ):
def onosclean( self, handle ):
self.SSHRelease( handle )
+ self.loginfo.log('Release onos handle Successful')
+
+ def push_results_to_db( self, payload, pushornot = 1):
+ url = self.Result_DB + "/results"
+ params = {"project_name": "functest", "case_name": "ONOS-" + self.testcase,
+ "pod_name": 'huawei-build-2', "details": payload}
+ headers = {'Content-Type': 'application/json'}
+ r = requests.post(url, data=json.dumps(params), headers=headers)
+ self.loginfo.log('Pushing result via Northbound, info:' + r )