Plugin

You can take plugin constant names here - https://github.com/389ds/389-ds-base/blob/master/src/lib389/lib389/_constants.py#L179

Usage example

# Plugin and Plugins additionaly have 'enable', 'disable' and 'status' methods
# Here I show you basic way to work with it. Additional methods of complex plugins will be described in subchapters

from lib389.plugin import Plugins, ACLPlugin
from lib389._constants import PLUGIN_ACL

# You can just enable/disable plugins from Plugins interface
plugins = Plugins(standalone)
plugins.enable(PLUGIN_ACL)

# Or you can first 'get' it and then work with it (make sense if your plugin is a complex one)
aclplugin = ACLPlugin(standalone)

aclplugin.enable()

aclplugin.disable()

# True if nsslapd-pluginEnabled is 'on', False otherwise - change the name?
assert(uniqplugin.status())

Module documentation

class lib389.plugins.ACLPlugin(instance, dn='cn=ACL Plugin,cn=plugins,cn=config')[source]

An instance of addn plugin entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

class lib389.plugins.ACLPreoperationPlugin(instance, dn='cn=ACL preoperation,cn=plugins,cn=config')[source]

An instance of ACL preoperation plugin entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

class lib389.plugins.AccountPolicyConfig(instance, dn=None)[source]

A single instance of Account Policy Plugin config entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

class lib389.plugins.AccountPolicyConfigs(instance, basedn='cn=Account Policy Plugin,cn=plugins,cn=config')[source]

A DSLdapObjects entity which represents Account Policy Plugin config entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • basedn (str) – Base DN for all account entries below

class lib389.plugins.AccountPolicyEntries(instance, basedn)[source]

A DSLdapObjects entity which represents Account Policy Plugin entry which is used for CoS

Parameters
  • instance (lib389.DirSrv) – An instance

  • basedn (str) – Base DN for all account entries below

class lib389.plugins.AccountPolicyEntry(instance, dn=None)[source]

A single instance of Account Policy Plugin entry which is used for CoS

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

class lib389.plugins.AccountPolicyPlugin(instance, dn='cn=Account Policy Plugin,cn=plugins,cn=config')[source]

A single instance of Account Policy plugin entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

class lib389.plugins.AccountUsabilityPlugin(instance, dn='cn=Account Usability Plugin,cn=plugins,cn=config')[source]

An instance of Account Usability plugin entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

class lib389.plugins.AddnPlugin(instance, dn='cn=addn,cn=plugins,cn=config')[source]

An instance of addn plugin entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

class lib389.plugins.AttributeUniquenessPlugin(instance, dn)[source]

An instance of attribute uniqueness plugin entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

add_unique_attribute(attr)[source]

Add a uniqueness-attribute-name attribute

add_unique_subtree(basedn)[source]

Add a uniqueness-subtree attribute

disable_all_subtrees()[source]

Set uniqueness-across-all-subtrees to off

enable_all_subtrees()[source]

Set uniqueness-across-all-subtrees to on

remove_unique_attribute(attr)[source]

Remove a uniqueness-attribute-name attribute

remove_unique_subtree(basedn)[source]

Remove a uniqueness-subtree attribute

class lib389.plugins.AttributeUniquenessPlugins(instance, basedn='cn=plugins,cn=config')[source]

A DSLdapObjects entity which represents Attribute Uniqueness plugin instances

Parameters
  • instance (lib389.DirSrv) – An instance

  • basedn (str) – Base DN for all account entries below

list()[source]

Get a list of all plugin instances where nsslapd-pluginInitfunc: NSUniqueAttr_Init

Returns

A list of children entries

class lib389.plugins.AutoMembershipDefinition(instance, dn)[source]

A single instance of Auto Membership Plugin config entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

add_regex_rule(rule_name, target, include_regex=None, exclude_regex=None)[source]

Add a regex rule :param rule_name - Name of the rule - used dfor the “cn” value inthe DN of the rule entry :param target - the target group DN :param include_regex - a List of regex rules used for group inclusion :param exclude_regex - a List of regex rules used for group exclusion

