X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethods%2F__init__.py;h=d72755e162f3a75ce691e310d68485322bd1b73d;hb=475ee53aaaa011ba14a34af34d3340257d6f9d59;hp=fb45aae72241d87c2921e22876beb4ccd84ba10f;hpb=e6816bfce4b539836f3e48ff455b5472e8b5580e;p=plcapi.git diff --git a/PLC/Methods/__init__.py b/PLC/Methods/__init__.py index fb45aae..d72755e 100644 --- a/PLC/Methods/__init__.py +++ b/PLC/Methods/__init__.py @@ -1 +1,20 @@ -methods = 'AdmAddNode AdmAddPerson AdmAddPersonToSite AdmAddSite AdmAuthCheck AdmDeleteNode AdmDeletePerson AdmDeleteSite AdmGetAllRoles AdmGetNodes AdmGetPersonRoles AdmGetPersonSites AdmGetPersons AdmGetSites AdmGrantRoleToPerson AdmIsPersonInRole AdmRemovePersonFromSite AdmRevokeRoleFromPerson AdmSetPersonEnabled AdmSetPersonPrimarySite AdmUpdateNode AdmUpdatePerson system.listMethods system.methodHelp system.methodSignature system.multicall'.split() +#!/usr/bin/python -tt + +import os +native_methods = [] +toppath = os.path.dirname(__file__) +for path, dirs, methods in os.walk(toppath): + remove_dirs = [] + for dir in dirs: + if dir.startswith("."): + remove_dirs.append(dir) + for dir in remove_dirs: + dirs.remove(dir) + prefix = path + "/" + prefix = prefix[len(toppath) + 1:].replace("/", ".") + for method in methods: + if method == "__init__.py": + continue + if not method.endswith(".py"): + continue + native_methods.append(prefix + method[:-3])