diff --git a/alertaclient/api.py b/alertaclient/api.py index f3931a8..d42028c 100644 --- a/alertaclient/api.py +++ b/alertaclient/api.py @@ -498,6 +498,9 @@ def escalate(self): def reactivate_notification_rules(self): self.http.session.get(self.http.endpoint + '/notificationrules/reactivate', auth=self.http.auth, timeout=self.http.timeout) + def fire_delayed_notifications(self): + self.http.session.get(self.http.endpoint + '/notificationdelay/fire', auth=self.http.auth, timeout=self.http.timeout) + class ApiKeyAuth(AuthBase): diff --git a/alertaclient/commands/cmd_notfication_delay.py b/alertaclient/commands/cmd_notfication_delay.py new file mode 100644 index 0000000..f6e5a58 --- /dev/null +++ b/alertaclient/commands/cmd_notfication_delay.py @@ -0,0 +1,9 @@ +import click + + +@click.command('fire_delayed_notifications', short_help='Fire delayed notifications') +@click.pass_obj +def cli(obj): + """Firing delayed notification rules""" + client = obj['client'] + client.fire_delayed_notifications()