1
0
Fork 0
mirror of https://github.com/kakwa/ldapcherry synced 2025-07-03 03:47:35 +02:00

implementing nesting roles

This commit is contained in:
kakwa 2015-05-15 01:03:31 +02:00
parent d74893d104
commit 7524a189fe
11 changed files with 295 additions and 163 deletions

20
misc/debug_roles.py Normal file
View file

@ -0,0 +1,20 @@
from ldapcherry.roles import Roles
from ldapcherry.exceptions import DumplicateRoleKey, MissingKey, DumplicateRoleContent, MissingRolesFile
from ldapcherry.pyyamlwrapper import DumplicatedKey, RelationError
from yaml import load, dump
import yaml
try:
from yaml import CLoader as Loader, CDumper as Dumper
except ImportError:
from yaml import Loader, Dumper
class CustomDumper(yaml.SafeDumper):
"A custom YAML dumper that never emits aliases"
def ignore_aliases(self, _data):
return True
inv = Roles('./conf/roles.yml')
print
print inv.dump_nest()