Esempio n. 1
0
def modify_notification_add(args, notifiers):
    notifier = notifiers[args.type] = {} if not args.type in notifiers else notifiers[args.type]
    if args.type == 'email':
        conf.list_add(notifier, 'recipients', conf.list_split(args.options))
        log.info("Added email recipients %s." % args.options)
    elif args.type == 'pushover':
        conf.dict_addstring(notifier, args.options, ['apikey', 'clientkey'])
        log.info("Added pushover options %s." % args.options)
Esempio n. 2
0
def modify_notification_add(args, notifiers):
    notifier = notifiers[
        args.type] = {} if not args.type in notifiers else notifiers[args.type]
    if args.type == 'email':
        conf.list_add(notifier, 'recipients', conf.list_split(args.options))
        log.info("Added email recipients %s." % args.options)
    elif args.type == 'pushover':
        conf.dict_addstring(notifier, args.options, ['apikey', 'clientkey'])
        log.info("Added pushover options %s." % args.options)
Esempio n. 3
0
def modify_notification_remove(args, notifiers):
    if args.type in notifiers:
        notifier = notifiers[args.type]
        if args.type == 'email':
            conf.list_remove(notifier, 'recipients', conf.list_split(args.options))
            log.info("Removed email recipients %s." % args.options)
        elif args.type == 'pushover':
            conf.dict_remove(notifier, args.options)
            log.info("Removed pushover channel %s." % args.options)
Esempio n. 4
0
def modify_notification_remove(args, notifiers):
    if args.type in notifiers:
        notifier = notifiers[args.type]
        if args.type == 'email':
            conf.list_remove(notifier, 'recipients',
                             conf.list_split(args.options))
            log.info("Removed email recipients %s." % args.options)
        elif args.type == 'pushover':
            conf.dict_remove(notifier, args.options)
            log.info("Removed pushover channel %s." % args.options)