2 Documentation The main interface for interacting with VES. It handles low level stuff like managing the http request library and VES required fields
3 Library RequestsLibrary
4 Library ../resources/xNFLibrary.py
5 Library ../resources/JsonValidatorLibrary.py
6 Library OperatingSystem
16 Get Event Data From File
17 [Arguments] ${jsonfile}
18 ${data}= OperatingSystem.Get File ${jsonfile}
19 #Should Not Be_Equal ${data} None
22 Publish Event To VES Collector
23 [Documentation] Send an event to VES Collector
24 [Arguments] ${url} ${evtpath} ${httpheaders} ${evtdata}
25 Log Creating session ${url}
26 ${session}= Create Session dcaegen2-d1 ${url}
27 ${resp}= Post Request dcaegen2-d1 ${evtpath} data=${evtdata} headers=${httpheaders}
28 #Log Received response from dcae ${resp.json()}
31 [Arguments] ${url} ${data}
32 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
33 ${resp}= Evaluate requests.post('${url}',data='${data}', headers=${headers},verify=False) requests
38 ${resp}= Evaluate requests.get('${url}') requests