Exemplo n.º 1
0
def dna_config_show(inst, basedn, log, args):
    log = log.getChild('dna_config_show')
    targetdn = _get_shared_config_dn(inst, args)

    shared_config = DNAPluginSharedConfig(inst, targetdn)

    if not shared_config.exists():
        raise ldap.NO_SUCH_OBJECT("Entry %s doesn't exists" % targetdn)
    if args and args.json:
        o_str = shared_config.get_all_attrs_json()
        log.info(o_str)
    else:
        log.info(shared_config.display())
Exemplo n.º 2
0
def dna_config_del(inst, basedn, log, args):
    log = log.getChild('dna_config_del')
    targetdn = _get_shared_config_dn(inst, args)
    shared_config = DNAPluginSharedConfig(inst, targetdn)
    shared_config.delete()
    log.info("Successfully deleted the %s", targetdn)
Exemplo n.º 3
0
def dna_config_edit(inst, basedn, log, args):
    log = log.getChild('dna_config_edit')
    targetdn = _get_shared_config_dn(inst, args)

    shared_config = DNAPluginSharedConfig(inst, targetdn)
    generic_object_edit(shared_config, log, args, arg_to_attr_config)