ooiservices/app/main/notifications_redmine.py
def begin_notification_redmine(alert_alarm, alert_alarm_definition, user_event_notification):
    """
    Initiate the notification for the escalation process, either for an alert or an alarm.
    Process:
    - Use alert_alarm, alert_alarm_definition, user_event_notification information
    * Create initial notification (for example, create red mine ticket and get ticket id)
    - if successful, then:
        alert_alarm.escalated =True;
        alert_alarms_escalated = dt.datetime.strftime(dt.datetime.now(), "%Y-%m-%dT%H:%M:%S")
        alert_alarm.ticket_id = ticket_id (id from redmine or zero (0) otherwise)
        persist escalation field changes with update_alert_alarm
    """
    ticket_id = None
    try:
        # Create redmine ticket
        ticket_id = create_redmine_notification(alert_alarm, alert_alarm_definition, user_event_notification)
        return ticket_id

    except Exception as err:
        message = '[begin_notification_redmine] %s ' % err.message
        current_app.logger.info(message)
        return ticket_id

    Initiate the notification for the escalation process, either for an alert or an alarm.
    Process:
    - Use alert_alarm, alert_alarm_definition, user_event_notification information
    * Create initial notification (for example, create red mine ticket and get ticket id)
    - if successful, then:
        alert_alarm.escalated =True;
        alert_alarms_escalated = dt.datetime.strftime(dt.datetime.now(), "%Y-%m-%dT%H:%M:%S")
        alert_alarm.ticket_id = ticket_id (id from redmine or zero (0) otherwise)
        persist escalation field changes with update_alert_alarm
    
Initiate the notification for the escalation process, either for an alert or an alarm.
Initiate the notification for the escalation process either for an alert or an alarm .
def begin_notification_redmine(alert_alarm, alert_alarm_definition, user_event_notification):
    ticket_id = None
    try:
        ticket_id = create_redmine_notification(alert_alarm, alert_alarm_definition, user_event_notification)
        return ticket_id
    except Exception as err:
        message = '[begin_notification_redmine] %s ' % err.message
        current_app.logger.info(message)
        return ticket_id
def begin_notification_redmine ( alert_alarm , alert_alarm_definition , user_event_notification ) : ticket_id = None try : ticket_id = create_redmine_notification ( alert_alarm , alert_alarm_definition , user_event_notification ) return ticket_id except Exception as err : message = '[begin_notification_redmine] %s ' % err . message current_app . logger . info ( message ) return ticket_id
Initiate the notification for the escalation process, either for an alert or an alarm.
Initiate the notification for the escalation process either for an alert or an alarm .
"""
    Initiate the notification for the escalation process, either for an alert or an alarm.
    Process:
    - Use alert_alarm, alert_alarm_definition, user_event_notification information
    * Create initial notification (for example, create red mine ticket and get ticket id)
    - if successful, then:
        alert_alarm.escalated =True;
        alert_alarms_escalated = dt.datetime.strftime(dt.datetime.now(), "%Y-%m-%dT%H:%M:%S")
        alert_alarm.ticket_id = ticket_id (id from redmine or zero (0) otherwise)
        persist escalation field changes with update_alert_alarm
    """ # Create redmine ticket
alert_alarm
alert_alarm_definition
user_event_notification