| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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 years to include new year 2014.
|
|
|
|
| |
This patch removes trailing spaces from source files.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
Historically indication tests have been using pywbem machinery, which
is now obsolete as lmishell gained proper indication support recently.
|
|
|
|
|
| |
Our test framework logs stderr and stdout separately and it's hard to match
them together.
|
|
|
|
| |
It was skipped just for debugging purposes.
|
|
|
|
|
|
|
|
|
|
| |
/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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
| |
Added openlmi-python-test subpackage with contents taken from
src/python/lmi/test. This allows for testing code charing among verious
openlmi* git repositories.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Also remove dependency on sblim-cmpi-base
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Let's use gethostname() instead of querying BaseConfiguration's system_name
property that has been removed.
|
|
|
|
|
| |
Removed import from software provider. providers package can not depend
on any lmi provider package.
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
There is too much noise in TRACE_VERBOSE and exception stack trace is
more important than e.g. entering/leaving messages.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
The thread did not stop when AttributeError occured.
|
|
|
|
|
|
|
| |
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...
|
|
|
|
| |
Bumped version in setups to 0.3.0.
|
|
|
|
|
|
| |
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.
|
|
|
| |
log_debug() takes only 'msg' as parameter.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
PyPi requires valid classifiers from:
https://pypi.python.org/pypi?%3Aaction=list_classifiers
They compared case-sensitively.
added pywbem to requires
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
changed 'lmi' to 'openlmi' of python eggs to make them look related to
openlmi-storage and openlmi-tools eggs
preparation for upload to PyPi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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'
|
| |
|
|
|
|
|
|
| |
Inspired by StorageConfiguration. It loads configuration from
/etc/openlmi/<provider_prefix>/*. It needs to be subclassed for
particular set of python providers.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
To comply with lmi shell, which is placed in *lmi* package, and to
make our imports shorter, we are renaming *openlmi* namespace to *lmi*.
|
|
|
|
|
|
| |
We should cleanly shut down all threads when the provider is unloaded,
just to be nice to CIMOMs.
|