freeipa/ipapython
Petr Viktorin b5c1ce88a4 Framework for admin/install tools, with ipa-ldap-updater
Currently, FreeIPA's install/admin scripts are long pieces of code
that aren't very reusable, importable, or testable.
They have been extended over time with features such as logging and
error handling, but since each tool was extended individually, there
is much inconsistency and code duplication.
This patch starts a framework which the admin tools can use, and
converts ipa-ldap-updater to use the framework.

Common tasks the tools do -- option parsing, validation, logging
setup, error handling -- are represented as methods. Individual
tools can extend, override or reuse the defaults as they see fit.

The ipa-ldap-updater has two modes (normal and --upgrade) that
don't share much functionality. They are represented by separate
classes. Option parsing, and selecting which class to run, happens
before they're instantiated.

All code is moved to importable modules to aid future testing. The
only thing that remains in the ipa-ldap-updater script is a two-line
call to the library.

First part of the work for:
https://fedorahosted.org/freeipa/ticket/2652
2012-07-22 23:17:56 -04:00
..
platform Centralize timeout for waiting for servers to start. 2012-07-02 17:08:58 -04:00
py_default_encoding Check for Python.h during build of py_default_encoding extension 2011-11-16 18:34:16 -05:00
test Fix failed tests. API for utcoffset changed and strings are more robust. 2011-01-24 14:34:38 -05:00
__init__.py Rename ipa-python directory to ipapython so it is a real python library 2009-02-09 14:35:15 -05:00
admintool.py Framework for admin/install tools, with ipa-ldap-updater 2012-07-22 23:17:56 -04:00
certdb.py Move the compat module from ipalib to ipapython. 2012-02-13 22:22:49 -05:00
certmonger.py Configure certmonger to execute restart scripts on renewal. 2012-04-10 01:08:41 -04:00
compat.py Move the compat module from ipalib to ipapython. 2012-02-13 22:22:49 -05:00
config.py Fix default_server configuration in ipapython.config 2012-05-24 13:59:23 +02:00
dogtag.py Add the -v option to sslget to provide more verbose errors 2012-02-23 11:26:06 +01:00
entity.py Remove duplicate and unused utility code 2012-05-09 11:54:20 +02:00
ipa_log_manager.py Improve ipa-client-install debug output 2012-06-17 21:47:06 -04:00
ipa.conf Rename ipa-python directory to ipapython so it is a real python library 2009-02-09 14:35:15 -05:00
ipautil.py Improve address family handling in sockets 2012-07-13 14:25:18 +02:00
ipavalidate.py Change FreeIPA license to GPLv3+ 2010-12-20 17:19:53 -05:00
kernel_keyring.py Store session cookie in ccache for cli users 2012-06-14 14:02:26 +02:00
log_manager.py Restore default log level in server to INFO 2011-12-01 08:34:02 +01:00
Makefile Introduce platform-specific adaptation for services used by FreeIPA. 2011-09-13 11:25:58 +02:00
MANIFEST.in Rename ipa-python directory to ipapython so it is a real python library 2009-02-09 14:35:15 -05:00
nsslib.py Improve address family handling in sockets 2012-07-13 14:25:18 +02:00
README Replace DNS client based on acutil with python-dns 2012-05-24 13:55:56 +02:00
services.py.in If SELinux is enabled ensure we also have restorecon. 2012-05-31 14:07:05 +02:00
setup.py.in Introduce platform-specific adaptation for services used by FreeIPA. 2011-09-13 11:25:58 +02:00
sysrestore.py Add sysupgrade state file 2012-06-10 21:23:10 -04:00
version.py.in Add API version and have server reject incompatible clients. 2011-01-14 14:26:22 -05:00

This is a set of libraries common to IPA clients and servers though mostly
geared currently towards command-line tools.

A brief overview:

config.py - identify the IPA server domain and realm. It uses python-dns to
            try to detect this information first and will fall back to
            /etc/ipa/default.conf if that fails.

ipautil.py - helper functions

entity.py - entity is the main data type. User and Group extend this class
            (but don't add anything currently).

ipavalidate.py - basic data validation routines