del_regex_rule(rule_name)[source]

Delete a regex rule from this definition :param rule_name - The “cn” values of the regex rule entry :raises ValueError - If a regex rule entry can not be found using rule_name

get_defaultgroup(attr)[source]

Get autoMemberDefaultGroup attributes

get_filter(attr)[source]

Get autoMemberFilter attributes

get_groupattr()[source]

Get autoMemberGroupingAttr attributes

get_scope(attr)[source]

Get autoMemberScope attributes

list_regex_rules()[source]

Return a list of regex rule entries for this definition

set_defaultgroup(attr)[source]

Set autoMemberDefaultGroup attribute

set_filter(attr)[source]

Set autoMemberFilter attributes

set_groupattr(attr)[source]

Set autoMemberGroupingAttr attribute

set_scope(attr)[source]

Set autoMemberScope attribute

class lib389.plugins.AutoMembershipDefinitions(instance, basedn='cn=Auto Membership Plugin,cn=plugins,cn=config')[source]

A DSLdapObjects entity which represents Auto Membership Plugin config entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • basedn (str) – Base DN for all account entries below

class lib389.plugins.AutoMembershipPlugin(instance, dn='cn=Auto Membership Plugin,cn=plugins,cn=config')[source]

An instance of Auto Membership plugin entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

fixup(basedn, _filter=None)[source]

Create an automember rebuild membership task

Parameters
  • basedn (str) – Basedn to fix up

  • _filter (str) – a filter for entries to fix up

Returns

an instance of Task(DSLdapObject)

class lib389.plugins.AutoMembershipRegexRule(instance, dn=None)[source]

A single instance of Auto Membership Plugin Regex Rule config entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

class lib389.plugins.AutoMembershipRegexRules(instance, basedn)[source]

A DSLdapObjects entity which represents Auto Membership Plugin Regex Rule config entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • basedn (str) – Base DN for all account entries below

class lib389.plugins.BitwisePlugin(instance, dn='cn=Bitwise Plugin,cn=plugins,cn=config')[source]

A single instance of Bitwise plugin entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

class lib389.plugins.ChainingBackendPlugin(instance, dn='cn=chaining database,cn=plugins,cn=config')[source]

A single instance of chaining database plugin entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

class lib389.plugins.ClassOfServicePlugin(instance, dn='cn=Class of Service,cn=plugins,cn=config')[source]

An instance of Class of Service plugin entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

class lib389.plugins.ContentSyncPlugin(instance, dn='cn=Content Synchronization,cn=plugins,cn=config')[source]

A single instance of Content Sync (aka syncrepl) plugin entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

class lib389.plugins.ContentSynchronizationPlugin(instance, dn='cn=Content Synchronization,cn=plugins,cn=config')[source]

A single instance of Content Synchronization plugin entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

class lib389.plugins.DNAPlugin(instance, dn='cn=Distributed Numeric Assignment Plugin,cn=plugins,cn=config')[source]

A single instance of Distributed Numeric Assignment plugin entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

class lib389.plugins.DNAPluginConfig(instance, dn=None)[source]

A single instance of DNA Plugin config entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

class lib389.plugins.DNAPluginConfigs(instance, basedn='cn=Distributed Numeric Assignment Plugin,cn=plugins,cn=config')[source]

A DSLdapObjects entity which represents DNA Plugin config entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • basedn (str) – Base DN for all account entries below

class lib389.plugins.DNAPluginSharedConfig(instance, dn=None)[source]

A single instance of DNA Plugin config entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

create(properties=None, basedn=None, ensure=False)[source]

The shared config DNA plugin entry has two RDN values The function takes care about that special case

class lib389.plugins.DNAPluginSharedConfigs(instance, basedn=None)[source]

A DSLdapObjects entity which represents DNA Plugin config entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • basedn (str) – Base DN for all account entries below

create(properties=None)[source]

Create an object under base DN of our entry

Parameters

properties (dict) – Attributes for the new entry

Returns

DSLdapObject of the created entry

