Path resolution for core producer 23/5823/1
authorbhangare <sbhangare@vmware.com>
Tue, 23 Jan 2018 14:05:07 +0000 (06:05 -0800)
committerbhangare <sbhangare@vmware.com>
Tue, 23 Jan 2018 14:05:18 +0000 (06:05 -0800)
Change-Id: I592fb01c819a8cbf1c1670bd08dec56370b58489
Signed-off-by: bhangare <sbhangare@vmware.com>
osm_mon/plugins/vRealiseOps/plugin_receiver.py
osm_mon/plugins/vRealiseOps/vROPs_Webservice/vrops_webservice

index 18a5bcd..af56372 100644 (file)
@@ -27,16 +27,16 @@ responds using producer for vROPs
 """
 
 import sys
+import os
+import json
+import logging
+import traceback
 from mon_plugin_vrops import MonPlugin
 from kafka_consumer_vrops import vROP_KafkaConsumer
 #Core producer
-sys.path.append("../../core/message_bus")
-from producer import KafkaProducer
+sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..', '..'))
+from osm_mon.core.message_bus.producer import KafkaProducer
 #from core.message_bus.producer import KafkaProducer
-import json
-import logging
-import traceback
-import os
 from xml.etree import ElementTree as XmlElementTree
 
 schema_version = "1.0"
index 50b4928..4a55e73 100755 (executable)
@@ -41,8 +41,8 @@ import os
 import json
 import sys
 import requests
-sys.path.append("../../../core/message_bus")
-from producer import KafkaProducer
+ys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..', '..','..'))
+from osm_mon.core.message_bus.producer import KafkaProducer
 #from core.message_bus.producer import KafkaProducer
 
 try: