- payload_create_alarm_resp = jsmin(
- open(os.path.join(json_path, 'create_alarm_resp.json')).read())
-
- self.publish(key,
- value=message,
- topic='alarm_response')
-
- def acknowledge_alarm(self, key, message, topic):
- """Alarm acknowledgement request from SO to MON."""
- # Internal to MON
-
- payload_acknowledge_alarm = jsmin(
- open(os.path.join(json_path, 'acknowledge_alarm.json')).read())
-
- self.publish(key,
- value=message,
- topic='alarm_request')
-
- def list_alarm_request(self, key, message, topic):
- """List alarms request from SO to MON."""
- # External to MON
-
- payload_alarm_list_req = jsmin(
- open(os.path.join(json_path, 'list_alarm_req.json')).read())
-
- self.publish(key,
- value=message,
- topic='alarm_request')
-
- def notify_alarm(self, key, message, topic):
- """Notify of triggered alarm from MON to SO."""
- 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):
- """Response for list alarms request from MON to SO."""
- 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):
- """Update alarm request from SO to MON."""
- # External to Mon
-
- payload_update_alarm_req = jsmin(
- open(os.path.join(json_path, 'update_alarm_req.json')).read())
-
- self.publish(key,
- value=message,
- topic='alarm_request')
-
- def update_alarm_response(self, key, message, topic):
- """Response from update alarm request from MON to SO."""
- # Internal to Mon
-
- payload_update_alarm_resp = jsmin(
- open(os.path.join(json_path, 'update_alarm_resp.json')).read())
-
- self.publish(key,
- value=message,
- topic='alarm_response')
-
- def delete_alarm_request(self, key, message, topic):
- """Delete alarm request from SO to MON."""
- # External to Mon
-
- payload_delete_alarm_req = jsmin(
- open(os.path.join(json_path, 'delete_alarm_req.json')).read())
-
- self.publish(key,
- value=message,
- topic='alarm_request')
-
- def delete_alarm_response(self, key, message, topic):
- """Response for a delete alarm request from MON to SO."""
- # Internal to Mon
-
- payload_delete_alarm_resp = jsmin(
- open(os.path.join(json_path, 'delete_alarm_resp.json')).read())
-