DseLdifSimple - file /etc/dirsrv/*/dse.ldif

class insights.parsers.dse_ldif_simple.DseLdifSimple(*args, **kwargs)[source]

Bases: Parser, dict

Warning

This class is deprecated and will be removed from 3.5.0. Please use the insights.parsers.dse_ldif.DseLDIF instead.

Parse the attributes out of the filtered lines of the dse.ldif file into dict[attribute name] = attribute value.

Please note the difference between the LDIF format and this parser.

The file dse.ldif is in the LDIF format (see man 5 ldif). LDIF contains multi-row records where each record is identified by a dn: line (“dn” as in “distinguished name”) and the record’s other lines are attributes. Attributes may also have base64-encoded values, multiline values, and file-stored values.

The parser processes lines independently without tracking what the line is and which record it belongs to. Only plaintext single-line values are supported.

This allows for filterable, efficient, and privacy-preserving processing of attributes whose names are valid only in a single distinguished name, and whose values are single-line plaintext only.

Sample input data:

dn: cn=config
nsslapd-securePort: 636
nsslapd-security: on

dn: cn=encryption,cn=config
sslVersionMin: SSLv3
sslVersionMax: TLS1.1
nsSSL3: on

Examples

>>> type(dse_ldif_simple)
<class 'insights.parsers.dse_ldif_simple.DseLdifSimple'>
>>> dse_ldif_simple["nsslapd-security"]
'on'
>>> "sslVersionMin" in dse_ldif_simple
True
>>> dict(dse_ldif_simple)["nsSSL3"]
'on'
parse_content(content)[source]

This method must be implemented by classes based on this class.