Extend lftools with scripts for ldap lookups 58/11558/46
authorAric Gardner <agardner@linuxfoundation.org>
Tue, 26 Jun 2018 19:16:08 +0000 (15:16 -0400)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 21 Aug 2018 21:31:14 +0000 (17:31 -0400)
commit4d7ce295121e166f2fb18417acd8f5193d4b382c
tree9af53dbb60141066007a1c450a444709ade5fcfe
parentc5085bebb6ebdc66a70a28c485ca4f66cffbc339
Extend lftools with scripts for ldap lookups

Add 2 new commands to lftools:

    - infofile
    - ldap

prereqs:
For ldap lookups to work you must be on the VPN and have the cert
to get the cert: log in to any collab system and grab /etc/ipa/ca.crt
in /etc/openldap/ldap.conf

TLS_REQCERT always
TLS_CACERTDIR /etc/openldap/certs
TLS_CACERT /etc/openldap/certs/ca.crt

To test:

1. Clone this patchset
2. start venv

   pip uninstall lftools && pip install -e .

Usage:

$ lftools ldap
Usage: lftools ldap [OPTIONS] COMMAND [ARGS]...

  LDAP TOOLS.

Commands:
  autocorrectinfofile  Verify INFO.yaml against LDAP group.
  csv                  Query an Ldap server.
  inactivecommitters   Check committer participation.
  yaml4info            Build yaml of commiters for your INFO.yaml.

$ lftools infofile
Usage: lftools infofile [OPTIONS] COMMAND [ARGS]...

  INFO.yaml TOOLS.

Commands:
  get-committers    Extract Committer info from INFO.yaml or LDAP...
  sync-committers   Script to insert missing values from ldap...

Issue: RELENG-407
Change-Id: I4f4055441042d790008754bb085447f52e1c1a78
Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
lftools/cli/__init__.py
lftools/cli/infofile.py [new file with mode: 0644]
lftools/cli/ldap_cli.py [new file with mode: 0644]
releasenotes/notes/ldap-info-017df79c3c8f9585.yaml [new file with mode: 0644]
requirements.txt
setup.cfg
shell/autocorrectinfofile [new file with mode: 0755]
shell/inactivecommitters [new file with mode: 0755]
shell/yaml4info [new file with mode: 0755]