def METHOD_NAME(inst, basedn, log, args, warn=True):
    found = False
    mappings = SaslMappings(inst).list()
    map_name = args.map_name.lower()
    for saslmap in mappings:
        cn = ensure_str(saslmap.get_attr_val('cn')).lower()
        if cn == map_name:
            dn = saslmap.dn
            found = True
            break
    if not found:
        raise ValueError("Unable to find a SASL mapping with the name: ({})".format(args.map_name))
    if warn and args.json is False:
        _warn(dn, msg="Deleting %s %s" % (SINGULAR.__name__, dn))
    _generic_delete(inst, basedn, log.getChild('sasl_map_delete'), SINGULAR, dn, args)