From d3d7ff66d4a7952a50e7d9175528985358cb3522 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 20 Jun 2010 01:43:51 +0200 Subject: Move convert_to_openldap onto Schema class. --- source4/scripting/python/samba/schema.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source4/scripting/python/samba/schema.py') diff --git a/source4/scripting/python/samba/schema.py b/source4/scripting/python/samba/schema.py index bffb0e53da..2495cf2e0c 100644 --- a/source4/scripting/python/samba/schema.py +++ b/source4/scripting/python/samba/schema.py @@ -28,6 +28,7 @@ from samba.dcerpc import security from samba.ms_schema import read_ms_schema from samba.ndr import ndr_pack from samba.samdb import SamDB +from samba import dsdb from ldb import SCOPE_SUBTREE, SCOPE_ONELEVEL import os @@ -135,6 +136,10 @@ dn: @INDEXLIST def dnsyntax_attributes(self): return get_dnsyntax_attributes(self.schemadn, self.ldb) + def convert_to_openldap(self, target, mapping): + return dsdb.dsdb_convert_schema_to_openldap(self.ldb, target, mapping) + + # Return a hash with the forward attribute as a key and the back as the value def get_linked_attributes(schemadn,schemaldb): attrs = ["linkID", "lDAPDisplayName"] -- cgit