diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2010-06-20 15:22:49 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2010-06-20 15:22:49 +0200 |
commit | 9e02764f7c34fd5c9686c7a754a30e9a6ae95769 (patch) | |
tree | 423cc0f7b6d14a442bf5db69bdc8184608bdd968 /source4/scripting | |
parent | 7b32f65600988421dc8c825109e225612a3b6166 (diff) | |
download | samba-9e02764f7c34fd5c9686c7a754a30e9a6ae95769.tar.gz samba-9e02764f7c34fd5c9686c7a754a30e9a6ae95769.tar.bz2 samba-9e02764f7c34fd5c9686c7a754a30e9a6ae95769.zip |
pydsdb: Mark all SamDB and Schema methods that are in pydsdb as
private, to discourage them being called directly.
Diffstat (limited to 'source4/scripting')
-rw-r--r-- | source4/scripting/python/samba/__init__.py | 4 | ||||
-rw-r--r-- | source4/scripting/python/samba/samdb.py | 26 | ||||
-rw-r--r-- | source4/scripting/python/samba/schema.py | 4 |
3 files changed, 17 insertions, 17 deletions
diff --git a/source4/scripting/python/samba/__init__.py b/source4/scripting/python/samba/__init__.py index a6532b7f0d..915729310d 100644 --- a/source4/scripting/python/samba/__init__.py +++ b/source4/scripting/python/samba/__init__.py @@ -42,7 +42,6 @@ else: import ldb -import _glue from samba._ldb import Ldb as _Ldb class Ldb(_Ldb): @@ -264,7 +263,7 @@ class Ldb(_Ldb): def substitute_var(text, values): """Substitute strings of the form ${NAME} in str, replacing - with substitutions from subobj. + with substitutions from values. :param text: Text in which to subsitute. :param values: Dictionary with keys and values. @@ -355,6 +354,7 @@ def ensure_external_module(modulename, location): sys.modules[modulename] = __import__( "samba.external.%s" % modulename, fromlist=["samba.external"]) +import _glue version = _glue.version interface_ips = _glue.interface_ips set_debug_level = _glue.set_debug_level diff --git a/source4/scripting/python/samba/samdb.py b/source4/scripting/python/samba/samdb.py index 23f33b6bc4..6d49bddfb3 100644 --- a/source4/scripting/python/samba/samdb.py +++ b/source4/scripting/python/samba/samdb.py @@ -48,9 +48,9 @@ class SamDB(samba.Ldb): options=options) if global_schema: - dsdb.dsdb_set_global_schema(self) + dsdb._dsdb_set_global_schema(self) - dsdb.dsdb_set_am_rodc(self, am_rodc) + dsdb._dsdb_set_am_rodc(self, am_rodc) def connect(self, url=None, flags=0, options=None): if self.lp is not None: @@ -422,27 +422,27 @@ accountExpires: %u :param sid: The new domain sid to use. """ - dsdb.samdb_set_domain_sid(self, sid) + dsdb._samdb_set_domain_sid(self, sid) def get_domain_sid(self): """Read the domain SID used by this LDB. """ - dsdb.samdb_get_domain_sid(self) + dsdb._samdb_get_domain_sid(self) def set_invocation_id(self, invocation_id): """Set the invocation id for this SamDB handle. :param invocation_id: GUID of the invocation id. """ - dsdb.dsdb_set_ntds_invocation_id(self, invocation_id) + dsdb._dsdb_set_ntds_invocation_id(self, invocation_id) def get_oid_from_attid(self, attid): - return dsdb.dsdb_get_oid_from_attid(self, attid) + return dsdb._dsdb_get_oid_from_attid(self, attid) def get_invocation_id(self): "Get the invocation_id id" - return dsdb.samdb_ntds_invocation_id(self) + return dsdb._samdb_ntds_invocation_id(self) def set_ntds_settings_dn(self, ntds_settings_dn): """Set the NTDS Settings DN, as would be returned on the dsServiceName rootDSE attribute @@ -451,7 +451,7 @@ accountExpires: %u :param ntds_settings_dn: The new DN to use """ - dsdb.samdb_set_ntds_settings_dn(self, ntds_settings_dn) + dsdb._samdb_set_ntds_settings_dn(self, ntds_settings_dn) invocation_id = property(get_invocation_id, set_invocation_id) @@ -459,20 +459,20 @@ accountExpires: %u def get_ntds_GUID(self): "Get the NTDS objectGUID" - return dsdb.samdb_ntds_objectGUID(self) + return dsdb._samdb_ntds_objectGUID(self) def server_site_name(self): "Get the server site name" - return dsdb.samdb_server_site_name(self) + return dsdb._samdb_server_site_name(self) def load_partition_usn(self, base_dn): - return dsdb.dsdb_load_partition_usn(self, base_dn) + return dsdb._dsdb_load_partition_usn(self, base_dn) def set_schema(self, schema): self.set_schema_from_ldb(schema.ldb) def set_schema_from_ldb(self, ldb): - dsdb.dsdb_set_schema_from_ldb(self, ldb) + dsdb._dsdb_set_schema_from_ldb(self, ldb) def write_prefixes_from_schema(self): - dsdb.dsdb_write_prefixes_from_schema_to_ldb(self) + dsdb._dsdb_write_prefixes_from_schema_to_ldb(self) diff --git a/source4/scripting/python/samba/schema.py b/source4/scripting/python/samba/schema.py index 9e8db65d6e..c25dc195b1 100644 --- a/source4/scripting/python/samba/schema.py +++ b/source4/scripting/python/samba/schema.py @@ -109,7 +109,7 @@ class Schema(object): self.set_from_ldif(prefixmap_ldif, self.schema_data) def set_from_ldif(self, pf, df): - dsdb.dsdb_set_schema_from_ldif(self.ldb, pf, df) + dsdb._dsdb_set_schema_from_ldif(self.ldb, pf, df) def write_to_tmp_ldb(self, schemadb_path): self.ldb.connect(url=schemadb_path) @@ -140,7 +140,7 @@ dn: @INDEXLIST 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 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 |