X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=solution%2Fdev%2Fves-test-collector%2Fclient-scripts-ves-v7%2FsendVesHeartbeat.py;fp=solution%2Fdev%2Fves-test-collector%2Fclient-scripts-ves-v7%2FsendVesHeartbeat.py;h=b2066fbbc80b06b12cfeacc7184df58728a052a2;hb=f9e11bbaa0d9db27bd418a1e7b2634a54cdf054f;hp=4e1ff2d1daec340faae4702bc83dc6e969e0ffc0;hpb=562a65a378c3ce3df48947a1a335b89f59f17940;p=oam.git diff --git a/solution/dev/ves-test-collector/client-scripts-ves-v7/sendVesHeartbeat.py b/solution/dev/ves-test-collector/client-scripts-ves-v7/sendVesHeartbeat.py index 4e1ff2d..b2066fb 100644 --- a/solution/dev/ves-test-collector/client-scripts-ves-v7/sendVesHeartbeat.py +++ b/solution/dev/ves-test-collector/client-scripts-ves-v7/sendVesHeartbeat.py @@ -21,7 +21,7 @@ # importing the datetime, json, requests, os socket and yaml library import json import requests -from globalVesEventEmitter import getInitData +from globalVesEventEmitter import getInitData, saveExample # Globals domain = 'heartbeat' @@ -45,9 +45,7 @@ initData['body']['event']['commonEventHeader']['nfVendorName'] = 'O-RAN-SC OAM' initData['body']['event']['heartbeatFields']['additionalFields']['eventTime'] = initData['eventTime'] # Save example body -outputFileName = initData['directory'] + '/json/examples/' + domain + '.json' -with open(outputFileName, 'w') as f: - json.dump(initData['body'], f, indent=2, sort_keys=True) +saveExample(initData) # Send VES Event url = initData['config']['vesEndpoint']['url']