- def notify_alarm(self, key, message, topic):
-
- payload_notify_alarm = jsmin(
- open(os.path.join(json_path, 'notify_alarm.json')).read())
-
- self.publish(key,
- value=message,
- topic='alarm_response')
-
- def list_alarm_response(self, key, message, topic):
-
- payload_list_alarm_resp = jsmin(
- open(os.path.join(json_path, 'list_alarm_resp.json')).read())
-
- self.publish(key,
- value=message,
- topic='alarm_response')
-
- def update_alarm_request(self, key, message, topic):
-
- # External to Mon
-
- payload_update_alarm_req = jsmin(
- open(os.path.join(json_path, 'update_alarm_req.json')).read())
-
- self.publish(key,
- value=json.dumps(payload_update_alarm_req),
- topic='alarm_request')
-
- def update_alarm_response(self, key, message, topic):
-
- # Internal to Mon
-
- payload_update_alarm_resp = jsmin(
- open(os.path.join(json_path, 'update_alarm_resp.json')).read())
+ def publish_alarm_response(self, key, message):
+ """Publish an alarm response."""
+ # Internal to MON