Beispiel #1
0
def modify_site(args, config):
    sites = config['sites'] = {} if not 'sites' in config else config['sites']

    if args.action == 'add': modify_site_add(args, sites)
    elif args.action == 'remove': modify_site_remove(args, sites)

    conf.write_json(CONFIG_NAME, config)
Beispiel #2
0
def modify_site(args, config):
    sites = config['sites'] = {} if not 'sites' in config else config['sites']

    if args.action == 'add': modify_site_add(args, sites)
    elif args.action == 'remove': modify_site_remove(args, sites)

    conf.write_json(CONFIG_NAME, config)
Beispiel #3
0
def modify_notification(args, config):
    notifiers = config['notifiers'] = {} if not 'notifiers' in config else config['notifiers']

    if args.action == 'add': modify_notification_add(args, notifiers)
    elif args.action == 'remove': modify_notification_remove(args, notifiers)

    conf.write_json(CONFIG_NAME, config)
Beispiel #4
0
def modify_connection(args, config):
    connections = config['connections'] = {} if not 'connections' in config else config['connections']

    if args.action == 'add': modify_connection_add(args, connections)
    elif args.action == 'remove': modify_connection_remove(args, connections)

    conf.write_json(CONFIG_NAME, config)
Beispiel #5
0
def modify_notification(args, config):
    notifiers = config[
        'notifiers'] = {} if not 'notifiers' in config else config['notifiers']

    if args.action == 'add': modify_notification_add(args, notifiers)
    elif args.action == 'remove': modify_notification_remove(args, notifiers)

    conf.write_json(CONFIG_NAME, config)
Beispiel #6
0
def modify_connection(args, config):
    connections = config[
        'connections'] = {} if not 'connections' in config else config[
            'connections']

    if args.action == 'add': modify_connection_add(args, connections)
    elif args.action == 'remove': modify_connection_remove(args, connections)

    conf.write_json(CONFIG_NAME, config)