summaryrefslogtreecommitdiffstats
path: root/src/python
Commit message (Collapse)AuthorAgeFilesLines
* Prepare 0.4.1 releaseRadek Novacek2013-11-041-1/+1
| | | | Also remove dependency on sblim-cmpi-base
* tests: added Base test cases for cim and lmi shell testsMichal Minar2013-11-044-350/+696
| | | | | | | | | | | | | | Base test case class is renamed to BaseLmiTest. But it's not intended for direct use in provider tests. For this purpose two more classes are added. Namely LmiTestCase and CIMTestCase. Tests wanting to take advantage of lmi shell's power should subclass LmiTestCase. Those based on pure pywbem code shall subclass the other one. Added lots of convenience methods. Allowed to use lmi.shell abstractions if available. Useful utilities are moved to standalone util module.
* python: fixed is_this_systemMichal Minar2013-10-311-3/+1
| | | | | Let's use gethostname() instead of querying BaseConfiguration's system_name property that has been removed.
* python: fixed ComputerSystem moduleMichal Minar2013-10-311-2/+2
| | | | | Removed import from software provider. providers package can not depend on any lmi provider package.
* python: solve ComputerSystem issuesMichal Minar2013-10-313-6/+177
| | | | | | | | | Added ComputerSystem module to lmi.providers with convenience functions allowing to obtain instance from CIMOM and check for its correctness when inspecting client's input. Also removed obsoleted system_name property out of BaseConfiguration class.
* python: bumped egg versions to 0.4.0Michal Minar2013-10-241-1/+1
|
* python: let's not hardcode version in setupsMichal Minar2013-10-243-4/+28
| | | | | | Let's write openlmi version to the main __init__ module of each python egg at build time. This version information is easily accessible from setup scripts.
* tests: added base class for our test casesMichal Minar2013-10-242-0/+467
| | | | | | | | import it in your tests with: from lmi.test.base import LmiTestCase For imports to work, run: export PYTHONPATH=${PROVIDERS_GIT_ROOT}/src/python before nosetests or before running them individually.
* Fixed sending of indications.Jan Safranek2013-10-221-2/+2
|
* Increase verbosity of logged exceptions.Jan Safranek2013-10-221-2/+2
| | | | There is too much noise in TRACE_VERBOSE and exception stack trace is more important than e.g. entering/leaving messages.
* python: correctly create function wrappersMichal Minar2013-10-181-0/+2
| | | | | | Function wrappers should look like the functions being wrapped. Without the *wraps()* decorator, the resulting function would not have assigned doc string, would have wrong name etc.
* python: changed the severity of function tracing messagesMichal Minar2013-10-101-7/+8
| | | | | | Tracing messages logging entries and exits of functions/methods polute the trace logs greatly. Let's make them less severe making them easy to suppress, while keeping other interesting messages enabled.
* python: allow to disable tracing decoratorsMichal Minar2013-10-101-5/+23
| | | | | | | | | | | | Tracing decorators are everywhere and they make debugging very inconvenient. This allows to disable them easily using environment variable. To disable them, just add export LMI_DISABLE_TRACING_DECORATORS=1 to your /usr/libexec/pegasus/$provider-cimprovagt script.
* Fix JobManager thread shutdown.Jan Safranek2013-10-091-1/+1
| | | | The thread did not stop when AttributeError occured.
* Use PG_ComputerSystem by default.Jan Safranek2013-10-091-1/+1
| | | | | | | And get rid of sblim-cmpi-base dependency. It would be nice if our tests have an option to select Linux_ComputerSystem or PG_ComputerSystem in the future...
* python: version bump of python providersMichal Minar2013-10-081-1/+1
| | | | Bumped version in setups to 0.3.0.
* python: support for older versions of python (2.6)Michal Minar2013-09-251-73/+67
| | | | | | dictConfig() function of logging.config module is not present in stdlib of python 2.6. This change replaces mentioned function call with manual setup of handlers and modules.
* Fixed logging of debug messages.Jan Safranek2013-09-191-1/+1
| | | log_debug() takes only 'msg' as parameter.
* Priority of traces should be lower than priority of DEBUG log messagesRadek Novacek2013-09-191-6/+8
|
* Introduce toplevel openlmi config fileRadek Novacek2013-09-181-12/+28
| | | | | | | | | | | | | Toplevel openlmi configuration file (/etc/openlmi/openlmi.conf) now contains common configuration options for all providers. Configuration for each provider could be overriden in provider-specific config (/etc/openlmi/$provider/$provider.conf). This patch also modify config file handling in python providers to include this config file. There is also support for C providers (in libopenlmicommon) for reading these config files and providing default configuration options.
* logging improvements and fixMichal Minar2013-09-121-14/+37
| | | | | | | | | Reduced length of tracing messages written to log by rendering just the first item of list, dict or set instead of whole argument. This will also improve execution time when running in debug mode. Fixed logging decorator of software job manager which previously rendered informations from uninteresting frame.
* python: added license to setup and corrected classifiersMichal Minar2013-09-101-3/+6
| | | | | | | | PyPi requires valid classifiers from: https://pypi.python.org/pypi?%3Aaction=list_classifiers They compared case-sensitively. added pywbem to requires
* bumped version to 0.2.00.2.0Michal Minar2013-08-281-1/+1
|
* python: improved loggingMichal Minar2013-08-271-3/+11
| | | | | | | | Allowed to pass different logging configuration dictionary. Changed behaviour, when [Log] Stderr = True. Now both logging to CIMOM and to stderr are enabled. Previously only logging to stderr has been done.
* renamed python eggsMichal Minar2013-08-231-1/+1
| | | | | | | changed 'lmi' to 'openlmi' of python eggs to make them look related to openlmi-storage and openlmi-tools eggs preparation for upload to PyPi
* python: redone cmpi_loggingMichal Minar2013-08-234-186/+381
| | | | | | | | | | | | | | | Module now contains enhanced tracing function decorators providing more details. There is no global logger, each provider module should obtain its own logger via get_logger() function. Usage of LogManager is optional. It allows for logging's reconfiguration, when config file is changed. Exceptions logged with error(), exception() or critical() methods are now logged twice: * First time for specified level with error message only. * Second time for TRACE_WARNING level with traceback. This prevents the polution of syslog.
* Bump version to 0.1.1Radek Novacek2013-08-081-1/+1
|
* Work around Pegasus not being able to handle instances of unknown classes.Jan Safranek2013-08-061-13/+25
| | | | | | | | | | | | | | This is hopefully temporary workaround, which: - Disables LMI_ConcreteJob.JobInParameters, as they are not that important and can contain arrays of references, which is prohibited by MOF syntax. - Removes input parameters from CIM_IndModifyInstance.MethodParameters from the same reason. - In CIM_IndModifyInstance.MethodParameters and LMI_ConcreteJob.JobOutParameters uses non-standard classname for the embedded object (__MethodParameters_<method name> and __MethodParameters_<method name>_Result), so we can register different class for each asynchronous method with output parameters.
* python: synced version of eggs with openlmi-providersMichal Minar2013-07-301-1/+1
|
* openlmi-python: split python packageMichal Minar2013-07-309-11/+37
| | | | | | | | | | | Split the openlmi-python package to 2: * openlmi-python-base - lmi namespace - functionality for any OpenLMI related python code - contains packages 'lmi' and 'lmi.base' * openlmi-python-providers - common functionality for OpenLMI providers - contains 'lmi.providers'
* 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
|