summaryrefslogtreecommitdiffstats
path: root/src/python
Commit message (Collapse)AuthorAgeFilesLines
* logicalfile: test providers' configurationJan Synacek2014-05-121-0/+19
|
* Move generic code to lmi.test.utilAlois Mahdal2014-05-071-0/+214
|
* Avoid endless import loop in lmi.test.unittest.Jan Safranek2014-04-182-28/+8
| | | | lmi.test.unittest is now defined directly in lmi/test/__init__.py
* Use unittest2 on Python 2.6Jan Safranek2014-04-184-3/+31
|
* Fixed loading of logging config.Jan Safranek2014-04-171-1/+1
| | | | | - use correct config file path - read correct config file item
* python 2.6 newclassAles Ledvinka2014-04-161-1/+1
|
* python2.6 software providerAles Ledvinka2014-04-111-1/+1
|
* python: fixed SystemName verificationMichal Minar2014-03-101-2/+8
| | | | | | If hostname can not be translated to IP, provider thinks it does not belong to running system. This change makes sure that hostname is properly recognized and no traceback is trown.
* tests: compare encoded values of keysMichal Minar2014-01-241-0/+8
| | | | | | When comparing instance names, treat unicode and str objects the same. Byte strings are supposed to use utf-8 encoding. Therefor unicode strings need to be encoded before comparison.
* Updated copyright yearsPeter Schiffer2014-01-1614-15/+15
| | | | Updated copyright years to include new year 2014.
* Remove trailing spacesPeter Schiffer2014-01-161-12/+12
| | | | This patch removes trailing spaces from source files.
* tests: ensure the use of exceptions is well definedMichal Minar2014-01-081-0/+7
| | | | | | | | | | | | | | | Some tests expect that exceptions won't be thrown out of LMIShell's functions. Others prefers them and enable them globally. This causes problems when running under nosetests all provider tests at once. Tests that modified enablement of exception throws globally caused others to fail. This patch makes sure that each TestCase has defined use of exceptions. Default state is to have them disabled. If a TestCase prefers having them enabled, just one variable needs to be overriden in its body: class AccountBase(lmibase.LmiTestCase): USE_EXCEPTIONS = True
* tests: Add missing import.Jan Safranek2014-01-081-0/+1
|
* Port indication test base to lmishellTomas Bzatek2014-01-031-0/+81
| | | | | Historically indication tests have been using pywbem machinery, which is now obsolete as lmishell gained proper indication support recently.
* Let the test write to stderr.Jan Safranek2013-12-191-3/+3
| | | | | Our test framework logs stderr and stdout separately and it's hard to match them together.
* Do not skip LMI_MountedFileSystem during tests.Jan Safranek2013-12-181-1/+0
| | | | It was skipped just for debugging purposes.
* Fixed openlmi-mof-register not to crash when CIMOM is down.Jan Safranek2013-12-181-0/+303
| | | | | | | | | | /usr/bin/mofcomp requires that Pegasus runs at the time the script is executed. Therefore we could not register any MOF files into database if Pegasus was down. To fix this, openlmi-mof-register now does not depend on mofcomp and contains its own MOF parser to parse just '#pragma include' directives, comments and string literals.
* Add test to call all EnumerateInstance{s,Names}, GetInstance, Associators ↵Jan Safranek2013-12-171-0/+174
| | | | | | | | | | | | | and References. This simple test calls EnumerateInstances and EnumerateInstanceNames on all LMI_* classes and then calls GetInstance, AssociatorNames, Associators, ReferenceNames and References on all instances. It does not check actual content of returned names and instances, it just checks that the above calls do not crash and are consistent (e.g. EnumerateInstanceNames returns the same set as EnumerateInstances).
* python: install test utilities in new subpackageMichal Minar2013-12-171-1/+1
| | | | | | Added openlmi-python-test subpackage with contents taken from src/python/lmi/test. This allows for testing code charing among verious openlmi* git repositories.
* software: minor test enhancementsMichal Minar2013-12-021-0/+2
| | | | | | | | | | | Added one test to SoftwareIdentityFileCheck.Invoke() method testing correct error code. Renamed testing package pkg1 to pkg2 in misc repository to match its comment. Rendering function CIMInstanceNames should behave nicely for objects of another type and return their text representation.
* 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'