diff options
author | Petr Viktorin <pviktori@redhat.com> | 2012-04-20 04:39:59 -0400 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2012-07-22 23:17:56 -0400 |
commit | b5c1ce88a4a3b35adb3b22bc68fb10b49322641a (patch) | |
tree | 125bf5865ce5ef4b12f75d0abd39ff2c741560e3 /make-lint | |
parent | 78810f906873c261277189b279d4da33dbd05eb2 (diff) | |
download | freeipa-b5c1ce88a4a3b35adb3b22bc68fb10b49322641a.tar.gz freeipa-b5c1ce88a4a3b35adb3b22bc68fb10b49322641a.tar.xz freeipa-b5c1ce88a4a3b35adb3b22bc68fb10b49322641a.zip |
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
Diffstat (limited to 'make-lint')
-rwxr-xr-x | make-lint | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -73,6 +73,7 @@ class IPATypeChecker(TypeChecker): 'ipalib.session.SessionManager' : ['log', 'debug', 'info', 'warning', 'error', 'critical', 'exception'], 'ipalib.session.SessionCCache' : ['log', 'debug', 'info', 'warning', 'error', 'critical', 'exception'], 'ipalib.session.MemcacheSessionManager' : ['log', 'debug', 'info', 'warning', 'error', 'critical', 'exception'], + 'ipapython.admintool.AdminTool' : ['log', 'debug', 'info', 'warning', 'error', 'critical', 'exception'], } def _related_classes(self, klass): |