diff options
author | Gary Wu <gary.i.wu@huawei.com> | 2018-09-27 15:29:15 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-09-27 15:29:15 +0000 |
commit | f2f9278a5839949dee07c0174ab433a83e8e4dbf (patch) | |
tree | 946dedeeb5dd38d5d88e3979aff21ea912440f67 /test/csit/tests/usecases/5G-bulkpm/resources/bulkpm_keywords.robot | |
parent | 4fab8f0830672c8accb36ad594e708daee36c2e8 (diff) | |
parent | 4b97e33295086748108ecb042461719fb09600ba (diff) |
Merge "Renaming 5G Bulk PM to usecase/5G-bulkpm"
Diffstat (limited to 'test/csit/tests/usecases/5G-bulkpm/resources/bulkpm_keywords.robot')
-rw-r--r-- | test/csit/tests/usecases/5G-bulkpm/resources/bulkpm_keywords.robot | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/test/csit/tests/usecases/5G-bulkpm/resources/bulkpm_keywords.robot b/test/csit/tests/usecases/5G-bulkpm/resources/bulkpm_keywords.robot new file mode 100644 index 000000000..6859ea0df --- /dev/null +++ b/test/csit/tests/usecases/5G-bulkpm/resources/bulkpm_keywords.robot @@ -0,0 +1,38 @@ + *** Settings *** +Documentation The main interface for interacting with VES. It handles low level stuff like managing the http request library and VES required fields +Library RequestsLibrary +Library ../resources/xNFLibrary.py +Library OperatingSystem +Library Collections +Library requests +Library Collections +Library String + +*** Variables *** + +*** Keywords *** + +Get Event Data From File + [Arguments] ${jsonfile} + ${data}= OperatingSystem.Get File ${jsonfile} + #Should Not Be_Equal ${data} None + [return] ${data} + +Publish Event To VES Collector + [Documentation] Send an event to VES Collector + [Arguments] ${url} ${evtpath} ${httpheaders} ${evtdata} + Log Creating session ${url} + ${session}= Create Session dcaegen2-d1 ${url} + ${resp}= Post Request dcaegen2-d1 ${evtpath} data=${evtdata} headers=${httpheaders} + #Log Received response from dcae ${resp.json()} + [return] ${resp} +PostCall + [Arguments] ${url} ${data} + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json + ${resp}= Evaluate requests.post('${url}',data='${data}', headers=${headers},verify=False) requests + [Return] ${resp} + +GetCall + [Arguments] ${url} + ${resp}= Evaluate requests.get('${url}') requests + [Return] ${resp} |