Properly identify code location of logging message The method Log.call_location() is used to add identifying infomation about the location in the code where a logging message is emitted from. It needs to walk up the stack to bypass calls involved in logging to find where the call to logging was made. Formerly the code has a hardcoded offset into the list of stack frame objects. But any change in the logging implementation perturbs that offset. This patch fixes that problem by walking up the stack until a non-logging function is identified. Ticket: 172 Signed-off-by: John Dennis <jdennis@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
Transaction object must always have a transaction id A Transaction object must always have a transaction id (tid) because a tid is how a transaction is referenced (e.g. when being stored or retrieved). The existing code erroneously assumed a tid only needed to be created if the request contained query or form parameters. This restriction is now removed, if the transaction id cannot be found as a request parameter a tid is unconditionally created. Ticket: 177 Signed-off-by: John Dennis <jdennis@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
Make it possible to use PluginLoader without store In the case of OpenID extensions, a backend store is not needed for the PluginLoader, since the IDP Plugin has its own configuration for enabled extensions. Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com> Reviewed-by: Rob Crittenden <rcritten@redhat.com>
SP Portal administrative interface Add database values for the SP: visible, image, SP link and description. Update REST interface to accept values for these attributes. https://fedorahosted.org/ipsilon/ticket/148 Signed-off-by: Rob Crittenden <rcritten@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
Close connections after creating the tables This needs to be done manually in the case of upgrades, because there is no cherrypy end_request to help us close sessions. Everytime we do a self._query a new connection is allocated, so we need to make sure to terminate them all. Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com> Reviewed-by: Rob Crittenden <rcritten@redhat.com>
Create database upgrade framework This creates a framework for uprading database scheme to the latest version, and a script that will execute them. Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com> Reviewed-by: Rob Crittenden <rcritten@redhat.com>
Mark the service as readonly in the UI in authpam plugin Update the Option class to take a readonly keyword argument, defaulting to False. Extend its subclasses to pass this value along. The page template will add the disabled keyword to input and textarea if a config option is marked as readonly. https://fedorahosted.org/ipsilon/ticket/6 Signed-off-by: Rob Crittenden <rcritten@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
Drop all the calls to .keys() when iterating on the keys of a dict When browsing the keys of a dictionary, you can use the ``.keys()`` method but that is in fact only really useful if you want to store the list of keys first and act on them (like sorting them or so). If you just want to iterate through all the keys, no matter the order, then it is much much faster to just do: ``for key in dict`` Some stats about this can be found there: http://blog.pingoured.fr/index.php?post/2012/03/12/Python-notes-to-self Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr> Reviewed-by: Simo Sorce <simo@redhat.com>