Пример #1
0
 def apply(self, inst):
     rip = ReferentialIntegrityPlugin(inst)
     try:
         rip.add_entryscope(self.suffix)
     except ldap.TYPE_OR_VALUE_EXISTS:
         # This is okay, move on.
         pass
Пример #2
0
def add_scope(inst, basedn, log, args):
    plugin = ReferentialIntegrityPlugin(inst)
    try:
        plugin.add_entryscope(args.value)
    except ldap.TYPE_OR_VALUE_EXISTS:
        log.info('Value "{}" already exists.'.format(args.value))
    else:
        log.info(
            'successfully added nsslapd-pluginEntryScope value "{}"'.format(
                args.value))