From 31c89d3bbd0bcfea71b4e6be912ad4bb9f43e171 Mon Sep 17 00:00:00 2001 From: Simon Pichugin Date: Fri, 17 May 2019 19:20:03 +0200 Subject: [PATCH] Issue 50390 - Add Managed Entries Plug-in Config Entry schema Description: Add AttributeTypes and an ObjectClass to Managed Entries Plug-in Configuration entry schema. Fix MEPConfigs(DSLdapObjects) accordingly. https://pagure.io/389-ds-base/issue/50390 Reviewed by: mreynolds (Thanks!) --- ldap/schema/10mep-plugin.ldif | 37 +++++++++++++++++++++++++++++++++++ src/lib389/lib389/plugins.py | 7 ++++--- 2 files changed, 41 insertions(+), 3 deletions(-) diff --git a/ldap/schema/10mep-plugin.ldif b/ldap/schema/10mep-plugin.ldif index d765049376..a1488c58cd 100644 --- a/ldap/schema/10mep-plugin.ldif +++ b/ldap/schema/10mep-plugin.ldif @@ -49,6 +49,43 @@ attributeTypes: ( 2.16.840.1.113730.3.1.2090 NAME 'mepRDNAttr' # ################################################################################ # +attributeTypes: ( 2.16.840.1.113730.3.1.2360 NAME 'originScope' + DESC 'Managed Entries search scope' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + X-ORIGIN '389 Directory Server' ) +# +################################################################################ +# +attributeTypes: ( 2.16.840.1.113730.3.1.2361 NAME 'originFilter' + DESC 'Managed Entries search filter' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + X-ORIGIN '389 Directory Server' ) +# +################################################################################ +# +attributeTypes: ( 2.16.840.1.113730.3.1.2362 NAME 'managedBase' + DESC 'Managed Entries subtree for the managed entries' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + X-ORIGIN '389 Directory Server' ) +# +################################################################################ +# +attributeTypes: ( 2.16.840.1.113730.3.1.2363 NAME 'managedTemplate' + DESC 'Managed Entries Template Entry DN' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + X-ORIGIN '389 Directory Server' ) +# +################################################################################ +# +objectClasses: ( 2.16.840.1.113730.3.2.336 NAME 'mepConfigEntry' + DESC 'Managed Entries Configurational Entry' + SUP top + AUXILIARY + MUST ( cn $ originScope $ originFilter $ managedBase $ managedTemplate ) + X-ORIGIN '389 Directory Server' ) +# +################################################################################ +# objectClasses: ( 2.16.840.1.113730.3.2.319 NAME 'mepManagedEntry' DESC 'Managed Entries Managed Entry' SUP top diff --git a/src/lib389/lib389/plugins.py b/src/lib389/lib389/plugins.py index 671e7df32b..599156da83 100644 --- a/src/lib389/lib389/plugins.py +++ b/src/lib389/lib389/plugins.py @@ -294,8 +294,9 @@ class MEPConfig(DSLdapObject): def __init__(self, instance, dn): super(MEPConfig, self).__init__(instance, dn) self._rdn_attribute = 'cn' - self._must_attributes = ['cn'] - self._create_objectclasses = ['top', 'extensibleObject'] + self._must_attributes = ['cn', 'originScope', 'originFilter', + 'managedBase', 'managedTemplate'] + self._create_objectclasses = ['top', 'mepConfigEntry'] self._protected = False @@ -310,7 +311,7 @@ class MEPConfigs(DSLdapObjects): def __init__(self, instance, basedn=None): super(MEPConfigs, self).__init__(instance) - self._objectclasses = ['top', 'extensibleObject'] + self._objectclasses = ['top', 'mepConfigEntry'] self._filterattrs = ['cn'] self._childobject = MEPConfig # So we can set the configArea easily