class lib389.plugins.DereferencePlugin(instance, dn='cn=deref,cn=plugins,cn=config')[source]

A single instance of deref plugin entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

class lib389.plugins.EntryUUIDPlugin(instance, dn='cn=entryuuid,cn=plugins,cn=config')[source]

The EntryUUID plugin configuration

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

fixup(basedn, _filter=None)[source]

Create an entryuuid fixup task

Parameters
  • basedn (str) – Basedn to fix up

  • _filter (str) – a filter for entries to fix up

Returns

an instance of Task(DSLdapObject)

class lib389.plugins.HTTPClientPlugin(instance, dn='cn=HTTP Client,cn=plugins,cn=config')[source]

A single instance of HTTP Client plugin entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

class lib389.plugins.LDBMBackendPlugin(instance, dn='cn=ldbm database,cn=plugins,cn=config')[source]

A single instance of ldbm database plugin entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

class lib389.plugins.LdapSSOTokenPlugin(instance, dn='cn=ldapssotoken,cn=plugins,cn=config')[source]

An instance of ldapssotoken plugin entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

class lib389.plugins.LinkedAttributesConfig(instance, dn=None)[source]

A single instance of Linked Attributes Plugin config entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

class lib389.plugins.LinkedAttributesConfigs(instance, basedn='cn=Linked Attributes,cn=plugins,cn=config')[source]

A DSLdapObjects entity which represents Linked Attributes Plugin config entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • basedn (str) – Base DN for all account entries below

class lib389.plugins.LinkedAttributesPlugin(instance, dn='cn=Linked Attributes,cn=plugins,cn=config')[source]

A single instance of Linked Attributes plugin entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

fixup(linkdn)[source]

Create a fixup linked attributes task

Parameters

linkdn (str) – Link DN to fix up

Returns

an instance of Task(DSLdapObject)

class lib389.plugins.MEPConfig(instance, dn)[source]

A single instance of MEP config entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

class lib389.plugins.MEPConfigs(instance, basedn=None)[source]

A DSLdapObjects entity which represents MEP config entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • basedn (str) – Base DN for all account entries below

list()[source]

Get a list of children entries (DSLdapObject, Replica, etc.) using a base DN and objectClasses of our object (DSLdapObjects, Replicas, etc.)

Returns

A list of children entries

class lib389.plugins.MEPTemplate(instance, dn=None)[source]

A single instance of MEP template entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

class lib389.plugins.MEPTemplates(instance, basedn)[source]

A DSLdapObjects entity which represents MEP template entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • basedn (str) – Base DN for all account entries below

class lib389.plugins.ManagedEntriesPlugin(instance, dn='cn=Managed Entries,cn=plugins,cn=config')[source]

An instance of managed entries plugin entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

class lib389.plugins.MemberOfPlugin(instance, dn='cn=MemberOf Plugin,cn=plugins,cn=config')[source]

An instance of MemberOf plugin entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

add_entryscope(attr)[source]

Add memberofentryscope attribute

add_excludescope(attr)[source]

Add memberofentryscopeexcludesubtree attribute

add_groupattr(attr)[source]

Add memberofgroupattr attribute

disable_allbackends()[source]

Set memberofallbackends to off

disable_skipnested()[source]

Set memberofskipnested to off

enable_allbackends()[source]

Set memberofallbackends to on

enable_skipnested()[source]

Set memberofskipnested to on

fixup(basedn, _filter=None)[source]

Create a memberOf task

Parameters
  • basedn (str) – Basedn to fix up

  • _filter (str) – a filter for entries to fix up

Returns

an instance of Task(DSLdapObject)

get_allbackends()[source]

Get memberofallbackends attribute

get_allbackends_formatted()[source]

Display memberofallbackends attribute

get_attr()[source]

Get memberofattr attribute

get_attr_formatted()[source]

Display memberofattr attribute

get_autoaddoc()[source]

Get memberofautoaddoc attribute

get_autoaddoc_formatted()[source]

Display memberofautoaddoc attribute

get_configarea()[source]

Get nsslapd-pluginConfigArea attribute

