mirror of
https://github.com/kakwa/ldapcherry
synced 2025-07-03 03:47:35 +02:00
implementing nesting roles
This commit is contained in:
parent
d74893d104
commit
7524a189fe
11 changed files with 295 additions and 163 deletions
20
misc/debug_roles.py
Normal file
20
misc/debug_roles.py
Normal 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()
|
Loading…
Add table
Add a link
Reference in a new issue