summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules/tests
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-11-03 18:41:49 +0100
committerJelmer Vernooij <jelmer@samba.org>2010-11-03 19:13:35 +0000
commit9ae3c822d18cea4710d8d7cec265bd9ecdea35a4 (patch)
tree750e65936bda91e0ecc9f9604e098be99af6fdbc /source4/dsdb/samdb/ldb_modules/tests
parentd1dd2117dbdf1eb082d77a187b46f8cd6792338a (diff)
downloadsamba-9ae3c822d18cea4710d8d7cec265bd9ecdea35a4.tar.gz
samba-9ae3c822d18cea4710d8d7cec265bd9ecdea35a4.tar.bz2
samba-9ae3c822d18cea4710d8d7cec265bd9ecdea35a4.zip
possibleinferiors: Fix formatting.
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules/tests')
-rwxr-xr-xsource4/dsdb/samdb/ldb_modules/tests/possibleinferiors.py29
1 files changed, 14 insertions, 15 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/tests/possibleinferiors.py b/source4/dsdb/samdb/ldb_modules/tests/possibleinferiors.py
index c1e935f95c..5fc36628e5 100755
--- a/source4/dsdb/samdb/ldb_modules/tests/possibleinferiors.py
+++ b/source4/dsdb/samdb/ldb_modules/tests/possibleinferiors.py
@@ -7,12 +7,12 @@
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
@@ -26,7 +26,6 @@ import sys
# Find right directory when running from source tree
sys.path.insert(0, "bin/python")
-import samba
from samba import getopt as options, Ldb
import ldb
@@ -99,7 +98,7 @@ def possible_inferiors_search(db, oc):
# !objectClassCategory=2
# !objectClassCategory=3
-def SUPCLASSES(classinfo, oc):
+def supclasses(classinfo, oc):
list = []
if oc == "top":
return list
@@ -108,11 +107,11 @@ def SUPCLASSES(classinfo, oc):
res = classinfo[oc]["subClassOf"];
for r in res:
list.append(r)
- list.extend(SUPCLASSES(classinfo,r))
+ list.extend(supclasses(classinfo,r))
classinfo[oc]["SUPCLASSES"] = list
return list
-def AUXCLASSES(classinfo, oclist):
+def auxclasses(classinfo, oclist):
list = []
if oclist == []:
return list
@@ -122,21 +121,21 @@ def AUXCLASSES(classinfo, oclist):
else:
list2 = []
list2.extend(classinfo[oc]["systemAuxiliaryClass"])
- list2.extend(AUXCLASSES(classinfo, classinfo[oc]["systemAuxiliaryClass"]))
+ list2.extend(auxclasses(classinfo, classinfo[oc]["systemAuxiliaryClass"]))
list2.extend(classinfo[oc]["auxiliaryClass"])
- list2.extend(AUXCLASSES(classinfo, classinfo[oc]["auxiliaryClass"]))
- list2.extend(AUXCLASSES(classinfo, SUPCLASSES(classinfo, oc)))
+ list2.extend(auxclasses(classinfo, classinfo[oc]["auxiliaryClass"]))
+ list2.extend(auxclasses(classinfo, supclasses(classinfo, oc)))
classinfo[oc]["AUXCLASSES"] = list2
list.extend(list2)
return list
-def SUBCLASSES(classinfo, oclist):
+def subclasses(classinfo, oclist):
list = []
for oc in oclist:
list.extend(classinfo[oc]["SUBCLASSES"])
return list
-def POSSSUPERIORS(classinfo, oclist):
+def posssuperiors(classinfo, oclist):
list = []
for oc in oclist:
if classinfo[oc].get("POSSSUPERIORS") is not None:
@@ -145,13 +144,13 @@ def POSSSUPERIORS(classinfo, oclist):
list2 = []
list2.extend(classinfo[oc]["systemPossSuperiors"])
list2.extend(classinfo[oc]["possSuperiors"])
- list2.extend(POSSSUPERIORS(classinfo, SUPCLASSES(classinfo, oc)))
+ list2.extend(posssuperiors(classinfo, supclasses(classinfo, oc)))
if opts.wspp:
# the WSPP docs suggest we should do this:
- list2.extend(POSSSUPERIORS(classinfo, AUXCLASSES(classinfo, [oc])))
+ list2.extend(posssuperiors(classinfo, auxclasses(classinfo, [oc])))
else:
# but testing against w2k3 and w2k8 shows that we need to do this instead
- list2.extend(SUBCLASSES(classinfo, list2))
+ list2.extend(subclasses(classinfo, list2))
classinfo[oc]["POSSSUPERIORS"] = list2
list.extend(list2)
return list
@@ -211,7 +210,7 @@ def is_in_list(list, c):
def possible_inferiors_constructed(db, classinfo, c):
list = []
for oc in classinfo:
- superiors = POSSSUPERIORS(classinfo, [oc])
+ superiors = posssuperiors(classinfo, [oc])
if (is_in_list(superiors, c) and
classinfo[oc]["systemOnly"] == False and
classinfo[oc]["objectClassCategory"] != 2 and