get_entryscope(formatted=False)[source]

Get memberofentryscope attributes

get_entryscope_formatted()[source]

Display memberofentryscope attributes

get_excludescope()[source]

Get memberofentryscopeexcludesubtree attributes

get_excludescope_formatted()[source]

Display memberofentryscopeexcludesubtree attributes

get_groupattr()[source]

Get memberofgroupattr attribute

get_groupattr_formatted()[source]

Display memberofgroupattr attribute

get_skipnested()[source]

Get memberofskipnested attribute

get_skipnested_formatted()[source]

Display memberofskipnested attribute

remove_all_entryscope()[source]

Remove all memberofentryscope attributes

remove_all_excludescope()[source]

Remove all memberofentryscopeexcludesubtree attributes

remove_autoaddoc()[source]

Remove all memberofautoaddoc attributes

remove_configarea()[source]

Remove nsslapd-pluginConfigArea attribute

remove_entryscope(attr)[source]

Remove memberofentryscope attribute

remove_excludescope(attr)[source]

Remove memberofentryscopeexcludesubtree attribute

remove_groupattr(attr)[source]

Remove memberofgroupattr attribute

replace_groupattr(attr)[source]

Replace memberofgroupattr attribute

set_attr(attr)[source]

Set memberofattr attribute

set_autoaddoc(object_class)[source]

Set memberofautoaddoc attribute

set_configarea(attr)[source]

Set nsslapd-pluginConfigArea attribute

class lib389.plugins.MemberOfSharedConfig(instance, dn)[source]

An instance of MemberOf config entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

class lib389.plugins.MemberOfSharedConfigs(instance, basedn=None)[source]

A DSLdapObjects entity which represents MemberOf config entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • basedn (str) – Base DN for all account entries below

class lib389.plugins.PAMPassThroughAuthConfig(instance, dn=None)[source]

A single instance of PAM Pass Through Auth config entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

class lib389.plugins.PAMPassThroughAuthConfigs(instance, basedn='cn=PAM Pass Through Auth,cn=plugins,cn=config')[source]

A DSLdapObjects entity which represents PAM Pass Through Auth config entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • basedn (str) – Base DN for all account entries below

class lib389.plugins.PAMPassThroughAuthPlugin(instance, dn='cn=PAM Pass Through Auth,cn=plugins,cn=config')[source]

A single instance of PAM Pass Through Auth plugin entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

class lib389.plugins.POSIXWinsyncPlugin(instance, dn='cn=Posix Winsync API,cn=plugins,cn=config')[source]

A single instance of Posix Winsync API plugin entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

fixup(basedn, _filter=None)[source]

Create a memberuid task

Parameters
  • basedn (str) – Basedn to fix up

  • _filter (str) – a filter for entries to fix up

Returns

an instance of Task(DSLdapObject)

class lib389.plugins.PassThroughAuthenticationPlugin(instance, dn='cn=Pass Through Authentication,cn=plugins,cn=config')[source]

A single instance of Pass Through Authentication plugin entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

get_urls()[source]

Get all URLs from nsslapd-pluginargNUM attributes

Returns

a list

class lib389.plugins.Plugin(instance, dn=None)[source]

A single instance of a plugin entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

create(rdn=None, properties=None, basedn=None)[source]

Create a plugin entry

When we create plugins, we don’t want people to have to consider all the little details. Plus, the server during creation needs to be able to create these from nothing. As a result, all the named plugins carry a default properties dictionary that can be used.

Parameters
  • rdn (str) – RDN of the new entry

  • properties (dict) – Attributes for the new entry

  • basedn – Base DN of the new entry

Returns

Plugin class instance of the created entry

disable()[source]

Set nsslapd-pluginEnabled to off

enable()[source]

Set nsslapd-pluginEnabled to on

restart()[source]

Disable and then enable the plugin

status()[source]

Check if the plugin is enabled

class lib389.plugins.Plugins(instance, basedn=None)[source]

A DSLdapObjects entity which represents plugin entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • basedn (str) – Base DN for all account entries below

disable(name=None, plugin_dn=None)[source]

Set nsslapd-pluginEnabled to off

enable(name=None, plugin_dn=None)[source]

Set nsslapd-pluginEnabled to on

class lib389.plugins.ReferentialIntegrityConfig(instance, dn)[source]

An instance of Referential Integrity config entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

class lib389.plugins.ReferentialIntegrityPlugin(instance, dn='cn=referential integrity postoperation,cn=plugins,cn=config')[source]

An instance of referential integrity postoperation plugin entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

add_container_scope(attr)[source]

Add nsslapd-plugincontainerscope attribute

add_entryscope(attr)[source]

Add nsslapd-pluginentryscope attribute

add_excludescope(attr)[source]

Add nsslapd-pluginexcludeentryscope attribute

add_membership_attr(attr)[source]

Add referint-membership-attr attribute

create(rdn=None, properties=None, basedn=None)[source]

Create an instance of the plugin

get_configarea()[source]

Get nsslapd-pluginConfigArea attribute

get_container_scope()[source]

Get nsslapd-plugincontainerscope attribute

get_container_scope_formatted()[source]

Display nsslapd-plugincontainerscope attribute

get_entryscope(formatted=False)[source]

Get nsslapd-pluginentryscope attribute

get_entryscope_formatted()[source]

Display nsslapd-pluginentryscope attribute

get_excludescope()[source]

Get nsslapd-pluginexcludeentryscope attribute

get_excludescope_formatted()[source]

Display nsslapd-pluginexcludeentryscope attribute

get_membership_attr(formatted=False)[source]

Get referint-membership-attr attribute

get_membership_attr_formatted()[source]

Display referint-membership-attr attribute

get_update_delay()[source]

Get referint-update-delay attribute

get_update_delay_formatted()[source]

Display referint-update-delay attribute

remove_all_container_scope()[source]

Remove all nsslapd-plugincontainerscope attributes

remove_all_entryscope()[source]

Remove all nsslapd-pluginentryscope attributes

remove_all_excludescope()[source]

Remove all nsslapd-pluginexcludeentryscope attributes

remove_configarea()[source]

Remove all nsslapd-pluginConfigArea attributes

remove_container_scope(attr)[source]

Remove nsslapd-plugincontainerscope attribute

remove_entryscope(attr)[source]

Remove nsslapd-pluginentryscope attribute

remove_excludescope(attr)[source]

Remove nsslapd-pluginexcludeentryscope attribute

remove_membership_attr(attr)[source]

Remove referint-membership-attr attribute

set_configarea(attr)[source]

Set nsslapd-pluginConfigArea attribute

set_update_delay(value)[source]

Set referint-update-delay attribute

class lib389.plugins.RetroChangelogPlugin(instance, dn='cn=Retro Changelog Plugin,cn=plugins,cn=config')[source]

An instance of Retro Changelog plugin entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

class lib389.plugins.RolesPlugin(instance, dn='cn=Roles Plugin,cn=plugins,cn=config')[source]

An instance of Roles plugin entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

class lib389.plugins.RootDNAccessControlPlugin(instance, dn='cn=RootDN Access Control,cn=plugins,cn=config')[source]

A single instance of RootDN Access Control plugin entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

add_allow_day(day)[source]

Add a value to rootdn-days-allowed attribute

add_allow_host(attr)[source]

Add rootdn-allow-host attribute

add_allow_ip(attr)[source]

Add rootdn-allow-ip attribute

static add_day_to_days(string_of_days, day)[source]

Append a day in a string of comma separated days and return the string. If day already exists in the string, return processed string.

Keyword arguments: string_of_days – a string of comma seperated days

examples:

Mon Tue, Wed, Thu

day – a day, e.g. Mon, Tue, etc.

add_deny_host(attr)[source]

Add rootdn-deny-host attribute

add_deny_ip(attr)[source]

Add rootdn-deny-ip attribute

get_allow_host()[source]

Get rootdn-allow-host attribute

get_allow_host_formatted()[source]

Display rootdn-allow-host attribute

get_allow_ip()[source]

Get rootdn-allow-ip attribute

get_allow_ip_formatted()[source]

Display rootdn-allow-ip attribute

get_close_time()[source]

Get rootdn-close-time attribute

get_close_time_formatted()[source]

Display rootdn-close-time attribute

get_days_allowed()[source]

Get rootdn-days-allowed attribute

get_days_allowed_formatted()[source]

Display rootdn-days-allowed attribute

get_deny_host()[source]

Get rootdn-deny-host attribute

get_deny_host_formatted()[source]

Display rootdn-deny-host attribute

get_deny_ip()[source]

Remove all rootdn-deny-ip attribute

get_deny_ip_formatted()[source]

Display rootdn-deny-ip attribute

get_open_time()[source]

Get rootdn-open-time attribute

get_open_time_formatted()[source]

Display rootdn-open-time attribute

remove_all_allow_host()[source]

Remove all rootdn-allow-host attributes

remove_all_allow_ip()[source]

Remove all rootdn-allow-ip attribute

remove_all_deny_host()[source]

Remove all rootdn-deny-host attribute

remove_all_deny_ip()[source]

Remove all rootdn-deny-ip attribute

remove_allow_day(day)[source]

Remove a value from rootdn-days-allowed attribute

remove_allow_host(attr)[source]

Remove rootdn-allow-host attribute

remove_allow_ip(attr)[source]

Remove rootdn-allow-ip attribute

remove_close_time()[source]

Remove all rootdn-close-time attributes

static remove_day_from_days(string_of_days, day)[source]

Remove a day from a string of comma separated days and return the string. If day does not exists in the string, return processed string.

Keyword arguments: string_of_days – a string of comma seperated days

examples:

Mon Tue, Wed, Thu

day – a day, e.g. Mon, Tue, etc.

remove_days_allowed()[source]

Remove all rootdn-days-allowed attributes

remove_deny_host(attr)[source]

Remove rootdn-deny-host attribute

remove_deny_ip(attr)[source]

Remove rootdn-deny-ip attribute

remove_open_time()[source]

Remove all rootdn-open-time attributes

set_close_time(attr)[source]

Set rootdn-close-time attribute

set_days_allowed(attr)[source]

Set rootdn-days-allowed attribute

set_open_time(attr)[source]

Set rootdn-open-time attribute

class lib389.plugins.SchemaReloadPlugin(instance, dn='cn=Schema Reload,cn=plugins,cn=config')[source]

An instance of Schema Reload plugin entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

class lib389.plugins.SevenBitCheckPlugin(instance, dn='cn=7-bit check,cn=plugins,cn=config')[source]

An instance of addn plugin entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

class lib389.plugins.StateChangePlugin(instance, dn='cn=State Change Plugin,cn=plugins,cn=config')[source]

An instance of State Change plugin entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

class lib389.plugins.SyntaxValidationPlugin(instance, dn='cn=Syntax Validation Task,cn=plugins,cn=config')[source]

An instance of Syntax Validation Task plugin entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

class lib389.plugins.USNPlugin(instance, dn='cn=USN,cn=plugins,cn=config')[source]

A single instance of USN (Update Sequence Number) plugin entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

cleanup(suffix=None, backend=None, max_usn=None)[source]

Create a USN tombstone cleanup task

Parameters
  • basedn (str) – Basedn to fix up

  • _filter (str) – a filter for entries to fix up

Returns

an instance of Task(DSLdapObject)

disable_global_mode()[source]

Set nsslapd-entryusn-global to off

enable_global_mode()[source]

Set nsslapd-entryusn-global to on

is_global_mode_set()[source]

Return True if nsslapd-entryusn-global is set to on, else False

class lib389.plugins.ViewsPlugin(instance, dn='cn=Views,cn=plugins,cn=config')[source]

An instance of Views plugin entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN

class lib389.plugins.WhoamiPlugin(instance, dn='cn=whoami,cn=plugins,cn=config')[source]

A single instance of whoami plugin entry

Parameters
  • instance (lib389.DirSrv) – An instance

  • dn (str) – Entry DN