Exemple #1
0
 def execute(self, context: 'Context') -> None:
     """Call the OpsgenieAlertHook to close alert"""
     self.hook = OpsgenieAlertHook(self.opsgenie_conn_id)
     self.hook.close_alert(
         identifier=self.identifier,
         identifier_type=self.identifier_type,
         payload=self._build_opsgenie_close_alert_payload(),
         **(self.close_alert_kwargs or {}),
     )
Exemple #2
0
 def execute(self, context: 'Context') -> None:
     """Call the OpsgenieAlertHook to delete alert"""
     hook = OpsgenieAlertHook(self.opsgenie_conn_id)
     hook.delete_alert(
         identifier=self.identifier,
         identifier_type=self.identifier_type,
         user=self.user,
         source=self.source,
     )
Exemple #3
0
 def execute(self, context: 'Context') -> None:
     """Call the OpsgenieAlertHook to post message"""
     self.hook = OpsgenieAlertHook(self.opsgenie_conn_id)
     self.hook.create_alert(self._build_opsgenie_payload())