def list_alerts(self, context, query_para): # First query alerts and then translate to model alert_list = self.client.list_alerts() alert_model_list = alert_handler.AlertHandler()\ .parse_queried_alerts(alert_list, query_para) return alert_model_list
def parse_alert(self, context, alert): return alert_handler.AlertHandler().parse_alert(context, alert)