summaryrefslogtreecommitdiffstats
path: root/src/python
Commit message (Collapse)AuthorAgeFilesLines
...
* moved logging level option to BaseConfigurationMichal Minar2013-07-231-4/+5
|
* python: added BaseConfiguration singleton classMichal Minar2013-07-231-0/+266
| | | | | | Inspired by StorageConfiguration. It loads configuration from /etc/openlmi/<provider_prefix>/*. It needs to be subclassed for particular set of python providers.
* Allow for waiting for jobs.Jan Safranek2013-07-231-0/+16
| | | | | | | | | | | | | Some storage actions needs to be synchronous (because of SMI-S), but can influence running jobs. Imagine asynchronous job for vgreduce to remove /dev/sda1 from a volume group and while it runs, someone creates new partition table on /dev/sda, which is synchronous, as per SMI-S. The running vgreduce won't be happy and some data might get lost. Solution is to put a job to create new partition table to the job queue as usual, and synchronously wait for the job to finish.
* renamed openlmi namespace to lmiMichal Minar2013-07-048-13/+13
| | | | | To comply with lmi shell, which is placed in *lmi* package, and to make our imports shorter, we are renaming *openlmi* namespace to *lmi*.
* Add method to stop the running thread to all Managers.Jan Safranek2013-05-163-31/+129
| | | | | | We should cleanly shut down all threads when the provider is unloaded, just to be nice to CIMOMs.
* Merge branch 'devel/parse-instance'Jan Safranek2013-05-102-32/+22
|\
| * Added global function to parse InstanceID.Jan Safranek2013-05-022-32/+22
| |
* | openlmi.common.JobManager: fix output parameter nameJan Synacek2013-04-291-1/+1
|/
* updated doc comments for cimom callbacksMichal Minar2013-04-261-5/+52
| | | | | cimom callbacks for filter enablement have misleading param names and miss proper doc
* modified indication filtersMichal Minar2013-04-262-41/+63
| | | | | | | | | | | | | | | | | | And moved software static filters to shared JobManager. Indication filters now reflect the name of indication class, which is instrumented by particular provider. This ensures, that cimom knows, which provider to call and does not bother the others. So instead of selecting indication instances from general class CIM_InstModification, it will be LMI_SoftwareInstModification. This is a common pattern for indication queries. Avoided another shortcoming of sfcbmof parser: /* comment */ something useful is also ignored :-( Static filters of JobManager made more generic for any provider to use. Software jobmanager is now using them. This reduces redundation of code.
* Fixed LMI_ConcreteJob.GetError and .GetErrors to return correct CIM instance.Jan Safranek2013-04-251-11/+22
| | | | | We should return CIMInstance instead of CIMError (which has nothing to do with CIM_Error).
* small logging improvementMichal Minar2013-04-221-2/+2
|
* Set default log level to INFO.Jan Safranek2013-04-161-1/+1
| | | | | | DEBUG is too verbose. On the other hand, we'll see no logging until something sets more verbose level, e.g. after configuration load.
* Use UTC times for all wall clock times.Jan Safranek2013-04-161-2/+2
| | | | clocktime_of_last_state_change was in local time.
* Remove whitespaces.Jan Safranek2013-04-161-75/+75
|
* Use monotonic clock for job expiration.Jan Safranek2013-04-161-21/+32
| | | | Job expiration timer should not be influenced by admin changing date or time.
* Use TimerManager where appropriate.Jan Safranek2013-04-162-9/+18
|
* Add TimerManager.Jan Safranek2013-04-161-0/+400
| | | | | | | | | | | | Standard Python threading.Timer starts separate thread for each timer. That has two unpleseant consequences: - We end up with lot of sleeping threads. - If we want to use logging in thread callbacks, we must register the thread at CIMOM using AttachThread (=tedious). So let's create TimerManager - Uses only on thread. - It is possible to log stuff in timer callbacks.
* Fixed missing brace.Jan Safranek2013-04-161-1/+1
|
* Fixed subscription check, the new IndicationManager has additional parameter.Jan Safranek2013-04-161-1/+2
|
* Removed logging from indication sender thread.Jan Safranek2013-04-161-1/+0
| | | | | | When the method starts, the indication thread is not yet registered at CIMOM, that's done inside the method using AttachThread(). Therefore we should not log anything.
* Added a log decorator to IndicationManager.__init__Jan Safranek2013-04-161-0/+1
|
* Updated the filter queries to match those in software provider.Jan Safranek2013-04-161-21/+20
| | | | Both Storage and Software providers should use the same CQL filters for all job-realted indications.
* Synchronize JobManager with storage.Jan Safranek2013-04-121-35/+80
| | | | | | | | | | | | | JobManager here is older version of the one in openlmi-storage. Let's sync it with the storage so I can use it from there. The patch includes: Fixed job expiration under SFCB. Added LMI_StorageJob.JobInParameters and .JobOutParameters properties. Allow python to exit the provider even if there are threads running. Fixed job returning an error Added possibility to set AffectedElements when a job finishes. Added workaround for rhbz#920763
* added support for indications to software providersMichal Minar2013-04-111-0/+1532
| | | | | | | Only static indication filters listed in mof/LMI_SoftwareIndicationFilters.mof are supported. They should be installed at rpm package installation, so user can use them for subscriptions.
* docu updated and fixed on some placesMichal Minar2013-04-111-13/+18
| | | | also some tab/spaces fixes
* added indication manager to openlmi.commonMichal Minar2013-04-111-0/+681
| | | | | | | | | | | | IndicationManager python module is useful for many providers across OpenLMI project. That's why it's landing in openlmi.common subpackage from openlmi-storage. It supports checking for static filters IndicationManager allows to check and install static filters at broker at runtime - but it should be avoided filters should work also under sfcbd
* moved singletonmixin module to shared subpackageMichal Minar2013-04-081-0/+560
| | | | | singletonmixin python module moved under openlmi.common from software source tree. This allows it to be shared be other OpenLMI projects.
* Happy New Year! (better later than never)Jan Synacek2013-03-132-2/+2
|
* logging improvementsMichal Minar2013-02-051-1/+2
| | | | | | made tracing message for function exit match the entry one added threading related logging for YumDB
* fixed pylint plugins0.0.18Michal Minar2013-02-041-0/+0
| | | | | | Marking of line positions for error suppression needed finetuning in other to make them more robust. They did not work for multiline statements like decorated functions/methods etc.
* new subpackage openlmi.common created for sharing codeMichal Minar2013-02-043-2/+229
| | | | | | | | openlmi.common subpackage allows to share code accros various OpenLMI provider packages. Currently there is a cmpi_logging.py module. Resolves: #71 in openlmi trac -- Make common package under openlmi namespace for utilities shared accross python providers.
* Relicence all sources from GPLv2+ to LGPLv2+0.0.15Radek Novacek2012-11-121-1/+1
|
* added python namespace package called openlmiMichal Minar2012-11-084-0/+19
This is aimed to be a common package for all openlmi python providers. It allows using fully-qualified imports in provider source packages.