Beispiel #1
0
 def notify(self, alert, query, user, new_state, app, host):
     if self.destination:
         return self.destination.notify(alert, query, user, new_state, app, host)
     else:
         # User email subscription, so create an email destination object
         config = {"addresses": self.user.email}
         schema = get_configuration_schema_for_destination_type("email")
         options = ConfigurationContainer(config, schema)
         destination = get_destination("email", options)
         return destination.notify(alert, query, user, new_state, app, host, options)
Beispiel #2
0
 def notify(self, alert, query, user, new_state, app, host):
     if self.destination:
         return self.destination.notify(alert, query, user, new_state,
                                        app, host)
     else:
         # User email subscription, so create an email destination object
         config = {'addresses': self.user.email}
         schema = get_configuration_schema_for_destination_type('email')
         options = ConfigurationContainer(config, schema)
         destination = get_destination('email', options)
         return destination.notify(alert, query, user, new_state, app, host, options)
Beispiel #3
0
 def notify(self, alert, query, user, new_state, app, host):
     if self.destination:
         return self.destination.notify(alert, query, user, new_state, app,
                                        host)
     else:
         # User email subscription, so create an email destination object
         config = {'email': self.user.email}
         schema = get_configuration_schema_for_destination_type('email')
         options = ConfigurationContainer(json.dumps(config), schema)
         destination = get_destination('email', options)
         return destination.notify(alert, query, user, new_state, app, host,
                                   options)
Beispiel #4
0
 def destination(self):
     return get_destination(self.type, self.options)