Adds vdu_id to message bus models
[osm/MON.git] / osm_mon / plugins / CloudWatch / plugin_metric.py
index 8c897d8..3b7029f 100644 (file)
 '''
 AWS-Plugin implements all the methods of MON to interact with AWS using the BOTO client
 '''
+from osm_mon.core.message_bus.producer import KafkaProducer
+from osm_mon.plugins.CloudWatch.metrics import Metrics
 
 __author__ = "Wajeeha Hamid"
 __date__   = "18-September-2017"
 
-import sys
 import json
-from connection import Connection
-from metric_alarms import MetricAlarm
-from metrics import Metrics
-sys.path.append("../../core/message_bus")
-from producer import KafkaProducer
-import logging as log
+import logging
+
+log = logging.getLogger(__name__)
 
 class plugin_metrics():
     """Receives Alarm info from MetricAlarm and connects with the consumer/producer """
@@ -69,15 +67,7 @@ class plugin_metrics():
 #--------------------------------------------------------------------------------------------------------------------------- 
 
     def metric_calls(self,message,aws_conn):
-        '''Consumer will consume the message from SO,
-        1) parse the message and trigger the methods ac
-        cording to keys and topics provided in request.
-
-        2) The response from plugin is saved in json format.
-
-        3) The producer object then calls the producer response
-        methods to send the response back to message bus
-        '''
+        """Gets the message from the common consumer"""
         
         try:
             self.cloudwatch_conn = aws_conn['cloudwatch_connection']