Beispiel #1
0
def mep_config_edit(inst, basedn, log, args):
    log = log.getChild('mep_config_edit')
    plugin = ManagedEntriesPlugin(inst)
    config_area = plugin.get_attr_val_utf8_l('nsslapd-pluginConfigArea')
    configs = MEPConfigs(inst, config_area)
    config = configs.get(args.NAME)
    generic_object_edit(config, log, args, arg_to_attr_config)
Beispiel #2
0
def mep_config_del(inst, basedn, log, args):
    log = log.getChild('mep_config_del')
    plugin = ManagedEntriesPlugin(inst)
    config_area = plugin.get_attr_val_utf8_l('nsslapd-pluginConfigArea')
    configs = MEPConfigs(inst, config_area)
    config = configs.get(args.NAME)
    config.delete()
    log.info("Successfully deleted the %s", config.dn)
Beispiel #3
0
def mep_config_show(inst, basedn, log, args):
    log = log.getChild('mep_config_show')
    plugin = ManagedEntriesPlugin(inst)
    config_area = plugin.get_attr_val_utf8_l('nsslapd-pluginConfigArea')
    configs = MEPConfigs(inst, config_area)
    config = configs.get(args.NAME)

    if not config.exists():
        raise ldap.NO_SUCH_OBJECT("Entry %s doesn't exists" % args.name)
    if args and args.json:
        o_str = config.get_all_attrs_json()
        log.info(o_str)
    else:
        log.info(config.display())