Updated code of metrics with listing functions and error handling
[osm/MON.git] / plugins / CloudWatch / metric_alarms.py
index 97b3c07..8d38e2f 100644 (file)
@@ -73,7 +73,8 @@ class MetricAlarm():
         alarm_id = alarm_info['alarm_name'] + "_" + alarm_info['resource_uuid']
         if self.is_present(cloudwatch_conn,alarm_id)['status'] == True: 
             alarm_id = None
-            log.debug ("Alarm already exists, Try updating the alarm using 'update_alarm_configuration()'")   
+            log.debug ("Alarm already exists, Try updating the alarm using 'update_alarm_configuration()'")
+            return alarm_id   
         else:              
             try:
                 if alarm_info['statistic'] in STATISTICS: