diff options
author | lanqinglong <lanqinglong@huawei.com> | 2015-10-16 16:49:08 +0800 |
---|---|---|
committer | lanqinglong <lanqinglong@huawei.com> | 2015-10-16 17:30:28 +0800 |
commit | 15a6d133f8c7689df58306656cc1c6cff46496d5 (patch) | |
tree | a786ccbfc613ee1ac7793a4e183bb76041240386 /testcases/Controllers/ONOS/Teston/CI/adapters/client.py | |
parent | b26ce9549342625bded0fb81434f58bf4ccd9ba3 (diff) |
Move the configuration from test scripts to config_functest.yaml
JIRA:FUNCTEST-77
The configuration is in onos test files
Get them out, put in config_functest.yaml
Change-Id: I3f7b868b61a7e66596f7c0cc232c5b045d77aecb
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.py | 11 |
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 c84f187f..32e3749f 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 ) |