Commit Graph
169 Commits
Author SHA1 Message Date
Rob Crittenden 359d54e741 Don't perform some API self-tests in production mode for performance reasons
The API does a fair number of self tests and locking to assure that the
registered commands are consistent and will work. This does not need
to be done on a production system and adds additional overhead causing
somewhere between a 30 and 50% decrease in performance.

Because makeapi is executed when a build is done ensure that it is
executed in developer mode to ensure that the framework is ok.

ticket 751
2011-01-28 18:49:17 -05:00
Rob Crittenden 84ff4ca0f1 Don't require or create the log dirs if we're just validating the API.
Fixes an error displayed in the automated builds, plus we don't want
a Makefile messing around with our homedir.
2011-01-14 17:26:49 -05:00
Jakub Hrozek 7493d781df Change FreeIPA license to GPLv3+
The changes include:
 * Change license blobs in source files to mention GPLv3+ not GPLv2 only
 * Add GPLv3+ license text
 * Package COPYING not LICENSE as the license blobs (even the old ones)
   mention COPYING specifically, it is also more common, I think

 https://fedorahosted.org/freeipa/ticket/239
2010-12-20 17:19:53 -05:00
Rob Crittenden 1df10a88cd Add support for client failover to the ipa command-line.
This adds a new global option to the ipa command, -f/--no-fallback. If this
is included then just the server configured in /etc/ipa/default.conf is used.
Otherwise that is tried first then all servers in DNS with the ldap SRV record
are tried.

Create a new Local() Command class for local-only commands. The help
command is one of these. It shouldn't need a remote connection to execute.

ticket #15
2010-08-16 10:35:27 -04:00
Rob Crittenden ccaf537aa6 Handle errors raised by plugins more gracefully in mod_wsgi.
This started as an effort to display a more useful error message in the
Apache error log if retrieving the schema failed. I broadened the scope
a little to include limiting the output in the Apache error log
so errors are easier to find.

This adds a new configuration option, startup_traceback. Outside of
lite-server.py it is False by default so does not display the traceback
that lead to the StandardError being raised. This makes the mod_wsgi
error much easier to follow.
2010-07-12 09:32:33 -04:00
Rob Crittenden 1dd7b11b0b Connect the -v cli argument to the verbose flag in xmlrpclib
If you pass two -v to the ipa command you'll get the XML-RPC data in
the output. This can be handy so you know exactly what went out over
the wire.
2010-06-03 17:08:22 -04:00
Jason Gerard DeRose 069763c5c6 Add Object.label class attribute, enable in webUI 2010-02-12 17:07:37 -05:00
Jason Gerard DeRose 0ce253fae4 Fix logging in CLI and server (take 2) 2010-02-09 16:36:27 -05:00
Rob Crittenden f43f6c50c6 Only change the log level if it isn't already set
This primarily affects the installer. We want to log to the install/
uninstall file in DEBUG. This was getting reset to INFO causing lots of
details to not show in the logs.
2010-02-03 11:52:15 -05:00
Jason Gerard DeRose 1d6cc1bb7b Remove __public__ and __proxy__ hold-overs from Plugin class 2010-01-28 13:32:00 -05:00
Jason Gerard DeRose 7b571e3693 Enabled CRUDS in webUI using wehjit 0.2.0 2010-01-26 10:32:44 -05:00
John Dennis dbb5721e7c If plugin fails to load log the traceback
Signed-off-by: John Dennis <jdennis@redhat.com>

If plugin fails to load log the traceback

