From 13b6a3d5198e119aa17a2d32c16642364a80250b Mon Sep 17 00:00:00 2001 From: bhangare Date: Tue, 23 Jan 2018 06:05:07 -0800 Subject: [PATCH] Path resolution for core producer Change-Id: I592fb01c819a8cbf1c1670bd08dec56370b58489 Signed-off-by: bhangare --- osm_mon/plugins/vRealiseOps/plugin_receiver.py | 12 ++++++------ .../vRealiseOps/vROPs_Webservice/vrops_webservice | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) 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: -- 2.25.1