Revert "Add the PATCH method for the monitoring API"
[pti/o2.git] / o2app / entrypoints / redis_eventconsumer.py
index 439619b..c95133a 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2021-2024 Wind River Systems, Inc.
+# Copyright (C) 2021 Wind River Systems, Inc.
 #
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
@@ -49,7 +49,6 @@ def main():
     pubsub.subscribe('DmsChanged')
     pubsub.subscribe('ResourceChanged')
     pubsub.subscribe('AlarmEventChanged')
-    pubsub.subscribe('AlarmEventPurged')
 
     for m in pubsub.listen():
         try:
@@ -139,17 +138,6 @@ def handle_changed(m, bus):
             eventtype=data['notificationEventType'],
             updatetime=data['updatetime']))
         bus.handle(cmd)
-    elif channel == 'AlarmEventPurged':
-        datastr = m['data']
-        data = json.loads(datastr)
-        logger.info('AlarmEventPurged with cmd:{}'.format(data))
-        ref = api_monitoring_base + \
-            monitor_api_version + '/alarms/' + data['id']
-        cmd = imscmd.PurgeAlarmEvent(data=AlarmEvent2SMO(
-            id=data['id'], ref=ref,
-            eventtype=data['notificationEventType'],
-            updatetime=data['updatetime']))
-        bus.handle(cmd)
     else:
         logger.info("unhandled:{}".format(channel))