Create VES client example for domain 'stndefined'
[oam.git] / solution / dev / ves-test-collector / client-scripts-ves-v7 / sendVesNotification.py
index 6c4d521..55b5d34 100644 (file)
@@ -23,7 +23,7 @@ import sys
 import getopt
 import json
 import requests
-from globalVesEventEmitter import getInitData, saveExample
+from globalVesEventEmitter import getInitData, saveExample, sendVesEvent
 
 # Construct VES body and send
 def performJob(domain, pnfId):
@@ -56,17 +56,10 @@ def performJob(domain, pnfId):
     saveExample(initData)
 
     # Send VES Event
-    url = initData['config']['vesEndpoint']['url']
-    username = initData['config']['vesEndpoint']['username']
-    password = initData['config']['vesEndpoint']['password']
-    verify = initData['config']['vesEndpoint']['verify']
-    response = requests.post(url, json=initData['body'], auth=(
-        username, password), verify=verify)
-    print(response)
-
-# Analysing command line parameters
+    sendVesEvent(initData)
 
 
+# Analysing command line parameters
 def main(argv):
     domain = 'notification'
     usage = 'sendVesNotification.py --pnfId <physical-network-function-nwuid>'