+ def update_alarm_status(self, alarm_state: str, uuid):
+ modified_count = self.common_db.set_one(
+ "alarms", {"uuid": uuid}, {"alarm_status": alarm_state}
+ )
+ return modified_count
+
+ def update_alarm_extra_labels(self, alarm_labels: dict, uuid):
+ modified_count = self.common_db.set_one(
+ "alarms", {"uuid": uuid}, {"extra_labels": alarm_labels}
+ )
+ return modified_count
+
+ def get_alarm_by_uuid(self, uuid: str):
+ return self.common_db.get_one("alarms", {"uuid": uuid})
+