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 OperatingSystem
15 Get Event Data From File
16 [Arguments] ${jsonfile}
17 ${data}= OperatingSystem.Get File ${jsonfile}
18 #Should Not Be_Equal ${data} None
21 Publish Event To VES Collector
22 [Documentation] Send an event to VES Collector
23 [Arguments] ${url} ${evtpath} ${httpheaders} ${evtdata}
24 Log Creating session ${url}
25 ${session}= Create Session dcaegen2-d1 ${url}
26 ${resp}= Post Request dcaegen2-d1 ${evtpath} data=${evtdata} headers=${httpheaders}
27 #Log Received response from dcae ${resp.json()}
30 [Arguments] ${url} ${data}
31 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
32 ${resp}= Evaluate requests.post('${url}',data='${data}', headers=${headers},verify=False) requests
37 ${resp}= Evaluate requests.get('${url}') requests