If a plugin fails to load due to some kind of error it would be nice
if the error log contained the traceback so you can examine what went
wrong rather than being left blind as to why it failed to load.
2009-11-23 16:30:01 -05:00
Rob Crittenden 50b683dc3c Provide additional help to --help option 2009-11-19 14:38:01 -05:00
Jason Gerard DeRose 8dc21d6f30 Make plugin browser show plugin parent class 2009-10-14 15:08:30 -06:00
Jason Gerard DeRose f58ff2921d Giant webui patch take 2 2009-10-13 11:28:00 -06:00
Jason Gerard DeRose c0f558d98b Removed PluginProxy and all its uses 2009-08-05 12:18:51 -04:00
Pavel Zuna c47d716e95 Modify PluginProxy to use __public__ defined in derived classes instead of base classes. 2009-06-10 11:53:07 -04:00
Pavel Zuna 7d0bd4b895 Rename errors2.py to errors.py. Modify all affected files. 2009-04-23 10:29:14 -04:00
Jason Gerard DeRose 4ab133c3cb Implemented more elegant way for entire plugin module to be conditionally skipped; updated cert.py and ra.py modules to use this 2009-02-17 16:03:10 -05:00
Jason Gerard DeRose a8c3f054d4 Started cleanup work on ra plugin; fixed problem in api.bootstrap() when process does not have permision to open log file 2009-02-17 16:03:08 -05:00
Jason Gerard DeRose c2b0c80140 Started work on a much simplified mod_python server 2009-02-03 15:29:05 -05:00
Jason Gerard DeRose 231f0bd65a Finished reworked cli.CLI class into cli.cli plugin 2009-02-03 15:29:04 -05:00
Jason Gerard DeRose db0168f7af Started reworking CLI class into cli plugin 2009-02-03 15:29:03 -05:00
Jason Gerard DeRose 0cfb0e191a Removed the depreciated Context and LazyContext classes 2009-02-03 15:29:03 -05:00
Jason Gerard DeRose 6aadeb9aea Added Object.params_minus() method; various small tweaks 2009-02-03 15:29:00 -05:00
Jason Gerard DeRose 6fe78a4944 Renamed all references to 'ipa_server' to 'ipaserver' 2009-01-04 18:39:39 -07:00
Jason Gerard DeRose 912ab9e68b Removed unneeded import of errors from plugable.py 2009-01-03 18:08:39 -07:00
Jason Gerard DeRose bb6e9cfe9f Plugin.call() now uses errors2 version of SubprocessError 2009-01-03 18:02:58 -07:00
Jason Gerard DeRose 6b6e6b1cab Ported plugin registration errors into errors2.py; plugable.Registrar now raises new errors2 exceptions 2009-01-03 17:27:53 -07:00
Jason Gerard DeRose 72340a594d Removed unneeded import of check_type, check_instance in plugable.py 2009-01-02 01:16:17 -07:00
Jason Gerard DeRose b4dc333ee2 Removed depreciated code in ipalib.plugable that has been moving into ipalib.base 2009-01-02 00:46:45 -07:00
Jason Gerard DeRose 5b637f6a18 Removed depreciated code from config.py; removed corresponding unit tests 2008-12-22 15:41:24 -07:00
Jason Gerard DeRose f82c48f775 Added note in Plugin.set_api() about Plugin.log attribute being depreciated 2008-12-21 19:58:48 -07:00
Jason Gerard DeRose 9d091c98f1 Plugin.__init__() now checks that subclass hasn't defined attributes that conflict with the logger methods; added corresponding unit test 2008-12-21 19:34:32 -07:00
Jason Gerard DeRose 4390523b7f Improved Plugin.call() method and added its unit test 2008-12-21 17:12:00 -07:00
Jason Gerard DeRose 4f24f0fd88 Plugin.doc instance attribute is now parsed out using inspect.getdoc(); added Plugin.summary instance attribute, created in Plugin.__init__() 2008-12-17 23:08:52 -07:00
Jason Gerard DeRose 171ed58367 Removed Plugin.doc property and replaced with instance attribute created in Plugin.__init__() 2008-12-17 21:57:58 -07:00
Jason Gerard DeRose 69041c3b1b Removed Plugin.name property and replaced with instance attribute created in Plugin.__init__() 2008-12-17 21:47:43 -07:00
Jason Gerard DeRose 2db738e899 Some changes to make reading dubugging output easier 2008-11-24 10:09:30 -07:00
Jason Gerard DeRose c26a3c8542 Finished fist draft of plugin tutorial in ipalib/__init__.py docstring 2008-11-07 02:26:38 -07:00
Jason Gerard DeRose 5bdf860647 Added Plugin.call() method that calls an external executable via subprocess.call() 2008-11-06 11:57:21 -07:00
Jason Gerard DeRose 242a8183a7 Added custom log formatter util.LogFormatter that makes the human-readable time stamp in UTC 2008-10-31 20:25:33 -06:00
Jason Gerard DeRose 5e5a83e4e8 Renamed API.bootstrap_from_options() to bootstrap_with_global_options() 2008-10-31 19:03:07 -06:00
Jason Gerard DeRose 5269d1396c Logging formats are now env variables; added log_format_stderr_debug format used when env.debug is True 2008-10-31 18:55:32 -06:00
Jason Gerard DeRose a23d41a57f Reoganized global option functionality to it is easy for any script to use the environment-related global options; lite-xmlrpc.py now uses same global options 2008-10-31 18:17:08 -06:00
Jason Gerard DeRose cdfb7bfd5e Logging is now configured in API.bootstrap(); removed depreciated util.configure_logging() function 2008-10-31 13:27:42 -06:00
Jason Gerard DeRose 140458cfc6 API.finalize() now cascades call to API.load_plugins() 2008-10-31 12:29:59 -06:00
Jason Gerard DeRose 3076cb4d2f Plugin.set_api() now sets convience instance attributes from api for env, context, log, and all NameSpace 2008-10-30 14:11:24 -06:00
Jason Gerard DeRose 6879140db7 Added ipalib.plugins.f_misc with new 'context' Command; moved 'env' Command from cli to f_misc 2008-10-30 02:20:28 -06:00
Jason Gerard DeRose ddb5449c7f Did some initial work for Context plugins 2008-10-30 01:11:33 -06:00