| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
removed unused variables
made sure that code works the same in (no)debug mode
got rid of double frees
|
|
|
|
|
| |
Fixes logging of messages taking CMPIStatus::msg as an argument.
*msg* needs to be wrapped in CMGetCharsPtr().
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
* Fix copypasting error
* use natural "source instances" instead of pluralizing dict key
|
|
|
|
| |
Currently only InstallFromSoftwareIdentity() method is implemented.
|
| |
|
|
|
|
|
| |
Each software provider shall use the same sw-common initialization and
cleanup function.
|
|
|
|
|
| |
Added initialization and cleanup functions to software utilities needed
to initialize job manager.
|
| |
|
|
|
|
|
| |
Compile functions needed for rpm verification only if the rpm library is
detected.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Use newly added utility functions to fetch computer system or its system
name with current context either from cache or from broker.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When broker is started with some indication subscriptions active, it
immediately loads and starts corresponding providers that try to do
their init functions. At this time it's not possible to query the broker
for an instance of PG\_ComputerSystem though. Broker replies with
NOT\_FOUND.
This patch adds safe functions:
lmi_get_computer_system_safe()
lmi_get_system_name_safe()
accepting current context. They make sure that computer system will be
loaded even if the first attempt at init time failed.
Following functions are now marked as deprecated:
lmi_get_computer_system()
lmi_get_system_name()
Correct and ideal solution would be lazy evalution - load the computer
system when it's needed for the first time, not before. This means:
1. `get_computer_system()` cleared away from init
2. `lmi_get_computer_system()` and `lmi_get_system_name()`
accepting context and calling `get_computer_system()` to fetch it
either from cache or from broker
Unfortunately this would break libopenlmi's API.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With writing new tests, some limitations of current framework emerged.
For example, there has been assumption that one LMIIndication container
will only hold one CIMIndication instance. This is mostly true so far,
but does not have to be always, so is dangersous for further decisions.
Overview of changes:
* Interface of IndicationTestProbe for retrieving data
about delivered indications has been split from get_cns to
get_indications and get_ssource_instances. These don't expose
LMIIndication containers, but rather collect all indications to
one big list, and source instances to parallel list.
* Furthermore, as opposed to rather confusing get_cns, these new
methods don't automatically create PackedSequence or sort
indications. Instead, describe_* methods have been created
solely for this purpose. Similar change has been done to
get_ans, which is now split to get_actions and describe_*
for reporting.
* Also the number-baseded test had been oversimplified, which caused
confusion when trying to use it with LMI_Groups, where indication
name alias is different than sourceInstance alias.
* Assertions about streams are now made separately for indications and
source instances. This is now reflected in tests, which have the
oracles defined separately (expected_*_stream) and also have
aggregated the repeating code to check_* methods so that new
group assertions can be added easily on the go.
|
|
|
|
|
| |
continuation of former commit (dbddcd9) replacing pk_details_* functions
unavailable in PackageKit v0.8.9
|
|
|
|
| |
There are differences on systems with systemd and with old SysV init.
|
|
|
|
|
| |
* fixed FileSize - RPM is not using sb.st_size when comparing sizes
* don't count checksum for symbolic links
|
|
|
|
|
|
|
| |
Added function for checking computer system instance name. This is
usefull particularly in methods expecting an instance of
CIM_ComputerSystem passed as a parameter and needing to check whether it
matches current system.
|
| |
|
|
|
|
|
| |
Succeeded static filter had wrong constant hardcoded for successful
job state.
|
|
|
|
|
| |
Use is_elem_name_installed() function in associators and references method of
LMI_InstalledSoftwareIdentityProvider instead of manually checking it.
|
|
|
|
| |
CIMDateTime is apparently able to compare itself
|
| |
|
|
|
|
|
|
| |
This is how it was supposed to be in the first place (and how I
incorrectly presented the framework so far). Apparently I forgot to add
the sorting call.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Basic set of tests with focus on this flow:
1. add set of subscriptions
2. add set of handlers
3. trigger sequence of "interesting" events
4. collect indications
5. and make assertions as needed
Currently the assertions are mostly that correct classes have been
delivered, reporting the events in correct order.
|
|
|
|
| |
It defaults to off - python implementation is preferred.
|
|
|
|
|
|
|
|
| |
Functions like:
pk_details_get_package_id
pk_details_get_description
are available since version 0.8.12. In RHEL7 we have 0.8.9. Let's avoid
using them.
|
| |
|
| |
|
|
|
|
| |
Off-by-one.
|
|
|
|
| |
This is useful e.g. for indication filtering.
|
|
|
|
|
| |
PackedSequence failed to normalize properly sequences like
"1a,0b,1a", which it returned as "a,a" instead of "2a"
|
| |
|
|
|
|
|
|
|
|
|
| |
A small test framework for testing LMI Indications. Oriented on
data-driven testing approach and capable of "provoking" events
and tracking relevant indications.
Classes should be extended on provider-level to include provider-
-specific actions and knowledge.
|
|
|
|
| |
This will be used for indication test cases
|
|
|
|
| |
Properly configure logging of YumWorker process under older python.
|
|
|
|
| |
Use the same pattern in LmiTestCase.conn as CIMTestCase.wbemconnection. This saves the time and network bandwidth and also prepares test suite for lmiwbem module, where we could potentially run out of file descriptors range.
|
|
|
|
|
| |
There is no check_output function in subprocess module in python 2.6,
Popen will be used instead.
|
|
|
|
|
| |
Always use 'from lmi.test import unittest' instead of plain 'import
unittest', because it automagically imports unittest2 on python 2.6.
|
| |
|
|
|
|
|
| |
python 2.6 doesn't have logging.config.dictConfig, skip the logging
configuration in that case.
|
|
|
|
|
| |
service command is compatible even with non-systemd distribution and
still works with systemd.
|