Skip to content

Commit bb04f03

Browse files
committed
docs
1 parent a0fee82 commit bb04f03

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
# sesame-backend-ad
2-
backend pour AD
2+
backend pour AD pour sesame
3+
4+
LA documentation est à : (https://libertech-fr.github.io/sesame-doc/backends/backend_AD.html)

src/lib/ad_utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"""Utility for AD and sesame """
12
import os.path
23
import sys
34
sys.path.append('.')
@@ -11,6 +12,7 @@ def set_config(config):
1112
u.__CONFIG__ = config
1213

1314
def open_ssh_conn():
15+
"""Opening a ssh client connection with parameter in ../etc/config.conf"""
1416
pkey = paramiko.Ed25519Key.from_private_key_file('../.ssh/id_ed25519')
1517
client = paramiko.SSHClient()
1618
policy = paramiko.AutoAddPolicy()
@@ -27,14 +29,15 @@ def open_ssh_conn():
2729

2830

2931
def exec_cmd(command):
32+
"""Exec directly a command (connexion and command)"""
3033
client=open_ssh_conn()
3134
stdin, stdout, stderr = client.exec_command(command)
3235
content=stdout.read().decode()
3336
del client, stdin, stdout, stderr
3437
return content
3538

3639
def compose_dn(entity):
37-
40+
"""Compose the DN of a identity"""
3841
rdnValue=u.find_key(entity,'cn')
3942
x=type(rdnValue)
4043
if rdnValue is None:

0 commit comments

Comments
 (0)