From: bhangare Date: Tue, 23 Jan 2018 14:05:07 +0000 (-0800) Subject: Path resolution for core producer X-Git-Tag: v4.0.0~35^2 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F23%2F5823%2F1;p=osm%2FMON.git Path resolution for core producer Change-Id: I592fb01c819a8cbf1c1670bd08dec56370b58489 Signed-off-by: bhangare --- diff --git a/osm_mon/plugins/vRealiseOps/plugin_receiver.py b/osm_mon/plugins/vRealiseOps/plugin_receiver.py index 18a5bcd..af56372 100644 --- a/osm_mon/plugins/vRealiseOps/plugin_receiver.py +++ b/osm_mon/plugins/vRealiseOps/plugin_receiver.py @@ -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" diff --git a/osm_mon/plugins/vRealiseOps/vROPs_Webservice/vrops_webservice b/osm_mon/plugins/vRealiseOps/vROPs_Webservice/vrops_webservice index 50b4928..4a55e73 100755 --- a/osm_mon/plugins/vRealiseOps/vROPs_Webservice/vrops_webservice +++ b/osm_mon/plugins/vRealiseOps/vROPs_Webservice/vrops_webservice @@ -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: