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
-
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
-
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
-
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
-
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
A single instance of DNA Plugin config entry
- Parameters
instance (lib389.DirSrv) – An instance
dn (str) – Entry DN
The shared config DNA plugin entry has two RDN values The function takes care about that special case
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 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
-
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
-
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
-
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
An instance of MemberOf config entry
- Parameters
instance (lib389.DirSrv) – An instance
dn (str) – Entry DN
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
-
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
-
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.
-
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
-
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
-
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
-
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.
-
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.
-
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