Ejemplo 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)
Ejemplo 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)
Ejemplo 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)
Ejemplo 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)